libcdio-0.83/0000755000175000017500000000000011652210413010045 500000000000000libcdio-0.83/lib/0000755000175000017500000000000011652210414010614 500000000000000libcdio-0.83/lib/udf/0000755000175000017500000000000011652210414011372 500000000000000libcdio-0.83/lib/udf/libudf.sym0000644000175000017500000000103311460453445013320 00000000000000debug_ecma_167_enums1 debug_ecma_167_timezone_enum debug_file_characteristics debug_icbtag_file_type_enum debug_tagid debug_udf_enums1 debug_udf_time_enum VSD_STD_ID_BEA01 VSD_STD_ID_BOOT2 VSD_STD_ID_CD001 VSD_STD_ID_CDW01 VSD_STD_ID_NSR03 VSD_STD_ID_TEA01 udf_close udf_dirent_free udf_get_file_entry udf_get_file_length udf_get_fileid_descriptor udf_get_filename udf_get_link_count udf_get_part_number udf_get_posix_filemode udf_opendir udf_read_block udf_readdir udf_is_dir udf_open udf_read_sectors udf_stamp_to_time udf_time_to_stamp libcdio-0.83/lib/udf/udf_time.c0000644000175000017500000001705111650125103013254 00000000000000/* Copyright (C) 2005, 2008, 2011 Rocky Bernstein Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. Modified From part of the GNU C Library. Contributed by Paul Eggert. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Some history from the GNU/Linux kernel from which this is also taken... dgb 10/02/98: ripped this from glibc source to help convert timestamps to unix time 10/04/98: added new table-based lookup after seeing how ugly the gnu code is blf 09/27/99: ripped out all the old code and inserted new table from John Brockmeyer (without leap second corrections) rewrote udf_stamp_to_time and fixed timezone accounting in udf_timespec_to_stamp. */ /* * We don't take into account leap seconds. This may be correct or incorrect. * For more NIST information (especially dealing with leap seconds), see: * http://www.boulder.nist.gov/timefreq/pubs/bulletin/leapsecond.htm */ #ifdef HAVE_CONFIG_H #include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #ifdef NEED_TIMEZONEVAR #define timezonevar 1 #endif #include "udf_private.h" #include /** Imagine the below enum values as #define'd or constant values rather than distinct values of an enum. */ enum { HOURS_PER_DAY = 24, SECS_PER_MINUTE = 60, MAX_YEAR_SECONDS = 69, DAYS_PER_YEAR = 365, /* That is, in most of the years. */ EPOCH_YEAR = 1970, SECS_PER_HOUR = (60 * SECS_PER_MINUTE), SECS_PER_DAY = SECS_PER_HOUR * HOURS_PER_DAY } debug_udf_time_enum; #ifndef __isleap /* Nonzero if YEAR is a leap year (every 4 years, except every 100th isn't, and every 400th is). */ #define __isleap(year) \ ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) #endif /* How many days come before each month (0-12). */ static const unsigned short int __mon_yday[2][13] = { /* Normal years. */ { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, DAYS_PER_YEAR }, /* Leap years. */ { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, DAYS_PER_YEAR+1 } }; #define SPY(y,l,s) (SECS_PER_DAY * (DAYS_PER_YEAR*y+l)+s) /* Seconds per year */ static time_t year_seconds[MAX_YEAR_SECONDS]= { /*1970*/ SPY( 0, 0,0), SPY( 1, 0,0), SPY( 2, 0,0), SPY( 3, 1,0), /*1974*/ SPY( 4, 1,0), SPY( 5, 1,0), SPY( 6, 1,0), SPY( 7, 2,0), /*1978*/ SPY( 8, 2,0), SPY( 9, 2,0), SPY(10, 2,0), SPY(11, 3,0), /*1982*/ SPY(12, 3,0), SPY(13, 3,0), SPY(14, 3,0), SPY(15, 4,0), /*1986*/ SPY(16, 4,0), SPY(17, 4,0), SPY(18, 4,0), SPY(19, 5,0), /*1990*/ SPY(20, 5,0), SPY(21, 5,0), SPY(22, 5,0), SPY(23, 6,0), /*1994*/ SPY(24, 6,0), SPY(25, 6,0), SPY(26, 6,0), SPY(27, 7,0), /*1998*/ SPY(28, 7,0), SPY(29, 7,0), SPY(30, 7,0), SPY(31, 8,0), /*2002*/ SPY(32, 8,0), SPY(33, 8,0), SPY(34, 8,0), SPY(35, 9,0), /*2006*/ SPY(36, 9,0), SPY(37, 9,0), SPY(38, 9,0), SPY(39,10,0), /*2010*/ SPY(40,10,0), SPY(41,10,0), SPY(42,10,0), SPY(43,11,0), /*2014*/ SPY(44,11,0), SPY(45,11,0), SPY(46,11,0), SPY(47,12,0), /*2018*/ SPY(48,12,0), SPY(49,12,0), SPY(50,12,0), SPY(51,13,0), /*2022*/ SPY(52,13,0), SPY(53,13,0), SPY(54,13,0), SPY(55,14,0), /*2026*/ SPY(56,14,0), SPY(57,14,0), SPY(58,14,0), SPY(59,15,0), /*2030*/ SPY(60,15,0), SPY(61,15,0), SPY(62,15,0), SPY(63,16,0), /*2034*/ SPY(64,16,0), SPY(65,16,0), SPY(66,16,0), SPY(67,17,0), /*2038*/ SPY(68,17,0) }; #ifdef HAVE_TIMEZONE_VAR extern long timezone; #endif time_t * udf_stamp_to_time(time_t *dest, long int *dest_usec, const udf_timestamp_t src) { int yday; uint8_t type = src.type_tz >> 12; int16_t offset; if (type == 1) { offset = src.type_tz << 4; /* sign extent offset */ offset = (offset >> 4); if (offset == -2047) /* unspecified offset */ offset = 0; } else offset = 0; if ((src.year < EPOCH_YEAR) || (src.year >= EPOCH_YEAR+MAX_YEAR_SECONDS)) { *dest = -1; *dest_usec = -1; return NULL; } *dest = year_seconds[src.year - EPOCH_YEAR]; *dest -= offset * SECS_PER_MINUTE; yday = ((__mon_yday[__isleap (src.year)] [src.month-1]) + (src.day-1)); *dest += src.second + ( SECS_PER_MINUTE * ( ( (yday* HOURS_PER_DAY) + src.hour ) * 60 + src.minute ) ); *dest_usec = src.microseconds + (src.centiseconds * 10000) + (src.hundreds_of_microseconds * 100); return dest; } #ifdef HAVE_STRUCT_TIMESPEC /*! Convert a UDF timestamp to a time_t. If microseconds are desired, use dest_usec. The return value is the same as dest. */ udf_timestamp_t * udf_timespec_to_stamp(const struct timespec ts, udf_timestamp_t *dest) { long int days, rem, y; const unsigned short int *ip; int16_t offset = 0; int16_t tv_sec; #ifdef HAVE_TIMEZONE_VAR offset = -timezone; #endif if (!dest) return dest; dest->type_tz = 0x1000 | (offset & 0x0FFF); tv_sec = ts.tv_sec + (offset * SECS_PER_MINUTE); days = tv_sec / SECS_PER_DAY; rem = tv_sec % SECS_PER_DAY; dest->hour = rem / SECS_PER_HOUR; rem %= SECS_PER_HOUR; dest->minute = rem / SECS_PER_MINUTE; dest->second = rem % SECS_PER_MINUTE; y = EPOCH_YEAR; #define DIV(a,b) ((a) / (b) - ((a) % (b) < 0)) #define LEAPS_THRU_END_OF(y) (DIV (y, 4) - DIV (y, 100) + DIV (y, 400)) while (days < 0 || days >= (__isleap(y) ? DAYS_PER_YEAR+1 : DAYS_PER_YEAR)) { long int yg = y + days / DAYS_PER_YEAR - (days % DAYS_PER_YEAR < 0); /* Adjust DAYS and Y to match the guessed year. */ days -= ((yg - y) * DAYS_PER_YEAR + LEAPS_THRU_END_OF (yg - 1) - LEAPS_THRU_END_OF (y - 1)); y = yg; } dest->year = y; ip = __mon_yday[__isleap(y)]; for (y = 11; days < (long int) ip[y]; --y) continue; days -= ip[y]; dest->month = y + 1; dest->day = days + 1; dest->centiseconds = ts.tv_nsec / 10000000; dest->hundreds_of_microseconds = ( (ts.tv_nsec / 1000) - (dest->centiseconds * 10000) ) / 100; dest->microseconds = ( (ts.tv_nsec / 1000) - (dest->centiseconds * 10000) - (dest->hundreds_of_microseconds * 100) ); return dest; } #endif /*! Return the modification time of the file. */ time_t udf_get_modification_time(const udf_dirent_t *p_udf_dirent) { if (p_udf_dirent) { time_t ret_time; long int usec; udf_stamp_to_time(&ret_time, &usec, p_udf_dirent->fe.modification_time); return ret_time; } return 0; } /*! Return the access time of the file. */ time_t udf_get_access_time(const udf_dirent_t *p_udf_dirent) { if (p_udf_dirent) { time_t ret_time; long int usec; udf_stamp_to_time(&ret_time, &usec, p_udf_dirent->fe.access_time); return ret_time; } return 0; } /*! Return the attribute (most recent create or access) time of the file */ time_t udf_get_attribute_time(const udf_dirent_t *p_udf_dirent) { if (p_udf_dirent) { time_t ret_time; long int usec; udf_stamp_to_time(&ret_time, &usec, p_udf_dirent->fe.attribute_time); return ret_time; } return 0; } libcdio-0.83/lib/udf/udf_private.h0000644000175000017500000000357411650125007014005 00000000000000/* Copyright (C) 2005, 2006, 2008, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef __CDIO_UDF_PRIVATE_H__ #define __CDIO_UDF_PRIVATE_H__ #if defined(HAVE_CONFIG_H) && !defined(LIBCDIO_CONFIG_H) && !defined(__CDIO_CONFIG_H__) # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #include #include "_cdio_stdio.h" /* Implementation of opaque types */ struct udf_s { bool b_stream; /* Use stream pointer, else use p_cdio. */ ssize_t i_position; /* Position in file if positive. */ CdioDataSource_t *stream; /* Stream pointer if stream */ CdIo_t *cdio; /* Cdio pointer if read device */ anchor_vol_desc_ptr_t anchor_vol_desc_ptr; uint32_t pvd_lba; /* sector of Primary Volume Descriptor */ partition_num_t i_partition; /* partition number */ uint32_t i_part_start; /* start of Partition Descriptor */ uint32_t lvd_lba; /* sector of Logical Volume Descriptor */ uint32_t fsd_offset; /* lba of fileset descriptor */ }; #endif /* __CDIO_UDF_PRIVATE_H__ */ /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/lib/udf/udf_fs.h0000644000175000017500000000220711114145233012731 00000000000000/* $Id: udf_fs.h,v 1.3 2008/04/18 16:02:10 karl Exp $ Copyright (C) 2006, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef __CDIO_UDF_FS_H__ #define __CDIO_UDF_FS_H__ #include /** * Check the descriptor tag for both the correct id and correct checksum. * Return zero if all is good, -1 if not. */ int udf_checktag(const udf_tag_t *p_tag, udf_Uint16_t tag_id); #endif /* __CDIO_UDF_FS_H__ */ /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/lib/udf/udf_file.c0000644000175000017500000001630011650124725013242 00000000000000/* Copyright (C) 2005, 2006, 2008, 2010 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Access routines */ /* udf_private.h has to come first else _FILE_OFFSET_BITS are redefined in say opensolaris. */ #include "udf_private.h" #include #include "udf_fs.h" #ifdef HAVE_STRING_H # include #endif #include /* Remove when adding cdio/logging.h */ /* Useful defines */ #define MIN(a, b) (aalloc_descs[offset] const char * udf_get_filename(const udf_dirent_t *p_udf_dirent) { if (!p_udf_dirent) return NULL; if (!p_udf_dirent->psz_name) return ".."; return p_udf_dirent->psz_name; } /* Get UDF File Entry. However we do NOT get the variable-length extended attributes. */ bool udf_get_file_entry(const udf_dirent_t *p_udf_dirent, /*out*/ udf_file_entry_t *p_udf_fe) { if (!p_udf_dirent) return false; memcpy(p_udf_fe, &p_udf_dirent->fe, sizeof(udf_file_entry_t)); return true; } /*! Return the file id descriptor of the given file. */ bool udf_get_fileid_descriptor(const udf_dirent_t *p_udf_dirent, /*out*/ udf_fileid_desc_t *p_udf_fid) { if (!p_udf_dirent) return false; if (!p_udf_dirent->fid) { /* FIXME do something about trying to get the descriptor. */ return false; } memcpy(p_udf_fid, p_udf_dirent->fid, sizeof(udf_fileid_desc_t)); return true; } /*! Return the number of hard links of the file. Return 0 if error. */ uint16_t udf_get_link_count(const udf_dirent_t *p_udf_dirent) { if (p_udf_dirent) { return uint16_from_le(p_udf_dirent->fe.link_count); } return 0; /* Error. Non-error case handled above. */ } /*! Return the file length the file. Return 2147483647L if error. */ uint64_t udf_get_file_length(const udf_dirent_t *p_udf_dirent) { if (p_udf_dirent) { return uint64_from_le(p_udf_dirent->fe.info_len); } return 2147483647L; /* Error. Non-error case handled above. */ } /*! Return true if the file is a directory. */ bool udf_is_dir(const udf_dirent_t *p_udf_dirent) { return p_udf_dirent->b_dir; } /* * Translate a file offset into a logical block and then into a physical * block. */ static lba_t offset_to_lba(const udf_dirent_t *p_udf_dirent, off_t i_offset, /*out*/ lba_t *pi_lba, /*out*/ uint32_t *pi_max_size) { udf_t *p_udf = p_udf_dirent->p_udf; const udf_file_entry_t *p_udf_fe = (udf_file_entry_t *) &p_udf_dirent->fe; const udf_icbtag_t *p_icb_tag = &p_udf_fe->icb_tag; const uint16_t strat_type= uint16_from_le(p_icb_tag->strat_type); switch (strat_type) { case 4096: printf("Cannot deal with strategy4096 yet!\n"); return CDIO_INVALID_LBA; break; case ICBTAG_STRATEGY_TYPE_4: { uint32_t icblen = 0; lba_t lsector; int ad_offset, ad_num = 0; uint16_t addr_ilk = uint16_from_le(p_icb_tag->flags&ICBTAG_FLAG_AD_MASK); switch (addr_ilk) { case ICBTAG_FLAG_AD_SHORT: { udf_short_ad_t *p_icb; /* * The allocation descriptor field is filled with short_ad's. * If the offset is beyond the current extent, look for the * next extent. */ do { i_offset -= icblen; ad_offset = sizeof(udf_short_ad_t) * ad_num; if (ad_offset > uint32_from_le(p_udf_fe->i_alloc_descs)) { printf("File offset out of bounds\n"); return CDIO_INVALID_LBA; } p_icb = (udf_short_ad_t *) GETICB( uint32_from_le(p_udf_fe->i_extended_attr) + ad_offset ); icblen = p_icb->len; ad_num++; } while(i_offset >= icblen); lsector = (i_offset / UDF_BLOCKSIZE) + p_icb->pos; *pi_max_size = p_icb->len; } break; case ICBTAG_FLAG_AD_LONG: { /* * The allocation descriptor field is filled with long_ad's * If the i_offset is beyond the current extent, look for the * next extent. */ udf_long_ad_t *p_icb; do { i_offset -= icblen; ad_offset = sizeof(udf_long_ad_t) * ad_num; if (ad_offset > uint32_from_le(p_udf_fe->i_alloc_descs)) { printf("File offset out of bounds\n"); return CDIO_INVALID_LBA; } p_icb = (udf_long_ad_t *) GETICB( uint32_from_le(p_udf_fe->i_extended_attr) + ad_offset ); icblen = p_icb->len; ad_num++; } while(i_offset >= icblen); lsector = (i_offset / UDF_BLOCKSIZE) + uint32_from_le(((udf_long_ad_t *)(p_icb))->loc.lba); *pi_max_size = p_icb->len; } break; case ICBTAG_FLAG_AD_IN_ICB: /* * This type means that the file *data* is stored in the * allocation descriptor field of the file entry. */ *pi_max_size = 0; printf("Don't know how to data in ICB handle yet\n"); return CDIO_INVALID_LBA; case ICBTAG_FLAG_AD_EXTENDED: printf("Don't know how to handle extended addresses yet\n"); return CDIO_INVALID_LBA; default: printf("Unsupported allocation descriptor %d\n", addr_ilk); return CDIO_INVALID_LBA; } *pi_lba = lsector + p_udf->i_part_start; return *pi_lba; } default: printf("Unknown strategy type %d\n", strat_type); return DRIVER_OP_ERROR; } } /** Attempts to read up to count bytes from UDF directory entry p_udf_dirent into the buffer starting at buf. buf should be a multiple of UDF_BLOCKSIZE bytes. Reading continues after the point at which we last read or from the beginning the first time. If count is zero, read() returns zero and has no other results. If count is greater than SSIZE_MAX, the result is unspecified. It is the caller's responsibility to ensure that count is less than the number of blocks recorded via p_udf_dirent. If there is an error, cast the result to driver_return_code_t for the specific error code. */ ssize_t udf_read_block(const udf_dirent_t *p_udf_dirent, void * buf, size_t count) { if (count == 0) return 0; else { driver_return_code_t ret; uint32_t i_max_size=0; udf_t *p_udf = p_udf_dirent->p_udf; lba_t i_lba = offset_to_lba(p_udf_dirent, p_udf->i_position, &i_lba, &i_max_size); if (i_lba != CDIO_INVALID_LBA) { uint32_t i_max_blocks = CEILING(i_max_size, UDF_BLOCKSIZE); if ( i_max_blocks < count ) { fprintf(stderr, "Warning: read count %u is larger than %u extent size.\n", count, i_max_blocks); fprintf(stderr, "Warning: read count truncated to %u\n", count); count = i_max_blocks; } ret = udf_read_sectors(p_udf, buf, i_lba, count); if (DRIVER_OP_SUCCESS == ret) { ssize_t i_read_len = MIN(i_max_size, count * UDF_BLOCKSIZE); p_udf->i_position += i_read_len; return i_read_len; } return ret; } else { return DRIVER_OP_ERROR; } } } libcdio-0.83/lib/udf/Makefile.am0000644000175000017500000000414511650344007013356 00000000000000# Copyright (C) 2003, 2004, 2006, 2008, 2011 # Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ######################################################## # Things to make the libudf library ######################################################## # # From libtool documentation amended with guidance from N. Boullis: # # 1. Start with version information of `0:0:0' for each libtool library. # # 2. It is probably not a good idea to update the version information # several times between public releases, but rather once per public # release. (This seems to be more an aesthetic consideration than # a hard technical one.) # # 3. If the library source code has changed at all since the last # update, then increment REVISION (`C:R:A' becomes `C:R+1:A'). # # 4. If any interfaces have been added, removed, or changed since the # last update, increment CURRENT, and set REVISION to 0. # # 5. If any interfaces have been added since the last public release, # then increment AGE. # # 6. If any interfaces have been removed or changed since the last # public release, then set AGE to 0. A changed interface means an # incompatibility with previous versions. libudf_la_CURRENT = 1 libudf_la_REVISION = 0 libudf_la_AGE = 0 EXTRA_DIST = libudf.sym noinst_HEADERS = udf_fs.h udf_private.h lib_LTLIBRARIES = libudf.la libudf_la_SOURCES = udf.c udf_file.c udf_fs.c udf_time.c filemode.c libudf_la_LIBADD = @LIBCDIO_LIBS@ @LT_NO_UNDEFINED@ INCLUDES = $(LIBCDIO_CFLAGS) libcdio-0.83/lib/udf/udf.c0000644000175000017500000000653211400372063012242 00000000000000/* Copyright (C) 2005, 2008, 2010 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Access routines */ /* udf_private.h has to come first else _FILE_OFFSET_BITS are redefined in say opensolaris. */ #include "udf_private.h" #include #ifdef HAVE_STRING_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif /** The below variables are trickery to force enum symbol values to be recorded in debug symbol tables. They are used to allow one to refer to the enumeration value names in the typedefs above in a debugger and debugger expressions */ tag_id_t debug_tagid; file_characteristics_t debug_file_characteristics; icbtag_file_type_enum_t debug_icbtag_file_type_enum; icbtag_flag_enum_t debug_flag_enum; ecma_167_enum1_t debug_ecma_167_enum1; ecma_167_timezone_enum_t debug_ecma_167_timezone_enum; udf_enum1_t debug_udf_enum1; /*! Returns POSIX mode bitstring for a given file. */ mode_t udf_get_posix_filemode(const udf_dirent_t *p_udf_dirent) { udf_file_entry_t udf_fe; mode_t mode = 0; if (udf_get_file_entry(p_udf_dirent, &udf_fe)) { uint16_t i_flags; uint32_t i_perms; i_perms = uint32_from_le(udf_fe.permissions); i_flags = uint16_from_le(udf_fe.icb_tag.flags); if (i_perms & FE_PERM_U_READ) mode |= S_IRUSR; if (i_perms & FE_PERM_U_WRITE) mode |= S_IWUSR; if (i_perms & FE_PERM_U_EXEC) mode |= S_IXUSR; #ifdef S_IRGRP if (i_perms & FE_PERM_G_READ) mode |= S_IRGRP; if (i_perms & FE_PERM_G_WRITE) mode |= S_IWGRP; if (i_perms & FE_PERM_G_EXEC) mode |= S_IXGRP; #endif #ifdef S_IROTH if (i_perms & FE_PERM_O_READ) mode |= S_IROTH; if (i_perms & FE_PERM_O_WRITE) mode |= S_IWOTH; if (i_perms & FE_PERM_O_EXEC) mode |= S_IXOTH; #endif switch (udf_fe.icb_tag.file_type) { case ICBTAG_FILE_TYPE_DIRECTORY: mode |= S_IFDIR; break; case ICBTAG_FILE_TYPE_REGULAR: mode |= S_IFREG; break; #ifdef S_IFLNK case ICBTAG_FILE_TYPE_SYMLINK: mode |= S_IFLNK; break; #endif case ICBTAG_FILE_TYPE_CHAR: mode |= S_IFCHR; break; #ifdef S_IFSOCK case ICBTAG_FILE_TYPE_SOCKET: mode |= S_IFSOCK; break; #endif case ICBTAG_FILE_TYPE_BLOCK: mode |= S_IFBLK; break; default: ; }; #ifdef S_ISUID if (i_flags & ICBTAG_FLAG_SETUID) mode |= S_ISUID; if (i_flags & ICBTAG_FLAG_SETGID) mode |= S_ISGID; if (i_flags & ICBTAG_FLAG_STICKY) mode |= S_ISVTX; #endif } return mode; } /*! Return the partition number of the the opened udf handle. -1 Is returned if we have an error. */ int16_t udf_get_part_number(const udf_t *p_udf) { if (!p_udf) return -1; return p_udf->i_partition; } libcdio-0.83/lib/udf/filemode.c0000644000175000017500000001550411650125131013246 00000000000000/* filemode.c -- make a string describing file modes Copyright (C) 2005, 2008, 2011 Rocky Bernstein Copyright (C) 1985, 1990, 1993, 1998-2000 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #if HAVE_CONFIG_H # include # define __CDIO_CONFIG_H__ 1 #endif #ifdef HAVE_SYS_STAT_H #include #endif #include #if !S_IRUSR # if S_IREAD # define S_IRUSR S_IREAD # else # define S_IRUSR 00400 # endif #endif #if !S_IWUSR # if S_IWRITE # define S_IWUSR S_IWRITE # else # define S_IWUSR 00200 # endif #endif #if !S_IXUSR # if S_IEXEC # define S_IXUSR S_IEXEC # else # define S_IXUSR 00100 # endif #endif #if !S_IRGRP # define S_IRGRP (S_IRUSR >> 3) #endif #if !S_IWGRP # define S_IWGRP (S_IWUSR >> 3) #endif #if !S_IXGRP # define S_IXGRP (S_IXUSR >> 3) #endif #if !S_IROTH # define S_IROTH (S_IRUSR >> 6) #endif #if !S_IWOTH # define S_IWOTH (S_IWUSR >> 6) #endif #if !S_IXOTH # define S_IXOTH (S_IXUSR >> 6) #endif #ifdef STAT_MACROS_BROKEN # undef S_ISBLK # undef S_ISCHR # undef S_ISDIR # undef S_ISFIFO # undef S_ISLNK # undef S_ISMPB # undef S_ISMPC # undef S_ISNWK # undef S_ISREG # undef S_ISSOCK #endif /* STAT_MACROS_BROKEN. */ #if !defined S_ISBLK && defined S_IFBLK # define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) #endif #if !defined S_ISCHR && defined S_IFCHR # define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) #endif #if !defined S_ISDIR && defined S_IFDIR # define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) #endif #if !defined S_ISREG && defined S_IFREG # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) #endif #if !defined S_ISFIFO && defined S_IFIFO # define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) #endif #if !defined S_ISLNK && defined S_IFLNK # define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) #endif #if !defined S_ISSOCK && defined S_IFSOCK # define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) #endif #if !defined S_ISMPB && defined S_IFMPB /* V7 */ # define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB) # define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC) #endif #if !defined S_ISNWK && defined S_IFNWK /* HP/UX */ # define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK) #endif #if !defined S_ISDOOR && defined S_IFDOOR /* Solaris 2.5 and up */ # define S_ISDOOR(m) (((m) & S_IFMT) == S_IFDOOR) #endif #if !defined S_ISCTG && defined S_IFCTG /* MassComp */ # define S_ISCTG(m) (((m) & S_IFMT) == S_IFCTG) #endif /* Set the 's' and 't' flags in file attributes string CHARS, according to the file mode BITS. */ static void setst (mode_t bits, char *chars) { #ifdef S_ISUID if (bits & S_ISUID) { if (chars[3] != 'x') /* Set-uid, but not executable by owner. */ chars[3] = 'S'; else chars[3] = 's'; } #endif #ifdef S_ISGID if (bits & S_ISGID) { if (chars[6] != 'x') /* Set-gid, but not executable by group. */ chars[6] = 'S'; else chars[6] = 's'; } #endif #ifdef S_ISVTX if (bits & S_ISVTX) { if (chars[9] != 'x') /* Sticky, but not executable by others. */ chars[9] = 'T'; else chars[9] = 't'; } #endif } /* Return a character indicating the type of file described by file mode BITS: 'd' for directories 'D' for doors 'b' for block special files 'c' for character special files 'n' for network special files 'm' for multiplexor files 'M' for an off-line (regular) file 'l' for symbolic links 's' for sockets 'p' for fifos 'C' for contigous data files '-' for regular files '?' for any other file type. */ static char ftypelet (mode_t bits) { #ifdef S_ISBLK if (S_ISBLK (bits)) return 'b'; #endif if (S_ISCHR (bits)) return 'c'; if (S_ISDIR (bits)) return 'd'; if (S_ISREG (bits)) return '-'; #ifdef S_ISFIFO if (S_ISFIFO (bits)) return 'p'; #endif #ifdef S_ISLNK if (S_ISLNK (bits)) return 'l'; #endif #ifdef S_ISSOCK if (S_ISSOCK (bits)) return 's'; #endif #ifdef S_ISMPC if (S_ISMPC (bits)) return 'm'; #endif #ifdef S_ISNWK if (S_ISNWK (bits)) return 'n'; #endif #ifdef S_ISDOOR if (S_ISDOOR (bits)) return 'D'; #endif #ifdef S_ISCTG if (S_ISCTG (bits)) return 'C'; #endif /* The following two tests are for Cray DMF (Data Migration Facility), which is a HSM file system. A migrated file has a `st_dm_mode' that is different from the normal `st_mode', so any tests for migrated files should use the former. */ #ifdef S_ISOFD if (S_ISOFD (bits)) /* off line, with data */ return 'M'; #endif #ifdef S_ISOFL /* off line, with no data */ if (S_ISOFL (bits)) return 'M'; #endif return '?'; } /*! udf_mode_string - fill in string STR with an ls-style ASCII representation of the st_mode field of file stats block STATP. 10 characters are stored in STR; no terminating null is added. The characters stored in STR are: 0 File type. 'd' for directory, 'c' for character special, 'b' for block special, 'm' for multiplex, 'l' for symbolic link, 's' for socket, 'p' for fifo, '-' for regular, '?' for any other file type 1 'r' if the owner may read, '-' otherwise. 2 'w' if the owner may write, '-' otherwise. 3 'x' if the owner may execute, 's' if the file is set-user-id, '-' otherwise. 'S' if the file is set-user-id, but the execute bit isn't set. 4 'r' if group members may read, '-' otherwise. 5 'w' if group members may write, '-' otherwise. 6 'x' if group members may execute, 's' if the file is set-group-id, '-' otherwise. 'S' if it is set-group-id but not executable. 7 'r' if any user may read, '-' otherwise. 8 'w' if any user may write, '-' otherwise. 9 'x' if any user may execute, 't' if the file is "sticky" (will be retained in swap space after execution), '-' otherwise. 'T' if the file is sticky but not executable. */ char * udf_mode_string (mode_t i_mode, char *psz_str) { psz_str[ 0] = ftypelet (i_mode); psz_str[ 1] = i_mode & S_IRUSR ? 'r' : '-'; psz_str[ 2] = i_mode & S_IWUSR ? 'w' : '-'; psz_str[ 3] = i_mode & S_IXUSR ? 'x' : '-'; psz_str[ 4] = i_mode & S_IRGRP ? 'r' : '-'; psz_str[ 5] = i_mode & S_IWGRP ? 'w' : '-'; psz_str[ 6] = i_mode & S_IXGRP ? 'x' : '-'; psz_str[ 7] = i_mode & S_IROTH ? 'r' : '-'; psz_str[ 8] = i_mode & S_IWOTH ? 'w' : '-'; psz_str[ 9] = i_mode & S_IXOTH ? 'x' : '-'; psz_str[10] = '\0'; setst (i_mode, psz_str); return psz_str; } libcdio-0.83/lib/udf/udf_fs.c0000644000175000017500000005027111650125054012734 00000000000000/* Copyright (C) 2005, 2006, 2008, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* * Portions copyright (c) 2001, 2002 Scott Long * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #ifdef HAVE_STRING_H # include #endif #ifdef HAVE_STDLIB_H # include #endif /* These definitions are also to make debugging easy. Note that they have to come *before* #include which sets #defines for these. */ const char VSD_STD_ID_BEA01[] = {'B', 'E', 'A', '0', '1'}; const char VSD_STD_ID_BOOT2[] = {'B', 'O', 'O', 'T', '2'}; const char VSD_STD_ID_CD001[] = {'C', 'D', '0', '0', '1'}; const char VSD_STD_ID_CDW01[] = {'C', 'D', 'W', '0', '2'}; const char VSD_STD_ID_NSR03[] = {'N', 'S', 'R', '0', '3'}; const char VSD_STD_ID_TEA01[] = {'T', 'E', 'A', '0', '1'}; #include #include "udf_private.h" #include "udf_fs.h" /* * The UDF specs are pretty clear on how each data structure is made * up, but not very clear on how they relate to each other. Here is * the skinny... This demostrates a filesystem with one file in the * root directory. Subdirectories are treated just as normal files, * but they have File Id Descriptors of their children as their file * data. As for the Anchor Volume Descriptor Pointer, it can exist in * two of the following three places: sector 256, sector n (the max * sector of the disk), or sector n - 256. It's a pretty good bet * that one will exist at sector 256 though. One caveat is unclosed * CD media. For that, sector 256 cannot be written, so the Anchor * Volume Descriptor Pointer can exist at sector 512 until the media * is closed. * * Sector: * 256: * n: Anchor Volume Descriptor Pointer * n - 256: | * | * |-->Main Volume Descriptor Sequence * | | * | | * | |-->Logical Volume Descriptor * | | * |-->Partition Descriptor | * | | * | | * |-->Fileset Descriptor * | * | * |-->Root Dir File Entry * | * | * |-->File data: * File Id Descriptor * | * | * |-->File Entry * | * | * |-->File data */ static udf_dirent_t * udf_new_dirent(udf_file_entry_t *p_udf_fe, udf_t *p_udf, const char *psz_name, bool b_dir, bool b_parent); /** * Check the descriptor tag for both the correct id and correct checksum. * Return zero if all is good, -1 if not. */ int udf_checktag(const udf_tag_t *p_tag, udf_Uint16_t tag_id) { uint8_t *itag; uint8_t i; uint8_t cksum = 0; itag = (uint8_t *)p_tag; if (p_tag->id != tag_id) return -1; for (i = 0; i < 15; i++) cksum = cksum + itag[i]; cksum = cksum - itag[4]; if (cksum == p_tag->cksum) return 0; return -1; } bool udf_get_lba(const udf_file_entry_t *p_udf_fe, /*out*/ uint32_t *start, /*out*/ uint32_t *end) { if (! p_udf_fe->i_alloc_descs) return false; switch (p_udf_fe->icb_tag.flags & ICBTAG_FLAG_AD_MASK) { case ICBTAG_FLAG_AD_SHORT: { /* The allocation descriptor field is filled with short_ad's. */ udf_short_ad_t *p_ad = (udf_short_ad_t *) (p_udf_fe->ext_attr + p_udf_fe->i_extended_attr); *start = uint32_from_le(p_ad->pos); *end = *start + ((uint32_from_le(p_ad->len) & UDF_LENGTH_MASK) - 1) / UDF_BLOCKSIZE; return true; } break; case ICBTAG_FLAG_AD_LONG: { /* The allocation descriptor field is filled with long_ad's */ udf_long_ad_t *p_ad = (udf_long_ad_t *) (p_udf_fe->ext_attr + p_udf_fe->i_extended_attr); *start = uint32_from_le(p_ad->loc.lba); /* ignore partition number */ *end = *start + ((uint32_from_le(p_ad->len) & UDF_LENGTH_MASK) - 1) / UDF_BLOCKSIZE; return true; } break; case ICBTAG_FLAG_AD_EXTENDED: { udf_ext_ad_t *p_ad = (udf_ext_ad_t *) (p_udf_fe->ext_attr + p_udf_fe->i_extended_attr); *start = uint32_from_le(p_ad->ext_loc.lba); /* ignore partition number */ *end = *start + ((uint32_from_le(p_ad->len) & UDF_LENGTH_MASK) - 1) / UDF_BLOCKSIZE; return true; } break; default: return false; } return false; } #define udf_PATH_DELIMITERS "/\\" /* Searches p_udf_dirent a directory entry called psz_token. Note p_udf_dirent is continuously updated. If the entry is not found p_udf_dirent is useless and thus the caller should not use it afterwards. */ static udf_dirent_t * udf_ff_traverse(udf_dirent_t *p_udf_dirent, char *psz_token) { while (udf_readdir(p_udf_dirent)) { if (strcmp(psz_token, p_udf_dirent->psz_name) == 0) { char *next_tok = strtok(NULL, udf_PATH_DELIMITERS); if (!next_tok) return p_udf_dirent; /* found */ else if (p_udf_dirent->b_dir) { udf_dirent_t * p_udf_dirent2 = udf_opendir(p_udf_dirent); if (p_udf_dirent2) { udf_dirent_t * p_udf_dirent3 = udf_ff_traverse(p_udf_dirent2, next_tok); /* if p_udf_dirent3 is null p_udf_dirent2 is free'd. */ return p_udf_dirent3; } } } } free(p_udf_dirent->psz_name); return NULL; } /* FIXME! */ #define udf_MAX_PATHLEN 2048 udf_dirent_t * udf_fopen(udf_dirent_t *p_udf_root, const char *psz_name) { udf_dirent_t *p_udf_file = NULL; if (p_udf_root) { char tokenline[udf_MAX_PATHLEN]; char *psz_token; strncpy(tokenline, psz_name, udf_MAX_PATHLEN); psz_token = strtok(tokenline, udf_PATH_DELIMITERS); if (psz_token) { /*** FIXME??? udf_dirent can be variable size due to the extended attributes and descriptors. Given that, is this correct? */ udf_dirent_t *p_udf_dirent = udf_new_dirent(&p_udf_root->fe, p_udf_root->p_udf, p_udf_root->psz_name, p_udf_root->b_dir, p_udf_root->b_parent); p_udf_file = udf_ff_traverse(p_udf_dirent, psz_token); udf_dirent_free(p_udf_dirent); } else if ( 0 == strncmp("/", psz_name, sizeof("/")) ) { return udf_new_dirent(&p_udf_root->fe, p_udf_root->p_udf, p_udf_root->psz_name, p_udf_root->b_dir, p_udf_root->b_parent); } } return p_udf_file; } /* Convert unicode16 to 8-bit char by dripping MSB. Wonder if iconv can be used here */ static int unicode16_decode( const uint8_t *data, int i_len, char *target ) { int p = 1, i = 0; if( ( data[ 0 ] == 8 ) || ( data[ 0 ] == 16 ) ) do { if( data[ 0 ] == 16 ) p++; /* Ignore MSB of unicode16 */ if( p < i_len ) { target[ i++ ] = data[ p++ ]; } } while( p < i_len ); target[ i ] = '\0'; return 0; } static udf_dirent_t * udf_new_dirent(udf_file_entry_t *p_udf_fe, udf_t *p_udf, const char *psz_name, bool b_dir, bool b_parent) { const unsigned int i_alloc_size = p_udf_fe->i_alloc_descs + p_udf_fe->i_extended_attr; udf_dirent_t *p_udf_dirent = (udf_dirent_t *) calloc(1, sizeof(udf_dirent_t) + i_alloc_size); if (!p_udf_dirent) return NULL; p_udf_dirent->psz_name = strdup(psz_name); p_udf_dirent->b_dir = b_dir; p_udf_dirent->b_parent = b_parent; p_udf_dirent->p_udf = p_udf; p_udf_dirent->i_part_start = p_udf->i_part_start; p_udf_dirent->dir_left = uint64_from_le(p_udf_fe->info_len); memcpy(&(p_udf_dirent->fe), p_udf_fe, sizeof(udf_file_entry_t) + i_alloc_size); udf_get_lba( p_udf_fe, &(p_udf_dirent->i_loc), &(p_udf_dirent->i_loc_end) ); return p_udf_dirent; } /*! Seek to a position i_start and then read i_blocks. Number of blocks read is returned. One normally expects the return to be equal to i_blocks. */ driver_return_code_t udf_read_sectors (const udf_t *p_udf, void *ptr, lsn_t i_start, long int i_blocks) { driver_return_code_t ret; long int i_read; long int i_byte_offset; if (!p_udf) return 0; i_byte_offset = (i_start * UDF_BLOCKSIZE); if (p_udf->b_stream) { ret = cdio_stream_seek (p_udf->stream, i_byte_offset, SEEK_SET); if (DRIVER_OP_SUCCESS != ret) return ret; i_read = cdio_stream_read (p_udf->stream, ptr, UDF_BLOCKSIZE, i_blocks); if (i_read) return DRIVER_OP_SUCCESS; return DRIVER_OP_ERROR; } else { return cdio_read_data_sectors(p_udf->cdio, ptr, i_start, UDF_BLOCKSIZE, i_blocks); } } /*! Open an UDF for reading. Maybe in the future we will have a mode. NULL is returned on error. Caller must free result - use udf_close for that. */ udf_t * udf_open (const char *psz_path) { udf_t *p_udf = (udf_t *) calloc(1, sizeof(udf_t)) ; uint8_t data[UDF_BLOCKSIZE]; if (!p_udf) return NULL; p_udf->cdio = cdio_open(psz_path, DRIVER_UNKNOWN); if (!p_udf->cdio) { /* Not a CD-ROM drive or CD Image. Maybe it's a UDF file not encapsulated as a CD-ROM Image (e.g. often .UDF or (sic) .ISO) */ p_udf->stream = cdio_stdio_new( psz_path ); if (!p_udf->stream) goto error; p_udf->b_stream = true; } /* * Look for an Anchor Volume Descriptor Pointer at sector 256. */ if (DRIVER_OP_SUCCESS != udf_read_sectors (p_udf, &data, 256, 1) ) goto error; memcpy(&(p_udf->anchor_vol_desc_ptr), &data, sizeof(anchor_vol_desc_ptr_t)); if (udf_checktag((udf_tag_t *)&(p_udf->anchor_vol_desc_ptr), TAGID_ANCHOR)) goto error; /* * Then try to find a reference to a Primary Volume Descriptor. */ { const anchor_vol_desc_ptr_t *p_avdp = &p_udf->anchor_vol_desc_ptr; const uint32_t mvds_start = uint32_from_le(p_avdp->main_vol_desc_seq_ext.loc); const uint32_t mvds_end = mvds_start + (uint32_from_le(p_avdp->main_vol_desc_seq_ext.len) - 1) / UDF_BLOCKSIZE; uint32_t i_lba; for (i_lba = mvds_start; i_lba < mvds_end; i_lba++) { udf_pvd_t *p_pvd = (udf_pvd_t *) &data; if (DRIVER_OP_SUCCESS != udf_read_sectors (p_udf, p_pvd, i_lba, 1) ) goto error; if (!udf_checktag(&p_pvd->tag, TAGID_PRI_VOL)) { p_udf->pvd_lba = i_lba; break; } } /* * If we couldn't find a reference, bail out. */ if (i_lba == mvds_end) goto error; } return p_udf; error: free(p_udf); return NULL; } /** * Gets the Volume Identifier string, in 8bit unicode (latin-1) * psz_volid, place to put the string * i_volid_size, size of the buffer volid points to * returns the size of buffer needed for all data */ int udf_get_volume_id(udf_t *p_udf, /*out*/ char *psz_volid, unsigned int i_volid) { uint8_t data[UDF_BLOCKSIZE]; const udf_pvd_t *p_pvd = (udf_pvd_t *) &data; unsigned int volid_len; /* get primary volume descriptor */ if ( DRIVER_OP_SUCCESS != udf_read_sectors(p_udf, &data, p_udf->pvd_lba, 1) ) return 0; volid_len = p_pvd->vol_ident[UDF_VOLID_SIZE-1]; if(volid_len > UDF_VOLID_SIZE-1) { /* this field is only UDF_VOLID_SIZE bytes something is wrong */ volid_len = UDF_VOLID_SIZE-1; } if(i_volid > volid_len) { i_volid = volid_len; } unicode16_decode((uint8_t *) p_pvd->vol_ident, i_volid, psz_volid); return volid_len; } /** * Gets the Volume Set Identifier, as a 128-byte dstring (not decoded) * WARNING This is not a null terminated string * volsetid, place to put the data * volsetid_size, size of the buffer volsetid points to * the buffer should be >=128 bytes to store the whole volumesetidentifier * returns the size of the available volsetid information (128) * or 0 on error */ int udf_get_volumeset_id(udf_t *p_udf, /*out*/ uint8_t *volsetid, unsigned int i_volsetid) { uint8_t data[UDF_BLOCKSIZE]; const udf_pvd_t *p_pvd = (udf_pvd_t *) &data; /* get primary volume descriptor */ if ( DRIVER_OP_SUCCESS != udf_read_sectors(p_udf, &data, p_udf->pvd_lba, 1) ) return 0; if (i_volsetid > UDF_VOLSET_ID_SIZE) { i_volsetid = UDF_VOLSET_ID_SIZE; } memcpy(volsetid, p_pvd->volset_id, i_volsetid); return UDF_VOLSET_ID_SIZE; } /*! Get the root in p_udf. If b_any_partition is false then the root must be in the given partition. NULL is returned if the partition is not found or a root is not found or there is on error. Caller must free result - use udf_file_free for that. */ udf_dirent_t * udf_get_root (udf_t *p_udf, bool b_any_partition, partition_num_t i_partition) { const anchor_vol_desc_ptr_t *p_avdp = &p_udf->anchor_vol_desc_ptr; const uint32_t mvds_start = uint32_from_le(p_avdp->main_vol_desc_seq_ext.loc); const uint32_t mvds_end = mvds_start + (uint32_from_le(p_avdp->main_vol_desc_seq_ext.len) - 1) / UDF_BLOCKSIZE; uint32_t i_lba; uint8_t data[UDF_BLOCKSIZE]; /* Now we have the joy of finding the Partition Descriptor and the Logical Volume Descriptor for the Main Volume Descriptor Sequence. Once we've got that, we use the Logical Volume Descriptor to get a Fileset Descriptor and that has the Root Directory File Entry. */ for (i_lba = mvds_start; i_lba < mvds_end; i_lba++) { uint8_t data[UDF_BLOCKSIZE]; partition_desc_t *p_partition = (partition_desc_t *) &data; if (DRIVER_OP_SUCCESS != udf_read_sectors (p_udf, p_partition, i_lba, 1) ) return NULL; if (!udf_checktag(&p_partition->tag, TAGID_PARTITION)) { const partition_num_t i_partition_check = uint16_from_le(p_partition->number); if (b_any_partition || i_partition_check == i_partition) { /* Squirrel away some data regarding partition */ p_udf->i_partition = uint16_from_le(p_partition->number); p_udf->i_part_start = uint32_from_le(p_partition->start_loc); if (p_udf->lvd_lba) break; } } else if (!udf_checktag(&p_partition->tag, TAGID_LOGVOL)) { /* Get fileset descriptor */ logical_vol_desc_t *p_logvol = (logical_vol_desc_t *) &data; bool b_valid = UDF_BLOCKSIZE == uint32_from_le(p_logvol->logical_blocksize); if (b_valid) { p_udf->lvd_lba = i_lba; p_udf->fsd_offset = uint32_from_le(p_logvol->lvd_use.fsd_loc.loc.lba); if (p_udf->i_part_start) break; } } } if (p_udf->lvd_lba && p_udf->i_part_start) { udf_fsd_t *p_fsd = (udf_fsd_t *) &data; driver_return_code_t ret = udf_read_sectors(p_udf, p_fsd, p_udf->i_part_start + p_udf->fsd_offset, 1); if (DRIVER_OP_SUCCESS == ret && !udf_checktag(&p_fsd->tag, TAGID_FSD)) { udf_file_entry_t *p_udf_fe = (udf_file_entry_t *) &data; const uint32_t parent_icb = uint32_from_le(p_fsd->root_icb.loc.lba); /* Check partition numbers match of last-read block? */ ret = udf_read_sectors(p_udf, p_udf_fe, p_udf->i_part_start + parent_icb, 1); if (ret == DRIVER_OP_SUCCESS && !udf_checktag(&p_udf_fe->tag, TAGID_FILE_ENTRY)) { /* Check partition numbers match of last-read block? */ /* We win! - Save root directory information. */ return udf_new_dirent(p_udf_fe, p_udf, "/", true, false ); } } } return NULL; } #define free_and_null(x) \ free(x); \ x=NULL /*! Close UDF and free resources associated with p_udf. */ bool udf_close (udf_t *p_udf) { if (!p_udf) return true; if (p_udf->b_stream) { cdio_stdio_destroy(p_udf->stream); } else { cdio_destroy(p_udf->cdio); } /* Get rid of root directory if allocated. */ free_and_null(p_udf); return true; } udf_dirent_t * udf_opendir(const udf_dirent_t *p_udf_dirent) { if (p_udf_dirent->b_dir && !p_udf_dirent->b_parent && p_udf_dirent->fid) { udf_t *p_udf = p_udf_dirent->p_udf; uint8_t data[UDF_BLOCKSIZE]; udf_file_entry_t *p_udf_fe = (udf_file_entry_t *) &data; driver_return_code_t i_ret = udf_read_sectors(p_udf, p_udf_fe, p_udf->i_part_start + p_udf_dirent->fid->icb.loc.lba, 1); if (DRIVER_OP_SUCCESS == i_ret && !udf_checktag(&p_udf_fe->tag, TAGID_FILE_ENTRY)) { if (ICBTAG_FILE_TYPE_DIRECTORY == p_udf_fe->icb_tag.file_type) { udf_dirent_t *p_udf_dirent_new = udf_new_dirent(p_udf_fe, p_udf, p_udf_dirent->psz_name, true, true); return p_udf_dirent_new; } } } return NULL; } udf_dirent_t * udf_readdir(udf_dirent_t *p_udf_dirent) { udf_t *p_udf; if (p_udf_dirent->dir_left <= 0) { udf_dirent_free(p_udf_dirent); return NULL; } p_udf = p_udf_dirent->p_udf; if (p_udf_dirent->fid) { /* advance to next File Identifier Descriptor */ /* FIXME: need to advance file entry (fe) as well. */ uint32_t ofs = 4 * ((sizeof(*(p_udf_dirent->fid)) + p_udf_dirent->fid->i_imp_use + p_udf_dirent->fid->i_file_id + 3) / 4); p_udf_dirent->fid = (udf_fileid_desc_t *)((uint8_t *)p_udf_dirent->fid + ofs); } if (!p_udf_dirent->fid) { uint32_t i_sectors = (p_udf_dirent->i_loc_end - p_udf_dirent->i_loc + 1); uint32_t size = UDF_BLOCKSIZE * i_sectors; driver_return_code_t i_ret; if (!p_udf_dirent->sector) p_udf_dirent->sector = (uint8_t*) malloc(size); i_ret = udf_read_sectors(p_udf, p_udf_dirent->sector, p_udf_dirent->i_part_start+p_udf_dirent->i_loc, i_sectors); if (DRIVER_OP_SUCCESS == i_ret) p_udf_dirent->fid = (udf_fileid_desc_t *) p_udf_dirent->sector; else p_udf_dirent->fid = NULL; } if (p_udf_dirent->fid && !udf_checktag(&(p_udf_dirent->fid->tag), TAGID_FID)) { uint32_t ofs = 4 * ((sizeof(*p_udf_dirent->fid) + p_udf_dirent->fid->i_imp_use + p_udf_dirent->fid->i_file_id + 3) / 4); p_udf_dirent->dir_left -= ofs; p_udf_dirent->b_dir = (p_udf_dirent->fid->file_characteristics & UDF_FILE_DIRECTORY) != 0; p_udf_dirent->b_parent = (p_udf_dirent->fid->file_characteristics & UDF_FILE_PARENT) != 0; { const unsigned int i_len = p_udf_dirent->fid->i_file_id; uint8_t data[UDF_BLOCKSIZE] = {0}; udf_file_entry_t *p_udf_fe = (udf_file_entry_t *) &data; if (DRIVER_OP_SUCCESS != udf_read_sectors(p_udf, p_udf_fe, p_udf->i_part_start + p_udf_dirent->fid->icb.loc.lba, 1)) return NULL; memcpy(&(p_udf_dirent->fe), p_udf_fe, sizeof(udf_file_entry_t) + p_udf_fe->i_alloc_descs + p_udf_fe->i_extended_attr ); if (strlen(p_udf_dirent->psz_name) < i_len) p_udf_dirent->psz_name = (char *) realloc(p_udf_dirent->psz_name, sizeof(char)*i_len+1); unicode16_decode(p_udf_dirent->fid->imp_use + p_udf_dirent->fid->i_imp_use, i_len, p_udf_dirent->psz_name); } return p_udf_dirent; } return NULL; } /*! free free resources associated with p_udf_dirent. */ bool udf_dirent_free(udf_dirent_t *p_udf_dirent) { if (p_udf_dirent) { p_udf_dirent->fid = NULL; free_and_null(p_udf_dirent->psz_name); free_and_null(p_udf_dirent->sector); free_and_null(p_udf_dirent); } return true; } libcdio-0.83/lib/udf/Makefile.in0000644000175000017500000004762611652210027013376 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 2003, 2004, 2006, 2008, 2011 # Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ######################################################## # Things to make the libudf library ######################################################## # # From libtool documentation amended with guidance from N. Boullis: # # 1. Start with version information of `0:0:0' for each libtool library. # # 2. It is probably not a good idea to update the version information # several times between public releases, but rather once per public # release. (This seems to be more an aesthetic consideration than # a hard technical one.) # # 3. If the library source code has changed at all since the last # update, then increment REVISION (`C:R:A' becomes `C:R+1:A'). # # 4. If any interfaces have been added, removed, or changed since the # last update, increment CURRENT, and set REVISION to 0. # # 5. If any interfaces have been added since the last public release, # then increment AGE. # # 6. If any interfaces have been removed or changed since the last # public release, then set AGE to 0. A changed interface means an # incompatibility with previous versions. VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = lib/udf DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libudf_la_DEPENDENCIES = am_libudf_la_OBJECTS = udf.lo udf_file.lo udf_fs.lo udf_time.lo \ filemode.lo libudf_la_OBJECTS = $(am_libudf_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libudf_la_SOURCES) DIST_SOURCES = $(libudf_la_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDDA_PLAYER_LIBS = @CDDA_PLAYER_LIBS@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CDPARANOIA_NAME = @CDPARANOIA_NAME@ CFLAGS = @CFLAGS@ CMP = @CMP@ COS_LIB = @COS_LIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_PKG_LIB_HACK = @DARWIN_PKG_LIB_HACK@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ DIFF_OPTS = @DIFF_OPTS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GIT2CL = @GIT2CL@ GREP = @GREP@ HAVE_BSDI_CDROM = @HAVE_BSDI_CDROM@ HAVE_DARWIN_CDROM = @HAVE_DARWIN_CDROM@ HAVE_FREEBSD_CDROM = @HAVE_FREEBSD_CDROM@ HAVE_JOLIET = @HAVE_JOLIET@ HAVE_LINUX_CDROM = @HAVE_LINUX_CDROM@ HAVE_OS2_CDROM = @HAVE_OS2_CDROM@ HAVE_ROCK = @HAVE_ROCK@ HAVE_SOLARIS_CDROM = @HAVE_SOLARIS_CDROM@ HAVE_WIN32_CDROM = @HAVE_WIN32_CDROM@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDIOPP_LIBS = @LIBCDIOPP_LIBS@ LIBCDIO_CDDA_LIBS = @LIBCDIO_CDDA_LIBS@ LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ LIBCDIO_DEPS = @LIBCDIO_DEPS@ LIBCDIO_LIBS = @LIBCDIO_LIBS@ LIBCDIO_PARANOIA_LIBS = @LIBCDIO_PARANOIA_LIBS@ LIBCDIO_SOURCE_PATH = @LIBCDIO_SOURCE_PATH@ LIBCDIO_VERSION_NUM = @LIBCDIO_VERSION_NUM@ LIBICONV = @LIBICONV@ LIBISO9660PP_LIBS = @LIBISO9660PP_LIBS@ LIBISO9660_CFLAGS = @LIBISO9660_CFLAGS@ LIBISO9660_LIBS = @LIBISO9660_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBUDF_LIBS = @LIBUDF_LIBS@ LINUX_CDROM_TIMEOUT = @LINUX_CDROM_TIMEOUT@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_NO_UNDEFINED = @LT_NO_UNDEFINED@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OLD_CDPARANOIA = @OLD_CDPARANOIA@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SBPCD_H = @SBPCD_H@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TYPESIZES = @TYPESIZES@ UCDROM_H = @UCDROM_H@ VCDINFO_CFLAGS = @VCDINFO_CFLAGS@ VCDINFO_LIBS = @VCDINFO_LIBS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ libudf_la_CURRENT = 1 libudf_la_REVISION = 0 libudf_la_AGE = 0 EXTRA_DIST = libudf.sym noinst_HEADERS = udf_fs.h udf_private.h lib_LTLIBRARIES = libudf.la libudf_la_SOURCES = udf.c udf_file.c udf_fs.c udf_time.c filemode.c libudf_la_LIBADD = @LIBCDIO_LIBS@ @LT_NO_UNDEFINED@ INCLUDES = $(LIBCDIO_CFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/udf/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/udf/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libudf.la: $(libudf_la_OBJECTS) $(libudf_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libudf_la_OBJECTS) $(libudf_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filemode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/udf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/udf_file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/udf_fs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/udf_time.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libcdio-0.83/lib/Makefile.am0000644000175000017500000000211511114145233012566 00000000000000# $Id: Makefile.am,v 1.70 2008/03/20 19:02:38 karl Exp $ # # Copyright (C) 2003, 2004, 2006, 2008 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # ######################################################## # make all libraries ######################################################## if BUILD_CD_PARANOIA paranoiadirs = cdda_interface paranoia endif if ENABLE_CXX_BINDINGS cxxdirs = cdio++ endif SUBDIRS = driver iso9660 udf $(paranoiadirs) $(cxxdirs) libcdio-0.83/lib/iso9660/0000755000175000017500000000000011652210414011733 500000000000000libcdio-0.83/lib/iso9660/rock.c0000644000175000017500000004260311647671212012775 00000000000000/* Copyright (C) 2005, 2008, 2010, 2011 Rocky Bernstein Adapted from GNU/Linux fs/isofs/rock.c (C) 1992, 1993 Eric Youngdale This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Rock Ridge Extensions to iso9660 */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #ifdef HAVE_STRING_H # include #endif #ifdef HAVE_STDLIB_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifndef HAVE_S_ISLNK # define S_ISLNK(s) ((void)s,0) #endif #ifndef HAVE_S_ISSOCK # define S_ISSOCK(s) ((void)s,0) #endif #include #include #include #define CDIO_MKDEV(ma,mi) ((ma)<<16 | (mi)) enum iso_rock_enums iso_rock_enums; iso_rock_nm_flag_t iso_rock_nm_flag; iso_rock_sl_flag_t iso_rock_sl_flag; iso_rock_tf_flag_t iso_rock_tf_flag; /* Our own realloc routine tailored for the iso9660_stat_t symlink field. I can't figure out how to make realloc() work without valgrind complaint. */ static bool realloc_symlink(/*in/out*/ iso9660_stat_t *p_stat, uint8_t i_grow) { if (!p_stat->rr.i_symlink) { const uint16_t i_max = 2*i_grow+1; p_stat->rr.psz_symlink = (char *) calloc(1, i_max); p_stat->rr.i_symlink_max = i_max; return (NULL != p_stat->rr.psz_symlink); } else { unsigned int i_needed = p_stat->rr.i_symlink + i_grow ; if ( i_needed <= p_stat->rr.i_symlink_max) return true; else { char * psz_newsymlink = (char *) calloc(1, 2*i_needed); if (!psz_newsymlink) return false; p_stat->rr.i_symlink_max = 2*i_needed; memcpy(psz_newsymlink, p_stat->rr.psz_symlink, p_stat->rr.i_symlink); free(p_stat->rr.psz_symlink); p_stat->rr.psz_symlink = psz_newsymlink; return true; } } } /* These functions are designed to read the system areas of a directory record * and extract relevant information. There are different functions provided * depending upon what information we need at the time. One function fills * out an inode structure, a second one extracts a filename, a third one * returns a symbolic link name, and a fourth one returns the extent number * for the file. */ #define SIG(A,B) ((A) | ((B) << 8)) /* isonum_721() */ /* This is a way of ensuring that we have something in the system use fields that is compatible with Rock Ridge */ #define CHECK_SP(FAIL) \ if(rr->u.SP.magic[0] != 0xbe) FAIL; \ if(rr->u.SP.magic[1] != 0xef) FAIL; \ p_stat->rr.s_rock_offset = rr->u.SP.skip; /* We define a series of macros because each function must do exactly the same thing in certain places. We use the macros to ensure that everything is done correctly */ #define CONTINUE_DECLS \ int cont_extent = 0, cont_offset = 0, cont_size = 0; \ void *buffer = NULL #define CHECK_CE \ { cont_extent = from_733(*rr->u.CE.extent); \ cont_offset = from_733(*rr->u.CE.offset); \ cont_size = from_733(*rr->u.CE.size); } #define SETUP_ROCK_RIDGE(DE,CHR,LEN) \ { \ LEN= sizeof(iso9660_dir_t) + DE->filename_len; \ if(LEN & 1) LEN++; \ CHR = ((unsigned char *) DE) + LEN; \ LEN = *((unsigned char *) DE) - LEN; \ if (0xff != p_stat->rr.s_rock_offset) \ { \ LEN -= p_stat->rr.s_rock_offset; \ CHR += p_stat->rr.s_rock_offset; \ if (LEN<0) LEN=0; \ } \ } /* Copy a long or short time from the iso_rock_tf_t into the specified field of a iso_rock_statbuf_t. non-paramater variables are p_stat, rr, and cnt. */ #define add_time(FLAG, TIME_FIELD) \ if (rr->u.TF.flags & FLAG) { \ p_stat->rr.TIME_FIELD.b_used = true; \ p_stat->rr.TIME_FIELD.b_longdate = \ (0 != (rr->u.TF.flags & ISO_ROCK_TF_LONG_FORM)); \ if (p_stat->rr.TIME_FIELD.b_longdate) { \ memcpy(&(p_stat->rr.TIME_FIELD.t.ltime), \ &(rr->u.TF.time_bytes[cnt]), \ sizeof(iso9660_ltime_t)); \ cnt += sizeof(iso9660_ltime_t); \ } else { \ memcpy(&(p_stat->rr.TIME_FIELD.t.dtime), \ &(rr->u.TF.time_bytes[cnt]), \ sizeof(iso9660_dtime_t)); \ cnt += sizeof(iso9660_dtime_t); \ } \ } /*! Get @return length of name field; 0: not found, -1: to be ignored */ int get_rock_ridge_filename(iso9660_dir_t * p_iso9660_dir, /*out*/ char * psz_name, /*in/out*/ iso9660_stat_t *p_stat) { int len; unsigned char *chr; int symlink_len = 0; CONTINUE_DECLS; int i_namelen = 0; int truncate=0; if (!p_stat || nope == p_stat->rr.b3_rock) return 0; *psz_name = 0; SETUP_ROCK_RIDGE(p_iso9660_dir, chr, len); /*repeat:*/ { iso_extension_record_t * rr; int sig; int rootflag; while (len > 1){ /* There may be one byte for padding somewhere */ rr = (iso_extension_record_t *) chr; if (rr->len == 0) goto out; /* Something got screwed up here */ sig = *chr+(*(chr+1) << 8); chr += rr->len; len -= rr->len; switch(sig){ case SIG('S','P'): CHECK_SP(goto out); break; case SIG('C','E'): { iso711_t i_fname = from_711(p_iso9660_dir->filename_len); if ('\0' == p_iso9660_dir->filename[0] && 1 == i_fname) break; if ('\1' == p_iso9660_dir->filename[0] && 1 == i_fname) break; } CHECK_CE; break; case SIG('E','R'): p_stat->rr.b3_rock = yep; cdio_debug("ISO 9660 Extensions: "); { int p; for(p=0;pu.ER.len_id;p++) cdio_debug("%c",rr->u.ER.data[p]); } break; case SIG('N','M'): /* Alternate name */ p_stat->rr.b3_rock = yep; if (truncate) break; if (rr->u.NM.flags & ISO_ROCK_NM_PARENT) { i_namelen = sizeof(".."); strncat(psz_name, "..", i_namelen); } else if (rr->u.NM.flags & ISO_ROCK_NM_CURRENT) { i_namelen = sizeof("."); strncat(psz_name, ".", i_namelen); break; } if (rr->u.NM.flags & ~1) { cdio_info("Unsupported NM flag settings (%d)",rr->u.NM.flags); break; } if((strlen(psz_name) + rr->len - 5) >= 254) { truncate = 1; break; } strncat(psz_name, rr->u.NM.name, rr->len - 5); i_namelen += rr->len - 5; break; case SIG('P','X'): /* POSIX file attributes */ p_stat->rr.st_mode = from_733(rr->u.PX.st_mode); p_stat->rr.st_nlinks = from_733(rr->u.PX.st_nlinks); p_stat->rr.st_uid = from_733(rr->u.PX.st_uid); p_stat->rr.st_gid = from_733(rr->u.PX.st_gid); p_stat->rr.b3_rock = yep; break; case SIG('S','L'): { /* Symbolic link */ uint8_t slen; iso_rock_sl_part_t * p_sl; iso_rock_sl_part_t * p_oldsl; slen = rr->len - 5; p_sl = &rr->u.SL.link; p_stat->rr.i_symlink = symlink_len; while (slen > 1){ rootflag = 0; switch(p_sl->flags &~1){ case 0: realloc_symlink(p_stat, p_sl->len); memcpy(&(p_stat->rr.psz_symlink[p_stat->rr.i_symlink]), p_sl->text, p_sl->len); p_stat->rr.i_symlink += p_sl->len; break; case 4: realloc_symlink(p_stat, 1); p_stat->rr.psz_symlink[p_stat->rr.i_symlink++] = '.'; /* continue into next case. */ case 2: realloc_symlink(p_stat, 1); p_stat->rr.psz_symlink[p_stat->rr.i_symlink++] = '.'; break; case 8: rootflag = 1; realloc_symlink(p_stat, 1); p_stat->rr.psz_symlink[p_stat->rr.i_symlink++] = '/'; break; default: cdio_warn("Symlink component flag not implemented"); } slen -= p_sl->len + 2; p_oldsl = p_sl; p_sl = (iso_rock_sl_part_t *) (((char *) p_sl) + p_sl->len + 2); if (slen < 2) { if (((rr->u.SL.flags & 1) != 0) && ((p_oldsl->flags & 1) == 0)) p_stat->rr.i_symlink += 1; break; } /* * If this component record isn't continued, then append a '/'. */ if (!rootflag && (p_oldsl->flags & 1) == 0) { realloc_symlink(p_stat, 1); p_stat->rr.psz_symlink[p_stat->rr.i_symlink++] = '/'; } } } symlink_len = p_stat->rr.i_symlink; realloc_symlink(p_stat, 1); p_stat->rr.psz_symlink[symlink_len]='\0'; break; case SIG('R','E'): free(buffer); return -1; case SIG('T','F'): /* Time stamp(s) for a file */ { int cnt = 0; add_time(ISO_ROCK_TF_CREATE, create); add_time(ISO_ROCK_TF_MODIFY, modify); add_time(ISO_ROCK_TF_ACCESS, access); add_time(ISO_ROCK_TF_ATTRIBUTES, attributes); add_time(ISO_ROCK_TF_BACKUP, backup); add_time(ISO_ROCK_TF_EXPIRATION, expiration); add_time(ISO_ROCK_TF_EFFECTIVE, effective); p_stat->rr.b3_rock = yep; break; } default: break; } } } free(buffer); return i_namelen; /* If 0, this file did not have a NM field */ out: free(buffer); return 0; } static int parse_rock_ridge_stat_internal(iso9660_dir_t *p_iso9660_dir, iso9660_stat_t *p_stat, int regard_xa) { int len; unsigned char * chr; int symlink_len = 0; CONTINUE_DECLS; if (nope == p_stat->rr.b3_rock) return 0; SETUP_ROCK_RIDGE(p_iso9660_dir, chr, len); if (regard_xa) { chr+=14; len-=14; if (len<0) len=0; } /* repeat:*/ { int sig; iso_extension_record_t * rr; int rootflag; while (len > 1){ /* There may be one byte for padding somewhere */ rr = (iso_extension_record_t *) chr; if (rr->len == 0) goto out; /* Something got screwed up here */ sig = from_721(*chr); chr += rr->len; len -= rr->len; switch(sig){ case SIG('S','P'): CHECK_SP(goto out); break; case SIG('C','E'): CHECK_CE; break; case SIG('E','R'): p_stat->rr.b3_rock = yep; cdio_debug("ISO 9660 Extensions: "); { int p; for(p=0;pu.ER.len_id;p++) cdio_debug("%c",rr->u.ER.data[p]); } break; case SIG('P','X'): p_stat->rr.st_mode = from_733(rr->u.PX.st_mode); p_stat->rr.st_nlinks = from_733(rr->u.PX.st_nlinks); p_stat->rr.st_uid = from_733(rr->u.PX.st_uid); p_stat->rr.st_gid = from_733(rr->u.PX.st_gid); break; case SIG('P','N'): /* Device major,minor number */ { int32_t high, low; high = from_733(rr->u.PN.dev_high); low = from_733(rr->u.PN.dev_low); /* * The Rock Ridge standard specifies that if sizeof(dev_t) <= 4, * then the high field is unused, and the device number is completely * stored in the low field. Some writers may ignore this subtlety, * and as a result we test to see if the entire device number is * stored in the low field, and use that. */ if((low & ~0xff) && high == 0) { p_stat->rr.i_rdev = CDIO_MKDEV(low >> 8, low & 0xff); } else { p_stat->rr.i_rdev = CDIO_MKDEV(high, low); } } break; case SIG('T','F'): /* Time stamp(s) for a file */ { int cnt = 0; add_time(ISO_ROCK_TF_CREATE, create); add_time(ISO_ROCK_TF_MODIFY, modify); add_time(ISO_ROCK_TF_ACCESS, access); add_time(ISO_ROCK_TF_ATTRIBUTES, attributes); add_time(ISO_ROCK_TF_BACKUP, backup); add_time(ISO_ROCK_TF_EXPIRATION, expiration); add_time(ISO_ROCK_TF_EFFECTIVE, effective); p_stat->rr.b3_rock = yep; break; } case SIG('S','L'): { /* Symbolic link */ uint8_t slen; iso_rock_sl_part_t * p_sl; iso_rock_sl_part_t * p_oldsl; slen = rr->len - 5; p_sl = &rr->u.SL.link; p_stat->rr.i_symlink = symlink_len; while (slen > 1){ rootflag = 0; switch(p_sl->flags &~1){ case 0: realloc_symlink(p_stat, p_sl->len); memcpy(&(p_stat->rr.psz_symlink[p_stat->rr.i_symlink]), p_sl->text, p_sl->len); p_stat->rr.i_symlink += p_sl->len; break; case 4: realloc_symlink(p_stat, 1); p_stat->rr.psz_symlink[p_stat->rr.i_symlink++] = '.'; /* continue into next case. */ case 2: realloc_symlink(p_stat, 1); p_stat->rr.psz_symlink[p_stat->rr.i_symlink++] = '.'; break; case 8: rootflag = 1; realloc_symlink(p_stat, 1); p_stat->rr.psz_symlink[p_stat->rr.i_symlink++] = '/'; p_stat->rr.i_symlink++; break; default: cdio_warn("Symlink component flag not implemented"); } slen -= p_sl->len + 2; p_oldsl = p_sl; p_sl = (iso_rock_sl_part_t *) (((char *) p_sl) + p_sl->len + 2); if (slen < 2) { if (((rr->u.SL.flags & 1) != 0) && ((p_oldsl->flags & 1) == 0)) p_stat->rr.i_symlink += 1; break; } /* * If this component record isn't continued, then append a '/'. */ if (!rootflag && (p_oldsl->flags & 1) == 0) { realloc_symlink(p_stat, 1); p_stat->rr.psz_symlink[p_stat->rr.i_symlink++] = '/'; } } } symlink_len = p_stat->rr.i_symlink; realloc_symlink(p_stat, 1); p_stat->rr.psz_symlink[symlink_len]='\0'; break; case SIG('R','E'): cdio_warn("Attempt to read p_stat for relocated directory"); goto out; #if FINISHED case SIG('C','L'): { iso9660_stat_t * reloc; ISOFS_I(p_stat)->i_first_extent = from_733(rr->u.CL.location); reloc = isofs_iget(p_stat->rr.i_sb, p_stat->rr.i_first_extent, 0); if (!reloc) goto out; p_stat->rr.st_mode = reloc->st_mode; p_stat->rr.st_nlinks = reloc->st_nlinks; p_stat->rr.st_uid = reloc->st_uid; p_stat->rr.st_gid = reloc->st_gid; p_stat->rr.i_rdev = reloc->i_rdev; p_stat->rr.i_symlink = reloc->i_symlink; p_stat->rr.i_blocks = reloc->i_blocks; p_stat->rr.i_atime = reloc->i_atime; p_stat->rr.i_ctime = reloc->i_ctime; p_stat->rr.i_mtime = reloc->i_mtime; iput(reloc); } break; #endif default: break; } } } out: free(buffer); return 0; } int parse_rock_ridge_stat(iso9660_dir_t *p_iso9660_dir, /*out*/ iso9660_stat_t *p_stat) { int result; if (!p_stat) return 0; result = parse_rock_ridge_stat_internal(p_iso9660_dir, p_stat, 0); /* if Rock-Ridge flag was reset and we didn't look for attributes * behind eventual XA attributes, have a look there */ if (0xFF == p_stat->rr.s_rock_offset && nope != p_stat->rr.b3_rock) { result = parse_rock_ridge_stat_internal(p_iso9660_dir, p_stat, 14); } return result; } #define BUF_COUNT 16 #define BUF_SIZE sizeof("drwxrwxrwx") /* Return a pointer to a internal free buffer */ static char * _getbuf (void) { static char _buf[BUF_COUNT][BUF_SIZE]; static int _i = -1; _i++; _i %= BUF_COUNT; memset (_buf[_i], 0, BUF_SIZE); return _buf[_i]; } /*! Returns a string which interpreting the POSIX mode st_mode. For example: \verbatim drwxrws--- -rw-rw-r-- lrwxrwxrwx \endverbatim A description of the characters in the string follows The 1st character is either "b" for a block device, "c" for a character device, "d" if the entry is a directory, "l" for a symbolic link, "p" for a pipe or FIFO, "s" for a "socket", or "-" if none of the these. The 2nd to 4th characters refer to permissions for a user while the the 5th to 7th characters refer to permissions for a group while, and the 8th to 10h characters refer to permissions for everyone. In each of these triplets the first character (2, 5, 8) is "r" if the entry is allowed to be read. The second character of a triplet (3, 6, 9) is "w" if the entry is allowed to be written. The third character of a triplet (4, 7, 10) is "x" if the entry is executable but not user (for character 4) or group (for characters 6) settable and "s" if the item has the corresponding user/group set. For a directory having an executable property on ("x" or "s") means the directory is allowed to be listed or "searched". If the execute property is not allowed for a group or user but the corresponding group/user is set "S" indicates this. If none of these properties holds the "-" indicates this. */ const char * iso9660_get_rock_attr_str(posix_mode_t st_mode) { char *result = _getbuf(); if (S_ISBLK(st_mode)) result[ 0] = 'b'; else if (S_ISDIR(st_mode)) result[ 0] = 'd'; else if (S_ISCHR(st_mode)) result[ 0] = 'c'; else if (S_ISLNK(st_mode)) result[ 0] = 'l'; else if (S_ISFIFO(st_mode)) result[ 0] = 'p'; else if (S_ISSOCK(st_mode)) result[ 0] = 's'; /* May eventually fill in others.. */ else result[ 0] = '-'; result[ 1] = (st_mode & ISO_ROCK_IRUSR) ? 'r' : '-'; result[ 2] = (st_mode & ISO_ROCK_IWUSR) ? 'w' : '-'; if (st_mode & ISO_ROCK_ISUID) result[ 3] = (st_mode & ISO_ROCK_IXUSR) ? 's' : 'S'; else result[ 3] = (st_mode & ISO_ROCK_IXUSR) ? 'x' : '-'; result[ 4] = (st_mode & ISO_ROCK_IRGRP) ? 'r' : '-'; result[ 5] = (st_mode & ISO_ROCK_IWGRP) ? 'w' : '-'; if (st_mode & ISO_ROCK_ISGID) result[ 6] = (st_mode & ISO_ROCK_IXGRP) ? 's' : 'S'; else result[ 6] = (st_mode & ISO_ROCK_IXGRP) ? 'x' : '-'; result[ 7] = (st_mode & ISO_ROCK_IROTH) ? 'r' : '-'; result[ 8] = (st_mode & ISO_ROCK_IWOTH) ? 'w' : '-'; result[ 9] = (st_mode & ISO_ROCK_IXOTH) ? 'x' : '-'; result[11] = '\0'; return result; } /*! Returns POSIX mode bitstring for a given file. */ mode_t iso9660_get_posix_filemode_from_rock(const iso_rock_statbuf_t *rr) { return (mode_t) rr->st_mode; } libcdio-0.83/lib/iso9660/libiso9660.sym0000644000175000017500000000353411314417700014222 00000000000000iso_enums1 iso_extension_enums iso_flag_enums iso_vd_enums iso_rock_enums iso_rock_nm_flag iso_rock_sl_flag iso_rock_tf_flag iso9660_close iso9660_dir_add_entry_su iso9660_dir_calc_record_size iso9660_dir_init_new iso9660_dir_init_new_su iso9660_dir_to_name iso9660_dirname_valid_p iso9660_find_fs_lsn iso9660_fs_find_lsn iso9660_fs_find_lsn_with_path iso9660_fs_read_pvd iso9660_fs_read_superblock iso9660_fs_readdir iso9660_fs_stat iso9660_fs_stat_translate iso9660_get_application_id iso9660_get_dir_len iso9660_get_dtime iso9660_get_ltime iso9660_get_posix_filemode iso9660_get_posix_filemode_from_rock iso9660_get_posix_filemode_from_xa iso9660_get_preparer_id iso9660_get_publisher_id iso9660_get_pvd_block_size iso9660_get_pvd_id iso9660_get_pvd_space_size iso9660_get_pvd_type iso9660_get_pvd_version iso9660_get_rock_attr_str iso9660_get_root_lsn iso9660_get_system_id iso9660_get_volume_id iso9660_get_volumeset_id iso9660_get_xa_attr_str iso9660_ifs_find_lsn iso9660_ifs_find_lsn_with_path iso9660_ifs_fuzzy_read_superblock iso9660_ifs_get_application_id iso9660_ifs_get_joliet_level iso9660_ifs_get_preparer_id iso9660_ifs_get_publisher_id iso9660_ifs_get_system_id iso9660_ifs_get_volume_id iso9660_ifs_get_volumeset_id iso9660_ifs_is_xa iso9660_ifs_read_pvd iso9660_ifs_read_superblock iso9660_ifs_readdir iso9660_ifs_stat iso9660_ifs_stat_translate iso9660_is_achar iso9660_is_dchar iso9660_iso_seek_read iso9660_name_translate iso9660_name_translate_ext iso9660_open iso9660_open_ext iso9660_open_fuzzy iso9660_open_fuzzy_ext iso9660_pathname_isofy iso9660_pathname_valid_p iso9660_pathtable_get_size iso9660_pathtable_init iso9660_pathtable_l_add_entry iso9660_pathtable_m_add_entry iso9660_set_dtime iso9660_set_dtime_with_timezone iso9660_set_evd iso9660_set_ltime iso9660_set_ltime_with_timezone iso9660_set_pvd iso9660_strncpy_pad iso9660_xa_init ISO_STANDARD_ID libcdio-0.83/lib/iso9660/Makefile.am0000644000175000017500000001506311650343655013730 00000000000000# $Id: Makefile.am,v 1.18 2008/10/20 01:25:15 rocky Exp $ # # Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 # Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ######################################################## # Things to make the libiso9660 library ######################################################## # # From libtool documentation amended with guidance from N. Boullis: # # 1. Start with version information of `0:0:0' for each libtool library. # # 2. It is probably not a good idea to update the version information # several times between public releases, but rather once per public # release. (This seems to be more an aesthetic consideration than # a hard technical one.) # # 3. If the library source code has changed at all since the last # update, then increment REVISION (`C:R:A' becomes `C:R+1:A'). # # 4. If any interfaces have been added, removed, or changed since the # last update, increment CURRENT, and set REVISION to 0. # # 5. If any interfaces have been added since the last public release, # then increment AGE. # # 6. If any interfaces have been removed or changed since the last # public release, then set AGE to 0. A changed interface means an # incompatibility with previous versions. libiso9660_la_CURRENT = 8 libiso9660_la_REVISION = 0 libiso9660_la_AGE = 0 EXTRA_DIST = libiso9660.sym noinst_HEADERS = iso9660_private.h lib_LTLIBRARIES = libiso9660.la if ENABLE_ROCK rock_src = rock.c else rock_src = endif libiso9660_la_SOURCES = \ iso9660.c \ iso9660_private.h \ iso9660_fs.c \ $(rock_src) \ xa.c libiso9660_la_LIBADD = @LIBCDIO_LIBS@ libiso9660_la_ldflags = -version-info $(libiso9660_la_CURRENT):$(libiso9660_la_REVISION):$(libiso9660_la_AGE) @LT_NO_UNDEFINED@ libiso9660_la_dependencies = $(top_builddir)/lib/driver/libcdio.la INCLUDES = $(LIBCDIO_CFLAGS) ######################################################## # Things to version the symbols in the libraries ######################################################## # An explanation of the versioning problem from Nicolas Boullis and # the versioned symbol solution he uses below... # # Currently, libvcdinfo uses the cdio_open function from libcdio. # Let's imagine a program foobar that uses both the vcdinfo_open # function from libvcdinfo and the cdio_open function from libcdio. # Currently, libcdio has SONAME libcdio.so.0, libvcdinfo has SONAME # libvcdinfo.so.0 and requires libcdio.so.0, and foobar requires both # libvcdinfo.so.0 and libcdio.so.0. Everything looks fine. # # Now, for some reason, you decide to change the cdio_open function. # That's your right, but you have to bump the CURRENT version and (if I # understand it correctly, athough this is not that clear in libtool's # documentation) set the AGE to 0. Anyway, this bumps the SONAME, which is # sane since the interface changes incompatibly. # Now, you have a new libcdio with SONAME libcdio.so.1. But libvcdinfo and # foobar still require libcdio.so.0. Everything is still fine. # Now, after some minor changes, the author of foobar recompiles foobar. # Then, foobar now requires libvcdinfo.so.0 and libcdio.so.1. And foobar # now segfaults... # What is happening? When you run foobar, if brings both libvcdinfo.so.0 # and libcdio.so.1, but libvcdinfo.so.0 also brings libcdio.so.0. So you # have both libcdio.so.0 and libcdio.so.1 that bring their symbols to the # global namespace. Hence, you have to incompatible versions of the # cdio_open function in the name space. When foobar calls cdio_open, it # may choose the wrong function, and segfaults... # With versioned symbols, the cdio_open function from libcdio.so.0 may be # known as (something that looks like) cdio_open@@CDIO_0. An the cdio_open # function from libcdio.so.1 as cdio_open@@CDIO_1. Both versions of # libcdio would still be brought in by the most recent foobar, but foobar # (and libvcdinfo) know which versioned function to use and then use the # good one. # This is some simple versioning where every symbol is versioned with # something that looks like the SONAME of the library. More complex (and # better) versioning is possible; it is for example what is used by glibc. # But good complex versioning is something that requires much more # work... # The below is a impliments symbol versioning. First of all, I # compute MAJOR as CURENT - AGE; that is what is used within libtool # (at least on GNU/Linux systems) for the number in the SONAME. The # nm command gives the list of symbols known in each of the object # files that will be part of the shared library. And the sed command # extracts from this list those symbols that will be shared. (This sed # command comes from libtool.) libiso9660_la_MAJOR = $(shell expr $(libiso9660_la_CURRENT) - $(libiso9660_la_AGE)) if BUILD_VERSIONED_LIBS libiso9660_la_LDFLAGS = $(libiso9660_la_ldflags) -Wl,--version-script=libiso9660.la.ver libiso9660_la_DEPENDENCIES = $(libcdio9660_la_dependencies) libiso9660.la.ver libiso9660.la.ver: $(libiso9660_la_OBJECTS) $(srcdir)/libiso9660.sym echo 'ISO9660_$(libiso9660_la_MAJOR) {' > $@ objs=`for obj in $(libiso9660_la_OBJECTS); do sed -ne "s/^pic_object='\(.*\)'$$/\1/p" $$obj; done`; if test -n "$$objs" ; then \ nm $${objs} | sed -n -e 's/^.*[ ][ABCDGIRSTW][ABCDGIRSTW]*[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$$/\1/p' | sort -u | { first=true; while read symbol; do if grep -q "^$${symbol}\$$" $(srcdir)/libiso9660.sym; then if test $$first = true; then echo " global:"; first=false; fi; echo " $${symbol};"; fi; done; } >> $@; \ nm $${objs} | sed -n -e 's/^.*[ ][ABCDGIRSTW][ABCDGIRSTW]*[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$$/\1/p' | sort -u | { first=true; while read symbol; do if grep -q "^$${symbol}\$$" $(srcdir)/libiso9660.sym; then :; else if test $$first = true; then echo " local:"; first=false; fi; echo " $${symbol};"; fi; done; } >> $@; \ fi echo '};' >> $@ MOSTLYCLEANFILES = libiso9660.la.ver else libiso9660_la_LDFLAGS = $(libiso9660_la_ldflags) libiso9660_la_DEPENDENCIES = $(libcdio9660_la_dependencies) endif libcdio-0.83/lib/iso9660/iso9660.c0000644000175000017500000010013211650124473013142 00000000000000/* Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Rocky Bernstein Copyright (C) 2000 Herbert Valerio Riedel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /*! String inside frame which identifies an ISO 9660 filesystem. This string is the "id" field of an iso9660_pvd_t or an iso9660_svd_t. Note should come *before* #include which does a #define of this name. */ const char ISO_STANDARD_ID[] = {'C', 'D', '0', '0', '1'}; /* Private headers */ #include "iso9660_private.h" #include "cdio_assert.h" /* Public headers */ #include #include #include #include #include #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_LIMITS_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_SYS_STAT_H #include #endif #ifdef HAVE_ERRNO_H #include #endif #ifndef HAVE_SETENV static int setenv(const char *envname, const char *envval, int overwrite) { return -1; } #endif #ifndef HAVE_UNSETENV static int unsetenv(const char *envname) { return -1; } #endif #ifndef HAVE_TIMEGM static time_t timegm(struct tm *tm) { time_t ret; char *tz; tz = getenv("TZ"); setenv("TZ", "UTC", 1); tzset(); ret = mktime(tm); if (tz) setenv("TZ", tz, 1); else unsetenv("TZ"); tzset(); return ret; } #endif #ifndef HAVE_GMTIME_R static struct tm * gmtime_r(const time_t *timer, struct tm *result) { struct tm *tmp = gmtime(timer); if (tmp) { *result = *tmp; return result; } return tmp; } #endif #ifndef HAVE_LOCALTIME_R static struct tm * localtime_r(const time_t *timer, struct tm *result) { struct tm *tmp = localtime(timer); if (tmp) { *result = *tmp; return result; } return tmp; } #endif static const char _rcsid[] = "$Id: iso9660.c,v 1.41 2008/06/25 08:01:54 rocky Exp $"; /* Variables to hold debugger-helping enumerations */ enum iso_enum1_s iso_enums1; enum iso_flag_enum_s iso_flag_enums; enum iso_vd_enum_s iso_vd_enums; enum iso_extension_enum_s iso_extension_enums; /* some parameters... */ #define SYSTEM_ID "CD-RTOS CD-BRIDGE" #define VOLUME_SET_ID "" /*! Change trailing blanks in str to nulls. Str has a maximum size of n characters. */ static char * strip_trail (const char str[], size_t n) { static char buf[1025]; int j; cdio_assert (n < 1024); strncpy (buf, str, n); buf[n] = '\0'; for (j = strlen (buf) - 1; j >= 0; j--) { if (buf[j] != ' ') break; buf[j] = '\0'; } return buf; } static void pathtable_get_size_and_entries(const void *pt, unsigned int *size, unsigned int *entries); /*! Get time structure from structure in an ISO 9660 directory index record. Even though tm_wday and tm_yday fields are not explicitly in idr_date, the are calculated from the other fields. If tm is to reflect the localtime set b_localtime true, otherwise tm will reported in GMT. */ bool iso9660_get_dtime (const iso9660_dtime_t *idr_date, bool b_localtime, /*out*/ struct tm *p_tm) { if (!idr_date) return false; /* Section 9.1.5 of ECMA 119 says: If all seven numbers are zero, it shall mean that the date and time are not specified. HACK: However we've seen it happen that everything except gmtoff is zero and the expected date is the beginning of the epoch. So we accept 6 numbers being zero. I'm also not sure if using the beginning of the Epoch is also the right thing to do either. */ if ( 0 == idr_date->dt_year && 0 == idr_date->dt_month && 0 == idr_date->dt_day && 0 == idr_date->dt_hour && 0 == idr_date->dt_minute && 0 == idr_date->dt_second ) { time_t t = 0; struct tm temp_tm; localtime_r(&t, &temp_tm); memcpy(p_tm, &temp_tm, sizeof(struct tm)); return true; } memset(p_tm, 0, sizeof(struct tm)); p_tm->tm_year = idr_date->dt_year; p_tm->tm_mon = idr_date->dt_month - 1; p_tm->tm_mday = idr_date->dt_day; p_tm->tm_hour = idr_date->dt_hour; p_tm->tm_min = idr_date->dt_minute; p_tm->tm_sec = idr_date->dt_second - idr_date->dt_gmtoff * (15 * 60); p_tm->tm_isdst = -1; /* information not available */ /* Recompute tm_wday and tm_yday via mktime. mktime will also renormalize date values to account for the timezone offset. */ { time_t t = 0; struct tm temp_tm; t = timegm(p_tm); if (b_localtime) localtime_r(&t, &temp_tm); else gmtime_r(&t, &temp_tm); memcpy(p_tm, &temp_tm, sizeof(struct tm)); } return true; } /* A note regarding the strange strtol() testing below as pointed out SMS. From man strtol: If an underflow occurs, strtol() returns LONG_MIN. If an overflow occurs, strtol() returns LONG_MAX. In both cases, errno is set to ERANGE. This implies that one should only look at errno if the value is LONG_MIN or LONG_MAX. */ #define set_ltime_field(TM_FIELD, LT_FIELD, ADD_CONSTANT) \ { \ char num[10]; long tmp; \ memcpy(num, p_ldate->LT_FIELD, sizeof(p_ldate->LT_FIELD)); \ num[sizeof(p_ldate->LT_FIELD)] = '\0'; \ errno = 0; \ tmp = strtol(num, \ (char **)NULL, 10); \ if ( tmp < INT_MIN || tmp > INT_MAX || \ ((unsigned long)tmp + ADD_CONSTANT) > INT_MAX || \ (tmp + ADD_CONSTANT) < INT_MIN ) \ return false; \ p_tm->TM_FIELD = tmp + ADD_CONSTANT; \ } /*! Get "long" time in format used in ISO 9660 primary volume descriptor from a Unix time structure. */ bool iso9660_get_ltime (const iso9660_ltime_t *p_ldate, /*out*/ struct tm *p_tm) { if (!p_tm) return false; memset(p_tm, 0, sizeof(struct tm)); set_ltime_field(tm_year, lt_year, -1900); set_ltime_field(tm_mon, lt_month, -1); set_ltime_field(tm_mday, lt_day, 0); set_ltime_field(tm_hour, lt_hour, 0); set_ltime_field(tm_min, lt_minute, 0); set_ltime_field(tm_sec, lt_second, 0); p_tm->tm_isdst= -1; /* information not available */ #ifndef HAVE_TM_GMTOFF p_tm->tm_sec += p_ldate->lt_gmtoff * (15 * 60); #endif /* Recompute tm_wday and tm_yday via mktime. mktime will also renormalize date values to account for the timezone offset. */ { time_t t; struct tm temp_tm; t = mktime(p_tm); localtime_r(&t, &temp_tm); memcpy(p_tm, &temp_tm, sizeof(struct tm)); } p_tm->tm_isdst= -1; /* information not available */ #ifdef HAVE_TM_GMTOFF p_tm->tm_gmtoff = -p_ldate->lt_gmtoff * (15 * 60); #endif return true; } /*! Set time in format used in ISO 9660 directory index record from a Unix time structure. timezone is given as an offset correction in minutes. */ void iso9660_set_dtime_with_timezone (const struct tm *p_tm, int timezone, /*out*/ iso9660_dtime_t *p_idr_date) { memset (p_idr_date, 0, 7); if (!p_tm) return; p_idr_date->dt_year = p_tm->tm_year; p_idr_date->dt_month = p_tm->tm_mon + 1; p_idr_date->dt_day = p_tm->tm_mday; p_idr_date->dt_hour = p_tm->tm_hour; p_idr_date->dt_minute = p_tm->tm_min; p_idr_date->dt_second = p_tm->tm_sec; /* The ISO 9660 timezone is in the range -48..+52 and each unit represents a 15-minute interval. */ p_idr_date->dt_gmtoff = timezone / 15; if (p_idr_date->dt_gmtoff < -48 ) { cdio_warn ("Converted ISO 9660 timezone %d is less than -48. Adjusted", p_idr_date->dt_gmtoff); p_idr_date->dt_gmtoff = -48; } else if (p_idr_date->dt_gmtoff > 52) { cdio_warn ("Converted ISO 9660 timezone %d is over 52. Adjusted", p_idr_date->dt_gmtoff); p_idr_date->dt_gmtoff = 52; } } /*! Set time in format used in ISO 9660 directory index record from a Unix time structure. */ void iso9660_set_dtime (const struct tm *p_tm, /*out*/ iso9660_dtime_t *p_idr_date) { int timezone; #ifdef HAVE_TM_GMTOFF /* Convert seconds to minutes */ timezone = p_tm->tm_gmtoff / 60; #else timezone = (p_tm->tm_isdst > 0) ? -60 : 0; #endif iso9660_set_dtime_with_timezone (p_tm, timezone, p_idr_date); } /*! Set "long" time in format used in ISO 9660 primary volume descriptor from a Unix time structure. timezone is given as an offset correction in minutes. */ void iso9660_set_ltime_with_timezone (const struct tm *p_tm, int timezone, /*out*/ iso9660_ltime_t *pvd_date) { char *_pvd_date = (char *) pvd_date; memset (_pvd_date, '0', 16); pvd_date->lt_gmtoff = (iso712_t) 0; /* Start out with time zone GMT. */ if (!p_tm) return; snprintf(_pvd_date, 17, "%4.4d%2.2d%2.2d" "%2.2d%2.2d%2.2d" "%2.2d", p_tm->tm_year + 1900, p_tm->tm_mon + 1, p_tm->tm_mday, p_tm->tm_hour, p_tm->tm_min, p_tm->tm_sec, 0 /* 1/100 secs */ ); /* Set time zone in 15-minute interval encoding. */ pvd_date->lt_gmtoff -= (timezone / 15); if (pvd_date->lt_gmtoff < -48 ) { cdio_warn ("Converted ISO 9660 timezone %d is less than -48. Adjusted", (int) pvd_date->lt_gmtoff); pvd_date->lt_gmtoff = -48; } else if (pvd_date->lt_gmtoff > 52) { cdio_warn ("Converted ISO 9660 timezone %d is over 52. Adjusted", (int) pvd_date->lt_gmtoff); pvd_date->lt_gmtoff = 52; } } /*! Set "long" time in format used in ISO 9660 primary volume descriptor from a Unix time structure. */ void iso9660_set_ltime (const struct tm *p_tm, /*out*/ iso9660_ltime_t *pvd_date) { int timezone; #ifdef HAVE_TM_GMTOFF /* Set time zone in 15-minute interval encoding. */ timezone = p_tm->tm_gmtoff / 60; #else timezone = (p_tm->tm_isdst > 0) ? -60 : 0; #endif iso9660_set_ltime_with_timezone (p_tm, timezone, pvd_date); } /*! Convert an ISO-9660 file name which is in the format usually stored in a ISO 9660 directory entry into what's usually listed as the file name in a listing. Lowercase name, and remove trailing ;1's or .;1's and turn the other ;'s into version numbers. @param psz_oldname the ISO-9660 filename to be translated. @param psz_newname returned string. The caller allocates this and it should be at least the size of psz_oldname. @return length of the translated string is returned. It will be no greater than the length of psz_oldname. */ int iso9660_name_translate(const char *psz_oldname, char *psz_newname) { return iso9660_name_translate_ext(psz_oldname, psz_newname, 0); } /*! Convert an ISO-9660 file name which is in the format usually stored in a ISO 9660 directory entry into what's usually listed as the file name in a listing. Lowercase name if no Joliet Extension interpretation. Remove trailing ;1's or .;1's and turn the other ;'s into version numbers. @param psz_oldname the ISO-9660 filename to be translated. @param psz_newname returned string. The caller allocates this and it should be at least the size of psz_oldname. @param i_joliet_level 0 if not using Joliet Extension. Otherwise the Joliet level. @return length of the translated string is returned. It will be no greater than the length of psz_oldname. */ int iso9660_name_translate_ext(const char *psz_oldname, char *psz_newname, uint8_t i_joliet_level) { int len = strlen(psz_oldname); int i; if (0 == len) return 0; for (i = 0; i < len; i++) { unsigned char c = psz_oldname[i]; if (!c) break; /* Lower case, unless we have Joliet extensions. */ if (!i_joliet_level && isupper(c)) c = tolower(c); /* Drop trailing '.;1' (ISO 9660:1988 7.5.1 requires period) */ if (c == '.' && i == len - 3 && psz_oldname[i + 1] == ';' && psz_oldname[i + 2] == '1') break; /* Drop trailing ';1' */ if (c == ';' && i == len - 2 && psz_oldname[i + 1] == '1') break; /* Convert remaining ';' to '.' */ if (c == ';') c = '.'; psz_newname[i] = c; } psz_newname[i] = '\0'; return i; } /*! Pad string src with spaces to size len and copy this to dst. If len is less than the length of src, dst will be truncated to the first len characters of src. src can also be scanned to see if it contains only ACHARs, DCHARs, 7-bit ASCII chars depending on the enumeration _check. In addition to getting changed, dst is the return value. Note: this string might not be NULL terminated. */ char * iso9660_strncpy_pad(char dst[], const char src[], size_t len, enum strncpy_pad_check _check) { size_t rlen; cdio_assert (dst != NULL); cdio_assert (src != NULL); cdio_assert (len > 0); switch (_check) { int idx; case ISO9660_NOCHECK: break; case ISO9660_7BIT: for (idx = 0; src[idx]; idx++) if ((int8_t) src[idx] < 0) { cdio_warn ("string '%s' fails 7bit constraint (pos = %d)", src, idx); break; } break; case ISO9660_ACHARS: for (idx = 0; src[idx]; idx++) if (!iso9660_is_achar (src[idx])) { cdio_warn ("string '%s' fails a-character constraint (pos = %d)", src, idx); break; } break; case ISO9660_DCHARS: for (idx = 0; src[idx]; idx++) if (!iso9660_is_dchar (src[idx])) { cdio_warn ("string '%s' fails d-character constraint (pos = %d)", src, idx); break; } break; default: cdio_assert_not_reached (); break; } rlen = strlen (src); if (rlen > len) cdio_warn ("string '%s' is getting truncated to %d characters", src, (unsigned int) len); strncpy (dst, src, len); if (rlen < len) memset(dst+rlen, ' ', len-rlen); return dst; } /*! Return true if c is a DCHAR - a valid ISO-9660 level 1 character. These are the ASCSII capital letters A-Z, the digits 0-9 and an underscore. */ bool iso9660_is_dchar (int c) { if (!IN (c, 0x30, 0x5f) || IN (c, 0x3a, 0x40) || IN (c, 0x5b, 0x5e)) return false; return true; } /*! Return true if c is an ACHAR - These are the DCHAR's plus some ASCII symbols including the space symbol. */ bool iso9660_is_achar (int c) { if (!IN (c, 0x20, 0x5f) || IN (c, 0x23, 0x24) || c == 0x40 || IN (c, 0x5b, 0x5e)) return false; return true; } void iso9660_set_evd(void *pd) { iso_volume_descriptor_t ied; cdio_assert (sizeof(iso_volume_descriptor_t) == ISO_BLOCKSIZE); cdio_assert (pd != NULL); memset(&ied, 0, sizeof(ied)); ied.type = to_711(ISO_VD_END); iso9660_strncpy_pad (ied.id, ISO_STANDARD_ID, sizeof(ied.id), ISO9660_DCHARS); ied.version = to_711(ISO_VERSION); memcpy(pd, &ied, sizeof(ied)); } void iso9660_set_pvd(void *pd, const char volume_id[], const char publisher_id[], const char preparer_id[], const char application_id[], uint32_t iso_size, const void *root_dir, uint32_t path_table_l_extent, uint32_t path_table_m_extent, uint32_t path_table_size, const time_t *pvd_time ) { iso9660_pvd_t ipd; struct tm temp_tm; cdio_assert (sizeof(iso9660_pvd_t) == ISO_BLOCKSIZE); cdio_assert (pd != NULL); cdio_assert (volume_id != NULL); cdio_assert (application_id != NULL); memset(&ipd,0,sizeof(ipd)); /* paranoia? */ /* magic stuff ... thatis CD XA marker... */ strncpy(((char*)&ipd)+ISO_XA_MARKER_OFFSET, ISO_XA_MARKER_STRING, sizeof(ISO_XA_MARKER_STRING)); ipd.type = to_711(ISO_VD_PRIMARY); iso9660_strncpy_pad (ipd.id, ISO_STANDARD_ID, 5, ISO9660_DCHARS); ipd.version = to_711(ISO_VERSION); iso9660_strncpy_pad (ipd.system_id, SYSTEM_ID, 32, ISO9660_ACHARS); iso9660_strncpy_pad (ipd.volume_id, volume_id, 32, ISO9660_DCHARS); ipd.volume_space_size = to_733(iso_size); ipd.volume_set_size = to_723(1); ipd.volume_sequence_number = to_723(1); ipd.logical_block_size = to_723(ISO_BLOCKSIZE); ipd.path_table_size = to_733(path_table_size); ipd.type_l_path_table = to_731(path_table_l_extent); ipd.type_m_path_table = to_732(path_table_m_extent); /* root_directory_record doesn't contain the 1-byte filename, so we add one for that. */ cdio_assert (sizeof(ipd.root_directory_record) == 33); memcpy(&(ipd.root_directory_record), root_dir, sizeof(ipd.root_directory_record)); ipd.root_directory_filename='\0'; ipd.root_directory_record.length = sizeof(ipd.root_directory_record)+1; iso9660_strncpy_pad (ipd.volume_set_id, VOLUME_SET_ID, ISO_MAX_VOLUMESET_ID, ISO9660_DCHARS); iso9660_strncpy_pad (ipd.publisher_id, publisher_id, ISO_MAX_PUBLISHER_ID, ISO9660_ACHARS); iso9660_strncpy_pad (ipd.preparer_id, preparer_id, ISO_MAX_PREPARER_ID, ISO9660_ACHARS); iso9660_strncpy_pad (ipd.application_id, application_id, ISO_MAX_APPLICATION_ID, ISO9660_ACHARS); iso9660_strncpy_pad (ipd.copyright_file_id , "", 37, ISO9660_DCHARS); iso9660_strncpy_pad (ipd.abstract_file_id , "", 37, ISO9660_DCHARS); iso9660_strncpy_pad (ipd.bibliographic_file_id, "", 37, ISO9660_DCHARS); gmtime_r(pvd_time, &temp_tm); iso9660_set_ltime (&temp_tm, &(ipd.creation_date)); gmtime_r(pvd_time, &temp_tm); iso9660_set_ltime (&temp_tm, &(ipd.modification_date)); iso9660_set_ltime (&temp_tm, &(ipd.expiration_date)); iso9660_set_ltime (&temp_tm, &(ipd.effective_date)); ipd.file_structure_version = to_711(1); /* we leave ipd.application_data = 0 */ memcpy(pd, &ipd, sizeof(ipd)); /* copy stuff to arg ptr */ } unsigned int iso9660_dir_calc_record_size(unsigned int namelen, unsigned int su_len) { unsigned int length; length = sizeof(iso9660_dir_t); length += namelen; if (length % 2) /* pad to word boundary */ length++; length += su_len; if (length % 2) /* pad to word boundary again */ length++; return length; } void iso9660_dir_add_entry_su(void *dir, const char filename[], uint32_t extent, uint32_t size, uint8_t file_flags, const void *su_data, unsigned int su_size, const time_t *entry_time) { iso9660_dir_t *idr = dir; uint8_t *dir8 = dir; unsigned int offset = 0; uint32_t dsize = from_733(idr->size); int length, su_offset; struct tm temp_tm; cdio_assert (sizeof(iso9660_dir_t) == 33); if (!dsize && !idr->length) dsize = ISO_BLOCKSIZE; /* for when dir lacks '.' entry */ cdio_assert (dsize > 0 && !(dsize % ISO_BLOCKSIZE)); cdio_assert (dir != NULL); cdio_assert (extent > 17); cdio_assert (filename != NULL); cdio_assert (strlen(filename) <= MAX_ISOPATHNAME); length = sizeof(iso9660_dir_t); length += strlen(filename); length = _cdio_ceil2block (length, 2); /* pad to word boundary */ su_offset = length; length += su_size; length = _cdio_ceil2block (length, 2); /* pad to word boundary again */ /* find the last entry's end */ { unsigned int ofs_last_rec = 0; offset = 0; while (offset < dsize) { if (!dir8[offset]) { offset++; continue; } offset += dir8[offset]; ofs_last_rec = offset; } cdio_assert (offset == dsize); offset = ofs_last_rec; } /* be sure we don't cross sectors boundaries */ offset = _cdio_ofs_add (offset, length, ISO_BLOCKSIZE); offset -= length; cdio_assert (offset + length <= dsize); idr = (iso9660_dir_t *) &dir8[offset]; cdio_assert (offset+length < dsize); memset(idr, 0, length); idr->length = to_711(length); idr->extent = to_733(extent); idr->size = to_733(size); gmtime_r(entry_time, &temp_tm); iso9660_set_dtime (&temp_tm, &(idr->recording_time)); idr->file_flags = to_711(file_flags); idr->volume_sequence_number = to_723(1); idr->filename_len = to_711(strlen(filename) ? strlen(filename) : 1); /* working hack! */ memcpy(idr->filename, filename, from_711(idr->filename_len)); memcpy(&dir8[offset] + su_offset, su_data, su_size); } void iso9660_dir_init_new (void *dir, uint32_t self, uint32_t ssize, uint32_t parent, uint32_t psize, const time_t *dir_time) { iso9660_dir_init_new_su (dir, self, ssize, NULL, 0, parent, psize, NULL, 0, dir_time); } void iso9660_dir_init_new_su (void *dir, uint32_t self, uint32_t ssize, const void *ssu_data, unsigned int ssu_size, uint32_t parent, uint32_t psize, const void *psu_data, unsigned int psu_size, const time_t *dir_time) { cdio_assert (ssize > 0 && !(ssize % ISO_BLOCKSIZE)); cdio_assert (psize > 0 && !(psize % ISO_BLOCKSIZE)); cdio_assert (dir != NULL); memset (dir, 0, ssize); /* "\0" -- working hack due to padding */ iso9660_dir_add_entry_su (dir, "\0", self, ssize, ISO_DIRECTORY, ssu_data, ssu_size, dir_time); iso9660_dir_add_entry_su (dir, "\1", parent, psize, ISO_DIRECTORY, psu_data, psu_size, dir_time); } /* Zero's out pathable. Do this first. */ void iso9660_pathtable_init (void *pt) { cdio_assert (sizeof (iso_path_table_t) == 8); cdio_assert (pt != NULL); memset (pt, 0, ISO_BLOCKSIZE); /* fixme */ } /*! Returns POSIX mode bitstring for a given file. */ mode_t iso9660_get_posix_filemode(const iso9660_stat_t *p_iso_dirent) { mode_t mode = 0; #ifdef HAVE_ROCK if (yep == p_iso_dirent->rr.b3_rock) { return iso9660_get_posix_filemode_from_rock(&p_iso_dirent->rr); } else #endif if (p_iso_dirent->b_xa) { return iso9660_get_posix_filemode_from_xa(p_iso_dirent->xa.attributes); } return mode; } static const iso_path_table_t * pathtable_get_entry (const void *pt, unsigned int entrynum) { const uint8_t *tmp = pt; unsigned int offset = 0; unsigned int count = 0; cdio_assert (pt != NULL); while (from_711 (*tmp)) { if (count == entrynum) break; cdio_assert (count < entrynum); offset += sizeof (iso_path_table_t); offset += from_711 (*tmp); if (offset % 2) offset++; tmp = (uint8_t *)pt + offset; count++; } if (!from_711 (*tmp)) return NULL; return (const void *) tmp; } void pathtable_get_size_and_entries (const void *pt, unsigned int *size, unsigned int *entries) { const uint8_t *tmp = pt; unsigned int offset = 0; unsigned int count = 0; cdio_assert (pt != NULL); while (from_711 (*tmp)) { offset += sizeof (iso_path_table_t); offset += from_711 (*tmp); if (offset % 2) offset++; tmp = (uint8_t *)pt + offset; count++; } if (size) *size = offset; if (entries) *entries = count; } unsigned int iso9660_pathtable_get_size (const void *pt) { unsigned int size = 0; pathtable_get_size_and_entries (pt, &size, NULL); return size; } uint16_t iso9660_pathtable_l_add_entry (void *pt, const char name[], uint32_t extent, uint16_t parent) { iso_path_table_t *ipt = (iso_path_table_t *)((char *)pt + iso9660_pathtable_get_size (pt)); size_t name_len = strlen (name) ? strlen (name) : 1; unsigned int entrynum = 0; cdio_assert (iso9660_pathtable_get_size (pt) < ISO_BLOCKSIZE); /*fixme */ memset (ipt, 0, sizeof (iso_path_table_t) + name_len); /* paranoia */ ipt->name_len = to_711 (name_len); ipt->extent = to_731 (extent); ipt->parent = to_721 (parent); memcpy (ipt->name, name, name_len); pathtable_get_size_and_entries (pt, NULL, &entrynum); if (entrynum > 1) { const iso_path_table_t *ipt2 = pathtable_get_entry (pt, entrynum - 2); cdio_assert (ipt2 != NULL); cdio_assert (from_721 (ipt2->parent) <= parent); } return entrynum; } uint16_t iso9660_pathtable_m_add_entry (void *pt, const char name[], uint32_t extent, uint16_t parent) { iso_path_table_t *ipt = (iso_path_table_t *)((char *)pt + iso9660_pathtable_get_size (pt)); size_t name_len = strlen (name) ? strlen (name) : 1; unsigned int entrynum = 0; cdio_assert (iso9660_pathtable_get_size(pt) < ISO_BLOCKSIZE); /* fixme */ memset(ipt, 0, sizeof (iso_path_table_t) + name_len); /* paranoia */ ipt->name_len = to_711 (name_len); ipt->extent = to_732 (extent); ipt->parent = to_722 (parent); memcpy (ipt->name, name, name_len); pathtable_get_size_and_entries (pt, NULL, &entrynum); if (entrynum > 1) { const iso_path_table_t *ipt2 = pathtable_get_entry (pt, entrynum - 2); cdio_assert (ipt2 != NULL); cdio_assert (from_722 (ipt2->parent) <= parent); } return entrynum; } /*! Check that pathname is a valid ISO-9660 directory name. A valid directory name should not start out with a slash (/), dot (.) or null byte, should be less than 37 characters long, have no more than 8 characters in a directory component which is separated by a /, and consist of only DCHARs. */ bool iso9660_dirname_valid_p (const char pathname[]) { const char *p = pathname; int len; cdio_assert (pathname != NULL); if (*p == '/' || *p == '.' || *p == '\0') return false; if (strlen (pathname) > MAX_ISOPATHNAME) return false; len = 0; for (; *p; p++) if (iso9660_is_dchar (*p)) { len++; if (len > 8) return false; } else if (*p == '/') { if (!len) return false; len = 0; } else return false; /* unexpected char */ if (!len) return false; /* last char may not be '/' */ return true; } /*! Check that pathname is a valid ISO-9660 pathname. A valid pathname contains a valid directory name, if one appears and the filename portion should be no more than 8 characters for the file prefix and 3 characters in the extension (or portion after a dot). There should be exactly one dot somewhere in the filename portion and the filename should be composed of only DCHARs. True is returned if pathname is valid. */ bool iso9660_pathname_valid_p (const char pathname[]) { const char *p = NULL; cdio_assert (pathname != NULL); if ((p = strrchr (pathname, '/'))) { bool rc; char *_tmp = strdup (pathname); *strrchr (_tmp, '/') = '\0'; rc = iso9660_dirname_valid_p (_tmp); free (_tmp); if (!rc) return false; p++; } else p = pathname; if (strlen (pathname) > (MAX_ISOPATHNAME - 6)) return false; { int len = 0; int dots = 0; for (; *p; p++) if (iso9660_is_dchar (*p)) { len++; if (dots == 0 ? len > 8 : len > 3) return false; } else if (*p == '.') { dots++; if (dots > 1) return false; if (!len) return false; len = 0; } else return false; if (dots != 1) return false; } return true; } /*! Take pathname and a version number and turn that into a ISO-9660 pathname. (That's just the pathname followd by ";" and the version number. For example, mydir/file.ext -> mydir/file.ext;1 for version 1. The resulting ISO-9660 pathname is returned. */ char * iso9660_pathname_isofy (const char pathname[], uint16_t version) { char tmpbuf[1024] = { 0, }; cdio_assert (strlen (pathname) < (sizeof (tmpbuf) - sizeof (";65535"))); snprintf (tmpbuf, sizeof(tmpbuf), "%s;%d", pathname, version); return strdup (tmpbuf); } /*! Return the PVD's application ID. NULL is returned if there is some problem in getting this. */ char * iso9660_get_application_id(iso9660_pvd_t *p_pvd) { if (NULL==p_pvd) return NULL; return strdup(strip_trail(p_pvd->application_id, ISO_MAX_APPLICATION_ID)); } #if FIXME lsn_t iso9660_get_dir_extent(const iso9660_dir_t *idr) { if (NULL == idr) return 0; return from_733(idr->extent); } #endif uint8_t iso9660_get_dir_len(const iso9660_dir_t *idr) { if (NULL == idr) return 0; return idr->length; } #if FIXME uint8_t iso9660_get_dir_size(const iso9660_dir_t *idr) { if (NULL == idr) return 0; return from_733(idr->size); } #endif uint8_t iso9660_get_pvd_type(const iso9660_pvd_t *pvd) { if (NULL == pvd) return 255; return(pvd->type); } const char * iso9660_get_pvd_id(const iso9660_pvd_t *pvd) { if (NULL == pvd) return "ERR"; return(pvd->id); } int iso9660_get_pvd_space_size(const iso9660_pvd_t *pvd) { if (NULL == pvd) return 0; return from_733(pvd->volume_space_size); } int iso9660_get_pvd_block_size(const iso9660_pvd_t *pvd) { if (NULL == pvd) return 0; return from_723(pvd->logical_block_size); } /*! Return the primary volume id version number (of pvd). If there is an error 0 is returned. */ int iso9660_get_pvd_version(const iso9660_pvd_t *pvd) { if (NULL == pvd) return 0; return pvd->version; } /*! Return the LSN of the root directory for pvd. If there is an error CDIO_INVALID_LSN is returned. */ lsn_t iso9660_get_root_lsn(const iso9660_pvd_t *pvd) { if (NULL == pvd) return CDIO_INVALID_LSN; else { const iso9660_dir_t *idr = &(pvd->root_directory_record); if (NULL == idr) return CDIO_INVALID_LSN; return(from_733 (idr->extent)); } } /*! Return a string containing the preparer id with trailing blanks removed. */ char * iso9660_get_preparer_id(const iso9660_pvd_t *pvd) { if (NULL==pvd) return NULL; return strdup(strip_trail(pvd->preparer_id, ISO_MAX_PREPARER_ID)); } /*! Return a string containing the publisher id with trailing blanks removed. */ char * iso9660_get_publisher_id(const iso9660_pvd_t *pvd) { if (NULL==pvd) return NULL; return strdup(strip_trail(pvd->publisher_id, ISO_MAX_PUBLISHER_ID)); } /*! Return a string containing the PVD's system id with trailing blanks removed. */ char * iso9660_get_system_id(const iso9660_pvd_t *pvd) { if (NULL==pvd) return NULL; return strdup(strip_trail(pvd->system_id, ISO_MAX_SYSTEM_ID)); } /*! Return the PVD's volume ID. */ char * iso9660_get_volume_id(const iso9660_pvd_t *pvd) { if (NULL == pvd) return NULL; return strdup(strip_trail(pvd->volume_id, ISO_MAX_VOLUME_ID)); } /*! Return the PVD's volumeset ID. NULL is returned if there is some problem in getting this. */ char * iso9660_get_volumeset_id(const iso9660_pvd_t *pvd) { if ( NULL == pvd ) return NULL; return strdup(strip_trail(pvd->volume_set_id, ISO_MAX_VOLUMESET_ID)); } /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/lib/iso9660/iso9660_fs.c0000644000175000017500000012337411650124600013637 00000000000000/* Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2011 Rocky Bernstein Copyright (C) 2001 Herbert Valerio Riedel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* iso9660 filesystem-based routines */ #if defined(HAVE_CONFIG_H) && !defined(__CDIO_CONFIG_H__) # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #ifdef HAVE_STRING_H # include #endif #ifdef HAVE_ERRNO_H # include #endif #ifdef HAVE_LANGINFO_CODESET #include #endif #include #include #include #include #include /* Private headers */ #include "cdio_assert.h" #include "_cdio_stdio.h" #include "cdio_private.h" #include static const char _rcsid[] = "$Id: iso9660_fs.c,v 1.47 2008/04/18 16:02:09 karl Exp $"; /* Implementation of iso9660_t type */ struct _iso9660_s { CdioDataSource_t *stream; /* Stream pointer */ bool_3way_t b_xa; /* true if has XA attributes. */ bool_3way_t b_mode2; /* true if has mode 2, false for mode 1. */ uint8_t i_joliet_level; /* 0 = no Joliet extensions. 1-3: Joliet level. */ iso9660_pvd_t pvd; iso9660_svd_t svd; iso_extension_mask_t iso_extension_mask; /* What extensions we tolerate. */ uint32_t i_datastart; /* Usually 0 when i_framesize is ISO_BLOCKSIZE. This is the normal condition. But in a fuzzy read we may be reading a CD-image and not a true ISO 9660 image this might be CDIO_CD_SYNC_SIZE */ uint32_t i_framesize; /* Usually ISO_BLOCKSIZE (2048), but in a fuzzy read, we may be reading a CD-image and not a true ISO 9660 image this might be CDIO_CD_FRAMESIZE_RAW (2352) or M2RAW_SECTOR_SIZE (2336). */ int i_fuzzy_offset; /* Adjustment in bytes to make ISO_STANDARD_ID ("CD001") come out as ISO_PVD_SECTOR (frame 16). Normally this should be 0 for an ISO 9660 image, but if one is say reading a BIN/CUE or cdrdao BIN/TOC without having the CUE or TOC and trying to extract an ISO-9660 filesystem inside that it may be different. */ }; static long int iso9660_seek_read_framesize (const iso9660_t *p_iso, void *ptr, lsn_t start, long int size, uint16_t i_framesize); /* Adjust the p_iso's i_datastart, i_byte_offset and i_framesize based on whether we find a frame header or not. */ static void adjust_fuzzy_pvd( iso9660_t *p_iso ) { long int i_byte_offset; if (!p_iso) return; i_byte_offset = (ISO_PVD_SECTOR * p_iso->i_framesize) + p_iso->i_fuzzy_offset + p_iso->i_datastart; /* If we have a raw 2352-byte frame then we should expect to see a sync frame and a header. */ if (CDIO_CD_FRAMESIZE_RAW == p_iso->i_framesize) { const int pre_user_data=CDIO_CD_SYNC_SIZE + CDIO_CD_HEADER_SIZE + CDIO_CD_SUBHEADER_SIZE; char buf[pre_user_data]; i_byte_offset -= pre_user_data; if ( DRIVER_OP_SUCCESS != cdio_stream_seek (p_iso->stream, i_byte_offset, SEEK_SET) ) return; if (sizeof(buf) == cdio_stream_read (p_iso->stream, buf, sizeof(buf), 1)) { /* Does the sector frame header suggest Mode 1 format? */ if (!memcmp(CDIO_SECTOR_SYNC_HEADER, buf+CDIO_CD_SUBHEADER_SIZE, CDIO_CD_SYNC_SIZE)) { if (buf[14+CDIO_CD_SUBHEADER_SIZE] != 0x16) { cdio_warn ("Expecting the PVD sector header MSF to be 0x16, is: %x", buf[14]); } if (buf[15+CDIO_CD_SUBHEADER_SIZE] != 0x1) { cdio_warn ("Expecting the PVD sector mode to be Mode 1 is: %x", buf[15]); } p_iso->b_mode2 = nope; p_iso->b_xa = nope; } else if (!memcmp(CDIO_SECTOR_SYNC_HEADER, buf, CDIO_CD_SYNC_SIZE)) { /* Frame header indicates Mode 2 Form 1*/ if (buf[14] != 0x16) { cdio_warn ("Expecting the PVD sector header MSF to be 0x16, is: %x", buf[14]); } if (buf[15] != 0x2) { cdio_warn ("Expecting the PVD sector mode to be Mode 2 is: %x", buf[15]); } p_iso->b_mode2 = yep; /* Do do: check Mode 2 Form 2? */ } else { /* Has no frame header */ p_iso->i_framesize = M2RAW_SECTOR_SIZE; p_iso->i_fuzzy_offset = (CDIO_CD_FRAMESIZE_RAW - M2RAW_SECTOR_SIZE) * ISO_PVD_SECTOR + p_iso->i_fuzzy_offset + p_iso->i_datastart; p_iso->i_datastart = 0; } } } } /*! Open an ISO 9660 image for reading in either fuzzy mode or not. */ static iso9660_t * iso9660_open_ext_private (const char *psz_path, iso_extension_mask_t iso_extension_mask, uint16_t i_fuzz, bool b_fuzzy) { iso9660_t *p_iso = (iso9660_t *) calloc(1, sizeof(iso9660_t)) ; bool b_have_superblock; if (!p_iso) return NULL; p_iso->stream = cdio_stdio_new( psz_path ); if (NULL == p_iso->stream) goto error; p_iso->i_framesize = ISO_BLOCKSIZE; b_have_superblock = (b_fuzzy) ? iso9660_ifs_fuzzy_read_superblock(p_iso, iso_extension_mask, i_fuzz) : iso9660_ifs_read_superblock(p_iso, iso_extension_mask) ; if ( ! b_have_superblock ) goto error; /* Determine if image has XA attributes. */ p_iso->b_xa = strncmp ((char *) &(p_iso->pvd) + ISO_XA_MARKER_OFFSET, ISO_XA_MARKER_STRING, sizeof (ISO_XA_MARKER_STRING)) ? nope : yep; p_iso->iso_extension_mask = iso_extension_mask; return p_iso; error: if (p_iso && p_iso->stream) cdio_stdio_destroy(p_iso->stream); free(p_iso); return NULL; } /*! Open an ISO 9660 image for reading. Maybe in the future we will have a mode. NULL is returned on error. */ iso9660_t * iso9660_open (const char *psz_path /*, mode*/) { return iso9660_open_ext(psz_path, ISO_EXTENSION_NONE); } /*! Open an ISO 9660 image for reading. Maybe in the future we will have a mode. NULL is returned on error. */ iso9660_t * iso9660_open_ext (const char *psz_path, iso_extension_mask_t iso_extension_mask) { return iso9660_open_ext_private(psz_path, iso_extension_mask, 0, false); } /*! Open an ISO 9660 image for reading. Maybe in the future we will have a mode. NULL is returned on error. */ iso9660_t * iso9660_open_fuzzy (const char *psz_path, uint16_t i_fuzz /*, mode*/) { return iso9660_open_fuzzy_ext(psz_path, ISO_EXTENSION_NONE, i_fuzz); } /*! Open an ISO 9660 image for reading. Maybe in the future we will have a mode. NULL is returned on error. */ iso9660_t * iso9660_open_fuzzy_ext (const char *psz_path, iso_extension_mask_t iso_extension_mask, uint16_t i_fuzz) { return iso9660_open_ext_private(psz_path, iso_extension_mask, i_fuzz, true); } /*! Close previously opened ISO 9660 image. True is unconditionally returned. If there was an error false would be returned. */ bool iso9660_close (iso9660_t *p_iso) { if (NULL != p_iso) { cdio_stdio_destroy(p_iso->stream); free(p_iso); } return true; } static bool check_pvd (const iso9660_pvd_t *p_pvd, cdio_log_level_t log_level) { if ( ISO_VD_PRIMARY != from_711(p_pvd->type) ) { cdio_log (log_level, "unexpected PVD type %d", p_pvd->type); return false; } if (strncmp (p_pvd->id, ISO_STANDARD_ID, strlen (ISO_STANDARD_ID))) { cdio_log (log_level, "unexpected ID encountered (expected `" ISO_STANDARD_ID "', got `%.5s'", p_pvd->id); return false; } return true; } /*! Return the application ID. NULL is returned in psz_app_id if there is some problem in getting this. */ bool iso9660_ifs_get_application_id(iso9660_t *p_iso, /*out*/ cdio_utf8_t **p_psz_app_id) { if (!p_iso) { *p_psz_app_id = NULL; return false; } #ifdef HAVE_JOLIET if (p_iso->i_joliet_level) { /* TODO: check that we haven't reached the maximum size. If we have, perhaps we've truncated and if we can get longer results *and* have the same character using the PVD, do that. */ if ( cdio_charset_to_utf8(p_iso->svd.application_id, ISO_MAX_APPLICATION_ID, p_psz_app_id, "UCS-2BE")) return true; } #endif /*HAVE_JOLIET*/ *p_psz_app_id = iso9660_get_application_id( &(p_iso->pvd) ); return *p_psz_app_id != NULL && strlen(*p_psz_app_id); } /*! Return the Joliet level recognaized for p_iso. */ uint8_t iso9660_ifs_get_joliet_level(iso9660_t *p_iso) { if (!p_iso) return 0; return p_iso->i_joliet_level; } /*! Return a string containing the preparer id with trailing blanks removed. */ bool iso9660_ifs_get_preparer_id(iso9660_t *p_iso, /*out*/ cdio_utf8_t **p_psz_preparer_id) { if (!p_iso) { *p_psz_preparer_id = NULL; return false; } #ifdef HAVE_JOLIET if (p_iso->i_joliet_level) { /* TODO: check that we haven't reached the maximum size. If we have, perhaps we've truncated and if we can get longer results *and* have the same character using the PVD, do that. */ if ( cdio_charset_to_utf8(p_iso->svd.preparer_id, ISO_MAX_PREPARER_ID, p_psz_preparer_id, "UCS-2BE") ) return true; } #endif /*HAVE_JOLIET*/ *p_psz_preparer_id = iso9660_get_preparer_id( &(p_iso->pvd) ); return *p_psz_preparer_id != NULL && strlen(*p_psz_preparer_id); } /*! Return a string containing the PVD's publisher id with trailing blanks removed. */ bool iso9660_ifs_get_publisher_id(iso9660_t *p_iso, /*out*/ cdio_utf8_t **p_psz_publisher_id) { if (!p_iso) { *p_psz_publisher_id = NULL; return false; } #ifdef HAVE_JOLIET if (p_iso->i_joliet_level) { /* TODO: check that we haven't reached the maximum size. If we have, perhaps we've truncated and if we can get longer results *and* have the same character using the PVD, do that. */ if( cdio_charset_to_utf8(p_iso->svd.publisher_id, ISO_MAX_PUBLISHER_ID, p_psz_publisher_id, "UCS-2BE") ) return true; } #endif /*HAVE_JOLIET*/ *p_psz_publisher_id = iso9660_get_publisher_id( &(p_iso->pvd) ); return *p_psz_publisher_id != NULL && strlen(*p_psz_publisher_id); } /*! Return a string containing the PVD's publisher id with trailing blanks removed. */ bool iso9660_ifs_get_system_id(iso9660_t *p_iso, /*out*/ cdio_utf8_t **p_psz_system_id) { if (!p_iso) { *p_psz_system_id = NULL; return false; } #ifdef HAVE_JOLIET if (p_iso->i_joliet_level) { /* TODO: check that we haven't reached the maximum size. If we have, perhaps we've truncated and if we can get longer results *and* have the same character using the PVD, do that. */ if ( cdio_charset_to_utf8(p_iso->svd.system_id, ISO_MAX_SYSTEM_ID, p_psz_system_id, "UCS-2BE") ) return true; } #endif /*HAVE_JOLIET*/ *p_psz_system_id = iso9660_get_system_id( &(p_iso->pvd) ); return *p_psz_system_id != NULL && strlen(*p_psz_system_id); } /*! Return a string containing the PVD's publisher id with trailing blanks removed. */ bool iso9660_ifs_get_volume_id(iso9660_t *p_iso, /*out*/ cdio_utf8_t **p_psz_volume_id) { if (!p_iso) { *p_psz_volume_id = NULL; return false; } #ifdef HAVE_JOLIET if (p_iso->i_joliet_level) { /* TODO: check that we haven't reached the maximum size. If we have, perhaps we've truncated and if we can get longer results *and* have the same character using the PVD, do that. */ if ( cdio_charset_to_utf8(p_iso->svd.volume_id, ISO_MAX_VOLUME_ID, p_psz_volume_id, "UCS-2BE") ) return true; } #endif /* HAVE_JOLIET */ *p_psz_volume_id = iso9660_get_volume_id( &(p_iso->pvd) ); return *p_psz_volume_id != NULL && strlen(*p_psz_volume_id); } /*! Return a string containing the PVD's publisher id with trailing blanks removed. */ bool iso9660_ifs_get_volumeset_id(iso9660_t *p_iso, /*out*/ cdio_utf8_t **p_psz_volumeset_id) { if (!p_iso) { *p_psz_volumeset_id = NULL; return false; } #ifdef HAVE_JOLIET if (p_iso->i_joliet_level) { /* TODO: check that we haven't reached the maximum size. If we have, perhaps we've truncated and if we can get longer results *and* have the same character using the PVD, do that. */ if ( cdio_charset_to_utf8(p_iso->svd.volume_set_id, ISO_MAX_VOLUMESET_ID, p_psz_volumeset_id, "UCS-2BE") ) return true; } #endif /*HAVE_JOLIET*/ *p_psz_volumeset_id = iso9660_get_volumeset_id( &(p_iso->pvd) ); return *p_psz_volumeset_id != NULL && strlen(*p_psz_volumeset_id); } /*! Read the Primary Volume Descriptor for an ISO 9660 image. True is returned if read, and false if there was an error. */ static bool iso9660_ifs_read_pvd_loglevel (const iso9660_t *p_iso, /*out*/ iso9660_pvd_t *p_pvd, cdio_log_level_t log_level) { if (0 == iso9660_iso_seek_read (p_iso, p_pvd, ISO_PVD_SECTOR, 1)) { cdio_log ( log_level, "error reading PVD sector (%d)", ISO_PVD_SECTOR ); return false; } return check_pvd(p_pvd, log_level); } /*! Read the Primary Volume Descriptor for an ISO 9660 image. True is returned if read, and false if there was an error. */ bool iso9660_ifs_read_pvd (const iso9660_t *p_iso, /*out*/ iso9660_pvd_t *p_pvd) { return iso9660_ifs_read_pvd_loglevel(p_iso, p_pvd, CDIO_LOG_WARN); } /*! Read the Super block of an ISO 9660 image. This is the Primary Volume Descriptor (PVD) and perhaps a Supplemental Volume Descriptor if (Joliet) extensions are acceptable. */ bool iso9660_ifs_read_superblock (iso9660_t *p_iso, iso_extension_mask_t iso_extension_mask) { iso9660_svd_t *p_svd; /* Secondary volume descriptor. */ if (!p_iso || !iso9660_ifs_read_pvd(p_iso, &(p_iso->pvd))) return false; p_svd = &(p_iso->svd); p_iso->i_joliet_level = 0; if (0 != iso9660_iso_seek_read (p_iso, p_svd, ISO_PVD_SECTOR+1, 1)) { if ( ISO_VD_SUPPLEMENTARY == from_711(p_svd->type) ) { if (p_svd->escape_sequences[0] == 0x25 && p_svd->escape_sequences[1] == 0x2f) { switch (p_svd->escape_sequences[2]) { case 0x40: if (iso_extension_mask & ISO_EXTENSION_JOLIET_LEVEL1) p_iso->i_joliet_level = 1; break; case 0x43: if (iso_extension_mask & ISO_EXTENSION_JOLIET_LEVEL2) p_iso->i_joliet_level = 2; break; case 0x45: if (iso_extension_mask & ISO_EXTENSION_JOLIET_LEVEL3) p_iso->i_joliet_level = 3; break; default: cdio_info("Supplementary Volume Descriptor found, but not Joliet"); } if (p_iso->i_joliet_level > 0) { cdio_info("Found Extension: Joliet Level %d", p_iso->i_joliet_level); } } } } return true; } /*! Read the Super block of an ISO 9660 image but determine framesize and datastart and a possible additional offset. Generally here we are not reading an ISO 9660 image but a CD-Image which contains an ISO 9660 filesystem. */ bool iso9660_ifs_fuzzy_read_superblock (iso9660_t *p_iso, iso_extension_mask_t iso_extension_mask, uint16_t i_fuzz) { /* Got some work to do to find ISO_STANDARD_ID ("CD001") */ unsigned int i; for (i=0; ii_framesize = framesizes[k]; p_iso->i_datastart = (ISO_BLOCKSIZE == framesizes[k]) ? 0 : CDIO_CD_SYNC_SIZE; p_iso->i_fuzzy_offset = 0; if (0 == iso9660_seek_read_framesize (p_iso, frame, lsn, 1, p_iso->i_framesize)) { return false; } q = memchr(frame, 'C', p_iso->i_framesize); for ( p=q; p && p < frame + p_iso->i_framesize ; p=q+1 ) { q = memchr(p, 'C', p_iso->i_framesize - (p - frame)); if ( !q || (pvd = strstr(q, ISO_STANDARD_ID)) ) break; } if (pvd) { /* Yay! Found something */ p_iso->i_fuzzy_offset = (pvd - frame - 1) - ((ISO_PVD_SECTOR-lsn)*p_iso->i_framesize) ; /* But is it *really* a PVD? */ if ( iso9660_ifs_read_pvd_loglevel(p_iso, &(p_iso->pvd), CDIO_LOG_DEBUG) ) { adjust_fuzzy_pvd(p_iso); return true; } } } } } return false; } /*! Read the Primary Volume Descriptor for of CD. */ bool iso9660_fs_read_pvd(const CdIo_t *p_cdio, /*out*/ iso9660_pvd_t *p_pvd) { /* A bit of a hack, we'll assume track 1 contains ISO_PVD_SECTOR.*/ char buf[CDIO_CD_FRAMESIZE_RAW] = { 0, }; driver_return_code_t driver_return = cdio_read_data_sectors (p_cdio, buf, ISO_PVD_SECTOR, ISO_BLOCKSIZE, 1); if (DRIVER_OP_SUCCESS != driver_return) { cdio_warn ("error reading PVD sector (%d) error %d", ISO_PVD_SECTOR, driver_return); return false; } /* The size of a PVD or SVD is smaller than a sector. So we allocated a bigger block above (buf) and now we'll copy just the part we need to save. */ cdio_assert (sizeof(buf) >= sizeof (iso9660_pvd_t)); memcpy(p_pvd, buf, sizeof(iso9660_pvd_t)); return check_pvd(p_pvd, CDIO_LOG_WARN); } /*! Read the Super block of an ISO 9660 image. This is the Primary Volume Descriptor (PVD) and perhaps a Supplemental Volume Descriptor if (Joliet) extensions are acceptable. */ bool iso9660_fs_read_superblock (CdIo_t *p_cdio, iso_extension_mask_t iso_extension_mask) { if (!p_cdio) return false; { generic_img_private_t *p_env = (generic_img_private_t *) p_cdio->env; iso9660_pvd_t *p_pvd = &(p_env->pvd); iso9660_svd_t *p_svd = &(p_env->svd); char buf[CDIO_CD_FRAMESIZE_RAW] = { 0, }; driver_return_code_t driver_return; if ( !iso9660_fs_read_pvd(p_cdio, p_pvd) ) return false; p_env->i_joliet_level = 0; driver_return = cdio_read_data_sectors ( p_cdio, buf, ISO_PVD_SECTOR+1, ISO_BLOCKSIZE, 1 ); if (DRIVER_OP_SUCCESS == driver_return) { /* The size of a PVD or SVD is smaller than a sector. So we allocated a bigger block above (buf) and now we'll copy just the part we need to save. */ cdio_assert (sizeof(buf) >= sizeof (iso9660_svd_t)); memcpy(p_svd, buf, sizeof(iso9660_svd_t)); if ( ISO_VD_SUPPLEMENTARY == from_711(p_svd->type) ) { if (p_svd->escape_sequences[0] == 0x25 && p_svd->escape_sequences[1] == 0x2f) { switch (p_svd->escape_sequences[2]) { case 0x40: if (iso_extension_mask & ISO_EXTENSION_JOLIET_LEVEL1) p_env->i_joliet_level = 1; break; case 0x43: if (iso_extension_mask & ISO_EXTENSION_JOLIET_LEVEL2) p_env->i_joliet_level = 2; break; case 0x45: if (iso_extension_mask & ISO_EXTENSION_JOLIET_LEVEL3) p_env->i_joliet_level = 3; break; default: cdio_info("Supplementary Volume Descriptor found, but not Joliet"); } if (p_env->i_joliet_level > 0) { cdio_info("Found Extension: Joliet Level %d", p_env->i_joliet_level); } } } } } return true; } /*! Seek to a position and then read n blocks. Size read is returned. */ static long int iso9660_seek_read_framesize (const iso9660_t *p_iso, void *ptr, lsn_t start, long int size, uint16_t i_framesize) { long int ret; long int i_byte_offset; if (!p_iso) return 0; i_byte_offset = (start * p_iso->i_framesize) + p_iso->i_fuzzy_offset + p_iso->i_datastart; ret = cdio_stream_seek (p_iso->stream, i_byte_offset, SEEK_SET); if (ret!=0) return 0; return cdio_stream_read (p_iso->stream, ptr, i_framesize, size); } /*! Seek to a position and then read n blocks. Size read is returned. */ long int iso9660_iso_seek_read (const iso9660_t *p_iso, void *ptr, lsn_t start, long int size) { return iso9660_seek_read_framesize(p_iso, ptr, start, size, ISO_BLOCKSIZE); } static iso9660_stat_t * _iso9660_dir_to_statbuf (iso9660_dir_t *p_iso9660_dir, bool_3way_t b_xa, uint8_t i_joliet_level) { uint8_t dir_len= iso9660_get_dir_len(p_iso9660_dir); iso711_t i_fname; unsigned int stat_len; iso9660_stat_t *p_stat; if (!dir_len) return NULL; i_fname = from_711(p_iso9660_dir->filename_len); /* .. string in statbuf is one longer than in p_iso9660_dir's listing '\1' */ stat_len = sizeof(iso9660_stat_t)+i_fname+2; p_stat = calloc(1, stat_len); if (!p_stat) { cdio_warn("Couldn't calloc(1, %d)", stat_len); return NULL; } p_stat->type = (p_iso9660_dir->file_flags & ISO_DIRECTORY) ? _STAT_DIR : _STAT_FILE; p_stat->lsn = from_733 (p_iso9660_dir->extent); p_stat->size = from_733 (p_iso9660_dir->size); p_stat->secsize = _cdio_len2blocks (p_stat->size, ISO_BLOCKSIZE); p_stat->rr.b3_rock = dunno; /*FIXME should do based on mask */ p_stat->b_xa = false; { char rr_fname[256] = ""; int i_rr_fname = #ifdef HAVE_ROCK get_rock_ridge_filename(p_iso9660_dir, rr_fname, p_stat); #else 0; #endif if (i_rr_fname > 0) { if (i_rr_fname > i_fname) { /* realloc gives valgrind errors */ iso9660_stat_t *p_stat_new = calloc(1, sizeof(iso9660_stat_t)+i_rr_fname+2); if (!p_stat_new) { cdio_warn("Couldn't calloc(1, %zd)", sizeof(iso9660_stat_t)+i_rr_fname+2); return NULL; } memcpy(p_stat_new, p_stat, stat_len); free(p_stat); p_stat = p_stat_new; } strncpy(p_stat->filename, rr_fname, i_rr_fname+1); } else { if ('\0' == p_iso9660_dir->filename[0] && 1 == i_fname) strncpy (p_stat->filename, ".", sizeof(".")); else if ('\1' == p_iso9660_dir->filename[0] && 1 == i_fname) strncpy (p_stat->filename, "..", sizeof("..")); #ifdef HAVE_JOLIET else if (i_joliet_level) { int i_inlen = i_fname; cdio_utf8_t *p_psz_out = NULL; if (cdio_charset_to_utf8(p_iso9660_dir->filename, i_inlen, &p_psz_out, "UCS-2BE")) { strncpy(p_stat->filename, p_psz_out, i_fname); free(p_psz_out); } else { free(p_stat); return NULL; } } #endif /*HAVE_JOLIET*/ else { strncpy (p_stat->filename, p_iso9660_dir->filename, i_fname); } } } iso9660_get_dtime(&(p_iso9660_dir->recording_time), true, &(p_stat->tm)); if (dir_len < sizeof (iso9660_dir_t)) { free(p_stat->rr.psz_symlink); free(p_stat); return NULL; } { int su_length = iso9660_get_dir_len(p_iso9660_dir) - sizeof (iso9660_dir_t); su_length -= i_fname; if (su_length % 2) su_length--; if (su_length < 0 || su_length < sizeof (iso9660_xa_t)) return p_stat; if (nope == b_xa) { return p_stat; } else { iso9660_xa_t *xa_data = (void *) (((char *) p_iso9660_dir) + (iso9660_get_dir_len(p_iso9660_dir) - su_length)); cdio_log_level_t loglevel = (yep == b_xa) ? CDIO_LOG_WARN : CDIO_LOG_INFO; if (xa_data->signature[0] != 'X' || xa_data->signature[1] != 'A') { cdio_log (loglevel, "XA signature not found in ISO9660's system use area;" " ignoring XA attributes for this file entry."); cdio_debug ("%d %d %d, '%c%c' (%d, %d)", iso9660_get_dir_len(p_iso9660_dir), i_fname, su_length, xa_data->signature[0], xa_data->signature[1], xa_data->signature[0], xa_data->signature[1]); return p_stat; } p_stat->b_xa = true; p_stat->xa = *xa_data; } } return p_stat; } /*! Return the directory name stored in the iso9660_dir_t A string is allocated: the caller must deallocate. This routine can return NULL if memory allocation fails. */ char * iso9660_dir_to_name (const iso9660_dir_t *iso9660_dir) { uint8_t len=iso9660_get_dir_len(iso9660_dir); if (!len) return NULL; cdio_assert (len >= sizeof (iso9660_dir_t)); /* (iso9660_dir->file_flags & ISO_DIRECTORY) */ if (iso9660_dir->filename[0] == '\0') return strdup("."); else if (iso9660_dir->filename[0] == '\1') return strdup(".."); else { return strdup(iso9660_dir->filename); } } /* Return a pointer to a ISO 9660 stat buffer or NULL if there's an error */ static iso9660_stat_t * _fs_stat_root (CdIo_t *p_cdio) { if (!p_cdio) return NULL; { iso_extension_mask_t iso_extension_mask = ISO_EXTENSION_ALL; generic_img_private_t *p_env = (generic_img_private_t *) p_cdio->env; iso9660_dir_t *p_iso9660_dir; iso9660_stat_t *p_stat; bool_3way_t b_xa; if (!p_env->i_joliet_level) iso_extension_mask &= ~ISO_EXTENSION_JOLIET; /* FIXME try also with Joliet.*/ if ( !iso9660_fs_read_superblock (p_cdio, iso_extension_mask) ) { cdio_warn("Could not read ISO-9660 Superblock."); return NULL; } switch(cdio_get_discmode(p_cdio)) { case CDIO_DISC_MODE_CD_XA: b_xa = yep; break; case CDIO_DISC_MODE_CD_DATA: b_xa = nope; break; default: b_xa = dunno; } #ifdef HAVE_JOLIET p_iso9660_dir = p_env->i_joliet_level ? &(p_env->svd.root_directory_record) : &(p_env->pvd.root_directory_record) ; #else p_iso9660_dir = &(p_env->pvd.root_directory_record) ; #endif p_stat = _iso9660_dir_to_statbuf (p_iso9660_dir, b_xa, p_env->i_joliet_level); return p_stat; } } static iso9660_stat_t * _ifs_stat_root (iso9660_t *p_iso) { iso9660_stat_t *p_stat; iso9660_dir_t *p_iso9660_dir; #ifdef HAVE_JOLIET p_iso9660_dir = p_iso->i_joliet_level ? &(p_iso->svd.root_directory_record) : &(p_iso->pvd.root_directory_record) ; #else p_iso9660_dir = &(p_iso->pvd.root_directory_record) ; #endif p_stat = _iso9660_dir_to_statbuf (p_iso9660_dir, p_iso->b_xa, p_iso->i_joliet_level); return p_stat; } static iso9660_stat_t * _fs_stat_traverse (const CdIo_t *p_cdio, const iso9660_stat_t *_root, char **splitpath) { unsigned offset = 0; uint8_t *_dirbuf = NULL; iso9660_stat_t *p_stat; generic_img_private_t *p_env = (generic_img_private_t *) p_cdio->env; if (!splitpath[0]) { unsigned int len=sizeof(iso9660_stat_t) + strlen(_root->filename)+1; p_stat = calloc(1, len); memcpy(p_stat, _root, len); p_stat->rr.psz_symlink = calloc(1, p_stat->rr.i_symlink_max); memcpy(p_stat->rr.psz_symlink, _root->rr.psz_symlink, p_stat->rr.i_symlink_max); return p_stat; } if (_root->type == _STAT_FILE) return NULL; cdio_assert (_root->type == _STAT_DIR); if (_root->size != ISO_BLOCKSIZE * _root->secsize) { cdio_warn ("bad size for ISO9660 directory (%ud) should be (%lu)!", (unsigned) _root->size, (unsigned long int) ISO_BLOCKSIZE * _root->secsize); } _dirbuf = calloc(1, _root->secsize * ISO_BLOCKSIZE); if (!_dirbuf) { cdio_warn("Couldn't calloc(1, %d)", _root->secsize * ISO_BLOCKSIZE); return NULL; } if (cdio_read_data_sectors (p_cdio, _dirbuf, _root->lsn, ISO_BLOCKSIZE, _root->secsize)) return NULL; while (offset < (_root->secsize * ISO_BLOCKSIZE)) { iso9660_dir_t *p_iso9660_dir = (void *) &_dirbuf[offset]; iso9660_stat_t *p_stat; int cmp; if (!iso9660_get_dir_len(p_iso9660_dir)) { offset++; continue; } p_stat = _iso9660_dir_to_statbuf (p_iso9660_dir, dunno, p_env->i_joliet_level); cmp = strcmp(splitpath[0], p_stat->filename); if ( 0 != cmp && 0 == p_env->i_joliet_level && yep != p_stat->rr.b3_rock ) { char *trans_fname = NULL; unsigned int i_trans_fname=strlen(p_stat->filename); int trans_len; if (i_trans_fname) { trans_fname = calloc(1, i_trans_fname+1); if (!trans_fname) { cdio_warn("can't allocate %lu bytes", (long unsigned int) strlen(p_stat->filename)); free(p_stat); return NULL; } trans_len = iso9660_name_translate_ext(p_stat->filename, trans_fname, p_env->i_joliet_level); cmp = strcmp(splitpath[0], trans_fname); free(trans_fname); } } if (!cmp) { iso9660_stat_t *ret_stat = _fs_stat_traverse (p_cdio, p_stat, &splitpath[1]); free(p_stat->rr.psz_symlink); free(p_stat); free (_dirbuf); return ret_stat; } free(p_stat->rr.psz_symlink); free(p_stat); offset += iso9660_get_dir_len(p_iso9660_dir); } cdio_assert (offset == (_root->secsize * ISO_BLOCKSIZE)); /* not found */ free (_dirbuf); return NULL; } static iso9660_stat_t * _fs_iso_stat_traverse (iso9660_t *p_iso, const iso9660_stat_t *_root, char **splitpath) { unsigned offset = 0; uint8_t *_dirbuf = NULL; int ret; if (!splitpath[0]) { iso9660_stat_t *p_stat; unsigned int len=sizeof(iso9660_stat_t) + strlen(_root->filename)+1; p_stat = calloc(1, len); if (!p_stat) { cdio_warn("Couldn't calloc(1, %d)", len); return NULL; } memcpy(p_stat, _root, len); p_stat->rr.psz_symlink = calloc(1, p_stat->rr.i_symlink_max); memcpy(p_stat->rr.psz_symlink, _root->rr.psz_symlink, p_stat->rr.i_symlink_max); return p_stat; } if (_root->type == _STAT_FILE) return NULL; cdio_assert (_root->type == _STAT_DIR); if (_root->size != ISO_BLOCKSIZE * _root->secsize) { cdio_warn ("bad size for ISO9660 directory (%ud) should be (%lu)!", (unsigned) _root->size, (unsigned long int) ISO_BLOCKSIZE * _root->secsize); } _dirbuf = calloc(1, _root->secsize * ISO_BLOCKSIZE); if (!_dirbuf) { cdio_warn("Couldn't calloc(1, %d)", _root->secsize * ISO_BLOCKSIZE); return NULL; } ret = iso9660_iso_seek_read (p_iso, _dirbuf, _root->lsn, _root->secsize); if (ret!=ISO_BLOCKSIZE*_root->secsize) return NULL; while (offset < (_root->secsize * ISO_BLOCKSIZE)) { iso9660_dir_t *p_iso9660_dir = (void *) &_dirbuf[offset]; iso9660_stat_t *p_stat; int cmp; if (!iso9660_get_dir_len(p_iso9660_dir)) { offset++; continue; } p_stat = _iso9660_dir_to_statbuf (p_iso9660_dir, p_iso->b_xa, p_iso->i_joliet_level); cmp = strcmp(splitpath[0], p_stat->filename); if ( 0 != cmp && 0 == p_iso->i_joliet_level && yep != p_stat->rr.b3_rock ) { char *trans_fname = NULL; unsigned int i_trans_fname=strlen(p_stat->filename); int trans_len; if (i_trans_fname) { trans_fname = calloc(1, i_trans_fname+1); if (!trans_fname) { cdio_warn("can't allocate %lu bytes", (long unsigned int) strlen(p_stat->filename)); free(p_stat); return NULL; } trans_len = iso9660_name_translate_ext(p_stat->filename, trans_fname, p_iso->i_joliet_level); cmp = strcmp(splitpath[0], trans_fname); free(trans_fname); } } if (!cmp) { iso9660_stat_t *ret_stat = _fs_iso_stat_traverse (p_iso, p_stat, &splitpath[1]); free(p_stat->rr.psz_symlink); free(p_stat); free (_dirbuf); return ret_stat; } free(p_stat->rr.psz_symlink); free(p_stat); offset += iso9660_get_dir_len(p_iso9660_dir); } cdio_assert (offset == (_root->secsize * ISO_BLOCKSIZE)); /* not found */ free (_dirbuf); return NULL; } /*! Get file status for psz_path into stat. NULL is returned on error. */ iso9660_stat_t * iso9660_fs_stat (CdIo_t *p_cdio, const char psz_path[]) { iso9660_stat_t *p_root; char **p_psz_splitpath; iso9660_stat_t *p_stat; if (!p_cdio) return NULL; if (!psz_path) return NULL; p_root = _fs_stat_root (p_cdio); if (!p_root) return NULL; p_psz_splitpath = _cdio_strsplit (psz_path, '/'); p_stat = _fs_stat_traverse (p_cdio, p_root, p_psz_splitpath); free(p_root); _cdio_strfreev (p_psz_splitpath); return p_stat; } typedef iso9660_stat_t * (stat_root_t) (void *p_image); typedef iso9660_stat_t * (stat_traverse_t) (const void *p_image, const iso9660_stat_t *_root, char **splitpath); /*! Get file status for psz_path into stat. NULL is returned on error. pathname version numbers in the ISO 9660 name are dropped, i.e. ;1 is removed and if level 1 ISO-9660 names are lowercased. */ static iso9660_stat_t * fs_stat_translate (void *p_image, stat_root_t stat_root, stat_traverse_t stat_traverse, const char psz_path[]) { iso9660_stat_t *p_root; char **p_psz_splitpath; iso9660_stat_t *p_stat; if (!p_image) return NULL; if (!psz_path) return NULL; p_root = stat_root (p_image); if (!p_root) return NULL; p_psz_splitpath = _cdio_strsplit (psz_path, '/'); p_stat = stat_traverse (p_image, p_root, p_psz_splitpath); free(p_root); _cdio_strfreev (p_psz_splitpath); return p_stat; } iso9660_stat_t * iso9660_fs_stat_translate (CdIo_t *p_cdio, const char psz_path[], bool b_mode2) { return fs_stat_translate(p_cdio, (stat_root_t *) _fs_stat_root, (stat_traverse_t *) _fs_stat_traverse, psz_path); } /*! Get file status for psz_path into stat. NULL is returned on error. pathname version numbers in the ISO 9660 name are dropped, i.e. ;1 is removed and if level 1 ISO-9660 names are lowercased. */ iso9660_stat_t * iso9660_ifs_stat_translate (iso9660_t *p_iso, const char psz_path[]) { return fs_stat_translate(p_iso, (stat_root_t *) _ifs_stat_root, (stat_traverse_t *) _fs_iso_stat_traverse, psz_path); } /*! Get file status for psz_path into stat. NULL is returned on error. */ iso9660_stat_t * iso9660_ifs_stat (iso9660_t *p_iso, const char psz_path[]) { iso9660_stat_t *p_root; char **splitpath; iso9660_stat_t *stat; if (!p_iso) return NULL; if (!psz_path) return NULL; p_root = _ifs_stat_root (p_iso); if (!p_root) return NULL; splitpath = _cdio_strsplit (psz_path, '/'); stat = _fs_iso_stat_traverse (p_iso, p_root, splitpath); free(p_root); _cdio_strfreev (splitpath); return stat; } /*! Read psz_path (a directory) and return a list of iso9660_stat_t of the files inside that. The caller must free the returned result. b_mode2 is historical. It is not used. */ CdioList_t * iso9660_fs_readdir (CdIo_t *p_cdio, const char psz_path[], bool b_mode2) { generic_img_private_t *p_env; iso9660_stat_t *p_stat; if (!p_cdio) return NULL; if (!psz_path) return NULL; p_env = (generic_img_private_t *) p_cdio->env; p_stat = iso9660_fs_stat (p_cdio, psz_path); if (!p_stat) return NULL; if (p_stat->type != _STAT_DIR) { free(p_stat->rr.psz_symlink); free(p_stat); return NULL; } { unsigned offset = 0; uint8_t *_dirbuf = NULL; CdioList_t *retval = _cdio_list_new (); if (p_stat->size != ISO_BLOCKSIZE * p_stat->secsize) { cdio_warn ("bad size for ISO9660 directory (%ud) should be (%lu)!", (unsigned) p_stat->size, (unsigned long int) ISO_BLOCKSIZE * p_stat->secsize); } _dirbuf = calloc(1, p_stat->secsize * ISO_BLOCKSIZE); if (!_dirbuf) { cdio_warn("Couldn't calloc(1, %d)", p_stat->secsize * ISO_BLOCKSIZE); return NULL; } if (cdio_read_data_sectors (p_cdio, _dirbuf, p_stat->lsn, ISO_BLOCKSIZE, p_stat->secsize)) return NULL; while (offset < (p_stat->secsize * ISO_BLOCKSIZE)) { iso9660_dir_t *p_iso9660_dir = (void *) &_dirbuf[offset]; iso9660_stat_t *p_iso9660_stat; if (!iso9660_get_dir_len(p_iso9660_dir)) { offset++; continue; } p_iso9660_stat = _iso9660_dir_to_statbuf(p_iso9660_dir, dunno, p_env->i_joliet_level); _cdio_list_append (retval, p_iso9660_stat); offset += iso9660_get_dir_len(p_iso9660_dir); } cdio_assert (offset == (p_stat->secsize * ISO_BLOCKSIZE)); free (_dirbuf); free (p_stat); return retval; } } /*! Read psz_path (a directory) and return a list of iso9660_stat_t of the files inside that. The caller must free the returned result. */ CdioList_t * iso9660_ifs_readdir (iso9660_t *p_iso, const char psz_path[]) { iso9660_stat_t *p_stat; if (!p_iso) return NULL; if (!psz_path) return NULL; p_stat = iso9660_ifs_stat (p_iso, psz_path); if (!p_stat) return NULL; if (p_stat->type != _STAT_DIR) { free(p_stat->rr.psz_symlink); free(p_stat); return NULL; } { long int ret; unsigned offset = 0; uint8_t *_dirbuf = NULL; CdioList_t *retval = _cdio_list_new (); if (p_stat->size != ISO_BLOCKSIZE * p_stat->secsize) { cdio_warn ("bad size for ISO9660 directory (%ud) should be (%lu)!", (unsigned int) p_stat->size, (unsigned long int) ISO_BLOCKSIZE * p_stat->secsize); } _dirbuf = calloc(1, p_stat->secsize * ISO_BLOCKSIZE); if (!_dirbuf) { cdio_warn("Couldn't calloc(1, %d)", p_stat->secsize * ISO_BLOCKSIZE); return NULL; } ret = iso9660_iso_seek_read (p_iso, _dirbuf, p_stat->lsn, p_stat->secsize); if (ret != ISO_BLOCKSIZE*p_stat->secsize) return NULL; while (offset < (p_stat->secsize * ISO_BLOCKSIZE)) { iso9660_dir_t *p_iso9660_dir = (void *) &_dirbuf[offset]; iso9660_stat_t *p_iso9660_stat; if (!iso9660_get_dir_len(p_iso9660_dir)) { offset++; continue; } p_iso9660_stat = _iso9660_dir_to_statbuf(p_iso9660_dir, p_iso->b_xa, p_iso->i_joliet_level); if (p_iso9660_stat) _cdio_list_append (retval, p_iso9660_stat); offset += iso9660_get_dir_len(p_iso9660_dir); } free (_dirbuf); if (offset != (p_stat->secsize * ISO_BLOCKSIZE)) { free (p_stat); _cdio_list_free (retval, true); return NULL; } free (p_stat); return retval; } } typedef CdioList_t * (iso9660_readdir_t) (void *p_image, const char * psz_path); static iso9660_stat_t * find_lsn_recurse (void *p_image, iso9660_readdir_t iso9660_readdir, const char psz_path[], lsn_t lsn, /*out*/ char **ppsz_full_filename) { CdioList_t *entlist = iso9660_readdir (p_image, psz_path); CdioList_t *dirlist = _cdio_list_new (); CdioListNode_t *entnode; cdio_assert (entlist != NULL); /* iterate over each entry in the directory */ _CDIO_LIST_FOREACH (entnode, entlist) { iso9660_stat_t *statbuf = _cdio_list_node_data (entnode); const char *psz_filename = (char *) statbuf->filename; const unsigned int len = strlen(psz_path) + strlen(psz_filename)+2; if (*ppsz_full_filename != NULL) free(*ppsz_full_filename); *ppsz_full_filename = calloc(1, len); snprintf (*ppsz_full_filename, len, "%s%s/", psz_path, psz_filename); if (statbuf->type == _STAT_DIR && strcmp ((char *) statbuf->filename, ".") && strcmp ((char *) statbuf->filename, "..")) { _cdio_list_append (dirlist, strdup(*ppsz_full_filename)); } if (statbuf->lsn == lsn) { unsigned int len=sizeof(iso9660_stat_t)+strlen(statbuf->filename)+1; iso9660_stat_t *ret_stat = calloc(1, len); if (!ret_stat) { cdio_warn("Couldn't calloc(1, %d)", len); return NULL; } memcpy(ret_stat, statbuf, len); _cdio_list_free (entlist, true); _cdio_list_free (dirlist, true); return ret_stat; } } _cdio_list_free (entlist, true); /* now recurse/descend over directories encountered */ _CDIO_LIST_FOREACH (entnode, dirlist) { char *psz_path_prefix = _cdio_list_node_data (entnode); iso9660_stat_t *ret_stat; free(*ppsz_full_filename); *ppsz_full_filename = NULL; ret_stat = find_lsn_recurse (p_image, iso9660_readdir, psz_path_prefix, lsn, ppsz_full_filename); if (NULL != ret_stat) { _cdio_list_free (dirlist, true); return ret_stat; } } if (*ppsz_full_filename != NULL) { free(*ppsz_full_filename); *ppsz_full_filename = NULL; } _cdio_list_free (dirlist, true); return NULL; } /*! Given a directory pointer, find the filesystem entry that contains lsn and return information about it. Returns stat_t of entry if we found lsn, or NULL otherwise. */ iso9660_stat_t * iso9660_fs_find_lsn(CdIo_t *p_cdio, lsn_t i_lsn) { char *psz_full_filename = NULL; return find_lsn_recurse (p_cdio, (iso9660_readdir_t *) iso9660_fs_readdir, "/", i_lsn, &psz_full_filename); } /*! Given a directory pointer, find the filesystem entry that contains lsn and return information about it. Returns stat_t of entry if we found lsn, or NULL otherwise. */ iso9660_stat_t * iso9660_fs_find_lsn_with_path(CdIo_t *p_cdio, lsn_t i_lsn, /*out*/ char **ppsz_full_filename) { return find_lsn_recurse (p_cdio, (iso9660_readdir_t *) iso9660_fs_readdir, "/", i_lsn, ppsz_full_filename); } /*! Given a directory pointer, find the filesystem entry that contains lsn and return information about it. Returns stat_t of entry if we found lsn, or NULL otherwise. */ iso9660_stat_t * iso9660_ifs_find_lsn(iso9660_t *p_iso, lsn_t i_lsn) { char *psz_full_filename = NULL; return find_lsn_recurse (p_iso, (iso9660_readdir_t *) iso9660_ifs_readdir, "/", i_lsn, &psz_full_filename); } /*! Given a directory pointer, find the filesystem entry that contains lsn and return information about it. Returns stat_t of entry if we found lsn, or NULL otherwise. */ iso9660_stat_t * iso9660_ifs_find_lsn_with_path(iso9660_t *p_iso, lsn_t i_lsn, /*out*/ char **ppsz_full_filename) { return find_lsn_recurse (p_iso, (iso9660_readdir_t *) iso9660_ifs_readdir, "/", i_lsn, ppsz_full_filename); } /*! Return true if ISO 9660 image has extended attrributes (XA). */ bool iso9660_ifs_is_xa (const iso9660_t * p_iso) { if (!p_iso) return false; return yep == p_iso->b_xa; } libcdio-0.83/lib/iso9660/xa.c0000644000175000017500000001170311650124661012437 00000000000000/* Copyright (C) 2003, 2005, 2008, 2011 Rocky Bernstein Copyright (C) 2000 Herbert Valerio Riedel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_SYS_STAT_H #include #endif /*! String inside frame which identifies XA attributes. Note should come *before* public headers which does a #define of this name. */ const char ISO_XA_MARKER_STRING[] = {'C', 'D', '-', 'X', 'A', '0', '0', '1'}; /* Public headers */ #include #include #include /* Private headers */ #include "cdio_assert.h" /** The below variable is trickery to force enum symbol values to be recorded in debug symbol tables. It is used to allow one to refer to the enumeration value names in the typedefs above in a debugger and debugger expressions. */ xa_misc_enum_t debugger_xa_misc_enum; #define BUF_COUNT 16 #define BUF_SIZE 80 /* Return a pointer to a internal free buffer */ static char * _getbuf (void) { static char _buf[BUF_COUNT][BUF_SIZE]; static int _num = -1; _num++; _num %= BUF_COUNT; memset (_buf[_num], 0, BUF_SIZE); return _buf[_num]; } /*! Returns a string which interpreting the extended attribute xa_attr. For example: \verbatim d---1xrxrxr ---2--r-r-r -a--1xrxrxr \endverbatim A description of the characters in the string follows The 1st character is either "d" if the entry is a directory, or "-" if not. The 2nd character is either "a" if the entry is CDDA (audio), or "-" if not. The 3rd character is either "i" if the entry is interleaved, or "-" if not. The 4th character is either "2" if the entry is mode2 form2 or "-" if not. The 5th character is either "1" if the entry is mode2 form1 or "-" if not. Note that an entry will either be in mode2 form1 or mode form2. That is you will either see "2-" or "-1" in the 4th & 5th positions. The 6th and 7th characters refer to permissions for a user while the the 8th and 9th characters refer to permissions for a group while, and the 10th and 11th characters refer to permissions for a others. In each of these pairs the first character (6, 8, 10) is "x" if the entry is executable. For a directory this means the directory is allowed to be listed or "searched". The second character of a pair (7, 9, 11) is "r" if the entry is allowed to be read. */ const char * iso9660_get_xa_attr_str (uint16_t xa_attr) { char *result = _getbuf(); xa_attr = uint16_from_be (xa_attr); result[ 0] = (xa_attr & XA_ATTR_DIRECTORY) ? 'd' : '-'; result[ 1] = (xa_attr & XA_ATTR_CDDA) ? 'a' : '-'; result[ 2] = (xa_attr & XA_ATTR_INTERLEAVED) ? 'i' : '-'; result[ 3] = (xa_attr & XA_ATTR_MODE2FORM2) ? '2' : '-'; result[ 4] = (xa_attr & XA_ATTR_MODE2FORM1) ? '1' : '-'; result[ 5] = (xa_attr & XA_PERM_XUSR) ? 'x' : '-'; result[ 6] = (xa_attr & XA_PERM_RUSR) ? 'r' : '-'; result[ 7] = (xa_attr & XA_PERM_XGRP) ? 'x' : '-'; result[ 8] = (xa_attr & XA_PERM_RGRP) ? 'r' : '-'; /* Hack alert: wonder if this should be ROTH and XOTH? */ result[ 9] = (xa_attr & XA_PERM_XSYS) ? 'x' : '-'; result[10] = (xa_attr & XA_PERM_RSYS) ? 'r' : '-'; result[11] = '\0'; return result; } iso9660_xa_t * iso9660_xa_init (iso9660_xa_t *_xa, uint16_t uid, uint16_t gid, uint16_t attr, uint8_t filenum) { cdio_assert (_xa != NULL); _xa->user_id = uint16_to_be (uid); _xa->group_id = uint16_to_be (gid); _xa->attributes = uint16_to_be (attr); _xa->signature[0] = 'X'; _xa->signature[1] = 'A'; _xa->filenum = filenum; _xa->reserved[0] = _xa->reserved[1] = _xa->reserved[2] = _xa->reserved[3] = _xa->reserved[4] = 0x00; return _xa; } /*! Returns POSIX mode bitstring for a given file. */ posix_mode_t iso9660_get_posix_filemode_from_xa(uint16_t i_perms) { posix_mode_t mode = 0; if (i_perms & XA_PERM_RUSR) mode |= S_IRUSR; if (i_perms & XA_PERM_XUSR) mode |= S_IXUSR; #ifdef S_IRGRP if (i_perms & XA_PERM_RGRP) mode |= S_IRGRP; #endif #ifdef S_IXGRP if (i_perms & XA_PERM_XGRP) mode |= S_IXGRP; #endif #ifdef S_IROTH if (i_perms & XA_PERM_ROTH) mode |= S_IROTH; #endif #ifdef S_IXOTH if (i_perms & XA_PERM_XOTH) mode |= S_IXOTH; #endif if (i_perms & XA_ATTR_DIRECTORY) mode |= S_IFDIR; return mode; } libcdio-0.83/lib/iso9660/iso9660_private.h0000644000175000017500000000455611650124534014714 00000000000000/* Copyright (C) 2003, 2004, 2005, 2008, 2011 Rocky Bernstein Copyright (C) 2000 Herbert Valerio Riedel See also iso9660.h by Eric Youngdale (1993). Copyright 1993 Yggdrasil Computing, Incorporated Copyright (c) 1999,2000 J. Schilling This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef __CDIO_ISO9660_PRIVATE_H__ #define __CDIO_ISO9660_PRIVATE_H__ #if defined(HAVE_CONFIG_H) && !defined(__CDIO_CONFIG_H__) # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #define ISO_VERSION 1 PRAGMA_BEGIN_PACKED typedef struct iso_volume_descriptor_s { uint8_t type; /**< 7.1.1 */ char id[5]; /**< "CD001" (ISO_STANDARD_ID) */ uint8_t version; /**< 7.1.1 */ char data[2041]; } GNUC_PACKED iso_volume_descriptor_t; #define iso_volume_descriptor_t_SIZEOF ISO_BLOCKSIZE #define iso9660_pvd_t_SIZEOF ISO_BLOCKSIZE /* * XXX JS: The next structure has an odd length! * Some compilers (e.g. on Sun3/mc68020) padd the structures to even length. * For this reason, we cannot use sizeof (struct iso_path_table) or * sizeof (struct iso_directory_record) to compute on disk sizes. * Instead, we use offsetof(..., name) and add the name size. * See mkisofs.h */ /** We use this to help us look up the parent inode numbers. */ typedef struct iso_path_table_s { uint8_t name_len; /**< 7.1.1 */ uint8_t xa_len; /**< 7.1.1 */ uint32_t extent; /**< 7.3.1/7.3.2 */ uint16_t parent; /**< 7.2.1/7.2.2 */ char name[EMPTY_ARRAY_SIZE]; } GNUC_PACKED iso_path_table_t; #define iso_path_table_t_SIZEOF 8 #define iso9660_dir_t_SIZEOF 33 PRAGMA_END_PACKED #endif /* __CDIO_ISO9660_PRIVATE_H__ */ /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/lib/iso9660/Makefile.in0000644000175000017500000006176111652210027013733 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Id: Makefile.am,v 1.18 2008/10/20 01:25:15 rocky Exp $ # # Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 # Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ######################################################## # Things to make the libiso9660 library ######################################################## # # From libtool documentation amended with guidance from N. Boullis: # # 1. Start with version information of `0:0:0' for each libtool library. # # 2. It is probably not a good idea to update the version information # several times between public releases, but rather once per public # release. (This seems to be more an aesthetic consideration than # a hard technical one.) # # 3. If the library source code has changed at all since the last # update, then increment REVISION (`C:R:A' becomes `C:R+1:A'). # # 4. If any interfaces have been added, removed, or changed since the # last update, increment CURRENT, and set REVISION to 0. # # 5. If any interfaces have been added since the last public release, # then increment AGE. # # 6. If any interfaces have been removed or changed since the last # public release, then set AGE to 0. A changed interface means an # incompatibility with previous versions. VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = lib/iso9660 DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__libiso9660_la_SOURCES_DIST = iso9660.c iso9660_private.h \ iso9660_fs.c rock.c xa.c @ENABLE_ROCK_TRUE@am__objects_1 = rock.lo am_libiso9660_la_OBJECTS = iso9660.lo iso9660_fs.lo $(am__objects_1) \ xa.lo libiso9660_la_OBJECTS = $(am_libiso9660_la_OBJECTS) libiso9660_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libiso9660_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libiso9660_la_SOURCES) DIST_SOURCES = $(am__libiso9660_la_SOURCES_DIST) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDDA_PLAYER_LIBS = @CDDA_PLAYER_LIBS@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CDPARANOIA_NAME = @CDPARANOIA_NAME@ CFLAGS = @CFLAGS@ CMP = @CMP@ COS_LIB = @COS_LIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_PKG_LIB_HACK = @DARWIN_PKG_LIB_HACK@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ DIFF_OPTS = @DIFF_OPTS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GIT2CL = @GIT2CL@ GREP = @GREP@ HAVE_BSDI_CDROM = @HAVE_BSDI_CDROM@ HAVE_DARWIN_CDROM = @HAVE_DARWIN_CDROM@ HAVE_FREEBSD_CDROM = @HAVE_FREEBSD_CDROM@ HAVE_JOLIET = @HAVE_JOLIET@ HAVE_LINUX_CDROM = @HAVE_LINUX_CDROM@ HAVE_OS2_CDROM = @HAVE_OS2_CDROM@ HAVE_ROCK = @HAVE_ROCK@ HAVE_SOLARIS_CDROM = @HAVE_SOLARIS_CDROM@ HAVE_WIN32_CDROM = @HAVE_WIN32_CDROM@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDIOPP_LIBS = @LIBCDIOPP_LIBS@ LIBCDIO_CDDA_LIBS = @LIBCDIO_CDDA_LIBS@ LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ LIBCDIO_DEPS = @LIBCDIO_DEPS@ LIBCDIO_LIBS = @LIBCDIO_LIBS@ LIBCDIO_PARANOIA_LIBS = @LIBCDIO_PARANOIA_LIBS@ LIBCDIO_SOURCE_PATH = @LIBCDIO_SOURCE_PATH@ LIBCDIO_VERSION_NUM = @LIBCDIO_VERSION_NUM@ LIBICONV = @LIBICONV@ LIBISO9660PP_LIBS = @LIBISO9660PP_LIBS@ LIBISO9660_CFLAGS = @LIBISO9660_CFLAGS@ LIBISO9660_LIBS = @LIBISO9660_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBUDF_LIBS = @LIBUDF_LIBS@ LINUX_CDROM_TIMEOUT = @LINUX_CDROM_TIMEOUT@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_NO_UNDEFINED = @LT_NO_UNDEFINED@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OLD_CDPARANOIA = @OLD_CDPARANOIA@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SBPCD_H = @SBPCD_H@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TYPESIZES = @TYPESIZES@ UCDROM_H = @UCDROM_H@ VCDINFO_CFLAGS = @VCDINFO_CFLAGS@ VCDINFO_LIBS = @VCDINFO_LIBS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ libiso9660_la_CURRENT = 8 libiso9660_la_REVISION = 0 libiso9660_la_AGE = 0 EXTRA_DIST = libiso9660.sym noinst_HEADERS = iso9660_private.h lib_LTLIBRARIES = libiso9660.la @ENABLE_ROCK_FALSE@rock_src = @ENABLE_ROCK_TRUE@rock_src = rock.c libiso9660_la_SOURCES = \ iso9660.c \ iso9660_private.h \ iso9660_fs.c \ $(rock_src) \ xa.c libiso9660_la_LIBADD = @LIBCDIO_LIBS@ libiso9660_la_ldflags = -version-info $(libiso9660_la_CURRENT):$(libiso9660_la_REVISION):$(libiso9660_la_AGE) @LT_NO_UNDEFINED@ libiso9660_la_dependencies = $(top_builddir)/lib/driver/libcdio.la INCLUDES = $(LIBCDIO_CFLAGS) ######################################################## # Things to version the symbols in the libraries ######################################################## # An explanation of the versioning problem from Nicolas Boullis and # the versioned symbol solution he uses below... # # Currently, libvcdinfo uses the cdio_open function from libcdio. # Let's imagine a program foobar that uses both the vcdinfo_open # function from libvcdinfo and the cdio_open function from libcdio. # Currently, libcdio has SONAME libcdio.so.0, libvcdinfo has SONAME # libvcdinfo.so.0 and requires libcdio.so.0, and foobar requires both # libvcdinfo.so.0 and libcdio.so.0. Everything looks fine. # # Now, for some reason, you decide to change the cdio_open function. # That's your right, but you have to bump the CURRENT version and (if I # understand it correctly, athough this is not that clear in libtool's # documentation) set the AGE to 0. Anyway, this bumps the SONAME, which is # sane since the interface changes incompatibly. # Now, you have a new libcdio with SONAME libcdio.so.1. But libvcdinfo and # foobar still require libcdio.so.0. Everything is still fine. # Now, after some minor changes, the author of foobar recompiles foobar. # Then, foobar now requires libvcdinfo.so.0 and libcdio.so.1. And foobar # now segfaults... # What is happening? When you run foobar, if brings both libvcdinfo.so.0 # and libcdio.so.1, but libvcdinfo.so.0 also brings libcdio.so.0. So you # have both libcdio.so.0 and libcdio.so.1 that bring their symbols to the # global namespace. Hence, you have to incompatible versions of the # cdio_open function in the name space. When foobar calls cdio_open, it # may choose the wrong function, and segfaults... # With versioned symbols, the cdio_open function from libcdio.so.0 may be # known as (something that looks like) cdio_open@@CDIO_0. An the cdio_open # function from libcdio.so.1 as cdio_open@@CDIO_1. Both versions of # libcdio would still be brought in by the most recent foobar, but foobar # (and libvcdinfo) know which versioned function to use and then use the # good one. # This is some simple versioning where every symbol is versioned with # something that looks like the SONAME of the library. More complex (and # better) versioning is possible; it is for example what is used by glibc. # But good complex versioning is something that requires much more # work... # The below is a impliments symbol versioning. First of all, I # compute MAJOR as CURENT - AGE; that is what is used within libtool # (at least on GNU/Linux systems) for the number in the SONAME. The # nm command gives the list of symbols known in each of the object # files that will be part of the shared library. And the sed command # extracts from this list those symbols that will be shared. (This sed # command comes from libtool.) libiso9660_la_MAJOR = $(shell expr $(libiso9660_la_CURRENT) - $(libiso9660_la_AGE)) @BUILD_VERSIONED_LIBS_FALSE@libiso9660_la_LDFLAGS = $(libiso9660_la_ldflags) @BUILD_VERSIONED_LIBS_TRUE@libiso9660_la_LDFLAGS = $(libiso9660_la_ldflags) -Wl,--version-script=libiso9660.la.ver @BUILD_VERSIONED_LIBS_FALSE@libiso9660_la_DEPENDENCIES = $(libcdio9660_la_dependencies) @BUILD_VERSIONED_LIBS_TRUE@libiso9660_la_DEPENDENCIES = $(libcdio9660_la_dependencies) libiso9660.la.ver @BUILD_VERSIONED_LIBS_TRUE@MOSTLYCLEANFILES = libiso9660.la.ver all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/iso9660/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/iso9660/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libiso9660.la: $(libiso9660_la_OBJECTS) $(libiso9660_la_DEPENDENCIES) $(libiso9660_la_LINK) -rpath $(libdir) $(libiso9660_la_OBJECTS) $(libiso9660_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iso9660.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iso9660_fs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rock.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xa.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES @BUILD_VERSIONED_LIBS_TRUE@libiso9660.la.ver: $(libiso9660_la_OBJECTS) $(srcdir)/libiso9660.sym @BUILD_VERSIONED_LIBS_TRUE@ echo 'ISO9660_$(libiso9660_la_MAJOR) {' > $@ @BUILD_VERSIONED_LIBS_TRUE@ objs=`for obj in $(libiso9660_la_OBJECTS); do sed -ne "s/^pic_object='\(.*\)'$$/\1/p" $$obj; done`; @BUILD_VERSIONED_LIBS_TRUE@ if test -n "$$objs" ; then \ @BUILD_VERSIONED_LIBS_TRUE@ nm $${objs} | sed -n -e 's/^.*[ ][ABCDGIRSTW][ABCDGIRSTW]*[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$$/\1/p' | sort -u | { first=true; while read symbol; do if grep -q "^$${symbol}\$$" $(srcdir)/libiso9660.sym; then if test $$first = true; then echo " global:"; first=false; fi; echo " $${symbol};"; fi; done; } >> $@; \ @BUILD_VERSIONED_LIBS_TRUE@ nm $${objs} | sed -n -e 's/^.*[ ][ABCDGIRSTW][ABCDGIRSTW]*[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$$/\1/p' | sort -u | { first=true; while read symbol; do if grep -q "^$${symbol}\$$" $(srcdir)/libiso9660.sym; then :; else if test $$first = true; then echo " local:"; first=false; fi; echo " $${symbol};"; fi; done; } >> $@; \ @BUILD_VERSIONED_LIBS_TRUE@ fi @BUILD_VERSIONED_LIBS_TRUE@ echo '};' >> $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libcdio-0.83/lib/driver/0000755000175000017500000000000011652210414012107 500000000000000libcdio-0.83/lib/driver/_cdio_stream.c0000644000175000017500000001255411650122623014634 00000000000000/* Copyright (C) 2005, 2006, 2008, 2011 Rocky Bernstein Copyright (C) 2000, 2004, 2005 Herbert Valerio Riedel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #include #include #include "cdio_assert.h" /* #define STREAM_DEBUG */ #include #include #include "_cdio_stream.h" static const char _rcsid[] = "$Id: _cdio_stream.c,v 1.9 2008/04/22 15:29:11 karl Exp $"; /* * DataSource implementations */ struct _CdioDataSource { void* user_data; cdio_stream_io_functions op; int is_open; long position; }; void cdio_stream_close(CdioDataSource_t *p_obj) { if (!p_obj) return; if (p_obj->is_open) { cdio_debug ("closed source..."); p_obj->op.close(p_obj->user_data); p_obj->is_open = 0; p_obj->position = 0; } } void cdio_stream_destroy(CdioDataSource_t *p_obj) { if (!p_obj) return; cdio_stream_close(p_obj); p_obj->op.free(p_obj->user_data); free(p_obj); } /** Like 3 fgetpos. This function gets the current file position indicator for the stream pointed to by stream. @return unpon successful completion, return value is positive, else, the global variable errno is set to indicate the error. */ ssize_t cdio_stream_getpos(CdioDataSource_t* p_obj, /*out*/ ssize_t *i_offset) { if (!p_obj || !p_obj->is_open) return DRIVER_OP_UNINIT; return *i_offset = p_obj->position; } CdioDataSource_t * cdio_stream_new(void *user_data, const cdio_stream_io_functions *funcs) { CdioDataSource_t *new_obj; new_obj = calloc (1, sizeof (CdioDataSource_t)); new_obj->user_data = user_data; memcpy(&(new_obj->op), funcs, sizeof(cdio_stream_io_functions)); return new_obj; } /* Open if not already open. Return false if we hit an error. Errno should be set for that error. */ static bool _cdio_stream_open_if_necessary(CdioDataSource_t *p_obj) { if (!p_obj) return false; if (!p_obj->is_open) { if (p_obj->op.open(p_obj->user_data)) { cdio_warn ("could not open input stream..."); return false; } else { cdio_debug ("opened source..."); p_obj->is_open = 1; p_obj->position = 0; } } return true; } /** Like fread(3) and in fact may be the same. DESCRIPTION: The function fread reads nmemb elements of data, each size bytes long, from the stream pointed to by stream, storing them at the location given by ptr. RETURN VALUE: return the number of items successfully read or written (i.e., not the number of characters). If an error occurs, or the end-of-file is reached, the return value is a short item count (or zero). We do not distinguish between end-of-file and error, and callers must use feof(3) and ferror(3) to determine which occurred. */ ssize_t cdio_stream_read(CdioDataSource_t* p_obj, void *ptr, long size, long nmemb) { long read_bytes; if (!p_obj) return 0; if (!_cdio_stream_open_if_necessary(p_obj)) return 0; read_bytes = (p_obj->op.read)(p_obj->user_data, ptr, size*nmemb); p_obj->position += read_bytes; return read_bytes; } /** Like 3 fseek and in fact may be the same. This function sets the file position indicator for the stream pointed to by stream. The new position, measured in bytes, is obtained by adding offset bytes to the position specified by whence. If whence is set to SEEK_SET, SEEK_CUR, or SEEK_END, the offset is relative to the start of the file, the current position indicator, or end-of-file, respectively. A successful call to the fseek function clears the end- of-file indicator for the stream and undoes any effects of the ungetc(3) function on the same stream. @return unpon successful completion, return value is positive, else, the global variable errno is set to indicate the error. */ ssize_t cdio_stream_seek(CdioDataSource_t* p_obj, ssize_t offset, int whence) { if (!p_obj) return DRIVER_OP_UNINIT; if (!_cdio_stream_open_if_necessary(p_obj)) /* errno is set by _cdio_stream_open_if necessary. */ return DRIVER_OP_ERROR; if (offset < 0) return DRIVER_OP_ERROR; if (p_obj->position != offset) { #ifdef STREAM_DEBUG cdio_warn("had to reposition DataSource from %ld to %ld!", obj->position, offset); #endif p_obj->position = offset; return p_obj->op.seek(p_obj->user_data, offset, whence); } return 0; } /** Return whatever size of stream reports, I guess unit size is bytes. On error return -1; */ ssize_t cdio_stream_stat(CdioDataSource_t *p_obj) { if (!p_obj) return -1; if (!_cdio_stream_open_if_necessary(p_obj)) return -1; return p_obj->op.stat(p_obj->user_data); } /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/lib/driver/MSWindows/0000755000175000017500000000000011652210414014001 500000000000000libcdio-0.83/lib/driver/MSWindows/aspi32.c0000644000175000017500000005527611650125632015212 00000000000000/* Copyright (C) 2004, 2005, 2008, 2009, 2010, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* This file contains Win32-specific code and implements low-level control of the CD drive via the ASPI API. Inspired by vlc's cdrom.h code */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #include #include #include "cdio_assert.h" #include #ifdef HAVE_WIN32_CDROM #include #include #include #include #include #include #include #include "win32.h" #include #include #include "aspi32.h" #include "cdtext_private.h" /* Amount of time we are willing to wait for an operation to complete. 10 seconds? */ #define OP_TIMEOUT_MS 10000 static const char *aspierror(int nErrorCode) { switch (nErrorCode) { case SS_PENDING: return "SRB being processed"; break; case SS_COMP: return "SRB completed without error"; break; case SS_ABORTED: return "SRB aborted"; break; case SS_ABORT_FAIL: return "Unable to abort SRB"; break; case SS_ERR: return "SRB completed with error"; break; case SS_INVALID_CMD: return "Invalid ASPI command"; break; case SS_INVALID_HA: return "Invalid host adapter number"; break; case SS_NO_DEVICE: return "SCSI device not installed"; break; case SS_INVALID_SRB: return "Invalid parameter set in SRB"; break; case SS_OLD_MANAGER: return "ASPI manager doesn't support"; break; case SS_ILLEGAL_MODE: return "Unsupported MS Windows mode"; break; case SS_NO_ASPI: return "No ASPI managers"; break; case SS_FAILED_INIT: return "ASPI for windows failed init"; break; case SS_ASPI_IS_BUSY: return "No resources available to execute command."; break; case SS_BUFFER_TOO_BIG: return "Buffer size is too big to handle."; break; case SS_MISMATCHED_COMPONENTS: return "The DLLs/EXEs of ASPI don't version check"; break; case SS_NO_ADAPTERS: return "No host adapters found"; break; case SS_INSUFFICIENT_RESOURCES: return "Couldn't allocate resources needed to init"; break; case SS_ASPI_IS_SHUTDOWN: return "Call came to ASPI after PROCESS_DETACH"; break; case SS_BAD_INSTALL: return "The DLL or other components are installed wrong."; break; default: return "Unknown ASPI error."; } } /* General ioctl() CD-ROM command function */ static bool mciSendCommand_aspi(int id, UINT msg, DWORD flags, void *arg) { MCIERROR mci_error; mci_error = mciSendCommand(id, msg, flags, (DWORD)arg); if ( mci_error ) { char error[256]; mciGetErrorString(mci_error, error, 256); cdio_warn("mciSendCommand() error: %s", error); } return(mci_error == 0); } /* See if the ASPI DLL is loadable. If so pointers are returned and we return true. Return false if there was a problem. */ static bool have_aspi( HMODULE *hASPI, long (**lpGetSupport)( void ), long (**lpSendCommand)( void* ) ) { /* check if aspi is available */ *hASPI = LoadLibrary( "wnaspi32.dll" ); if( *hASPI == NULL ) { cdio_warn("Unable to load ASPI DLL"); return false; } *lpGetSupport = (void *) GetProcAddress( *hASPI, "GetASPI32SupportInfo" ); *lpSendCommand = (void *) GetProcAddress( *hASPI, "SendASPI32Command" ); /* make sure that we've got both function addresses */ if( *lpGetSupport == NULL || *lpSendCommand == NULL ) { cdio_debug("Unable to get ASPI function pointers"); FreeLibrary( *hASPI ); return false; } return true; } /*! Get disc type associated with cd object. */ discmode_t get_discmode_aspi (_img_private_t *p_env) { track_t i_track; discmode_t discmode=CDIO_DISC_MODE_NO_INFO; /* See if this is a DVD. */ cdio_dvd_struct_t dvd; /* DVD READ STRUCT for layer 0. */ dvd.physical.type = CDIO_DVD_STRUCT_PHYSICAL; dvd.physical.layer_num = 0; if (0 == mmc_get_dvd_struct_physical_private (p_env, &run_mmc_cmd_aspi, &dvd)) { switch(dvd.physical.layer[0].book_type) { case CDIO_DVD_BOOK_DVD_ROM: return CDIO_DISC_MODE_DVD_ROM; case CDIO_DVD_BOOK_DVD_RAM: return CDIO_DISC_MODE_DVD_RAM; case CDIO_DVD_BOOK_DVD_R: return CDIO_DISC_MODE_DVD_R; case CDIO_DVD_BOOK_DVD_RW: return CDIO_DISC_MODE_DVD_RW; case CDIO_DVD_BOOK_DVD_PR: return CDIO_DISC_MODE_DVD_PR; case CDIO_DVD_BOOK_DVD_PRW: return CDIO_DISC_MODE_DVD_PRW; default: return CDIO_DISC_MODE_DVD_OTHER; } } if (!p_env->gen.toc_init) read_toc_aspi (p_env); if (!p_env->gen.toc_init) return CDIO_DISC_MODE_NO_INFO; for (i_track = p_env->gen.i_first_track; i_track < p_env->gen.i_first_track + p_env->gen.i_tracks ; i_track ++) { track_format_t track_fmt=get_track_format_aspi(p_env, i_track); switch(track_fmt) { case TRACK_FORMAT_AUDIO: switch(discmode) { case CDIO_DISC_MODE_NO_INFO: discmode = CDIO_DISC_MODE_CD_DA; break; case CDIO_DISC_MODE_CD_DA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_ERROR: /* No change*/ break; default: discmode = CDIO_DISC_MODE_CD_MIXED; } break; case TRACK_FORMAT_XA: switch(discmode) { case CDIO_DISC_MODE_NO_INFO: discmode = CDIO_DISC_MODE_CD_XA; break; case CDIO_DISC_MODE_CD_XA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_ERROR: /* No change*/ break; default: discmode = CDIO_DISC_MODE_CD_MIXED; } break; case TRACK_FORMAT_DATA: switch(discmode) { case CDIO_DISC_MODE_NO_INFO: discmode = CDIO_DISC_MODE_CD_DATA; break; case CDIO_DISC_MODE_CD_DATA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_ERROR: /* No change*/ break; default: discmode = CDIO_DISC_MODE_CD_MIXED; } break; case TRACK_FORMAT_ERROR: default: discmode = CDIO_DISC_MODE_ERROR; } } return discmode; } const char * is_cdrom_aspi(const char drive_letter) { static char psz_win32_drive[7]; HMODULE hASPI = NULL; long (*lpGetSupport)( void ) = NULL; long (*lpSendCommand)( void* ) = NULL; DWORD dwSupportInfo; int i_adapter, i_hostadapters; char c_drive; int i_rc; if ( !have_aspi(&hASPI, &lpGetSupport, &lpSendCommand) ) return NULL; /* ASPI support seems to be there. */ dwSupportInfo = lpGetSupport(); i_rc = HIBYTE( LOWORD ( dwSupportInfo ) ); if( SS_COMP != i_rc ) { cdio_debug("ASPI: %s", aspierror(i_rc)); FreeLibrary( hASPI ); return NULL; } i_hostadapters = LOBYTE( LOWORD( dwSupportInfo ) ); if( i_hostadapters == 0 ) { FreeLibrary( hASPI ); return NULL; } c_drive = toupper(drive_letter) - 'A'; for( i_adapter = 0; i_adapter < i_hostadapters; i_adapter++ ) { struct SRB_GetDiskInfo srbDiskInfo; int i_target; SRB_HAInquiry srbInquiry; srbInquiry.SRB_Cmd = SC_HA_INQUIRY; srbInquiry.SRB_HaId = i_adapter; lpSendCommand( (void*) &srbInquiry ); if( srbInquiry.SRB_Status != SS_COMP ) continue; if( !srbInquiry.HA_Unique[3]) srbInquiry.HA_Unique[3]=8; for(i_target=0; i_target < srbInquiry.HA_Unique[3]; i_target++) { int i_lun; for( i_lun=0; i_lun<8; i_lun++) { srbDiskInfo.SRB_Cmd = SC_GET_DISK_INFO; srbDiskInfo.SRB_Flags = 0; srbDiskInfo.SRB_Hdr_Rsvd = 0; srbDiskInfo.SRB_HaId = i_adapter; srbDiskInfo.SRB_Target = i_target; srbDiskInfo.SRB_Lun = i_lun; lpSendCommand( (void*) &srbDiskInfo ); if( (srbDiskInfo.SRB_Status == SS_COMP) && (srbDiskInfo.SRB_Int13HDriveInfo == c_drive) ) { /* Make sure this is a CD-ROM device. */ struct SRB_GDEVBlock srbGDEVBlock; memset( &srbGDEVBlock, 0, sizeof(struct SRB_GDEVBlock) ); srbGDEVBlock.SRB_Cmd = SC_GET_DEV_TYPE; srbDiskInfo.SRB_HaId = i_adapter; srbGDEVBlock.SRB_Target = i_target; srbGDEVBlock.SRB_Lun = i_lun; lpSendCommand( (void*) &srbGDEVBlock ); if( ( srbGDEVBlock.SRB_Status == SS_COMP ) && ( srbGDEVBlock.SRB_DeviceType == DTYPE_CDROM ) ) { sprintf( psz_win32_drive, "%c:", drive_letter ); FreeLibrary( hASPI ); return(psz_win32_drive); } } } } } FreeLibrary( hASPI ); return NULL; } /*! Initialize CD device. */ bool init_aspi (_img_private_t *env) { HMODULE hASPI = NULL; long (*lpGetSupport)( void ) = NULL; long (*lpSendCommand)( void* ) = NULL; DWORD dwSupportInfo; int i_adapter, i_hostadapters; char c_drive; int i_rc; if (2 == strlen(env->gen.source_name) && isalpha(env->gen.source_name[0]) ) { c_drive = env->gen.source_name[0]; } else if ( 6 == strlen(env->gen.source_name) && isalpha(env->gen.source_name[4] )) { c_drive = env->gen.source_name[4]; } else { c_drive = 'C'; } if ( !have_aspi(&hASPI, &lpGetSupport, &lpSendCommand) ) return false; /* ASPI support seems to be there. */ dwSupportInfo = lpGetSupport(); i_rc = HIBYTE( LOWORD ( dwSupportInfo ) ); if( SS_COMP != i_rc ) { cdio_info("ASPI: %s", aspierror(i_rc)); FreeLibrary( hASPI ); return false; } i_hostadapters = LOBYTE( LOWORD( dwSupportInfo ) ); if( i_hostadapters == 0 ) { FreeLibrary( hASPI ); return false; } c_drive = toupper(c_drive) - 'A'; for( i_adapter = 0; i_adapter < i_hostadapters; i_adapter++ ) { struct SRB_GetDiskInfo srbDiskInfo; int i_target; SRB_HAInquiry srbInquiry; srbInquiry.SRB_Cmd = SC_HA_INQUIRY; srbInquiry.SRB_HaId = i_adapter; lpSendCommand( (void*) &srbInquiry ); if( srbInquiry.SRB_Status != SS_COMP ) continue; if( !srbInquiry.HA_Unique[3]) srbInquiry.HA_Unique[3]=8; for(i_target=0; i_target < srbInquiry.HA_Unique[3]; i_target++) { int i_lun; for (i_lun = 0; i_lun < 8; i_lun++ ) { srbDiskInfo.SRB_Cmd = SC_GET_DISK_INFO; srbDiskInfo.SRB_Flags = 0; srbDiskInfo.SRB_Hdr_Rsvd = 0; srbDiskInfo.SRB_HaId = i_adapter; srbDiskInfo.SRB_Target = i_target; srbDiskInfo.SRB_Lun = i_lun; lpSendCommand( (void*) &srbDiskInfo ); if( (srbDiskInfo.SRB_Status == SS_COMP) ) { if (srbDiskInfo.SRB_Int13HDriveInfo != c_drive) { continue; } else { /* Make sure this is a CD-ROM device. */ struct SRB_GDEVBlock srbGDEVBlock; memset( &srbGDEVBlock, 0, sizeof(struct SRB_GDEVBlock) ); srbGDEVBlock.SRB_Cmd = SC_GET_DEV_TYPE; srbGDEVBlock.SRB_HaId = i_adapter; srbGDEVBlock.SRB_Target = i_target; lpSendCommand( (void*) &srbGDEVBlock ); if( ( srbGDEVBlock.SRB_Status == SS_COMP ) && ( srbGDEVBlock.SRB_DeviceType == DTYPE_CDROM ) ) { env->i_sid = MAKEWORD( i_adapter, i_target ); env->hASPI = (long)hASPI; env->lpSendCommand = lpSendCommand; env->b_aspi_init = true; env->i_lun = i_lun; cdio_debug("Using ASPI layer for %s", env->gen.source_name); return true; } else { FreeLibrary( hASPI ); cdio_debug( "%s: is not a CD-ROM drive", env->gen.source_name ); return false; } } } } } } FreeLibrary( hASPI ); cdio_info( "Unable to find host adapter id and target (ASPI) for %s", env->gen.source_name ); return false; } /*! Run a SCSI MMC command. env private CD structure i_timeout_ms time in milliseconds we will wait for the command to complete. If this value is -1, use the default time-out value. p_buf Buffer for data, both sending and receiving i_buf Size of buffer e_direction direction the transfer is to go. cdb CDB bytes. All values that are needed should be set on input. We'll figure out what the right CDB length should be. We return 0 if command completed successfully. */ int run_mmc_cmd_aspi( void *p_user_data, unsigned int i_timeout_ms, unsigned int i_cdb, const mmc_cdb_t * p_cdb, cdio_mmc_direction_t e_direction, unsigned int i_buf, /*in/out*/ void *p_buf ) { _img_private_t *p_env = p_user_data; HANDLE hEvent; struct SRB_ExecSCSICmd ssc; int sense_size; /* Create the transfer completion event */ hEvent = CreateEvent( NULL, TRUE, FALSE, NULL ); if( hEvent == NULL ) { cdio_info("CreateEvent failed"); return 1; } p_env->gen.scsi_mmc_sense_valid = 0; memset( &ssc, 0, sizeof( ssc ) ); ssc.SRB_Cmd = SC_EXEC_SCSI_CMD; ssc.SRB_Flags = SCSI_MMC_DATA_READ == e_direction ? SRB_DIR_IN | SRB_EVENT_NOTIFY : SRB_DIR_OUT | SRB_EVENT_NOTIFY; ssc.SRB_HaId = LOBYTE( p_env->i_sid ); ssc.SRB_Target = HIBYTE( p_env->i_sid ); ssc.SRB_Lun = p_env->i_lun; ssc.SRB_SenseLen = SENSE_LEN; ssc.SRB_PostProc = (LPVOID) hEvent; ssc.SRB_CDBLen = i_cdb; /* Result buffer */ ssc.SRB_BufPointer = p_buf; ssc.SRB_BufLen = i_buf; memcpy( ssc.CDBByte, p_cdb, i_cdb ); ResetEvent( hEvent ); p_env->lpSendCommand( (void*) &ssc ); /* If the command has still not been processed, wait until it's * finished */ if( ssc.SRB_Status == SS_PENDING ) { WaitForSingleObject( hEvent, msecs2secs(i_timeout_ms) ); } CloseHandle( hEvent ); /* check that the transfer went as planned */ if( ssc.SRB_Status != SS_COMP ) { cdio_info("ASPI: %s", aspierror(ssc.SRB_Status)); return DRIVER_OP_ERROR; } else { sense_size = ssc.SenseArea[7] + 8; /* SPC 4.5.3, Table 26: 252 bytes legal, 263 bytes possible */ if (sense_size > SENSE_LEN) sense_size = SENSE_LEN; memcpy((void *) p_env->gen.scsi_mmc_sense, ssc.SenseArea, sense_size); p_env->gen.scsi_mmc_sense_valid = sense_size; } return DRIVER_OP_SUCCESS; } /*! Reads nblocks sectors from cd device into data starting from lsn. Returns 0 if no error. */ static int read_sectors_aspi (_img_private_t *p_env, void *data, lsn_t lsn, int sector_type, unsigned int nblocks) { mmc_cdb_t cdb = {{0, }}; unsigned int i_buf; int sync = 0; int header_code = 2; int i_user_data = 1; int edc_ecc = 0; int error_field = 0; #if 0 sector_type = 0; /*all types */ #endif /* Set up passthrough command */ CDIO_MMC_SET_COMMAND (cdb.field, CDIO_MMC_GPCMD_READ_CD); CDIO_MMC_SET_READ_TYPE (cdb.field, sector_type); CDIO_MMC_SET_READ_LBA (cdb.field, lsn); CDIO_MMC_SET_READ_LENGTH24(cdb.field, nblocks); #if 1 cdb.field[ 9 ] = (sync << 7) | (header_code << 5) | (i_user_data << 4) | (edc_ecc << 3) | (error_field << 1); /* ssc.CDBByte[ 9 ] = READ_CD_USERDATA_MODE2; */ #else CDIO_MMC_SET_MAIN_CHANNEL_SELECTION_BITS(cmd, CDIO_MMC_MCSB_ALL_HEADERS); #endif switch (sector_type) { case CDIO_MMC_READ_TYPE_ANY: case CDIO_MMC_READ_TYPE_CDDA: i_buf = CDIO_CD_FRAMESIZE_RAW; break; case CDIO_MMC_READ_TYPE_M2F1: i_buf = CDIO_CD_FRAMESIZE; break; case CDIO_MMC_READ_TYPE_M2F2: i_buf = 2324; break; case CDIO_MMC_READ_TYPE_MODE1: i_buf = CDIO_CD_FRAMESIZE; break; default: i_buf = CDIO_CD_FRAMESIZE_RAW; } return run_mmc_cmd_aspi(p_env, OP_TIMEOUT_MS, mmc_get_cmd_len(cdb.field[0]), &cdb, SCSI_MMC_DATA_READ, i_buf*nblocks, data); } /*! Reads an audio device into data starting from lsn. Returns 0 if no error. */ int read_audio_sectors_aspi (_img_private_t *p_env, void *data, lsn_t lsn, unsigned int i_blocks) { if (read_sectors_aspi(p_env, data, lsn, CDIO_MMC_READ_TYPE_CDDA, i_blocks)) { return read_sectors_aspi(p_env, data, lsn, CDIO_MMC_READ_TYPE_ANY, i_blocks); } return 0; } /*! Reads a single mode2 sector from cd device into data starting from lsn. Returns 0 if no error. */ int read_mode2_sector_aspi (_img_private_t *p_env, void *data, lsn_t lsn, bool b_form2) { return read_sectors_aspi(p_env, data, lsn, b_form2 ? CDIO_MMC_READ_TYPE_M2F2 : CDIO_MMC_READ_TYPE_M2F1, 1); } /*! Reads a single mode2 sector from cd device into data starting from lsn. Returns 0 if no error. */ int read_mode1_sector_aspi (_img_private_t *p_env, void *data, lsn_t lsn, bool b_form2) { return read_sectors_aspi(p_env, data, lsn, CDIO_MMC_READ_TYPE_MODE1, 1); } /*! Read and cache the CD's Track Table of Contents and track info. Return true if successful or false if an error. */ bool read_toc_aspi (_img_private_t *p_env) { mmc_cdb_t cdb = {{0, }}; unsigned char tocheader[ 4 ]; int i_status; /* Operation code */ CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_READ_TOC); /* Format */ cdb.field[ 2 ] = CDIO_MMC_READTOC_FMT_TOC; /* Starting track */ CDIO_MMC_SET_START_TRACK(cdb.field, 0); CDIO_MMC_SET_READ_LENGTH16(cdb.field, sizeof(tocheader)); i_status = run_mmc_cmd_aspi (p_env, OP_TIMEOUT_MS, mmc_get_cmd_len(cdb.field[0]), &cdb, SCSI_MMC_DATA_READ, sizeof(tocheader), &tocheader); if (0 != i_status) return false; p_env->gen.i_first_track = tocheader[2]; p_env->gen.i_tracks = tocheader[3] - tocheader[2] + 1; { int i, j, i_toclength; unsigned char *p_fulltoc; i_toclength = 4 /* header */ + tocheader[0] + ((unsigned int) tocheader[1] << 8); p_fulltoc = malloc( i_toclength ); if( p_fulltoc == NULL ) { cdio_error( "out of memory" ); return false; } CDIO_MMC_SET_READ_LENGTH16(cdb.field, i_toclength); i_status = run_mmc_cmd_aspi (p_env, OP_TIMEOUT_MS, mmc_get_cmd_len(cdb.field[0]), &cdb, SCSI_MMC_DATA_READ, i_toclength, p_fulltoc); if( 0 != i_status ) { p_env->gen.i_tracks = 0; } j = p_env->gen.i_first_track; for( i = 0 ; i <= p_env->gen.i_tracks ; i++, j++ ) { int i_index = 8 + 8 * i; p_env->tocent[ i ].start_lsn = ((int)p_fulltoc[ i_index ] << 24) + ((int)p_fulltoc[ i_index+1 ] << 16) + ((int)p_fulltoc[ i_index+2 ] << 8) + (int)p_fulltoc[ i_index+3 ]; p_env->tocent[i].Control = (UCHAR)p_fulltoc[ 1 + 8 * i ]; set_track_flags(&(p_env->gen.track_flags[j]), p_env->tocent[i].Control); cdio_debug( "p_sectors: %i %lu", i, (unsigned long int) p_env->tocent[i].start_lsn ); } free( p_fulltoc ); } p_env->gen.toc_init = true; return true; } /* Eject media will eventually get removed from _cdio_win32.c */ #if 0 /*! Eject media. Return 1 if successful, 0 otherwise. */ int wnaspi32_eject_media (void *user_data) { _img_private_t *env = user_data; MCI_OPEN_PARMS op; MCI_STATUS_PARMS st; DWORD i_flags; char psz_drive[4]; int ret; memset( &op, 0, sizeof(MCI_OPEN_PARMS) ); op.lpstrDeviceType = (LPCSTR)MCI_DEVTYPE_CD_AUDIO; strcpy( psz_drive, "X:" ); psz_drive[0] = env->gen.source_name[0]; op.lpstrElementName = psz_drive; /* Set the flags for the device type */ i_flags = MCI_OPEN_TYPE | MCI_OPEN_TYPE_ID | MCI_OPEN_ELEMENT | MCI_OPEN_SHAREABLE; if( mciSendCommand_aspi( 0, MCI_OPEN, i_flags, &op ) ) { st.dwItem = MCI_STATUS_READY; /* Eject disc */ ret = mciSendCommand_aspi( op.wDeviceID, MCI_SET, MCI_SET_DOOR_OPEN, 0 ) != 0; /* Release access to the device */ mciSendCommand_aspi( op.wDeviceID, MCI_CLOSE, MCI_WAIT, 0 ); } else ret = 0; return ret; } #endif /*! Get format of track. */ track_format_t get_track_format_aspi(const _img_private_t *p_env, track_t track_num) { MCI_OPEN_PARMS op; MCI_STATUS_PARMS st; DWORD i_flags; int ret; memset( &op, 0, sizeof(MCI_OPEN_PARMS) ); op.lpstrDeviceType = (LPCSTR)MCI_DEVTYPE_CD_AUDIO; op.lpstrElementName = p_env->gen.source_name; /* Set the flags for the device type */ i_flags = MCI_OPEN_TYPE | MCI_OPEN_TYPE_ID | MCI_OPEN_ELEMENT | MCI_OPEN_SHAREABLE; if( mciSendCommand_aspi( 0, MCI_OPEN, i_flags, &op ) ) { st.dwItem = MCI_CDA_STATUS_TYPE_TRACK; st.dwTrack = track_num; i_flags = MCI_TRACK | MCI_STATUS_ITEM ; ret = mciSendCommand_aspi( op.wDeviceID, MCI_STATUS, i_flags, &st ); /* Release access to the device */ mciSendCommand_aspi( op.wDeviceID, MCI_CLOSE, MCI_WAIT, 0 ); switch(st.dwReturn) { case MCI_CDA_TRACK_AUDIO: return TRACK_FORMAT_AUDIO; case MCI_CDA_TRACK_OTHER: return TRACK_FORMAT_DATA; default: return TRACK_FORMAT_XA; } } return TRACK_FORMAT_ERROR; } #endif /* HAVE_WIN32_CDROM */ libcdio-0.83/lib/driver/MSWindows/win32_ioctl.c0000755000175000017500000010771011625346407016246 00000000000000/* Copyright (C) 2004, 2005, 2008, 2010, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* This file contains Win32-specific code using the DeviceIoControl access method. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #ifdef HAVE_WIN32_CDROM #if defined (_XBOX) # include "inttypes.h" # include "NtScsi.h" # include "undocumented.h" #else # include # include # include #endif #ifdef WIN32 #include #endif #include #include /* offsetof() macro */ #include #include #include #include #include #include #include "cdio_assert.h" #include #include "cdtext_private.h" #include "cdio/logging.h" #if defined (_XBOX) #define windows_error(loglevel,i_err) { \ cdio_log(loglevel, "Error: file %s: line %d (%s) %ld\n", \ __FILE__, __LINE__, __PRETTY_FUNCTION__, i_err); \ } #else #define windows_error(loglevel,i_err) { \ char error_msg[80]; \ long int count; \ count = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, \ NULL, i_err, MAKELANGID(LANG_NEUTRAL, \ SUBLANG_DEFAULT), \ error_msg, sizeof(error_msg), NULL); \ (count != 0) ? \ cdio_log(loglevel, "Error: file %s: line %d (%s)\n\t%s\n", \ __FILE__, __LINE__, __PRETTY_FUNCTION__, error_msg) \ : \ cdio_log(loglevel, "Error: file %s: line %d (%s) %ld\n", \ __FILE__, __LINE__, __PRETTY_FUNCTION__, i_err); \ } #endif #define MAX_ERROR_BUFFER 256 #define MAX_DATA_BUFFER 2048 typedef struct _TRACK_DATA_FULL { UCHAR SessionNumber; UCHAR Control : 4; UCHAR Adr : 4; UCHAR TNO; UCHAR POINT; /* Tracknumber (of session?) or lead-out/in (0xA0, 0xA1, 0xA2) */ UCHAR Min; /* Only valid if disctype is CDDA ? */ UCHAR Sec; /* Only valid if disctype is CDDA ? */ UCHAR Frame; /* Only valid if disctype is CDDA ? */ UCHAR Zero; /* Always zero */ UCHAR PMIN; /* start min, if POINT is a track; if lead-out/in 0xA0: First Track */ UCHAR PSEC; UCHAR PFRAME; } TRACK_DATA_FULL, *PTRACK_DATA_FULL; typedef struct _CDROM_TOC_FULL { UCHAR Length[2]; UCHAR FirstSession; UCHAR LastSession; TRACK_DATA_FULL TrackData[CDIO_CD_MAX_TRACKS+3]; } CDROM_TOC_FULL, *PCDROM_TOC_FULL; typedef struct { SCSI_PASS_THROUGH_DIRECT sptd; ULONG Filler; /* Realign buffer to double-word boundary */ cdio_mmc_request_sense_t SenseBuf; UCHAR DataBuf[512]; } SCSI_PASS_THROUGH_DIRECT_WITH_BUFFER; typedef struct _SCSI_PASS_THROUGH_WITH_BUFFER { SCSI_PASS_THROUGH Spt; ULONG Filler; /* realign buffer to double-word boundary */ cdio_mmc_request_sense_t SenseBuf; UCHAR DataBuf[512]; } SCSI_PASS_THROUGH_WITH_BUFFER; #include "win32.h" #define OP_TIMEOUT_MS 60 /*! Pause playing CD through analog output @param p_cdio the CD object to be acted upon. */ driver_return_code_t audio_pause_win32ioctl (void *p_user_data) { const _img_private_t *p_env = p_user_data; DWORD dw_bytes_returned; bool b_success = DeviceIoControl(p_env->h_device_handle, IOCTL_CDROM_PAUSE_AUDIO, NULL, (DWORD) 0, NULL, 0, &dw_bytes_returned, NULL); if ( ! b_success ) { windows_error(CDIO_LOG_INFO, GetLastError()); return DRIVER_OP_ERROR; } return DRIVER_OP_SUCCESS; } /*! Playing starting at given MSF through analog output @param p_cdio the CD object to be acted upon. */ driver_return_code_t audio_play_msf_win32ioctl (void *p_user_data, msf_t *p_start_msf, msf_t *p_end_msf) { const _img_private_t *p_env = p_user_data; CDROM_PLAY_AUDIO_MSF play; DWORD dw_bytes_returned; play.StartingM = cdio_from_bcd8(p_start_msf->m); play.StartingS = cdio_from_bcd8(p_start_msf->s); play.StartingF = cdio_from_bcd8(p_start_msf->f); play.EndingM = cdio_from_bcd8(p_end_msf->m); play.EndingS = cdio_from_bcd8(p_end_msf->s); play.EndingF = cdio_from_bcd8(p_end_msf->f); bool b_success = DeviceIoControl(p_env->h_device_handle, IOCTL_CDROM_PLAY_AUDIO_MSF, &play, sizeof(play), NULL, 0, &dw_bytes_returned, NULL); if ( ! b_success ) { windows_error(CDIO_LOG_INFO, GetLastError()); return DRIVER_OP_ERROR; } return DRIVER_OP_SUCCESS; } /*! Read Audio Subchannel information @param p_cdio the CD object to be acted upon. */ driver_return_code_t audio_read_subchannel_win32ioctl (void *p_user_data, cdio_subchannel_t *p_subchannel) { const _img_private_t *p_env = p_user_data; DWORD dw_bytes_returned; CDROM_SUB_Q_DATA_FORMAT q_data_format; SUB_Q_CHANNEL_DATA q_subchannel_data; q_data_format.Format = CDIO_SUBCHANNEL_CURRENT_POSITION; q_data_format.Track=0; /* Not sure if this has to be set or if so what it should be. */ if( ! DeviceIoControl( p_env->h_device_handle, IOCTL_CDROM_READ_Q_CHANNEL, &q_data_format, sizeof(q_data_format), &q_subchannel_data, sizeof(q_subchannel_data), &dw_bytes_returned, NULL ) ) { windows_error(CDIO_LOG_INFO, GetLastError()); return DRIVER_OP_ERROR; } p_subchannel->audio_status = q_subchannel_data.CurrentPosition.Header.AudioStatus; p_subchannel->track = q_subchannel_data.CurrentPosition.TrackNumber; p_subchannel->index = q_subchannel_data.CurrentPosition.IndexNumber; p_subchannel->index = q_subchannel_data.CurrentPosition.IndexNumber; p_subchannel->address = q_subchannel_data.CurrentPosition.ADR; p_subchannel->control = q_subchannel_data.CurrentPosition.Control; { const UCHAR *abs_addr = q_subchannel_data.CurrentPosition.AbsoluteAddress; const UCHAR *rel_addr = q_subchannel_data.CurrentPosition.TrackRelativeAddress; p_subchannel->abs_addr.m = cdio_to_bcd8(abs_addr[1]); p_subchannel->abs_addr.s = cdio_to_bcd8(abs_addr[2]); p_subchannel->abs_addr.f = cdio_to_bcd8(abs_addr[3]); p_subchannel->rel_addr.m = cdio_to_bcd8(rel_addr[1]); p_subchannel->rel_addr.s = cdio_to_bcd8(rel_addr[2]); p_subchannel->rel_addr.f = cdio_to_bcd8(rel_addr[3]); } return DRIVER_OP_SUCCESS; } /** Resume playing an audio CD. @param p_user_data the CD object to be acted upon. */ driver_return_code_t audio_resume_win32ioctl (void *p_user_data) { const _img_private_t *p_env = p_user_data; DWORD dw_bytes_returned; bool b_success = DeviceIoControl(p_env->h_device_handle, IOCTL_CDROM_RESUME_AUDIO, NULL, (DWORD) 0, NULL, 0, &dw_bytes_returned, NULL); if ( ! b_success ) { windows_error(CDIO_LOG_INFO, GetLastError()); return DRIVER_OP_ERROR; } return DRIVER_OP_SUCCESS; } /** Set the volume of an audio CD. @param p_user_data pointer to the CD object to be acted upon. @param p_volume pointer to the volume levels */ driver_return_code_t audio_set_volume_win32ioctl (void *p_user_data, /*in*/ cdio_audio_volume_t *p_volume) { const _img_private_t *p_env = p_user_data; DWORD dw_bytes_returned; bool b_success = DeviceIoControl(p_env->h_device_handle, IOCTL_CDROM_SET_VOLUME, p_volume, (DWORD) sizeof(cdio_audio_volume_t), NULL, 0, &dw_bytes_returned, NULL); if ( ! b_success ) { windows_error(CDIO_LOG_INFO, GetLastError()); return DRIVER_OP_ERROR; } return DRIVER_OP_SUCCESS; } driver_return_code_t audio_get_volume_win32ioctl (void *p_user_data, /*out*/ cdio_audio_volume_t *p_volume) { const _img_private_t *p_env = p_user_data; DWORD dw_bytes_returned; bool b_success = DeviceIoControl(p_env->h_device_handle, IOCTL_CDROM_GET_VOLUME, NULL, 0, p_volume, (DWORD) sizeof(cdio_audio_volume_t), &dw_bytes_returned, NULL); if ( ! b_success ) { windows_error(CDIO_LOG_INFO, GetLastError()); return DRIVER_OP_ERROR; } return DRIVER_OP_SUCCESS; } /** Stop playing an audio CD. @param p_user_data the CD object to be acted upon. */ driver_return_code_t audio_stop_win32ioctl (void *p_user_data) { const _img_private_t *p_env = p_user_data; DWORD dw_bytes_returned; bool b_success = DeviceIoControl(p_env->h_device_handle, IOCTL_CDROM_STOP_AUDIO, NULL, (DWORD) 0, NULL, 0, &dw_bytes_returned, NULL); if ( ! b_success ) { windows_error(CDIO_LOG_INFO, GetLastError()); return DRIVER_OP_ERROR; } return DRIVER_OP_SUCCESS; } /** Close the tray of a CD-ROM @param p_user_data the CD object to be acted upon. */ driver_return_code_t close_tray_win32ioctl (const char *psz_win32_drive) { #ifdef WIN32 DWORD dw_bytes_returned; DWORD dw_access_flags; OSVERSIONINFO ov; HANDLE h_device_handle; BOOL b_success; memset(&ov,0,sizeof(OSVERSIONINFO)); ov.dwOSVersionInfoSize=sizeof(OSVERSIONINFO); GetVersionEx(&ov); if((ov.dwPlatformId==VER_PLATFORM_WIN32_NT) && (ov.dwMajorVersion>4)) dw_access_flags = GENERIC_READ|GENERIC_WRITE; /* add gen write on W2k/XP */ else dw_access_flags = GENERIC_READ; h_device_handle = CreateFile( psz_win32_drive, dw_access_flags, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL ); if( h_device_handle == INVALID_HANDLE_VALUE ) { return DRIVER_OP_ERROR; } b_success = DeviceIoControl(h_device_handle, IOCTL_STORAGE_LOAD_MEDIA2, NULL, (DWORD) 0, NULL, 0, &dw_bytes_returned, NULL); CloseHandle(h_device_handle); if ( b_success != 0 ) { windows_error(CDIO_LOG_INFO, GetLastError()); return DRIVER_OP_ERROR; } return DRIVER_OP_SUCCESS; #else return DRIVER_OP_UNSUPPORTED; #endif } /** Produce a text composed from the system SCSI address tuple "Port,Path,Target,Lun" and store it in generic_img_private_t.scsi_tuple. To be accessed via cdio_get_arg("scsi-tuple-linux") or ("scsi-tuple"). Drivers which implement this code have to return 5 valid decimal numbers separated by comma, or empty text if no such numbers are available. @return 1=success , 0=failure */ static int set_scsi_tuple_win32ioctl(_img_private_t *env) #ifdef WIN32 { char tuple[160]; char dataBuffer[MAX_DATA_BUFFER]; PSCSI_ADDRESS scsiAddress = (PSCSI_ADDRESS) dataBuffer; ULONG bytesReturned; memset(dataBuffer, 0, sizeof(dataBuffer)); if (DeviceIoControl(env->h_device_handle, IOCTL_SCSI_GET_ADDRESS, NULL, 0, dataBuffer, sizeof(dataBuffer), &bytesReturned, FALSE )) { snprintf(tuple, sizeof(tuple), "%d,%d,%d,%d", scsiAddress->PortNumber, scsiAddress->PathId, scsiAddress->TargetId, scsiAddress->Lun); env->gen.scsi_tuple = strdup(tuple); return 1; } else { /* No tuple. */ env->gen.scsi_tuple = strdup(""); return 0; } } #else { env->gen.scsi_tuple = strdup(""); return 0; } #endif /** Run a SCSI MMC command. env private CD structure i_timeout time in milliseconds we will wait for the command to complete. If this value is -1, use the default time-out value. p_buf Buffer for data, both sending and receiving i_buf Size of buffer e_direction direction the transfer is to go. cdb CDB bytes. All values that are needed should be set on input. We'll figure out what the right CDB length should be. Return 0 if command completed successfully. */ #if 1 int run_mmc_cmd_win32ioctl( void *p_user_data, unsigned int i_timeout_ms, unsigned int i_cdb, const mmc_cdb_t * p_cdb, cdio_mmc_direction_t e_direction, unsigned int i_buf, /*in/out*/ void *p_buf ) { _img_private_t *p_env = p_user_data; SCSI_PASS_THROUGH_DIRECT_WITH_BUFFER swb; BOOL b_success; DWORD dw_bytes_returned; char dummy_buf[2]; /* Used if we can't use p_buf. See below. */ int rc = DRIVER_OP_SUCCESS; memset(&swb, 0, sizeof(swb)); swb.sptd.Length = sizeof(SCSI_PASS_THROUGH_DIRECT); swb.sptd.PathId = 0; /* SCSI card ID will be filled in automatically */ swb.sptd.TargetId= 0; /* SCSI target ID will also be filled in */ swb.sptd.Lun = 0; /* SCSI lun ID will also be filled in */ swb.sptd.CdbLength = i_cdb; swb.sptd.SenseInfoLength = sizeof(swb.SenseBuf); swb.sptd.DataIn = (SCSI_MMC_DATA_READ == e_direction) ? SCSI_IOCTL_DATA_IN : (SCSI_MMC_DATA_WRITE == e_direction) ? SCSI_IOCTL_DATA_OUT : SCSI_IOCTL_DATA_UNSPECIFIED; /* MS Windows seems to flip out of the size of the buffer is 0 or 1. For the 1 byte case see: BUG: SCSI Pass Through Fails with Invalid User Buffer Error http://support.microsoft.com/kb/259573 So in those cases we will provide our own. */ if (i_buf <= 1) { swb.sptd.DataBuffer = &dummy_buf; swb.sptd.DataTransferLength = 2; } else { swb.sptd.DataBuffer = p_buf; swb.sptd.DataTransferLength = i_buf; } swb.sptd.TimeOutValue = msecs2secs(i_timeout_ms); swb.sptd.SenseInfoOffset = offsetof(SCSI_PASS_THROUGH_DIRECT_WITH_BUFFER, SenseBuf); p_env->gen.scsi_mmc_sense_valid = 0; memcpy(swb.sptd.Cdb, p_cdb, i_cdb); /* Send the command to drive */ b_success = DeviceIoControl(p_env->h_device_handle, IOCTL_SCSI_PASS_THROUGH_DIRECT, (void *)&swb, sizeof(swb), &swb, sizeof(swb), &dw_bytes_returned, NULL); if (i_buf == 1) memcpy(p_buf, &dummy_buf[0], 1); if ( 0 == b_success ) { long int last_error = GetLastError(); windows_error(CDIO_LOG_INFO, last_error); switch (last_error) { case 87: rc = DRIVER_OP_BAD_PARAMETER; break; default: rc = DRIVER_OP_ERROR; } } /* Record SCSI sense reply for API call mmc_last_cmd_sense(). */ if (swb.SenseBuf.additional_sense_len) { /* SCSI Primary Command standard SPC 4.5.3, Table 26: 252 bytes legal, 263 bytes possible */ int sense_size = swb.SenseBuf.additional_sense_len + 8; if (sense_size > sizeof(swb.SenseBuf)) sense_size = sizeof(swb.SenseBuf); memcpy((void *) p_env->gen.scsi_mmc_sense, &swb.SenseBuf, sense_size); p_env->gen.scsi_mmc_sense_valid = sense_size; if (DRIVER_OP_SUCCESS == rc) rc = DRIVER_OP_MMC_SENSE_DATA; } return rc; } #else int run_mmc_cmd_win32ioctl( void *p_user_data, unsigned int i_timeout_ms, unsigned int i_cdb, const mmc_cdb_t * p_cdb, cdio_mmc_direction_t e_direction, unsigned int i_buf, /*in/out*/ void *p_buf ) { _img_private_t *p_env = p_user_data; SCSI_PASS_THROUGH_WITH_BUFFER sptwb; BOOL b_success; unsigned long length = 0; DWORD dw_bytes_returned; memset(&sptwb, 0, sizeof(sptwb)); sptwb.Spt.Length = sizeof(sptwb.Spt); sptwb.Spt.PathId = 0; /* SCSI card ID will be filled in automatically */ sptwb.Spt.TargetId= 0; /* SCSI target ID will also be filled in */ sptwb.Spt.Lun = 0; /* SCSI lun ID will also be filled in */ sptwb.Spt.CdbLength = i_cdb; sptwb.Spt.SenseInfoLength = sizeof(sptwb.SenseBuf); sptwb.Spt.DataIn = (SCSI_MMC_DATA_READ == e_direction) ? SCSI_IOCTL_DATA_IN : (SCSI_MMC_DATA_WRITE == e_direction) ? SCSI_IOCTL_DATA_OUT : SCSI_IOCTL_DATA_UNSPECIFIED; if (SCSI_MMC_DATA_WRITE == e_direction) memcpy(&sptwb.DataBuf, p_buf, i_buf); sptwb.Spt.DataTransferLength= i_buf; sptwb.Spt.TimeOutValue = msecs2secs(i_timeout_ms); sptwb.Spt.DataBufferOffset = offsetof(SCSI_PASS_THROUGH_WITH_BUFFER,DataBuf); sptwb.Spt.SenseInfoOffset = offsetof(SCSI_PASS_THROUGH_WITH_BUFFER, SenseBuf); memcpy(sptwb.Spt.Cdb, p_cdb, i_cdb); sptwb.Spt.Cdb[4] = i_buf; length = offsetof(SCSI_PASS_THROUGH_WITH_BUFFER,DataBuf) + sptwb.Spt.DataTransferLength; /* Send the command to drive */ b_success = DeviceIoControl(p_env->h_device_handle, IOCTL_SCSI_PASS_THROUGH, (void *)&sptwb, sizeof(SCSI_PASS_THROUGH), &sptwb, length, &dw_bytes_returned, NULL); if ( 0 == b_success ) { windows_error(CDIO_LOG_INFO, GetLastError()); return DRIVER_OP_ERROR; } memcpy(p_buf, &sptwb.DataBuf, i_buf); /* Record SCSI sense reply for API call mmc_last_cmd_sense(). */ if (sptwb.SenseBuf[7]) { int sense_size = sptwb.SenseBuf[7] + 8; /* SPC 4.5.3, Table 26: 252 bytes legal, 263 bytes possible */ if (sense_size > sizeof(sptwb.SenseBuf)) sense_size = sizeof(sptwb.SenseBuf); memcpy((void *) p_env->gen.scsi_mmc_sense, &sptwb.SenseBuf, sense_size); p_env->gen.scsi_mmc_sense_valid = sense_size; } return DRIVER_OP_SUCCESS; } #endif /** Get disc type associated with cd object. */ static discmode_t dvd_discmode_win32ioctl (_img_private_t *p_env) { discmode_t discmode=CDIO_DISC_MODE_NO_INFO; driver_return_code_t rc; /* See if this is a DVD. */ cdio_dvd_struct_t dvd; /* DVD READ STRUCT for layer 0. */ dvd.physical.type = CDIO_DVD_STRUCT_PHYSICAL; dvd.physical.layer_num = 0; rc = mmc_get_dvd_struct_physical_private (p_env, &run_mmc_cmd_win32ioctl, &dvd); if (DRIVER_OP_SUCCESS == rc) { switch(dvd.physical.layer[0].book_type) { case CDIO_DVD_BOOK_DVD_ROM: return CDIO_DISC_MODE_DVD_ROM; case CDIO_DVD_BOOK_DVD_RAM: return CDIO_DISC_MODE_DVD_RAM; case CDIO_DVD_BOOK_DVD_R: return CDIO_DISC_MODE_DVD_R; case CDIO_DVD_BOOK_DVD_RW: return CDIO_DISC_MODE_DVD_RW; case CDIO_DVD_BOOK_DVD_PR: return CDIO_DISC_MODE_DVD_PR; case CDIO_DVD_BOOK_DVD_PRW: return CDIO_DISC_MODE_DVD_PRW; default: return CDIO_DISC_MODE_DVD_OTHER; } } return discmode; } /** Get disc type associated with cd object. */ discmode_t get_discmode_win32ioctl (_img_private_t *p_env) { track_t i_track; discmode_t discmode; if (!p_env) return CDIO_DISC_MODE_ERROR; discmode = dvd_discmode_win32ioctl(p_env); if (CDIO_DISC_MODE_NO_INFO != discmode) return discmode; if (!p_env->gen.toc_init) read_toc_win32ioctl (p_env); if (!p_env->gen.toc_init) return CDIO_DISC_MODE_ERROR; for (i_track = p_env->gen.i_first_track; i_track < p_env->gen.i_first_track + p_env->gen.i_tracks ; i_track ++) { track_format_t track_fmt=get_track_format_win32ioctl(p_env, i_track); switch(track_fmt) { case TRACK_FORMAT_AUDIO: switch(discmode) { case CDIO_DISC_MODE_NO_INFO: discmode = CDIO_DISC_MODE_CD_DA; break; case CDIO_DISC_MODE_CD_DA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_ERROR: /* No change*/ break; default: discmode = CDIO_DISC_MODE_CD_MIXED; } break; case TRACK_FORMAT_XA: switch(discmode) { case CDIO_DISC_MODE_NO_INFO: discmode = CDIO_DISC_MODE_CD_XA; break; case CDIO_DISC_MODE_CD_XA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_ERROR: /* No change*/ break; default: discmode = CDIO_DISC_MODE_CD_MIXED; } break; case TRACK_FORMAT_DATA: switch(discmode) { case CDIO_DISC_MODE_NO_INFO: discmode = CDIO_DISC_MODE_CD_DATA; break; case CDIO_DISC_MODE_CD_DATA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_ERROR: /* No change*/ break; default: discmode = CDIO_DISC_MODE_CD_MIXED; } break; case TRACK_FORMAT_ERROR: default: discmode = CDIO_DISC_MODE_ERROR; } } return discmode; } /* Returns a string that can be used in a CreateFile call if c_drive letter is a character. If not NULL is returned. */ const char * is_cdrom_win32ioctl(const char c_drive_letter) { #ifdef _XBOX char sz_win32_drive_full[] = "\\\\.\\X:"; sz_win32_drive_full[4] = c_drive_letter; return strdup(sz_win32_drive_full); #else UINT uDriveType; char sz_win32_drive[4]; sz_win32_drive[0]= c_drive_letter; sz_win32_drive[1]=':'; sz_win32_drive[2]='\\'; sz_win32_drive[3]='\0'; uDriveType = GetDriveType(sz_win32_drive); switch(uDriveType) { case DRIVE_CDROM: { char sz_win32_drive_full[] = "\\\\.\\X:"; sz_win32_drive_full[4] = c_drive_letter; return strdup(sz_win32_drive_full); } default: cdio_debug("Drive %c is not a CD-ROM", c_drive_letter); return NULL; } #endif } /** Reads an audio device using the DeviceIoControl method into data starting from lsn. Returns 0 if no error. */ driver_return_code_t read_audio_sectors_win32ioctl (_img_private_t *p_env, void *data, lsn_t lsn, unsigned int nblocks) { DWORD dw_bytes_returned; RAW_READ_INFO cdrom_raw; /* Initialize CDROM_RAW_READ structure */ cdrom_raw.DiskOffset.QuadPart = (long long) CDIO_CD_FRAMESIZE_RAW * lsn; cdrom_raw.SectorCount = nblocks; cdrom_raw.TrackMode = CDDA; if( DeviceIoControl( p_env->h_device_handle, IOCTL_CDROM_RAW_READ, &cdrom_raw, sizeof(RAW_READ_INFO), data, CDIO_CD_FRAMESIZE_RAW * nblocks, &dw_bytes_returned, NULL ) == 0 ) { cdio_info("Error reading audio-mode lsn %lu\n)", (long unsigned int) lsn); windows_error(CDIO_LOG_INFO, GetLastError()); return DRIVER_OP_ERROR; } return DRIVER_OP_SUCCESS; } /** Reads a single raw sector using the DeviceIoControl method into data starting from lsn. Returns 0 if no error. */ static int read_raw_sector (_img_private_t *p_env, void *p_buf, lsn_t lsn) { mmc_cdb_t cdb = {{0, }}; /* ReadCD CDB12 command. The values were taken from MMC1 draft paper. */ CDIO_MMC_SET_COMMAND (cdb.field, CDIO_MMC_GPCMD_READ_CD); CDIO_MMC_SET_READ_LBA (cdb.field, lsn); CDIO_MMC_SET_READ_LENGTH24(cdb.field, 1); cdb.field[9]=0xF8; /* Raw read, 2352 bytes per sector */ return run_mmc_cmd_win32ioctl(p_env, OP_TIMEOUT_MS, mmc_get_cmd_len(cdb.field[0]), &cdb, SCSI_MMC_DATA_READ, CDIO_CD_FRAMESIZE_RAW, p_buf); } /** Reads a single mode2 sector using the DeviceIoControl method into data starting from lsn. Returns 0 if no error. */ int read_mode2_sector_win32ioctl (_img_private_t *p_env, void *p_data, lsn_t lsn, bool b_form2) { char buf[CDIO_CD_FRAMESIZE_RAW] = { 0, }; int ret = read_raw_sector (p_env, buf, lsn); if ( 0 != ret) return ret; memcpy (p_data, buf + CDIO_CD_SYNC_SIZE + CDIO_CD_XA_HEADER, b_form2 ? M2RAW_SECTOR_SIZE: CDIO_CD_FRAMESIZE); return 0; } /** Reads a single mode2 sector using the DeviceIoControl method into data starting from lsn. Returns 0 if no error. */ int read_mode1_sector_win32ioctl (_img_private_t *env, void *data, lsn_t lsn, bool b_form2) { char buf[CDIO_CD_FRAMESIZE_RAW] = { 0, }; int ret = read_raw_sector (env, buf, lsn); if ( 0 != ret) return ret; memcpy (data, buf + CDIO_CD_SYNC_SIZE+CDIO_CD_HEADER_SIZE, b_form2 ? M2RAW_SECTOR_SIZE: CDIO_CD_FRAMESIZE); return 0; } /** Initialize internal structures for CD device. */ bool init_win32ioctl (_img_private_t *env) { #ifdef WIN32 OSVERSIONINFO ov; #endif #ifdef _XBOX ANSI_STRING filename; OBJECT_ATTRIBUTES attributes; IO_STATUS_BLOCK status; HANDLE hDevice; NTSTATUS error; #else unsigned int len=strlen(env->gen.source_name); char psz_win32_drive[7]; DWORD dw_access_flags; #endif cdio_debug("using winNT/2K/XP ioctl layer"); #ifdef WIN32 memset(&ov,0,sizeof(OSVERSIONINFO)); ov.dwOSVersionInfoSize=sizeof(OSVERSIONINFO); GetVersionEx(&ov); if((ov.dwPlatformId==VER_PLATFORM_WIN32_NT) && (ov.dwMajorVersion>4)) dw_access_flags = GENERIC_READ|GENERIC_WRITE; /* add gen write on W2k/XP */ else dw_access_flags = GENERIC_READ; #endif if (cdio_is_device_win32(env->gen.source_name)) { #ifdef _XBOX // Use XBOX cdrom, no matter what drive letter is given. RtlInitAnsiString(&filename,"\\Device\\Cdrom0"); InitializeObjectAttributes(&attributes, &filename, OBJ_CASE_INSENSITIVE, NULL); error = NtCreateFile( &hDevice, GENERIC_READ |SYNCHRONIZE | FILE_READ_ATTRIBUTES, &attributes, &status, NULL, 0, FILE_SHARE_READ, FILE_OPEN, FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT ); if (!NT_SUCCESS(error)) { return false; } env->h_device_handle = hDevice; #else snprintf( psz_win32_drive, sizeof(psz_win32_drive), "\\\\.\\%c:", env->gen.source_name[len-2] ); env->h_device_handle = CreateFile( psz_win32_drive, dw_access_flags, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL ); if( env->h_device_handle == INVALID_HANDLE_VALUE ) { /* No good. try toggle write. */ dw_access_flags ^= GENERIC_WRITE; env->h_device_handle = CreateFile( psz_win32_drive, dw_access_flags, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL ); if (env->h_device_handle == NULL) return false; } #endif env->b_ioctl_init = true; set_scsi_tuple_win32ioctl(env); return true; } return false; } /** Read and cache the CD's Track Table of Contents and track info. via a SCSI MMC READ_TOC (FULTOC). Return true if successful or false if an error. */ static bool read_fulltoc_win32mmc (_img_private_t *p_env) { mmc_cdb_t cdb = {{0, }}; CDROM_TOC_FULL cdrom_toc_full; int i_status, i, j; int i_track_format = 0; int i_seen_flag; /* Operation code */ CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_READ_TOC); cdb.field[1] = 0x00; /* Format */ cdb.field[2] = CDIO_MMC_READTOC_FMT_FULTOC; memset(&cdrom_toc_full, 0, sizeof(cdrom_toc_full)); /* Setup to read header, to get length of data */ CDIO_MMC_SET_READ_LENGTH16(cdb.field, sizeof(cdrom_toc_full)); i_status = run_mmc_cmd_win32ioctl (p_env, 1000*60*3, mmc_get_cmd_len(cdb.field[0]), &cdb, SCSI_MMC_DATA_READ, sizeof(cdrom_toc_full), &cdrom_toc_full); if ( 0 != i_status ) { cdio_debug ("SCSI MMC READ_TOC failed\n"); return false; } i_seen_flag=0; for( i = 0 ; i <= CDIO_CD_MAX_TRACKS+3; i++ ) { if ( 0xA0 == cdrom_toc_full.TrackData[i].POINT ) { /* First track number */ p_env->gen.i_first_track = cdrom_toc_full.TrackData[i].PMIN; i_track_format = cdrom_toc_full.TrackData[i].PSEC; i_seen_flag|=0x01; } if ( 0xA1 == cdrom_toc_full.TrackData[i].POINT ) { /* Last track number */ p_env->gen.i_tracks = cdrom_toc_full.TrackData[i].PMIN - p_env->gen.i_first_track + 1; i_seen_flag|=0x02; } j = cdrom_toc_full.TrackData[i].POINT; if ( 0xA2 == j ) { /* Start position of the lead out */ p_env->tocent[ p_env->gen.i_tracks ].start_lsn = cdio_lba_to_lsn( cdio_msf3_to_lba( cdrom_toc_full.TrackData[i].PMIN, cdrom_toc_full.TrackData[i].PSEC, cdrom_toc_full.TrackData[i].PFRAME ) ); p_env->tocent[ p_env->gen.i_tracks ].Control = cdrom_toc_full.TrackData[i].Control; p_env->tocent[ p_env->gen.i_tracks ].Format = i_track_format; i_seen_flag|=0x04; } if (cdrom_toc_full.TrackData[i].POINT > 0 && cdrom_toc_full.TrackData[i].POINT <= p_env->gen.i_tracks) { p_env->tocent[j-1].start_lsn = cdio_lba_to_lsn( cdio_msf3_to_lba( cdrom_toc_full.TrackData[i].PMIN, cdrom_toc_full.TrackData[i].PSEC, cdrom_toc_full.TrackData[i].PFRAME ) ); p_env->tocent[j-1].Control = cdrom_toc_full.TrackData[i].Control; p_env->tocent[j-1].Format = i_track_format; set_track_flags(&(p_env->gen.track_flags[j]), p_env->tocent[j-1].Control); cdio_debug("p_sectors: %i, %lu", i, (unsigned long int) (p_env->tocent[i].start_lsn)); if (cdrom_toc_full.TrackData[i].POINT == p_env->gen.i_tracks) i_seen_flag|=0x08; } if ( 0x0F == i_seen_flag ) break; } if ( 0x0F == i_seen_flag ) { p_env->gen.toc_init = true; return true; } return false; } /** Read and cache the CD's Track Table of Contents and track info. Return true if successful or false if an error. */ bool read_toc_win32ioctl (_img_private_t *p_env) { CDROM_TOC cdrom_toc; DWORD dw_bytes_returned; unsigned int i, j; bool b_fulltoc_first; /* Do we do fulltoc or DeviceIoControl first? */ if ( ! p_env ) return false; /* The MMC5 spec says: For media other than CD, information may be fabricated in order ^^^ ^^ to emulate a CD structure for the specific media. There is no requirement though that it *has* to and some DVD drives like one by Thompson for XBOX don't support a IOCTL_CDROM_READ_TOC for DVD's. So if we have a DVD we should not prefer getting the TOC via MMC. But on the other hand in GNU/Linux it is reported that using the TOC via MMC gives better information such as for CD DATA Form 2 (used in SVCDs). So if we *don't* have a DVD I think we want to try MMC first. Is this complicated enough? I could be wrong... */ b_fulltoc_first = (CDIO_DISC_MODE_NO_INFO == dvd_discmode_win32ioctl(p_env)); if ( b_fulltoc_first && read_fulltoc_win32mmc(p_env) ) return true; /* SCSI-MMC READ_TOC (FULTOC) read failed or we don't want to try it initiaily. Try reading TOC via DeviceIoControl... */ if( DeviceIoControl( p_env->h_device_handle, IOCTL_CDROM_READ_TOC, NULL, 0, &cdrom_toc, sizeof(CDROM_TOC), &dw_bytes_returned, NULL ) == 0 ) { cdio_log_level_t loglevel = b_fulltoc_first ? CDIO_LOG_WARN : CDIO_LOG_DEBUG; cdio_log(loglevel, "could not read TOC"); windows_error(loglevel, GetLastError()); if ( !b_fulltoc_first && read_fulltoc_win32mmc(p_env) ) return true; return false; } p_env->gen.i_first_track = cdrom_toc.FirstTrack; p_env->gen.i_tracks = cdrom_toc.LastTrack - cdrom_toc.FirstTrack + 1; j = p_env->gen.i_first_track; for( i = 0 ; i <= p_env->gen.i_tracks ; i++, j++ ) { p_env->tocent[ i ].start_lsn = cdio_lba_to_lsn( cdio_msf3_to_lba( cdrom_toc.TrackData[i].Address[1], cdrom_toc.TrackData[i].Address[2], cdrom_toc.TrackData[i].Address[3] ) ); p_env->tocent[i].Control = cdrom_toc.TrackData[i].Control; p_env->tocent[i].Format = cdrom_toc.TrackData[i].Adr; p_env->gen.track_flags[j].preemphasis = p_env->tocent[i].Control & 0x1 ? CDIO_TRACK_FLAG_TRUE : CDIO_TRACK_FLAG_FALSE; p_env->gen.track_flags[j].copy_permit = p_env->tocent[i].Control & 0x2 ? CDIO_TRACK_FLAG_TRUE : CDIO_TRACK_FLAG_FALSE; p_env->gen.track_flags[j].channels = p_env->tocent[i].Control & 0x8 ? 4 : 2; cdio_debug("p_sectors: %i, %lu", i, (unsigned long int) (p_env->tocent[i].start_lsn)); } p_env->gen.toc_init = true; return true; } /** Return the media catalog number MCN. Note: string is malloc'd so caller should free() then returned string when done with it. */ char * get_mcn_win32ioctl (const _img_private_t *p_env) { DWORD dw_bytes_returned; SUB_Q_MEDIA_CATALOG_NUMBER mcn; CDROM_SUB_Q_DATA_FORMAT q_data_format; memset( &mcn, 0, sizeof(mcn) ); q_data_format.Format = CDIO_SUBCHANNEL_MEDIA_CATALOG; /* MSDN info on CDROM_SUB_Q_DATA_FORMAT says if Format is set to get MCN, track must be set 0. */ q_data_format.Track=0; if( ! DeviceIoControl( p_env->h_device_handle, IOCTL_CDROM_READ_Q_CHANNEL, &q_data_format, sizeof(q_data_format), &mcn, sizeof(mcn), &dw_bytes_returned, NULL ) ) { cdio_warn( "could not read Q Channel at track %d", 1); } else if (mcn.Mcval) return strdup((const char *) mcn.MediaCatalog); return NULL; } /** Get the format (XA, DATA, AUDIO) of a track. */ track_format_t get_track_format_win32ioctl(const _img_private_t *env, track_t i_track) { /* This is pretty much copied from the "badly broken" cdrom_count_tracks in linux/cdrom.c. */ if (env->tocent[i_track - env->gen.i_first_track].Control & 0x04) { if (env->tocent[i_track - env->gen.i_first_track].Format == 0x10) return TRACK_FORMAT_CDI; else if (env->tocent[i_track - env->gen.i_first_track].Format == 0x20) return TRACK_FORMAT_XA; else return TRACK_FORMAT_DATA; } else return TRACK_FORMAT_AUDIO; } #endif /*HAVE_WIN32_CDROM*/ libcdio-0.83/lib/driver/MSWindows/Makefile0000644000175000017500000000155311114145233015364 00000000000000# $Id: Makefile,v 1.2 2008/04/21 18:30:21 karl Exp $ # # Copyright (C) 2004, 2008 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # The make is done above. This boilerplate Makefile just transfers the call all install check clean: cd .. && $(MAKE) $@ libcdio-0.83/lib/driver/MSWindows/aspi32.h0000644000175000017500000002224211114145233015174 00000000000000/* Win32 aspi specific */ /* $Id: aspi32.h,v 1.6 2008/04/21 18:30:21 karl Exp $ Copyright (C) 2003, 2004, 2005, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #define ASPI_HAID 0 #define ASPI_TARGET 0 #define DTYPE_CDROM 0x05 #define SENSE_LEN 0x0E #define SC_HA_INQUIRY 0x00 #define SC_GET_DEV_TYPE 0x01 #define SC_EXEC_SCSI_CMD 0x02 #define SC_GET_DISK_INFO 0x06 //***************************************************************************** // %%% SRB Status %%% //***************************************************************************** #define SS_PENDING 0x00 // SRB being processed #define SS_COMP 0x01 // SRB completed without error #define SS_ABORTED 0x02 // SRB aborted #define SS_ABORT_FAIL 0x03 // Unable to abort SRB #define SS_ERR 0x04 // SRB completed with error #define SS_INVALID_CMD 0x80 // Invalid ASPI command #define SS_INVALID_HA 0x81 // Invalid host adapter number #define SS_NO_DEVICE 0x82 // SCSI device not installed #define SS_INVALID_SRB 0xE0 // Invalid parameter set in SRB #define SS_OLD_MANAGER 0xE1 // ASPI manager doesn't support Windows #define SS_BUFFER_ALIGN 0xE1 // Buffer not aligned (replaces // OLD_MANAGER in Win32) #define SS_ILLEGAL_MODE 0xE2 // Unsupported Windows mode #define SS_NO_ASPI 0xE3 // No ASPI managers resident #define SS_FAILED_INIT 0xE4 // ASPI for windows failed init #define SS_ASPI_IS_BUSY 0xE5 // No resources available to execute // cmd #define SS_BUFFER_TOO_BIG 0xE6 // Buffer size to big to handle! #define SS_MISMATCHED_COMPONENTS 0xE7 // The DLLs/EXEs of ASPI don't version // check #define SS_NO_ADAPTERS 0xE8 // No host adapters to manage #define SS_INSUFFICIENT_RESOURCES 0xE9 // Couldn't allocate resources needed // to init #define SS_ASPI_IS_SHUTDOWN 0xEA // Call came to ASPI after // PROCESS_DETACH #define SS_BAD_INSTALL 0xEB // The DLL or other components are installed wrong //***************************************************************************** // %%% Host Adapter Status %%% //***************************************************************************** #define HASTAT_OK 0x00 // Host adapter did not detect an // error #define HASTAT_SEL_TO 0x11 // Selection Timeout #define HASTAT_DO_DU 0x12 // Data overrun data underrun #define HASTAT_BUS_FREE 0x13 // Unexpected bus free #define HASTAT_PHASE_ERR 0x14 // Target bus phase sequence // failure #define HASTAT_TIMEOUT 0x09 // Timed out while SRB was // waiting to beprocessed. #define HASTAT_COMMAND_TIMEOUT 0x0B // Adapter timed out processing SRB. #define HASTAT_MESSAGE_REJECT 0x0D // While processing SRB, the // adapter received a MESSAGE #define HASTAT_BUS_RESET 0x0E // A bus reset was detected. #define HASTAT_PARITY_ERROR 0x0F // A parity error was detected. #define HASTAT_REQUEST_SENSE_FAILED 0x10 // The adapter failed in issuing #define SS_NO_ADAPTERS 0xE8 #define SRB_DIR_IN 0x08 #define SRB_DIR_OUT 0x10 #define SRB_EVENT_NOTIFY 0x40 #define SECTOR_TYPE_MODE2 0x14 #define READ_CD_USERDATA_MODE2 0x10 #define READ_TOC 0x43 #define READ_TOC_FORMAT_TOC 0x0 #pragma pack(1) struct SRB_GetDiskInfo { unsigned char SRB_Cmd; unsigned char SRB_Status; unsigned char SRB_HaId; unsigned char SRB_Flags; unsigned long SRB_Hdr_Rsvd; unsigned char SRB_Target; unsigned char SRB_Lun; unsigned char SRB_DriveFlags; unsigned char SRB_Int13HDriveInfo; unsigned char SRB_Heads; unsigned char SRB_Sectors; unsigned char SRB_Rsvd1[22]; }; struct SRB_GDEVBlock { unsigned char SRB_Cmd; unsigned char SRB_Status; unsigned char SRB_HaId; unsigned char SRB_Flags; unsigned long SRB_Hdr_Rsvd; unsigned char SRB_Target; unsigned char SRB_Lun; unsigned char SRB_DeviceType; unsigned char SRB_Rsvd1; }; struct SRB_ExecSCSICmd { unsigned char SRB_Cmd; unsigned char SRB_Status; unsigned char SRB_HaId; unsigned char SRB_Flags; unsigned long SRB_Hdr_Rsvd; unsigned char SRB_Target; unsigned char SRB_Lun; unsigned short SRB_Rsvd1; unsigned long SRB_BufLen; unsigned char *SRB_BufPointer; unsigned char SRB_SenseLen; unsigned char SRB_CDBLen; unsigned char SRB_HaStat; unsigned char SRB_TargStat; unsigned long *SRB_PostProc; unsigned char SRB_Rsvd2[20]; unsigned char CDBByte[16]; unsigned char SenseArea[SENSE_LEN+2]; }; /***************************************************************************** %%% SRB - HOST ADAPTER INQUIRY - SC_HA_INQUIRY (0) %%% *****************************************************************************/ typedef struct // Offset { // HX/DEC BYTE SRB_Cmd; // 00/000 ASPI command code = SC_HA_INQUIRY BYTE SRB_Status; // 01/001 ASPI command status byte BYTE SRB_HaId; // 02/002 ASPI host adapter number BYTE SRB_Flags; // 03/003 ASPI request flags DWORD SRB_Hdr_Rsvd; // 04/004 Reserved, MUST = 0 BYTE HA_Count; // 08/008 Number of host adapters present BYTE HA_SCSI_ID; // 09/009 SCSI ID of host adapter BYTE HA_ManagerId[16]; // 0A/010 String describing the manager BYTE HA_Identifier[16]; // 1A/026 String describing the host adapter BYTE HA_Unique[16]; // 2A/042 Host Adapter Unique parameters WORD HA_Rsvd1; // 3A/058 Reserved, MUST = 0 } SRB_HAInquiry; /*! Get disc type associated with cd object. */ discmode_t get_discmode_aspi (_img_private_t *p_env); /*! Return the the kind of drive capabilities of device. Note: string is malloc'd so caller should free() then returned string when done with it. */ char * get_mcn_aspi (const _img_private_t *env); /*! Get the format (XA, DATA, AUDIO) of a track. */ track_format_t get_track_format_aspi(const _img_private_t *env, track_t i_track); /*! Initialize internal structures for CD device. */ bool init_aspi (_img_private_t *env); /* Read cdtext information for a CdIo object . return true on success, false on error or CD-TEXT information does not exist. */ bool init_cdtext_aspi (_img_private_t *env); const char *is_cdrom_aspi(const char drive_letter); /*! Reads an audio device using the DeviceIoControl method into data starting from lsn. Returns 0 if no error. */ int read_audio_sectors_aspi (_img_private_t *obj, void *data, lsn_t lsn, unsigned int nblocks); /*! Reads a single mode1 sector using the DeviceIoControl method into data starting from lsn. Returns 0 if no error. */ int read_mode1_sector_aspi (_img_private_t *env, void *data, lsn_t lsn, bool b_form2); /*! Reads a single mode2 sector from cd device into data starting from lsn. Returns 0 if no error. */ int read_mode2_sector_aspi (_img_private_t *env, void *data, lsn_t lsn, bool b_form2); /*! Read and cache the CD's Track Table of Contents and track info. Return true if successful or false if an error. */ bool read_toc_aspi (_img_private_t *env); /*! Run a SCSI MMC command. env private CD structure i_timeout time in milliseconds we will wait for the command to complete. If this value is -1, use the default time-out value. p_buf Buffer for data, both sending and receiving i_buf Size of buffer e_direction direction the transfer is to go. cdb CDB bytes. All values that are needed should be set on input. We'll figure out what the right CDB length should be. Return 0 if command completed successfully. */ int run_mmc_cmd_aspi( void *p_user_data, unsigned int i_timeout, unsigned int i_cdb, const mmc_cdb_t * p_cdb, cdio_mmc_direction_t e_direction, unsigned int i_buf, /*in/out*/ void *p_buf ); libcdio-0.83/lib/driver/MSWindows/win32.c0000644000175000017500000006422211650123301015031 00000000000000/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2010, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* This file contains Win32-specific code and implements low-level control of the CD drive. Inspired by vlc's cdrom.h code */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif static const char _rcsid[] = "$Id: win32.c,v 1.37 2008/04/21 18:30:21 karl Exp $"; #include #include #include #include #include "cdio_assert.h" #include "cdio_private.h" /* protoype for cdio_is_device_win32 */ #include #ifdef HAVE_WIN32_CDROM #include #include #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_FCNTL_H #include #endif #include #include #include "win32.h" #ifdef HAVE_SYS_STAT_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #if defined (MSVC) || defined (_XBOX) #undef IN #else #include "aspi32.h" #endif #ifdef _XBOX #include "stdint.h" #include #define WIN_NT 1 #else #define WIN_NT ( GetVersion() < 0x80000000 ) #endif /*! Set the volume of an audio CD. @param p_cdio the CD object to be acted upon. */ static driver_return_code_t audio_get_volume_win32 ( void *p_user_data, /*out*/ cdio_audio_volume_t *p_volume) { if ( WIN_NT ) { return audio_get_volume_win32ioctl (p_user_data, p_volume); } else { return DRIVER_OP_UNSUPPORTED; /* not yet, but soon I hope */ } } /*! Pause playing CD through analog output @param p_cdio the CD object to be acted upon. */ static driver_return_code_t audio_pause_win32 (void *p_user_data) { if ( WIN_NT ) { return audio_pause_win32ioctl (p_user_data); } else { return DRIVER_OP_UNSUPPORTED; /* not yet, but soon I hope */ } } /*! Playing CD through analog output at the given MSF. @param p_cdio the CD object to be acted upon. */ static driver_return_code_t audio_play_msf_win32 (void *p_user_data, msf_t *p_start_msf, msf_t *p_end_msf) { if ( WIN_NT ) { return audio_play_msf_win32ioctl (p_user_data, p_start_msf, p_end_msf); } else { return DRIVER_OP_UNSUPPORTED; /* not yet, but soon I hope */ } } /*! Read Audio Subchannel information @param p_cdio the CD object to be acted upon. */ static driver_return_code_t audio_read_subchannel_win32 (void *p_user_data, cdio_subchannel_t *p_subchannel) { if ( WIN_NT ) { return audio_read_subchannel_win32ioctl (p_user_data, p_subchannel); } else { return audio_read_subchannel_mmc(p_user_data, p_subchannel); } } /*! Resume playing an audio CD. @param p_cdio the CD object to be acted upon. */ static driver_return_code_t audio_resume_win32 (void *p_user_data) { if ( WIN_NT ) { return audio_resume_win32ioctl (p_user_data); } else { return DRIVER_OP_UNSUPPORTED; /* not yet, but soon I hope */ } } /*! Set the volume of an audio CD. @param p_cdio the CD object to be acted upon. */ static driver_return_code_t audio_set_volume_win32 ( void *p_user_data, cdio_audio_volume_t *p_volume) { if ( WIN_NT ) { return audio_set_volume_win32ioctl (p_user_data, p_volume); } else { return DRIVER_OP_UNSUPPORTED; /* not yet, but soon I hope */ } } static driver_return_code_t audio_stop_win32 ( void *p_user_data) { if ( WIN_NT ) { return audio_stop_win32ioctl (p_user_data); } else { return DRIVER_OP_UNSUPPORTED; /* not yet, but soon I hope */ } } /* General ioctl() CD-ROM command function */ static bool _cdio_mciSendCommand(int id, UINT msg, DWORD flags, void *arg) { #ifdef _XBOX return false; #else MCIERROR mci_error; mci_error = mciSendCommand(id, msg, flags, (DWORD)arg); if ( mci_error ) { char error[256]; mciGetErrorString(mci_error, error, 256); cdio_warn("mciSendCommand() error: %s", error); } return(mci_error == 0); #endif } static access_mode_t str_to_access_mode_win32(const char *psz_access_mode) { const access_mode_t default_access_mode = WIN_NT ? _AM_IOCTL : _AM_ASPI; if (NULL==psz_access_mode) return default_access_mode; if (!strcmp(psz_access_mode, "ioctl")) return _AM_IOCTL; else if (!strcmp(psz_access_mode, "ASPI")) { #ifdef _XBOX cdio_warn ("XBOX doesn't support access type: %s. Default used instead.", psz_access_mode); return default_access_mode; #else return _AM_ASPI; #endif } else if (!strcmp(psz_access_mode, "MMC_RDWR")) { return _AM_MMC_RDWR; } else if (!strcmp(psz_access_mode, "MMC_RDWR_EXCL")) { return _AM_MMC_RDWR_EXCL; } else { cdio_warn ("unknown access type: %s. Default used instead.", psz_access_mode); return default_access_mode; } } static discmode_t get_discmode_win32(void *p_user_data) { _img_private_t *p_env = p_user_data; if (p_env->hASPI) { return get_discmode_aspi (p_env); } else { return get_discmode_win32ioctl (p_env); } } static const char * is_cdrom_win32(const char drive_letter) { if ( WIN_NT ) { return is_cdrom_win32ioctl (drive_letter); } else { return is_cdrom_aspi(drive_letter); } } /*! Run a SCSI MMC command. env private CD structure i_timeout_ms time in milliseconds we will wait for the command to complete. If this value is -1, use the default time-out value. p_buf Buffer for data, both sending and receiving i_buf Size of buffer e_direction direction the transfer is to go. cdb CDB bytes. All values that are needed should be set on input. We'll figure out what the right CDB length should be. Return 0 if command completed successfully. */ static int run_mmc_cmd_win32( void *p_user_data, unsigned int i_timeout_ms, unsigned int i_cdb, const mmc_cdb_t *p_cdb, cdio_mmc_direction_t e_direction, unsigned int i_buf, /*in/out*/ void *p_buf ) { _img_private_t *p_env = p_user_data; if (p_env->hASPI) { return run_mmc_cmd_aspi( p_env, i_timeout_ms, i_cdb, p_cdb, e_direction, i_buf, p_buf ); } else { return run_mmc_cmd_win32ioctl( p_env, i_timeout_ms, i_cdb, p_cdb, e_direction, i_buf, p_buf ); } } /*! Initialize CD device. */ static bool init_win32 (void *p_user_data) { _img_private_t *p_env = p_user_data; bool b_ret; if (p_env->gen.init) { cdio_error ("init called more than once"); return false; } p_env->gen.init = true; p_env->gen.toc_init = false; p_env->gen.b_cdtext_init = false; p_env->gen.b_cdtext_error = false; p_env->gen.fd = open (p_env->gen.source_name, O_RDONLY, 0); /* Initializations */ p_env->h_device_handle = NULL; p_env->i_sid = 0; p_env->hASPI = 0; p_env->lpSendCommand = 0; p_env->b_aspi_init = false; p_env->b_ioctl_init = false; switch (p_env->access_mode) { case _AM_IOCTL: case _AM_MMC_RDWR: case _AM_MMC_RDWR_EXCL: b_ret = init_win32ioctl(p_env); break; case _AM_ASPI: b_ret = init_aspi(p_env); break; default: return 0; } /* It looks like get_media_changed_mmc will always return 1 (media changed) on the first call. So we call it here to clear that flag. We may have to rethink this if there's a problem doing this extra work down the line. */ get_media_changed_mmc(p_user_data); return b_ret; } /*! Release and free resources associated with cd. */ static void free_win32 (void *p_user_data) { _img_private_t *p_env = p_user_data; if (NULL == p_env) return; if (p_env->gen.fd >= 0) close(p_env->gen.fd); free (p_env->gen.source_name); if( p_env->h_device_handle ) CloseHandle( p_env->h_device_handle ); if( p_env->hASPI ) FreeLibrary( (HMODULE)p_env->hASPI ); free (p_env); } /*! Reads an audio device into data starting from lsn. Returns 0 if no error. */ static int read_audio_sectors (void *p_user_data, void *p_buf, lsn_t i_lsn, unsigned int i_blocks) { _img_private_t *p_env = p_user_data; if ( p_env->hASPI ) { return read_audio_sectors_aspi( p_env, p_buf, i_lsn, i_blocks ); } else { #if 0 return read_audio_sectors_win32ioctl( p_env, p_buf, i_lsn, i_blocks ); #else return mmc_read_sectors( p_env->gen.cdio, p_buf, i_lsn, CDIO_MMC_READ_TYPE_CDDA, i_blocks); #endif } } /*! Reads an audio device into data starting from lsn. Returns 0 if no error. */ static driver_return_code_t read_data_sectors_win32 (void *p_user_data, void *p_buf, lsn_t i_lsn, uint16_t i_blocksize, uint32_t i_blocks) { driver_return_code_t rc = read_data_sectors_mmc(p_user_data, p_buf, i_lsn, i_blocksize, i_blocks); if ( DRIVER_OP_SUCCESS != rc ) { /* Try using generic "cooked" mode. */ return read_data_sectors_generic( p_user_data, p_buf, i_lsn, i_blocksize, i_blocks ); } return DRIVER_OP_SUCCESS; } /*! Reads a single mode1 sector from cd device into data starting from lsn. Returns 0 if no error. */ static int read_mode1_sector_win32 (void *p_user_data, void *p_buf, lsn_t lsn, bool b_form2) { _img_private_t *p_env = p_user_data; if (p_env->gen.ioctls_debugged == 75) cdio_debug ("only displaying every 75th ioctl from now on"); if (p_env->gen.ioctls_debugged == 30 * 75) cdio_debug ("only displaying every 30*75th ioctl from now on"); if (p_env->gen.ioctls_debugged < 75 || (p_env->gen.ioctls_debugged < (30 * 75) && p_env->gen.ioctls_debugged % 75 == 0) || p_env->gen.ioctls_debugged % (30 * 75) == 0) cdio_debug ("reading %lu", (unsigned long int) lsn); p_env->gen.ioctls_debugged++; if ( p_env->hASPI ) { return read_mode1_sector_aspi( p_env, p_buf, lsn, b_form2 ); } else { return read_mode1_sector_win32ioctl( p_env, p_buf, lsn, b_form2 ); } } /*! Reads nblocks of mode1 sectors from cd device into data starting from lsn. Returns 0 if no error. */ static int read_mode1_sectors_win32 (void *p_user_data, void *p_buf, lsn_t lsn, bool b_form2, unsigned int nblocks) { _img_private_t *p_env = p_user_data; int i; int retval; for (i = 0; i < nblocks; i++) { if (b_form2) { retval = read_mode1_sector_win32 (p_env, ((char *)p_buf) + (M2RAW_SECTOR_SIZE * i), lsn + i, true); if ( retval ) return retval; } else { char buf[M2RAW_SECTOR_SIZE] = { 0, }; if ( (retval = read_mode1_sector_win32 (p_env, buf, lsn + i, false)) ) return retval; memcpy (((char *)p_buf) + (CDIO_CD_FRAMESIZE * i), buf, CDIO_CD_FRAMESIZE); } } return 0; } /*! Reads a single mode2 sector from cd device into data starting from lsn. Returns 0 if no error. */ static int read_mode2_sector_win32 (void *p_user_data, void *data, lsn_t lsn, bool b_form2) { char buf[CDIO_CD_FRAMESIZE_RAW] = { 0, }; _img_private_t *p_env = p_user_data; if (p_env->gen.ioctls_debugged == 75) cdio_debug ("only displaying every 75th ioctl from now on"); if (p_env->gen.ioctls_debugged == 30 * 75) cdio_debug ("only displaying every 30*75th ioctl from now on"); if (p_env->gen.ioctls_debugged < 75 || (p_env->gen.ioctls_debugged < (30 * 75) && p_env->gen.ioctls_debugged % 75 == 0) || p_env->gen.ioctls_debugged % (30 * 75) == 0) cdio_debug ("reading %lu", (unsigned long int) lsn); p_env->gen.ioctls_debugged++; if ( p_env->hASPI ) { int ret; ret = read_mode2_sector_aspi(p_user_data, buf, lsn, 1); if( ret != 0 ) return ret; if (b_form2) memcpy (data, buf, M2RAW_SECTOR_SIZE); else memcpy (((char *)data), buf + CDIO_CD_SUBHEADER_SIZE, CDIO_CD_FRAMESIZE); return 0; } else { return read_mode2_sector_win32ioctl( p_env, data, lsn, b_form2 ); } } /*! Reads nblocks of mode2 sectors from cd device into data starting from lsn. Returns 0 if no error. */ static int read_mode2_sectors_win32 (void *p_user_data, void *data, lsn_t lsn, bool b_form2, unsigned int i_blocks) { int i; int retval; unsigned int blocksize = b_form2 ? M2RAW_SECTOR_SIZE : CDIO_CD_FRAMESIZE; for (i = 0; i < i_blocks; i++) { if ( (retval = read_mode2_sector_win32 (p_user_data, ((char *)data) + (blocksize * i), lsn + i, b_form2)) ) return retval; } return 0; } /*! Return the size of the CD in logical block address (LBA) units. */ static lsn_t get_disc_last_lsn_win32 (void *p_user_data) { _img_private_t *p_env = p_user_data; return p_env->tocent[p_env->gen.i_tracks].start_lsn; } /*! Set the key "arg" to "value" in source device. */ static int set_arg_win32 (void *p_user_data, const char key[], const char value[]) { _img_private_t *p_env = p_user_data; if (!strcmp (key, "source")) { if (!value) return -2; free (p_env->gen.source_name); p_env->gen.source_name = strdup (value); } else if (!strcmp (key, "access-mode")) { p_env->access_mode = str_to_access_mode_win32(value); if (p_env->access_mode == _AM_ASPI && !p_env->b_aspi_init) return init_aspi(p_env) ? 1 : -3; else if (p_env->access_mode == _AM_IOCTL && !p_env->b_ioctl_init) return init_win32ioctl(p_env) ? 1 : -3; else return -4; return 0; } else return -1; return 0; } /*! Read and cache the CD's Track Table of Contents and track info. Return true if successful or false if an error. */ static bool read_toc_win32 (void *p_user_data) { _img_private_t *p_env = p_user_data; bool ret; if( p_env->hASPI ) { ret = read_toc_aspi( p_env ); } else { ret = read_toc_win32ioctl( p_env ); } if (ret) p_env->gen.toc_init = true ; return ret; } /*! Close media tray. */ static driver_return_code_t open_close_media_win32 (const char *psz_win32_drive, DWORD command_flags) { #ifdef _XBOX return DRIVER_OP_UNSUPPORTED; #else MCI_OPEN_PARMS op; MCI_STATUS_PARMS st; DWORD i_flags; int ret; memset( &op, 0, sizeof(MCI_OPEN_PARMS) ); op.lpstrDeviceType = (LPCSTR)MCI_DEVTYPE_CD_AUDIO; op.lpstrElementName = psz_win32_drive; /* Set the flags for the device type */ i_flags = MCI_OPEN_TYPE | MCI_OPEN_TYPE_ID | MCI_OPEN_ELEMENT | MCI_OPEN_SHAREABLE; if( _cdio_mciSendCommand( 0, MCI_OPEN, i_flags, &op ) ) { st.dwItem = MCI_STATUS_READY; /* Eject disc */ ret = _cdio_mciSendCommand( op.wDeviceID, MCI_SET, command_flags, 0 ) == 0; /* Release access to the device */ _cdio_mciSendCommand( op.wDeviceID, MCI_CLOSE, MCI_WAIT, 0 ); } else ret = DRIVER_OP_ERROR; return ret; #endif } /*! Eject media. */ static driver_return_code_t eject_media_win32 (void *p_user_data) { const _img_private_t *p_env = p_user_data; char psz_drive[4]; unsigned int i_device = strlen(p_env->gen.source_name); strcpy( psz_drive, "X:" ); if (6 == i_device) { psz_drive[0] = p_env->gen.source_name[4]; } else if (2 == i_device) { psz_drive[0] = p_env->gen.source_name[0]; } else { cdio_info ("Can't pick out drive letter from device %s", p_env->gen.source_name); return DRIVER_OP_ERROR; } return open_close_media_win32(psz_drive, MCI_SET_DOOR_OPEN); } static bool is_mmc_supported(void *user_data) { _img_private_t *env = user_data; switch (env->access_mode) { case _AM_NONE: return false; case _AM_IOCTL: case _AM_ASPI: case _AM_MMC_RDWR: case _AM_MMC_RDWR_EXCL: return true; } /* Not reached. */ return false; } /*! Return the value associated with the key "arg". */ static const char * get_arg_win32 (void *p_user_data, const char key[]) { _img_private_t *p_env = p_user_data; if (!strcmp (key, "source")) { return p_env->gen.source_name; } else if (!strcmp (key, "access-mode")) { switch (p_env->access_mode) { case _AM_IOCTL: return "ioctl"; case _AM_ASPI: return "ASPI"; case _AM_MMC_RDWR: return "MMC_RDWR"; case _AM_MMC_RDWR_EXCL: return "MMC_RDWR_EXCL"; case _AM_NONE: return "no access method"; } } else if (!strcmp (key, "scsi-tuple")) { return p_env->gen.scsi_tuple; } else if (!strcmp (key, "mmc-supported?")) { return is_mmc_supported(p_user_data) ? "true" : "false"; } return NULL; } /*! Return the media catalog number MCN. Note: string is malloc'd so caller should free() then returned string when done with it. */ static char * _cdio_get_mcn (const void *p_user_data) { const _img_private_t *p_env = p_user_data; if( p_env->hASPI ) { return mmc_get_mcn( p_env->gen.cdio ); } else { return get_mcn_win32ioctl(p_env); } } /*! Get format of track. */ static track_format_t _cdio_get_track_format(void *p_obj, track_t i_track) { _img_private_t *p_env = p_obj; if ( !p_env ) return TRACK_FORMAT_ERROR; if (!p_env->gen.toc_init) if (!read_toc_win32 (p_env)) return TRACK_FORMAT_ERROR; if ( i_track < p_env->gen.i_first_track || i_track >= p_env->gen.i_tracks + p_env->gen.i_first_track ) return TRACK_FORMAT_ERROR; if( p_env->hASPI ) { return get_track_format_aspi(p_env, i_track); } else { return get_track_format_win32ioctl(p_env, i_track); } } /*! Return true if we have XA data (green, mode2 form1) or XA data (green, mode2 form2). That is track begins: sync - header - subheader 12 4 - 8 FIXME: there's gotta be a better design for this and get_track_format? */ static bool _cdio_get_track_green(void *p_obj, track_t i_track) { _img_private_t *p_env = p_obj; switch (_cdio_get_track_format(p_env, i_track)) { case TRACK_FORMAT_XA: return true; case TRACK_FORMAT_ERROR: case TRACK_FORMAT_CDI: case TRACK_FORMAT_AUDIO: return false; case TRACK_FORMAT_DATA: if (_AM_ASPI == p_env->access_mode ) return ((p_env->tocent[i_track-p_env->gen.i_first_track].Control & 8) != 0); default: break; } /* FIXME: Dunno if this is the right way, but it's what I was using in cd-info for a while. */ return ((p_env->tocent[i_track-p_env->gen.i_first_track].Control & 2) != 0); } /*! Return the starting MSF (minutes/secs/frames) for track number i_tracks in obj. Track numbers start at 1. The "leadout" track is specified either by using i_tracks LEADOUT_TRACK or the total tracks+1. False is returned if there is no track entry. */ static bool _cdio_get_track_msf(void *p_user_data, track_t i_tracks, msf_t *p_msf) { _img_private_t *p_env = p_user_data; if (!p_msf) return false; if (!p_env->gen.toc_init) if (!read_toc_win32 (p_env)) return false; if (i_tracks == CDIO_CDROM_LEADOUT_TRACK) i_tracks = p_env->gen.i_tracks+1; if (i_tracks > p_env->gen.i_tracks+1 || i_tracks == 0) { return false; } else { cdio_lsn_to_msf(p_env->tocent[i_tracks-1].start_lsn, p_msf); return true; } } #endif /* HAVE_WIN32_CDROM */ /*! Return an array of strings giving possible CD devices. */ char ** cdio_get_devices_win32 (void) { #ifndef HAVE_WIN32_CDROM return NULL; #else char **drives = NULL; unsigned int num_drives=0; char drive_letter; /* Scan the system for CD-ROM drives. */ #if FINISHED /* Now check the currently mounted CD drives */ if (NULL != (ret_drive = cdio_check_mounts("/etc/mtab"))) { cdio_add_device_list(&drives, drive, &num_drives); } /* Finally check possible mountable drives in /etc/fstab */ if (NULL != (ret_drive = cdio_check_mounts("/etc/fstab"))) { cdio_add_device_list(&drives, drive, &num_drives); } #endif /* Scan the system for CD-ROM drives. Not always 100% reliable, so use the USE_MNTENT code above first. */ for (drive_letter='A'; drive_letter <= 'Z'; drive_letter++) { const char *drive_str=is_cdrom_win32(drive_letter); if (drive_str != NULL) { cdio_add_device_list(&drives, drive_str, &num_drives); } } cdio_add_device_list(&drives, NULL, &num_drives); return drives; #endif /*HAVE_WIN32_CDROM*/ } /*! Return a string containing the default CD device if none is specified. if CdIo is NULL (we haven't initialized a specific device driver), then find a suitable one and return the default device for that. NULL is returned if we couldn't get a default device. */ char * cdio_get_default_device_win32(void) { #ifdef HAVE_WIN32_CDROM char drive_letter; for (drive_letter='A'; drive_letter <= 'Z'; drive_letter++) { const char *drive_str=is_cdrom_win32(drive_letter); if (drive_str != NULL) { return strdup(drive_str); } } #endif return NULL; } /*! Return true if source_name could be a device containing a CD-ROM. */ bool cdio_is_device_win32(const char *source_name) { unsigned int len; if (NULL == source_name) return false; len = strlen(source_name); #ifdef HAVE_WIN32_CDROM if ((len == 2) && isalpha(source_name[0]) && (source_name[len-1] == ':')) return true; if ( ! WIN_NT ) return false; /* Test to see if of form: \\.\x: */ return ( (len == 6) && source_name[0] == '\\' && source_name[1] == '\\' && source_name[2] == '.' && source_name[3] == '\\' && isalpha(source_name[len-2]) && (source_name[len-1] == ':') ); #else return false; #endif } driver_return_code_t close_tray_win32 (const char *psz_win32_drive) { #ifdef HAVE_WIN32_CDROM #if 1 return open_close_media_win32(psz_win32_drive, MCI_SET_DOOR_CLOSED|MCI_WAIT); #else if ( WIN_NT ) { return close_tray_win32ioctl (psz_win32_drive); } else { return DRIVER_OP_UNSUPPORTED; /* not yet, but soon I hope */ } #endif #else return DRIVER_OP_UNSUPPORTED; #endif /* HAVE_WIN32_CDROM*/ } /*! Initialization routine. This is the only thing that doesn't get called via a function pointer. In fact *we* are the ones to set that up. */ CdIo_t * cdio_open_win32 (const char *psz_source_name) { #ifdef HAVE_WIN32_CDROM if ( WIN_NT ) { return cdio_open_am_win32(psz_source_name, "ioctl"); } else { return cdio_open_am_win32(psz_source_name, "ASPI"); } #else return NULL; #endif /* HAVE_WIN32_CDROM */ } /*! Initialization routine. This is the only thing that doesn't get called via a function pointer. In fact *we* are the ones to set that up. */ CdIo_t * cdio_open_am_win32 (const char *psz_orig_source, const char *psz_access_mode) { #ifdef HAVE_WIN32_CDROM CdIo_t *ret; _img_private_t *_data; char *psz_source; cdio_funcs_t _funcs; memset( &_funcs, 0, sizeof(_funcs) ); _funcs.audio_get_volume = audio_get_volume_win32; _funcs.audio_pause = audio_pause_win32; _funcs.audio_play_msf = audio_play_msf_win32; #if 0 _funcs.audio_play_track_index = audio_play_track_index_win32; #endif _funcs.audio_read_subchannel = audio_read_subchannel_win32; _funcs.audio_resume = audio_resume_win32; _funcs.audio_set_volume = audio_set_volume_win32; _funcs.audio_stop = audio_stop_win32; _funcs.eject_media = eject_media_win32; _funcs.free = free_win32; _funcs.get_arg = get_arg_win32; _funcs.get_cdtext = get_cdtext_generic; _funcs.get_default_device = cdio_get_default_device_win32; _funcs.get_devices = cdio_get_devices_win32; _funcs.get_disc_last_lsn = get_disc_last_lsn_win32; _funcs.get_discmode = get_discmode_win32; _funcs.get_drive_cap = get_drive_cap_mmc; _funcs.get_first_track_num = get_first_track_num_generic; _funcs.get_hwinfo = NULL; _funcs.get_media_changed = get_media_changed_mmc; _funcs.get_mcn = _cdio_get_mcn; _funcs.get_num_tracks = get_num_tracks_generic; _funcs.get_track_channels = get_track_channels_generic, _funcs.get_track_copy_permit = get_track_copy_permit_generic, _funcs.get_track_format = _cdio_get_track_format; _funcs.get_track_green = _cdio_get_track_green; _funcs.get_track_lba = NULL; /* This could be done if need be. */ _funcs.get_track_msf = _cdio_get_track_msf; _funcs.get_track_preemphasis = get_track_preemphasis_generic, _funcs.lseek = NULL; _funcs.read = NULL; _funcs.read_audio_sectors = read_audio_sectors; _funcs.read_data_sectors = read_data_sectors_win32; _funcs.read_mode1_sector = read_mode1_sector_win32; _funcs.read_mode1_sectors = read_mode1_sectors_win32; _funcs.read_mode2_sector = read_mode2_sector_win32; _funcs.read_mode2_sectors = read_mode2_sectors_win32; _funcs.read_toc = read_toc_win32; _funcs.run_mmc_cmd = run_mmc_cmd_win32; _funcs.set_arg = set_arg_win32; _funcs.set_blocksize = set_blocksize_mmc; _funcs.set_speed = set_drive_speed_mmc; _data = calloc(1, sizeof (_img_private_t)); _data->access_mode = str_to_access_mode_win32(psz_access_mode); _data->gen.init = false; _data->gen.fd = -1; if (NULL == psz_orig_source) { psz_source=cdio_get_default_device_win32(); if (NULL == psz_source) return NULL; set_arg_win32(_data, "source", psz_source); free(psz_source); } else { if (cdio_is_device_win32(psz_orig_source)) set_arg_win32(_data, "source", psz_orig_source); else { /* The below would be okay as an info message if all device drivers worked this way. */ cdio_debug ("source %s is a not a device", psz_orig_source); free(_data); return NULL; } } ret = cdio_new ((void *)_data, &_funcs); if (ret == NULL) return NULL; if (init_win32(_data)) return ret; else { free_win32 (_data); return NULL; } #else return NULL; #endif /* HAVE_WIN32_CDROM */ } bool cdio_have_win32 (void) { #ifdef HAVE_WIN32_CDROM return true; #else return false; #endif /* HAVE_WIN32_CDROM */ } libcdio-0.83/lib/driver/MSWindows/win32.h0000644000175000017500000001443611317300347015047 00000000000000/* $Id: win32.h,v 1.11 2008/04/21 18:30:21 karl Exp $ Copyright (C) 2004, 2005, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include "cdio_private.h" #pragma pack() typedef struct { lsn_t start_lsn; UCHAR Control : 4; UCHAR Format; cdtext_t cdtext; /* CD-TEXT */ } track_info_t; typedef enum { _AM_NONE, _AM_IOCTL, _AM_ASPI, _AM_MMC_RDWR, _AM_MMC_RDWR_EXCL, } access_mode_t; typedef struct { /* Things common to all drivers like this. This must be first. */ generic_img_private_t gen; access_mode_t access_mode; /* Some of the more OS specific things. */ /* Entry info for each track, add 1 for leadout. */ track_info_t tocent[CDIO_CD_MAX_TRACKS+1]; HANDLE h_device_handle; /* device descriptor */ long hASPI; short i_sid; short i_lun; long (*lpSendCommand)( void* ); bool b_ioctl_init; bool b_aspi_init; } _img_private_t; /*! Pause playing CD through analog output @param p_cdio the CD object to be acted upon. */ driver_return_code_t audio_pause_win32ioctl (void *p_user_data); /*! Playing starting at given MSF through analog output @param p_cdio the CD object to be acted upon. */ driver_return_code_t audio_play_msf_win32ioctl (void *p_user_data, msf_t *p_start_msf, msf_t *p_end_msf); /*! Resume playing an audio CD. @param p_cdio the CD object to be acted upon. */ driver_return_code_t audio_resume_win32ioctl (void *p_user_data); /*! Get disc type associated with cd object. */ discmode_t get_discmode_win32ioctl (_img_private_t *p_env); /*! Get the volume settings of an audio CD. @param p_cdio the CD object to be acted upon. */ driver_return_code_t audio_get_volume_win32ioctl ( void *p_user_data, /*out*/ cdio_audio_volume_t *p_volume); /*! Read Audio Subchannel information @param p_cdio the CD object to be acted upon. */ driver_return_code_t audio_read_subchannel_win32ioctl (void *p_user_data, cdio_subchannel_t *p_subchannel); /*! Set the volume of an audio CD. @param p_cdio the CD object to be acted upon. */ driver_return_code_t audio_stop_win32ioctl ( void *p_user_data ); /*! Set the volume of an audio CD. @param p_cdio the CD object to be acted upon. */ driver_return_code_t audio_set_volume_win32ioctl ( void *p_user_data, cdio_audio_volume_t *p_volume); /*! Close the tray of a CD-ROM @param p_user_data the CD object to be acted upon. */ driver_return_code_t close_tray_win32ioctl (const char *psz_win32_drive); /*! Reads an audio device using the DeviceIoControl method into data starting from lsn. Returns 0 if no error. */ int read_audio_sectors_win32ioctl (_img_private_t *p_obj, void *p_data, lsn_t lsn, unsigned int nblocks); /*! Reads a single mode2 sector using the DeviceIoControl method into data starting from lsn. Returns 0 if no error. */ int read_mode2_sector_win32ioctl (_img_private_t *p_env, void *p_data, lsn_t lsn, bool b_form2); /*! Reads a single mode1 sector using the DeviceIoControl method into data starting from lsn. Returns 0 if no error. */ int read_mode1_sector_win32ioctl (_img_private_t *p_env, void *p_data, lsn_t lsn, bool b_form2); const char *is_cdrom_win32ioctl (const char drive_letter); /*! Run a SCSI MMC command. env private CD structure i_timeout_ms time in milliseconds we will wait for the command to complete. If this value is -1, use the default time-out value. p_buf Buffer for data, both sending and receiving i_buf Size of buffer e_direction direction the transfer is to go. cdb CDB bytes. All values that are needed should be set on input. We'll figure out what the right CDB length should be. Return 0 if command completed successfully. */ int run_mmc_cmd_win32ioctl( void *p_user_data, unsigned int i_timeout, unsigned int i_cdb, const mmc_cdb_t * p_cdb, cdio_mmc_direction_t e_direction, unsigned int i_buf, /*in/out*/ void *p_buf ); /*! Initialize internal structures for CD device. */ bool init_win32ioctl (_img_private_t *p_env); /*! Read and cache the CD's Track Table of Contents and track info. Return true if successful or false if an error. */ bool read_toc_win32ioctl (_img_private_t *p_env); /*! Return the media catalog number MCN. Note: string is malloc'd so caller should free() then returned string when done with it. */ char *get_mcn_win32ioctl (const _img_private_t *p_env); /* Read cdtext information for a CdIo object . return true on success, false on error or CD-TEXT information does not exist. */ bool init_cdtext_win32ioctl (_img_private_t *p_env); /*! Return the the kind of drive capabilities of device. Note: string is malloc'd so caller should free() then returned string when done with it. */ void get_drive_cap_aspi (const _img_private_t *p_env, cdio_drive_read_cap_t *p_read_cap, cdio_drive_write_cap_t *p_write_cap, cdio_drive_misc_cap_t *p_misc_cap); /*! Return the the kind of drive capabilities of device. Note: string is malloc'd so caller should free() then returned string when done with it. */ void get_drive_cap_win32ioctl (const _img_private_t *p_env, cdio_drive_read_cap_t *p_read_cap, cdio_drive_write_cap_t *p_write_cap, cdio_drive_misc_cap_t *p_misc_cap); /*! Get the format (XA, DATA, AUDIO) of a track. */ track_format_t get_track_format_win32ioctl(const _img_private_t *p_env, track_t i_track); void set_cdtext_field_win32(void *user_data, track_t i_track, track_t i_first_track, cdtext_field_t e_field, const char *psz_value); libcdio-0.83/lib/driver/image/0000755000175000017500000000000011652210414013171 500000000000000libcdio-0.83/lib/driver/image/nrg.c0000644000175000017500000011557711650124174014070 00000000000000/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2011 Rocky Bernstein Copyright (C) 2001, 2003 Herbert Valerio Riedel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /*! This code implements low-level access functions for the Nero native CD-image format residing inside a disk file (*.nrg). */ #include "image.h" #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_GLOB_H #include #endif #include #include #include #include #include #include "cdio_assert.h" #include "_cdio_stdio.h" #include "nrg.h" static const char _rcsid[] = "$Id: nrg.c,v 1.31 2008/04/21 18:30:22 karl Exp $"; nero_id_t nero_id; nero_dtype_t nero_dtype; /* reader */ #define DEFAULT_CDIO_DEVICE "image.nrg" /* Link element of track structure as a linked list. Possibly redundant with above track_info_t */ typedef struct { uint32_t start_lsn; uint32_t sec_count; /* Number of sectors in track. Does not include pregap before next entry. */ uint64_t img_offset; /* Bytes offset from beginning of disk image file.*/ uint32_t blocksize; /* Number of bytes in a block */ } _mapping_t; #define NEED_NERO_STRUCT #include "image_common.h" static bool parse_nrg (_img_private_t *env, const char *psz_cue_name, const cdio_log_level_t log_level); static lsn_t get_disc_last_lsn_nrg (void *p_user_data); /* Updates internal track TOC, so we can later simulate ioctl(CDROMREADTOCENTRY). */ static void _register_mapping (_img_private_t *env, lsn_t start_lsn, uint32_t sec_count, uint64_t img_offset, uint32_t blocksize, track_format_t track_format, bool track_green) { const int track_num=env->gen.i_tracks; track_info_t *this_track=&(env->tocent[env->gen.i_tracks]); _mapping_t *_map = calloc(1, sizeof (_mapping_t)); _map->start_lsn = start_lsn; _map->sec_count = sec_count; _map->img_offset = img_offset; _map->blocksize = blocksize; if (!env->mapping) env->mapping = _cdio_list_new (); _cdio_list_append (env->mapping, _map); env->size = MAX (env->size, (start_lsn + sec_count)); /* Update *this_track and track_num. These structures are in a sense redundant witht the obj->mapping list. Perhaps one or the other can be eliminated. */ cdio_lba_to_msf (cdio_lsn_to_lba(start_lsn), &(this_track->start_msf)); this_track->start_lba = cdio_msf_to_lba(&this_track->start_msf); this_track->track_num = track_num+1; this_track->blocksize = blocksize; if (env->is_cues) this_track->datastart = img_offset; else this_track->datastart = 0; if (track_green) this_track->datastart += CDIO_CD_SUBHEADER_SIZE; this_track->sec_count = sec_count; this_track->track_format= track_format; this_track->track_green = track_green; switch (this_track->track_format) { case TRACK_FORMAT_AUDIO: this_track->blocksize = CDIO_CD_FRAMESIZE_RAW; this_track->datasize = CDIO_CD_FRAMESIZE_RAW; /*this_track->datastart = 0;*/ this_track->endsize = 0; break; case TRACK_FORMAT_CDI: this_track->datasize=CDIO_CD_FRAMESIZE; break; case TRACK_FORMAT_XA: if (track_green) { this_track->blocksize = CDIO_CD_FRAMESIZE; /*this_track->datastart = CDIO_CD_SYNC_SIZE + CDIO_CD_HEADER_SIZE;*/ this_track->datasize = M2RAW_SECTOR_SIZE; this_track->endsize = 0; } else { /*this_track->datastart = CDIO_CD_SYNC_SIZE + CDIO_CD_HEADER_SIZE + CDIO_CD_SUBHEADER_SIZE;*/ this_track->datasize = CDIO_CD_FRAMESIZE; this_track->endsize = CDIO_CD_SYNC_SIZE + CDIO_CD_ECC_SIZE; } break; case TRACK_FORMAT_DATA: if (track_green) { /*this_track->datastart = CDIO_CD_SYNC_SIZE + CDIO_CD_HEADER_SIZE;*/ this_track->datasize = CDIO_CD_FRAMESIZE; this_track->endsize = CDIO_CD_EDC_SIZE + CDIO_CD_M1F1_ZERO_SIZE + CDIO_CD_ECC_SIZE; } else { /* Is the below correct? */ /*this_track->datastart = 0;*/ this_track->datasize = CDIO_CD_FRAMESIZE; this_track->endsize = 0; } break; default: /*this_track->datasize=CDIO_CD_FRAMESIZE_RAW;*/ cdio_warn ("track %d has unknown format %d", env->gen.i_tracks, this_track->track_format); } env->gen.i_tracks++; cdio_debug ("start lsn: %lu sector count: %0lu -> %8ld (%08lx)", (long unsigned int) start_lsn, (long unsigned int) sec_count, (long unsigned int) img_offset, (long unsigned int) img_offset); } /* Disk and track information for a Nero file are located at the end of the file. This routine extracts that information. FIXME: right now psz_nrg_name is not used. It will be in the future. */ static bool parse_nrg (_img_private_t *p_env, const char *psz_nrg_name, const cdio_log_level_t log_level) { long unsigned int footer_start; long unsigned int size; char *footer_buf = NULL; if (!p_env) return false; size = cdio_stream_stat (p_env->gen.data_source); if (-1 == size) return false; { _footer_t buf; cdio_assert (sizeof (buf) == 12); cdio_stream_seek (p_env->gen.data_source, size - sizeof (buf), SEEK_SET); cdio_stream_read (p_env->gen.data_source, (void *) &buf, sizeof (buf), 1); if (buf.v50.ID == UINT32_TO_BE (NERO_ID)) { cdio_debug ("detected Nero version 5.0 (32-bit offsets) NRG magic"); footer_start = uint32_to_be (buf.v50.footer_ofs); } else if (buf.v55.ID == UINT32_TO_BE (NER5_ID)) { cdio_debug ("detected Nero version 5.5.x (64-bit offsets) NRG magic"); footer_start = uint64_from_be (buf.v55.footer_ofs); } else { cdio_log (log_level, "Image not recognized as either version 5.0 or " "version 5.5.x-6.x type NRG"); return false; } cdio_debug (".NRG footer start = %ld, length = %ld", (long) footer_start, (long) (size - footer_start)); cdio_assert ((size - footer_start) <= 4096); footer_buf = calloc(1, size - footer_start); cdio_stream_seek (p_env->gen.data_source, footer_start, SEEK_SET); cdio_stream_read (p_env->gen.data_source, footer_buf, size - footer_start, 1); } { int pos = 0; while (pos < size - footer_start) { _chunk_t *chunk = (void *) (footer_buf + pos); uint32_t opcode = UINT32_FROM_BE (chunk->id); bool break_out = false; switch (opcode) { case CUES_ID: /* "CUES" Seems to have sector size 2336 and 150 sector pregap seems to be included at beginning of image. */ case CUEX_ID: /* "CUEX" */ { unsigned entries = UINT32_FROM_BE (chunk->len); _cuex_array_t *_entries = (void *) chunk->data; cdio_assert (p_env->mapping == NULL); cdio_assert ( sizeof (_cuex_array_t) == 8 ); cdio_assert ( UINT32_FROM_BE (chunk->len) % sizeof(_cuex_array_t) == 0 ); entries /= sizeof (_cuex_array_t); if (CUES_ID == opcode) { lsn_t lsn = UINT32_FROM_BE (_entries[0].lsn); unsigned int idx; unsigned int i = 0; cdio_debug ("CUES type image detected" ); /* CUES LSN has 150 pregap include at beginning? -/ cdio_assert (lsn == 0?); */ p_env->is_cues = true; /* HACK alert. */ p_env->gen.i_tracks = 0; p_env->gen.i_first_track = 1; for (idx = 1; idx < entries-1; idx += 2, i++) { lsn_t sec_count; int cdte_format = _entries[idx].addr_ctrl / 16; int cdte_ctrl = _entries[idx].type >> 4; if ( COPY_PERMITTED & cdte_ctrl ) { if (p_env) p_env->tocent[i].flags |= COPY_PERMITTED; } else { if (p_env) p_env->tocent[i].flags &= ~COPY_PERMITTED; } if ( PRE_EMPHASIS & cdte_ctrl ) { if (p_env) p_env->tocent[i].flags |= PRE_EMPHASIS; } else { if (p_env) p_env->tocent[i].flags &= ~PRE_EMPHASIS; } if ( FOUR_CHANNEL_AUDIO & cdte_ctrl ) { if (p_env) p_env->tocent[i].flags |= FOUR_CHANNEL_AUDIO; } else { if (p_env) p_env->tocent[i].flags &= ~FOUR_CHANNEL_AUDIO; } cdio_assert (_entries[idx].track == _entries[idx + 1].track); /* lsn and sec_count*2 aren't correct, but it comes closer on the single example I have: svcdgs.nrg We are picking up the wrong fields and/or not interpreting them correctly. */ switch (cdte_format) { case 0: lsn = UINT32_FROM_BE (_entries[idx].lsn); break; case 1: { #if 0 msf_t msf = (msf_t) _entries[idx].lsn; lsn = cdio_msf_to_lsn(&msf); #else lsn = CDIO_INVALID_LSN; #endif cdio_log (log_level, "untested (i.e. probably wrong) CUE MSF code"); break; } default: lsn = CDIO_INVALID_LSN; cdio_log(log_level, "unknown cdte_format %d", cdte_format); } sec_count = UINT32_FROM_BE (_entries[idx + 1].lsn); _register_mapping (p_env, lsn, sec_count*2, (lsn+CDIO_PREGAP_SECTORS) * M2RAW_SECTOR_SIZE, M2RAW_SECTOR_SIZE, TRACK_FORMAT_XA, true); } } else { lsn_t lsn = UINT32_FROM_BE (_entries[0].lsn); unsigned int idx; unsigned int i = 0; cdio_debug ("CUEX type image detected"); /* LSN must start at -150 (LBA 0)? */ cdio_assert (lsn == -150); for (idx = 2; idx < entries; idx += 2, i++) { lsn_t sec_count; int cdte_format = _entries[idx].addr_ctrl >> 4; int cdte_ctrl = _entries[idx].type >> 4; if ( COPY_PERMITTED & cdte_ctrl ) { if (p_env) p_env->tocent[i].flags |= COPY_PERMITTED; } else { if (p_env) p_env->tocent[i].flags &= ~COPY_PERMITTED; } if ( PRE_EMPHASIS & cdte_ctrl ) { if (p_env) p_env->tocent[i].flags |= PRE_EMPHASIS; } else { if (p_env) p_env->tocent[i].flags &= ~PRE_EMPHASIS; } if ( FOUR_CHANNEL_AUDIO & cdte_ctrl ) { if (p_env) p_env->tocent[i].flags |= FOUR_CHANNEL_AUDIO; } else { if (p_env) p_env->tocent[i].flags &= ~FOUR_CHANNEL_AUDIO; } /* extractnrg.pl has cdte_format for LBA's 0, and for MSF 1. ??? FIXME: Should decode as appropriate for cdte_format. */ cdio_assert ( cdte_format == 0 || cdte_format == 1 ); cdio_assert (_entries[idx].track != _entries[idx + 1].track); lsn = UINT32_FROM_BE (_entries[idx].lsn); sec_count = UINT32_FROM_BE (_entries[idx + 1].lsn); _register_mapping (p_env, lsn, sec_count - lsn, (lsn + CDIO_PREGAP_SECTORS)*M2RAW_SECTOR_SIZE, M2RAW_SECTOR_SIZE, TRACK_FORMAT_XA, true); } } break; } case DAOX_ID: /* "DAOX" */ case DAOI_ID: /* "DAOI" */ { _daox_t *_xentries = NULL; _daoi_t *_ientries = NULL; _dao_array_common_t *_dao_array_common = NULL; _dao_common_t *_dao_common = (void *) chunk->data; int disc_mode = _dao_common->unknown[1]; track_format_t track_format; int i; /* We include an extra 0 byte so these can be used as C strings.*/ p_env->psz_mcn = calloc(1, CDIO_MCN_SIZE+1); memcpy(p_env->psz_mcn, &(_dao_common->psz_mcn), CDIO_MCN_SIZE); p_env->psz_mcn[CDIO_MCN_SIZE] = '\0'; if (DAOX_ID == opcode) { _xentries = (void *) chunk->data; p_env->dtyp = _xentries->track_info[0].common.unknown[2]; } else { _ientries = (void *) chunk->data; p_env->dtyp = _ientries->track_info[0].common.unknown[2]; } p_env->is_dao = true; cdio_debug ("DAO%c tag detected, track format %d, mode %x\n", opcode==DAOX_ID ? 'X': 'I', p_env->dtyp, disc_mode); switch (p_env->dtyp) { case 0: /* Mode 1 */ track_format = TRACK_FORMAT_DATA; p_env->disc_mode = CDIO_DISC_MODE_CD_DATA; break; case 2: /* Mode 2 form 1 */ disc_mode = 0; track_format = TRACK_FORMAT_XA; p_env->disc_mode = CDIO_DISC_MODE_CD_XA; break; case 3: /* Mode 2 */ track_format = TRACK_FORMAT_XA; p_env->disc_mode = CDIO_DISC_MODE_CD_XA; /* ?? */ break; case 0x6: /* Mode2 form mix */ track_format = TRACK_FORMAT_XA; p_env->disc_mode = CDIO_DISC_MODE_CD_MIXED; break; case 0x20: /* ??? Mode2 form 2, Mode2 raw?? */ track_format = TRACK_FORMAT_XA; p_env->disc_mode = CDIO_DISC_MODE_CD_XA; /* ??. */ break; case 0x7: track_format = TRACK_FORMAT_AUDIO; p_env->disc_mode = CDIO_DISC_MODE_CD_DA; break; default: cdio_log (log_level, "Unknown track format %x\n", p_env->dtyp); track_format = TRACK_FORMAT_AUDIO; } if (0 == disc_mode) { for (i=0; igen.i_tracks; i++) { cdtext_init (&(p_env->gen.cdtext_track[i])); p_env->tocent[i].track_format= track_format; p_env->tocent[i].datastart = 0; p_env->tocent[i].track_green = false; if (TRACK_FORMAT_AUDIO == track_format) { p_env->tocent[i].blocksize = CDIO_CD_FRAMESIZE_RAW; p_env->tocent[i].datasize = CDIO_CD_FRAMESIZE_RAW; p_env->tocent[i].endsize = 0; } else { p_env->tocent[i].datasize = CDIO_CD_FRAMESIZE; p_env->tocent[i].datastart = 0; } } } else if (2 == disc_mode) { for (i=0; igen.i_tracks; i++) { cdtext_init (&(p_env->gen.cdtext_track[i])); p_env->tocent[i].track_green = true; p_env->tocent[i].track_format= track_format; p_env->tocent[i].datasize = CDIO_CD_FRAMESIZE; if (TRACK_FORMAT_XA == track_format) { p_env->tocent[i].datastart = CDIO_CD_SYNC_SIZE + CDIO_CD_HEADER_SIZE + CDIO_CD_SUBHEADER_SIZE; p_env->tocent[i].endsize = CDIO_CD_SYNC_SIZE + CDIO_CD_ECC_SIZE; } else { p_env->tocent[i].datastart = CDIO_CD_SYNC_SIZE + CDIO_CD_HEADER_SIZE; p_env->tocent[i].endsize = CDIO_CD_EDC_SIZE + CDIO_CD_M1F1_ZERO_SIZE + CDIO_CD_ECC_SIZE; } } } else if (0x20 == disc_mode) { cdio_debug ("Mixed mode CD?\n"); } else { /* Mixed mode CD */ cdio_log (log_level, "Don't know if mode 1, mode 2 or mixed: %x\n", disc_mode); } for (i=0; igen.i_tracks; i++) { if (DAOX_ID == opcode) { _dao_array_common = &_xentries->track_info[i].common; } else { _dao_array_common = &_ientries->track_info[i].common; } p_env->tocent[i].isrc = calloc(1, CDIO_ISRC_SIZE+1); memcpy(p_env->tocent[i].isrc, _dao_array_common->psz_isrc, CDIO_ISRC_SIZE); p_env->tocent[i].isrc[CDIO_ISRC_SIZE] = '\0'; if (p_env->tocent[i].isrc[0]) { cdio_info("nrg isrc has value \"%s\"", p_env->tocent[i].isrc); } if (!p_env->tocent[i].datasize) { continue; } if (DAOX_ID == opcode) { p_env->tocent[i].pregap = (uint64_from_be (_xentries->track_info[i].index0)) / (p_env->tocent[i].datasize); } else { p_env->tocent[i].pregap = (uint32_from_be (_ientries->track_info[i].index0)) / (p_env->tocent[i].datasize); } } break; } case NERO_ID: case NER5_ID: cdio_error ("unexpected nrg magic ID NER%c detected", opcode==NERO_ID ? 'O': '5'); free(footer_buf); return false; case END1_ID: /* "END!" */ cdio_debug ("nrg end tag detected"); break_out = true; break; case ETNF_ID: /* "ETNF" */ { unsigned entries = UINT32_FROM_BE (chunk->len); _etnf_array_t *_entries = (void *) chunk->data; cdio_assert (p_env->mapping == NULL); cdio_assert ( sizeof (_etnf_array_t) == 20 ); cdio_assert ( UINT32_FROM_BE(chunk->len) % sizeof(_etnf_array_t) == 0 ); entries /= sizeof (_etnf_array_t); cdio_debug ("SAO type image (ETNF) detected"); { int idx; for (idx = 0; idx < entries; idx++) { uint32_t _len = UINT32_FROM_BE (_entries[idx].length); uint32_t _start = UINT32_FROM_BE (_entries[idx].start_lsn); uint32_t _start2 = UINT32_FROM_BE (_entries[idx].start); uint32_t track_mode= uint32_from_be (_entries[idx].type); bool track_green = true; track_format_t track_format = TRACK_FORMAT_XA; uint16_t blocksize; switch (track_mode) { case 0: /* Mode 1 */ track_format = TRACK_FORMAT_DATA; track_green = false; /* ?? */ blocksize = CDIO_CD_FRAMESIZE; p_env->disc_mode = CDIO_DISC_MODE_CD_DATA; cdio_debug ("Format DATA, blocksize %u", CDIO_CD_FRAMESIZE); break; case 2: /* Mode 2 form 1 */ track_format = TRACK_FORMAT_XA; track_green = false; /* ?? */ blocksize = CDIO_CD_FRAMESIZE; p_env->disc_mode = CDIO_DISC_MODE_CD_XA; cdio_debug ("Format XA, blocksize %u", CDIO_CD_FRAMESIZE); break; case 3: /* Mode 2 */ track_format = TRACK_FORMAT_XA; track_green = true; blocksize = M2RAW_SECTOR_SIZE; p_env->disc_mode = CDIO_DISC_MODE_CD_XA; /* ?? */ cdio_debug ("Format XA, blocksize %u", M2RAW_SECTOR_SIZE); break; case 06: /* Mode2 form mix */ track_format = TRACK_FORMAT_XA; track_green = true; blocksize = M2RAW_SECTOR_SIZE; p_env->disc_mode = CDIO_DISC_MODE_CD_MIXED; cdio_debug ("Format MIXED CD, blocksize %u", M2RAW_SECTOR_SIZE); break; case 0x20: /* ??? Mode2 form 2, Mode2 raw?? */ track_format = TRACK_FORMAT_XA; track_green = true; blocksize = M2RAW_SECTOR_SIZE; p_env->disc_mode = CDIO_DISC_MODE_CD_XA; /* ??. */ cdio_debug ("Format MIXED CD, blocksize %u", M2RAW_SECTOR_SIZE); break; case 7: track_format = TRACK_FORMAT_AUDIO; track_green = false; blocksize = CDIO_CD_FRAMESIZE_RAW; p_env->disc_mode = CDIO_DISC_MODE_CD_DA; cdio_debug ("Format CD_DA, blocksize %u", CDIO_CD_FRAMESIZE_RAW); break; default: cdio_log (log_level, "Don't know how to handle track mode (%lu)?", (long unsigned int) track_mode); free(footer_buf); return false; } cdio_assert (_len % blocksize == 0); _len /= blocksize; cdio_assert (_start * blocksize == _start2); _start += idx * CDIO_PREGAP_SECTORS; _register_mapping (p_env, _start, _len, _start2, blocksize, track_format, track_green); } } break; } case ETN2_ID: { /* "ETN2", same as above, but with 64bit stuff instead */ unsigned entries = uint32_from_be (chunk->len); _etn2_array_t *_entries = (void *) chunk->data; cdio_assert (p_env->mapping == NULL); cdio_assert (sizeof (_etn2_array_t) == 32); cdio_assert (uint32_from_be (chunk->len) % sizeof (_etn2_array_t) == 0); entries /= sizeof (_etn2_array_t); cdio_debug ("SAO type image (ETN2) detected"); { int idx; for (idx = 0; idx < entries; idx++) { uint32_t _len = uint64_from_be (_entries[idx].length); uint32_t _start = uint32_from_be (_entries[idx].start_lsn); uint32_t _start2 = uint64_from_be (_entries[idx].start); uint32_t track_mode= uint32_from_be (_entries[idx].type); bool track_green = true; track_format_t track_format = TRACK_FORMAT_XA; uint16_t blocksize; switch (track_mode) { case 0: track_format = TRACK_FORMAT_DATA; track_green = false; /* ?? */ blocksize = CDIO_CD_FRAMESIZE; break; case 2: track_format = TRACK_FORMAT_XA; track_green = false; /* ?? */ blocksize = CDIO_CD_FRAMESIZE; break; case 3: track_format = TRACK_FORMAT_XA; track_green = true; blocksize = M2RAW_SECTOR_SIZE; break; case 7: track_format = TRACK_FORMAT_AUDIO; track_green = false; blocksize = CDIO_CD_FRAMESIZE_RAW; break; default: cdio_log (log_level, "Don't know how to handle track mode (%lu)?", (long unsigned int) track_mode); free(footer_buf); return false; } if (_len % blocksize != 0) { cdio_log (log_level, "length is not a multiple of blocksize " "len %lu, size %d, rem %lu", (long unsigned int) _len, blocksize, (long unsigned int) _len % blocksize); if (0 == _len % CDIO_CD_FRAMESIZE) { cdio_log(log_level, "Adjusting blocksize to %d", CDIO_CD_FRAMESIZE); blocksize = CDIO_CD_FRAMESIZE; } else if (0 == _len % M2RAW_SECTOR_SIZE) { cdio_log(log_level, "Adjusting blocksize to %d", M2RAW_SECTOR_SIZE); blocksize = M2RAW_SECTOR_SIZE; } else if (0 == _len % CDIO_CD_FRAMESIZE_RAW) { cdio_log(log_level, "Adjusting blocksize to %d", CDIO_CD_FRAMESIZE_RAW); blocksize = CDIO_CD_FRAMESIZE_RAW; } } _len /= blocksize; if (_start * blocksize != _start2) { cdio_log (log_level, "%lu * %d != %lu", (long unsigned int) _start, blocksize, (long unsigned int) _start2); if (_start * CDIO_CD_FRAMESIZE == _start2) { cdio_log(log_level, "Adjusting blocksize to %d", CDIO_CD_FRAMESIZE); blocksize = CDIO_CD_FRAMESIZE; } else if (_start * M2RAW_SECTOR_SIZE == _start2) { cdio_log(log_level, "Adjusting blocksize to %d", M2RAW_SECTOR_SIZE); blocksize = M2RAW_SECTOR_SIZE; } else if (_start * CDIO_CD_FRAMESIZE_RAW == _start2) { cdio_log(log_level, "Adjusting blocksize to %d", CDIO_CD_FRAMESIZE_RAW); blocksize = CDIO_CD_FRAMESIZE_RAW; } } _start += idx * CDIO_PREGAP_SECTORS; _register_mapping (p_env, _start, _len, _start2, blocksize, track_format, track_green); } } break; } case SINF_ID: { /* "SINF" */ uint32_t _sessions; cdio_assert (UINT32_FROM_BE (chunk->len) == 4); memcpy(&_sessions, chunk->data, 4); cdio_debug ("SINF: %lu sessions", (long unsigned int) UINT32_FROM_BE (_sessions)); } break; case MTYP_ID: { /* "MTYP" */ uint32_t mtyp_be; uint32_t mtyp; cdio_assert (UINT32_FROM_BE (chunk->len) == 4); memcpy(&mtyp_be, chunk->data, 4); mtyp = UINT32_FROM_BE (mtyp_be); cdio_debug ("MTYP: %lu", (long unsigned int) mtyp); if (mtyp != MTYP_AUDIO_CD) { cdio_log (log_level, "Unknown MTYP value: %u", (unsigned int) mtyp); } p_env->mtyp = mtyp; } break; case CDTX_ID: { /* "CD TEXT" */ uint8_t *wdata = (uint8_t *) chunk->data; int len = UINT32_FROM_BE (chunk->len); cdio_assert (len % sizeof (CDText_data_t) == 0); cdtext_data_init (&p_env->gen, p_env->gen.i_first_track, &wdata[-4], len, set_cdtext_field_generic); break; } default: cdio_log (log_level, "unknown tag %8.8x seen", (unsigned int) UINT32_FROM_BE (chunk->id)); break; } if (break_out) break; pos += 8; pos += UINT32_FROM_BE (chunk->len); } } /* Fake out leadout track. */ /* Don't use get_disc_last_lsn_nrg since that will lead to recursion since we haven't fully initialized things yet. */ cdio_lsn_to_msf (p_env->size, &p_env->tocent[p_env->gen.i_tracks].start_msf); p_env->tocent[p_env->gen.i_tracks].start_lba = cdio_lsn_to_lba(p_env->size); p_env->tocent[p_env->gen.i_tracks-1].sec_count = cdio_lsn_to_lba(p_env->size - p_env->tocent[p_env->gen.i_tracks-1].start_lba); p_env->gen.b_cdtext_init = true; p_env->gen.b_cdtext_error = false; p_env->gen.toc_init = true; free(footer_buf); return true; } /*! Initialize image structures. */ static bool _init_nrg (_img_private_t *p_env) { if (p_env->gen.init) { cdio_error ("init called more than once"); return false; } if (!(p_env->gen.data_source = cdio_stdio_new (p_env->gen.source_name))) { cdio_warn ("can't open nrg image file %s for reading", p_env->gen.source_name); return false; } p_env->psz_mcn = NULL; p_env->disc_mode = CDIO_DISC_MODE_NO_INFO; cdtext_init (&(p_env->gen.cdtext)); if ( !parse_nrg (p_env, p_env->gen.source_name, CDIO_LOG_WARN) ) { cdio_warn ("image file %s is not a Nero image", p_env->gen.source_name); return false; } p_env->gen.init = true; return true; } /*! Reads into buf the next size bytes. Returns -1 on error. Would be libc's seek() but we have to adjust for the extra track header information in each sector. */ static off_t _lseek_nrg (void *p_user_data, off_t offset, int whence) { _img_private_t *p_env = p_user_data; /* real_offset is the real byte offset inside the disk image The number below was determined empirically. */ off_t real_offset= p_env->is_dao ? 0x4b000 : 0; unsigned int i; p_env->pos.lba = 0; for (i=0; igen.i_tracks; i++) { track_info_t *this_track=&(p_env->tocent[i]); p_env->pos.index = i; if ( (this_track->sec_count*this_track->datasize) >= offset) { int blocks = offset / this_track->datasize; int rem = offset % this_track->datasize; int block_offset = blocks * this_track->blocksize; real_offset += block_offset + rem; p_env->pos.buff_offset = rem; p_env->pos.lba += blocks; break; } real_offset += this_track->sec_count*this_track->blocksize; offset -= this_track->sec_count*this_track->datasize; p_env->pos.lba += this_track->sec_count; } if (i==p_env->gen.i_tracks) { cdio_warn ("seeking outside range of disk image"); return -1; } else real_offset += p_env->tocent[i].datastart; return cdio_stream_seek(p_env->gen.data_source, real_offset, whence); } /*! Reads into buf the next size bytes. Returns -1 on error. FIXME: At present we assume a read doesn't cross sector or track boundaries. */ static ssize_t _read_nrg (void *p_user_data, void *buf, size_t size) { _img_private_t *p_env = p_user_data; return cdio_stream_read(p_env->gen.data_source, buf, size, 1); } /*! Get the size of the CD in logical block address (LBA) units. @param p_cdio the CD object queried @return the lsn. On error 0 or CDIO_INVALD_LSN. */ static lsn_t get_disc_last_lsn_nrg (void *p_user_data) { _img_private_t *p_env = p_user_data; return p_env->size; } /*! Reads a single audio sector from CD device into data starting from LSN. */ static driver_return_code_t _read_audio_sectors_nrg (void *p_user_data, void *data, lsn_t lsn, unsigned int nblocks) { _img_private_t *p_env = p_user_data; CdioListNode_t *node; if (lsn >= p_env->size) { cdio_warn ("trying to read beyond image size (%lu >= %lu)", (long unsigned int) lsn, (long unsigned int) p_env->size); return -1; } if (p_env->is_dao) { int ret; ret = cdio_stream_seek (p_env->gen.data_source, (lsn + CDIO_PREGAP_SECTORS) * CDIO_CD_FRAMESIZE_RAW, SEEK_SET); if (ret!=0) return ret; ret = cdio_stream_read (p_env->gen.data_source, data, CDIO_CD_FRAMESIZE_RAW, nblocks); /* ret is number of bytes if okay, but we need to return 0 okay. */ return ret == 0; } _CDIO_LIST_FOREACH (node, p_env->mapping) { _mapping_t *_map = _cdio_list_node_data (node); if (IN (lsn, _map->start_lsn, (_map->start_lsn + _map->sec_count - 1))) { int ret; long int img_offset = _map->img_offset; img_offset += (lsn - _map->start_lsn) * CDIO_CD_FRAMESIZE_RAW; ret = cdio_stream_seek (p_env->gen.data_source, img_offset, SEEK_SET); if (ret!=0) return ret; ret = cdio_stream_read (p_env->gen.data_source, data, CDIO_CD_FRAMESIZE_RAW, nblocks); if (ret==0) return ret; break; } } if (!node) cdio_warn ("reading into pre gap (lsn %lu)", (long unsigned int) lsn); return 0; } static driver_return_code_t _read_mode1_sector_nrg (void *p_user_data, void *data, lsn_t lsn, bool b_form2) { _img_private_t *p_env = p_user_data; char buf[CDIO_CD_FRAMESIZE_RAW] = { 0, }; CdioListNode_t *node; if (lsn >= p_env->size) { cdio_warn ("trying to read beyond image size (%lu >= %lu)", (long unsigned int) lsn, (long unsigned int) p_env->size); return -1; } _CDIO_LIST_FOREACH (node, p_env->mapping) { _mapping_t *_map = _cdio_list_node_data (node); if (IN (lsn, _map->start_lsn, (_map->start_lsn + _map->sec_count - 1))) { int ret; long int img_offset = _map->img_offset; img_offset += (lsn - _map->start_lsn) * _map->blocksize; ret = cdio_stream_seek (p_env->gen.data_source, img_offset, SEEK_SET); if (ret!=0) return ret; /* FIXME: Not completely sure the below is correct. */ ret = cdio_stream_read (p_env->gen.data_source, (M2RAW_SECTOR_SIZE == _map->blocksize) ? (buf + CDIO_CD_SYNC_SIZE + CDIO_CD_HEADER_SIZE) : buf, _map->blocksize, 1); if (ret==0) return ret; break; } } if (!node) cdio_warn ("reading into pre gap (lsn %lu)", (long unsigned int) lsn); memcpy (data, buf + CDIO_CD_SYNC_SIZE + CDIO_CD_HEADER_SIZE, b_form2 ? M2RAW_SECTOR_SIZE: CDIO_CD_FRAMESIZE); return 0; } /*! Reads nblocks of mode2 sectors from cd device into data starting from lsn. */ static driver_return_code_t _read_mode1_sectors_nrg (void *p_user_data, void *data, lsn_t lsn, bool b_form2, unsigned nblocks) { _img_private_t *p_env = p_user_data; int i; int retval; unsigned int blocksize = b_form2 ? M2RAW_SECTOR_SIZE : CDIO_CD_FRAMESIZE; for (i = 0; i < nblocks; i++) { if ( (retval = _read_mode1_sector_nrg (p_env, ((char *)data) + (blocksize * i), lsn + i, b_form2)) ) return retval; } return 0; } static driver_return_code_t _read_mode2_sector_nrg (void *p_user_data, void *data, lsn_t lsn, bool b_form2) { _img_private_t *p_env = p_user_data; char buf[CDIO_CD_FRAMESIZE_RAW] = { 0, }; CdioListNode_t *node; if (lsn >= p_env->size) { cdio_warn ("trying to read beyond image size (%lu >= %lu)", (long unsigned int) lsn, (long unsigned int) p_env->size); return -1; } _CDIO_LIST_FOREACH (node, p_env->mapping) { _mapping_t *_map = _cdio_list_node_data (node); if (IN (lsn, _map->start_lsn, (_map->start_lsn + _map->sec_count - 1))) { int ret; long int img_offset = _map->img_offset; img_offset += (lsn - _map->start_lsn) * _map->blocksize; ret = cdio_stream_seek (p_env->gen.data_source, img_offset, SEEK_SET); if (ret!=0) return ret; ret = cdio_stream_read (p_env->gen.data_source, (M2RAW_SECTOR_SIZE == _map->blocksize) ? (buf + CDIO_CD_SYNC_SIZE + CDIO_CD_HEADER_SIZE) : buf, _map->blocksize, 1); if (ret==0) return ret; break; } } if (!node) cdio_warn ("reading into pre gap (lsn %lu)", (long unsigned int) lsn); if (b_form2) memcpy (data, buf + CDIO_CD_SYNC_SIZE + CDIO_CD_HEADER_SIZE, M2RAW_SECTOR_SIZE); else memcpy (data, buf + CDIO_CD_XA_SYNC_HEADER, CDIO_CD_FRAMESIZE); return 0; } /*! Reads nblocks of mode2 sectors from cd device into data starting from lsn. Returns 0 if no error. */ static driver_return_code_t _read_mode2_sectors_nrg (void *p_user_data, void *data, lsn_t lsn, bool b_form2, unsigned nblocks) { _img_private_t *p_env = p_user_data; int i; int retval; unsigned int blocksize = b_form2 ? M2RAW_SECTOR_SIZE : CDIO_CD_FRAMESIZE; for (i = 0; i < nblocks; i++) { if ( (retval = _read_mode2_sector_nrg (p_env, ((char *)data) + (blocksize * i), lsn + i, b_form2)) ) return retval; } return 0; } /* Free memory resources associated with NRG object. */ static void _free_nrg (void *p_user_data) { _img_private_t *p_env = p_user_data; if (NULL == p_env) return; if (NULL != p_env->mapping) _cdio_list_free (p_env->mapping, true); /* The remaining part of the image is like the other image drivers, so free that in the same way. */ _free_image(p_user_data); } /*! Eject media -- there's nothing to do here except free resources. We always return 2. */ static driver_return_code_t _eject_media_nrg(void *obj) { _free_nrg (obj); return DRIVER_OP_UNSUPPORTED; } /*! Return an array of strings giving possible NRG disk images. */ char ** cdio_get_devices_nrg (void) { char **drives = NULL; unsigned int num_files=0; #ifdef HAVE_GLOB_H unsigned int i; glob_t globbuf; globbuf.gl_offs = 0; glob("*.nrg", GLOB_DOOFFS, NULL, &globbuf); for (i=0; ipsz_vendor, "libcdio", sizeof(hw_info->psz_vendor)-1); hw_info->psz_vendor[sizeof(hw_info->psz_vendor)-1] = '\0'; strncpy(hw_info->psz_model, "Nero", sizeof(hw_info->psz_model)-1); hw_info->psz_model[sizeof(hw_info->psz_model)-1] = '\0'; strncpy(hw_info->psz_revision, CDIO_VERSION, sizeof(hw_info->psz_revision)-1); hw_info->psz_revision[sizeof(hw_info->psz_revision)-1] = '\0'; return true; } /*! Return the number of tracks in the current medium. CDIO_INVALID_TRACK is returned on error. */ static track_format_t get_track_format_nrg(void *p_user_data, track_t track_num) { _img_private_t *p_env = p_user_data; if (track_num > p_env->gen.i_tracks || track_num == 0) return TRACK_FORMAT_ERROR; if ( p_env->dtyp != DTYP_INVALID) { switch (p_env->dtyp) { case DTYP_MODE2_XA: return TRACK_FORMAT_XA; case DTYP_MODE1: return TRACK_FORMAT_DATA; default: ; } } /*if ( MTYP_AUDIO_CD == p_env->mtyp) return TRACK_FORMAT_AUDIO; */ return p_env->tocent[track_num-1].track_format; } /*! Return true if we have XA data (green, mode2 form1) or XA data (green, mode2 form2). That is track begins: sync - header - subheader 12 4 - 8 FIXME: there's gotta be a better design for this and get_track_format? */ static bool _get_track_green_nrg(void *p_user_data, track_t track_num) { _img_private_t *p_env = p_user_data; if (track_num > p_env->gen.i_tracks || track_num == 0) return false; if ( MTYP_AUDIO_CD == p_env->mtyp) return false; return p_env->tocent[track_num-1].track_green; } /*! Check that a NRG file is valid. */ bool cdio_is_nrg(const char *psz_nrg) { _img_private_t env; bool is_nrg = false; if (psz_nrg == NULL) return false; memset(&env, 0, sizeof(env)); if (!(env.gen.data_source = cdio_stdio_new (psz_nrg))) { cdio_warn ("can't open nrg image file %s for reading", psz_nrg); return false; } if (parse_nrg(&env, psz_nrg, CDIO_LOG_INFO)) { is_nrg = true; #ifdef ALSO_TEST_NAME size_t psz_len; psz_len = strlen(psz_nrg); /* At least 4 characters needed for .nrg extension */ if ( psz_len < 4 ) return false; is_nrg = strncasecmp( psz_nrg+(psz_len-3), "nrg", 3 ) == 0; #endif } cdio_stdio_destroy(env.gen.data_source); return is_nrg; } /*! Initialization routine. This is the only thing that doesn't get called via a function pointer. In fact *we* are the ones to set that up. */ CdIo * cdio_open_am_nrg (const char *psz_source_name, const char *psz_access_mode) { if (psz_access_mode != NULL && strcmp(psz_access_mode, "image")) cdio_warn ("there is only one access mode for nrg. Arg %s ignored", psz_access_mode); return cdio_open_nrg(psz_source_name); } CdIo * cdio_open_nrg (const char *psz_source) { CdIo *ret; _img_private_t *_data; cdio_funcs_t _funcs; memset( &_funcs, 0, sizeof(_funcs) ); _funcs.eject_media = _eject_media_nrg; _funcs.free = _free_nrg; _funcs.get_arg = _get_arg_image; _funcs.get_cdtext = get_cdtext_generic; _funcs.get_devices = cdio_get_devices_nrg; _funcs.get_default_device = cdio_get_default_device_nrg; _funcs.get_disc_last_lsn = get_disc_last_lsn_nrg; _funcs.get_discmode = _get_discmode_image; _funcs.get_drive_cap = _get_drive_cap_image; _funcs.get_first_track_num = _get_first_track_num_image; _funcs.get_hwinfo = get_hwinfo_nrg; _funcs.get_media_changed = get_media_changed_image; _funcs.get_mcn = _get_mcn_image; _funcs.get_num_tracks = _get_num_tracks_image; _funcs.get_track_channels = get_track_channels_generic; _funcs.get_track_copy_permit = get_track_copy_permit_image; _funcs.get_track_format = get_track_format_nrg; _funcs.get_track_green = _get_track_green_nrg; _funcs.get_track_lba = NULL; /* Will use generic routine via msf */ _funcs.get_track_msf = _get_track_msf_image; _funcs.get_track_preemphasis = get_track_preemphasis_generic; _funcs.get_track_pregap_lba = get_track_pregap_lba_image; _funcs.get_track_isrc = get_track_isrc_image; _funcs.lseek = _lseek_nrg; _funcs.read = _read_nrg; _funcs.read_audio_sectors = _read_audio_sectors_nrg; _funcs.read_data_sectors = read_data_sectors_image; _funcs.read_mode1_sector = _read_mode1_sector_nrg; _funcs.read_mode1_sectors = _read_mode1_sectors_nrg; _funcs.read_mode2_sector = _read_mode2_sector_nrg; _funcs.read_mode2_sectors = _read_mode2_sectors_nrg; _funcs.run_mmc_cmd = NULL; _funcs.set_arg = _set_arg_image; _data = calloc(1, sizeof (_img_private_t)); _data->gen.init = false; _data->gen.i_tracks = 0; _data->mtyp = 0; _data->dtyp = DTYP_INVALID; _data->gen.i_first_track= 1; _data->is_dao = false; _data->is_cues = false; /* FIXME: remove is_cues. */ ret = cdio_new ((void *)_data, &_funcs); if (ret == NULL) { free(_data); return NULL; } ret->driver_id = DRIVER_NRG; _set_arg_image(_data, "source", (NULL == psz_source) ? DEFAULT_CDIO_DEVICE: psz_source); _set_arg_image (_data, "access-mode", "Nero"); _data->psz_cue_name = strdup(_get_arg_image(_data, "source")); if (!cdio_is_nrg(_data->psz_cue_name)) { cdio_debug ("source name %s is not recognized as a NRG image", _data->psz_cue_name); _free_nrg(_data); free(ret); return NULL; } if (_init_nrg(_data)) return ret; else { _free_nrg(_data); free(ret); return NULL; } } bool cdio_have_nrg (void) { return true; } libcdio-0.83/lib/driver/image/Makefile0000644000175000017500000000155111114145233014552 00000000000000# $Id: Makefile,v 1.2 2008/04/21 18:30:22 karl Exp $ # # Copyright (C) 2004, 2008 Rocky Bernstein # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # The make is done above. This boilerplate Makefile just transfers the call all install check clean: cd .. && $(MAKE) $@ libcdio-0.83/lib/driver/image/bincue.c0000644000175000017500000010502711650122664014536 00000000000000/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2008, 2011 Rocky Bernstein Copyright (C) 2001 Herbert Valerio Riedel cue parsing routine adapted from cuetools Copyright (C) 2003 Svend Sanjay Sorensen This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* This code implements low-level access functions for a CD images residing inside a disk file (*.bin) and its associated cue sheet. (*.cue). */ #include "image.h" #include "cdio_assert.h" #include "cdio_private.h" #include "_cdio_stdio.h" #include #include #include #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_STRINGS_H #include #endif #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_GLOB_H #include #endif #include #include "portable.h" /* reader */ #define DEFAULT_CDIO_DEVICE "videocd.bin" #define DEFAULT_CDIO_CUE "videocd.cue" static lsn_t get_disc_last_lsn_bincue (void *p_user_data); #include "image_common.h" static bool parse_cuefile (_img_private_t *cd, const char *toc_name); /*! Initialize image structures. */ static bool _init_bincue (_img_private_t *p_env) { lsn_t lead_lsn; if (p_env->gen.init) return false; if (!(p_env->gen.data_source = cdio_stdio_new (p_env->gen.source_name))) { cdio_warn ("init failed"); return false; } /* Have to set init before calling get_disc_last_lsn_bincue() or we will get into infinite recursion calling passing right here. */ p_env->gen.init = true; p_env->gen.i_first_track = 1; p_env->psz_mcn = NULL; p_env->disc_mode = CDIO_DISC_MODE_NO_INFO; cdtext_init (&(p_env->gen.cdtext)); lead_lsn = get_disc_last_lsn_bincue( (_img_private_t *) p_env); if (-1 == lead_lsn) return false; if ((p_env->psz_cue_name == NULL)) return false; /* Read in CUE sheet. */ if ( !parse_cuefile(p_env, p_env->psz_cue_name) ) return false; /* Fake out leadout track and sector count for last track*/ cdio_lsn_to_msf (lead_lsn, &p_env->tocent[p_env->gen.i_tracks].start_msf); p_env->tocent[p_env->gen.i_tracks].start_lba = cdio_lsn_to_lba(lead_lsn); p_env->tocent[p_env->gen.i_tracks - p_env->gen.i_first_track].sec_count = cdio_lsn_to_lba(lead_lsn - p_env->tocent[p_env->gen.i_tracks - p_env->gen.i_first_track].start_lba); return true; } /*! Reads into buf the next size bytes. Returns -1 on error. Would be libc's seek() but we have to adjust for the extra track header information in each sector. */ static off_t _lseek_bincue (void *p_user_data, off_t offset, int whence) { _img_private_t *p_env = p_user_data; /* real_offset is the real byte offset inside the disk image The number below was determined empirically. I'm guessing the 1st 24 bytes of a bin file are used for something. */ off_t real_offset=0; unsigned int i; p_env->pos.lba = 0; for (i=0; igen.i_tracks; i++) { track_info_t *this_track=&(p_env->tocent[i]); p_env->pos.index = i; if ( (this_track->sec_count*this_track->datasize) >= offset) { int blocks = offset / this_track->datasize; int rem = offset % this_track->datasize; int block_offset = blocks * this_track->blocksize; real_offset += block_offset + rem; p_env->pos.buff_offset = rem; p_env->pos.lba += blocks; break; } real_offset += this_track->sec_count*this_track->blocksize; offset -= this_track->sec_count*this_track->datasize; p_env->pos.lba += this_track->sec_count; } if (i==p_env->gen.i_tracks) { cdio_warn ("seeking outside range of disk image"); return DRIVER_OP_ERROR; } else { real_offset += p_env->tocent[i].datastart; return cdio_stream_seek(p_env->gen.data_source, real_offset, whence); } } /*! Reads into buf the next size bytes. Returns -1 on error. FIXME: At present we assume a read doesn't cross sector or track boundaries. */ static ssize_t _read_bincue (void *p_user_data, void *data, size_t size) { _img_private_t *p_env = p_user_data; char buf[CDIO_CD_FRAMESIZE_RAW] = { 0, }; char *p = data; ssize_t final_size=0; ssize_t this_size; track_info_t *this_track=&(p_env->tocent[p_env->pos.index]); ssize_t skip_size = this_track->datastart + this_track->endsize; while (size > 0) { long int rem = this_track->datasize - p_env->pos.buff_offset; if ((long int) size <= rem) { this_size = cdio_stream_read(p_env->gen.data_source, buf, size, 1); final_size += this_size; memcpy (p, buf, this_size); break; } /* Finish off reading this sector. */ cdio_warn ("Reading across block boundaries not finished"); size -= rem; this_size = cdio_stream_read(p_env->gen.data_source, buf, rem, 1); final_size += this_size; memcpy (p, buf, this_size); p += this_size; this_size = cdio_stream_read(p_env->gen.data_source, buf, rem, 1); /* Skip over stuff at end of this sector and the beginning of the next. */ cdio_stream_read(p_env->gen.data_source, buf, skip_size, 1); /* Get ready to read another sector. */ p_env->pos.buff_offset=0; p_env->pos.lba++; /* Have gone into next track. */ if (p_env->pos.lba >= p_env->tocent[p_env->pos.index+1].start_lba) { p_env->pos.index++; this_track=&(p_env->tocent[p_env->pos.index]); skip_size = this_track->datastart + this_track->endsize; } } return final_size; } /*! Return the size of the CD in logical block address (LBA) units. */ static lsn_t get_disc_last_lsn_bincue (void *p_user_data) { _img_private_t *p_env = p_user_data; long size; size = cdio_stream_stat (p_env->gen.data_source); if (size % CDIO_CD_FRAMESIZE_RAW) { cdio_warn ("image %s size (%ld) not multiple of blocksize (%d)", p_env->gen.source_name, size, CDIO_CD_FRAMESIZE_RAW); if (size % M2RAW_SECTOR_SIZE == 0) cdio_warn ("this may be a 2336-type disc image"); else if (size % CDIO_CD_FRAMESIZE_RAW == 0) cdio_warn ("this may be a 2352-type disc image"); /* exit (EXIT_FAILURE); */ } size /= CDIO_CD_FRAMESIZE_RAW; return size; } #define MAXLINE 4096 /* maximum line length + 1 */ static bool parse_cuefile (_img_private_t *cd, const char *psz_cue_name) { /* The below declarations may be common in other image-parse routines. */ FILE *fp; char psz_line[MAXLINE]; /* text of current line read in file fp. */ unsigned int i_line=0; /* line number in file of psz_line. */ int i = -1; /* Position in tocent. Same as cd->gen.i_tracks - 1 */ char *psz_keyword, *psz_field; cdio_log_level_t log_level = (NULL == cd) ? CDIO_LOG_INFO : CDIO_LOG_WARN; cdtext_field_t cdtext_key; /* The below declarations may be unique to this image-parse routine. */ int start_index; bool b_first_index_for_track=false; if (NULL == psz_cue_name) return false; fp = fopen (psz_cue_name, "r"); if (fp == NULL) { cdio_log(log_level, "error opening %s for reading: %s", psz_cue_name, strerror(errno)); return false; } if (cd) { cd->gen.i_tracks=0; cd->gen.i_first_track=1; cd->gen.b_cdtext_init = true; cd->gen.b_cdtext_error = false; cd->psz_mcn=NULL; } while ((fgets(psz_line, MAXLINE, fp)) != NULL) { i_line++; if (NULL != (psz_keyword = strtok (psz_line, " \t\n\r"))) { /* REM remarks ... */ if (0 == strcmp ("REM", psz_keyword)) { ; /* global section */ /* CATALOG ddddddddddddd */ } else if (0 == strcmp ("CATALOG", psz_keyword)) { if (-1 == i) { if (NULL == (psz_field = strtok (NULL, " \t\n\r"))) { cdio_log(log_level, "%s line %d after word CATALOG: ", psz_cue_name, i_line); cdio_log(log_level, "expecting 13-digit media catalog number, got nothing."); goto err_exit; } if (strlen(psz_field) != 13) { cdio_log(log_level, "%s line %d after word CATALOG: ", psz_cue_name, i_line); cdio_log(log_level, "Token %s has length %ld. Should be 13 digits.", psz_field, (long int) strlen(psz_field)); goto err_exit; } else { /* Check that we have all digits*/ unsigned int i; for (i=0; i<13; i++) { if (!isdigit(psz_field[i])) { cdio_log(log_level, "%s line %d after word CATALOG:", psz_cue_name, i_line); cdio_log(log_level, "Character \"%c\" at postition %i of token \"%s\" " "is not all digits.", psz_field[i], i+1, psz_field); goto err_exit; } } } if (cd) cd->psz_mcn = strdup (psz_field); if (NULL != (psz_field = strtok (NULL, " \t\n\r"))) { goto format_error; } } else { goto not_in_global_section; } /* FILE "" */ } else if (0 == strcmp ("FILE", psz_keyword)) { if (NULL != (psz_field = strtok (NULL, "\"\t\n\r"))) { if (cd) cd->tocent[i + 1].filename = strdup (psz_field); } else { goto format_error; } /* TRACK N */ } else if (0 == strcmp ("TRACK", psz_keyword)) { int i_track; if (NULL != (psz_field = strtok (NULL, " \t\n\r"))) { if (1!=sscanf(psz_field, "%d", &i_track)) { cdio_log(log_level, "%s line %d after word TRACK:", psz_cue_name, i_line); cdio_log(log_level, "Expecting a track number, got %s", psz_field); goto err_exit; } } if (NULL != (psz_field = strtok (NULL, " \t\n\r"))) { track_info_t *this_track=NULL; if (cd) { this_track = &(cd->tocent[cd->gen.i_tracks]); this_track->track_num = cd->gen.i_tracks; this_track->num_indices = 0; b_first_index_for_track = false; cdtext_init (&(cd->gen.cdtext_track[cd->gen.i_tracks])); cd->gen.i_tracks++; } i++; if (0 == strcmp ("AUDIO", psz_field)) { if (cd) { this_track->mode = AUDIO; this_track->blocksize = CDIO_CD_FRAMESIZE_RAW; this_track->datasize = CDIO_CD_FRAMESIZE_RAW; this_track->datastart = 0; this_track->endsize = 0; this_track->track_format = TRACK_FORMAT_AUDIO; this_track->track_green = false; switch(cd->disc_mode) { case CDIO_DISC_MODE_NO_INFO: cd->disc_mode = CDIO_DISC_MODE_CD_DA; break; case CDIO_DISC_MODE_CD_DA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_ERROR: /* Disc type stays the same. */ break; case CDIO_DISC_MODE_CD_DATA: case CDIO_DISC_MODE_CD_XA: cd->disc_mode = CDIO_DISC_MODE_CD_MIXED; break; default: cd->disc_mode = CDIO_DISC_MODE_ERROR; } } } else if (0 == strcmp ("MODE1/2048", psz_field)) { if (cd) { this_track->mode = MODE1; this_track->blocksize = 2048; this_track->track_format= TRACK_FORMAT_DATA; this_track->track_green = false; /* Is the below correct? */ this_track->datastart = 0; this_track->datasize = CDIO_CD_FRAMESIZE; this_track->endsize = 0; switch(cd->disc_mode) { case CDIO_DISC_MODE_NO_INFO: cd->disc_mode = CDIO_DISC_MODE_CD_DATA; break; case CDIO_DISC_MODE_CD_DATA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_ERROR: /* Disc type stays the same. */ break; case CDIO_DISC_MODE_CD_DA: case CDIO_DISC_MODE_CD_XA: cd->disc_mode = CDIO_DISC_MODE_CD_MIXED; break; default: cd->disc_mode = CDIO_DISC_MODE_ERROR; } } } else if (0 == strcmp ("MODE1/2352", psz_field)) { if (cd) { this_track->blocksize = 2352; this_track->track_format= TRACK_FORMAT_DATA; this_track->track_green = false; this_track->datastart = CDIO_CD_SYNC_SIZE + CDIO_CD_HEADER_SIZE; this_track->datasize = CDIO_CD_FRAMESIZE; this_track->endsize = CDIO_CD_EDC_SIZE + CDIO_CD_M1F1_ZERO_SIZE + CDIO_CD_ECC_SIZE; this_track->mode = MODE1_RAW; switch(cd->disc_mode) { case CDIO_DISC_MODE_NO_INFO: cd->disc_mode = CDIO_DISC_MODE_CD_DATA; break; case CDIO_DISC_MODE_CD_DATA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_ERROR: /* Disc type stays the same. */ break; case CDIO_DISC_MODE_CD_DA: case CDIO_DISC_MODE_CD_XA: cd->disc_mode = CDIO_DISC_MODE_CD_MIXED; break; default: cd->disc_mode = CDIO_DISC_MODE_ERROR; } } } else if (0 == strcmp ("MODE2/2336", psz_field)) { if (cd) { this_track->blocksize = 2336; this_track->track_format= TRACK_FORMAT_XA; this_track->track_green = true; this_track->mode = MODE2; this_track->datastart = CDIO_CD_SYNC_SIZE + CDIO_CD_HEADER_SIZE; this_track->datasize = M2RAW_SECTOR_SIZE; this_track->endsize = 0; switch(cd->disc_mode) { case CDIO_DISC_MODE_NO_INFO: cd->disc_mode = CDIO_DISC_MODE_CD_DATA; break; case CDIO_DISC_MODE_CD_DATA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_ERROR: /* Disc type stays the same. */ break; case CDIO_DISC_MODE_CD_DA: case CDIO_DISC_MODE_CD_XA: cd->disc_mode = CDIO_DISC_MODE_CD_MIXED; break; default: cd->disc_mode = CDIO_DISC_MODE_ERROR; } } } else if (0 == strcmp ("MODE2/2048", psz_field)) { if (cd) { this_track->blocksize = 2048; this_track->track_format= TRACK_FORMAT_XA; this_track->track_green = true; this_track->mode = MODE2_FORM1; switch(cd->disc_mode) { case CDIO_DISC_MODE_NO_INFO: cd->disc_mode = CDIO_DISC_MODE_CD_XA; break; case CDIO_DISC_MODE_CD_XA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_ERROR: /* Disc type stays the same. */ break; case CDIO_DISC_MODE_CD_DA: case CDIO_DISC_MODE_CD_DATA: cd->disc_mode = CDIO_DISC_MODE_CD_MIXED; break; default: cd->disc_mode = CDIO_DISC_MODE_ERROR; } } } else if (0 == strcmp ("MODE2/2324", psz_field)) { if (cd) { this_track->blocksize = 2324; this_track->track_format= TRACK_FORMAT_XA; this_track->track_green = true; this_track->mode = MODE2_FORM2; switch(cd->disc_mode) { case CDIO_DISC_MODE_NO_INFO: cd->disc_mode = CDIO_DISC_MODE_CD_XA; break; case CDIO_DISC_MODE_CD_XA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_ERROR: /* Disc type stays the same. */ break; case CDIO_DISC_MODE_CD_DA: case CDIO_DISC_MODE_CD_DATA: cd->disc_mode = CDIO_DISC_MODE_CD_MIXED; break; default: cd->disc_mode = CDIO_DISC_MODE_ERROR; } } } else if (0 == strcmp ("MODE2/2336", psz_field)) { if (cd) { this_track->blocksize = 2336; this_track->track_format= TRACK_FORMAT_XA; this_track->track_green = true; this_track->mode = MODE2_FORM_MIX; this_track->datastart = CDIO_CD_SYNC_SIZE + CDIO_CD_HEADER_SIZE; this_track->datasize = M2RAW_SECTOR_SIZE; this_track->endsize = 0; switch(cd->disc_mode) { case CDIO_DISC_MODE_NO_INFO: cd->disc_mode = CDIO_DISC_MODE_CD_XA; break; case CDIO_DISC_MODE_CD_XA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_ERROR: /* Disc type stays the same. */ break; case CDIO_DISC_MODE_CD_DA: case CDIO_DISC_MODE_CD_DATA: cd->disc_mode = CDIO_DISC_MODE_CD_MIXED; break; default: cd->disc_mode = CDIO_DISC_MODE_ERROR; } } } else if (0 == strcmp ("MODE2/2352", psz_field)) { if (cd) { this_track->blocksize = 2352; this_track->track_format= TRACK_FORMAT_XA; this_track->track_green = true; this_track->mode = MODE2_RAW; this_track->datastart = CDIO_CD_SYNC_SIZE + CDIO_CD_HEADER_SIZE + CDIO_CD_SUBHEADER_SIZE; this_track->datasize = CDIO_CD_FRAMESIZE; this_track->endsize = CDIO_CD_SYNC_SIZE + CDIO_CD_ECC_SIZE; switch(cd->disc_mode) { case CDIO_DISC_MODE_NO_INFO: cd->disc_mode = CDIO_DISC_MODE_CD_XA; break; case CDIO_DISC_MODE_CD_XA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_ERROR: /* Disc type stays the same. */ break; case CDIO_DISC_MODE_CD_DA: case CDIO_DISC_MODE_CD_DATA: cd->disc_mode = CDIO_DISC_MODE_CD_MIXED; break; default: cd->disc_mode = CDIO_DISC_MODE_ERROR; } } } else { cdio_log(log_level, "%s line %d after word TRACK:", psz_cue_name, i_line); cdio_log(log_level, "Unknown track mode %s", psz_field); goto err_exit; } } else { goto format_error; } /* FLAGS flag1 flag2 ... */ } else if (0 == strcmp ("FLAGS", psz_keyword)) { if (0 <= i) { while (NULL != (psz_field = strtok (NULL, " \t\n\r"))) { if (0 == strcmp ("PRE", psz_field)) { if (cd) cd->tocent[i].flags |= PRE_EMPHASIS; } else if (0 == strcmp ("DCP", psz_field)) { if (cd) cd->tocent[i].flags |= COPY_PERMITTED; } else if (0 == strcmp ("4CH", psz_field)) { if (cd) cd->tocent[i].flags |= FOUR_CHANNEL_AUDIO; } else if (0 == strcmp ("SCMS", psz_field)) { if (cd) cd->tocent[i].flags |= SCMS; } else { goto format_error; } } } else { goto format_error; } /* ISRC CCOOOYYSSSSS */ } else if (0 == strcmp ("ISRC", psz_keyword)) { if (0 <= i) { if (NULL != (psz_field = strtok (NULL, " \t\n\r"))) { if (cd) cd->tocent[i].isrc = strdup (psz_field); } else { goto format_error; } } else { goto in_global_section; } /* PREGAP MM:SS:FF */ } else if (0 == strcmp ("PREGAP", psz_keyword)) { if (0 <= i) { if (NULL != (psz_field = strtok (NULL, " \t\n\r"))) { lba_t lba = cdio_lsn_to_lba(cdio_mmssff_to_lba (psz_field)); if (CDIO_INVALID_LBA == lba) { cdio_log(log_level, "%s line %d: after word PREGAP:", psz_cue_name, i_line); cdio_log(log_level, "Invalid MSF string %s", psz_field); goto err_exit; } if (cd) { cd->tocent[i].silence = lba; } } else { goto format_error; } if (NULL != (psz_field = strtok (NULL, " \t\n\r"))) { goto format_error; } } else { goto in_global_section; } /* INDEX [##] MM:SS:FF */ } else if (0 == strcmp ("INDEX", psz_keyword)) { if (0 <= i) { if (NULL != (psz_field = strtok (NULL, " \t\n\r"))) if (1!=sscanf(psz_field, "%d", &start_index)) { cdio_log(log_level, "%s line %d after word INDEX:", psz_cue_name, i_line); cdio_log(log_level, "expecting an index number, got %s", psz_field); goto err_exit; } if (NULL != (psz_field = strtok (NULL, " \t\n\r"))) { lba_t lba = cdio_mmssff_to_lba (psz_field); if (CDIO_INVALID_LBA == lba) { cdio_log(log_level, "%s line %d: after word INDEX:", psz_cue_name, i_line); cdio_log(log_level, "Invalid MSF string %s", psz_field); goto err_exit; } if (cd) { #if FIXED_ME cd->tocent[i].indexes[cd->tocent[i].nindex++] = lba; #else track_info_t *this_track= &(cd->tocent[cd->gen.i_tracks - cd->gen.i_first_track]); switch (start_index) { case 0: lba += CDIO_PREGAP_SECTORS; this_track->pregap = lba; break; case 1: if (!b_first_index_for_track) { lba += CDIO_PREGAP_SECTORS; cdio_lba_to_msf(lba, &(this_track->start_msf)); b_first_index_for_track = true; this_track->start_lba = lba; } if (cd->gen.i_tracks > 1) { /* Figure out number of sectors for previous track */ track_info_t *prev_track=&(cd->tocent[cd->gen.i_tracks-2]); if ( this_track->start_lba < prev_track->start_lba ) { cdio_log (log_level, "track %d at LBA %lu starts before track %d at LBA %lu", cd->gen.i_tracks, (unsigned long int) this_track->start_lba, cd->gen.i_tracks, (unsigned long int) prev_track->start_lba); prev_track->sec_count = 0; } else if ( this_track->start_lba >= prev_track->start_lba + CDIO_PREGAP_SECTORS ) { prev_track->sec_count = this_track->start_lba - prev_track->start_lba - CDIO_PREGAP_SECTORS ; } else { cdio_log (log_level, "%lu fewer than pregap (%d) sectors in track %d", (long unsigned int) this_track->start_lba - prev_track->start_lba, CDIO_PREGAP_SECTORS, cd->gen.i_tracks); /* Include pregap portion in sec_count. Maybe the pregap was omitted. */ prev_track->sec_count = this_track->start_lba - prev_track->start_lba; } } this_track->num_indices++; break; default: break; } } #endif } else { goto format_error; } } else { goto in_global_section; } /* CD-Text */ } else if ( CDTEXT_INVALID != (cdtext_key = cdtext_is_keyword (psz_keyword)) ) { if (-1 == i) { if (cd) { cdtext_set (cdtext_key, strtok (NULL, "\"\t\n\r"), &(cd->gen.cdtext)); } } else { if (cd) { cdtext_set (cdtext_key, strtok (NULL, "\"\t\n\r"), &(cd->gen.cdtext_track[i])); } } /* unrecognized line */ } else { cdio_log(log_level, "%s line %d: warning: unrecognized keyword: %s", psz_cue_name, i_line, psz_keyword); goto err_exit; } } } if (NULL != cd) { cd->gen.toc_init = true; } fclose (fp); return true; format_error: cdio_log(log_level, "%s line %d after word %s", psz_cue_name, i_line, psz_keyword); goto err_exit; in_global_section: cdio_log(log_level, "%s line %d: word %s not allowed in global section", psz_cue_name, i_line, psz_keyword); goto err_exit; not_in_global_section: cdio_log(log_level, "%s line %d: word %s only allowed in global section", psz_cue_name, i_line, psz_keyword); err_exit: fclose (fp); return false; } /*! Reads a single audio sector from CD device into data starting from lsn. Returns 0 if no error. */ static driver_return_code_t _read_audio_sectors_bincue (void *p_user_data, void *data, lsn_t lsn, unsigned int nblocks) { _img_private_t *p_env = p_user_data; int ret; ret = cdio_stream_seek (p_env->gen.data_source, lsn * CDIO_CD_FRAMESIZE_RAW, SEEK_SET); if (ret!=0) return ret; ret = cdio_stream_read (p_env->gen.data_source, data, CDIO_CD_FRAMESIZE_RAW, nblocks); /* ret is number of bytes if okay, but we need to return 0 okay. */ return ret == 0; } /*! Reads a single mode2 sector from cd device into data starting from lsn. Returns 0 if no error. */ static driver_return_code_t _read_mode1_sector_bincue (void *p_user_data, void *data, lsn_t lsn, bool b_form2) { _img_private_t *p_env = p_user_data; int ret; char buf[CDIO_CD_FRAMESIZE_RAW] = { 0, }; int blocksize = CDIO_CD_FRAMESIZE_RAW; ret = cdio_stream_seek (p_env->gen.data_source, lsn * blocksize, SEEK_SET); if (ret!=0) return ret; /* FIXME: Not completely sure the below is correct. */ ret = cdio_stream_read (p_env->gen.data_source, buf, CDIO_CD_FRAMESIZE_RAW, 1); if (ret==0) return ret; memcpy (data, buf + CDIO_CD_SYNC_SIZE + CDIO_CD_HEADER_SIZE, b_form2 ? M2RAW_SECTOR_SIZE: CDIO_CD_FRAMESIZE); return DRIVER_OP_SUCCESS; } /*! Reads nblocks of mode1 sectors from cd device into data starting from lsn. Returns 0 if no error. */ static driver_return_code_t _read_mode1_sectors_bincue (void *p_user_data, void *data, lsn_t lsn, bool b_form2, unsigned int nblocks) { _img_private_t *p_env = p_user_data; int i; int retval; unsigned int blocksize = b_form2 ? M2RAW_SECTOR_SIZE : CDIO_CD_FRAMESIZE; for (i = 0; i < nblocks; i++) { if ( (retval = _read_mode1_sector_bincue (p_env, ((char *)data) + (blocksize * i), lsn + i, b_form2)) ) return retval; } return DRIVER_OP_SUCCESS; } /*! Reads a single mode1 sector from cd device into data starting from lsn. Returns 0 if no error. */ static driver_return_code_t _read_mode2_sector_bincue (void *p_user_data, void *data, lsn_t lsn, bool b_form2) { _img_private_t *p_env = p_user_data; int ret; char buf[CDIO_CD_FRAMESIZE_RAW] = { 0, }; /* NOTE: The logic below seems a bit wrong and convoluted to me, but passes the regression tests. (Perhaps it is why we get valgrind errors in vcdxrip). Leave it the way it was for now. Review this sector 2336 stuff later. */ int blocksize = CDIO_CD_FRAMESIZE_RAW; ret = cdio_stream_seek (p_env->gen.data_source, lsn * blocksize, SEEK_SET); if (ret!=0) return ret; ret = cdio_stream_read (p_env->gen.data_source, buf, CDIO_CD_FRAMESIZE_RAW, 1); if (ret==0) return ret; /* See NOTE above. */ if (b_form2) memcpy (data, buf + CDIO_CD_SYNC_SIZE + CDIO_CD_HEADER_SIZE, M2RAW_SECTOR_SIZE); else memcpy (data, buf + CDIO_CD_XA_SYNC_HEADER, CDIO_CD_FRAMESIZE); return DRIVER_OP_SUCCESS; } /*! Reads nblocks of mode2 sectors from cd device into data starting from lsn. Returns 0 if no error. */ static driver_return_code_t _read_mode2_sectors_bincue (void *p_user_data, void *data, lsn_t lsn, bool b_form2, unsigned int nblocks) { _img_private_t *p_env = p_user_data; int i; int retval; unsigned int blocksize = b_form2 ? M2RAW_SECTOR_SIZE : CDIO_CD_FRAMESIZE; for (i = 0; i < nblocks; i++) { if ( (retval = _read_mode2_sector_bincue (p_env, ((char *)data) + (blocksize * i), lsn + i, b_form2)) ) return retval; } return 0; } /*! Return an array of strings giving possible BIN/CUE disk images. */ char ** cdio_get_devices_bincue (void) { char **drives = NULL; unsigned int num_files=0; #ifdef HAVE_GLOB_H unsigned int i; glob_t globbuf; globbuf.gl_offs = 0; glob("*.cue", GLOB_DOOFFS, NULL, &globbuf); for (i=0; ipsz_vendor, "libcdio", sizeof(hw_info->psz_vendor)-1); hw_info->psz_vendor[sizeof(hw_info->psz_vendor)-1] = '\0'; strncpy(hw_info->psz_model, "CDRWIN", sizeof(hw_info->psz_model)-1); hw_info->psz_model[sizeof(hw_info->psz_model)-1] = '\0'; strncpy(hw_info->psz_revision, CDIO_VERSION, sizeof(hw_info->psz_revision)-1); hw_info->psz_revision[sizeof(hw_info->psz_revision)-1] = '\0'; return true; } /*! Return the number of tracks in the current medium. CDIO_INVALID_TRACK is returned on error. */ static track_format_t _get_track_format_bincue(void *p_user_data, track_t i_track) { const _img_private_t *p_env = p_user_data; if (!p_env->gen.init) return TRACK_FORMAT_ERROR; if (i_track > p_env->gen.i_tracks || i_track == 0) return TRACK_FORMAT_ERROR; return p_env->tocent[i_track-p_env->gen.i_first_track].track_format; } /*! Return true if we have XA data (green, mode2 form1) or XA data (green, mode2 form2). That is track begins: sync - header - subheader 12 4 - 8 FIXME: there's gotta be a better design for this and get_track_format? */ static bool _get_track_green_bincue(void *p_user_data, track_t i_track) { _img_private_t *p_env = p_user_data; if ( NULL == p_env || ( i_track < p_env->gen.i_first_track || i_track >= p_env->gen.i_tracks + p_env->gen.i_first_track ) ) return false; return p_env->tocent[i_track-p_env->gen.i_first_track].track_green; } /*! Return the starting LSN track number i_track in obj. Track numbers start at 1. The "leadout" track is specified either by using i_track LEADOUT_TRACK or the total tracks+1. False is returned if there is no track entry. */ static lba_t _get_lba_track_bincue(void *p_user_data, track_t i_track) { _img_private_t *p_env = p_user_data; if (i_track == CDIO_CDROM_LEADOUT_TRACK) i_track = p_env->gen.i_tracks+1; if (i_track <= p_env->gen.i_tracks + p_env->gen.i_first_track && i_track != 0) { return p_env->tocent[i_track-p_env->gen.i_first_track].start_lba; } else return CDIO_INVALID_LBA; } /*! Return corresponding BIN file if psz_cue_name is a cue file or NULL if not a CUE file. */ char * cdio_is_cuefile(const char *psz_cue_name) { int i; char *psz_bin_name; if (psz_cue_name == NULL) return NULL; /* FIXME? Now that we have cue parsing, should we really force the filename extension requirement or is it enough just to parse the cuefile? */ psz_bin_name=strdup(psz_cue_name); i=strlen(psz_bin_name)-strlen("cue"); if (i>0) { if (psz_cue_name[i]=='c' && psz_cue_name[i+1]=='u' && psz_cue_name[i+2]=='e') { psz_bin_name[i++]='b'; psz_bin_name[i++]='i'; psz_bin_name[i++]='n'; if (parse_cuefile(NULL, psz_cue_name)) return psz_bin_name; else goto error; } else if (psz_cue_name[i]=='C' && psz_cue_name[i+1]=='U' && psz_cue_name[i+2]=='E') { psz_bin_name[i++]='B'; psz_bin_name[i++]='I'; psz_bin_name[i++]='N'; if (parse_cuefile(NULL, psz_cue_name)) return psz_bin_name; else goto error; } } error: free(psz_bin_name); return NULL; } /*! Return corresponding CUE file if psz_bin_name is a bin file or NULL if not a BIN file. */ char * cdio_is_binfile(const char *psz_bin_name) { int i; char *psz_cue_name; if (psz_bin_name == NULL) return NULL; psz_cue_name=strdup(psz_bin_name); i=strlen(psz_bin_name)-strlen("bin"); if (i>0) { if (psz_bin_name[i]=='b' && psz_bin_name[i+1]=='i' && psz_bin_name[i+2]=='n') { psz_cue_name[i++]='c'; psz_cue_name[i++]='u'; psz_cue_name[i++]='e'; return psz_cue_name; } else if (psz_bin_name[i]=='B' && psz_bin_name[i+1]=='I' && psz_bin_name[i+2]=='N') { psz_cue_name[i++]='C'; psz_cue_name[i++]='U'; psz_cue_name[i++]='E'; return psz_cue_name; } } free(psz_cue_name); return NULL; } /*! Initialization routine. This is the only thing that doesn't get called via a function pointer. In fact *we* are the ones to set that up. */ CdIo_t * cdio_open_am_bincue (const char *psz_source_name, const char *psz_access_mode) { if (psz_access_mode != NULL) cdio_warn ("there is only one access mode for bincue. Arg %s ignored", psz_access_mode); return cdio_open_bincue(psz_source_name); } /*! Initialization routine. This is the only thing that doesn't get called via a function pointer. In fact *we* are the ones to set that up. */ CdIo_t * cdio_open_bincue (const char *psz_source) { char *psz_bin_name = cdio_is_cuefile(psz_source); if (NULL != psz_bin_name) { free(psz_bin_name); return cdio_open_cue(psz_source); } else { char *psz_cue_name = cdio_is_binfile(psz_source); CdIo_t *cdio = cdio_open_cue(psz_cue_name); free(psz_cue_name); return cdio; } } CdIo_t * cdio_open_cue (const char *psz_cue_name) { CdIo_t *ret; _img_private_t *p_data; char *psz_bin_name; cdio_funcs_t _funcs; memset( &_funcs, 0, sizeof(_funcs) ); _funcs.eject_media = _eject_media_image; _funcs.free = _free_image; _funcs.get_arg = _get_arg_image; _funcs.get_cdtext = get_cdtext_generic; _funcs.get_devices = cdio_get_devices_bincue; _funcs.get_default_device = cdio_get_default_device_bincue; _funcs.get_disc_last_lsn = get_disc_last_lsn_bincue; _funcs.get_discmode = _get_discmode_image; _funcs.get_drive_cap = _get_drive_cap_image; _funcs.get_first_track_num = _get_first_track_num_image; _funcs.get_hwinfo = get_hwinfo_bincue; _funcs.get_media_changed = get_media_changed_image; _funcs.get_mcn = _get_mcn_image; _funcs.get_num_tracks = _get_num_tracks_image; _funcs.get_track_channels = get_track_channels_image; _funcs.get_track_copy_permit = get_track_copy_permit_image; _funcs.get_track_format = _get_track_format_bincue; _funcs.get_track_green = _get_track_green_bincue; _funcs.get_track_lba = _get_lba_track_bincue; _funcs.get_track_msf = _get_track_msf_image; _funcs.get_track_preemphasis = get_track_preemphasis_image; _funcs.get_track_pregap_lba = get_track_pregap_lba_image; _funcs.get_track_isrc = get_track_isrc_image; _funcs.lseek = _lseek_bincue; _funcs.read = _read_bincue; _funcs.read_audio_sectors = _read_audio_sectors_bincue; _funcs.read_data_sectors = read_data_sectors_image; _funcs.read_mode1_sector = _read_mode1_sector_bincue; _funcs.read_mode1_sectors = _read_mode1_sectors_bincue; _funcs.read_mode2_sector = _read_mode2_sector_bincue; _funcs.read_mode2_sectors = _read_mode2_sectors_bincue; _funcs.run_mmc_cmd = NULL; _funcs.set_arg = _set_arg_image; _funcs.set_speed = cdio_generic_unimplemented_set_speed; _funcs.set_blocksize = cdio_generic_unimplemented_set_blocksize; if (NULL == psz_cue_name) return NULL; p_data = calloc(1, sizeof (_img_private_t)); p_data->gen.init = false; p_data->psz_cue_name = NULL; ret = cdio_new ((void *)p_data, &_funcs); if (ret == NULL) { free(p_data); return NULL; } ret->driver_id = DRIVER_BINCUE; psz_bin_name = cdio_is_cuefile(psz_cue_name); if (NULL == psz_bin_name) { cdio_error ("source name %s is not recognized as a CUE file", psz_cue_name); } _set_arg_image (p_data, "cue", psz_cue_name); _set_arg_image (p_data, "source", psz_bin_name); _set_arg_image (p_data, "access-mode", "bincue"); free(psz_bin_name); if (_init_bincue(p_data)) { return ret; } else { _free_image(p_data); free(ret); return NULL; } } bool cdio_have_bincue (void) { return true; } libcdio-0.83/lib/driver/image/cdrdao.c0000644000175000017500000011447211570772032014532 00000000000000/* $Id: cdrdao.c,v 1.27 2008/04/21 18:30:22 karl Exp $ Copyright (C) 2004, 2005, 2006, 2007, 2008 Rocky Bernstein toc reading routine adapted from cuetools Copyright (C) 2003 Svend Sanjay Sorensen This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* This code implements low-level access functions for a CD images residing inside a disk file (*.bin) and its associated cue sheet. (*.cue). */ static const char _rcsid[] = "$Id: cdrdao.c,v 1.27 2008/04/21 18:30:22 karl Exp $"; #include "image.h" #include "cdio_assert.h" #include "_cdio_stdio.h" #include #include #include #include #ifdef HAVE_LIMITS_H #include #endif #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_STRINGS_H #include #endif #ifdef HAVE_GLOB_H #include #endif #ifdef HAVE_ERRNO_H #include #endif #include #include "portable.h" /* reader */ #define DEFAULT_CDIO_DEVICE "videocd.bin" #define DEFAULT_CDIO_CDRDAO "videocd.toc" #include "image_common.h" static lsn_t get_disc_last_lsn_cdrdao (void *p_user_data); static bool parse_tocfile (_img_private_t *cd, const char *p_toc_name); static bool check_track_is_blocksize_multiple(const char *psz_fname, track_t i_track, long i_size, uint16_t i_blocksize) { if (i_size % i_blocksize) { cdio_info ("image %s track %d size (%ld) not a multiple" " of the blocksize (%ld)", psz_fname, i_track, i_size, (long int) i_blocksize); if (i_size % M2RAW_SECTOR_SIZE == 0) cdio_info ("this may be a 2336-type disc image"); else if (i_size % CDIO_CD_FRAMESIZE_RAW == 0) cdio_info ("this may be a 2352-type disc image"); return false; } return true; } /*! Initialize image structures. */ static bool _init_cdrdao (_img_private_t *env) { lsn_t lead_lsn; if (env->gen.init) return false; /* Have to set init before calling get_disc_last_lsn_cdrdao() or we will get into infinite recursion calling passing right here. */ env->gen.init = true; env->gen.i_first_track = 1; env->psz_mcn = NULL; env->disc_mode = CDIO_DISC_MODE_NO_INFO; cdtext_init (&(env->gen.cdtext)); /* Read in TOC sheet. */ if ( !parse_tocfile(env, env->psz_cue_name) ) return false; lead_lsn = get_disc_last_lsn_cdrdao( (_img_private_t *) env); if (-1 == lead_lsn) return false; /* Fake out leadout track and sector count for last track*/ cdio_lsn_to_msf (lead_lsn, &env->tocent[env->gen.i_tracks].start_msf); env->tocent[env->gen.i_tracks].start_lba = cdio_lsn_to_lba(lead_lsn); env->tocent[env->gen.i_tracks-env->gen.i_first_track].sec_count = cdio_lsn_to_lba(lead_lsn - env->tocent[env->gen.i_tracks-1].start_lba); return true; } /*! Reads into buf the next size bytes. Returns -1 on error. Would be libc's seek() but we have to adjust for the extra track header information in each sector. */ static off_t _lseek_cdrdao (void *user_data, off_t offset, int whence) { _img_private_t *env = user_data; /* real_offset is the real byte offset inside the disk image The number below was determined empirically. I'm guessing the 1st 24 bytes of a bin file are used for something. */ off_t real_offset=0; unsigned int i; env->pos.lba = 0; for (i=0; igen.i_tracks; i++) { track_info_t *this_track=&(env->tocent[i]); env->pos.index = i; if ( (this_track->sec_count*this_track->datasize) >= offset) { int blocks = offset / this_track->datasize; int rem = offset % this_track->datasize; int block_offset = blocks * this_track->blocksize; real_offset += block_offset + rem; env->pos.buff_offset = rem; env->pos.lba += blocks; break; } real_offset += this_track->sec_count*this_track->blocksize; offset -= this_track->sec_count*this_track->datasize; env->pos.lba += this_track->sec_count; } if (i==env->gen.i_tracks) { cdio_warn ("seeking outside range of disk image"); return -1; } else { real_offset += env->tocent[i].datastart; return cdio_stream_seek(env->tocent[i].data_source, real_offset, whence); } } /*! Reads into buf the next size bytes. Returns -1 on error. FIXME: At present we assume a read doesn't cross sector or track boundaries. */ static ssize_t _read_cdrdao (void *user_data, void *data, size_t size) { _img_private_t *env = user_data; char buf[CDIO_CD_FRAMESIZE_RAW] = { 0, }; char *p = data; ssize_t final_size=0; ssize_t this_size; track_info_t *this_track=&(env->tocent[env->pos.index]); ssize_t skip_size = this_track->datastart + this_track->endsize; while (size > 0) { int rem = this_track->datasize - env->pos.buff_offset; if (size <= rem) { this_size = cdio_stream_read(this_track->data_source, buf, size, 1); final_size += this_size; memcpy (p, buf, this_size); break; } /* Finish off reading this sector. */ cdio_warn ("Reading across block boundaries not finished"); size -= rem; this_size = cdio_stream_read(this_track->data_source, buf, rem, 1); final_size += this_size; memcpy (p, buf, this_size); p += this_size; this_size = cdio_stream_read(this_track->data_source, buf, rem, 1); /* Skip over stuff at end of this sector and the beginning of the next. */ cdio_stream_read(this_track->data_source, buf, skip_size, 1); /* Get ready to read another sector. */ env->pos.buff_offset=0; env->pos.lba++; /* Have gone into next track. */ if (env->pos.lba >= env->tocent[env->pos.index+1].start_lba) { env->pos.index++; this_track=&(env->tocent[env->pos.index]); skip_size = this_track->datastart + this_track->endsize; } } return final_size; } /*! Return the size of the CD in logical block address (LBA) units. */ static lsn_t get_disc_last_lsn_cdrdao (void *p_user_data) { _img_private_t *p_env = p_user_data; track_t i_leadout = p_env->gen.i_tracks; uint16_t i_blocksize = p_env->tocent[i_leadout-1].blocksize; long i_size; if (p_env->tocent[i_leadout-1].sec_count) { i_size = p_env->tocent[i_leadout-1].sec_count; } else { i_size = cdio_stream_stat(p_env->tocent[i_leadout-1].data_source) - p_env->tocent[i_leadout-1].offset; if (check_track_is_blocksize_multiple(p_env->tocent[i_leadout-1].filename, i_leadout-1, i_size, i_blocksize)) { i_size /= i_blocksize; } else { /* Round up */ i_size = (i_size / i_blocksize) + 1; } } i_size += p_env->tocent[i_leadout-1].start_lba; i_size -= CDIO_PREGAP_SECTORS; return i_size; } #define MAXLINE 512 #define UNIMPLIMENTED_MSG \ cdio_log(log_level, "%s line %d: unimplimented keyword: %s", \ psz_cue_name, i_line, psz_keyword) static bool parse_tocfile (_img_private_t *cd, const char *psz_cue_name) { /* The below declarations may be common in other image-parse routines. */ FILE *fp; char psz_line[MAXLINE]; /* text of current line read in file fp. */ unsigned int i_line=0; /* line number in file of psz_line. */ int i = -1; /* Position in tocent. Same as cd->gen.i_tracks - 1 */ char *psz_keyword, *psz_field; cdio_log_level_t log_level = (cd) ? CDIO_LOG_WARN : CDIO_LOG_INFO ; cdtext_field_t cdtext_key; /* The below declaration(s) may be unique to this image-parse routine. */ unsigned int i_cdtext_nest = 0; if (NULL == psz_cue_name) return false; fp = fopen (psz_cue_name, "r"); if (fp == NULL) { cdio_log(log_level, "error opening %s for reading: %s", psz_cue_name, strerror(errno)); return false; } if (cd) { cd->gen.b_cdtext_init = true; cd->gen.b_cdtext_error = false; } while (fgets(psz_line, MAXLINE, fp)) { i_line++; /* strip comment from line */ /* todo: // in quoted strings? */ /* //comment */ if ((psz_field = strstr (psz_line, "//"))) *psz_field = '\0'; if ((psz_keyword = strtok (psz_line, " \t\n\r"))) { /* CATALOG "ddddddddddddd" */ if (0 == strcmp ("CATALOG", psz_keyword)) { if (-1 == i) { if (NULL != (psz_field = strtok (NULL, "\"\t\n\r"))) { if (13 != strlen(psz_field)) { cdio_log(log_level, "%s line %d after word CATALOG:", psz_cue_name, i_line); cdio_log(log_level, "Token %s has length %ld. Should be 13 digits.", psz_field, (long int) strlen(psz_field)); goto err_exit; } else { /* Check that we have all digits*/ unsigned int i; for (i=0; i<13; i++) { if (!isdigit(psz_field[i])) { cdio_log(log_level, "%s line %d after word CATALOG:", psz_cue_name, i_line); cdio_log(log_level, "Character \"%c\" at postition %i of token \"%s\"" " is not all digits.", psz_field[i], i+1, psz_field); goto err_exit; } } if (NULL != cd) cd->psz_mcn = strdup (psz_field); } } else { cdio_log(log_level, "%s line %d after word CATALOG:", psz_cue_name, i_line); cdio_log(log_level, "Expecting 13 digits; nothing seen."); goto err_exit; } } else { goto err_exit; } /* CD_DA | CD_ROM | CD_ROM_XA */ } else if (0 == strcmp ("CD_DA", psz_keyword)) { if (-1 == i) { if (NULL != cd) cd->disc_mode = CDIO_DISC_MODE_CD_DA; } else { goto not_in_global_section; } } else if (0 == strcmp ("CD_ROM", psz_keyword)) { if (-1 == i) { if (NULL != cd) cd->disc_mode = CDIO_DISC_MODE_CD_DATA; } else { goto not_in_global_section; } } else if (0 == strcmp ("CD_ROM_XA", psz_keyword)) { if (-1 == i) { if (NULL != cd) cd->disc_mode = CDIO_DISC_MODE_CD_XA; } else { goto not_in_global_section; } /* TRACK [] */ } else if (0 == strcmp ("TRACK", psz_keyword)) { i++; if (NULL != cd) cdtext_init (&(cd->gen.cdtext_track[i])); if (NULL != (psz_field = strtok (NULL, " \t\n\r"))) { if (0 == strcmp ("AUDIO", psz_field)) { if (NULL != cd) { cd->tocent[i].track_format = TRACK_FORMAT_AUDIO; cd->tocent[i].blocksize = CDIO_CD_FRAMESIZE_RAW; cd->tocent[i].datasize = CDIO_CD_FRAMESIZE_RAW; cd->tocent[i].datastart = 0; cd->tocent[i].endsize = 0; switch(cd->disc_mode) { case CDIO_DISC_MODE_NO_INFO: cd->disc_mode = CDIO_DISC_MODE_CD_DA; break; case CDIO_DISC_MODE_CD_DA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_ERROR: /* Disc type stays the same. */ break; case CDIO_DISC_MODE_CD_DATA: case CDIO_DISC_MODE_CD_XA: cd->disc_mode = CDIO_DISC_MODE_CD_MIXED; break; default: cd->disc_mode = CDIO_DISC_MODE_ERROR; } } } else if (0 == strcmp ("MODE1", psz_field)) { if (NULL != cd) { cd->tocent[i].track_format = TRACK_FORMAT_DATA; cd->tocent[i].blocksize = CDIO_CD_FRAMESIZE_RAW; cd->tocent[i].datastart = CDIO_CD_SYNC_SIZE + CDIO_CD_HEADER_SIZE; cd->tocent[i].datasize = CDIO_CD_FRAMESIZE; cd->tocent[i].endsize = CDIO_CD_EDC_SIZE + CDIO_CD_M1F1_ZERO_SIZE + CDIO_CD_ECC_SIZE; switch(cd->disc_mode) { case CDIO_DISC_MODE_NO_INFO: cd->disc_mode = CDIO_DISC_MODE_CD_DATA; break; case CDIO_DISC_MODE_CD_DATA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_ERROR: /* Disc type stays the same. */ break; case CDIO_DISC_MODE_CD_DA: case CDIO_DISC_MODE_CD_XA: cd->disc_mode = CDIO_DISC_MODE_CD_MIXED; break; default: cd->disc_mode = CDIO_DISC_MODE_ERROR; } } } else if (0 == strcmp ("MODE1_RAW", psz_field)) { if (NULL != cd) { cd->tocent[i].track_format = TRACK_FORMAT_DATA; cd->tocent[i].blocksize = CDIO_CD_FRAMESIZE_RAW; cd->tocent[i].datastart = CDIO_CD_SYNC_SIZE + CDIO_CD_HEADER_SIZE; cd->tocent[i].datasize = CDIO_CD_FRAMESIZE; cd->tocent[i].endsize = CDIO_CD_EDC_SIZE + CDIO_CD_M1F1_ZERO_SIZE + CDIO_CD_ECC_SIZE; switch(cd->disc_mode) { case CDIO_DISC_MODE_NO_INFO: cd->disc_mode = CDIO_DISC_MODE_CD_DATA; break; case CDIO_DISC_MODE_CD_DATA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_ERROR: /* Disc type stays the same. */ break; case CDIO_DISC_MODE_CD_DA: case CDIO_DISC_MODE_CD_XA: cd->disc_mode = CDIO_DISC_MODE_CD_MIXED; break; default: cd->disc_mode = CDIO_DISC_MODE_ERROR; } } } else if (0 == strcmp ("MODE2", psz_field)) { if (NULL != cd) { cd->tocent[i].track_format = TRACK_FORMAT_XA; cd->tocent[i].datastart = CDIO_CD_SYNC_SIZE + CDIO_CD_HEADER_SIZE; cd->tocent[i].datasize = M2RAW_SECTOR_SIZE; cd->tocent[i].endsize = 0; switch(cd->disc_mode) { case CDIO_DISC_MODE_NO_INFO: cd->disc_mode = CDIO_DISC_MODE_CD_XA; break; case CDIO_DISC_MODE_CD_XA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_ERROR: /* Disc type stays the same. */ break; case CDIO_DISC_MODE_CD_DA: case CDIO_DISC_MODE_CD_DATA: cd->disc_mode = CDIO_DISC_MODE_CD_MIXED; break; default: cd->disc_mode = CDIO_DISC_MODE_ERROR; } } } else if (0 == strcmp ("MODE2_FORM1", psz_field)) { if (NULL != cd) { cd->tocent[i].track_format = TRACK_FORMAT_XA; cd->tocent[i].datastart = CDIO_CD_SYNC_SIZE + CDIO_CD_HEADER_SIZE; cd->tocent[i].datasize = CDIO_CD_FRAMESIZE_RAW; cd->tocent[i].endsize = 0; switch(cd->disc_mode) { case CDIO_DISC_MODE_NO_INFO: cd->disc_mode = CDIO_DISC_MODE_CD_XA; break; case CDIO_DISC_MODE_CD_XA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_ERROR: /* Disc type stays the same. */ break; case CDIO_DISC_MODE_CD_DA: case CDIO_DISC_MODE_CD_DATA: cd->disc_mode = CDIO_DISC_MODE_CD_MIXED; break; default: cd->disc_mode = CDIO_DISC_MODE_ERROR; } } } else if (0 == strcmp ("MODE2_FORM2", psz_field)) { if (NULL != cd) { cd->tocent[i].track_format = TRACK_FORMAT_XA; cd->tocent[i].datastart = CDIO_CD_SYNC_SIZE + CDIO_CD_HEADER_SIZE + CDIO_CD_SUBHEADER_SIZE; cd->tocent[i].datasize = CDIO_CD_FRAMESIZE; cd->tocent[i].endsize = CDIO_CD_SYNC_SIZE + CDIO_CD_ECC_SIZE; switch(cd->disc_mode) { case CDIO_DISC_MODE_NO_INFO: cd->disc_mode = CDIO_DISC_MODE_CD_XA; break; case CDIO_DISC_MODE_CD_XA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_ERROR: /* Disc type stays the same. */ break; case CDIO_DISC_MODE_CD_DA: case CDIO_DISC_MODE_CD_DATA: cd->disc_mode = CDIO_DISC_MODE_CD_MIXED; break; default: cd->disc_mode = CDIO_DISC_MODE_ERROR; } } } else if (0 == strcmp ("MODE2_FORM_MIX", psz_field)) { if (NULL != cd) { cd->tocent[i].track_format = TRACK_FORMAT_XA; cd->tocent[i].datasize = M2RAW_SECTOR_SIZE; cd->tocent[i].blocksize = CDIO_CD_FRAMESIZE_RAW; cd->tocent[i].datastart = CDIO_CD_SYNC_SIZE + CDIO_CD_HEADER_SIZE + CDIO_CD_SUBHEADER_SIZE; cd->tocent[i].track_green = true; cd->tocent[i].endsize = 0; switch(cd->disc_mode) { case CDIO_DISC_MODE_NO_INFO: cd->disc_mode = CDIO_DISC_MODE_CD_XA; break; case CDIO_DISC_MODE_CD_XA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_ERROR: /* Disc type stays the same. */ break; case CDIO_DISC_MODE_CD_DA: case CDIO_DISC_MODE_CD_DATA: cd->disc_mode = CDIO_DISC_MODE_CD_MIXED; break; default: cd->disc_mode = CDIO_DISC_MODE_ERROR; } } } else if (0 == strcmp ("MODE2_RAW", psz_field)) { if (NULL != cd) { cd->tocent[i].track_format = TRACK_FORMAT_XA; cd->tocent[i].blocksize = CDIO_CD_FRAMESIZE_RAW; cd->tocent[i].datastart = CDIO_CD_SYNC_SIZE + CDIO_CD_HEADER_SIZE + CDIO_CD_SUBHEADER_SIZE; cd->tocent[i].datasize = CDIO_CD_FRAMESIZE; cd->tocent[i].track_green = true; cd->tocent[i].endsize = 0; switch(cd->disc_mode) { case CDIO_DISC_MODE_NO_INFO: cd->disc_mode = CDIO_DISC_MODE_CD_XA; break; case CDIO_DISC_MODE_CD_XA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_ERROR: /* Disc type stays the same. */ break; case CDIO_DISC_MODE_CD_DA: case CDIO_DISC_MODE_CD_DATA: cd->disc_mode = CDIO_DISC_MODE_CD_MIXED; break; default: cd->disc_mode = CDIO_DISC_MODE_ERROR; } } } else { cdio_log(log_level, "%s line %d after TRACK:", psz_cue_name, i_line); cdio_log(log_level, "'%s' not a valid mode.", psz_field); goto err_exit; } } if (NULL != (psz_field = strtok (NULL, " \t\n\r"))) { /* \todo: set sub-channel-mode */ #ifdef TODO if (0 == strcmp ("RW", psz_field)) ; else if (0 == strcmp ("RW_RAW", psz_field)) ; #endif } if (NULL != (psz_field = strtok (NULL, " \t\n\r"))) { goto format_error; } /* track flags */ /* [NO] COPY | [NO] PRE_EMPHASIS */ } else if (0 == strcmp ("NO", psz_keyword)) { if (NULL != (psz_field = strtok (NULL, " \t\n\r"))) { if (0 == strcmp ("COPY", psz_field)) { if (NULL != cd) cd->tocent[i].flags &= ~CDIO_TRACK_FLAG_COPY_PERMITTED; } else if (0 == strcmp ("PRE_EMPHASIS", psz_field)) if (NULL != cd) { cd->tocent[i].flags &= ~CDIO_TRACK_FLAG_PRE_EMPHASIS; goto err_exit; } } else { goto format_error; } if (NULL != (psz_field = strtok (NULL, " \t\n\r"))) { goto format_error; } } else if (0 == strcmp ("COPY", psz_keyword)) { if (NULL != cd && i >= 0) cd->tocent[i].flags |= CDIO_TRACK_FLAG_COPY_PERMITTED; } else if (0 == strcmp ("PRE_EMPHASIS", psz_keyword)) { if (NULL != cd && i >= 0) cd->tocent[i].flags |= CDIO_TRACK_FLAG_PRE_EMPHASIS; /* TWO_CHANNEL_AUDIO */ } else if (0 == strcmp ("TWO_CHANNEL_AUDIO", psz_keyword)) { if (NULL != cd && i >= 0) cd->tocent[i].flags &= ~CDIO_TRACK_FLAG_FOUR_CHANNEL_AUDIO; /* FOUR_CHANNEL_AUDIO */ } else if (0 == strcmp ("FOUR_CHANNEL_AUDIO", psz_keyword)) { if (NULL != cd && i >= 0) cd->tocent[i].flags |= CDIO_TRACK_FLAG_FOUR_CHANNEL_AUDIO; /* ISRC "CCOOOYYSSSSS" */ } else if (0 == strcmp ("ISRC", psz_keyword)) { if (NULL != (psz_field = strtok (NULL, "\"\t\n\r"))) { if (NULL != cd) cd->tocent[i].isrc = strdup(psz_field); } else { goto format_error; } /* SILENCE */ } else if (0 == strcmp ("SILENCE", psz_keyword)) { UNIMPLIMENTED_MSG; /* ZERO */ } else if (0 == strcmp ("ZERO", psz_keyword)) { UNIMPLIMENTED_MSG; /* [FILE|AUDIOFILE] "" [] */ } else if (0 == strcmp ("FILE", psz_keyword) || 0 == strcmp ("AUDIOFILE", psz_keyword)) { if (0 <= i) { if (NULL != (psz_field = strtok (NULL, "\"\t\n\r"))) { long i_size; /* Handle "" */ if (cd) { cd->tocent[i].filename = strdup (psz_field); /* To do: do something about reusing existing files. */ if (!(cd->tocent[i].data_source = cdio_stdio_new (psz_field))) { cdio_log (log_level, "%s line %d: can't open file `%s' for reading", psz_cue_name, i_line, psz_field); goto err_exit; } i_size = cdio_stream_stat(cd->tocent[i].data_source); } else { CdioDataSource_t *s = cdio_stdio_new (psz_field); if (!s) { cdio_log (log_level, "%s line %d: can't open file `%s' for reading", psz_cue_name, i_line, psz_field); goto err_exit; } i_size = cdio_stream_stat(s); cdio_stdio_destroy (s); } } if (NULL != (psz_field = strtok (NULL, " \t\n\r"))) { /* Handle */ lba_t i_start_lba = cdio_lsn_to_lba(cdio_mmssff_to_lba (psz_field)); if (CDIO_INVALID_LBA == i_start_lba) { cdio_log(log_level, "%s line %d: invalid MSF string %s", psz_cue_name, i_line, psz_field); goto err_exit; } if (NULL != cd) { cd->tocent[i].start_lba = i_start_lba; cdio_lba_to_msf(i_start_lba, &(cd->tocent[i].start_msf)); } } if (NULL != (psz_field = strtok (NULL, " \t\n\r"))) { /* Handle */ lba_t lba = cdio_mmssff_to_lba (psz_field); if (CDIO_INVALID_LBA == lba) { cdio_log(log_level, "%s line %d: invalid MSF string %s", psz_cue_name, i_line, psz_field); goto err_exit; } if (cd) { long i_size = cdio_stream_stat(cd->tocent[i].data_source); if (lba) { if ( (lba * cd->tocent[i].datasize) > i_size) { cdio_log(log_level, "%s line %d: MSF length %s exceeds end of file", psz_cue_name, i_line, psz_field); goto err_exit; } } else { lba = i_size / cd->tocent[i].blocksize; } cd->tocent[i].sec_count = lba; } } if (NULL != (psz_field = strtok (NULL, " \t\n\r"))) { goto format_error; } } else { goto not_in_global_section; } /* DATAFILE "" #byte-offset */ } else if (0 == strcmp ("DATAFILE", psz_keyword)) { if (0 <= i) { if (NULL != (psz_field = strtok (NULL, "\"\t\n\r"))) { /* Handle */ if (cd) { cd->tocent[i].filename = strdup (psz_field); /* To do: do something about reusing existing files. */ if (!(cd->tocent[i].data_source = cdio_stdio_new (psz_field))) { cdio_log (log_level, "%s line %d: can't open file `%s' for reading", psz_cue_name, i_line, psz_field); goto err_exit; } } else { CdioDataSource_t *s = cdio_stdio_new (psz_field); if (!s) { cdio_log (log_level, "%s line %d: can't open file `%s' for reading", psz_cue_name, i_line, psz_field); goto err_exit; } cdio_stdio_destroy (s); } } psz_field = strtok (NULL, " \t\n\r"); if (psz_field) { /* Handle optional #byte-offset */ if ( psz_field[0] == '#') { long int offset; psz_field++; errno = 0; offset = strtol(psz_field, (char **)NULL, 10); if ( (LONG_MIN == offset || LONG_MAX == offset) && 0 != errno ) { cdio_log (log_level, "%s line %d: can't convert `%s' to byte offset", psz_cue_name, i_line, psz_field); goto err_exit; } else { if (NULL != cd) { cd->tocent[i].offset = offset; } } psz_field = strtok (NULL, " \t\n\r"); } } if (psz_field) { /* Handle start-msf */ lba_t lba = cdio_mmssff_to_lba (psz_field); if (CDIO_INVALID_LBA == lba) { cdio_log(log_level, "%s line %d: invalid MSF string %s", psz_cue_name, i_line, psz_field); goto err_exit; } if (cd) { cd->tocent[i].start_lba = lba; cdio_lba_to_msf(cd->tocent[i].start_lba, &(cd->tocent[i].start_msf)); } } else { /* No start-msf. */ if (cd) { if (i) { uint16_t i_blocksize = cd->tocent[i-1].blocksize; long i_size = cdio_stream_stat(cd->tocent[i-1].data_source); check_track_is_blocksize_multiple(cd->tocent[i-1].filename, i-1, i_size, i_blocksize); /* Append size of previous datafile. */ cd->tocent[i].start_lba = cd->tocent[i-1].start_lba + (i_size / i_blocksize); } cd->tocent[i].offset = 0; cd->tocent[i].start_lba += CDIO_PREGAP_SECTORS; cdio_lba_to_msf(cd->tocent[i].start_lba, &(cd->tocent[i].start_msf)); } } } else { goto not_in_global_section; } /* FIFO "" [] */ } else if (0 == strcmp ("FIFO", psz_keyword)) { goto unimplimented_error; /* START MM:SS:FF */ } else if (0 == strcmp ("START", psz_keyword)) { if (0 <= i) { if (NULL != (psz_field = strtok (NULL, " \t\n\r"))) { /* todo: line is too long! */ if (NULL != cd) { cd->tocent[i].pregap = cd->tocent[i].start_lba; cd->tocent[i].start_lba += cdio_mmssff_to_lba (psz_field); cdio_lba_to_msf(cd->tocent[i].start_lba, &(cd->tocent[i].start_msf)); } } if (NULL != (psz_field = strtok (NULL, " \t\n\r"))) { goto format_error; } } else { goto not_in_global_section; } /* PREGAP MM:SS:FF */ } else if (0 == strcmp ("PREGAP", psz_keyword)) { if (0 <= i) { if (NULL != (psz_field = strtok (NULL, " \t\n\r"))) { if (NULL != cd) cd->tocent[i].silence = cdio_mmssff_to_lba (psz_field); } else { goto format_error; } if (NULL != (psz_field = strtok (NULL, " \t\n\r"))) { goto format_error; } } else { goto not_in_global_section; } /* INDEX MM:SS:FF */ } else if (0 == strcmp ("INDEX", psz_keyword)) { if (0 <= i) { if (NULL != (psz_field = strtok (NULL, " \t\n\r"))) { if (NULL != cd) { #if 0 if (1 == cd->tocent[i].nindex) { cd->tocent[i].indexes[1] = cd->tocent[i].indexes[0]; cd->tocent[i].nindex++; } cd->tocent[i].indexes[cd->tocent[i].nindex++] = cdio_mmssff_to_lba (psz_field) + cd->tocent[i].indexes[0]; #else ; #endif } } else { goto format_error; } if (NULL != (psz_field = strtok (NULL, " \t\n\r"))) { goto format_error; } } else { goto not_in_global_section; } /* CD_TEXT { ... } */ /* todo: opening { must be on same line as CD_TEXT */ } else if (0 == strcmp ("CD_TEXT", psz_keyword)) { if (NULL == (psz_field = strtok (NULL, " \t\n\r"))) { goto format_error; } if ( 0 == strcmp( "{", psz_field ) ) { i_cdtext_nest++; } else { cdio_log (log_level, "%s line %d: expecting '{'", psz_cue_name, i_line); goto err_exit; } } else if (0 == strcmp ("LANGUAGE_MAP", psz_keyword)) { /* LANGUAGE d { ... } */ } else if (0 == strcmp ("LANGUAGE", psz_keyword)) { if (NULL == (psz_field = strtok (NULL, " \t\n\r"))) { goto format_error; } /* Language number */ if (NULL == (psz_field = strtok (NULL, " \t\n\r"))) { goto format_error; } if ( 0 == strcmp( "{", psz_field ) ) { i_cdtext_nest++; } } else if (0 == strcmp ("{", psz_keyword)) { i_cdtext_nest++; } else if (0 == strcmp ("}", psz_keyword)) { if (i_cdtext_nest > 0) i_cdtext_nest--; } else if ( CDTEXT_INVALID != (cdtext_key = cdtext_is_keyword (psz_keyword)) ) { if (-1 == i) { if (NULL != cd) { cdtext_set (cdtext_key, strtok (NULL, "\"\t\n\r"), &(cd->gen.cdtext)); } } else { if (NULL != cd) { cdtext_set (cdtext_key, strtok (NULL, "\"\t\n\r"), &(cd->gen.cdtext_track[i])); } } /* unrecognized line */ } else { cdio_log(log_level, "%s line %d: warning: unrecognized word: %s", psz_cue_name, i_line, psz_keyword); goto err_exit; } } } if (NULL != cd) { cd->gen.i_tracks = i+1; cd->gen.toc_init = true; } fclose (fp); return true; unimplimented_error: UNIMPLIMENTED_MSG; goto err_exit; format_error: cdio_log(log_level, "%s line %d after word %s", psz_cue_name, i_line, psz_keyword); goto err_exit; not_in_global_section: cdio_log(log_level, "%s line %d: word %s only allowed in global section", psz_cue_name, i_line, psz_keyword); err_exit: fclose (fp); return false; } /*! Reads a single audio sector from CD device into data starting from lsn. Returns 0 if no error. */ static driver_return_code_t _read_audio_sectors_cdrdao (void *user_data, void *data, lsn_t lsn, unsigned int nblocks) { _img_private_t *env = user_data; int ret; ret = cdio_stream_seek (env->tocent[0].data_source, lsn * CDIO_CD_FRAMESIZE_RAW, SEEK_SET); if (ret!=0) return ret; ret = cdio_stream_read (env->tocent[0].data_source, data, CDIO_CD_FRAMESIZE_RAW, nblocks); /* ret is number of bytes if okay, but we need to return 0 okay. */ return ret == 0; } /*! Reads a single mode2 sector from cd device into data starting from lsn. Returns 0 if no error. */ static driver_return_code_t _read_mode1_sector_cdrdao (void *user_data, void *data, lsn_t lsn, bool b_form2) { _img_private_t *env = user_data; int ret; char buf[CDIO_CD_FRAMESIZE_RAW] = { 0, }; ret = cdio_stream_seek (env->tocent[0].data_source, lsn * CDIO_CD_FRAMESIZE_RAW, SEEK_SET); if (ret!=0) return ret; /* FIXME: Not completely sure the below is correct. */ ret = cdio_stream_read (env->tocent[0].data_source, buf, CDIO_CD_FRAMESIZE_RAW, 1); if (ret==0) return ret; memcpy (data, buf + CDIO_CD_SYNC_SIZE + CDIO_CD_HEADER_SIZE, b_form2 ? M2RAW_SECTOR_SIZE: CDIO_CD_FRAMESIZE); return DRIVER_OP_SUCCESS; } /*! Reads nblocks of mode1 sectors from cd device into data starting from lsn. Returns 0 if no error. */ static int _read_mode1_sectors_cdrdao (void *user_data, void *data, lsn_t lsn, bool b_form2, unsigned int nblocks) { _img_private_t *env = user_data; int i; int retval; unsigned int blocksize = b_form2 ? M2RAW_SECTOR_SIZE : CDIO_CD_FRAMESIZE; for (i = 0; i < nblocks; i++) { if ( (retval = _read_mode1_sector_cdrdao (env, ((char *)data) + (blocksize * i), lsn + i, b_form2)) ) return retval; } return DRIVER_OP_SUCCESS; } /*! Reads a single mode1 sector from cd device into data starting from lsn. Returns 0 if no error. */ static driver_return_code_t _read_mode2_sector_cdrdao (void *user_data, void *data, lsn_t lsn, bool b_form2) { _img_private_t *env = user_data; int ret; char buf[CDIO_CD_FRAMESIZE_RAW] = { 0, }; long unsigned int i_off = lsn * CDIO_CD_FRAMESIZE_RAW; /* For sms's VCD's (mwc1.toc) it is more like this: if (i_off > 272) i_off -= 272; There is that magic 272 that we find in read_audio_sectors_cdrdao again. */ /* NOTE: The logic below seems a bit wrong and convoluted to me, but passes the regression tests. (Perhaps it is why we get valgrind errors in vcdxrip). Leave it the way it was for now. Review this sector 2336 stuff later. */ ret = cdio_stream_seek (env->tocent[0].data_source, i_off, SEEK_SET); if (ret!=0) return ret; ret = cdio_stream_read (env->tocent[0].data_source, buf, CDIO_CD_FRAMESIZE_RAW, 1); if (ret==0) return ret; /* See NOTE above. */ if (b_form2) memcpy (data, buf + CDIO_CD_SYNC_SIZE + CDIO_CD_HEADER_SIZE, M2RAW_SECTOR_SIZE); else memcpy (data, buf + CDIO_CD_XA_SYNC_HEADER, CDIO_CD_FRAMESIZE); return DRIVER_OP_SUCCESS; } /*! Reads nblocks of mode2 sectors from cd device into data starting from lsn. Returns 0 if no error. */ static driver_return_code_t _read_mode2_sectors_cdrdao (void *user_data, void *data, lsn_t lsn, bool b_form2, unsigned int nblocks) { _img_private_t *env = user_data; int i; int retval; for (i = 0; i < nblocks; i++) { if ( (retval = _read_mode2_sector_cdrdao (env, ((char *)data) + (CDIO_CD_FRAMESIZE * i), lsn + i, b_form2)) ) return retval; } return 0; } /*! Return an array of strings giving possible TOC disk images. */ char ** cdio_get_devices_cdrdao (void) { char **drives = NULL; unsigned int num_files=0; #ifdef HAVE_GLOB_H unsigned int i; glob_t globbuf; globbuf.gl_offs = 0; glob("*.toc", GLOB_DOOFFS, NULL, &globbuf); for (i=0; ipsz_vendor, "libcdio", sizeof(hw_info->psz_vendor)-1); hw_info->psz_vendor[sizeof(hw_info->psz_vendor)-1] = '\0'; strncpy(hw_info->psz_model, "cdrdao", sizeof(hw_info->psz_model)-1); hw_info->psz_model[sizeof(hw_info->psz_model)-1] = '\0'; strncpy(hw_info->psz_revision, CDIO_VERSION, sizeof(hw_info->psz_revision)-1); hw_info->psz_revision[sizeof(hw_info->psz_revision)-1] = '\0'; return true; } /*! Return the number of tracks in the current medium. CDIO_INVALID_TRACK is returned on error. */ static track_format_t _get_track_format_cdrdao(void *p_user_data, track_t i_track) { _img_private_t *p_env = p_user_data; if (!p_env->gen.init) return TRACK_FORMAT_ERROR; if (i_track > p_env->gen.i_tracks || i_track == 0) return TRACK_FORMAT_ERROR; return p_env->tocent[i_track-p_env->gen.i_first_track].track_format; } /*! Return true if we have XA data (green, mode2 form1) or XA data (green, mode2 form2). That is track begins: sync - header - subheader 12 4 - 8 FIXME: there's gotta be a better design for this and get_track_format? */ static bool _get_track_green_cdrdao(void *user_data, track_t i_track) { _img_private_t *env = user_data; if (!env->gen.init) _init_cdrdao(env); if (i_track > env->gen.i_tracks || i_track == 0) return false; return env->tocent[i_track-env->gen.i_first_track].track_green; } /*! Return the starting LSN track number i_track in obj. Track numbers start at 1. The "leadout" track is specified either by using i_track CDIO_CDROM_LEADOUT_TRACK or the total tracks+1. False is returned if there is no track entry. */ static lba_t _get_lba_track_cdrdao(void *p_user_data, track_t i_track) { _img_private_t *p_env = p_user_data; _init_cdrdao (p_env); if (i_track == CDIO_CDROM_LEADOUT_TRACK) i_track = p_env->gen.i_tracks+1; if (i_track <= p_env->gen.i_tracks+1 && i_track != 0) { return p_env->tocent[i_track-1].start_lba; } else return CDIO_INVALID_LBA; } /*! Check that a TOC file is valid. We parse the entire file. */ bool cdio_is_tocfile(const char *psz_cue_name) { int i; if (psz_cue_name == NULL) return false; i=strlen(psz_cue_name)-strlen("toc"); if (i>0) { if ( (psz_cue_name[i]=='t' && psz_cue_name[i+1]=='o' && psz_cue_name[i+2]=='c') || (psz_cue_name[i]=='T' && psz_cue_name[i+1]=='O' && psz_cue_name[i+2]=='C') ) { return parse_tocfile(NULL, psz_cue_name); } } return false; } /*! Initialization routine. This is the only thing that doesn't get called via a function pointer. In fact *we* are the ones to set that up. */ CdIo_t * cdio_open_am_cdrdao (const char *psz_source_name, const char *psz_access_mode) { if (psz_access_mode != NULL && strcmp(psz_access_mode, "image")) cdio_warn ("there is only one access mode, 'image' for cdrdao. Arg %s ignored", psz_access_mode); return cdio_open_cdrdao(psz_source_name); } /*! Initialization routine. This is the only thing that doesn't get called via a function pointer. In fact *we* are the ones to set that up. */ CdIo_t * cdio_open_cdrdao (const char *psz_cue_name) { CdIo_t *ret; _img_private_t *p_data; cdio_funcs_t _funcs; memset( &_funcs, 0, sizeof(_funcs) ); _funcs.eject_media = _eject_media_image; _funcs.free = _free_image; _funcs.get_arg = _get_arg_image; _funcs.get_cdtext = get_cdtext_generic; _funcs.get_devices = cdio_get_devices_cdrdao; _funcs.get_default_device = cdio_get_default_device_cdrdao; _funcs.get_disc_last_lsn = get_disc_last_lsn_cdrdao; _funcs.get_discmode = _get_discmode_image; _funcs.get_drive_cap = _get_drive_cap_image; _funcs.get_first_track_num = _get_first_track_num_image; _funcs.get_hwinfo = get_hwinfo_cdrdao; _funcs.get_media_changed = get_media_changed_image; _funcs.get_mcn = _get_mcn_image; _funcs.get_num_tracks = _get_num_tracks_image; _funcs.get_track_channels = get_track_channels_image; _funcs.get_track_copy_permit = get_track_copy_permit_image; _funcs.get_track_format = _get_track_format_cdrdao; _funcs.get_track_green = _get_track_green_cdrdao; _funcs.get_track_lba = _get_lba_track_cdrdao; _funcs.get_track_msf = _get_track_msf_image; _funcs.get_track_preemphasis = get_track_preemphasis_image; _funcs.get_track_pregap_lba = get_track_pregap_lba_image; _funcs.get_track_isrc = get_track_isrc_image; _funcs.lseek = _lseek_cdrdao; _funcs.read = _read_cdrdao; _funcs.read_audio_sectors = _read_audio_sectors_cdrdao; _funcs.read_data_sectors = read_data_sectors_image; _funcs.read_mode1_sector = _read_mode1_sector_cdrdao; _funcs.read_mode1_sectors = _read_mode1_sectors_cdrdao; _funcs.read_mode2_sector = _read_mode2_sector_cdrdao; _funcs.read_mode2_sectors = _read_mode2_sectors_cdrdao; _funcs.run_mmc_cmd = NULL; _funcs.set_arg = _set_arg_image; _funcs.set_speed = cdio_generic_unimplemented_set_speed; _funcs.set_blocksize = cdio_generic_unimplemented_set_blocksize; if (NULL == psz_cue_name) return NULL; p_data = calloc(1, sizeof (_img_private_t)); p_data->gen.init = false; p_data->psz_cue_name = NULL; p_data->gen.data_source = NULL; p_data->gen.source_name = NULL; ret = cdio_new ((void *)p_data, &_funcs); if (ret == NULL) { free(p_data); return NULL; } ret->driver_id = DRIVER_CDRDAO; if (!cdio_is_tocfile(psz_cue_name)) { cdio_debug ("source name %s is not recognized as a TOC file", psz_cue_name); free(p_data); free(ret); return NULL; } _set_arg_image (p_data, "cue", psz_cue_name); _set_arg_image (p_data, "source", psz_cue_name); _set_arg_image (p_data, "access-mode", "cdrdao"); if (_init_cdrdao(p_data)) { return ret; } else { _free_image(p_data); free(ret); return NULL; } } bool cdio_have_cdrdao (void) { return true; } libcdio-0.83/lib/driver/image/nrg.h0000644000175000017500000001146611114145233014057 00000000000000/* $Id: nrg.h,v 1.7 2008/06/10 00:45:08 pjcreath Exp $ Copyright (C) 2004, 2006, 2008 Rocky Bernstein Copyright (C) 2001, 2003 Herbert Valerio Riedel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* NERO (NRG) file format structures. */ /* this ugly image format is typical for lazy win32 programmers... at least structure were set big endian, so at reverse engineering wasn't such a big headache... */ PRAGMA_BEGIN_PACKED typedef union { struct { uint32_t __x GNUC_PACKED; uint32_t ID GNUC_PACKED; uint32_t footer_ofs GNUC_PACKED; } v50; struct { uint32_t ID GNUC_PACKED; uint64_t footer_ofs GNUC_PACKED; } v55; } _footer_t; typedef struct { uint32_t start GNUC_PACKED; uint32_t length GNUC_PACKED; uint32_t type GNUC_PACKED; /* 0x0 -> MODE1, 0x2 -> MODE2 form1, 0x3 -> MIXED_MODE2 2336 blocksize */ uint32_t start_lsn GNUC_PACKED; /* does not include any pre-gaps! */ uint32_t _unknown GNUC_PACKED; /* wtf is this for? -- always zero... */ } _etnf_array_t; /* Finally they realized that 32-bit offsets are a bit outdated for IA64 *eg* */ typedef struct { uint64_t start GNUC_PACKED; uint64_t length GNUC_PACKED; uint32_t type GNUC_PACKED; /* 0x0 -> MODE1, 0x2 -> MODE2 form1, 0x3 -> MIXED_MODE2 2336 blocksize */ uint32_t start_lsn GNUC_PACKED; uint64_t _unknown GNUC_PACKED; /* wtf is this for? -- always zero... */ } _etn2_array_t; typedef struct { uint8_t type; /* has track copy bit and whether audiofile or datafile. Is often 0x41 == 'A' */ uint8_t track; /* binary or BCD?? */ uint8_t addr_ctrl; /* addresstype: MSF or LBA in lower 4 bits control in upper 4 bits. makes 0->1 transitions */ uint8_t res; /* ?? */ uint32_t lsn GNUC_PACKED; } _cuex_array_t; /* New DAO[XI] Information from http://en.wikipedia.org/wiki/NRG_(file_format) */ typedef struct { char psz_isrc[CDIO_ISRC_SIZE]; uint8_t unknown[6]; } _dao_array_common_t; typedef struct { _dao_array_common_t common; uint64_t index0 GNUC_PACKED; uint64_t index1 GNUC_PACKED; uint64_t end_of_track GNUC_PACKED; } _daox_array_t; typedef struct { _dao_array_common_t common; uint32_t index0 GNUC_PACKED; uint32_t index1 GNUC_PACKED; uint32_t end_of_track GNUC_PACKED; } _daoi_array_t; typedef struct GNUC_PACKED { uint32_t chunk_size_le GNUC_PACKED; char psz_mcn[CDIO_MCN_SIZE]; uint8_t unknown[3]; uint8_t first_track; uint8_t last_track; } _dao_common_t; typedef struct { _dao_common_t common; _daox_array_t track_info[EMPTY_ARRAY_SIZE]; } _daox_t; typedef struct { _dao_common_t common; _daoi_array_t track_info[EMPTY_ARRAY_SIZE]; } _daoi_t; typedef struct { uint32_t id GNUC_PACKED; uint32_t len GNUC_PACKED; char data[EMPTY_ARRAY_SIZE]; } _chunk_t; PRAGMA_END_PACKED /* Nero images are Big Endian. */ typedef enum { CDTX_ID = 0x43445458, /* CD TEXT */ CUEX_ID = 0x43554558, /* Nero version 5.5.x-6.x */ CUES_ID = 0x43554553, /* Nero pre version 5.5.x-6.x */ DAOX_ID = 0x44414f58, /* Nero version 5.5.x-6.x */ DAOI_ID = 0x44414f49, END1_ID = 0x454e4421, ETN2_ID = 0x45544e32, ETNF_ID = 0x45544e46, NER5_ID = 0x4e455235, /* Nero version 5.5.x */ NERO_ID = 0x4e45524f, /* Nero pre 5.5.x */ SINF_ID = 0x53494e46, /* Session information */ MTYP_ID = 0x4d545950, /* Disc Media type? */ } nero_id_t; #define MTYP_AUDIO_CD 1 /* This isn't correct. But I don't know the the right thing is and it sometimes works (and sometimes is wrong). */ /* Disk track type Values gleaned from DAOX */ typedef enum { DTYP_MODE1 = 0, DTYP_MODE2_XA = 2, DTYP_INVALID = 255 } nero_dtype_t; /** The below variables are trickery to force the above enum symbol values to be recorded in debug symbol tables. They are used to allow one to refer to the enumeration value names in the typedefs above in a debugger and debugger expressions. */ extern nero_id_t nero_id; extern nero_dtype_t nero_dtype; libcdio-0.83/lib/driver/cdio.c0000644000175000017500000000550011650122256013115 00000000000000/* Copyright (C) 2003, 2004, 2005, 2008, 2011 Rocky Bernstein Copyright (C) 2001 Herbert Valerio Riedel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #ifdef HAVE_UNISTD_H #include #endif #include "cdio_assert.h" #include #include #include "cdio_private.h" static const char _rcsid[] = "$Id: cdio.c,v 1.14 2008/04/22 15:29:11 karl Exp $"; /*! Return the value associatied with key. NULL is returned if obj is NULL or "key" does not exist. */ const char * cdio_get_arg (const CdIo *obj, const char key[]) { if (obj == NULL) return NULL; if (obj->op.get_arg) { return obj->op.get_arg (obj->env, key); } else { return NULL; } } /*! Get cdtext information for a CdIo object . @param obj the CD object that may contain CD-TEXT information. @return the CD-TEXT object or NULL if obj is NULL or CD-TEXT information does not exist. */ cdtext_t * cdio_get_cdtext (CdIo *obj, track_t i_track) { if (obj == NULL) return NULL; if (obj->op.get_cdtext) { return obj->op.get_cdtext (obj->env, i_track); } else { return NULL; } } CdIo_t * cdio_new (generic_img_private_t *p_env, cdio_funcs_t *p_funcs) { CdIo_t *p_new_cdio = calloc(1, sizeof (CdIo_t)); if (NULL == p_new_cdio) return NULL; p_new_cdio->env = p_env; /* This is the private "environment" that driver-dependent routines use. */ p_new_cdio->op = *p_funcs; p_env->cdio = p_new_cdio; /* A way for the driver-dependent routines to access the higher-level general cdio object. */ return p_new_cdio; } /*! Set the arg "key" with "value" in the source device. */ driver_return_code_t cdio_set_arg (CdIo_t *p_cdio, const char key[], const char value[]) { if (!p_cdio) return DRIVER_OP_UNINIT; if (!p_cdio->op.set_arg) return DRIVER_OP_UNSUPPORTED; if (!key) return DRIVER_OP_ERROR; return p_cdio->op.set_arg (p_cdio->env, key, value); } /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/lib/driver/cdio_assert.h0000644000175000017500000000303611650123676014514 00000000000000/* Copyright (C) 2008, 2011 Rocky Bernstein Copyright (C) 2000 Herbert Valerio Riedel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef __CDIO_ASSERT_H__ #define __CDIO_ASSERT_H__ #if defined(__GNUC__) #if defined(HAVE_CONFIG_H) && !defined(__CDIO_CONFIG_H__) # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #define cdio_assert(expr) \ { \ if (GNUC_UNLIKELY (!(expr))) cdio_log (CDIO_LOG_ASSERT, \ "file %s: line %d (%s): assertion failed: (%s)", \ __FILE__, __LINE__, __PRETTY_FUNCTION__, #expr); \ } #define cdio_assert_not_reached() \ { \ cdio_log (CDIO_LOG_ASSERT, \ "file %s: line %d (%s): should not be reached", \ __FILE__, __LINE__, __PRETTY_FUNCTION__); \ } #else /* non GNU C */ #include #define cdio_assert(expr) \ assert(expr) #define cdio_assert_not_reached() \ assert(0) #endif #endif /* __CDIO_ASSERT_H__ */ libcdio-0.83/lib/driver/_cdio_stdio.c0000644000175000017500000001252411650121726014463 00000000000000/* Copyright (C) 2003, 2004, 2005, 2008, 2011 Rocky Bernstein Copyright (C) 2000 Herbert Valerio Riedel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #include #ifdef HAVE_UNISTD_H #include #endif /*HAVE_UNISTD_H*/ #include #include #include #include #include "_cdio_stream.h" #include "_cdio_stdio.h" static const char _rcsid[] = "$Id: _cdio_stdio.c,v 1.6 2008/04/22 15:29:11 karl Exp $"; #define CDIO_STDIO_BUFSIZE (128*1024) typedef struct { char *pathname; FILE *fd; char *fd_buf; off_t st_size; /* used only for source */ } _UserData; static int _stdio_open (void *user_data) { _UserData *const ud = user_data; if ((ud->fd = fopen (ud->pathname, "rb"))) { ud->fd_buf = calloc (1, CDIO_STDIO_BUFSIZE); setvbuf (ud->fd, ud->fd_buf, _IOFBF, CDIO_STDIO_BUFSIZE); } return (ud->fd == NULL); } static int _stdio_close(void *user_data) { _UserData *const ud = user_data; if (fclose (ud->fd)) cdio_error ("fclose (): %s", strerror (errno)); ud->fd = NULL; free (ud->fd_buf); ud->fd_buf = NULL; return 0; } static void _stdio_free(void *user_data) { _UserData *const ud = user_data; if (ud->pathname) free(ud->pathname); if (ud->fd) /* should be NULL anyway... */ _stdio_close(user_data); free(ud); } /*! Like fseek(3) and in fact may be the same. This function sets the file position indicator for the stream pointed to by stream. The new position, measured in bytes, is obtained by adding offset bytes to the position specified by whence. If whence is set to SEEK_SET, SEEK_CUR, or SEEK_END, the offset is relative to the start of the file, the current position indicator, or end-of-file, respectively. A successful call to the fseek function clears the end- of-file indicator for the stream and undoes any effects of the ungetc(3) function on the same stream. @return upon successful completion, DRIVER_OP_SUCCESS, else, DRIVER_OP_ERROR is returned and the global variable errno is set to indicate the error. */ static driver_return_code_t _stdio_seek(void *p_user_data, long i_offset, int whence) { _UserData *const ud = p_user_data; if ( (i_offset=fseek (ud->fd, i_offset, whence)) ) { cdio_error ("fseek (): %s", strerror (errno)); } return i_offset; } static long int _stdio_stat(void *p_user_data) { const _UserData *const ud = p_user_data; return ud->st_size; } /*! Like fread(3) and in fact is about the same. DESCRIPTION: The function fread reads nmemb elements of data, each size bytes long, from the stream pointed to by stream, storing them at the location given by ptr. RETURN VALUE: return the number of items successfully read or written (i.e., not the number of characters). If an error occurs, or the end-of-file is reached, the return value is a short item count (or zero). We do not distinguish between end-of-file and error, and callers must use feof(3) and ferror(3) to determine which occurred. */ static long _stdio_read(void *user_data, void *buf, long int count) { _UserData *const ud = user_data; long read; read = fread(buf, 1, count, ud->fd); if (read != count) { /* fixme -- ferror/feof */ if (feof (ud->fd)) { cdio_debug ("fread (): EOF encountered"); clearerr (ud->fd); } else if (ferror (ud->fd)) { cdio_error ("fread (): %s", strerror (errno)); clearerr (ud->fd); } else cdio_debug ("fread (): short read and no EOF?!?"); } return read; } /*! Deallocate resources assocaited with obj. After this obj is unusable. */ void cdio_stdio_destroy(CdioDataSource_t *p_obj) { cdio_stream_destroy(p_obj); } CdioDataSource_t * cdio_stdio_new(const char pathname[]) { CdioDataSource_t *new_obj = NULL; cdio_stream_io_functions funcs = { NULL, NULL, NULL, NULL, NULL, NULL }; _UserData *ud = NULL; struct stat statbuf; if (stat (pathname, &statbuf) == -1) { cdio_warn ("could not retrieve file info for `%s': %s", pathname, strerror (errno)); return NULL; } ud = calloc (1, sizeof (_UserData)); ud->pathname = strdup(pathname); ud->st_size = statbuf.st_size; /* let's hope it doesn't change... */ funcs.open = _stdio_open; funcs.seek = _stdio_seek; funcs.stat = _stdio_stat; funcs.read = _stdio_read; funcs.close = _stdio_close; funcs.free = _stdio_free; new_obj = cdio_stream_new(ud, &funcs); return new_obj; } /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/lib/driver/osx.c0000644000175000017500000016325211650125704013022 00000000000000/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2010, 2011 Rocky Bernstein from vcdimager code: Copyright (C) 2001 Herbert Valerio Riedel and VideoLAN code Copyright (C) 1998-2001 VideoLAN Authors: Johan Bilien Gildas Bazin Jon Lech Johansen Derk-Jan Hartman Justin F. Hallett This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* This file contains OSX-specific code and implements low-level control of the CD drive. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif static const char _rcsid[] = "$Id: osx.c,v 1.14 2008/10/17 11:58:52 rocky Exp $"; #include #include #include /* For SCSI TR_* enumerations */ #include #include "cdio_assert.h" #include "cdio_private.h" #include #ifdef HAVE_DARWIN_CDROM #undef VERSION #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef HAVE_DISKARBITRATION #include #endif /* FIXME */ #define MAX_BIG_BUFF_SIZE 65535 #define kIOCDBlockStorageDeviceClassString "IOCDBlockStorageDevice" /* Note leadout is normally defined 0xAA, But on OSX 0xA0 is "lead in" while 0xA2 is "lead out". I don't understand the distinction, and therefore something could be wrong. */ #define OSX_CDROM_LEADOUT_TRACK 0xA2 #define TOTAL_TRACKS (p_env->i_last_track - p_env->gen.i_first_track + 1) #define CDROM_CDI_TRACK 0x1 #define CDROM_XA_TRACK 0x2 typedef enum { _AM_NONE, _AM_OSX, } access_mode_t; #define MAX_SERVICE_NAME 1000 typedef struct { /* Things common to all drivers like this. This must be first. */ generic_img_private_t gen; access_mode_t access_mode; /* Track information */ CDTOC *pTOC; int i_descriptors; track_t i_last_track; /* highest track number */ track_t i_last_session; /* highest session number */ track_t i_first_session; /* first session number */ lsn_t *pp_lba; io_service_t MediaClass_service; char psz_MediaClass_service[MAX_SERVICE_NAME]; SCSITaskDeviceInterface **pp_scsiTaskDeviceInterface; // io_service_t obj; // SCSITaskDeviceInterface **scsi; SCSITaskInterface **scsi_task; MMCDeviceInterface **mmc; IOCFPlugInInterface **plugin; SCSI_Sense_Data sense; SCSITaskStatus status; UInt64 realized_len; } _img_private_t; static bool read_toc_osx (void *p_user_data); static track_format_t get_track_format_osx(void *p_user_data, track_t i_track); /** * GetRegistryEntryProperties - Gets the registry entry properties for * an io_service_t. */ static CFMutableDictionaryRef GetRegistryEntryProperties ( io_service_t service ) { IOReturn err = kIOReturnSuccess; CFMutableDictionaryRef dict = 0; err = IORegistryEntryCreateCFProperties (service, &dict, kCFAllocatorDefault, 0); if ( err != kIOReturnSuccess ) cdio_warn( "IORegistryEntryCreateCFProperties: 0x%08x", err ); return dict; } #ifdef GET_SCSI_FIXED static bool get_scsi(_img_private_t *p_env) { SInt32 score; kern_return_t err; HRESULT herr; err = IOCreatePlugInInterfaceForService(p_env->MediaClass_service, kIOMMCDeviceUserClientTypeID, kIOCFPlugInInterfaceID, &p_env->plugin, &score); if (err != noErr) { fprintf(stderr, "Error %x accessing MMC plugin.\n", err); return false; } herr = (*p_env->plugin) -> QueryInterface(p_env->plugin, CFUUIDGetUUIDBytes(kIOMMCDeviceInterfaceID), (void *)&p_env->mmc); if (herr != S_OK) { fprintf(stderr, "Error %x accessing MMC interface.\n", (int) herr); IODestroyPlugInInterface(p_env->plugin); return false; } p_env->pp_scsiTaskDeviceInterface = (*p_env->mmc)->GetSCSITaskDeviceInterface(p_env->mmc); if (!p_env->pp_scsiTaskDeviceInterface) { fprintf(stderr, "Could not get SCSITaskkDevice interface from MMC interface.\n"); (*p_env->mmc)->Release(p_env->mmc); IODestroyPlugInInterface(p_env->plugin); return false; } err = (*p_env->pp_scsiTaskDeviceInterface)-> ObtainExclusiveAccess(p_env->pp_scsiTaskDeviceInterface); if (err != kIOReturnSuccess) { fprintf(stderr, "Could not obtain exclusive access to the device (%x).\n", err); if (err == kIOReturnBusy) fprintf(stderr, "The volume is already mounted.\n"); else if (err == kIOReturnExclusiveAccess) fprintf(stderr, "Another application already has exclusive access " "to this device.\n"); else fprintf(stderr, "I don't know why.\n"); (*p_env->pp_scsiTaskDeviceInterface)-> Release(p_env->pp_scsiTaskDeviceInterface); (*p_env->mmc)->Release(p_env->mmc); IODestroyPlugInInterface(p_env->plugin); return false; } p_env->scsi_task = (*p_env->pp_scsiTaskDeviceInterface) -> CreateSCSITask(p_env->pp_scsiTaskDeviceInterface); if (!p_env->scsi_task) { fprintf(stderr, "Could not create a SCSITask interface.\n"); (*p_env->pp_scsiTaskDeviceInterface)-> ReleaseExclusiveAccess(p_env->pp_scsiTaskDeviceInterface); (*p_env->pp_scsiTaskDeviceInterface)-> Release(p_env->pp_scsiTaskDeviceInterface); (*p_env->mmc)->Release(p_env->mmc); IODestroyPlugInInterface(p_env->plugin); return false; } return true; } #endif static bool init_osx(_img_private_t *p_env) { char *psz_devname; kern_return_t ret; io_iterator_t iterator; /* Only open if not already opened. Otherwise, too many descriptors are holding the device busy. */ if (-1 == p_env->gen.fd) p_env->gen.fd = open( p_env->gen.source_name, O_RDONLY | O_NONBLOCK ); if (-1 == p_env->gen.fd) { cdio_warn("Failed to open %s: %s", p_env->gen.source_name, strerror(errno)); return false; } /* Get the device name. */ psz_devname = strrchr( p_env->gen.source_name, '/'); if( NULL != psz_devname ) ++psz_devname; else psz_devname = p_env->gen.source_name; /* Unraw the device name. */ if( *psz_devname == 'r' ) ++psz_devname; ret = IOServiceGetMatchingServices( kIOMasterPortDefault, IOBSDNameMatching(kIOMasterPortDefault, 0, psz_devname), &iterator ); /* Get service iterator for the device. */ if( ret != KERN_SUCCESS ) { cdio_warn( "IOServiceGetMatchingServices: 0x%08x", ret ); return false; } /* first service */ p_env->MediaClass_service = IOIteratorNext( iterator ); IOObjectRelease( iterator ); /* search for kIOCDMediaClass or kIOCDVDMediaClass */ while( p_env->MediaClass_service && (!IOObjectConformsTo(p_env->MediaClass_service, kIOCDMediaClass)) && (!IOObjectConformsTo(p_env->MediaClass_service, kIODVDMediaClass)) ) { ret = IORegistryEntryGetParentIterator( p_env->MediaClass_service, kIOServicePlane, &iterator ); if( ret != KERN_SUCCESS ) { cdio_warn( "IORegistryEntryGetParentIterator: 0x%08x", ret ); IOObjectRelease( p_env->MediaClass_service ); return false; } IOObjectRelease( p_env->MediaClass_service ); p_env->MediaClass_service = IOIteratorNext( iterator ); IOObjectRelease( iterator ); } if ( 0 == p_env->MediaClass_service ) { cdio_warn( "search for kIOCDMediaClass/kIODVDMediaClass came up empty" ); return false; } /* Save the name so we can compare against this in case we have to do another scan. FIXME: this is hoaky and there's got to be a better variable to test or way to do. */ IORegistryEntryGetPath(p_env->MediaClass_service, kIOServicePlane, p_env->psz_MediaClass_service); #ifdef GET_SCSI_FIXED return get_scsi(p_env); #else return true; #endif } /** Run a SCSI MMC command. cdio CD structure set by cdio_open(). i_timeout time in milliseconds we will wait for the command to complete. If this value is -1, use the default time-out value. p_buf Buffer for data, both sending and receiving i_buf Size of buffer e_direction direction the transfer is to go. cdb CDB bytes. All values that are needed should be set on input. We'll figure out what the right CDB length should be. We return true if command completed successfully and false if not. */ #if 1 /* process a complete scsi command. */ static int run_mmc_cmd_osx( void *p_user_data, unsigned int i_timeout_ms, unsigned int i_cdb, const mmc_cdb_t *p_cdb, cdio_mmc_direction_t e_direction, unsigned int i_buf, /*in/out*/ void *p_buf ) { _img_private_t *p_env = p_user_data; uint8_t cmdbuf[16]; UInt8 dir; IOVirtualRange buf; IOReturn ret; if (!p_env->scsi_task) return DRIVER_OP_UNSUPPORTED; p_env->gen.scsi_mmc_sense_valid = 0; memcpy(cmdbuf, p_cdb, i_cdb); dir = (SCSI_MMC_DATA_READ == e_direction) ? kSCSIDataTransfer_FromTargetToInitiator : (SCSI_MMC_DATA_WRITE == e_direction) ? kSCSIDataTransfer_FromInitiatorToTarget : kSCSIDataTransfer_NoDataTransfer; if (!i_buf) dir = kSCSIDataTransfer_NoDataTransfer; if (i_buf > MAX_BIG_BUFF_SIZE) { fprintf(stderr, "Excessive request size: %d bytes\n", i_buf); return TR_ILLEGAL; } buf.address = (IOVirtualAddress)p_buf; buf.length = i_buf; ret = (*p_env->scsi_task)->SetCommandDescriptorBlock(p_env->scsi_task, cmdbuf, i_cdb); if (ret != kIOReturnSuccess) { fprintf(stderr, "SetCommandDescriptorBlock: %x\n", ret); return TR_UNKNOWN; } ret = (*p_env->scsi_task)->SetScatterGatherEntries(p_env->scsi_task, &buf, 1, i_buf, dir); if (ret != kIOReturnSuccess) { fprintf(stderr, "SetScatterGatherEntries: %x\n", ret); return TR_UNKNOWN; } ret = (*p_env->scsi_task)->ExecuteTaskSync(p_env->scsi_task, &p_env->sense, &p_env->status, &p_env->realized_len); if (ret != kIOReturnSuccess) { fprintf(stderr, "ExecuteTaskSync: %x\n", ret); return TR_UNKNOWN; } if (p_env->status != kSCSITaskStatus_GOOD) { int i; fprintf(stderr, "SCSI status: %x\n", p_env->status); fprintf(stderr, "Sense: %x %x %x\n", p_env->sense.SENSE_KEY, p_env->sense.ADDITIONAL_SENSE_CODE, p_env->sense.ADDITIONAL_SENSE_CODE_QUALIFIER); for (i = 0; i < i_cdb; i++) fprintf(stderr, "%02x ", cmdbuf[i]); fprintf(stderr, "\n"); memcpy((void *) p_env->gen.scsi_mmc_sense, &p_env->sense, kSenseDefaultSize); return TR_UNKNOWN; } if (p_env->sense.VALID_RESPONSE_CODE) { char key = p_env->sense.SENSE_KEY & 0xf; char ASC = p_env->sense.ADDITIONAL_SENSE_CODE; char ASCQ = p_env->sense.ADDITIONAL_SENSE_CODE_QUALIFIER; switch (key) { case 0: if (errno == 0) errno = EIO; return (TR_UNKNOWN); case 1: break; case 2: if (errno == 0) errno = EBUSY; return (TR_BUSY); case 3: if (ASC == 0x0C && ASCQ == 0x09) { /* loss of streaming */ if (errno == 0) errno = EIO; return (TR_STREAMING); } else { if (errno == 0) errno = EIO; return (TR_MEDIUM); } case 4: if (errno == 0) errno = EIO; return (TR_FAULT); case 5: if (errno == 0) errno = EINVAL; return (TR_ILLEGAL); default: if (errno == 0) errno = EIO; return (TR_UNKNOWN); } } errno = 0; return (0); } #endif #if 0 /** Run a SCSI MMC command. cdio CD structure set by cdio_open(). i_timeout time in milliseconds we will wait for the command to complete. If this value is -1, use the default time-out value. p_buf Buffer for data, both sending and receiving i_buf Size of buffer e_direction direction the transfer is to go. cdb CDB bytes. All values that are needed should be set on input. We'll figure out what the right CDB length should be. We return true if command completed successfully and false if not. */ static int run_mmc_cmd_osx( const void *p_user_data, unsigned int i_timeout_ms, unsigned int i_cdb, const mmc_cdb_t *p_cdb, cdio_mmc_direction_t e_direction, unsigned int i_buf, /*in/out*/ void *p_buf ) { #ifndef SCSI_MMC_FIXED return DRIVER_OP_UNSUPPORTED; #else const _img_private_t *p_env = p_user_data; SCSITaskDeviceInterface **sc; SCSITaskInterface **cmd = NULL; IOVirtualRange iov; SCSI_Sense_Data senseData; SCSITaskStatus status; UInt64 bytesTransferred; IOReturn ioReturnValue; int ret = 0; if (NULL == p_user_data) return 2; /* Make sure pp_scsiTaskDeviceInterface is initialized. FIXME: The code should probably be reorganized better for this. */ if (!p_env->gen.toc_init) read_toc_osx (p_user_data) ; sc = p_env->pp_scsiTaskDeviceInterface; if (NULL == sc) return 3; cmd = (*sc)->CreateSCSITask(sc); if (cmd == NULL) { cdio_warn("Failed to create SCSI task"); return -1; } iov.address = (IOVirtualAddress) p_buf; iov.length = i_buf; ioReturnValue = (*cmd)->SetCommandDescriptorBlock(cmd, (UInt8 *) p_cdb, i_cdb); if (ioReturnValue != kIOReturnSuccess) { cdio_warn("SetCommandDescriptorBlock failed with status %x", ioReturnValue); return -1; } ioReturnValue = (*cmd)->SetScatterGatherEntries(cmd, &iov, 1, i_buf, (SCSI_MMC_DATA_READ == e_direction ) ? kSCSIDataTransfer_FromTargetToInitiator : kSCSIDataTransfer_FromInitiatorToTarget); if (ioReturnValue != kIOReturnSuccess) { cdio_warn("SetScatterGatherEntries failed with status %x", ioReturnValue); return -1; } ioReturnValue = (*cmd)->SetTimeoutDuration(cmd, i_timeout_ms ); if (ioReturnValue != kIOReturnSuccess) { cdio_warn("SetTimeoutDuration failed with status %x", ioReturnValue); return -1; } memset(&senseData, 0, sizeof(senseData)); ioReturnValue = (*cmd)->ExecuteTaskSync(cmd,&senseData, &status, & bytesTransferred); if (ioReturnValue != kIOReturnSuccess) { cdio_warn("Command execution failed with status %x", ioReturnValue); return -1; } if (cmd != NULL) { (*cmd)->Release(cmd); } return (ret); #endif } #endif /* 0*/ /*************************************************************************** * GetDeviceIterator - Gets an io_iterator_t for our class type ***************************************************************************/ static io_iterator_t GetDeviceIterator ( const char * deviceClass ) { IOReturn err = kIOReturnSuccess; io_iterator_t iterator = MACH_PORT_NULL; err = IOServiceGetMatchingServices ( kIOMasterPortDefault, IOServiceMatching ( deviceClass ), &iterator ); check ( err == kIOReturnSuccess ); return iterator; } /*************************************************************************** * GetFeaturesFlagsForDrive -Gets the bitfield which represents the * features flags. ***************************************************************************/ static bool GetFeaturesFlagsForDrive ( CFDictionaryRef dict, uint32_t *i_cdFlags, uint32_t *i_dvdFlags ) { CFDictionaryRef propertiesDict = 0; CFNumberRef flagsNumberRef = 0; *i_cdFlags = 0; *i_dvdFlags= 0; propertiesDict = ( CFDictionaryRef ) CFDictionaryGetValue ( dict, CFSTR ( kIOPropertyDeviceCharacteristicsKey ) ); if ( propertiesDict == 0 ) return false; /* Get the CD features */ flagsNumberRef = ( CFNumberRef ) CFDictionaryGetValue ( propertiesDict, CFSTR ( kIOPropertySupportedCDFeatures ) ); if ( flagsNumberRef != 0 ) { CFNumberGetValue ( flagsNumberRef, kCFNumberLongType, i_cdFlags ); } /* Get the DVD features */ flagsNumberRef = ( CFNumberRef ) CFDictionaryGetValue ( propertiesDict, CFSTR ( kIOPropertySupportedDVDFeatures ) ); if ( flagsNumberRef != 0 ) { CFNumberGetValue ( flagsNumberRef, kCFNumberLongType, i_dvdFlags ); } return true; } /** Get disc type associated with the cd object. */ static discmode_t get_discmode_osx (void *p_user_data) { _img_private_t *p_env = p_user_data; char str[10]; int32_t i_discmode = CDIO_DISC_MODE_ERROR; CFDictionaryRef propertiesDict = 0; CFStringRef data; propertiesDict = GetRegistryEntryProperties ( p_env->MediaClass_service ); if ( propertiesDict == 0 ) return i_discmode; data = ( CFStringRef ) CFDictionaryGetValue ( propertiesDict, CFSTR ( kIODVDMediaTypeKey ) ); if( CFStringGetCString( data, str, sizeof(str), kCFStringEncodingASCII ) ) { if (0 == strncmp(str, "DVD+R", strlen(str)) ) i_discmode = CDIO_DISC_MODE_DVD_PR; else if (0 == strncmp(str, "DVD+RW", strlen(str)) ) i_discmode = CDIO_DISC_MODE_DVD_PRW; else if (0 == strncmp(str, "DVD-R", strlen(str)) ) i_discmode = CDIO_DISC_MODE_DVD_R; else if (0 == strncmp(str, "DVD-RW", strlen(str)) ) i_discmode = CDIO_DISC_MODE_DVD_RW; else if (0 == strncmp(str, "DVD-ROM", strlen(str)) ) i_discmode = CDIO_DISC_MODE_DVD_ROM; else if (0 == strncmp(str, "DVD-RAM", strlen(str)) ) i_discmode = CDIO_DISC_MODE_DVD_RAM; else if (0 == strncmp(str, "CD-ROM", strlen(str)) ) i_discmode = CDIO_DISC_MODE_CD_DATA; else if (0 == strncmp(str, "CDR", strlen(str)) ) i_discmode = CDIO_DISC_MODE_CD_DATA; else if (0 == strncmp(str, "CDRW", strlen(str)) ) i_discmode = CDIO_DISC_MODE_CD_DATA; //?? Handled by below? CFRelease( data ); } CFRelease( propertiesDict ); if (CDIO_DISC_MODE_CD_DATA == i_discmode) { /* Need to do more classification */ return get_discmode_cd_generic(p_user_data); } return i_discmode; } static io_service_t get_drive_service_osx(const _img_private_t *p_env) { io_service_t service; io_iterator_t service_iterator; service_iterator = GetDeviceIterator ( kIOCDBlockStorageDeviceClassString ); if( service_iterator == MACH_PORT_NULL ) return 0; service = IOIteratorNext( service_iterator ); if( service == 0 ) return 0; do { char psz_service[MAX_SERVICE_NAME]; IORegistryEntryGetPath(service, kIOServicePlane, psz_service); psz_service[MAX_SERVICE_NAME-1] = '\0'; /* FIXME: This is all hoaky. Here we need info from a parent class, psz_service of what we opened above. We are relying on the fact that the name will be a substring of the name we openned with. */ if (0 == strncmp(psz_service, p_env->psz_MediaClass_service, strlen(psz_service))) { /* Found our device */ IOObjectRelease( service_iterator ); return service; } IOObjectRelease( service ); } while( ( service = IOIteratorNext( service_iterator ) ) != 0 ); IOObjectRelease( service_iterator ); return service; } static void get_drive_cap_osx(const void *p_user_data, /*out*/ cdio_drive_read_cap_t *p_read_cap, /*out*/ cdio_drive_write_cap_t *p_write_cap, /*out*/ cdio_drive_misc_cap_t *p_misc_cap) { const _img_private_t *p_env = p_user_data; uint32_t i_cdFlags; uint32_t i_dvdFlags; io_service_t service = get_drive_service_osx(p_env); if( service == 0 ) goto err_exit; /* Found our device */ { CFDictionaryRef properties = GetRegistryEntryProperties ( service ); if (! GetFeaturesFlagsForDrive ( properties, &i_cdFlags, &i_dvdFlags ) ) { IOObjectRelease( service ); goto err_exit; } /* Reader */ if ( 0 != (i_cdFlags & kCDFeaturesAnalogAudioMask) ) *p_read_cap |= CDIO_DRIVE_CAP_READ_AUDIO; if ( 0 != (i_cdFlags & kCDFeaturesWriteOnceMask) ) *p_write_cap |= CDIO_DRIVE_CAP_WRITE_CD_R; if ( 0 != (i_cdFlags & kCDFeaturesCDDAStreamAccurateMask) ) *p_read_cap |= CDIO_DRIVE_CAP_READ_CD_DA; if ( 0 != (i_dvdFlags & kDVDFeaturesReadStructuresMask) ) *p_read_cap |= CDIO_DRIVE_CAP_READ_DVD_ROM; if ( 0 != (i_cdFlags & kCDFeaturesReWriteableMask) ) *p_write_cap |= CDIO_DRIVE_CAP_WRITE_CD_RW; if ( 0 != (i_dvdFlags & kDVDFeaturesWriteOnceMask) ) *p_write_cap |= CDIO_DRIVE_CAP_WRITE_DVD_R; if ( 0 != (i_dvdFlags & kDVDFeaturesRandomWriteableMask) ) *p_write_cap |= CDIO_DRIVE_CAP_WRITE_DVD_RAM; if ( 0 != (i_dvdFlags & kDVDFeaturesReWriteableMask) ) *p_write_cap |= CDIO_DRIVE_CAP_WRITE_DVD_RW; /*** if ( 0 != (i_dvdFlags & kDVDFeaturesPlusRMask) ) *p_write_cap |= CDIO_DRIVE_CAP_WRITE_DVD_PR; if ( 0 != (i_dvdFlags & kDVDFeaturesPlusRWMask ) *p_write_cap |= CDIO_DRIVE_CAP_WRITE_DVD_PRW; ***/ /* FIXME: fill out. For now assume CD-ROM is relatively modern. */ *p_misc_cap = ( CDIO_DRIVE_CAP_MISC_CLOSE_TRAY | CDIO_DRIVE_CAP_MISC_EJECT | CDIO_DRIVE_CAP_MISC_LOCK | CDIO_DRIVE_CAP_MISC_SELECT_SPEED | CDIO_DRIVE_CAP_MISC_MULTI_SESSION | CDIO_DRIVE_CAP_MISC_MEDIA_CHANGED | CDIO_DRIVE_CAP_MISC_RESET | CDIO_DRIVE_CAP_READ_MCN | CDIO_DRIVE_CAP_READ_ISRC ); IOObjectRelease( service ); } return; err_exit: *p_misc_cap = *p_write_cap = *p_read_cap = CDIO_DRIVE_CAP_UNKNOWN; return; } #if 1 /**************************************************************************** * GetDriveDescription - Gets drive description. ****************************************************************************/ static bool get_hwinfo_osx ( const CdIo_t *p_cdio, /*out*/ cdio_hwinfo_t *hw_info) { _img_private_t *p_env = (_img_private_t *) p_cdio->env; io_service_t service = get_drive_service_osx(p_env); if ( service == 0 ) return false; /* Found our device */ { CFStringRef vendor = NULL; CFStringRef product = NULL; CFStringRef revision = NULL; CFDictionaryRef properties = GetRegistryEntryProperties ( service ); CFDictionaryRef deviceDict = ( CFDictionaryRef ) CFDictionaryGetValue ( properties, CFSTR ( kIOPropertyDeviceCharacteristicsKey ) ); if ( deviceDict == 0 ) return false; vendor = ( CFStringRef ) CFDictionaryGetValue ( deviceDict, CFSTR ( kIOPropertyVendorNameKey ) ); if ( CFStringGetCString( vendor, (char *) &(hw_info->psz_vendor), sizeof(hw_info->psz_vendor), kCFStringEncodingASCII ) ) CFRelease( vendor ); product = ( CFStringRef ) CFDictionaryGetValue ( deviceDict, CFSTR ( kIOPropertyProductNameKey ) ); if ( CFStringGetCString( product, (char *) &(hw_info->psz_model), sizeof(hw_info->psz_model), kCFStringEncodingASCII ) ) CFRelease( product ); revision = ( CFStringRef ) CFDictionaryGetValue ( deviceDict, CFSTR ( kIOPropertyProductRevisionLevelKey ) ); if ( CFStringGetCString( revision, (char *) &(hw_info->psz_revision), sizeof(hw_info->psz_revision), kCFStringEncodingASCII ) ) CFRelease( revision ); } return true; } #endif /* Get cdtext information in p_user_data for track i_track. For disc information i_track is 0. Return the CD-TEXT or NULL if obj is NULL, CD-TEXT information does not exist, or (as is the case here) we don't know how to get this implemented. */ static cdtext_t * get_cdtext_osx (void *p_user_data, track_t i_track) { return NULL; } static void _free_osx (void *p_user_data) { _img_private_t *p_env = p_user_data; if (NULL == p_env) return; if (p_env->gen.fd != -1) close(p_env->gen.fd); if (p_env->MediaClass_service) IOObjectRelease( p_env->MediaClass_service ); cdio_generic_free(p_env); if (NULL != p_env->pp_lba) free((void *) p_env->pp_lba); if (NULL != p_env->pTOC) free((void *) p_env->pTOC); if (p_env->scsi_task) (*p_env->scsi_task)->Release(p_env->scsi_task); if (p_env->pp_scsiTaskDeviceInterface) (*p_env->pp_scsiTaskDeviceInterface) -> ReleaseExclusiveAccess(p_env->pp_scsiTaskDeviceInterface); if (p_env->pp_scsiTaskDeviceInterface) (*p_env->pp_scsiTaskDeviceInterface) -> Release ( p_env->pp_scsiTaskDeviceInterface ); if (p_env->mmc) (*p_env->mmc)->Release(p_env->mmc); if (p_env->plugin) IODestroyPlugInInterface(p_env->plugin); } /** Reads i_blocks of data sectors from cd device into p_data starting from i_lsn. Returns DRIVER_OP_SUCCESS if no error. */ static driver_return_code_t read_data_sectors_osx (void *p_user_data, void *p_data, lsn_t i_lsn, uint16_t i_blocksize, uint32_t i_blocks) { _img_private_t *p_env = p_user_data; if (!p_user_data) return DRIVER_OP_UNINIT; { dk_cd_read_t cd_read; track_t i_track = cdio_get_track(p_env->gen.cdio, i_lsn); memset( &cd_read, 0, sizeof(cd_read) ); cd_read.sectorArea = kCDSectorAreaUser; cd_read.buffer = p_data; /* FIXME: Do I have to put use get_track_green_osx? */ switch(get_track_format_osx(p_user_data, i_track)) { case TRACK_FORMAT_CDI: case TRACK_FORMAT_DATA: cd_read.sectorType = kCDSectorTypeMode1; cd_read.offset = i_lsn * kCDSectorSizeMode1; break; case TRACK_FORMAT_XA: cd_read.sectorType = kCDSectorTypeMode2; cd_read.offset = i_lsn * kCDSectorSizeMode2; break; default: return DRIVER_OP_ERROR; } cd_read.bufferLength = i_blocksize * i_blocks; if( ioctl( p_env->gen.fd, DKIOCCDREAD, &cd_read ) == -1 ) { cdio_info( "could not read block %d, %s", i_lsn, strerror(errno) ); return DRIVER_OP_ERROR; } return DRIVER_OP_SUCCESS; } } /** Reads i_blocks of mode2 form2 sectors from cd device into data starting from i_lsn. Returns 0 if no error. */ static driver_return_code_t read_mode1_sectors_osx (void *p_user_data, void *p_data, lsn_t i_lsn, bool b_form2, uint32_t i_blocks) { _img_private_t *p_env = p_user_data; dk_cd_read_t cd_read; memset( &cd_read, 0, sizeof(cd_read) ); cd_read.sectorArea = kCDSectorAreaUser; cd_read.buffer = p_data; cd_read.sectorType = kCDSectorTypeMode1; if (b_form2) { cd_read.offset = i_lsn * kCDSectorSizeMode2; cd_read.bufferLength = kCDSectorSizeMode2 * i_blocks; } else { cd_read.offset = i_lsn * kCDSectorSizeMode1; cd_read.bufferLength = kCDSectorSizeMode1 * i_blocks; } if( ioctl( p_env->gen.fd, DKIOCCDREAD, &cd_read ) == -1 ) { cdio_info( "could not read block %d, %s", i_lsn, strerror(errno) ); return DRIVER_OP_ERROR; } return DRIVER_OP_SUCCESS; } /** Reads i_blocks of mode2 form2 sectors from cd device into data starting from lsn. Returns DRIVER_OP_SUCCESS if no error. */ static driver_return_code_t read_mode2_sectors_osx (void *p_user_data, void *p_data, lsn_t i_lsn, bool b_form2, uint32_t i_blocks) { _img_private_t *p_env = p_user_data; dk_cd_read_t cd_read; memset( &cd_read, 0, sizeof(cd_read) ); cd_read.sectorArea = kCDSectorAreaUser; cd_read.buffer = p_data; if (b_form2) { cd_read.offset = i_lsn * kCDSectorSizeMode2Form2; cd_read.sectorType = kCDSectorTypeMode2Form2; cd_read.bufferLength = kCDSectorSizeMode2Form2 * i_blocks; } else { cd_read.offset = i_lsn * kCDSectorSizeMode2Form1; cd_read.sectorType = kCDSectorTypeMode2Form1; cd_read.bufferLength = kCDSectorSizeMode2Form1 * i_blocks; } if( ioctl( p_env->gen.fd, DKIOCCDREAD, &cd_read ) == -1 ) { cdio_info( "could not read block %d, %s", i_lsn, strerror(errno) ); return DRIVER_OP_ERROR; } return DRIVER_OP_SUCCESS; } /** Reads a single audio sector from CD device into p_data starting from lsn. Returns 0 if no error. */ static int read_audio_sectors_osx (void *user_data, void *p_data, lsn_t lsn, unsigned int i_blocks) { _img_private_t *env = user_data; dk_cd_read_t cd_read; memset( &cd_read, 0, sizeof(cd_read) ); cd_read.offset = lsn * kCDSectorSizeCDDA; cd_read.sectorArea = kCDSectorAreaUser; cd_read.sectorType = kCDSectorTypeCDDA; cd_read.buffer = p_data; cd_read.bufferLength = kCDSectorSizeCDDA * i_blocks; if( ioctl( env->gen.fd, DKIOCCDREAD, &cd_read ) == -1 ) { cdio_info( "could not read block %d\n%s", lsn, strerror(errno)); return DRIVER_OP_ERROR; } return DRIVER_OP_SUCCESS; } /** Reads a single mode2 sector from cd device into p_data starting from lsn. Returns 0 if no error. */ static driver_return_code_t read_mode1_sector_osx (void *p_user_data, void *p_data, lsn_t i_lsn, bool b_form2) { return read_mode1_sectors_osx(p_user_data, p_data, i_lsn, b_form2, 1); } /** Reads a single mode2 sector from cd device into p_data starting from lsn. Returns 0 if no error. */ static driver_return_code_t read_mode2_sector_osx (void *p_user_data, void *p_data, lsn_t i_lsn, bool b_form2) { return read_mode2_sectors_osx(p_user_data, p_data, i_lsn, b_form2, 1); } /** Set the key "arg" to "value" in source device. */ static driver_return_code_t _set_arg_osx (void *p_user_data, const char key[], const char value[]) { _img_private_t *p_env = p_user_data; if (!strcmp (key, "source")) { if (!value) return DRIVER_OP_ERROR; free (p_env->gen.source_name); p_env->gen.source_name = strdup (value); } else if (!strcmp (key, "access-mode")) { if (!strcmp(value, "OSX")) p_env->access_mode = _AM_OSX; else cdio_warn ("unknown access type: %s. ignored.", value); } else return DRIVER_OP_ERROR; return DRIVER_OP_SUCCESS; } #if 0 static void TestDevice(_img_private_t *p_env, io_service_t service) { SInt32 score; HRESULT herr; kern_return_t err; IOCFPlugInInterface **plugInInterface = NULL; MMCDeviceInterface **mmcInterface = NULL; /* Create the IOCFPlugIn interface so we can query it. */ err = IOCreatePlugInInterfaceForService ( service, kIOMMCDeviceUserClientTypeID, kIOCFPlugInInterfaceID, &plugInInterface, &score ); if ( err != noErr ) { printf("IOCreatePlugInInterfaceForService returned %d\n", err); return; } /* Query the interface for the MMCDeviceInterface. */ herr = ( *plugInInterface )->QueryInterface ( plugInInterface, CFUUIDGetUUIDBytes ( kIOMMCDeviceInterfaceID ), ( LPVOID ) &mmcInterface ); if ( herr != S_OK ) { printf("QueryInterface returned %ld\n", herr); return; } p_env->pp_scsiTaskDeviceInterface = ( *mmcInterface )->GetSCSITaskDeviceInterface ( mmcInterface ); if ( NULL == p_env->pp_scsiTaskDeviceInterface ) { printf("GetSCSITaskDeviceInterface returned NULL\n"); return; } ( *mmcInterface )->Release ( mmcInterface ); IODestroyPlugInInterface ( plugInInterface ); } #endif /** Read and cache the CD's Track Table of Contents and track info. Return false if successful or true if an error. */ static bool read_toc_osx (void *p_user_data) { _img_private_t *p_env = p_user_data; CFDictionaryRef propertiesDict = 0; CFDataRef data; /* create a CF dictionary containing the TOC */ propertiesDict = GetRegistryEntryProperties( p_env->MediaClass_service ); if ( 0 == propertiesDict ) { return false; } /* get the TOC from the dictionary */ data = (CFDataRef) CFDictionaryGetValue( propertiesDict, CFSTR(kIOCDMediaTOCKey) ); if ( data != NULL ) { CFRange range; CFIndex buf_len; buf_len = CFDataGetLength( data ) + 1; range = CFRangeMake( 0, buf_len ); if( ( p_env->pTOC = (CDTOC *)malloc( buf_len ) ) != NULL ) { CFDataGetBytes( data, range, (u_char *) p_env->pTOC ); } else { cdio_warn( "Trouble allocating CDROM TOC" ); CFRelease( propertiesDict ); return false; } } else { cdio_warn( "Trouble reading TOC" ); CFRelease( propertiesDict ); return false; } /* TestDevice(p_env, service); */ CFRelease( propertiesDict ); p_env->i_descriptors = CDTOCGetDescriptorCount ( p_env->pTOC ); /* Read in starting sectors. There may be non-tracks mixed in with the real tracks. So find the first and last track number by scanning. Also find the lead-out track position. */ { int i, i_leadout = -1; CDTOCDescriptor *pTrackDescriptors; p_env->pp_lba = malloc( p_env->i_descriptors * sizeof(int) ); if( p_env->pp_lba == NULL ) { cdio_warn("Out of memory in allocating track starting LSNs" ); free( p_env->pTOC ); return false; } pTrackDescriptors = p_env->pTOC->descriptors; p_env->gen.i_first_track = CDIO_CD_MAX_TRACKS+1; p_env->i_last_track = CDIO_CD_MIN_TRACK_NO; p_env->i_first_session = CDIO_CD_MAX_TRACKS+1; p_env->i_last_session = CDIO_CD_MIN_TRACK_NO; for( i = 0; i < p_env->i_descriptors; i++ ) { track_t i_track = pTrackDescriptors[i].point; session_t i_session = pTrackDescriptors[i].session; cdio_debug( "point: %d, tno: %d, session: %d, adr: %d, control:%d, " "address: %d:%d:%d, p: %d:%d:%d", i_track, pTrackDescriptors[i].tno, i_session, pTrackDescriptors[i].adr, pTrackDescriptors[i].control, pTrackDescriptors[i].address.minute, pTrackDescriptors[i].address.second, pTrackDescriptors[i].address.frame, pTrackDescriptors[i].p.minute, pTrackDescriptors[i].p.second, pTrackDescriptors[i].p.frame ); /* track information has adr = 1 */ if ( 0x01 != pTrackDescriptors[i].adr ) continue; if( i_track == OSX_CDROM_LEADOUT_TRACK ) i_leadout = i; if( i_track > CDIO_CD_MAX_TRACKS || i_track < CDIO_CD_MIN_TRACK_NO ) continue; if (p_env->gen.i_first_track > i_track) p_env->gen.i_first_track = i_track; if (p_env->i_last_track < i_track) p_env->i_last_track = i_track; if (p_env->i_first_session > i_session) p_env->i_first_session = i_session; if (p_env->i_last_session < i_session) p_env->i_last_session = i_session; } /* Now that we know what the first track number is, we can make sure index positions are ordered starting at 0. */ for( i = 0; i < p_env->i_descriptors; i++ ) { track_t i_track = pTrackDescriptors[i].point; if( i_track > CDIO_CD_MAX_TRACKS || i_track < CDIO_CD_MIN_TRACK_NO ) continue; /* Note what OSX calls a LBA we call an LSN. So below re we really have have MSF -> LSN -> LBA. */ p_env->pp_lba[i_track - p_env->gen.i_first_track] = cdio_lsn_to_lba(CDConvertMSFToLBA( pTrackDescriptors[i].p )); set_track_flags(&(p_env->gen.track_flags[i_track]), pTrackDescriptors[i].control); } if( i_leadout == -1 ) { cdio_warn( "CD leadout not found" ); free( p_env->pp_lba ); free( (void *) p_env->pTOC ); return false; } /* Set leadout sector. Note what OSX calls a LBA we call an LSN. So below re we really have have MSF -> LSN -> LBA. */ p_env->pp_lba[TOTAL_TRACKS] = cdio_lsn_to_lba(CDConvertMSFToLBA( pTrackDescriptors[i_leadout].p )); p_env->gen.i_tracks = TOTAL_TRACKS; } p_env->gen.toc_init = true; return( true ); } /** Return the starting LSN track number i_track in obj. Track numbers start at 1. The "leadout" track is specified either by using i_track LEADOUT_TRACK or the total tracks+1. False is returned if there is no track entry. */ static lsn_t get_track_lba_osx(void *p_user_data, track_t i_track) { _img_private_t *p_env = p_user_data; if (!p_env->gen.toc_init) read_toc_osx (p_env) ; if (!p_env->gen.toc_init) return CDIO_INVALID_LSN; if (i_track == CDIO_CDROM_LEADOUT_TRACK) i_track = p_env->i_last_track+1; if (i_track > p_env->i_last_track + 1 || i_track < p_env->gen.i_first_track) { return CDIO_INVALID_LSN; } else { return p_env->pp_lba[i_track - p_env->gen.i_first_track]; } } /** Eject media . Return DRIVER_OP_SUCCESS if successful. The only way to cleanly unmount the disc under MacOS X (before Tiger) is to use the 'disktool' command line utility. It uses the non-public DiskArbitration API, which can not be used by Cocoa or Carbon applications. Since Tiger (MacOS X 10.4), DiskArbitration is a public framework and we can use it as needed. */ #ifndef HAVE_DISKARBITRATION static driver_return_code_t _eject_media_osx (void *user_data) { _img_private_t *p_env = user_data; FILE *p_file; char *psz_drive; char sz_cmd[32]; if( ( psz_drive = (char *)strstr( p_env->gen.source_name, "disk" ) ) != NULL && strlen( psz_drive ) > 4 ) { #define EJECT_CMD "/usr/sbin/hdiutil eject %s" snprintf( sz_cmd, sizeof(sz_cmd), EJECT_CMD, psz_drive ); #undef EJECT_CMD if( ( p_file = popen( sz_cmd, "r" ) ) != NULL ) { char psz_result[0x200]; int i_ret = fread( psz_result, 1, sizeof(psz_result) - 1, p_file ); if( i_ret == 0 && ferror( p_file ) != 0 ) { pclose( p_file ); return DRIVER_OP_ERROR; } pclose( p_file ); psz_result[ i_ret ] = 0; if( strstr( psz_result, "Disk Ejected" ) != NULL ) { return DRIVER_OP_SUCCESS; } } } return DRIVER_OP_ERROR; } #else /* HAVE_DISKARBITRATION */ typedef struct dacontext_s { int result; Boolean completed; DASessionRef session; CFRunLoopRef runloop; CFRunLoopSourceRef cancel; } dacontext_t; static void cancel_runloop(void *info) { /* do nothing */ } static CFRunLoopSourceContext cancelRunLoopSourceContext = { .perform = cancel_runloop }; static void media_eject_callback(DADiskRef disk, DADissenterRef dissenter, void *context) { dacontext_t *dacontext = (dacontext_t *)context; if ( dissenter ) { CFStringRef status = DADissenterGetStatusString(dissenter); if (status) { size_t cstr_size = CFStringGetLength(status); char *cstr = malloc(cstr_size); if ( CFStringGetCString( status, cstr, cstr_size, kCFStringEncodingASCII ) ) CFRelease( status ); cdio_warn("%s", cstr); free(cstr); } } dacontext->result = (dissenter ? DRIVER_OP_ERROR : DRIVER_OP_SUCCESS); dacontext->completed = TRUE; CFRunLoopSourceSignal(dacontext->cancel); CFRunLoopWakeUp(dacontext->runloop); } static void media_unmount_callback(DADiskRef disk, DADissenterRef dissenter, void *context) { dacontext_t *dacontext = (dacontext_t *)context; if (!dissenter) { DADiskEject(disk, kDADiskEjectOptionDefault, media_eject_callback, context); dacontext->result = dacontext->result == DRIVER_OP_UNINIT ? DRIVER_OP_SUCCESS : dacontext->result; } else { dacontext->result = DRIVER_OP_ERROR; dacontext->completed = TRUE; CFRunLoopSourceSignal(dacontext->cancel); CFRunLoopWakeUp(dacontext->runloop); } } static driver_return_code_t _eject_media_osx (void *user_data) { _img_private_t *p_env = user_data; char *psz_drive; DADiskRef disk; dacontext_t dacontext; CFDictionaryRef description; if( ( psz_drive = (char *)strstr( p_env->gen.source_name, "disk" ) ) == NULL || strlen( psz_drive ) <= 4 ) { return DRIVER_OP_ERROR; } if (p_env->gen.fd != -1) close(p_env->gen.fd); p_env->gen.fd = -1; dacontext.result = DRIVER_OP_UNINIT; dacontext.completed = FALSE; dacontext.runloop = CFRunLoopGetCurrent(); dacontext.cancel = CFRunLoopSourceCreate(kCFAllocatorDefault, 0, &cancelRunLoopSourceContext); if (!dacontext.cancel) { return DRIVER_OP_ERROR; } if (!(dacontext.session = DASessionCreate(kCFAllocatorDefault))) { CFRelease(dacontext.cancel); return DRIVER_OP_ERROR; } if ((disk = DADiskCreateFromBSDName(kCFAllocatorDefault, dacontext.session, psz_drive)) != NULL) { if ((description = DADiskCopyDescription(disk)) != NULL) { /* Does the device need to be unmounted first? */ DASessionScheduleWithRunLoop(dacontext.session, dacontext.runloop, kCFRunLoopDefaultMode); CFRunLoopAddSource(dacontext.runloop, dacontext.cancel, kCFRunLoopDefaultMode); if (CFDictionaryGetValueIfPresent(description, kDADiskDescriptionVolumePathKey, NULL)) { DADiskUnmount(disk, kDADiskUnmountOptionDefault, media_unmount_callback, &dacontext); } else { DADiskEject(disk, kDADiskEjectOptionDefault, media_eject_callback, &dacontext); dacontext.result = dacontext.result == DRIVER_OP_UNINIT ? DRIVER_OP_SUCCESS : dacontext.result; } if (!dacontext.completed) { CFRunLoopRunInMode(kCFRunLoopDefaultMode, 30.0, TRUE); /* timeout after 30 seconds */ } CFRunLoopRemoveSource(dacontext.runloop, dacontext.cancel, kCFRunLoopDefaultMode); DASessionUnscheduleFromRunLoop(dacontext.session, dacontext.runloop, kCFRunLoopDefaultMode); CFRelease(description); } CFRelease(disk); } CFRunLoopSourceInvalidate(dacontext.cancel); CFRelease(dacontext.cancel); CFRelease(dacontext.session); return dacontext.result; } #endif /** Return the size of the CD in logical block address (LBA) units. */ static lsn_t get_disc_last_lsn_osx (void *user_data) { return get_track_lba_osx(user_data, CDIO_CDROM_LEADOUT_TRACK); } /** Return the value associated with the key "arg". */ static const char * _get_arg_osx (void *user_data, const char key[]) { _img_private_t *p_env = user_data; if (!strcmp (key, "source")) { return p_env->gen.source_name; } else if (!strcmp (key, "access-mode")) { switch (p_env->access_mode) { case _AM_OSX: return "OS X"; case _AM_NONE: return "no access method"; } } return NULL; } /** Return the media catalog number MCN. */ static char * get_mcn_osx (const void *user_data) { const _img_private_t *p_env = user_data; dk_cd_read_mcn_t cd_read; memset( &cd_read, 0, sizeof(cd_read) ); if( ioctl( p_env->gen.fd, DKIOCCDREADMCN, &cd_read ) < 0 ) { cdio_debug( "could not read MCN, %s", strerror(errno) ); return NULL; } return strdup((char*)cd_read.mcn); } /** Get format of track. */ static track_format_t get_track_format_osx(void *p_user_data, track_t i_track) { _img_private_t *p_env = p_user_data; dk_cd_read_track_info_t cd_read; CDTrackInfo a_track; if (!p_env->gen.toc_init) read_toc_osx (p_env) ; if (i_track > p_env->i_last_track || i_track < p_env->gen.i_first_track) return TRACK_FORMAT_ERROR; memset( &cd_read, 0, sizeof(cd_read) ); cd_read.address = i_track; cd_read.addressType = kCDTrackInfoAddressTypeTrackNumber; cd_read.buffer = &a_track; cd_read.bufferLength = sizeof(CDTrackInfo); if( ioctl( p_env->gen.fd, DKIOCCDREADTRACKINFO, &cd_read ) == -1 ) { cdio_warn( "could not read trackinfo for track %d:\n%s", i_track, strerror(errno)); return TRACK_FORMAT_ERROR; } cdio_debug( "%d: trackinfo trackMode: %x dataMode: %x", i_track, a_track.trackMode, a_track.dataMode ); if (a_track.trackMode == CDIO_CDROM_DATA_TRACK) { if (a_track.dataMode == CDROM_CDI_TRACK) { return TRACK_FORMAT_CDI; } else if (a_track.dataMode == CDROM_XA_TRACK) { return TRACK_FORMAT_XA; } else { return TRACK_FORMAT_DATA; } } else { return TRACK_FORMAT_AUDIO; } } /** Return true if we have XA data (green, mode2 form1) or XA data (green, mode2 form2). That is track begins: sync - header - subheader 12 4 - 8 FIXME: there's gotta be a better design for this and get_track_format? */ static bool get_track_green_osx(void *p_user_data, track_t i_track) { _img_private_t *p_env = p_user_data; CDTrackInfo a_track; if (!p_env->gen.toc_init) read_toc_osx (p_env) ; if ( i_track > p_env->i_last_track || i_track < p_env->gen.i_first_track ) return false; else { dk_cd_read_track_info_t cd_read; memset( &cd_read, 0, sizeof(cd_read) ); cd_read.address = i_track; cd_read.addressType = kCDTrackInfoAddressTypeTrackNumber; cd_read.buffer = &a_track; cd_read.bufferLength = sizeof(CDTrackInfo); if( ioctl( p_env->gen.fd, DKIOCCDREADTRACKINFO, &cd_read ) == -1 ) { cdio_warn( "could not read trackinfo for track %d:\n%s", i_track, strerror(errno)); return false; } return ((a_track.trackMode & CDIO_CDROM_DATA_TRACK) != 0); } } /* Set CD-ROM drive speed */ static int set_speed_osx (void *p_user_data, int i_speed) { const _img_private_t *p_env = p_user_data; if (!p_env) return -1; return ioctl(p_env->gen.fd, DKIOCCDSETSPEED, i_speed); } #endif /* HAVE_DARWIN_CDROM */ /** Close tray on CD-ROM. @param psz_drive the CD-ROM drive to be closed. */ /* FIXME: We don't use the device name because we don't how to. */ #define CLOSE_TRAY_CMD "/usr/sbin/drutil tray close" driver_return_code_t close_tray_osx (const char *psz_drive) { #ifdef HAVE_DARWIN_CDROM FILE *p_file; char sz_cmd[80]; if ( !psz_drive) return DRIVER_OP_UNINIT; /* Right now we really aren't making use of snprintf, but possibly someday we will. */ snprintf( sz_cmd, sizeof(sz_cmd), CLOSE_TRAY_CMD ); if( ( p_file = popen( sz_cmd, "r" ) ) != NULL ) { char psz_result[0x200]; int i_ret = fread( psz_result, 1, sizeof(psz_result) - 1, p_file ); if( i_ret == 0 && ferror( p_file ) != 0 ) { pclose( p_file ); return DRIVER_OP_ERROR; } pclose( p_file ); psz_result[ i_ret ] = 0; if( 0 == i_ret ) { return DRIVER_OP_SUCCESS; } } return DRIVER_OP_ERROR; #else return DRIVER_OP_NO_DRIVER; #endif /*HAVE_DARWIN_CDROM*/ } /** Return a string containing the default CD device if none is specified. */ char ** cdio_get_devices_osx(void) { #ifndef HAVE_DARWIN_CDROM return NULL; #else io_object_t next_media; mach_port_t master_port; kern_return_t kern_result; io_iterator_t media_iterator; CFMutableDictionaryRef classes_to_match; char **drives = NULL; unsigned int num_drives=0; kern_result = IOMasterPort( MACH_PORT_NULL, &master_port ); if( kern_result != KERN_SUCCESS ) { return( NULL ); } classes_to_match = IOServiceMatching( kIOMediaClass ); if( classes_to_match == NULL ) { return( NULL ); } CFDictionarySetValue( classes_to_match, CFSTR(kIOMediaEjectableKey), kCFBooleanTrue ); kern_result = IOServiceGetMatchingServices( master_port, classes_to_match, &media_iterator ); if( kern_result != KERN_SUCCESS ) { return( NULL ); } next_media = IOIteratorNext( media_iterator ); if( next_media != 0 ) { char psz_buf[0x32]; size_t dev_path_length; CFTypeRef str_bsd_path; do { str_bsd_path = IORegistryEntryCreateCFProperty( next_media, CFSTR( kIOBSDNameKey ), kCFAllocatorDefault, 0 ); if( str_bsd_path == NULL ) { IOObjectRelease( next_media ); continue; } /* Below, by appending 'r' to the BSD node name, we indicate a raw disk. Raw disks receive I/O requests directly and don't go through a buffer cache. */ snprintf( psz_buf, sizeof(psz_buf), "%s%c", _PATH_DEV, 'r' ); dev_path_length = strlen( psz_buf ); if( CFStringGetCString( str_bsd_path, (char*)&psz_buf + dev_path_length, sizeof(psz_buf) - dev_path_length, kCFStringEncodingASCII ) ) { cdio_add_device_list(&drives, strdup(psz_buf), &num_drives); } CFRelease( str_bsd_path ); IOObjectRelease( next_media ); } while( ( next_media = IOIteratorNext( media_iterator ) ) != 0 ); } IOObjectRelease( media_iterator ); cdio_add_device_list(&drives, NULL, &num_drives); return drives; #endif /* HAVE_DARWIN_CDROM */ } /** Return a string containing the default CD device if none is specified. */ char * cdio_get_default_device_osx(void) { #ifndef HAVE_DARWIN_CDROM return NULL; #else io_object_t next_media; kern_return_t kern_result; io_iterator_t media_iterator; CFMutableDictionaryRef classes_to_match; classes_to_match = IOServiceMatching( kIOMediaClass ); if( classes_to_match == NULL ) { return( NULL ); } CFDictionarySetValue( classes_to_match, CFSTR(kIOMediaEjectableKey), kCFBooleanTrue ); kern_result = IOServiceGetMatchingServices( kIOMasterPortDefault, classes_to_match, &media_iterator ); if( kern_result != KERN_SUCCESS ) { return( NULL ); } next_media = IOIteratorNext( media_iterator ); if( next_media != 0 ) { char psz_buf[0x32]; size_t dev_path_length; CFTypeRef str_bsd_path; do { str_bsd_path = IORegistryEntryCreateCFProperty( next_media, CFSTR( kIOBSDNameKey ), kCFAllocatorDefault, 0 ); if( str_bsd_path == NULL ) { IOObjectRelease( next_media ); continue; } snprintf( psz_buf, sizeof(psz_buf), "%s%c", _PATH_DEV, 'r' ); dev_path_length = strlen( psz_buf ); if( CFStringGetCString( str_bsd_path, (char*)&psz_buf + dev_path_length, sizeof(psz_buf) - dev_path_length, kCFStringEncodingASCII ) ) { CFRelease( str_bsd_path ); IOObjectRelease( next_media ); IOObjectRelease( media_iterator ); return strdup( psz_buf ); } CFRelease( str_bsd_path ); IOObjectRelease( next_media ); } while( ( next_media = IOIteratorNext( media_iterator ) ) != 0 ); } IOObjectRelease( media_iterator ); return NULL; #endif /* HAVE_DARWIN_CDROM */ } /** Initialization routine. This is the only thing that doesn't get called via a function pointer. In fact *we* are the ones to set that up. */ CdIo_t * cdio_open_am_osx (const char *psz_source_name, const char *psz_access_mode) { if (psz_access_mode != NULL) cdio_warn ("there is only one access mode for OS X. Arg %s ignored", psz_access_mode); return cdio_open_osx(psz_source_name); } /** Initialization routine. This is the only thing that doesn't get called via a function pointer. In fact *we* are the ones to set that up. */ CdIo_t * cdio_open_osx (const char *psz_orig_source) { #ifdef HAVE_DARWIN_CDROM CdIo_t *ret; _img_private_t *_data; char *psz_source; cdio_funcs_t _funcs = { .eject_media = _eject_media_osx, .free = _free_osx, .get_arg = _get_arg_osx, .get_cdtext = get_cdtext_osx, .get_default_device = cdio_get_default_device_osx, .get_devices = cdio_get_devices_osx, .get_disc_last_lsn = get_disc_last_lsn_osx, .get_discmode = get_discmode_osx, .get_drive_cap = get_drive_cap_osx, .get_first_track_num = get_first_track_num_generic, .get_hwinfo = get_hwinfo_osx, .get_mcn = get_mcn_osx, .get_num_tracks = get_num_tracks_generic, .get_track_channels = get_track_channels_generic, .get_track_copy_permit = get_track_copy_permit_generic, .get_track_format = get_track_format_osx, .get_track_green = get_track_green_osx, .get_track_lba = get_track_lba_osx, .get_track_msf = NULL, .get_track_preemphasis = get_track_preemphasis_generic, .lseek = cdio_generic_lseek, .read = cdio_generic_read, .read_audio_sectors = read_audio_sectors_osx, .read_data_sectors = read_data_sectors_osx, .read_mode1_sector = read_mode1_sector_osx, .read_mode1_sectors = read_mode1_sectors_osx, .read_mode2_sector = read_mode2_sector_osx, .read_mode2_sectors = read_mode2_sectors_osx, .read_toc = read_toc_osx, .run_mmc_cmd = run_mmc_cmd_osx, .set_arg = _set_arg_osx, .set_speed = set_speed_osx, }; _data = calloc (1, sizeof (_img_private_t)); _data->access_mode = _AM_OSX; _data->MediaClass_service = 0; _data->gen.init = false; _data->gen.fd = -1; _data->gen.toc_init = false; _data->gen.b_cdtext_init = false; _data->gen.b_cdtext_error = false; if (NULL == psz_orig_source) { psz_source=cdio_get_default_device_osx(); if (NULL == psz_source) { cdio_generic_free(_data); return NULL; } _set_arg_osx(_data, "source", psz_source); free(psz_source); } else { if (cdio_is_device_generic(psz_orig_source)) _set_arg_osx(_data, "source", psz_orig_source); else { /* The below would be okay if all device drivers worked this way. */ #if 0 cdio_info ("source %s is a not a device", psz_orig_source); #endif cdio_generic_free(_data); return NULL; } } ret = cdio_new ((void *)_data, &_funcs); if (ret == NULL) { cdio_generic_free(_data); return NULL; } ret->driver_id = DRIVER_OSX; if (cdio_generic_init(_data, O_RDONLY | O_NONBLOCK) && init_osx(_data)) return ret; else { cdio_generic_free (_data); return NULL; } #else return NULL; #endif /* HAVE_DARWIN_CDROM */ } bool cdio_have_osx (void) { #ifdef HAVE_DARWIN_CDROM return true; #else return false; #endif /* HAVE_DARWIN_CDROM */ } libcdio-0.83/lib/driver/FreeBSD/0000755000175000017500000000000011652210414013321 500000000000000libcdio-0.83/lib/driver/FreeBSD/freebsd.c0000644000175000017500000010214711650122466015033 00000000000000/* Copyright (C) 2003, 2004, 2005, 2008, 2009, 2010, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* This file contains FreeBSD-specific code and implements low-level control of the CD drive. Culled initially I think from xine's or mplayer's FreeBSD code with lots of modifications. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include "freebsd.h" #ifdef HAVE_FREEBSD_CDROM #ifdef HAVE_SYS_PARAM_H #include #endif #include /* For freebsd_dev_lock() */ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef _HAVE_SYS_STAT_H # include #endif #ifdef HAVE_FCNTL_H # include #endif #include static lba_t get_track_lba_freebsd(void *p_user_data, track_t i_track); static access_mode_t str_to_access_mode_freebsd(const char *psz_access_mode) { const access_mode_t default_access_mode = DEFAULT_FREEBSD_AM; if (NULL==psz_access_mode) return default_access_mode; if (!strcmp(psz_access_mode, "ioctl")) return _AM_IOCTL; else if (!strcmp(psz_access_mode, "CAM")) return _AM_CAM; else if (!strcmp(psz_access_mode, "MMC_RDWR")) return _AM_MMC_RDWR; else if (!strcmp(psz_access_mode, "MMC_RDWR_EXCL")) return _AM_MMC_RDWR_EXCL; else { cdio_warn ("unknown access type: %s. Default used.", psz_access_mode); return default_access_mode; } } static void free_freebsd (void *p_obj) { _img_private_t *p_env = p_obj; if (NULL == p_env) return; if (NULL != p_env->device) free(p_env->device); switch (p_env->access_mode) { case _AM_CAM: case _AM_MMC_RDWR: case _AM_MMC_RDWR_EXCL: free_freebsd_cam(p_env); break; case _AM_IOCTL: cdio_generic_free(p_obj); break; case _AM_NONE: break; } } /* Check a drive to see if it is a CD-ROM Return 1 if a CD-ROM. 0 if it exists but isn't a CD-ROM drive and -1 if no device exists . */ static bool cdio_is_cdrom(char *drive, char *mnttype) { return cdio_is_cdrom_freebsd_ioctl(drive, mnttype); } /*! Reads i_blocks of audio sectors from cd device into data starting from lsn. Returns 0 if no error. */ static driver_return_code_t read_audio_sectors_freebsd (void *p_user_data, void *p_buf, lsn_t i_lsn, unsigned int i_blocks) { _img_private_t *p_env = p_user_data; switch (p_env->access_mode) { case _AM_CAM: case _AM_MMC_RDWR: case _AM_MMC_RDWR_EXCL: return mmc_read_sectors( p_env->gen.cdio, p_buf, i_lsn, CDIO_MMC_READ_TYPE_CDDA, i_blocks); case _AM_IOCTL: return read_audio_sectors_freebsd_ioctl(p_user_data, p_buf, i_lsn, i_blocks); case _AM_NONE: cdio_info ("access mode not set"); return DRIVER_OP_ERROR; } return DRIVER_OP_ERROR; } /*! Reads a single mode2 sector from cd device into data starting from i_lsn. Returns 0 if no error. */ static driver_return_code_t read_mode2_sector_freebsd (void *p_user_data, void *data, lsn_t i_lsn, bool b_form2) { _img_private_t *p_env = p_user_data; switch (p_env->access_mode) { case _AM_CAM: case _AM_MMC_RDWR: case _AM_MMC_RDWR_EXCL: return read_mode2_sector_freebsd_cam(p_env, data, i_lsn, b_form2); case _AM_IOCTL: return read_mode2_sector_freebsd_ioctl(p_env, data, i_lsn, b_form2); case _AM_NONE: cdio_info ("access mode not set"); return DRIVER_OP_ERROR; } return DRIVER_OP_ERROR; } /*! Reads i_blocks of mode2 sectors from cd device into data starting from lsn. */ static driver_return_code_t read_mode2_sectors_freebsd (void *p_user_data, void *p_data, lsn_t i_lsn, bool b_form2, unsigned int i_blocks) { _img_private_t *p_env = p_user_data; if ( (p_env->access_mode == _AM_CAM || p_env->access_mode == _AM_MMC_RDWR || p_env->access_mode == _AM_MMC_RDWR_EXCL) && b_form2 ) { /* We have a routine that covers this case without looping. */ return read_mode2_sectors_freebsd_cam(p_env, p_data, i_lsn, i_blocks); } else { unsigned int i; uint16_t i_blocksize = b_form2 ? M2RAW_SECTOR_SIZE : CDIO_CD_FRAMESIZE; /* For each frame, pick out the data part we need */ for (i = 0; i < i_blocks; i++) { int retval = read_mode2_sector_freebsd (p_env, ((char *)p_data) + (i_blocksize * i), i_lsn + i, b_form2); if (retval) return retval; } } return DRIVER_OP_SUCCESS; } /*! Return the size of the CD in logical block address (LBA) units. @return the lsn. On error return CDIO_INVALID_LSN. */ static lsn_t get_disc_last_lsn_freebsd (void *p_obj) { _img_private_t *p_env = p_obj; if (!p_env) return CDIO_INVALID_LSN; switch (p_env->access_mode) { case _AM_CAM: case _AM_MMC_RDWR: case _AM_MMC_RDWR_EXCL: return get_disc_last_lsn_mmc(p_env); case _AM_IOCTL: return get_disc_last_lsn_freebsd_ioctl(p_env); case _AM_NONE: cdio_info ("access mode not set"); return DRIVER_OP_ERROR; } return DRIVER_OP_ERROR; } /*! Set the arg "key" with "value" in the source device. Currently "source" and "access-mode" are valid keys. "source" sets the source device in I/O operations "access-mode" sets the the method of CD access DRIVER_OP_SUCCESS is returned if no error was found, and nonzero if there as an error. */ static driver_return_code_t set_arg_freebsd (void *p_user_data, const char key[], const char value[]) { _img_private_t *p_env = p_user_data; if (!strcmp (key, "source")) { if (!value) return DRIVER_OP_ERROR; free (p_env->gen.source_name); p_env->gen.source_name = strdup (value); } else if (!strcmp (key, "access-mode")) { p_env->access_mode = str_to_access_mode_freebsd(value); if (p_env->access_mode == _AM_CAM && !p_env->b_cam_init) return init_freebsd_cam(p_env) ? DRIVER_OP_SUCCESS : DRIVER_OP_ERROR; } else return DRIVER_OP_ERROR; return DRIVER_OP_SUCCESS; } /* Set CD-ROM drive speed */ static int set_speed_freebsd (void *p_user_data, int i_speed) { const _img_private_t *p_env = p_user_data; if (!p_env) return -1; #ifdef CDRIOCREADSPEED i_speed *= 177; return ioctl(p_env->gen.fd, CDRIOCREADSPEED, &i_speed); #else return -2; #endif } /*! Read and cache the CD's Track Table of Contents and track info. Return false if unsuccessful; */ static bool read_toc_freebsd (void *p_user_data) { _img_private_t *p_env = p_user_data; track_t i, j; /* read TOC header */ if ( ioctl(p_env->gen.fd, CDIOREADTOCHEADER, &p_env->tochdr) == -1 ) { cdio_warn("error in ioctl(CDIOREADTOCHEADER): %s\n", strerror(errno)); return false; } p_env->gen.i_first_track = p_env->tochdr.starting_track; p_env->gen.i_tracks = p_env->tochdr.ending_track - p_env->gen.i_first_track + 1; j=0; for (i=p_env->gen.i_first_track; i<=p_env->gen.i_tracks; i++, j++) { struct ioc_read_toc_single_entry *p_toc = &(p_env->tocent[i-p_env->gen.i_first_track]); p_toc->track = i; p_toc->address_format = CD_LBA_FORMAT; if ( ioctl(p_env->gen.fd, CDIOREADTOCENTRY, p_toc) ) { cdio_warn("%s %d: %s\n", "error in ioctl CDROMREADTOCENTRY for track", i, strerror(errno)); return false; } set_track_flags(&(p_env->gen.track_flags[i]), p_toc->entry.control); } p_env->tocent[j].track = CDIO_CDROM_LEADOUT_TRACK; p_env->tocent[j].address_format = CD_LBA_FORMAT; if ( ioctl(p_env->gen.fd, CDIOREADTOCENTRY, &(p_env->tocent[j]) ) ){ cdio_warn("%s: %s\n", "error in ioctl CDROMREADTOCENTRY for leadout track", strerror(errno)); return false; } p_env->gen.toc_init = true; return true; } /*! Get the volume of an audio CD. @param p_cdio the CD object to be acted upon. */ static driver_return_code_t audio_get_volume_freebsd (void *p_user_data, /*out*/ cdio_audio_volume_t *p_volume) { const _img_private_t *p_env = p_user_data; return ioctl(p_env->gen.fd, CDIOCGETVOL, p_volume); } /*! Pause playing CD through analog output @param p_cdio the CD object to be acted upon. */ static driver_return_code_t audio_pause_freebsd (void *p_user_data) { const _img_private_t *p_env = p_user_data; return ioctl(p_env->gen.fd, CDIOCPAUSE); } /*! Playing starting at given MSF through analog output @param p_cdio the CD object to be acted upon. */ static driver_return_code_t audio_play_msf_freebsd (void *p_user_data, msf_t *p_start_msf, msf_t *p_end_msf) { const _img_private_t *p_env = p_user_data; struct ioc_play_msf freebsd_play_msf; freebsd_play_msf.start_m = cdio_from_bcd8(p_start_msf->m); freebsd_play_msf.start_s = cdio_from_bcd8(p_start_msf->s); freebsd_play_msf.start_f = cdio_from_bcd8(p_start_msf->f); freebsd_play_msf.end_m = cdio_from_bcd8(p_end_msf->m); freebsd_play_msf.end_s = cdio_from_bcd8(p_end_msf->s); freebsd_play_msf.end_f = cdio_from_bcd8(p_end_msf->f); return ioctl(p_env->gen.fd, CDIOCPLAYMSF, &freebsd_play_msf); } /*! Playing CD through analog output at the desired track and index @param p_user_data the CD object to be acted upon. @param p_track_index location to start/end. */ static driver_return_code_t audio_play_track_index_freebsd (void *p_user_data, cdio_track_index_t *p_track_index) { const _img_private_t *p_env = p_user_data; msf_t start_msf; msf_t end_msf; struct ioc_play_msf freebsd_play_msf; lsn_t i_lsn = get_track_lba_freebsd(p_user_data, p_track_index->i_start_track); cdio_lsn_to_msf(i_lsn, &start_msf); i_lsn = get_track_lba_freebsd(p_user_data, p_track_index->i_end_track); cdio_lsn_to_msf(i_lsn, &end_msf); freebsd_play_msf.start_m = start_msf.m; freebsd_play_msf.start_s = start_msf.s; freebsd_play_msf.start_f = start_msf.f; freebsd_play_msf.end_m = end_msf.m; freebsd_play_msf.end_s = end_msf.s; freebsd_play_msf.end_f = end_msf.f; return ioctl(p_env->gen.fd, CDIOCPLAYMSF, &freebsd_play_msf); } /*! Read Audio Subchannel information @param p_user_data the CD object to be acted upon. @param p_subchannel returned information */ #if 1 static driver_return_code_t audio_read_subchannel_freebsd (void *p_user_data, /*out*/ cdio_subchannel_t *p_subchannel) { const _img_private_t *p_env = p_user_data; int i_rc; struct cd_sub_channel_info bsdinfo; struct ioc_read_subchannel read_subchannel; memset(& bsdinfo, 0, sizeof(struct cd_sub_channel_info)); read_subchannel.address_format = CD_MSF_FORMAT; read_subchannel.data_format = CD_CURRENT_POSITION; read_subchannel.track = 0; read_subchannel.data_len = sizeof(struct cd_sub_channel_info); read_subchannel.data = & bsdinfo; i_rc = ioctl(p_env->gen.fd, CDIOCREADSUBCHANNEL, &read_subchannel); if (0 == i_rc) { p_subchannel->audio_status = bsdinfo.header.audio_status; p_subchannel->address = bsdinfo.what.position.addr_type; p_subchannel->control = bsdinfo.what.position.control; p_subchannel->track = bsdinfo.what.position.track_number; p_subchannel->index = bsdinfo.what.position.index_number; p_subchannel->abs_addr.m = cdio_to_bcd8 (bsdinfo.what.position.absaddr.msf.minute); p_subchannel->abs_addr.s = cdio_to_bcd8 (bsdinfo.what.position.absaddr.msf.second); p_subchannel->abs_addr.f = cdio_to_bcd8 (bsdinfo.what.position.absaddr.msf.frame); p_subchannel->rel_addr.m = cdio_to_bcd8 (bsdinfo.what.position.reladdr.msf.minute); p_subchannel->rel_addr.s = cdio_to_bcd8 (bsdinfo.what.position.reladdr.msf.second); p_subchannel->rel_addr.f = cdio_to_bcd8 (bsdinfo.what.position.reladdr.msf.frame); } return i_rc; } #endif /*! Resume playing an audio CD. @param p_cdio the CD object to be acted upon. */ static driver_return_code_t audio_resume_freebsd (void *p_user_data) { const _img_private_t *p_env = p_user_data; return ioctl(p_env->gen.fd, CDIOCRESUME, 0); } /*! Set the volume of an audio CD. @param p_cdio the CD object to be acted upon. */ static driver_return_code_t audio_set_volume_freebsd (void *p_user_data, cdio_audio_volume_t *p_volume) { const _img_private_t *p_env = p_user_data; return ioctl(p_env->gen.fd, CDIOCSETVOL, p_volume); } /*! Eject media. Return 1 if successful, 0 otherwise. */ static int eject_media_freebsd (void *p_user_data) { _img_private_t *p_env = p_user_data; switch (p_env->access_mode) { case _AM_CAM: case _AM_MMC_RDWR: case _AM_MMC_RDWR_EXCL: return eject_media_freebsd_cam(p_env); case _AM_IOCTL: return eject_media_freebsd_ioctl(p_env); case _AM_NONE: cdio_info ("access mode not set"); return 0; } return 0; } /*! Stop playing an audio CD. @param p_user_data the CD object to be acted upon. */ static driver_return_code_t audio_stop_freebsd (void *p_user_data) { const _img_private_t *p_env = p_user_data; return ioctl(p_env->gen.fd, CDIOCSTOP); } /*! Produce a text composed from the system SCSI address tuple according to habits of Linux 2.4 and 2.6 : "Bus,Host,Channel,Target,Lun" and store it in generic_img_private_t.scsi_tuple. Channel has no meaning on FreeBSD. Expect it to be 0. It is only in the text to avoid an unnecessary difference in format. Bus and Host will always be the same. To be accessed via cdio_get_arg("scsi-tuple-freebsd") or "scsi-tuple". For simplicity the FreeBSD driver also replies on "scsi-tuple-linux". Drivers which implement this code have to return 5 valid decimal numbers separated by comma, or empty text if no such numbers are available. @return 1=success , 0=failure */ static int set_scsi_tuple_freebsd(_img_private_t *env) { int bus_no = -1, host_no = -1, channel_no = -1, target_no = -1, lun_no = -1; int ret; char tuple[160]; ret = obtain_scsi_adr_freebsd_cam(env->gen.source_name, &bus_no, &host_no, &channel_no, &target_no, &lun_no); if (ret != 1) return 0; if (env->gen.scsi_tuple != NULL) free (env->gen.scsi_tuple); env->gen.scsi_tuple = NULL; if (bus_no < 0 || host_no < 0 || channel_no < 0 || target_no < 0 || lun_no < 0) { env->gen.scsi_tuple = strdup(""); return 0; } sprintf(tuple, "%d,%d,%d,%d,%d", bus_no, host_no, channel_no, target_no, lun_no); env->gen.scsi_tuple = strdup(tuple); return 1; } static bool is_mmc_supported(void *user_data) { _img_private_t *env = user_data; switch (env->access_mode) { case _AM_IOCTL: case _AM_NONE: return false; case _AM_CAM: case _AM_MMC_RDWR: case _AM_MMC_RDWR_EXCL: return true; } /* Not reached. */ return false; } /*! Return the value associated with the key "arg". */ static const char * get_arg_freebsd (void *user_data, const char key[]) { _img_private_t *env = user_data; if (!strcmp (key, "source")) { return env->gen.source_name; } else if (!strcmp (key, "access-mode")) { switch (env->access_mode) { case _AM_IOCTL: return "ioctl"; case _AM_CAM: return "CAM"; case _AM_MMC_RDWR: return "MMC_RDWR"; case _AM_MMC_RDWR_EXCL: return "MMC_RDWR_EXCL"; case _AM_NONE: return "no access method"; } } else if (strcmp (key, "scsi-tuple") == 0) { if (env->gen.scsi_tuple == NULL) set_scsi_tuple_freebsd(env); return env->gen.scsi_tuple; } else if (!strcmp (key, "mmc-supported?")) { is_mmc_supported(user_data) ? "true" : "false"; } return NULL; } /*! Return the media catalog number MCN. Note: string is malloc'd so caller should free() then returned string when done with it. FIXME: This is just a guess. */ static char * get_mcn_freebsd (const void *p_user_data) { const _img_private_t *p_env = p_user_data; switch (p_env->access_mode) { case _AM_CAM: case _AM_MMC_RDWR: case _AM_MMC_RDWR_EXCL: return mmc_get_mcn(p_env->gen.cdio); case _AM_IOCTL: return mmc_get_mcn(p_env->gen.cdio); case _AM_NONE: cdio_info ("access mode not set"); return NULL; } return NULL; } static void get_drive_cap_freebsd (const void *p_user_data, cdio_drive_read_cap_t *p_read_cap, cdio_drive_write_cap_t *p_write_cap, cdio_drive_misc_cap_t *p_misc_cap) { const _img_private_t *p_env = p_user_data; switch (p_env->access_mode) { case _AM_CAM: case _AM_MMC_RDWR: case _AM_MMC_RDWR_EXCL: get_drive_cap_mmc (p_user_data, p_read_cap, p_write_cap, p_misc_cap); case _AM_IOCTL: cdio_info ("get_drive_cap not supported in ioctl access mode"); return; case _AM_NONE: cdio_info ("access mode not set"); return; } } /*! Run a SCSI MMC command. p_user_data internal CD structure. i_timeout_ms time in milliseconds we will wait for the command to complete. If this value is -1, use the default time-out value. i_cdb Size of p_cdb p_cdb CDB bytes. e_direction direction the transfer is to go. i_buf Size of buffer p_buf Buffer for data, both sending and receiving */ static driver_return_code_t run_mmc_cmd_freebsd( void *p_user_data, unsigned int i_timeout_ms, unsigned int i_cdb, const mmc_cdb_t *p_cdb, cdio_mmc_direction_t e_direction, unsigned int i_buf, /*in/out*/ void *p_buf ) { const _img_private_t *p_env = p_user_data; int ret; switch (p_env->access_mode) { case _AM_CAM: case _AM_MMC_RDWR: case _AM_MMC_RDWR_EXCL: ret = run_mmc_cmd_freebsd_cam( p_user_data, i_timeout_ms, i_cdb, p_cdb, e_direction, i_buf, p_buf ); if (ret != 0) return DRIVER_OP_ERROR; return 0; case _AM_IOCTL: return DRIVER_OP_UNSUPPORTED; case _AM_NONE: cdio_info ("access mode not set"); return DRIVER_OP_ERROR; } return DRIVER_OP_ERROR; } /*! Get format of track. FIXME: We're just guessing this from the GNU/Linux code. */ static track_format_t get_track_format_freebsd(void *p_user_data, track_t i_track) { _img_private_t *p_env = p_user_data; if (!p_env->gen.toc_init) read_toc_freebsd (p_user_data) ; if (i_track > TOTAL_TRACKS || i_track == 0) return TRACK_FORMAT_ERROR; i_track -= FIRST_TRACK_NUM; /* This is pretty much copied from the "badly broken" cdrom_count_tracks in linux/cdrom.c. */ if (p_env->tocent[i_track].entry.control & CDIO_CDROM_DATA_TRACK) { if (p_env->tocent[i_track].address_format == CDIO_CDROM_CDI_TRACK) return TRACK_FORMAT_CDI; else if (p_env->tocent[i_track].address_format == CDIO_CDROM_XA_TRACK) return TRACK_FORMAT_XA; else return TRACK_FORMAT_DATA; } else return TRACK_FORMAT_AUDIO; } /*! Return true if we have XA data (green, mode2 form1) or XA data (green, mode2 form2). That is track begins: sync - header - subheader 12 4 - 8 FIXME: there's gotta be a better design for this and get_track_format? */ static bool get_track_green_freebsd(void *user_data, track_t i_track) { _img_private_t *p_env = user_data; if (i_track == CDIO_CDROM_LEADOUT_TRACK) i_track = TOTAL_TRACKS+1; if (i_track > TOTAL_TRACKS+1 || i_track == 0) return false; /* FIXME: Dunno if this is the right way, but it's what I was using in cdinfo for a while. */ return ((p_env->tocent[i_track-FIRST_TRACK_NUM].entry.control & 2) != 0); } /*! Return the starting LSN track number i_track in obj. Track numbers start at 1. The "leadout" track is specified either by using i_track LEADOUT_TRACK or the total tracks+1. CDIO_INVALID_LBA is returned if there is no track entry. */ static lba_t get_track_lba_freebsd(void *user_data, track_t i_track) { _img_private_t *p_env = user_data; if (!p_env->gen.toc_init) read_toc_freebsd (p_env) ; if (i_track == CDIO_CDROM_LEADOUT_TRACK) i_track = TOTAL_TRACKS+1; if (i_track > TOTAL_TRACKS+1 || i_track == 0 || !p_env->gen.toc_init) { return CDIO_INVALID_LBA; } else { return cdio_lsn_to_lba(ntohl(p_env->tocent[i_track-FIRST_TRACK_NUM].entry.addr.lba)); } } #endif /* HAVE_FREEBSD_CDROM */ /*! Return an array of strings giving possible CD devices. */ char ** cdio_get_devices_freebsd (void) { #ifndef HAVE_FREEBSD_CDROM return NULL; #else char drive[40]; char **drives = NULL; unsigned int num_drives=0; bool exists = true, have_cam_drive = false; char c; /* Scan the system for CD-ROM drives. */ #ifdef USE_ETC_FSTAB struct fstab *fs; setfsent(); /* Check what's in /etc/fstab... */ while ( (fs = getfsent()) ) { if (strncmp(fs->fs_spec, "/dev/sr", 7)) cdio_add_device_list(&drives, fs->fs_spec, &num_drives); } #endif /* Scan the system for CD-ROM drives. Not always 100% reliable, so use the USE_MNTENT code above first. */ /* Scan SCSI and CAM devices */ exists = true; for ( c='0'; exists && c <='9'; c++ ) { sprintf(drive, "/dev/cd%c%s", c, DEVICE_POSTFIX); exists = cdio_is_cdrom(drive, NULL); if ( exists ) { cdio_add_device_list(&drives, drive, &num_drives); have_cam_drive = true; } } /* Scan ATAPI devices */ /* ??? ts 9 Jan 2009 For now i assume atapicam running if a cdN device was found. man atapicam strongly discourages to mix usage of CAM and ATAPI device. So on the risk to sabotage systems without atapicam but with real old SCSI drives, i list no ATAPI addresses if there was a CAM/SCSI address. exists = !have_cam_drive; ts 13 Jan 2009 Regrettably USB drives appear as SCSI drives. We rather need to determine whether atapicam runs, or to make pairs of cd and acd. */ exists = true; for ( c='0'; exists && c <='9'; c++ ) { sprintf(drive, "/dev/acd%c%s", c, DEVICE_POSTFIX); exists = cdio_is_cdrom(drive, NULL); if ( exists ) { cdio_add_device_list(&drives, drive, &num_drives); } } cdio_add_device_list(&drives, NULL, &num_drives); return drives; #endif /*HAVE_FREEBSD_CDROM*/ } /*! Return a string containing the default CD device if none is specified. */ char * cdio_get_default_device_freebsd() { #ifndef HAVE_FREEBSD_CDROM return NULL; #else char drive[40]; bool exists=true; char c; /* Scan the system for CD-ROM drives. */ #ifdef USE_ETC_FSTAB struct fstab *fs; setfsent(); /* Check what's in /etc/fstab... */ while ( (fs = getfsent()) ) { if (strncmp(fs->fs_spec, "/dev/sr", 7)) return strdup(fs->fs_spec); } #endif /* Scan the system for CD-ROM drives. Not always 100% reliable, so use the USE_MNTENT code above first. */ /* Scan SCSI and CAM devices */ for ( c='0'; exists && c <='9'; c++ ) { sprintf(drive, "/dev/cd%c%s", c, DEVICE_POSTFIX); exists = cdio_is_cdrom(drive, NULL); if ( exists ) { return strdup(drive); } } /* Scan are ATAPI devices */ exists = true; for ( c='0'; exists && c <='9'; c++ ) { sprintf(drive, "/dev/acd%c%s", c, DEVICE_POSTFIX); exists = cdio_is_cdrom(drive, NULL); if ( exists ) { return strdup(drive); } } return NULL; #endif /*HAVE_FREEBSD_CDROM*/ } /*! Close tray on CD-ROM. @param psz_device the CD-ROM drive to be closed. */ driver_return_code_t close_tray_freebsd (const char *psz_device) { #ifdef HAVE_FREEBSD_CDROM int fd = open (psz_device, O_RDONLY|O_NONBLOCK, 0); int i_rc; if((i_rc = ioctl(fd, CDIOCCLOSE)) != 0) { cdio_warn ("ioctl CDIOCCLOSE failed: %s\n", strerror(errno)); close(fd); return DRIVER_OP_ERROR; } close(fd); return DRIVER_OP_SUCCESS; #else return DRIVER_OP_NO_DRIVER; #endif /*HAVE_FREEBSD_CDROM*/ } /*! Find out if media has changed since the last call. @param p_user_data the environment of the CD object to be acted upon. @return 1 if media has changed since last call, 0 if not. Error return codes are the same as driver_return_code_t */ #ifdef HAVE_FREEBSD_CDROM int get_media_changed_freebsd (const void *p_user_data) { const _img_private_t *p_env = p_user_data; int changed = 0 ; changed = mmc_get_media_changed( p_env->gen.cdio ); return ((changed > 0) ? changed : 0); } static const char* get_access_mode(const char *psz_source) { char *psz_src; if (!psz_source) { psz_src = cdio_get_default_device_freebsd(); } else { psz_src = strdup(psz_source); } if (psz_src) { if (!(strncmp(psz_src, "/dev/acd", 8))) return "ioctl"; else { char devname[256]; int bytes = readlink(psz_src, devname, 255); if (bytes > 0) { devname[bytes]=0; if (!(strncmp(devname, "acd", 3))) return "ioctl"; } } } return "CAM"; } /* Lock the inode associated to dev_fd and the inode associated to devname. Return OS errno, number of pass device of dev_fd, locked fd to devname, error message. A return value of > 0 means success, <= 0 means failure. */ static int freebsd_dev_lock(int dev_fd, char *devname, int *os_errno, int *pass_dev_no, int *lock_fd, char msg[4096], int flag) { int lock_denied = 0, fd_stbuf_valid, name_stbuf_valid, i, pass_l = 100; int max_retry = 3, tries; struct stat fd_stbuf, name_stbuf; char pass_name[16], *lock_name; *os_errno = 0; *pass_dev_no = -1; *lock_fd = -1; msg[0] = 0; fd_stbuf_valid = !fstat(dev_fd, &fd_stbuf); /* Try to find name of pass device by inode number */ lock_name = (char *) "effective device"; if(fd_stbuf_valid) { for (i = 0; i < pass_l; i++) { sprintf(pass_name, "/dev/pass%d", i); if (stat(pass_name, &name_stbuf) != -1) if(fd_stbuf.st_ino == name_stbuf.st_ino && fd_stbuf.st_dev == name_stbuf.st_dev) break; } if (i < pass_l) { lock_name = pass_name; *pass_dev_no = i; } } name_stbuf_valid = !stat(devname, &name_stbuf); for (tries= 0; tries <= max_retry; tries++) { lock_denied = flock(dev_fd, LOCK_EX | LOCK_NB); *os_errno = errno; if (lock_denied) { if (errno == EAGAIN && tries < max_retry) { /* <<< debugging fprintf(stderr, "\nlibcdio_DEBUG: EAGAIN , tries= %d\n", tries); */ usleep(2000000); continue; } sprintf(msg, "Device busy. flock(LOCK_EX) failed on %s of %s", strlen(lock_name) > 2000 || *pass_dev_no < 0 ? "pass device" : lock_name, strlen(devname) > 2000 ? "drive" : devname); return 0; } break; } /* fprintf(stderr, "libburn_DEBUG: flock obtained on %s of %s\n", lock_name, devname); */ /* Eventually lock the official device node too */ if (fd_stbuf_valid && name_stbuf_valid && (fd_stbuf.st_ino != name_stbuf.st_ino || fd_stbuf.st_dev != name_stbuf.st_dev)) { *lock_fd = open(devname, O_RDONLY); if (*lock_fd == 0) { close(*lock_fd); *lock_fd = -1; } if (*lock_fd > 0) { for (tries = 0; tries <= max_retry; tries++) { lock_denied = flock(*lock_fd, LOCK_EX | LOCK_NB); if (lock_denied) { if (errno == EAGAIN && tries < max_retry) { usleep(2000000); continue; } close(*lock_fd); *lock_fd = -1; sprintf(msg, "Device busy. flock(LOCK_EX) failed on %s", strlen(devname) > 4000 ? "drive" : devname); return 0; } break; } } /* fprintf(stderr, "libburn_DEBUG: flock obtained on %s\n", devname); */ } return 1; } #endif /*HAVE_FREEBSD_CDROM*/ /*! Initialization routine. This is the only thing that doesn't get called via a function pointer. In fact *we* are the ones to set that up. */ CdIo * cdio_open_freebsd (const char *psz_source_name) { return cdio_open_am_freebsd(psz_source_name, NULL); } /*! Initialization routine. This is the only thing that doesn't get called via a function pointer. In fact *we* are the ones to set that up. */ CdIo * cdio_open_am_freebsd (const char *psz_orig_source_name, const char *psz_access_mode) { #ifdef HAVE_FREEBSD_CDROM CdIo *ret; _img_private_t *_data; char *psz_source_name; int open_access_mode; /* Access mode passed to cdio_generic_init. */ if (!psz_access_mode) psz_access_mode = get_access_mode(psz_orig_source_name); cdio_funcs_t _funcs = { .audio_get_volume = audio_get_volume_freebsd, .audio_pause = audio_pause_freebsd, .audio_play_msf = audio_play_msf_freebsd, .audio_play_track_index = audio_play_track_index_freebsd, .audio_read_subchannel = audio_read_subchannel_freebsd, .audio_resume = audio_resume_freebsd, .audio_set_volume = audio_set_volume_freebsd, .audio_stop = audio_stop_freebsd, .eject_media = eject_media_freebsd, .free = free_freebsd, .get_arg = get_arg_freebsd, .get_blocksize = get_blocksize_mmc, .get_cdtext = get_cdtext_generic, .get_default_device = cdio_get_default_device_freebsd, .get_devices = cdio_get_devices_freebsd, .get_disc_last_lsn = get_disc_last_lsn_freebsd, .get_discmode = get_discmode_generic, .get_drive_cap = get_drive_cap_freebsd, .get_first_track_num = get_first_track_num_generic, .get_media_changed = get_media_changed_freebsd, .get_mcn = get_mcn_freebsd, .get_num_tracks = get_num_tracks_generic, .get_track_channels = get_track_channels_generic, .get_track_copy_permit = get_track_copy_permit_generic, .get_track_format = get_track_format_freebsd, .get_track_green = get_track_green_freebsd, .get_track_lba = get_track_lba_freebsd, .get_track_preemphasis = get_track_preemphasis_generic, .get_track_msf = NULL, .lseek = cdio_generic_lseek, .read = cdio_generic_read, .read_audio_sectors = read_audio_sectors_freebsd, .read_data_sectors = read_data_sectors_mmc, .read_mode2_sector = read_mode2_sector_freebsd, .read_mode2_sectors = read_mode2_sectors_freebsd, .read_toc = read_toc_freebsd, .run_mmc_cmd = run_mmc_cmd_freebsd, .set_arg = set_arg_freebsd, .set_blocksize = set_blocksize_mmc, .set_speed = set_speed_freebsd, }; _data = calloc(1, sizeof (_img_private_t)); _data->access_mode = str_to_access_mode_freebsd(psz_access_mode); _data->gen.init = false; _data->gen.fd = -1; _data->gen.toc_init = false; _data->gen.b_cdtext_init = false; _data->gen.b_cdtext_error = false; if (NULL == psz_orig_source_name) { psz_source_name=cdio_get_default_device_freebsd(); if (NULL == psz_source_name) return NULL; _data->device = psz_source_name; set_arg_freebsd(_data, "source", psz_source_name); } else { if (cdio_is_device_generic(psz_orig_source_name)) { set_arg_freebsd(_data, "source", psz_orig_source_name); _data->device = strdup(psz_orig_source_name); } else { /* The below would be okay if all device drivers worked this way. */ #if 0 cdio_info ("source %s is a not a device", psz_orig_source_name); #endif free(_data); return NULL; } } ret = cdio_new ((void *)_data, &_funcs); if (ret == NULL) return NULL; open_access_mode = 0; if (_AM_MMC_RDWR == _data->access_mode) { open_access_mode |= O_RDWR; } else if (_AM_MMC_RDWR_EXCL == _data->access_mode) { open_access_mode |= O_RDWR; } else { open_access_mode |= O_RDONLY; } /* fprintf(stderr, "libcdio_DEBUG: am = %d (MMC_RDWR_EXCL = %d), open = %d (O_RDWR = %d)\n", _data->access_mode, _AM_MMC_RDWR_EXCL, open_access_mode, O_RDWR); */ if (cdio_generic_init(_data, open_access_mode)) { if (_AM_MMC_RDWR_EXCL == _data->access_mode) { int os_errno, pass_dev_no = -1, flock_fd = -1, lock_result; char msg[4096]; lock_result = freebsd_dev_lock(_data->gen.fd, _data->gen.source_name, &os_errno, &pass_dev_no, &flock_fd, msg, 0); if (lock_result <= 0) { cdio_warn ("%s", msg); cdio_generic_free (_data); return NULL; } /* One should rather keep this fd open until _data->gen.fd gets closed. It eventually locks a device sibling of _data->gen.source_name. */ if (flock_fd > 0) close(flock_fd); } if ( _data->access_mode == _AM_IOCTL ) { return ret; } else { if (init_freebsd_cam(_data)) return ret; else { cdio_generic_free (_data); return NULL; } } } else { cdio_generic_free (_data); return NULL; } #else return NULL; #endif /* HAVE_FREEBSD_CDROM */ } bool cdio_have_freebsd (void) { #ifdef HAVE_FREEBSD_CDROM return true; #else return false; #endif /* HAVE_FREEBSD_CDROM */ } libcdio-0.83/lib/driver/FreeBSD/freebsd_cam.c0000644000175000017500000003374411400373302015647 00000000000000/* Copyright (C) 2004, 2005, 2008, 2009, 2010 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* This file contains FreeBSD-specific code and implements low-level control of the CD drive via SCSI emulation. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif static const char _rcsid[] = "$Id: freebsd_cam.c,v 1.12 2008/04/21 18:30:20 karl Exp $"; #ifdef HAVE_FREEBSD_CDROM #include "freebsd.h" #include /* Default value in seconds we will wait for a command to complete. */ #define DEFAULT_TIMEOUT_MSECS 10000 /*! Run a SCSI MMC command. p_user_data internal CD structure. i_timeout_ms time in milliseconds we will wait for the command to complete. If this value is -1, use the default time-out value. i_cdb Size of p_cdb p_cdb CDB bytes. e_direction direction the transfer is to go. i_buf Size of buffer p_buf Buffer for data, both sending and receiving Return 0 if no error. */ int run_mmc_cmd_freebsd_cam( void *p_user_data, unsigned int i_timeout_ms, unsigned int i_cdb, const mmc_cdb_t *p_cdb, cdio_mmc_direction_t e_direction, unsigned int i_buf, /*in/out*/ void *p_buf ) { _img_private_t *p_env = p_user_data; int i_status, sense_size; int direction = CAM_DEV_QFRZDIS | CAM_PASS_ERR_RECOVER; union ccb ccb; p_env->gen.scsi_mmc_sense_valid = 0; if (!p_env || !p_env->cam) return -2; memset(&ccb, 0, sizeof(ccb)); ccb.ccb_h.path_id = p_env->cam->path_id; ccb.ccb_h.target_id = p_env->cam->target_id; ccb.ccb_h.target_lun = p_env->cam->target_lun; ccb.ccb_h.timeout = i_timeout_ms; if (SCSI_MMC_DATA_NONE == e_direction) i_buf = 0; if (!i_buf) direction |= CAM_DIR_NONE; else direction |= (e_direction == SCSI_MMC_DATA_READ)?CAM_DIR_IN : CAM_DIR_OUT; memcpy(ccb.csio.cdb_io.cdb_bytes, p_cdb->field, i_cdb); ccb.csio.cdb_len = mmc_get_cmd_len(ccb.csio.cdb_io.cdb_bytes[0]); cam_fill_csio (&(ccb.csio), 1, NULL, direction | CAM_DEV_QFRZDIS, MSG_SIMPLE_Q_TAG, p_buf, i_buf, sizeof(ccb.csio.sense_data), ccb.csio.cdb_len, 30*1000); if (cam_send_ccb(p_env->cam, &ccb) < 0) { cdio_warn ("transport failed: %s", strerror(errno)); return -1; } if ((ccb.ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) { return 0; } /* Record SCSI sense reply for API call mmc_last_cmd_sense(). */ sense_size = ccb.csio.sense_len; if (sense_size > sizeof(p_env->gen.scsi_mmc_sense)) sense_size = sizeof(p_env->gen.scsi_mmc_sense); memcpy((void *) p_env->gen.scsi_mmc_sense, &ccb.csio.sense_data, sense_size); p_env->gen.scsi_mmc_sense_valid = sense_size; errno = EIO; i_status = ERRCODE(((unsigned char *)&ccb.csio.sense_data)); if (i_status == 0) i_status = -1; else CREAM_ON_ERRNO(((unsigned char *)&ccb.csio.sense_data)); /* There are many harmless or intentional reasons why to get an SCSI error condition. Higher levels should decide whether this is an incident or just a normal outcome. cdio_warn ("scsi error condition detected : 0x%X", i_status); */ return i_status; } bool init_freebsd_cam (_img_private_t *p_env) { char pass[100]; p_env->cam=NULL; memset (&p_env->ccb, 0, sizeof(p_env->ccb)); p_env->ccb.ccb_h.func_code = XPT_GDEVLIST; if (-1 == p_env->gen.fd) p_env->gen.fd = open (p_env->device, O_RDONLY, 0); if (p_env->gen.fd < 0) { cdio_warn ("open (%s): %s", p_env->device, strerror (errno)); return false; } if (ioctl(p_env->gen.fd, CDIOCALLOW) == -1) { cdio_warn("ioctl(fd, CDIOCALLOW) failed: %s\n", strerror(errno)); } if (ioctl (p_env->gen.fd, CAMGETPASSTHRU, &p_env->ccb) < 0) { cdio_warn ("open: %s", strerror (errno)); return false; } sprintf (pass,"/dev/%.15s%u", p_env->ccb.cgdl.periph_name, p_env->ccb.cgdl.unit_number); p_env->cam = cam_open_pass (pass,O_RDWR,NULL); if (!p_env->cam) return false; p_env->gen.init = true; p_env->b_cam_init = true; return true; } void free_freebsd_cam (void *user_data) { _img_private_t *p_env = user_data; if (NULL == p_env) return; if (p_env->gen.fd > 0) close (p_env->gen.fd); p_env->gen.fd = -1; if(p_env->cam) cam_close_device(p_env->cam); free (p_env); } driver_return_code_t read_mode2_sector_freebsd_cam (_img_private_t *p_env, void *data, lsn_t lsn, bool b_form2) { if ( b_form2 ) return read_mode2_sectors_freebsd_cam(p_env, data, lsn, 1); else { /* Need to pick out the data portion from a mode2 form2 frame */ char buf[M2RAW_SECTOR_SIZE] = { 0, }; int retval = read_mode2_sectors_freebsd_cam(p_env, buf, lsn, 1); if ( retval ) return retval; memcpy (((char *)data), buf + CDIO_CD_SUBHEADER_SIZE, CDIO_CD_FRAMESIZE); return DRIVER_OP_SUCCESS; } } /*! Reads nblocks of mode2 sectors from cd device into data starting from lsn. Returns 0 if no error. */ int read_mode2_sectors_freebsd_cam (_img_private_t *p_env, void *p_buf, lsn_t lsn, unsigned int nblocks) { mmc_cdb_t cdb = {{0, }}; bool b_read_10 = false; CDIO_MMC_SET_READ_LBA(cdb.field, lsn); if (b_read_10) { int retval; CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_READ_10); CDIO_MMC_SET_READ_LENGTH16(cdb.field, nblocks); if ((retval = mmc_set_blocksize (p_env->gen.cdio, M2RAW_SECTOR_SIZE))) return retval; if ((retval = run_mmc_cmd_freebsd_cam (p_env, 0, mmc_get_cmd_len(cdb.field[0]), &cdb, SCSI_MMC_DATA_READ, M2RAW_SECTOR_SIZE * nblocks, p_buf))) { mmc_set_blocksize (p_env->gen.cdio, CDIO_CD_FRAMESIZE); return retval; } return mmc_set_blocksize (p_env->gen.cdio, CDIO_CD_FRAMESIZE); } else { CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_READ_CD); CDIO_MMC_SET_READ_LENGTH24(cdb.field, nblocks); cdb.field[1] = 0; /* sector size mode2 */ cdb.field[9] = 0x58; /* 2336 mode2 */ return run_mmc_cmd_freebsd_cam (p_env, 0, mmc_get_cmd_len(cdb.field[0]), &cdb, SCSI_MMC_DATA_READ, M2RAW_SECTOR_SIZE * nblocks, p_buf); } } /*! Eject media in CD-ROM drive. Return DRIVER_OP_SUCCESS if successful, DRIVER_OP_ERROR on error. */ driver_return_code_t eject_media_freebsd_cam (_img_private_t *p_env) { int i_status; mmc_cdb_t cdb = {{0, }}; uint8_t buf[1]; CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_ALLOW_MEDIUM_REMOVAL); i_status = run_mmc_cmd_freebsd_cam (p_env, DEFAULT_TIMEOUT_MSECS, mmc_get_cmd_len(cdb.field[0]), &cdb, SCSI_MMC_DATA_WRITE, 0, &buf); if (i_status) return i_status; CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_START_STOP); cdb.field[4] = 1; i_status = run_mmc_cmd_freebsd_cam (p_env, DEFAULT_TIMEOUT_MSECS, mmc_get_cmd_len(cdb.field[0]), &cdb, SCSI_MMC_DATA_WRITE, 0, &buf); if (i_status) return i_status; CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_START_STOP); cdb.field[4] = 2; /* eject */ return run_mmc_cmd_freebsd_cam (p_env, DEFAULT_TIMEOUT_MSECS, mmc_get_cmd_len(cdb.field[0]), &cdb, SCSI_MMC_DATA_WRITE, 0, &buf); } /* This is a CAM based device enumerator. Currently its only purpose is to eventually obtain the info needed for cdio_get_arg("scsi-tuple") */ /* Stemming from code in libburn/sg-freebsd.c , originally contributed by Alexander Nedotsukov , without copyright claim to libburn in October 2006. Contributed by libburn and adapted to libcdio without copyright claim in January 2010. */ struct burn_drive_enumeration_state { int fd; union ccb ccb; unsigned int i; int skip_device; }; typedef struct burn_drive_enumeration_state *burn_drive_enumerator_t; /* Some helper functions for scsi_give_next_adr() */ static int sg_init_enumerator(burn_drive_enumerator_t *idx_) { struct burn_drive_enumeration_state *idx; int bufsize; idx = malloc(sizeof(*idx)); if (idx == NULL) { cdio_warn("cannot malloc memory for CAM based drive enumerator"); return -1; } idx->skip_device = 0; if ((idx->fd = open(XPT_DEVICE, O_RDWR)) == -1) { cdio_warn("could not open %s (errno = %d \"%s\")", XPT_DEVICE, errno, strerror(errno)); free(idx); idx = NULL; return -1; } bzero(&(idx->ccb), sizeof(union ccb)); idx->ccb.ccb_h.path_id = CAM_XPT_PATH_ID; idx->ccb.ccb_h.target_id = CAM_TARGET_WILDCARD; idx->ccb.ccb_h.target_lun = CAM_LUN_WILDCARD; idx->ccb.ccb_h.func_code = XPT_DEV_MATCH; bufsize = sizeof(struct dev_match_result) * 100; idx->ccb.cdm.match_buf_len = bufsize; idx->ccb.cdm.matches = (struct dev_match_result *)malloc(bufsize); if (idx->ccb.cdm.matches == NULL) { cdio_warn("cannot malloc memory for CAM enumerator matches"); close(idx->fd); free(idx); return -1; } idx->ccb.cdm.num_matches = 0; idx->i = idx->ccb.cdm.num_matches; /* to trigger buffer load */ /* * We fetch all nodes, since we display most of them in the default * case, and all in the verbose case. */ idx->ccb.cdm.num_patterns = 0; idx->ccb.cdm.pattern_buf_len = 0; *idx_ = idx; return 1; } static void sg_destroy_enumerator(burn_drive_enumerator_t *idx_) { struct burn_drive_enumeration_state *idx = *idx_; if(idx->fd != -1) close(idx->fd); free(idx->ccb.cdm.matches); free(idx); *idx_ = NULL; } static int sg_next_enumeration_buffer(burn_drive_enumerator_t *idx_) { struct burn_drive_enumeration_state *idx = *idx_; /* * We do the ioctl multiple times if necessary, in case there are * more than 100 nodes in the EDT. */ if (ioctl(idx->fd, CAMIOCOMMAND, &(idx->ccb)) == -1) { cdio_warn("error sending CAMIOCOMMAND ioctl, (errno = %d \"%s\")", errno, strerror(errno)); return -1; } if ((idx->ccb.ccb_h.status != CAM_REQ_CMP) || ((idx->ccb.cdm.status != CAM_DEV_MATCH_LAST) && (idx->ccb.cdm.status != CAM_DEV_MATCH_MORE))) { cdio_warn("got CAM error %#x, CDM error %d\n", idx->ccb.ccb_h.status, idx->ccb.cdm.status); return -1; } return 1; } /** Returns the next index object state and the next enumerated drive address. @param idx An opaque handle. Make no own theories about it. @param adr Takes the reply @param adr_size Gives maximum size of reply including final 0 @param initialize 1 = start new, 0 = continue, use no other values for now -1 = finish @return 1 = reply is a valid address , 0 = no further address available -1 = severe error (e.g. adr_size too small) */ /* This would be the public interface of the enumerator. In libcdio it is private for now. */ static int give_next_adr_freebsd_cam(burn_drive_enumerator_t *idx_, char adr[], int adr_size, int initialize) { struct burn_drive_enumeration_state *idx; int ret; if (initialize == 1) { ret = sg_init_enumerator(idx_); if (ret<=0) return ret; } else if (initialize == -1) { sg_destroy_enumerator(idx_); return 0; } idx = *idx_; do { if (idx->i >= idx->ccb.cdm.num_matches) { ret = sg_next_enumeration_buffer(idx_); if (ret<=0) return -1; idx->i = 0; } else (idx->i)++; while (idx->i < idx->ccb.cdm.num_matches) { switch (idx->ccb.cdm.matches[idx->i].type) { case DEV_MATCH_BUS: break; case DEV_MATCH_DEVICE: { struct device_match_result* result; result = &(idx->ccb.cdm.matches[idx->i].result.device_result); if (result->flags & DEV_RESULT_UNCONFIGURED) idx->skip_device = 1; else idx->skip_device = 0; break; } case DEV_MATCH_PERIPH: { struct periph_match_result* result; result = &(idx->ccb.cdm.matches[idx->i].result.periph_result); /* A specialized CD drive enumerator would have to test for strcmp(result->periph_name, "cd") != 0 rather than strcmp(result->periph_name, "pass") == 0 */ if (idx->skip_device || strcmp(result->periph_name, "pass") == 0) break; ret = snprintf(adr, adr_size, "/dev/%s%d", result->periph_name, result->unit_number); if(ret >= adr_size) return -1; /* Found next enumerable address */ return 1; } default: /* fprintf(stderr, "unknown match type\n"); */ break; } (idx->i)++; } } while ((idx->ccb.ccb_h.status == CAM_REQ_CMP) && (idx->ccb.cdm.status == CAM_DEV_MATCH_MORE)); return 0; } /** Try to obtain SCSI address tuple of path. @return 1 is success , 0 is failure */ int obtain_scsi_adr_freebsd_cam(char *path, int *bus_no, int *host_no, int *channel_no, int *target_no, int *lun_no) { burn_drive_enumerator_t idx; int ret; char buf[64]; struct periph_match_result* result; ret = sg_init_enumerator(&idx); if (ret <= 0) return 0; while(1) { ret = give_next_adr_freebsd_cam(&idx, buf, sizeof(buf), 0); if (ret <= 0) break; if (strcmp(path, buf) == 0) { result = &(idx->ccb.cdm.matches[idx->i].result.periph_result); *bus_no = result->path_id; *host_no = result->path_id; *channel_no = 0; *target_no = result->target_id; *lun_no = result->target_lun; sg_destroy_enumerator(&idx); return 1; } } sg_destroy_enumerator(&idx); return (0); } #endif /* HAVE_FREEBSD_CDROM */ libcdio-0.83/lib/driver/FreeBSD/freebsd.h0000644000175000017500000001470611324470017015037 00000000000000/* Copyright (C) 2003, 2004, 2008, 2010 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* This file contains FreeBSD-specific code and implements low-level control of the CD drive. Culled initially I think from xine's or mplayer's FreeBSD code with lots of modifications. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include "cdio_assert.h" #include "cdio_private.h" /*! For ioctl access /dev/acd0c is preferred over /dev/cd0c. For cam access /dev/cd0c is preferred. DEFAULT_CDIO_DEVICE and DEFAULT_FREEBSD_AM should be consistent. */ #ifndef DEFAULT_CDIO_DEVICE #define DEFAULT_CDIO_DEVICE "/dev/cd0c" #endif #ifndef DEFAULT_FREEBSD_AM #define DEFAULT_FREEBSD_AM _AM_CAM #endif #include #ifdef HAVE_FREEBSD_CDROM #include #include #include #include #include #ifdef HAVE_SYS_CDIO_H # include #endif #ifndef CDIOCREADAUDIO struct ioc_read_audio { u_char address_format; union msf_lba address; int nframes; u_char* buffer; }; #define CDIOCREADAUDIO _IOWR('c',31,struct ioc_read_audio) #endif #include #include #include #include #include /* for __FreeBSD_version */ #if (__FreeBSD_version < 500000) && (__FreeBSD_kernel_version < 500000) #define DEVICE_POSTFIX "c" #else #define DEVICE_POSTFIX "" #endif #define HAVE_FREEBSD_CAM #ifdef HAVE_FREEBSD_CAM #include #include #include #include #define ERRCODE(s) ((((s)[2]&0x0F)<<16)|((s)[12]<<8)|((s)[13])) #define EMEDIUMTYPE EINVAL #define ENOMEDIUM ENODEV #define CREAM_ON_ERRNO(s) do { \ switch ((s)[12]) \ { case 0x04: errno=EAGAIN; break; \ case 0x20: errno=ENODEV; break; \ case 0x21: if ((s)[13]==0) errno=ENOSPC; \ else errno=EINVAL; \ break; \ case 0x30: errno=EMEDIUMTYPE; break; \ case 0x3A: errno=ENOMEDIUM; break; \ } \ } while(0) #endif /*HAVE_FREEBSD_CAM*/ #include #define TOTAL_TRACKS ( p_env->tochdr.ending_track \ - p_env->tochdr.starting_track + 1) #define FIRST_TRACK_NUM (p_env->tochdr.starting_track) typedef enum { _AM_NONE, _AM_IOCTL, _AM_CAM, _AM_MMC_RDWR, _AM_MMC_RDWR_EXCL, } access_mode_t; typedef struct { /* Things common to all drivers like this. This must be first. */ generic_img_private_t gen; #ifdef HAVE_FREEBSD_CAM char *device; struct cam_device *cam; union ccb ccb; #endif access_mode_t access_mode; bool b_ioctl_init; bool b_cam_init; /* Track information */ struct ioc_toc_header tochdr; /* Entry info for each track. Add 1 for leadout. */ struct ioc_read_toc_single_entry tocent[CDIO_CD_MAX_TRACKS+1]; } _img_private_t; bool cdio_is_cdrom_freebsd_ioctl(char *drive, char *mnttype); track_format_t get_track_format_freebsd_ioctl(const _img_private_t *env, track_t i_track); bool get_track_green_freebsd_ioctl(const _img_private_t *env, track_t i_track); driver_return_code_t eject_media_freebsd_ioctl (_img_private_t *p_env); driver_return_code_t eject_media_freebsd_cam (_img_private_t *p_env); void get_drive_cap_freebsd_cam (const _img_private_t *p_env, cdio_drive_read_cap_t *p_read_cap, cdio_drive_write_cap_t *p_write_cap, cdio_drive_misc_cap_t *p_misc_cap); int get_media_changed_freebsd (const void *p_user_data); char *get_mcn_freebsd_ioctl (const _img_private_t *p_env); void free_freebsd_cam (void *obj); /*! Using the ioctl method, r nblocks of audio sectors from cd device into data starting from lsn. Returns 0 if no error. */ int read_audio_sectors_freebsd_ioctl (_img_private_t *env, void *data, lsn_t lsn, unsigned int nblocks); /*! Using the CAM method, reads nblocks of mode2 sectors from cd device using into data starting from lsn. Returns 0 if no error. */ int read_mode2_sector_freebsd_cam (_img_private_t *env, void *data, lsn_t lsn, bool b_form2); /*! Using the ioctl method, reads nblocks of mode2 sectors from cd device using into data starting from lsn. Returns 0 if no error. */ int read_mode2_sector_freebsd_ioctl (_img_private_t *env, void *data, lsn_t lsn, bool b_form2); /*! Using the CAM method, reads nblocks of mode2 form2 sectors from cd device using into data starting from lsn. Returns 0 if no error. Note: if you want form1 sectors, the caller has to pick out the appropriate piece. */ int read_mode2_sectors_freebsd_cam (_img_private_t *env, void *buf, lsn_t lsn, unsigned int nblocks); bool read_toc_freebsd_ioctl (_img_private_t *env); /*! Run a SCSI MMC command. p_user_data internal CD structure. i_timeout time in milliseconds we will wait for the command to complete. If this value is -1, use the default time-out value. i_cdb Size of p_cdb p_cdb CDB bytes. e_direction direction the transfer is to go. i_buf Size of buffer p_buf Buffer for data, both sending and receiving Return 0 if no error. */ int run_mmc_cmd_freebsd_cam( void *p_user_data, unsigned int i_timeout_ms, unsigned int i_cdb, const mmc_cdb_t *p_cdb, cdio_mmc_direction_t e_direction, unsigned int i_buf, /*in/out*/ void *p_buf ); /*! Return the size of the CD in logical block address (LBA) units. */ lsn_t get_disc_last_lsn_freebsd_ioctl (_img_private_t *_obj); bool init_freebsd_cam (_img_private_t *env); void free_freebsd_cam (void *user_data); /** Try to obtain SCSI address tuple of path. @return 1 is success , 0 is failure */ int obtain_scsi_adr_freebsd_cam(char *path, int *bus_no, int *host_no, int *channel_no, int *target_no, int *lun_no); #endif /*HAVE_FREEBSD_CDROM*/ libcdio-0.83/lib/driver/FreeBSD/Makefile0000644000175000017500000000155311114145233014704 00000000000000# $Id: Makefile,v 1.2 2008/04/21 18:30:19 karl Exp $ # # Copyright (C) 2004, 2008 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # The make is done above. This boilerplate Makefile just transfers the call all install check clean: cd .. && $(MAKE) $@ libcdio-0.83/lib/driver/FreeBSD/freebsd_ioctl.c0000644000175000017500000002011411324470017016212 00000000000000/* $Id: freebsd_ioctl.c,v 1.7 2008/04/21 18:30:20 karl Exp $ Copyright (C) 2003, 2004, 2005, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* This file contains FreeBSD-specific code and implements low-level control of the CD drive. Culled initially I think from xine's or mplayer's FreeBSD code with lots of modifications. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif static const char _rcsid[] = "$Id: freebsd_ioctl.c,v 1.7 2008/04/21 18:30:20 karl Exp $"; #ifdef HAVE_FREEBSD_CDROM #include "freebsd.h" /* Check a drive to see if it is a CD-ROM Return 1 if a CD-ROM. 0 if it exists but isn't a CD-ROM drive and -1 if no device exists . */ bool cdio_is_cdrom_freebsd_ioctl(char *drive, char *mnttype) { bool is_cd=false; int cdfd; struct ioc_toc_header tochdr; /* If it doesn't exist, return -1 */ if ( !cdio_is_device_quiet_generic(drive) ) { return(false); } /* ts 13 Jan 2009 The ioctl below seems to be of little significance if one does not insist in readable media. Various of its failures are not caused by not being a CD drive but by unreadable media situations. A burn program must handle these situations rather than refusing to see the drive. */ return(true); #ifndef Libcdio_on_freeBSD_unsuitable_code /* If it does exist, verify that it's an available CD-ROM */ cdfd = open(drive, (O_RDONLY|O_EXCL|O_NONBLOCK), 0); /* Should we want to test the condition in more detail: ENOENT is the error for /dev/xxxxx does not exist; ENODEV means there's no drive present. */ if ( cdfd >= 0 ) { int ret; ret = ioctl(cdfd, CDIOREADTOCHEADER, &tochdr); /* fprintf(stderr, "libcdio_DEBUG: ioctl(\"%s\", (O_RDONLY|O_EXCL|O_NONBLOCK) = %d (errno= %d)\n", drive, ret, errno); */ if ( ret != -1 ) { is_cd = true; } else if ( errno == ENXIO ) { /* Device not configured */ /* ts 9 Jan 2010 , FreeBSD 8.0 This error is issued with CAM device cd0 if no media is loaded. */ is_cd = true; } else if ( errno == EIO ) { /* I/O error */ /* ts 9 Jan 2010 , FreeBSD 8.0 This error is issued with ATAPI device acd0 if no media is loaded. */ is_cd = true; } else if ( errno == EINVAL ) { /* Invalid argument */ /* ts 13 Jan 2010 , FreeBSD 8.0 This error is issued with USB device cd1 if a blank CD-RW is loaded. */ is_cd = true; } close(cdfd); } else if ( mnttype && (strcmp(mnttype, "iso9660") == 0) ) { /* Even if we can't read it, it might be mounted */ is_cd = true; } return(is_cd); #endif /* Libcdio_on_freeBSD_unsuitable_codE */ } /*! Reads a single mode2 sector from cd device into data starting from lsn. Returns 0 if no error. */ int read_audio_sectors_freebsd_ioctl (_img_private_t *_obj, void *data, lsn_t lsn, unsigned int nblocks) { int bsize = CDIO_CD_FRAMESIZE_RAW; /* set block size */ if (ioctl(_obj->gen.fd, CDRIOCSETBLOCKSIZE, &bsize) == -1) return 1; /* read a frame */ if (pread(_obj->gen.fd, data, nblocks*bsize, lsn*bsize) != nblocks*bsize) { perror("read_audio_sectors_freebsd_ioctl"); return 1; } return 0; } /*! Reads a single mode2 sector from cd device into data starting from lsn. Returns 0 if no error. */ int read_mode2_sector_freebsd_ioctl (_img_private_t *p_env, void *data, lsn_t lsn, bool b_form2) { char buf[CDIO_CD_FRAMESIZE_RAW] = { 0, }; int retval; if ( !b_form2 ) return cdio_generic_read_form1_sector (p_env, buf, lsn); if ( (retval = read_audio_sectors_freebsd_ioctl (p_env, buf, lsn, 1)) ) return retval; memcpy (data, buf + CDIO_CD_XA_SYNC_HEADER, M2RAW_SECTOR_SIZE); return 0; } /*! Return the size of the CD in logical block address (LBA) units. */ lsn_t get_disc_last_lsn_freebsd_ioctl (_img_private_t *p_obj) { struct ioc_read_toc_single_entry tocent; uint32_t size; tocent.track = CDIO_CDROM_LEADOUT_TRACK; tocent.address_format = CDIO_CDROM_LBA; if (ioctl (p_obj->gen.fd, CDIOREADTOCENTRY, &tocent) == -1) { perror ("ioctl(CDROMREADTOCENTRY)"); exit (EXIT_FAILURE); } size = tocent.entry.addr.lba; return size; } /*! Eject media in CD-ROM drive. Return DRIVER_OP_SUCCESS if successful, DRIVER_OP_ERROR on error. */ driver_return_code_t eject_media_freebsd_ioctl (_img_private_t *p_env) { _img_private_t *p_obj = p_env; int ret=DRIVER_OP_ERROR; if (ioctl(p_obj->gen.fd, CDIOCALLOW) == -1) { cdio_warn("ioctl(fd, CDIOCALLOW) failed: %s\n", strerror(errno)); } else if (ioctl(p_obj->gen.fd, CDIOCEJECT) == -1) { cdio_warn("ioctl(CDIOCEJECT) failed: %s\n", strerror(errno)); } else { ret=DRIVER_OP_SUCCESS;; } return ret; } /*! Return the media catalog number MCN. Note: string is malloc'd so caller should free() then returned string when done with it. FIXME: This is just a guess. */ char * get_mcn_freebsd_ioctl (const _img_private_t *p_env) { struct ioc_read_subchannel subchannel; struct cd_sub_channel_info subchannel_info; subchannel.address_format = CDIO_CDROM_MSF; subchannel.data_format = CDIO_SUBCHANNEL_MEDIA_CATALOG; subchannel.track = 0; subchannel.data_len = sizeof(subchannel_info); subchannel.data = &subchannel_info; if(ioctl(p_env->gen.fd, CDIOCREADSUBCHANNEL, &subchannel) < 0) { perror("CDIOCREADSUBCHANNEL"); return NULL; } /* Probably need a loop over tracks rather than give up if we can't find in track 0. */ if (subchannel_info.what.media_catalog.mc_valid) return strdup(subchannel_info.what.media_catalog.mc_number); else return NULL; } /*! Get format of track. FIXME: We're just guessing this from the GNU/Linux code. */ track_format_t get_track_format_freebsd_ioctl(const _img_private_t *p_env, track_t i_track) { struct ioc_read_subchannel subchannel; struct cd_sub_channel_info subchannel_info; subchannel.address_format = CDIO_CDROM_LBA; subchannel.data_format = CDIO_SUBCHANNEL_CURRENT_POSITION; subchannel.track = i_track; subchannel.data_len = 1; subchannel.data = &subchannel_info; if(ioctl(p_env->gen.fd, CDIOCREADSUBCHANNEL, &subchannel) < 0) { perror("CDIOCREADSUBCHANNEL"); return 1; } if (subchannel_info.what.position.control == 0x04) { if (subchannel_info.what.position.data_format == 0x10) return TRACK_FORMAT_CDI; else if (subchannel_info.what.position.data_format == 0x20) return TRACK_FORMAT_XA; else return TRACK_FORMAT_DATA; } else return TRACK_FORMAT_AUDIO; } /*! Return true if we have XA data (green, mode2 form1) or XA data (green, mode2 form2). That is track begins: sync - header - subheader 12 4 - 8 FIXME: there's gotta be a better design for this and get_track_format? */ bool get_track_green_freebsd_ioctl(const _img_private_t *p_env, track_t i_track) { struct ioc_read_subchannel subchannel; struct cd_sub_channel_info subchannel_info; subchannel.address_format = CDIO_CDROM_LBA; subchannel.data_format = CDIO_SUBCHANNEL_CURRENT_POSITION; subchannel.track = i_track; subchannel.data_len = 1; subchannel.data = &subchannel_info; if(ioctl(p_env->gen.fd, CDIOCREADSUBCHANNEL, &subchannel) < 0) { perror("CDIOCREADSUBCHANNEL"); return 1; } /* FIXME: Dunno if this is the right way, but it's what I was using in cdinfo for a while. */ return (subchannel_info.what.position.control & 2) != 0; } #endif /* HAVE_FREEBSD_CDROM */ libcdio-0.83/lib/driver/sector.c0000644000175000017500000001406311650124404013477 00000000000000/* Copyright (C) 2004, 2005, 2011 Rocky Bernstein Copyright (C) 2000 Herbert Valerio Riedel This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #include #include "cdio_assert.h" #include #ifdef HAVE_STRING_H #include #endif #include static const char _rcsid[] = "$Id: sector.c,v 1.5 2005/02/06 04:20:25 rocky Exp $"; /*! String of bytes used to identify the beginning of a Mode 1 or Mode 2 sector. */ const uint8_t CDIO_SECTOR_SYNC_HEADER[CDIO_CD_SYNC_SIZE] = {0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0}; /* Variables to hold debugger-helping enumerations */ enum cdio_cd_enums; enum m2_sector_enums; lba_t cdio_lba_to_lsn (lba_t lba) { if (CDIO_INVALID_LBA == lba) return CDIO_INVALID_LSN; return lba - CDIO_PREGAP_SECTORS; } /* The below is adapted from cdparanoia code which claims it is straight from the MMC3 spec. */ void cdio_lsn_to_msf (lsn_t lsn, msf_t *msf) { int m, s, f; cdio_assert (msf != 0); if ( lsn >= -CDIO_PREGAP_SECTORS ){ m = (lsn + CDIO_PREGAP_SECTORS) / CDIO_CD_FRAMES_PER_MIN; lsn -= m * CDIO_CD_FRAMES_PER_MIN; s = (lsn + CDIO_PREGAP_SECTORS) / CDIO_CD_FRAMES_PER_SEC; lsn -= s * CDIO_CD_FRAMES_PER_SEC; f = lsn + CDIO_PREGAP_SECTORS; } else { m = (lsn + CDIO_CD_MAX_LSN) / CDIO_CD_FRAMES_PER_MIN; lsn -= m * (CDIO_CD_FRAMES_PER_MIN); s = (lsn+CDIO_CD_MAX_LSN) / CDIO_CD_FRAMES_PER_SEC; lsn -= s * CDIO_CD_FRAMES_PER_SEC; f = lsn + CDIO_CD_MAX_LSN; } if (m > 99) { cdio_warn ("number of minutes (%d) truncated to 99.", m); m = 99; } msf->m = cdio_to_bcd8 (m); msf->s = cdio_to_bcd8 (s); msf->f = cdio_to_bcd8 (f); } /*! Convert an LBA into a string representation of the MSF. \warning cdio_lba_to_msf_str returns new allocated string */ char * cdio_lba_to_msf_str (lba_t lba) { if (CDIO_INVALID_LBA == lba) { return strdup("*INVALID"); } else { msf_t msf; msf.m = msf.s = msf.f = 0; cdio_lba_to_msf (lba, &msf); return cdio_msf_to_str(&msf); } } /*! Convert an LSN into the corresponding LBA. CDIO_INVALID_LBA is returned if there is an error. */ lba_t cdio_lsn_to_lba (lsn_t lsn) { if (CDIO_INVALID_LSN == lsn) return CDIO_INVALID_LBA; return lsn + CDIO_PREGAP_SECTORS; } /*! Convert an LBA into the corresponding MSF. */ void cdio_lba_to_msf (lba_t lba, msf_t *msf) { cdio_assert (msf != 0); cdio_lsn_to_msf(cdio_lba_to_lsn(lba), msf); } /*! Convert a MSF into the corresponding LBA. CDIO_INVALID_LBA is returned if there is an error. */ lba_t cdio_msf_to_lba (const msf_t *msf) { uint32_t lba = 0; cdio_assert (msf != 0); lba = cdio_from_bcd8 (msf->m); lba *= CDIO_CD_SECS_PER_MIN; lba += cdio_from_bcd8 (msf->s); lba *= CDIO_CD_FRAMES_PER_SEC; lba += cdio_from_bcd8 (msf->f); return lba; } /*! Convert a MSF into the corresponding LSN. CDIO_INVALID_LSN is returned if there is an error. */ lba_t cdio_msf_to_lsn (const msf_t *msf) { return cdio_lba_to_lsn(cdio_msf_to_lba (msf)); } /*! Convert an LBA into a string representation of the MSF. \warning cdio_lba_to_msf_str returns new allocated string */ char * cdio_msf_to_str (const msf_t *msf) { char buf[16]; snprintf (buf, sizeof (buf), "%2.2x:%2.2x:%2.2x", msf->m, msf->s, msf->f); return strdup (buf); } /*! Convert a MSF - broken out as 3 integer components into the corresponding LBA. CDIO_INVALID_LBA is returned if there is an error. */ lba_t cdio_msf3_to_lba (unsigned int minutes, unsigned int seconds, unsigned int frames) { return ((minutes * CDIO_CD_SECS_PER_MIN + seconds) * CDIO_CD_FRAMES_PER_SEC + frames); } /*! Convert a string of the form MM:SS:FF into the corresponding LBA. CDIO_INVALID_LBA is returned if there is an error. */ lba_t cdio_mmssff_to_lba (const char *psz_mmssff) { int psz_field; lba_t ret; char c; if (0 == strcmp (psz_mmssff, "0")) return 0; c = *psz_mmssff++; if(c >= '0' && c <= '9') psz_field = (c - '0'); else return CDIO_INVALID_LBA; while(':' != (c = *psz_mmssff++)) { if(c >= '0' && c <= '9') psz_field = psz_field * 10 + (c - '0'); else return CDIO_INVALID_LBA; } ret = cdio_msf3_to_lba (psz_field, 0, 0); c = *psz_mmssff++; if(c >= '0' && c <= '9') psz_field = (c - '0'); else return CDIO_INVALID_LBA; if(':' != (c = *psz_mmssff++)) { if(c >= '0' && c <= '9') { psz_field = psz_field * 10 + (c - '0'); c = *psz_mmssff++; if(c != ':') return CDIO_INVALID_LBA; } else return CDIO_INVALID_LBA; } if(psz_field >= CDIO_CD_SECS_PER_MIN) return CDIO_INVALID_LBA; ret += cdio_msf3_to_lba (0, psz_field, 0); c = *psz_mmssff++; if (isdigit(c)) psz_field = (c - '0'); else return -1; if('\0' != (c = *psz_mmssff++)) { if (isdigit(c)) { psz_field = psz_field * 10 + (c - '0'); c = *psz_mmssff++; } else return CDIO_INVALID_LBA; } if('\0' != c) return CDIO_INVALID_LBA; if(psz_field >= CDIO_CD_FRAMES_PER_SEC) return CDIO_INVALID_LBA; ret += psz_field; return ret; } /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/lib/driver/libcdio.sym0000644000175000017500000001114011564673514014203 00000000000000CDIO_SECTOR_SYNC_HEADER _cdio_list_append _cdio_list_begin _cdio_list_end _cdio_list_find _cdio_list_foreach _cdio_list_free _cdio_list_length _cdio_list_new _cdio_list_node_data _cdio_list_node_free _cdio_list_node_next _cdio_list_prepend _cdio_malloc _cdio_strfreev _cdio_strsplit cdio_audio_get_msf_seconds cdio_audio_get_volume cdio_audio_pause cdio_audio_play_msf cdio_audio_play_track_index cdio_audio_read_subchannel cdio_audio_resume cdio_audio_set_volume cdio_audio_stop cdio_charset_convert cdio_charset_converter_create cdio_charset_converter_destroy cdio_charset_from_utf8 cdio_charset_to_utf8 cdio_close_tray cdio_debug cdio_destroy cdio_device_drivers cdio_driver_describe cdio_driver_errmsg cdio_drivers cdio_eject_media cdio_eject_media_drive cdio_error cdio_free_device_list cdio_from_bcd8 cdio_get_arg cdio_get_cdtext cdio_get_default_device cdio_get_default_device_bincue cdio_get_default_device_bsdi cdio_get_default_device_cdrdao cdio_get_default_device_driver cdio_get_default_device_freebsd cdio_get_default_device_linux cdio_get_default_device_nrg cdio_get_default_device_osx cdio_get_default_device_solaris cdio_get_default_device_win32 cdio_get_devices cdio_get_devices_bincue cdio_get_devices_bsdi cdio_get_devices_cdrdao cdio_get_devices_freebsd cdio_get_devices_linux cdio_get_devices_nrg cdio_get_devices_osx cdio_get_devices_ret cdio_get_devices_solaris cdio_get_devices_win32 cdio_get_devices_with_cap cdio_get_devices_with_cap_ret cdio_get_disc_last_lsn cdio_get_discmode cdio_get_drive_cap cdio_get_drive_cap_dev cdio_get_driver_id cdio_get_driver_name cdio_get_first_track_num cdio_get_hwinfo cdio_get_joliet_level cdio_get_last_session cdio_get_last_track_num cdio_get_mcn cdio_get_media_changed cdio_get_num_tracks cdio_get_track cdio_get_track_channels cdio_get_track_copy_permit cdio_get_track_format cdio_get_track_green cdio_get_track_isrc cdio_get_track_last_lsn cdio_get_track_lba cdio_get_track_lsn cdio_get_track_msf cdio_get_track_preemphasis cdio_get_track_pregap_lba cdio_get_track_pregap_lsn cdio_get_track_sec_count cdio_guess_cd_type cdio_have_atapi cdio_have_bincue cdio_have_bsdi cdio_have_cdrdao cdio_have_driver cdio_have_freebsd cdio_have_linux cdio_have_netbsd cdio_have_nrg cdio_have_osx cdio_have_solaris cdio_have_win32 cdio_info cdio_init cdio_is_binfile cdio_is_cuefile cdio_is_device cdio_is_discmode_cdrom cdio_is_discmode_dvd cdio_is_nrg cdio_is_tocfile cdio_lba_to_lsn cdio_lba_to_msf cdio_lba_to_msf_str cdio_log cdio_log_set_handler cdio_loglevel_default cdio_lseek cdio_lsn_to_lba cdio_lsn_to_msf cdio_msf_to_lba cdio_msf_to_lsn cdio_msf_to_str cdio_open cdio_open_am cdio_open_am_bincue cdio_open_am_bsdi cdio_open_am_cd cdio_open_am_cdrdao cdio_open_am_freebsd cdio_open_am_linux cdio_open_am_netbsd cdio_open_am_nrg cdio_open_am_osx cdio_open_am_solaris cdio_open_am_win32 cdio_open_bincue cdio_open_bsdi cdio_open_cd cdio_open_cdrdao cdio_open_cue cdio_open_freebsd cdio_open_linux cdio_open_netbsd cdio_open_nrg cdio_open_osx cdio_open_solaris cdio_open_win32 cdio_os_driver cdio_read cdio_read_audio_sector cdio_read_audio_sectors cdio_read_data_sectors cdio_read_mode1_sector cdio_read_mode1_sectors cdio_read_mode2_sector cdio_read_mode2_sectors cdio_read_sector cdio_read_sectors cdio_realpath cdio_set_arg cdio_set_blocksize cdio_set_drive_speed cdio_set_speed cdio_stdio_destroy cdio_stdio_new cdio_stream_getpos cdio_stream_read cdio_stream_seek cdio_to_bcd8 cdio_version_string cdio_warn cdtext_destroy cdtext_field2str cdtext_get cdtext_get_const cdtext_init cdtext_is_keyword cdtext_set debug_cdio_mmc_feature debug_cdio_mmc_feature_interface debug_cdio_mmc_feature_profile debug_cdio_mmc_get_conf debug_cdio_mmc_gpcmd debug_cdio_mmc_read_sub_state discmode2str libcdio_version_num mmc_audio_read_subchannel mmc_audio_state2str mmc_close_tray mmc_eject_media mmc_feature2str mmc_feature_profile2str mmc_get_blocksize mmc_get_cmd_len mmc_get_configuration mmc_get_discmode mmc_get_disctype mmc_get_disc_erasable mmc_get_drive_mmc_cap mmc_get_dvd_struct_physical mmc_get_event_status mmc_get_hwinfo mmc_get_last_lsn mmc_get_mcn mmc_get_media_changed mmc_get_tray_status mmc_have_interface mmc_is_disctype_bd mmc_is_disctype_cdrom mmc_is_disctype_dvd mmc_is_disctype_hd_dvd mmc_is_disctype_overwritable mmc_isrc_track_read_subchannel mmc_last_cmd_sense mmc_mode_select_10 mmc_mode_sense mmc_mode_sense_10 mmc_mode_sense_6 mmc_prevent_allow_meduim_removal mmc_read_cd mmc_read_data_sectors mmc_read_disc_information mmc_read_sectors mmc_read_timeout_ms mmc_run_cmd mmc_run_cmd_len mmc_sense_key2str mmc_set_blocksize mmc_set_speed mmc_start_stop_unit mmc_test_unit_ready mmc_timeout_ms mmc_test_unit_ready track_format2str libcdio-0.83/lib/driver/cdtext.c0000644000175000017500000002246211650122274013500 00000000000000/* Copyright (C) 2004, 2005, 2008, 2011 Rocky Bernstein toc reading routine adapted from cuetools Copyright (C) 2003 Svend Sanjay Sorensen This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #include "cdtext_private.h" #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_STRINGS_H #include #endif #include /*! Note: the order and number items (except CDTEXT_INVALID) should match the cdtext_field_t enumeration. */ static const char cdtext_keywords[][16] = { "ARRANGER", "COMPOSER", "DISC_ID", "GENRE", "MESSAGE", "ISRC", "PERFORMER", "SIZE_INFO", "SONGWRITER", "TITLE", "TOC_INFO", "TOC_INFO2", "UPC_EAN", }; static const char cdtext_genre[][30] = { "Not Used", "Not Defined", "Adult Contemporary", "Alternative Rock", "Childrens Music", "Classical", "Contemporary Christian", "Country", "Dance", "Easy Listening", "Erotic", "Folk", "Gospel", "Hip Hop", "Jazz", "Latin", "Musical", "New Age", "Opera", "Operetta", "Pop Music", "Rap", "Reggae", "Rock Music", "Rhythm & Blues", "Sound Effects", "Spoken Word", "World Music" } ; /*! Return string representation of the enum values above */ const char * cdtext_field2str (cdtext_field_t i) { if (i >= MAX_CDTEXT_FIELDS) return "Invalid CDTEXT field index"; else return cdtext_keywords[i]; } /*! Free memory assocated with cdtext*/ void cdtext_destroy (cdtext_t *p_cdtext) { cdtext_field_t i; if (!p_cdtext) return; for (i=0; i < MAX_CDTEXT_FIELDS; i++) { if (p_cdtext->field[i]) { free(p_cdtext->field[i]); p_cdtext->field[i] = NULL; } } } /*! returns the CDTEXT value associated with key. NULL is returned if key is CDTEXT_INVALID or the field is not set. */ char * cdtext_get (cdtext_field_t key, const cdtext_t *p_cdtext) { if ((key == CDTEXT_INVALID) || !p_cdtext || (!p_cdtext->field[key])) return NULL; return strdup(p_cdtext->field[key]); } const char * cdtext_get_const (cdtext_field_t key, const cdtext_t *p_cdtext) { if (key == CDTEXT_INVALID) return NULL; return p_cdtext->field[key]; } /*! Initialize a new cdtext structure. When the structure is no longer needed, release the resources using cdtext_delete. */ void cdtext_init (cdtext_t *p_cdtext) { cdtext_field_t i; for (i=0; i < MAX_CDTEXT_FIELDS; i++) { p_cdtext->field[i] = NULL; } } /*! returns 0 if field is a CD-TEXT keyword, returns non-zero otherwise */ cdtext_field_t cdtext_is_keyword (const char *key) { #if 0 char *item; item = bsearch(key, cdtext_keywords, 12, sizeof (char *), (int (*)(const void *, const void *)) strcmp); return (NULL != item) ? 0 : 1; #else unsigned int i; for (i = 0; i < 13 ; i++) if (0 == strcmp (cdtext_keywords[i], key)) { return i; } return CDTEXT_INVALID; #endif } /*! sets cdtext's keyword entry to field. */ void cdtext_set (cdtext_field_t key, const char *p_value, cdtext_t *p_cdtext) { if (NULL == p_value || key == CDTEXT_INVALID) return; if (p_cdtext->field[key]) free (p_cdtext->field[key]); p_cdtext->field[key] = strdup (p_value); } #define SET_CDTEXT_FIELD(FIELD) \ (*set_cdtext_field_fn)(p_user_data, i_track, i_first_track, FIELD, buffer); /* parse all CD-TEXT data retrieved. */ bool cdtext_data_init(void *p_user_data, track_t i_first_track, unsigned char *wdata, int i_data, set_cdtext_field_fn_t set_cdtext_field_fn) { CDText_data_t *p_data; int i = -1; int j; char buffer[256]; int idx; int i_track; bool b_ret = false; char block = 0; char encoding[16]; CDText_blocksize_t p_blocksize; memset( buffer, 0x00, sizeof(buffer) ); idx = 0; bzero(encoding,16); bzero(&p_blocksize, sizeof(CDText_blocksize_t)); p_data = (CDText_data_t *) (&wdata[4]); for( ; i_data > 0; i_data -= sizeof(CDText_data_t), p_data++ ) { #if TESTED if ( p_data->bDBC ) { cdio_warn("Double-byte characters not supported"); return false; } #endif if ( p_data->seq != ++i || p_data->block != block ) break; /* only handle character packs */ if ( ((p_data->type >= 0x80) && (p_data->type <= 0x86)) || (p_data->type == 0x8E)) { i_track = p_data->i_track; for( j=0; j < CDIO_CDTEXT_MAX_TEXT_DATA; (p_data->bDBC ? j+=2 : j++) ) { if( p_data->text[j] == 0x00 && (!p_data->bDBC || p_data->text[j+1] == 0x00)) { /* omit empty strings */ if((buffer[0] != 0x00) && (!p_data->bDBC || buffer[1] != 0x00)) { switch( p_data->type) { case CDIO_CDTEXT_TITLE: SET_CDTEXT_FIELD(CDTEXT_TITLE); break; case CDIO_CDTEXT_PERFORMER: SET_CDTEXT_FIELD(CDTEXT_PERFORMER); break; case CDIO_CDTEXT_SONGWRITER: SET_CDTEXT_FIELD(CDTEXT_SONGWRITER); break; case CDIO_CDTEXT_COMPOSER: SET_CDTEXT_FIELD(CDTEXT_COMPOSER); break; case CDIO_CDTEXT_ARRANGER: SET_CDTEXT_FIELD(CDTEXT_ARRANGER); break; case CDIO_CDTEXT_MESSAGE: SET_CDTEXT_FIELD(CDTEXT_MESSAGE); break; case CDIO_CDTEXT_DISCID: if(i_track == 0) { SET_CDTEXT_FIELD(CDTEXT_DISCID); } break; case CDIO_CDTEXT_UPC: if(i_track == 0) { SET_CDTEXT_FIELD(CDTEXT_UPC_EAN); } else { SET_CDTEXT_FIELD(CDTEXT_ISRC); } break; } b_ret = true; i_track++; idx = 0; } } else { buffer[idx++] = p_data->text[j]; if(p_data->bDBC) buffer[idx++] = p_data->text[j+1]; } buffer[idx] = 0x00; if(p_data->bDBC) buffer[idx+1] = 0x00; } } else { /* not a character pack */ if (p_data->type == CDIO_CDTEXT_GENRE) { i_track = p_data->i_track; /* seems like it is a uint_16 in the first 2 bytes */ if((p_data->text[0] << 8) + p_data->text[1] != CDIO_CDTEXT_GENRE_UNUSED) { sprintf(buffer,"%s",cdtext_genre[(p_data->text[0] << 8) + p_data->text[1]]); SET_CDTEXT_FIELD(CDTEXT_GENRE); } #ifdef _DEBUG_CDTEXT printf("GENRE information present: %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n", p_data->text[0],p_data->text[1],p_data->text[2],p_data->text[3], p_data->text[4],p_data->text[5],p_data->text[6],p_data->text[7], p_data->text[8],p_data->text[9],p_data->text[10],p_data->text[11]); #endif } if(p_data->type == CDIO_CDTEXT_TOC) { #ifdef _DEBUG_CDTEXT printf("TOC information present: %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n", p_data->text[0],p_data->text[1],p_data->text[2],p_data->text[3], p_data->text[4],p_data->text[5],p_data->text[6],p_data->text[7], p_data->text[8],p_data->text[9],p_data->text[10],p_data->text[11]); #endif } if (p_data->type == CDIO_CDTEXT_TOC2) { #ifdef _DEBUG_CDTEXT printf("TOC2 information present: %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n", p_data->text[0],p_data->text[1],p_data->text[2],p_data->text[3], p_data->text[4],p_data->text[5],p_data->text[6],p_data->text[7], p_data->text[8],p_data->text[9],p_data->text[10],p_data->text[11]); #endif } /* i got this info from cdrtools' cdda2wav; all the tests i ran so far were successful */ if (p_data->type == CDIO_CDTEXT_BLOCKSIZE) { /* i_track is the pack element number in this case */ switch(p_data->i_track){ case 0: memcpy((char*)&p_blocksize,p_data->text,0x0c); break; case 1: memcpy(((char*)&p_blocksize)+0x0c,p_data->text,0x0c); break; case 2: memcpy(((char*)&p_blocksize)+0x18,p_data->text,0x0c); break; } } } } if (p_blocksize.packcount[15] >= 3) { /* BLOCKSIZE packs present */ switch (p_blocksize.charcode){ case CDIO_CDTEXT_CHARCODE_ISO_8859_1: sprintf(encoding,"ISO-8859-1"); break; case CDIO_CDTEXT_CHARCODE_ASCII: sprintf(encoding,"ASCII"); break; case CDIO_CDTEXT_CHARCODE_KANJI: sprintf(encoding,"Shift-JIS"); break; } } return b_ret; } libcdio-0.83/lib/driver/os2.c0000644000175000017500000011535011650123304012702 00000000000000/* Copyright (C) 2009 KO Myung-Hun This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* This file contains OS/2-specific code using the DosDevIOCtl access method. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif static const char _rcsid[] = "$Id: os2.c,v 1.30 2008/04/21 18:30:21 karl Exp $"; #include #include #include #include #include "cdio_assert.h" #include "cdio_private.h" #include #ifdef HAVE_OS2_CDROM #define INCL_DOS #define INCL_DOSDEVIOCTL #include #include typedef struct { lsn_t lsn_start; UCHAR uc_adr; UCHAR uc_control; } toc_t; typedef enum { _AM_NONE, _AM_OS2, } access_mode_t; typedef struct { /* Things common to all drivers like this. This must be first. */ generic_img_private_t gen; access_mode_t access_mode; /* Track information */ toc_t toc[CDIO_CD_MAX_TRACKS + 1]; /* 1 more for leadout */ int i_first_track; int i_last_track; /* Some of the more OS specific things. */ HFILE h_cd; BYTE uc_drive; } _img_private_t; #pragma pack(1) static track_format_t get_track_format_os2(const _img_private_t *p_env, track_t i_track); static bool read_toc_os2 (void *p_user_data); static int run_mmc_cmd_os2( void *p_user_data, unsigned int i_timeout_ms, unsigned int i_cdb, const mmc_cdb_t *p_cdb, cdio_mmc_direction_t e_direction, unsigned int i_buf, /*in/out*/ void *p_buf ); /*! Set the volume of an audio CD. @param p_cdio the CD object to be acted upon. */ static driver_return_code_t audio_get_volume_os2 (void *p_user_data, /*out*/ cdio_audio_volume_t *p_volume) { _img_private_t *p_env = p_user_data; struct { UCHAR auch_sign[4]; } s_param = {{'C', 'D', '0', '1'}}; struct { struct { BYTE uc_in_ch; BYTE uc_vol; } as_out_ch[4]; } s_data; ULONG ul_param_len; ULONG ul_data_len; ULONG rc; int i; rc = DosDevIOCtl( p_env->h_cd, IOCTL_CDROMAUDIO, CDROMAUDIO_GETCHANNEL, &s_param, sizeof( s_param ), &ul_param_len, &s_data, sizeof( s_data ), &ul_data_len ); if( rc ) { cdio_warn("audio_get_volume_os2 : DosDevIOCtl(GETCHANNEL) = 0x%lx\n", rc ); return DRIVER_OP_ERROR; } for( i = 0; i < 4; i++ ) p_volume->level[ i ] = s_data.as_out_ch[ i ].uc_vol; return DRIVER_OP_SUCCESS; } /*! Pause playing CD through analog output @param p_cdio the CD object to be acted upon. */ static driver_return_code_t audio_pause_os2 (void *p_user_data) { _img_private_t *p_env = p_user_data; struct { UCHAR auch_sign[4]; } s_param = {{'C', 'D', '0', '1'}}; ULONG ul_param_len; ULONG ul_data_len; ULONG rc; rc = DosDevIOCtl( p_env->h_cd, IOCTL_CDROMAUDIO, CDROMAUDIO_STOPAUDIO, &s_param, sizeof( s_param ), &ul_param_len, NULL, 0, &ul_data_len ); if( rc ) { cdio_warn("audio_pause_os2 : DosDevIOCtl(STOPAUDIO) = 0x%lx\n", rc ); return DRIVER_OP_ERROR; } return DRIVER_OP_SUCCESS; } /*! Playing CD through analog output at the given MSF. @param p_cdio the CD object to be acted upon. */ static driver_return_code_t audio_play_msf_os2 (void *p_user_data, msf_t *p_start_msf, msf_t *p_end_msf) { _img_private_t *p_env = p_user_data; struct { UCHAR auch_sign[4]; BYTE uc_access_mode; BYTE uc_start_msf_f; BYTE uc_start_msf_s; BYTE uc_start_msf_m; BYTE uc_start_msf_reserved; BYTE uc_end_msf_f; BYTE uc_end_msf_s; BYTE uc_end_msf_m; BYTE uc_end_msf_reserved; } s_param = { .auch_sign = {'C', 'D', '0', '1'}, .uc_access_mode = 01, /* use MSF format */ }; ULONG ul_param_len; ULONG ul_data_len; ULONG rc; s_param.uc_start_msf_m = cdio_from_bcd8(p_start_msf->m); s_param.uc_start_msf_s = cdio_from_bcd8(p_start_msf->s); s_param.uc_start_msf_f = cdio_from_bcd8(p_start_msf->f); s_param.uc_end_msf_m = cdio_from_bcd8(p_end_msf->m); s_param.uc_end_msf_s = cdio_from_bcd8(p_end_msf->s); s_param.uc_end_msf_f = cdio_from_bcd8(p_end_msf->f); rc = DosDevIOCtl( p_env->h_cd, IOCTL_CDROMAUDIO, CDROMAUDIO_PLAYAUDIO, &s_param, sizeof( s_param ), &ul_param_len, NULL, 0, &ul_data_len ); if( rc ) { cdio_warn("audio_play_msf_os2 : DosDevIOCtl(PLAYAUDIO) = 0x%lx\n", rc ); return DRIVER_OP_ERROR; } return DRIVER_OP_SUCCESS; } /*! Read Audio Subchannel information @param p_cdio the CD object to be acted upon. */ static driver_return_code_t audio_read_subchannel_os2 (void *p_user_data, cdio_subchannel_t *p_subchannel) { _img_private_t *p_env = p_user_data; struct { UCHAR auch_sign[4]; } s_param = {{'C', 'D', '0', '1'}}; struct { BYTE uc_control_and_adr; BYTE uc_track_number; /* in BCD */ BYTE uc_index; /* in BCD */ BYTE uc_running_time_in_track_m; BYTE uc_running_time_in_track_s; BYTE uc_running_time_in_track_f; BYTE uc_reserved; BYTE uc_running_time_on_disk_m; BYTE uc_running_time_on_disk_s; BYTE uc_running_time_on_disk_f; } s_data_subchannel_q; struct { USHORT us_audio_status_bits; ULONG ul_start_msf; ULONG ul_end_msf; } s_data_audio_status; ULONG ul_data_device_status; ULONG ul_param_len; ULONG ul_data_len; ULONG rc; rc = DosDevIOCtl( p_env->h_cd, IOCTL_CDROMAUDIO, CDROMAUDIO_GETSUBCHANNELQ, &s_param, sizeof( s_param ), &ul_param_len, &s_data_subchannel_q, sizeof( s_data_subchannel_q ), &ul_data_len ); if( rc ) { cdio_warn("audio_read_subchannel_os2 : DosDevIOCtl(GETSUBCHANNELQ) = 0x%lx\n", rc ); return DRIVER_OP_ERROR; } rc = DosDevIOCtl( p_env->h_cd, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIOSTATUS, &s_param, sizeof( s_param ), &ul_param_len, &s_data_audio_status, sizeof( s_data_audio_status ), &ul_data_len ); if( rc ) { cdio_warn("audio_read_subchannel_os2 : DosDevIOCtl(GETAUDIOSTATUS) = 0x%lx\n", rc ); return DRIVER_OP_ERROR; } rc = DosDevIOCtl( p_env->h_cd, IOCTL_CDROMDISK, CDROMDISK_DEVICESTATUS, &s_param, sizeof( s_param ), &ul_param_len, &ul_data_device_status, sizeof( ul_data_device_status ), &ul_data_len ); if( rc ) { cdio_warn("audio_read_subchannel_os2 : DosDevIOCtl(DEVICESTATUS) = 0x%lx\n", rc ); return DRIVER_OP_ERROR; } p_subchannel->track = cdio_from_bcd8(s_data_subchannel_q.uc_track_number); p_subchannel->index = cdio_from_bcd8(s_data_subchannel_q.uc_index); p_subchannel->abs_addr.m = cdio_to_bcd8(s_data_subchannel_q.uc_running_time_on_disk_m); p_subchannel->abs_addr.s = cdio_to_bcd8(s_data_subchannel_q.uc_running_time_on_disk_s); p_subchannel->abs_addr.f = cdio_to_bcd8(s_data_subchannel_q.uc_running_time_on_disk_f); p_subchannel->rel_addr.m = cdio_to_bcd8(s_data_subchannel_q.uc_running_time_in_track_m); p_subchannel->rel_addr.s = cdio_to_bcd8(s_data_subchannel_q.uc_running_time_in_track_s); p_subchannel->rel_addr.f = cdio_to_bcd8(s_data_subchannel_q.uc_running_time_in_track_f); p_subchannel->address = s_data_subchannel_q.uc_control_and_adr & 0x0F; p_subchannel->control = ( s_data_subchannel_q.uc_control_and_adr >> 4 ) & 0x0F; if( ul_data_device_status & 0x1000 ) p_subchannel->audio_status = CDIO_MMC_READ_SUB_ST_PLAY; else if( s_data_audio_status.us_audio_status_bits & 1 ) p_subchannel->audio_status = CDIO_MMC_READ_SUB_ST_PAUSED; else if( s_data_audio_status.ul_start_msf == 0 && s_data_audio_status.ul_end_msf == 0 ) p_subchannel->audio_status = CDIO_MMC_READ_SUB_ST_NO_STATUS; else p_subchannel->audio_status = CDIO_MMC_READ_SUB_ST_COMPLETED; return DRIVER_OP_SUCCESS; } /*! Resume playing an audio CD. @param p_cdio the CD object to be acted upon. */ static driver_return_code_t audio_resume_os2 (void *p_user_data) { _img_private_t *p_env = p_user_data; struct { UCHAR auch_sign[4]; } s_param = {{'C', 'D', '0', '1'}}; ULONG ul_param_len; ULONG ul_data_len; ULONG rc; rc = DosDevIOCtl( p_env->h_cd, IOCTL_CDROMAUDIO, CDROMAUDIO_RESUMEAUDIO, &s_param, sizeof( s_param ), &ul_param_len, NULL, 0, &ul_data_len ); if( rc ) { cdio_warn("audio_resume_os2 : DosDevIOCtl(RESUMEAUDIO) = 0x%lx\n", rc ); return DRIVER_OP_ERROR; } return DRIVER_OP_SUCCESS; } /*! Set the volume of an audio CD. @param p_cdio the CD object to be acted upon. */ static driver_return_code_t audio_set_volume_os2 ( void *p_user_data, cdio_audio_volume_t *p_volume) { _img_private_t *p_env = p_user_data; struct { UCHAR auch_sign[4]; } s_param = {{'C', 'D', '0', '1'}}; struct { struct { BYTE uc_in_ch; BYTE uc_vol; } as_out_ch[4]; } s_data; ULONG ul_param_len; ULONG ul_data_len; ULONG rc; int i; /* first retrive current input ch. */ rc = DosDevIOCtl( p_env->h_cd, IOCTL_CDROMAUDIO, CDROMAUDIO_GETCHANNEL, &s_param, sizeof( s_param ), &ul_param_len, &s_data, sizeof( s_data ), &ul_data_len ); if( rc ) { cdio_warn("audio_set_volume_os2 : DosDevIOCtl(GETCHANNEL) = 0x%lx\n", rc ); return DRIVER_OP_ERROR; } for( i = 0; i < 4; i++ ) s_data.as_out_ch[ i ].uc_vol = p_volume->level[ i ]; /* now set volumes */ rc = DosDevIOCtl( p_env->h_cd, IOCTL_CDROMAUDIO, CDROMAUDIO_SETCHANNELCTRL, &s_param, sizeof( s_param ), &ul_param_len, &s_data, sizeof( s_data ), &ul_data_len ); if( rc ) { cdio_warn("audio_set_volume_os2 : DosDevIOCtl(SETCHANNELCTRL) = 0x%lx\n", rc ); return DRIVER_OP_ERROR; } return DRIVER_OP_SUCCESS; } static driver_return_code_t audio_stop_os2 (void *p_user_data) { _img_private_t *p_env = p_user_data; struct { UCHAR auch_sign[4]; } s_param = {{'C', 'D', '0', '1'}}; ULONG ul_param_len; ULONG ul_data_len; ULONG rc; rc = DosDevIOCtl( p_env->h_cd, IOCTL_CDROMAUDIO, CDROMAUDIO_STOPAUDIO, &s_param, sizeof( s_param ), &ul_param_len, NULL, 0, &ul_data_len ); if( rc ) { cdio_warn("audio_stop_os2 : DosDevIOCtl(STOPAUDIO) = 0x%lx\n", rc ); return DRIVER_OP_ERROR; } return DRIVER_OP_SUCCESS; } /*! Get disc type associated with cd object. */ static discmode_t dvd_discmode_os2 (_img_private_t *p_env) { discmode_t discmode=CDIO_DISC_MODE_NO_INFO; driver_return_code_t rc; /* See if this is a DVD. */ cdio_dvd_struct_t dvd; /* DVD READ STRUCT for layer 0. */ dvd.physical.type = CDIO_DVD_STRUCT_PHYSICAL; dvd.physical.layer_num = 0; rc = mmc_get_dvd_struct_physical_private (p_env, &run_mmc_cmd_os2, &dvd); if (DRIVER_OP_SUCCESS == rc) { switch(dvd.physical.layer[0].book_type) { case CDIO_DVD_BOOK_DVD_ROM: return CDIO_DISC_MODE_DVD_ROM; case CDIO_DVD_BOOK_DVD_RAM: return CDIO_DISC_MODE_DVD_RAM; case CDIO_DVD_BOOK_DVD_R: return CDIO_DISC_MODE_DVD_R; case CDIO_DVD_BOOK_DVD_RW: return CDIO_DISC_MODE_DVD_RW; case CDIO_DVD_BOOK_DVD_PR: return CDIO_DISC_MODE_DVD_PR; case CDIO_DVD_BOOK_DVD_PRW: return CDIO_DISC_MODE_DVD_PRW; default: return CDIO_DISC_MODE_DVD_OTHER; } } return discmode; } /*! Get disc type associated with the cd object. */ static discmode_t get_discmode_os2(void *p_user_data) { _img_private_t *p_env = p_user_data; track_t i_track; discmode_t discmode; if (!p_env) return CDIO_DISC_MODE_ERROR; discmode = dvd_discmode_os2(p_env); if (CDIO_DISC_MODE_NO_INFO != discmode) return discmode; if (!p_env->gen.toc_init) read_toc_os2 (p_env); if (!p_env->gen.toc_init) return CDIO_DISC_MODE_ERROR; for (i_track = p_env->gen.i_first_track; i_track < p_env->gen.i_first_track + p_env->gen.i_tracks ; i_track ++) { track_format_t track_fmt=get_track_format_os2(p_env, i_track); switch(track_fmt) { case TRACK_FORMAT_AUDIO: switch(discmode) { case CDIO_DISC_MODE_NO_INFO: discmode = CDIO_DISC_MODE_CD_DA; break; case CDIO_DISC_MODE_CD_DA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_ERROR: /* No change*/ break; default: discmode = CDIO_DISC_MODE_CD_MIXED; } break; case TRACK_FORMAT_XA: switch(discmode) { case CDIO_DISC_MODE_NO_INFO: discmode = CDIO_DISC_MODE_CD_XA; break; case CDIO_DISC_MODE_CD_XA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_ERROR: /* No change*/ break; default: discmode = CDIO_DISC_MODE_CD_MIXED; } break; case TRACK_FORMAT_DATA: switch(discmode) { case CDIO_DISC_MODE_NO_INFO: discmode = CDIO_DISC_MODE_CD_DATA; break; case CDIO_DISC_MODE_CD_DATA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_ERROR: /* No change*/ break; default: discmode = CDIO_DISC_MODE_CD_MIXED; } break; case TRACK_FORMAT_ERROR: default: discmode = CDIO_DISC_MODE_ERROR; } } return discmode; } #define CDROMDISK_EXECMD 0x7A /* 0, if transfer data to device, 1, if transfer data from device */ #define EX_DIRECTION_IN 0x0001 /* 0, if don't check playing audio, 1, if device plays audio return error */ #define EX_PLAYING_CHK 0x0002 /*! Run a SCSI MMC command. env private CD structure i_timeout_ms time in milliseconds we will wait for the command to complete. If this value is -1, use the default time-out value. p_buf Buffer for data, both sending and receiving i_buf Size of buffer e_direction direction the transfer is to go. cdb CDB bytes. All values that are needed should be set on input. We'll figure out what the right CDB length should be. Return 0 if command completed successfully. */ static int run_mmc_cmd_os2( void *p_user_data, unsigned int i_timeout_ms, unsigned int i_cdb, const mmc_cdb_t *p_cdb, cdio_mmc_direction_t e_direction, unsigned int i_buf, /*in/out*/ void *p_buf ) { _img_private_t *p_env = p_user_data; struct { UCHAR auch_sign[4]; // 'CD01' USHORT us_data_length; // length of the Data Packet USHORT us_cmd_length; // length of the Command Buffer USHORT us_flags; // flags BYTE auc_cmd_buffer[16]; // Command Buffer for SCSI command } s_param = { .auch_sign = {'C', 'D', '0', '1'}, }; ULONG ul_param_len; ULONG ul_data_len; ULONG rc; s_param.us_data_length = i_buf; s_param.us_cmd_length = i_cdb; s_param.us_flags = ( e_direction == SCSI_MMC_DATA_READ ) ? EX_DIRECTION_IN : 0; memcpy( s_param.auc_cmd_buffer, p_cdb, i_cdb ); rc = DosDevIOCtl( p_env->h_cd, IOCTL_CDROMDISK, CDROMDISK_EXECMD, &s_param, sizeof( s_param ), &ul_param_len, p_buf, i_buf, &ul_data_len ); if( rc ) { cdio_warn("run_mmc_cmd_os2 : DosDevIOCtl(EXECMD) = 0x%lx\n", rc ); return DRIVER_OP_ERROR; } return DRIVER_OP_SUCCESS; } /*! Initialize CD device. */ static bool init_os2 (void *p_user_data) { _img_private_t *p_env = p_user_data; ULONG ul_action; ULONG rc; if (p_env->gen.init) { cdio_warn ("init called more than once"); return false; } /* Initializations */ p_env->h_cd = 0; rc = DosOpen((PSZ)p_env->gen.source_name, &p_env->h_cd, &ul_action, 0, FILE_NORMAL, OPEN_ACTION_OPEN_IF_EXISTS | OPEN_ACTION_FAIL_IF_NEW, OPEN_ACCESS_READONLY | OPEN_SHARE_DENYNONE | OPEN_FLAGS_DASD, NULL ); if( rc ) { cdio_warn("init_os2 : DosOpen(%s) = %ld\n", p_env->gen.source_name, rc ); return false; } p_env->uc_drive = toupper( p_env->gen.source_name[ 0 ]) - 'A'; p_env->gen.init = true; p_env->gen.toc_init = false; p_env->gen.b_cdtext_init = false; p_env->gen.b_cdtext_error = false; p_env->gen.fd = p_env->h_cd; return true; } /*! Release and free resources associated with cd. */ static void free_os2 (void *p_user_data) { _img_private_t *p_env = p_user_data; if( !p_env ) return; free (p_env->gen.source_name); if( p_env->h_cd ) DosClose( p_env->h_cd ); free (p_env); } /*! Reads i_blocks of audio sectors from cd device into p_data starting from i_lsn. Returns DRIVER_OP_SUCCESS if no error. */ static int read_audio_sectors_os2 (void *p_user_data, void *p_buf, lsn_t i_lsn, unsigned int i_blocks) { _img_private_t *p_env = p_user_data; struct { UCHAR auch_sign[ 4 ]; BYTE uc_addr_mode; USHORT us_sectors; ULONG ul_start_sector; BYTE uc_reserved; BYTE uc_interleaved_size; } s_param = { .auch_sign = {'C', 'D', '0', '1'}, .uc_addr_mode = 0, /* use LBA format */ }; ULONG ul_param_len; ULONG ul_data_len; ULONG rc; s_param.us_sectors = i_blocks; s_param.ul_start_sector = i_lsn; rc = DosDevIOCtl( p_env->h_cd, IOCTL_CDROMDISK, CDROMDISK_READLONG, &s_param, sizeof( s_param ), &ul_param_len, p_buf, CDIO_CD_FRAMESIZE_RAW * i_blocks, &ul_data_len ); if( rc ) { cdio_warn("read_audio_sectors_os2 : DosDevIOCtl(READLONG) = 0x%lx\n", rc ); return DRIVER_OP_ERROR; } return DRIVER_OP_SUCCESS; } /*! Reads a single raw sector using the DosDevIOCtl method into data starting from lsn. Returns 0 if no error. */ static int read_raw_sector (_img_private_t *p_env, void *p_buf, lsn_t lsn) { struct { UCHAR auch_sign[ 4 ]; BYTE uc_addr_mode; USHORT us_sectors; ULONG ul_start_sector; BYTE uc_reserved; BYTE uc_interleaved_size; } s_param = { .auch_sign = {'C', 'D', '0', '1'}, .uc_addr_mode = 0, /* use LBA format */ .us_sectors = 1, }; ULONG ul_param_len; ULONG ul_data_len; ULONG rc; s_param.ul_start_sector = lsn; rc = DosDevIOCtl( p_env->h_cd, IOCTL_CDROMDISK, CDROMDISK_READLONG, &s_param, sizeof( s_param ), &ul_param_len, p_buf, CDIO_CD_FRAMESIZE_RAW, &ul_data_len ); if( rc ) { cdio_warn("read_raw_sector : DosDevIOCtl(READLONG) = 0x%lx\n", rc ); return DRIVER_OP_ERROR; } return DRIVER_OP_SUCCESS; } /*! Reads a single mode1 sector from cd device into data starting from lsn. Returns 0 if no error. */ static int read_mode1_sector_os2 (void *p_user_data, void *p_buf, lsn_t lsn, bool b_form2) { _img_private_t *p_env = p_user_data; char buf[CDIO_CD_FRAMESIZE_RAW] = { 0, }; int ret = read_raw_sector (p_env, buf, lsn); if ( 0 != ret) return ret; memcpy (p_buf, buf + CDIO_CD_SYNC_SIZE+CDIO_CD_HEADER_SIZE, b_form2 ? M2RAW_SECTOR_SIZE: CDIO_CD_FRAMESIZE); return 0; } /*! Reads nblocks of mode1 sectors from cd device into data starting from lsn. Returns 0 if no error. */ static int read_mode1_sectors_os2 (void *p_user_data, void *p_buf, lsn_t lsn, bool b_form2, unsigned int nblocks) { _img_private_t *p_env = p_user_data; int i; int retval; for (i = 0; i < nblocks; i++) { if (b_form2) { retval = read_mode1_sector_os2 ( p_env, ((char *)p_buf) + (M2RAW_SECTOR_SIZE * i), lsn + i, true); if ( retval ) return retval; } else { char buf[M2RAW_SECTOR_SIZE] = { 0, }; if ( (retval = read_mode1_sector_os2 (p_env, buf, lsn + i, false)) ) return retval; memcpy (((char *)p_buf) + (CDIO_CD_FRAMESIZE * i), buf, CDIO_CD_FRAMESIZE); } } return 0; } /*! Reads a single mode2 sector from cd device into data starting from lsn. Returns 0 if no error. */ static int read_mode2_sector_os2 (void *p_user_data, void *data, lsn_t lsn, bool b_form2) { _img_private_t *p_env = p_user_data; char buf[CDIO_CD_FRAMESIZE_RAW] = { 0, }; int ret = read_raw_sector (p_env, buf, lsn); if ( 0 != ret) return ret; memcpy (data, buf + CDIO_CD_SYNC_SIZE + CDIO_CD_XA_HEADER, b_form2 ? M2RAW_SECTOR_SIZE: CDIO_CD_FRAMESIZE); return 0; } /*! Reads nblocks of mode2 sectors from cd device into data starting from lsn. Returns 0 if no error. */ static int read_mode2_sectors_os2 (void *p_user_data, void *data, lsn_t lsn, bool b_form2, unsigned int i_blocks) { int i; int retval; unsigned int blocksize = b_form2 ? M2RAW_SECTOR_SIZE : CDIO_CD_FRAMESIZE; for (i = 0; i < i_blocks; i++) { if ( (retval = read_mode2_sector_os2 (p_user_data, ((char *)data) + (blocksize * i), lsn + i, b_form2)) ) return retval; } return 0; } /*! Return the size of the CD in logical block address (LBA) units. */ static lsn_t get_disc_last_lsn_os2 (void *p_user_data) { _img_private_t *p_env = p_user_data; struct { UCHAR auch_sign[4]; } s_param = {{'C', 'D', '0', '1'}}; ULONG ul_data_volume_size; ULONG ul_param_len; ULONG ul_data_len; ULONG rc; rc = DosDevIOCtl( p_env->h_cd, IOCTL_CDROMDISK, CDROMDISK_GETVOLUMESIZE, &s_param, sizeof( s_param ), &ul_param_len, &ul_data_volume_size, sizeof( ul_data_volume_size ), &ul_data_len ); if( rc ) { cdio_warn("get_disc_last_lsn_os2 : DosDevIOCtl(GETVOLUMESIZE) = 0x%lx\n", rc ); return CDIO_INVALID_LSN; } return ul_data_volume_size; } /*! Set the key "arg" to "value" in source device. */ static int set_arg_os2 (void *p_user_data, const char key[], const char value[]) { _img_private_t *p_env = p_user_data; if (!strcmp (key, "source")) { if (!value) return DRIVER_OP_ERROR; free (p_env->gen.source_name); p_env->gen.source_name = strdup (value); } else if (!strcmp (key, "access-mode")) { if (!strcmp(value, "OS2")) p_env->access_mode = _AM_OS2; else cdio_warn ("unknown access type: %s. ignored.", value); } else return DRIVER_OP_ERROR; return DRIVER_OP_SUCCESS; } /*! Read and cache the CD's Track Table of Contents and track info. Return true if successful or false if an error. */ static bool read_toc_os2 (void *p_user_data) { _img_private_t *p_env = p_user_data; struct { UCHAR auch_sign[4]; } s_param_disk = {{'C', 'D', '0', '1'}}; struct { BYTE uc_first_track; BYTE uc_last_track; ULONG ul_lead_out_addr; /* in MSF */ } s_data_disk; struct { UCHAR auch_sign[4]; BYTE uc_track; } s_param_track = { .auch_sign = {'C', 'D', '0', '1'}, }; struct { ULONG ul_track_addr; /* in MSF */ BYTE uc_control_and_adr; } s_data_track; ULONG ul_param_len; ULONG ul_data_len; ULONG rc; int i_track; rc = DosDevIOCtl( p_env->h_cd, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIODISK, &s_param_disk, sizeof( s_param_disk ), &ul_param_len, &s_data_disk, sizeof( s_data_disk ), &ul_data_len ); if( rc ) { cdio_warn("read_toc_os2 : DosDevIOCtl(GETAUDIODISK) = 0x%lx\n", rc ); return false; } p_env->gen.i_first_track = s_data_disk.uc_first_track; p_env->gen.i_tracks = s_data_disk.uc_last_track - s_data_disk.uc_first_track + 1; p_env->i_first_track = s_data_disk.uc_first_track; p_env->i_last_track = s_data_disk.uc_last_track; for( i_track = p_env->i_first_track; i_track <= p_env->i_last_track; i_track++ ) { s_param_track.uc_track = i_track; rc = DosDevIOCtl( p_env->h_cd, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIOTRACK, &s_param_track, sizeof( s_param_track ), &ul_param_len, &s_data_track, sizeof( s_data_track ), &ul_data_len ); if( rc ) { cdio_warn("read_toc_os2 : DosDevIOCtl(GETAUDIOTRACK) = 0x%lx\n", rc ); return false; } p_env->toc[i_track].lsn_start = cdio_lba_to_lsn( cdio_msf3_to_lba( ( s_data_track.ul_track_addr >> 16 ) & 0xFF, ( s_data_track.ul_track_addr >> 8 ) & 0xFF, s_data_track.ul_track_addr & 0xFF )); p_env->toc[i_track].uc_adr = s_data_track.uc_control_and_adr & 0x0F; p_env->toc[i_track].uc_control = ( s_data_track.uc_control_and_adr >> 4 ) & 0x0F; p_env->gen.track_flags[i_track].preemphasis = p_env->toc[i_track].uc_control & 0x01 ? CDIO_TRACK_FLAG_TRUE : CDIO_TRACK_FLAG_FALSE; p_env->gen.track_flags[i_track].copy_permit = p_env->toc[i_track].uc_control & 0x02 ? CDIO_TRACK_FLAG_TRUE : CDIO_TRACK_FLAG_FALSE; p_env->gen.track_flags[i_track].channels = p_env->toc[i_track].uc_control & 0x08 ? 4 : 2; } /* store lead out info */ p_env->toc[p_env->i_last_track + 1].lsn_start = cdio_lba_to_lsn( cdio_msf3_to_lba( ( s_data_disk.ul_lead_out_addr >> 16 ) & 0xFF, ( s_data_disk.ul_lead_out_addr >> 8 ) & 0xFF, s_data_disk.ul_lead_out_addr & 0xFF )); p_env->gen.toc_init = true; return true; } /*! Eject media. */ static driver_return_code_t eject_media_os2 (void *p_user_data) { _img_private_t *p_env = p_user_data; struct { BYTE uc_cmd_info; BYTE uc_drive; } s_param; ULONG ul_param_len; ULONG ul_data_len; ULONG rc; s_param.uc_cmd_info = 2; s_param.uc_drive = p_env->uc_drive; rc = DosDevIOCtl( ( HFILE )-1, IOCTL_DISK, DSK_UNLOCKEJECTMEDIA, &s_param, sizeof( s_param ), &ul_param_len, NULL, 0, &ul_data_len ); if( rc ) { cdio_warn("eject_media_os2 : DosDevIOCtl(UNLOCKEJECTMEDIA) = 0x%lx\n", rc ); return DRIVER_OP_ERROR; } return DRIVER_OP_SUCCESS; } /*! Return the value associated with the key "arg". */ static const char * get_arg_os2 (void *p_user_data, const char key[]) { _img_private_t *p_env = p_user_data; if (!strcmp (key, "source")) { return p_env->gen.source_name; } else if (!strcmp (key, "access-mode")) { switch (p_env->access_mode) { case _AM_OS2: return "OS2"; case _AM_NONE: return "no access method"; } } return NULL; } /*! Return the media catalog number MCN. Note: string is malloc'd so caller should free() then returned string when done with it. */ static char * _cdio_get_mcn (const void *p_user_data) { const _img_private_t *p_env = p_user_data; return mmc_get_mcn( p_env->gen.cdio ); } /*! Get the format (XA, DATA, AUDIO) of a track. */ static track_format_t get_track_format_os2(const _img_private_t *p_env, track_t i_track) { /* This is pretty much copied from the "badly broken" cdrom_count_tracks in linux/cdrom.c. */ if (p_env->toc[i_track].uc_control & 0x04) { if (p_env->toc[i_track].uc_adr == 0x10) return TRACK_FORMAT_CDI; else if (p_env->toc[i_track].uc_adr == 0x20) return TRACK_FORMAT_XA; else return TRACK_FORMAT_DATA; } else return TRACK_FORMAT_AUDIO; } /*! Get format of track. */ static track_format_t _cdio_get_track_format(void *p_obj, track_t i_track) { _img_private_t *p_env = p_obj; if ( !p_env ) return TRACK_FORMAT_ERROR; if (!p_env->gen.toc_init) if (!read_toc_os2 (p_env)) return TRACK_FORMAT_ERROR; if ( i_track < p_env->gen.i_first_track || i_track >= p_env->gen.i_tracks + p_env->gen.i_first_track ) return TRACK_FORMAT_ERROR; return get_track_format_os2(p_env, i_track); } /*! Return true if we have XA data (green, mode2 form1) or XA data (green, mode2 form2). That is track begins: sync - header - subheader 12 4 - 8 FIXME: there's gotta be a better design for this and get_track_format? */ static bool _cdio_get_track_green(void *p_obj, track_t i_track) { _img_private_t *p_env = p_obj; switch (_cdio_get_track_format(p_env, i_track)) { case TRACK_FORMAT_XA: return true; case TRACK_FORMAT_ERROR: case TRACK_FORMAT_CDI: case TRACK_FORMAT_AUDIO: return false; case TRACK_FORMAT_DATA: default: break; } /* FIXME: Dunno if this is the right way, but it's what I was using in cd-info for a while. */ return ((p_env->toc[i_track].uc_control & 2) != 0); } /*! Return the starting MSF (minutes/secs/frames) for track number i_tracks in obj. Track numbers start at 1. The "leadout" track is specified either by using i_tracks LEADOUT_TRACK or the total tracks+1. False is returned if there is no track entry. */ static bool _cdio_get_track_msf(void *p_user_data, track_t i_tracks, msf_t *p_msf) { _img_private_t *p_env = p_user_data; if (!p_msf) return false; if (!p_env->gen.toc_init) if (!read_toc_os2 (p_env)) return false; if (i_tracks == CDIO_CDROM_LEADOUT_TRACK) i_tracks = p_env->gen.i_tracks+1; if (i_tracks > p_env->gen.i_tracks+1 || i_tracks == 0) { return false; } else { cdio_lsn_to_msf(p_env->toc[i_tracks].lsn_start, p_msf); return true; } } #endif /* HAVE_OS2_CDROM */ /*! Return an array of strings giving possible CD devices. */ char ** cdio_get_devices_os2 (void) { #ifndef HAVE_OS2_CDROM return NULL; #else char **drives = NULL; unsigned int num_drives=0; struct { BYTE uc_cmd_info; BYTE uc_drive; } s_param; struct { struct { USHORT us_bytes_per_sector; BYTE uc_sectors_per_cluster; USHORT us_reserved_sectors; BYTE uc_number_of_fats; USHORT us_root_dir_entries; USHORT us_total_sectors; BYTE uc_media_descriptor; USHORT us_sectors_per_fat; USHORT us_sectors_per_track; USHORT us_number_of_heads; ULONG ul_hidden_sectors; ULONG ul_large_total_sectors; BYTE auc_reserved[6]; } s_ebpb; USHORT us_cylinders; BYTE uc_dev_type; USHORT us_dev_attr; } s_data; ULONG ul_param_len; ULONG ul_data_len; UCHAR uc_drive; char sz_drive_str[ 3 ] = "X:"; ULONG rc; /* Scan the system for CD-ROM drives. */ for( uc_drive = 0; uc_drive < 26; uc_drive++ ) { s_param.uc_cmd_info = 0; s_param.uc_drive = uc_drive; rc = DosDevIOCtl( ( HFILE )-1, IOCTL_DISK, DSK_GETDEVICEPARAMS, &s_param, sizeof( s_param ), &ul_param_len, &s_data, sizeof( s_data ), &ul_data_len ); if( rc ) continue; switch( s_data.s_ebpb.uc_media_descriptor ) { case 4 : /* CD-R */ case 128 + 4 : /* CD-R but cannot be written */ case 5 : /* CD-ROM */ case 128 + 5 : /* CD-ROM but cannot be written */ case 6 : /* DVD-ROM */ case 128 + 6 : /* DVD-ROM but cannot be written */ case 7 : /* DVD-RAM */ case 128 + 7 : /* DVD-RAM but cannot be written */ case 8 : /* CD-RW */ case 128 + 8 : /* CD-RW but cannot be written */ case 9 : /* DVD-R */ case 128 + 9 : /* DVD-R but cannot be written */ case 10 : /* DVD-RW */ case 128 + 10 : /* DVD-RW but cannot be written */ case 11 : /* DVD+RW */ case 128 + 11 : /* DVD+RW but cannot be written */ sz_drive_str[0] = 'A' + uc_drive; cdio_add_device_list(&drives, strdup(sz_drive_str), &num_drives); break; } } cdio_add_device_list(&drives, NULL, &num_drives); return drives; #endif /*HAVE_OS2_CDROM*/ } #define IOCTL_CDROMDISK2 0x82 #define CDROMDISK2_DRIVELETTERS 0x60 /*! Return a string containing the default CD device if none is specified. if CdIo is NULL (we haven't initialized a specific device driver), then find a suitable one and return the default device for that. NULL is returned if we couldn't get a default device. */ char * cdio_get_default_device_os2(void) { #ifdef HAVE_OS2_CDROM struct { USHORT us_drive_count; USHORT us_drive_first; } s_drive_letters; HFILE h_cd2; ULONG ul_action; ULONG ul_param_len; ULONG ul_data_len; char sz_drive_str[ 3 ] = "X:"; ULONG rc; rc = DosOpen((PSZ)"CD-ROM2$", &h_cd2, &ul_action, 0, FILE_NORMAL, OPEN_ACTION_OPEN_IF_EXISTS | OPEN_ACTION_FAIL_IF_NEW, OPEN_ACCESS_READONLY | OPEN_SHARE_DENYNONE, NULL ); if( rc ) { cdio_warn("cdio_get_default_device_os2 : DosOpen(CD-ROM2$) = %ld\n", rc ); return NULL; } rc = DosDevIOCtl( h_cd2, IOCTL_CDROMDISK2, CDROMDISK2_DRIVELETTERS, NULL, 0, &ul_param_len, &s_drive_letters, sizeof( s_drive_letters ), &ul_data_len ); DosClose( h_cd2 ); if( rc ) { cdio_warn("cdio_get_default_device_os2 : DosDevIOCtl(DRIVELETTERS) = 0x%lx\n", rc ); return NULL; } if( s_drive_letters.us_drive_count == 0 ) return NULL; sz_drive_str[0] = 'A' + s_drive_letters.us_drive_first; return strdup( sz_drive_str ); #else return NULL; #endif } /*! Return true if source_name could be a device containing a CD-ROM. */ bool cdio_is_device_os2(const char *source_name) { if (!source_name) return false; #ifdef HAVE_OS2_CDROM return (isalpha(source_name[0]) && source_name[1] == ':' && source_name[2] == '\0'); #else return false; #endif } /*! Close tray on CD-ROM. @param p_user_data the CD object to be acted upon. */ driver_return_code_t close_tray_os2 (const char *psz_os2_drive) { #ifdef HAVE_OS2_CDROM struct { BYTE uc_cmd_info; BYTE uc_drive; } s_param; ULONG ul_param_len; ULONG ul_data_len; ULONG rc; s_param.uc_cmd_info = 3; s_param.uc_drive = toupper(psz_os2_drive[0]) - 'A'; rc = DosDevIOCtl( ( HFILE )-1, IOCTL_DISK, DSK_UNLOCKEJECTMEDIA, &s_param, sizeof( s_param ), &ul_param_len, NULL, 0, &ul_data_len ); if( rc && rc != 99 /* device in use */ ) { cdio_warn("close_tray_os2 : DosDevIOCtl(UNLOCKEJECTMEDIA) = 0x%lx\n", rc ); return DRIVER_OP_ERROR; } return DRIVER_OP_SUCCESS; #else return DRIVER_OP_UNSUPPORTED; #endif /* HAVE_OS2_CDROM */ } /*! Initialization routine. This is the only thing that doesn't get called via a function pointer. In fact *we* are the ones to set that up. */ CdIo_t * cdio_open_os2 (const char *psz_orig_source) { #ifdef HAVE_OS2_CDROM CdIo_t *ret; _img_private_t *_data; char *psz_source; cdio_funcs_t _funcs; memset( &_funcs, 0, sizeof(_funcs) ); _funcs.audio_get_volume = audio_get_volume_os2; _funcs.audio_pause = audio_pause_os2; _funcs.audio_play_msf = audio_play_msf_os2; #if 0 _funcs.audio_play_track_index = audio_play_track_index_os2; #endif _funcs.audio_read_subchannel = audio_read_subchannel_os2; _funcs.audio_resume = audio_resume_os2; _funcs.audio_set_volume = audio_set_volume_os2; _funcs.audio_stop = audio_stop_os2; _funcs.eject_media = eject_media_os2; _funcs.free = free_os2; _funcs.get_arg = get_arg_os2; #if 0 _funcs.get_blocksize = get_blocksize_os2; #endif _funcs.get_cdtext = get_cdtext_generic; _funcs.get_default_device = cdio_get_default_device_os2; _funcs.get_devices = cdio_get_devices_os2; _funcs.get_disc_last_lsn = get_disc_last_lsn_os2; _funcs.get_discmode = get_discmode_os2; _funcs.get_drive_cap = get_drive_cap_mmc; _funcs.get_first_track_num = get_first_track_num_generic; _funcs.get_hwinfo = NULL; #if 0 _funcs.get_last_session = get_last_session_os2; #endif _funcs.get_media_changed = get_media_changed_mmc; _funcs.get_mcn = _cdio_get_mcn; _funcs.get_num_tracks = get_num_tracks_generic; _funcs.get_track_channels = get_track_channels_generic; _funcs.get_track_copy_permit = get_track_copy_permit_generic; _funcs.get_track_format = _cdio_get_track_format; _funcs.get_track_green = _cdio_get_track_green; _funcs.get_track_lba = NULL; /* This could be done if need be. */ #if 0 _funcs.get_track_pregap_lba = get_track_pregap_lba_os2; _funcs.get_track_isrc = get_track_isrc_os2; #endif _funcs.get_track_msf = _cdio_get_track_msf; _funcs.get_track_preemphasis = get_track_preemphasis_generic; _funcs.lseek = cdio_generic_lseek; _funcs.read = cdio_generic_read; _funcs.read_audio_sectors = read_audio_sectors_os2; _funcs.read_data_sectors = read_data_sectors_mmc; _funcs.read_mode1_sector = read_mode1_sector_os2; _funcs.read_mode1_sectors = read_mode1_sectors_os2; _funcs.read_mode2_sector = read_mode2_sector_os2; _funcs.read_mode2_sectors = read_mode2_sectors_os2; _funcs.read_toc = read_toc_os2; _funcs.run_mmc_cmd = run_mmc_cmd_os2; _funcs.set_arg = set_arg_os2; _funcs.set_blocksize = set_blocksize_mmc; _funcs.set_speed = set_drive_speed_mmc; _data = calloc(1, sizeof (_img_private_t)); _data->access_mode = _AM_OS2; _data->gen.init = false; _data->gen.fd = -1; if (NULL == psz_orig_source) { psz_source=cdio_get_default_device_os2(); if (NULL == psz_source) return NULL; set_arg_os2(_data, "source", psz_source); free(psz_source); } else { if (cdio_is_device_os2(psz_orig_source)) set_arg_os2(_data, "source", psz_orig_source); else { /* The below would be okay if all device drivers worked this way. */ #if 0 cdio_info ("source %s is a not a device", psz_orig_source); #endif free(_data); return NULL; } } ret = cdio_new ((void *)_data, &_funcs); if (ret == NULL) return NULL; ret->driver_id = DRIVER_OS2; if (init_os2(_data)) return ret; else { free_os2 (_data); return NULL; } #else return NULL; #endif /* HAVE_OS2_CDROM */ } /*! Initialization routine. This is the only thing that doesn't get called via a function pointer. In fact *we* are the ones to set that up. */ CdIo_t * cdio_open_am_os2 (const char *psz_source_name, const char *psz_access_mode) { if (psz_access_mode != NULL) cdio_warn ("there is only one access mode for OS/2. Arg %s ignored", psz_access_mode); return cdio_open_os2(psz_source_name); } bool cdio_have_os2 (void) { #ifdef HAVE_OS2_CDROM return true; #else return false; #endif /* HAVE_OS2_CDROM */ } libcdio-0.83/lib/driver/portable.h0000644000175000017500000000372611650124035014021 00000000000000/* Copyright (C) 2006, 2008, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* This file contains definitions to fill in for differences or deficiencies to OS or compiler irregularities. If this file is included other routines can be more portable. */ #ifndef __CDIO_PORTABLE_H__ #define __CDIO_PORTABLE_H__ #if defined(HAVE_CONFIG_H) && !defined(__CDIO_CONFIG_H__) # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #if !defined(HAVE_FTRUNCATE) # if defined ( WIN32 ) # define ftruncate chsize # endif #endif /*HAVE_FTRUNCATE*/ #if !defined(HAVE_SNPRINTF) # if defined ( MSVC ) # define snprintf _snprintf # endif #endif /*HAVE_SNPRINTF*/ #if !defined(HAVE_VSNPRINTF) # if defined ( MSVC ) # define snprintf _vsnprintf # endif #endif /*HAVE_SNPRINTF*/ #if !defined(HAVE_DRAND48) && defined(HAVE_RAND) # define drand48() (rand() / (double)RAND_MAX) #endif #ifdef MSVC # include # ifndef S_ISBLK # define _S_IFBLK 0060000 /* Block Special */ # define S_ISBLK(x) (x & _S_IFBLK) # endif # ifndef S_ISCHR # define _S_IFCHR 0020000 /* character special */ # define S_ISCHR(x) (x & _S_IFCHR) # endif #endif /*MSVC*/ #ifdef HAVE_MEMSET # define BZERO(ptr, size) memset(ptr, 0, size) #elif HAVE_BZERO # define BZERO(ptr, size) bzero(ptr, size) #else #error You need either memset or bzero #endif #endif /* __CDIO_PORTABLE_H__ */ libcdio-0.83/lib/driver/image.h0000644000175000017500000000545511650124135013275 00000000000000/* Copyright (C) 2004, 2005, 2008, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /*! Header for image drivers. In contrast to image_common.h which contains routines, this header like most C headers does not depend on anything defined before it is included. */ #ifndef __CDIO_IMAGE_H__ #define __CDIO_IMAGE_H__ #if defined(HAVE_CONFIG_H) && !defined(__CDIO_CONFIG_H__) # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #include "cdio_private.h" #include /*! The universal format for information about a track for CD image readers It may be that some fields can be derived from other fields. Over time this structure may get cleaned up. Possibly this can be expanded/reused for real CD formats. */ typedef struct { track_t track_num; /**< Probably is index+1 */ msf_t start_msf; lba_t start_lba; int start_index; lba_t pregap; /**< pre-gap */ lba_t silence; /**< pre-gap with zero audio data */ int sec_count; /**< Number of sectors in this track. Does not include pregap */ int num_indices; flag_t flags; /**< "[NO] COPY", "4CH", "[NO] PREMPAHSIS" */ char *isrc; /**< IRSC Code (5.22.4) exactly 12 bytes */ char *filename; CdioDataSource_t *data_source; off_t offset; /**< byte offset into data_start of track beginning. In cdrdao for example, one filename may cover many tracks and each track would then have a different offset. */ track_format_t track_format; bool track_green; cdtext_t cdtext; /**< CD-TEXT */ trackmode_t mode; uint16_t datasize; /**< How much is in the portion we return back? */ uint16_t datastart; /**< Offset from begining of frame that data starts */ uint16_t endsize; /**< How much stuff at the end to skip over. This stuff may have error correction (EDC, or ECC).*/ uint16_t blocksize; /**< total block size = start + size + end */ } track_info_t; #endif /* __CDIO_IMAGE_H__ */ libcdio-0.83/lib/driver/logging.c0000644000175000017500000000636311650124262013634 00000000000000/* Copyright (C) 2003, 2004, 2008, 2011 Rocky Bernstein Copyright (C) 2000 Herbert Valerio Riedel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #include #include #include "cdio_assert.h" #include "portable.h" static const char _rcsid[] = "$Id: logging.c,v 1.2 2008/04/22 15:29:12 karl Exp $"; cdio_log_level_t cdio_loglevel_default = CDIO_LOG_WARN; static void default_cdio_log_handler (cdio_log_level_t level, const char message[]) { switch (level) { case CDIO_LOG_ERROR: if (level >= cdio_loglevel_default) { fprintf (stderr, "**ERROR: %s\n", message); fflush (stderr); } exit (EXIT_FAILURE); break; case CDIO_LOG_DEBUG: if (level >= cdio_loglevel_default) { fprintf (stdout, "--DEBUG: %s\n", message); } break; case CDIO_LOG_WARN: if (level >= cdio_loglevel_default) { fprintf (stdout, "++ WARN: %s\n", message); } break; case CDIO_LOG_INFO: if (level >= cdio_loglevel_default) { fprintf (stdout, " INFO: %s\n", message); } break; case CDIO_LOG_ASSERT: if (level >= cdio_loglevel_default) { fprintf (stderr, "!ASSERT: %s\n", message); fflush (stderr); } abort (); break; default: cdio_assert_not_reached (); break; } fflush (stdout); } static cdio_log_handler_t _handler = default_cdio_log_handler; cdio_log_handler_t cdio_log_set_handler (cdio_log_handler_t new_handler) { cdio_log_handler_t old_handler = _handler; _handler = new_handler; return old_handler; } static void cdio_logv (cdio_log_level_t level, const char format[], va_list args) { char buf[1024] = { 0, }; static int in_recursion = 0; if (in_recursion) cdio_assert_not_reached (); in_recursion = 1; vsnprintf(buf, sizeof(buf)-1, format, args); _handler(level, buf); in_recursion = 0; } void cdio_log (cdio_log_level_t level, const char format[], ...) { va_list args; va_start (args, format); cdio_logv (level, format, args); va_end (args); } #define CDIO_LOG_TEMPLATE(level, LEVEL) \ void \ cdio_ ## level (const char format[], ...) \ { \ va_list args; \ va_start (args, format); \ cdio_logv (CDIO_LOG_ ## LEVEL, format, args); \ va_end (args); \ } CDIO_LOG_TEMPLATE(debug, DEBUG) CDIO_LOG_TEMPLATE(info, INFO) CDIO_LOG_TEMPLATE(warn, WARN) CDIO_LOG_TEMPLATE(error, ERROR) #undef CDIO_LOG_TEMPLATE /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/lib/driver/image_common.h0000644000175000017500000001453211114145233014636 00000000000000/* $Id: image_common.h,v 1.13 2008/04/22 15:29:12 karl Exp $ Copyright (C) 2004, 2005, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /*! Common image routines. Because _img_private_t may vary over image formats, the routines are included into the image drivers after _img_private_t is defined. In order for the below routines to work, there is a large part of _img_private_t that is common among image drivers. For example, see image.h */ #ifndef __CDIO_IMAGE_COMMON_H__ #define __CDIO_IMAGE_COMMON_H__ typedef struct { /* Things common to all drivers like this. This must be first. */ generic_img_private_t gen; internal_position_t pos; char *psz_cue_name; char *psz_access_mode; /* Just the name of the driver. We add this for regularity with other real CD drivers which has an access mode. */ char *psz_mcn; /* Media Catalog Number (5.22.3) exactly 13 bytes */ track_info_t tocent[CDIO_CD_MAX_TRACKS+1]; /* entry info for each track add 1 for leadout. */ discmode_t disc_mode; #ifdef NEED_NERO_STRUCT /* Nero Specific stuff. Note: for the image_free to work, this *must* be last. */ bool is_dao; /* True if some of disk at once. False if some sort of track at once. */ uint32_t mtyp; /* Value of MTYP (media type?) tag */ uint8_t dtyp; /* Value of DAOX media type tag */ /* This is a hack because I don't really understnad NERO better. */ bool is_cues; CdioList_t *mapping; /* List of track information */ uint32_t size; #endif } _img_private_t; #define free_if_notnull(p_obj) \ if (NULL != p_obj) { free(p_obj); p_obj=NULL; }; /*! We don't need the image any more. Free all memory associated with it. */ void _free_image (void *p_user_data); int _eject_media_image(void *p_user_data); /*! Return the value associated with the key "arg". */ const char * _get_arg_image (void *user_data, const char key[]); /*! Get disc type associated with cd_obj. */ discmode_t _get_discmode_image (void *p_user_data); /*! Return the the kind of drive capabilities of device. */ void _get_drive_cap_image (const void *user_data, cdio_drive_read_cap_t *p_read_cap, cdio_drive_write_cap_t *p_write_cap, cdio_drive_misc_cap_t *p_misc_cap); /*! Return the number of of the first track. CDIO_INVALID_TRACK is returned on error. */ track_t _get_first_track_num_image(void *p_user_data); /*! Find out if media has changed since the last call. @param p_user_data the CD object to be acted upon. @return 1 if media has changed since last call, 0 if not. Error return codes are the same as driver_return_code_t We always return DRIVER_OP_UNSUPPORTED. */ int get_media_changed_image(const void *p_user_data); /*! Return the media catalog number (MCN) from the CD or NULL if there is none or we don't have the ability to get it. Note: string is malloc'd so caller has to free() the returned string when done with it. */ char * _get_mcn_image(const void *p_user_data); /*! Return the number of tracks. */ track_t _get_num_tracks_image(void *p_user_data); /*! Return the starting MSF (minutes/secs/frames) for the track number track_num in obj. Tracks numbers start at 1. The "leadout" track is specified either by using track_num LEADOUT_TRACK or the total tracks+1. */ bool _get_track_msf_image(void *p_user_data, track_t i_track, msf_t *msf); /*! Return number of channels in track: 2 or 4; -2 if not implemented or -1 for error. Not meaningful if track is not an audio track. */ int get_track_channels_image(const void *p_user_data, track_t i_track); /*! Return 1 if copy is permitted on the track, 0 if not, or -1 for error. Is this meaningful if not an audio track? */ track_flag_t get_track_copy_permit_image(void *p_user_data, track_t i_track); /*! Return 1 if track has pre-emphasis, 0 if not, or -1 for error. Is this meaningful if not an audio track? pre-emphasis is a non linear frequency response. */ track_flag_t get_track_preemphasis_image(const void *p_user_data, track_t i_track); /*! Return the starting LBA for the pregap for track number i_track. Track numbers start at 1. CDIO_INVALID_LBA is returned on error. */ lba_t get_track_pregap_lba_image(const void *p_user_data, track_t i_track); /*! Return the International Standard Recording Code (ISRC) for track number i_track in p_cdio. Track numbers start at 1. Note: string is malloc'd so caller has to free() the returned string when done with it. */ char *get_track_isrc_image(const void *p_user_data, track_t i_track); /*! Read a data sector @param p_cdio object to read from @param p_buf place to read data into. The caller should make sure this location can store at least ISO_BLOCKSIZE, M2RAW_SECTOR_SIZE, or M2F2_SECTOR_SIZE depending on the kind of sector getting read. If you don't know whether you have a Mode 1/2, Form 1/ Form 2/Formless sector best to reserve space for the maximum, M2RAW_SECTOR_SIZE. @param i_lsn sector to read @param i_blocksize size of block. Should be either ISO_BLOCKSIZE M2RAW_SECTOR_SIZE, or M2F2_SECTOR_SIZE. See comment above under p_buf. @param i_blocks number of blocks to read. */ driver_return_code_t read_data_sectors_image ( void *p_user_data, void *p_buf, lsn_t i_lsn, uint16_t i_blocksize, uint32_t i_blocks ); /*! Set the arg "key" with "value" in the source device. Currently "source" to set the source device in I/O operations is the only valid key. 0 is returned if no error was found, and nonzero if there as an error. */ int _set_arg_image (void *user_data, const char key[], const char value[]); #endif /* __CDIO_IMAGE_COMMON_H__ */ libcdio-0.83/lib/driver/audio.c0000644000175000017500000001031011650122173013271 00000000000000/* Copyright (C) 2005, 2008, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /*! Audio (via line output) related routines. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #include #include "cdio_private.h" /* Return the number of seconds (discarding frame portion) of an MSF */ uint32_t cdio_audio_get_msf_seconds(msf_t *p_msf) { return cdio_from_bcd8(p_msf->m)*CDIO_CD_SECS_PER_MIN + cdio_from_bcd8(p_msf->s); } /*! Get volume of an audio CD. @param p_cdio the CD object to be acted upon. */ driver_return_code_t cdio_audio_get_volume (CdIo_t *p_cdio, /*out*/ cdio_audio_volume_t *p_volume) { cdio_audio_volume_t temp_audio_volume; if (!p_cdio) return DRIVER_OP_UNINIT; if (!p_volume) p_volume = &temp_audio_volume; if (p_cdio->op.audio_get_volume) { return p_cdio->op.audio_get_volume (p_cdio->env, p_volume); } else { return DRIVER_OP_UNSUPPORTED; } } /*! Playing CD through analog output @param p_cdio the CD object to be acted upon. */ driver_return_code_t cdio_audio_pause (CdIo_t *p_cdio) { if (!p_cdio) return DRIVER_OP_UNINIT; if (p_cdio->op.audio_pause) { return p_cdio->op.audio_pause (p_cdio->env); } else { return DRIVER_OP_UNSUPPORTED; } } /*! Playing CD through analog output at the given MSF. @param p_cdio the CD object to be acted upon. */ driver_return_code_t cdio_audio_play_msf (CdIo_t *p_cdio, msf_t *p_start_msf, msf_t *p_end_msf) { if (!p_cdio) return DRIVER_OP_UNINIT; if (p_cdio->op.audio_play_msf) { return p_cdio->op.audio_play_msf (p_cdio->env, p_start_msf, p_end_msf); } else { return DRIVER_OP_UNSUPPORTED; } } /*! Playing CD through analog output @param p_cdio the CD object to be acted upon. */ driver_return_code_t cdio_audio_play_track_index (CdIo_t *p_cdio, cdio_track_index_t *p_track_index) { if (!p_cdio) return DRIVER_OP_UNINIT; if (p_cdio->op.audio_play_track_index) { return p_cdio->op.audio_play_track_index (p_cdio->env, p_track_index); } else { return DRIVER_OP_UNSUPPORTED; } } /*! Get subchannel information. @param p_cdio the CD object to be acted upon. */ driver_return_code_t cdio_audio_read_subchannel (CdIo_t *p_cdio, cdio_subchannel_t *p_subchannel) { if (!p_cdio) return DRIVER_OP_UNINIT; if (p_cdio->op.audio_read_subchannel) { return p_cdio->op.audio_read_subchannel(p_cdio->env, p_subchannel); } else { return DRIVER_OP_UNSUPPORTED; } } /*! Resume playing an audio CD. @param p_cdio the CD object to be acted upon. */ driver_return_code_t cdio_audio_resume (CdIo_t *p_cdio) { if (!p_cdio) return DRIVER_OP_UNINIT; if (p_cdio->op.audio_resume) { return p_cdio->op.audio_resume(p_cdio->env); } else { return DRIVER_OP_UNSUPPORTED; } } /*! Set volume of an audio CD. @param p_cdio the CD object to be acted upon. */ driver_return_code_t cdio_audio_set_volume (CdIo_t *p_cdio, cdio_audio_volume_t *p_volume) { if (!p_cdio) return DRIVER_OP_UNINIT; if (p_cdio->op.audio_set_volume) { return p_cdio->op.audio_set_volume(p_cdio->env, p_volume); } else { return DRIVER_OP_UNSUPPORTED; } } /*! Resume playing an audio CD. @param p_cdio the CD object to be acted upon. */ driver_return_code_t cdio_audio_stop (CdIo_t *p_cdio) { if (!p_cdio) return DRIVER_OP_UNINIT; if (p_cdio->op.audio_stop) { return p_cdio->op.audio_stop(p_cdio->env); } else { return DRIVER_OP_UNSUPPORTED; } } /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/lib/driver/read.c0000644000175000017500000002554111650125725013125 00000000000000/* Copyright (C) 2005, 2008, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** \file read.h * * \brief sector (block, frame)-related libcdio routines. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #include "cdio_private.h" #include "cdio_assert.h" #ifdef HAVE_STRING_H #include #endif #define check_read_parms(p_cdio, p_buf, i_lsn) \ if (!p_cdio) return DRIVER_OP_UNINIT; \ if (!p_buf || CDIO_INVALID_LSN == i_lsn) \ return DRIVER_OP_ERROR; #define check_lsn(i_lsn) \ check_read_parms(p_cdio, p_buf, i_lsn); \ { \ lsn_t end_lsn = \ cdio_get_track_lsn(p_cdio, CDIO_CDROM_LEADOUT_TRACK); \ if ( i_lsn > end_lsn ) { \ cdio_info("Trying to access past end of disk lsn: %ld, end lsn: %ld", \ (long int) i_lsn, (long int) end_lsn); \ return DRIVER_OP_ERROR; \ } \ } #define check_lsn_blocks(i_lsn, i_blocks) \ check_read_parms(p_cdio, p_buf, i_lsn); \ { \ lsn_t end_lsn = \ cdio_get_track_lsn(p_cdio, CDIO_CDROM_LEADOUT_TRACK); \ if ( i_lsn > end_lsn ) { \ cdio_info("Trying to access past end of disk lsn: %ld, end lsn: %ld", \ (long int) i_lsn, (long int) end_lsn); \ return DRIVER_OP_ERROR; \ } \ /* Care is used in the expression below to be correct with */ \ /* respect to unsigned integers. */ \ if ( i_lsn + i_blocks > end_lsn + 1 ) { \ cdio_info("Request truncated to end disk; lsn: %ld, end lsn: %ld", \ (long int) i_lsn, (long int) end_lsn); \ i_blocks = end_lsn - i_lsn + 1; \ } \ } /*! lseek - reposition read/write file offset Returns (off_t) -1 on error. Similar to (if not the same as) libc's lseek() */ off_t cdio_lseek (const CdIo_t *p_cdio, off_t offset, int whence) { if (!p_cdio) return DRIVER_OP_UNINIT; if (p_cdio->op.lseek) return (p_cdio->op.lseek) (p_cdio->env, offset, whence); return DRIVER_OP_UNSUPPORTED; } /*! Reads into buf the next size bytes. Similar to (if not the same as) libc's read(). This is a "cooked" read, or one handled by the OS. It probably won't work on audio data. For that use cdio_read_audio_sector(s). @param p_cdio object to read from @param p_buf place to read data into. The caller should make sure this location can store at least i_size bytes. @param i_size number of bytes to read @return (ssize_t) -1 on error. */ ssize_t cdio_read (const CdIo_t *p_cdio, void *p_buf, size_t i_size) { if (!p_cdio) return DRIVER_OP_UNINIT; if (p_cdio->op.read) return (p_cdio->op.read) (p_cdio->env, p_buf, i_size); return DRIVER_OP_UNSUPPORTED; } /*! Reads an audio sector from cd device into data starting from lsn. Returns DRIVER_OP_SUCCESS if no error. */ driver_return_code_t cdio_read_audio_sector (const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn) { check_lsn(i_lsn); if (p_cdio->op.read_audio_sectors) return p_cdio->op.read_audio_sectors (p_cdio->env, p_buf, i_lsn, 1); return DRIVER_OP_UNSUPPORTED; } /*! Reads audio sectors from cd device into data starting from lsn. Returns DRIVER_OP_SUCCESS if no error. */ driver_return_code_t cdio_read_audio_sectors (const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn, uint32_t i_blocks) { check_lsn_blocks(i_lsn, i_blocks); if (0 == i_blocks) return DRIVER_OP_SUCCESS; if (p_cdio->op.read_audio_sectors) return (p_cdio->op.read_audio_sectors) (p_cdio->env, p_buf, i_lsn, i_blocks); return DRIVER_OP_UNSUPPORTED; } /*! Reads an audio sector from cd device into data starting from lsn. Returns DRIVER_OP_SUCCESS if no error. */ driver_return_code_t cdio_read_data_sectors (const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn, uint16_t i_blocksize, uint32_t i_blocks) { check_lsn(i_lsn); if (0 == i_blocks) return DRIVER_OP_SUCCESS; if (p_cdio->op.read_data_sectors) return p_cdio->op.read_data_sectors (p_cdio->env, p_buf, i_lsn, i_blocksize, i_blocks); return DRIVER_OP_UNSUPPORTED; } #ifndef SEEK_SET #define SEEK_SET 0 #endif /*! Reads a single mode1 form1 or form2 sector from cd device into data starting from lsn. Returns DRIVER_OP_SUCCESS if no error. */ driver_return_code_t cdio_read_mode1_sector (const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn, bool b_form2) { uint32_t size = b_form2 ? M2RAW_SECTOR_SIZE : CDIO_CD_FRAMESIZE ; check_lsn(i_lsn); if (p_cdio->op.read_mode1_sector) { return p_cdio->op.read_mode1_sector(p_cdio->env, p_buf, i_lsn, b_form2); } else if (p_cdio->op.lseek && p_cdio->op.read) { char buf[M2RAW_SECTOR_SIZE] = { 0, }; if (0 > cdio_lseek(p_cdio, CDIO_CD_FRAMESIZE*i_lsn, SEEK_SET)) return -1; if (0 > cdio_read(p_cdio, buf, CDIO_CD_FRAMESIZE)) return -1; memcpy (p_buf, buf, size); return DRIVER_OP_SUCCESS; } return DRIVER_OP_UNSUPPORTED; } /*! Reads mode 1 sectors @param p_cdio object to read from @param buf place to read data into @param lsn sector to read @param b_form2 true for reading mode 1 form 2 sectors or false for mode 1 form 1 sectors. @param i_blocks number of sectors to read */ driver_return_code_t cdio_read_mode1_sectors (const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn, bool b_form2, uint32_t i_blocks) { check_lsn_blocks(i_lsn, i_blocks); if (0 == i_blocks) return DRIVER_OP_SUCCESS; if (p_cdio->op.read_mode1_sectors) return (p_cdio->op.read_mode1_sectors) (p_cdio->env, p_buf, i_lsn, b_form2, i_blocks); return DRIVER_OP_UNSUPPORTED; } /*! Reads a mode 2 sector @param p_cdio object to read from @param buf place to read data into @param lsn sector to read @param b_form2 true for reading mode 2 form 2 sectors or false for mode 2 form 1 sectors. */ driver_return_code_t cdio_read_mode2_sector (const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn, bool b_form2) { check_lsn(i_lsn); if (p_cdio->op.read_mode2_sector) return p_cdio->op.read_mode2_sector (p_cdio->env, p_buf, i_lsn, b_form2); /* fallback */ if (p_cdio->op.read_mode2_sectors != NULL) return cdio_read_mode2_sectors (p_cdio, p_buf, i_lsn, b_form2, 1); return DRIVER_OP_UNSUPPORTED; } /*! Reads mode 2 sectors @param p_cdio object to read from @param buf place to read data into @param lsn sector to read @param b_form2 true for reading mode2 form 2 sectors or false for mode 2 form 1 sectors. @param i_blocks number of sectors to read */ driver_return_code_t cdio_read_mode2_sectors (const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn, bool b_form2, uint32_t i_blocks) { check_lsn_blocks(i_lsn, i_blocks); if (0 == i_blocks) return DRIVER_OP_SUCCESS; if (p_cdio->op.read_mode2_sectors) return (p_cdio->op.read_mode2_sectors) (p_cdio->env, p_buf, i_lsn, b_form2, i_blocks); return DRIVER_OP_UNSUPPORTED; } /** The special case of reading a single block is a common one so we provide a routine for that as a convenience. */ driver_return_code_t cdio_read_sector(const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn, cdio_read_mode_t read_mode) { return cdio_read_sectors(p_cdio, p_buf, i_lsn, read_mode, 1); } /*! Reads a number of sectors (AKA blocks). @param p_buf place to read data into. The caller should make sure this location is large enough. See below for size information. @param read_mode the kind of "mode" to use in reading. @param i_lsn sector to read @param i_blocks number of sectors to read @return DRIVER_OP_SUCCESS (0) if no error, other (negative) enumerations are returned on error. If read_mode is CDIO_MODE_AUDIO, *p_buf should hold at least CDIO_FRAMESIZE_RAW * i_blocks bytes. If read_mode is CDIO_MODE_DATA, *p_buf should hold at least i_blocks times either ISO_BLOCKSIZE, M1RAW_SECTOR_SIZE or M2F2_SECTOR_SIZE depending on the kind of sector getting read. If you don't know whether you have a Mode 1/2, Form 1/ Form 2/Formless sector best to reserve space for the maximum which is M2RAW_SECTOR_SIZE. If read_mode is CDIO_MODE_M2F1, *p_buf should hold at least M2RAW_SECTOR_SIZE * i_blocks bytes. If read_mode is CDIO_MODE_M2F2, *p_buf should hold at least CDIO_CD_FRAMESIZE * i_blocks bytes. */ driver_return_code_t cdio_read_sectors(const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn, cdio_read_mode_t read_mode, uint32_t i_blocks) { switch(read_mode) { case CDIO_READ_MODE_AUDIO: return cdio_read_audio_sectors (p_cdio, p_buf, i_lsn, i_blocks); case CDIO_READ_MODE_M1F1: return cdio_read_mode1_sectors (p_cdio, p_buf, i_lsn, false, i_blocks); case CDIO_READ_MODE_M1F2: return cdio_read_mode1_sectors (p_cdio, p_buf, i_lsn, true, i_blocks); case CDIO_READ_MODE_M2F1: return cdio_read_mode2_sectors (p_cdio, p_buf, i_lsn, false, i_blocks); case CDIO_READ_MODE_M2F2: return cdio_read_mode2_sectors (p_cdio, p_buf, i_lsn, true, i_blocks); } /* Can't happen. Just to shut up gcc. */ return DRIVER_OP_ERROR; } /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/lib/driver/Makefile.am0000644000175000017500000001611011650343602014066 00000000000000# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 # Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ######################################################## # Things to make the libcdio library ######################################################## # # From libtool documentation amended with guidance from N. Boullis: # # 1. Start with version information of `0:0:0' for each libtool library. # # 2. It is probably not a good idea to update the version information # several times between public releases, but rather once per public # release. (This seems to be more an aesthetic consideration than # a hard technical one.) # # 3. If the library source code has changed at all since the last # update, then increment REVISION (`C:R:A' becomes `C:R+1:A'). # # 4. If any interfaces have been added, removed, or changed since the # last update, increment CURRENT, and set REVISION to 0. # # 5. If any interfaces have been added since the last public release, # then increment AGE. # # 6. If any interfaces have been removed or changed since the last # public release, then set AGE to 0. A changed interface means an # incompatibility with previous versions. libcdio_la_CURRENT = 13 libcdio_la_REVISION = 0 libcdio_la_AGE = 0 EXTRA_DIST = image/Makefile \ mmc/Makefile \ FreeBSD/Makefile MSWindows/Makefile \ libcdio.sym noinst_HEADERS = cdio_assert.h cdio_private.h portable.h libcdio_sources = \ _cdio_generic.c \ _cdio_stdio.c \ _cdio_stdio.h \ _cdio_stream.c \ _cdio_stream.h \ aix.c \ bsdi.c \ audio.c \ cd_types.c \ cdio.c \ cdtext.c \ cdtext_private.h \ device.c \ disc.c \ ds.c \ FreeBSD/freebsd.c \ FreeBSD/freebsd.h \ FreeBSD/freebsd_cam.c \ FreeBSD/freebsd_ioctl.c \ generic.h \ gnu_linux.c \ image.h \ image/bincue.c \ image/cdrdao.c \ image_common.c \ image_common.h \ image/nrg.c \ image/nrg.h \ logging.c \ mmc/mmc.c \ mmc/mmc_cmd_helper.h \ mmc/mmc_hl_cmds.c \ mmc/mmc_ll_cmds.c \ mmc/mmc_private.h \ mmc/mmc_util.c \ MSWindows/aspi32.c \ MSWindows/aspi32.h \ MSWindows/win32_ioctl.c \ MSWindows/win32.c \ MSWindows/win32.h \ netbsd.c \ os2.c \ osx.c \ read.c \ realpath.c \ sector.c \ solaris.c \ track.c \ utf8.c \ util.c lib_LTLIBRARIES = libcdio.la libcdio_la_LIBADD = $(LTLIBICONV) libcdio_la_SOURCES = $(libcdio_sources) libcdio_la_ldflags = -version-info $(libcdio_la_CURRENT):$(libcdio_la_REVISION):$(libcdio_la_AGE) @LT_NO_UNDEFINED@ INCLUDES = $(LIBCDIO_CFLAGS) ######################################################## # Things to version the symbols in the libraries ######################################################## # An explanation of the versioning problem from Nicolas Boullis and # the versioned symbol solution he uses below... # # Currently, libvcdinfo uses the cdio_open function from libcdio. # Let's imagine a program foobar that uses both the vcdinfo_open # function from libvcdinfo and the cdio_open function from libcdio. # Currently, libcdio has SONAME libcdio.so.0, libvcdinfo has SONAME # libvcdinfo.so.0 and requires libcdio.so.0, and foobar requires both # libvcdinfo.so.0 and libcdio.so.0. Everything looks fine. # # Now, for some reason, you decide to change the cdio_open function. # That's your right, but you have to bump the CURRENT version and (if I # understand it correctly, athough this is not that clear in libtool's # documentation) set the AGE to 0. Anyway, this bumps the SONAME, which is # sane since the interface changes incompatibly. # Now, you have a new libcdio with SONAME libcdio.so.1. But libvcdinfo and # foobar still require libcdio.so.0. Everything is still fine. # Now, after some minor changes, the author of foobar recompiles foobar. # Then, foobar now requires libvcdinfo.so.0 and libcdio.so.1. And foobar # now segfaults... # What is happening? When you run foobar, if brings both libvcdinfo.so.0 # and libcdio.so.1, but libvcdinfo.so.0 also brings libcdio.so.0. So you # have both libcdio.so.0 and libcdio.so.1 that bring their symbols to the # global namespace. Hence, you have to incompatible versions of the # cdio_open function in the name space. When foobar calls cdio_open, it # may choose the wrong function, and segfaults... # With versioned symbols, the cdio_open function from libcdio.so.0 may be # known as (something that looks like) cdio_open@@CDIO_0. An the cdio_open # function from libcdio.so.1 as cdio_open@@CDIO_1. Both versions of # libcdio would still be brought in by the most recent foobar, but foobar # (and libvcdinfo) know which versioned function to use and then use the # good one. # This is some simple versioning where every symbol is versioned with # something that looks like the SONAME of the library. More complex (and # better) versioning is possible; it is for example what is used by glibc. # But good complex versioning is something that requires much more # work... # The below is a impliments symbol versioning. First of all, I # compute MAJOR as CURENT - AGE; that is what is used within libtool # (at least on GNU/Linux systems) for the number in the SONAME. The # nm command gives the list of symbols known in each of the object # files that will be part of the shared library. And the sed command # extracts from this list those symbols that will be shared. (This sed # command comes from libtool.) libcdio_la_MAJOR = $(shell expr $(libcdio_la_CURRENT) - $(libcdio_la_AGE)) if BUILD_VERSIONED_LIBS libcdio_la_LDFLAGS = $(libcdio_la_ldflags) -Wl,--version-script=libcdio.la.ver libcdio_la_DEPENDENCIES = libcdio.la.ver libcdio.la.ver: $(libcdio_la_OBJECTS) $(srcdir)/libcdio.sym echo 'CDIO_$(libcdio_la_MAJOR) { ' > $@ objs=`for obj in $(libcdio_la_OBJECTS); do sed -ne "s/^pic_object='\(.*\)'$$/\1/p" $$obj; done`; \ if test -n "$${objs}" ; then \ nm $${objs} | sed -n -e 's/^.*[ ][ABCDGIRSTW][ABCDGIRSTW]*[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$$/\1/p' | sort -u | { first=true; while read symbol; do if grep -q "^$${symbol}\$$" $(srcdir)/libcdio.sym; then if test $$first = true; then echo " global:"; first=false; fi; echo " $${symbol};"; fi; done; } >> $@; \ nm $${objs} | sed -n -e 's/^.*[ ][ABCDGIRSTW][ABCDGIRSTW]*[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$$/\1/p' | sort -u | { first=true; while read symbol; do if grep -q "^$${symbol}\$$" $(srcdir)/libcdio.sym; then :; else if test $$first = true; then echo " local:"; first=false; fi; echo " $${symbol};"; fi; done; } >> $@; \ fi echo '};' >> $@ else libcdio_la_LDFLAGS = $(libcdio_la_ldflags) endif MOSTLYCLEANFILES = libcdio.la.ver libcdio-0.83/lib/driver/_cdio_generic.c0000644000175000017500000003235011650121702014746 00000000000000/* Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* This file contains generic implementations of device-driver routines. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #include #include #ifdef HAVE_UNISTD_H #include #endif /*HAVE_UNISTD_H*/ #include #include #include #include #include #include #include #include "cdio_assert.h" #include "cdio_private.h" #include "_cdio_stdio.h" #include "portable.h" #ifndef PATH_MAX #define PATH_MAX 4096 #endif /*! Eject media -- there's nothing to do here. We always return -2. Should we also free resources? */ int cdio_generic_unimplemented_eject_media (void *p_user_data) { /* Sort of a stub here. Perhaps log a message? */ return DRIVER_OP_UNSUPPORTED; } /*! Set the blocksize for subsequent reads. */ int cdio_generic_unimplemented_set_blocksize (void *p_user_data, uint16_t i_blocksize) { /* Sort of a stub here. Perhaps log a message? */ return DRIVER_OP_UNSUPPORTED; } /*! Set the drive speed. */ int cdio_generic_unimplemented_set_speed (void *p_user_data, int i_speed) { /* Sort of a stub here. Perhaps log a message? */ return DRIVER_OP_UNSUPPORTED; } /*! Release and free resources associated with cd. */ void cdio_generic_free (void *p_user_data) { generic_img_private_t *p_env = p_user_data; track_t i_track; if (NULL == p_env) return; if (p_env->source_name) free (p_env->source_name); if (p_env->b_cdtext_init) { for (i_track=0; i_track < p_env->i_tracks; i_track++) { cdtext_destroy(&(p_env->cdtext_track[i_track])); } } if (p_env->fd >= 0) close (p_env->fd); if (p_env->scsi_tuple != NULL) free (p_env->scsi_tuple); free (p_env); } /*! Initialize CD device. */ bool cdio_generic_init (void *user_data, int open_flags) { generic_img_private_t *p_env = user_data; if (p_env->init) { cdio_warn ("init called more than once"); return false; } p_env->fd = open (p_env->source_name, open_flags, 0); if (p_env->fd < 0) { cdio_warn ("open (%s): %s", p_env->source_name, strerror (errno)); return false; } p_env->init = true; p_env->toc_init = false; p_env->b_cdtext_init = false; p_env->b_cdtext_error = false; p_env->i_joliet_level = 0; /* Assume no Joliet extensions initally */ return true; } /*! Reads a single form1 sector from cd device into data starting from lsn. */ driver_return_code_t cdio_generic_read_form1_sector (void * user_data, void *data, lsn_t lsn) { if (0 > cdio_generic_lseek(user_data, CDIO_CD_FRAMESIZE*lsn, SEEK_SET)) return DRIVER_OP_ERROR; return cdio_generic_read(user_data, data, CDIO_CD_FRAMESIZE); } /*! Reads into buf the next size bytes. Returns -1 on error. Is in fact libc's lseek(). */ off_t cdio_generic_lseek (void *user_data, off_t offset, int whence) { generic_img_private_t *p_env = user_data; return lseek(p_env->fd, offset, whence); } /*! Reads into buf the next size bytes. Returns -1 on error. Is in fact libc's read(). */ ssize_t cdio_generic_read (void *user_data, void *buf, size_t size) { generic_img_private_t *p_env = user_data; return read(p_env->fd, buf, size); } /*! Release and free resources associated with stream or disk image. */ void cdio_generic_stdio_free (void *p_user_data) { generic_img_private_t *p_env = p_user_data; if (NULL == p_env) return; if (NULL != p_env->source_name) free (p_env->source_name); if (p_env->data_source) cdio_stdio_destroy (p_env->data_source); } /*! Return true if source_name could be a device containing a CD-ROM. */ bool cdio_is_device_generic(const char *source_name) { struct stat buf; if (0 != stat(source_name, &buf)) { cdio_warn ("Can't get file status for %s:\n%s", source_name, strerror(errno)); return false; } return (S_ISBLK(buf.st_mode) || S_ISCHR(buf.st_mode)); } /*! Like above, but don't give a warning device doesn't exist. */ bool cdio_is_device_quiet_generic(const char *source_name) { struct stat buf; if (0 != stat(source_name, &buf)) { return false; } return (S_ISBLK(buf.st_mode) || S_ISCHR(buf.st_mode)); } /*! Add/allocate a drive to the end of drives. Use cdio_free_device_list() to free this device_list. */ void cdio_add_device_list(char **device_list[], const char *drive, unsigned int *num_drives) { if (NULL != drive) { unsigned int j; char real_device_1[PATH_MAX]; char real_device_2[PATH_MAX]; cdio_realpath(drive, real_device_1); /* Check if drive is already in list. */ for (j=0; j<*num_drives; j++) { cdio_realpath((*device_list)[j], real_device_2); if (strcmp(real_device_1, real_device_2) == 0) break; } if (j==*num_drives) { /* Drive not in list. Add it. */ (*num_drives)++; *device_list = realloc(*device_list, (*num_drives) * sizeof(char *)); (*device_list)[*num_drives-1] = strdup(drive); } } else { (*num_drives)++; if (*device_list) { *device_list = realloc(*device_list, (*num_drives) * sizeof(char *)); } else { *device_list = malloc((*num_drives) * sizeof(char *)); } (*device_list)[*num_drives-1] = NULL; } } /* Get cdtext information in p_user_data for track i_track. For disc information i_track is 0. Return the CD-TEXT or NULL if obj is NULL, CD-TEXT information does not exist, or we don't know how to get this implemented. */ cdtext_t * get_cdtext_generic (void *p_user_data, track_t i_track) { generic_img_private_t *p_env = p_user_data; if (!p_env) return NULL; if (!p_env->toc_init) p_env->cdio->op.read_toc (p_user_data); if ( (0 != i_track && i_track >= p_env->i_tracks+p_env->i_first_track ) ) return NULL; if (!p_env->b_cdtext_init) init_cdtext_generic(p_env); if (!p_env->b_cdtext_init) return NULL; if (0 == i_track) return &(p_env->cdtext); else return &(p_env->cdtext_track[i_track-p_env->i_first_track]); } /*! Get disc type associated with cd object. */ discmode_t get_discmode_generic (void *p_user_data ) { generic_img_private_t *p_env = p_user_data; /* See if this is a DVD. */ cdio_dvd_struct_t dvd; /* DVD READ STRUCT for layer 0. */ dvd.physical.type = CDIO_DVD_STRUCT_PHYSICAL; dvd.physical.layer_num = 0; if (0 == mmc_get_dvd_struct_physical (p_env->cdio, &dvd)) { switch(dvd.physical.layer[0].book_type) { case CDIO_DVD_BOOK_DVD_ROM: return CDIO_DISC_MODE_DVD_ROM; case CDIO_DVD_BOOK_DVD_RAM: return CDIO_DISC_MODE_DVD_RAM; case CDIO_DVD_BOOK_DVD_R: return CDIO_DISC_MODE_DVD_R; case CDIO_DVD_BOOK_DVD_RW: return CDIO_DISC_MODE_DVD_RW; case CDIO_DVD_BOOK_HD_DVD_ROM: return CDIO_DISC_MODE_HD_DVD_ROM; case CDIO_DVD_BOOK_HD_DVD_RAM: return CDIO_DISC_MODE_HD_DVD_RAM; case CDIO_DVD_BOOK_HD_DVD_R: return CDIO_DISC_MODE_HD_DVD_R; case CDIO_DVD_BOOK_DVD_PR: return CDIO_DISC_MODE_DVD_PR; case CDIO_DVD_BOOK_DVD_PRW: return CDIO_DISC_MODE_DVD_PRW; case CDIO_DVD_BOOK_DVD_PRW_DL: return CDIO_DISC_MODE_DVD_PRW_DL; case CDIO_DVD_BOOK_DVD_PR_DL: return CDIO_DISC_MODE_DVD_PR_DL; default: return CDIO_DISC_MODE_DVD_OTHER; } } return get_discmode_cd_generic(p_user_data); } /*! Get disc type associated with cd object. */ discmode_t get_discmode_cd_generic (void *p_user_data ) { generic_img_private_t *p_env = p_user_data; track_t i_track; discmode_t discmode=CDIO_DISC_MODE_NO_INFO; if (!p_env->toc_init) p_env->cdio->op.read_toc (p_user_data); if (!p_env->toc_init) return CDIO_DISC_MODE_NO_INFO; for (i_track = p_env->i_first_track; i_track < p_env->i_first_track + p_env->i_tracks ; i_track ++) { track_format_t track_fmt = p_env->cdio->op.get_track_format(p_env, i_track); switch(track_fmt) { case TRACK_FORMAT_AUDIO: switch(discmode) { case CDIO_DISC_MODE_NO_INFO: discmode = CDIO_DISC_MODE_CD_DA; break; case CDIO_DISC_MODE_CD_DA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_ERROR: /* No change*/ break; default: discmode = CDIO_DISC_MODE_CD_MIXED; } break; case TRACK_FORMAT_XA: switch(discmode) { case CDIO_DISC_MODE_NO_INFO: discmode = CDIO_DISC_MODE_CD_XA; break; case CDIO_DISC_MODE_CD_XA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_ERROR: /* No change*/ break; default: discmode = CDIO_DISC_MODE_CD_MIXED; } break; case TRACK_FORMAT_CDI: case TRACK_FORMAT_DATA: switch(discmode) { case CDIO_DISC_MODE_NO_INFO: discmode = CDIO_DISC_MODE_CD_DATA; break; case CDIO_DISC_MODE_CD_DATA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_ERROR: /* No change*/ break; default: discmode = CDIO_DISC_MODE_CD_MIXED; } break; case TRACK_FORMAT_ERROR: default: discmode = CDIO_DISC_MODE_ERROR; } } return discmode; } /*! Return the number of of the first track. CDIO_INVALID_TRACK is returned on error. */ track_t get_first_track_num_generic(void *p_user_data) { const generic_img_private_t *p_env = p_user_data; if (!p_env->toc_init) p_env->cdio->op.read_toc (p_user_data); return p_env->toc_init ? p_env->i_first_track : CDIO_INVALID_TRACK; } /*! Return the number of tracks in the current medium. */ track_t get_num_tracks_generic(void *p_user_data) { generic_img_private_t *p_env = p_user_data; if (!p_env->toc_init) p_env->cdio->op.read_toc (p_user_data); return p_env->toc_init ? p_env->i_tracks : CDIO_INVALID_TRACK; } void set_cdtext_field_generic(void *p_user_data, track_t i_track, track_t i_first_track, cdtext_field_t e_field, const char *psz_value) { char **pp_field; generic_img_private_t *p_env = p_user_data; if( i_track == 0 ) pp_field = &(p_env->cdtext.field[e_field]); else pp_field = &(p_env->cdtext_track[i_track-i_first_track].field[e_field]); if (*pp_field) free(*pp_field); *pp_field = (psz_value) ? strdup(psz_value) : NULL; } /*! Read CD-Text information for a CdIo_t object . return true on success, false on error or CD-Text information does not exist. */ bool init_cdtext_generic (generic_img_private_t *p_env) { return mmc_init_cdtext_private( p_env, p_env->cdio->op.run_mmc_cmd, set_cdtext_field_generic ); } /*! Return number of channels in track: 2 or 4; -2 if not implemented or -1 for error. Not meaningful if track is not an audio track. */ int get_track_channels_generic(const void *p_user_data, track_t i_track) { const generic_img_private_t *p_env = p_user_data; return p_env->track_flags[i_track].channels; } /*! Return 1 if copy is permitted on the track, 0 if not, or -1 for error. Is this meaningful if not an audio track? */ track_flag_t get_track_copy_permit_generic(void *p_user_data, track_t i_track) { const generic_img_private_t *p_env = p_user_data; return p_env->track_flags[i_track].copy_permit; } /*! Return 1 if track has pre-emphasis, 0 if not, or -1 for error. Is this meaningful if not an audio track? pre-emphasis is a non linear frequency response. */ track_flag_t get_track_preemphasis_generic(const void *p_user_data, track_t i_track) { const generic_img_private_t *p_env = p_user_data; return p_env->track_flags[i_track].preemphasis; } void set_track_flags(track_flags_t *p_track_flag, uint8_t i_flag) { p_track_flag->preemphasis = ( i_flag & CDIO_TRACK_FLAG_PRE_EMPHASIS ) ? CDIO_TRACK_FLAG_TRUE : CDIO_TRACK_FLAG_FALSE; p_track_flag->copy_permit = ( i_flag & CDIO_TRACK_FLAG_COPY_PERMITTED ) ? CDIO_TRACK_FLAG_TRUE : CDIO_TRACK_FLAG_FALSE; p_track_flag->channels = ( i_flag & CDIO_TRACK_FLAG_FOUR_CHANNEL_AUDIO ) ? 4 : 2; } driver_return_code_t read_data_sectors_generic (void *p_user_data, void *p_buf, lsn_t i_lsn, uint16_t i_blocksize, uint32_t i_blocks) { int rc; if (0 > cdio_generic_lseek(p_user_data, i_blocksize*i_lsn, SEEK_SET)) return DRIVER_OP_ERROR; rc = cdio_generic_read(p_user_data, p_buf, i_blocksize*i_blocks); if (rc > 0) return DRIVER_OP_SUCCESS; return DRIVER_OP_ERROR; } /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/lib/driver/generic.h0000644000175000017500000001763711317231536013640 00000000000000/* Copyright (C) 2004, 2005, 2006, 2008, 2009 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Internal routines for CD I/O drivers. */ #ifndef __CDIO_GENERIC_H__ #define __CDIO_GENERIC_H__ #if defined(HAVE_CONFIG_H) && !defined(LIBCDIO_CONFIG_H) # include "config.h" #endif #include #include #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /*! Things common to private device structures. Even though not all devices may have some of these fields, by listing common ones we facilitate writing generic routines and even cut-and-paste code. */ typedef struct { char *source_name; /**< Name used in open. */ bool init; /**< True if structure has been initialized */ bool toc_init; /**< True if TOC read in */ bool b_cdtext_init; /**< True if CD-Text read in */ bool b_cdtext_error; /**< True if trouble reading CD-Text */ int ioctls_debugged; /**< for debugging */ /* Only one of data_source or fd is used; fd is for CD-ROM devices and the data_source for stream reading (bincue, nrg, toc, network). */ CdioDataSource_t *data_source; int fd; /**< File descriptor of device */ track_t i_first_track; /**< The starting track number. */ track_t i_tracks; /**< The number of tracks. */ uint8_t i_joliet_level; /**< 0 = no Joliet extensions. 1-3: Joliet level. */ iso9660_pvd_t pvd; iso9660_svd_t svd; CdIo_t *cdio; /**< a way to call general cdio routines. */ cdtext_t cdtext; /**< CD-Text for disc. */ cdtext_t cdtext_track[CDIO_CD_MAX_TRACKS+1]; /**< CD-TEXT for each track*/ track_flags_t track_flags[CDIO_CD_MAX_TRACKS+1]; /* Memorized sense reply of the most recent SCSI command. Recorded by driver implementations of cdio_funcs_t.run_mmc_cmd(). Read by API function mmc_get_cmd_scsi_sense(). */ unsigned char scsi_mmc_sense[263]; /* See SPC-3 4.5.3 : 252 bytes legal but 263 bytes possible */ int scsi_mmc_sense_valid; /* Number of valid sense bytes */ /* Memorized eventual system specific SCSI address tuple text. Empty text means that there is no such text defined for the drive. NULL means that the driver does not support "scsi-tuple". To be read by cdio_get_arg("scsi-tuple"). System specific suffixes to the key may demand and eventually guarantee a further specified format. E.g. "scsi-tuple-linux" guarantees either "Bus,Host,Channel,Target,Lun", or empty text, or NULL. No other forms. */ char *scsi_tuple; } generic_img_private_t; /*! Bogus eject media when there is no ejectable media, e.g. a disk image We always return 2. Should we also free resources? */ driver_return_code_t cdio_generic_unimplemented_eject_media (void *p_env); /*! Set the blocksize for subsequent reads. @return -2 since it's not implemented. */ driver_return_code_t cdio_generic_unimplemented_set_blocksize (void *p_user_data, uint16_t i_blocksize); /*! Set the drive speed. @return -2 since it's not implemented. */ driver_return_code_t cdio_generic_unimplemented_set_speed (void *p_user_data, int i_speed); /*! Release and free resources associated with cd. */ void cdio_generic_free (void *p_env); /*! Initialize CD device. */ bool cdio_generic_init (void *p_env, int open_mode); /*! Reads into buf the next size bytes. Returns -1 on error. Is in fact libc's read(). */ off_t cdio_generic_lseek (void *p_env, off_t offset, int whence); /*! Reads into buf the next size bytes. Returns -1 on error. Is in fact libc's read(). */ ssize_t cdio_generic_read (void *p_env, void *p_buf, size_t size); /*! Reads a single form1 sector from cd device into data starting from lsn. Returns 0 if no error. */ int cdio_generic_read_form1_sector (void * user_data, void *data, lsn_t lsn); /*! Release and free resources associated with stream or disk image. */ void cdio_generic_stdio_free (void *env); /*! Return true if source_name could be a device containing a CD-ROM on Win32 */ bool cdio_is_device_win32(const char *source_name); /*! Return true if source_name could be a device containing a CD-ROM on OS/2 */ bool cdio_is_device_os2(const char *source_name); /*! Return true if source_name could be a device containing a CD-ROM on most Unix servers with block and character devices. */ bool cdio_is_device_generic(const char *source_name); /*! Like above, but don't give a warning device doesn't exist. */ bool cdio_is_device_quiet_generic(const char *source_name); /*! Get cdtext information for a CdIo object . @param obj the CD object that may contain CD-TEXT information. @return the CD-TEXT object or NULL if obj is NULL or CD-TEXT information does not exist. */ cdtext_t *get_cdtext_generic (void *p_user_data, track_t i_track); /*! Return the number of of the first track. CDIO_INVALID_TRACK is returned on error. */ track_t get_first_track_num_generic(void *p_user_data); /*! Return the number of tracks in the current medium. */ track_t get_num_tracks_generic(void *p_user_data); /*! Get disc type associated with cd object. */ discmode_t get_discmode_generic (void *p_user_data ); /*! Same as above but only handles CD cases */ discmode_t get_discmode_cd_generic (void *p_user_data ); /*! Return number of channels in track: 2 or 4; -2 if not implemented or -1 for error. Not meaningful if track is not an audio track. */ int get_track_channels_generic(const void *p_user_data, track_t i_track); /*! Return 1 if copy is permitted on the track, 0 if not, or -1 for error. Is this meaningful if not an audio track? */ track_flag_t get_track_copy_permit_generic(void *p_user_data, track_t i_track); /*! Return 1 if track has pre-emphasis, 0 if not, or -1 for error. Is this meaningful if not an audio track? pre-emphasis is a non linear frequency response. */ track_flag_t get_track_preemphasis_generic(const void *p_user_data, track_t i_track); void set_cdtext_field_generic(void *user_data, track_t i_track, track_t i_first_track, cdtext_field_t e_field, const char *psz_value); /*! Read cdtext information for a CdIo object . return true on success, false on error or CD-Text information does not exist. */ bool init_cdtext_generic (generic_img_private_t *p_env); void set_track_flags(track_flags_t *p_track_flag, uint8_t flag); /*! Read mode 1 or mode2 sectors (using cooked mode). */ driver_return_code_t read_data_sectors_generic (void *p_user_data, void *p_buf, lsn_t i_lsn, uint16_t i_blocksize, uint32_t i_blocks); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __CDIO_GENERIC_H__ */ /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/lib/driver/disc.c0000644000175000017500000000543511650122357013132 00000000000000/* Copyright (C) 2003, 2004, 2005, 2008, 2011 Rocky Bernstein Copyright (C) 2001 Herbert Valerio Riedel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include "cdio_private.h" /* Must match discmode enumeration */ const char *discmode2str[] = { "CD-DA", "CD-DATA (Mode 1)", "CD DATA (Mode 2)", "CD-ROM Mixed", "DVD-ROM", "DVD-RAM", "DVD-R", "DVD-RW", "HD DVD ROM", "HD_DVD RAM", "HD DVD-R", "DVD+R", "DVD+RW", "DVD+RW DL", "DVD+R DL", "Unknown/unclassified DVD", "No information", "Error in getting information", "CD-i" }; /*! Get the size of the CD in logical block address (LBA) units. @param p_cdio the CD object queried @return the lsn. On error 0 or CDIO_INVALD_LSN. */ lsn_t cdio_get_disc_last_lsn(const CdIo_t *p_cdio) { if (!p_cdio) return CDIO_INVALID_LSN; return p_cdio->op.get_disc_last_lsn (p_cdio->env); } /*! Get medium associated with cd_obj. */ discmode_t cdio_get_discmode (CdIo_t *cd_obj) { if (!cd_obj) return CDIO_DISC_MODE_ERROR; if (cd_obj->op.get_discmode) { return cd_obj->op.get_discmode (cd_obj->env); } else { return CDIO_DISC_MODE_NO_INFO; } } /*! Return a string containing the name of the driver in use. if CdIo is NULL (we haven't initialized a specific device driver), then return NULL. */ char * cdio_get_mcn (const CdIo_t *p_cdio) { if (p_cdio->op.get_mcn) { return p_cdio->op.get_mcn (p_cdio->env); } else { return NULL; } } bool cdio_is_discmode_cdrom(discmode_t discmode) { switch (discmode) { case CDIO_DISC_MODE_CD_DA: case CDIO_DISC_MODE_CD_DATA: case CDIO_DISC_MODE_CD_XA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_NO_INFO: return true; default: return false; } } bool cdio_is_discmode_dvd(discmode_t discmode) { switch (discmode) { case CDIO_DISC_MODE_DVD_ROM: case CDIO_DISC_MODE_DVD_RAM: case CDIO_DISC_MODE_DVD_R: case CDIO_DISC_MODE_DVD_RW: case CDIO_DISC_MODE_DVD_PR: case CDIO_DISC_MODE_DVD_PRW: case CDIO_DISC_MODE_DVD_OTHER: return true; default: return false; } } libcdio-0.83/lib/driver/track.c0000644000175000017500000002263411650123420013304 00000000000000/* Copyright (C) 2003, 2004, 2005, 2008, 2011 Rocky Bernstein Copyright (C) 2001 Herbert Valerio Riedel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /*! Track-related routines. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include "cdio_private.h" const char *track_format2str[6] = { "audio", "CD-i", "XA", "data", "PSX", "error" }; /* Variables to hold debugger-helping enumerations */ enum cdio_track_enums; /*! Return the number of the first track. CDIO_INVALID_TRACK is returned on error. */ track_t cdio_get_first_track_num (const CdIo_t *p_cdio) { if (NULL == p_cdio) return CDIO_INVALID_TRACK; if (p_cdio->op.get_first_track_num) { return p_cdio->op.get_first_track_num (p_cdio->env); } else { return CDIO_INVALID_TRACK; } } /*! Return the last track number. CDIO_INVALID_TRACK is returned on error. */ track_t cdio_get_last_track_num (const CdIo_t *p_cdio) { if (NULL == p_cdio) return CDIO_INVALID_TRACK; { const track_t i_first_track = cdio_get_first_track_num(p_cdio); if ( CDIO_INVALID_TRACK != i_first_track ) { const track_t i_tracks = cdio_get_num_tracks(p_cdio); if ( CDIO_INVALID_TRACK != i_tracks ) return i_first_track + i_tracks - 1; } return CDIO_INVALID_TRACK; } } /*! Return number of channels in track: 2 or 4; -2 if not implemented or -1 for error. Not meaningful if track is not an audio track. */ int cdio_get_track_channels(const CdIo_t *p_cdio, track_t i_track) { if (p_cdio->op.get_track_channels) { return p_cdio->op.get_track_channels (p_cdio->env, i_track); } else { return -2; } } /*! Return copy protection status on a track. Is this meaningful if not an audio track? */ track_flag_t cdio_get_track_copy_permit(const CdIo_t *p_cdio, track_t i_track) { if (p_cdio->op.get_track_copy_permit) { return p_cdio->op.get_track_copy_permit (p_cdio->env, i_track); } else { return CDIO_TRACK_FLAG_UNKNOWN; } } /*! Get format of track. */ track_format_t cdio_get_track_format(const CdIo_t *p_cdio, track_t i_track) { if (!p_cdio) return TRACK_FORMAT_ERROR; if (p_cdio->op.get_track_format) { return p_cdio->op.get_track_format (p_cdio->env, i_track); } else { return TRACK_FORMAT_ERROR; } } /*! Return the Joliet level recognized for p_cdio. */ uint8_t cdio_get_joliet_level(const CdIo_t *p_cdio) { if (!p_cdio) return 0; { const generic_img_private_t *p_env = (generic_img_private_t *) (p_cdio->env); return p_env->i_joliet_level; } } /*! Return the number of tracks in the current medium. CDIO_INVALID_TRACK is returned on error. */ track_t cdio_get_num_tracks (const CdIo_t *p_cdio) { if (p_cdio == NULL) return CDIO_INVALID_TRACK; if (p_cdio->op.get_num_tracks) { return p_cdio->op.get_num_tracks (p_cdio->env); } else { return CDIO_INVALID_TRACK; } } /*! Find the track which contans lsn. CDIO_INVALID_TRACK is returned if the lsn outside of the CD or if there was some error. If the lsn is before the pregap of the first track 0 is returned. Otherwise we return the track that spans the lsn. */ track_t cdio_get_track(const CdIo_t *p_cdio, lsn_t lsn) { if (!p_cdio) return CDIO_INVALID_TRACK; { track_t i_low_track = cdio_get_first_track_num(p_cdio); track_t i_high_track = cdio_get_last_track_num(p_cdio)+1; /* LEADOUT */ if (CDIO_INVALID_TRACK == i_low_track || CDIO_INVALID_TRACK == i_high_track ) return CDIO_INVALID_TRACK; if (lsn < cdio_get_track_lsn(p_cdio, i_low_track)) return 0; /* We're in the pre-gap of first track */ if (lsn > cdio_get_track_lsn(p_cdio, i_high_track)) return CDIO_INVALID_TRACK; /* We're beyond the end. */ do { const track_t i_mid = (i_low_track + i_high_track) / 2; const lsn_t i_mid_lsn = cdio_get_track_lsn(p_cdio, i_mid); if (lsn <= i_mid_lsn) i_high_track = i_mid - 1; if (lsn >= i_mid_lsn) i_low_track = i_mid + 1; } while ( i_low_track <= i_high_track ); return (i_low_track > i_high_track + 1) ? i_high_track + 1 : i_high_track; } } /*! Return true if we have XA data (green, mode2 form1) or XA data (green, mode2 form2). That is track begins: sync - header - subheader 12 4 - 8 FIXME: there's gotta be a better design for this and get_track_format? */ bool cdio_get_track_green(const CdIo_t *p_cdio, track_t i_track) { if (p_cdio == NULL) { return false; } if (p_cdio->op.get_track_green) { return p_cdio->op.get_track_green (p_cdio->env, i_track); } else { return false; } } /*! Return the starting LBA for track number track_num in cdio. Tracks numbers start at 1. The "leadout" track is specified either by using track_num LEADOUT_TRACK or the total tracks+1. CDIO_INVALID_LBA is returned on error. */ lba_t cdio_get_track_lba(const CdIo_t *p_cdio, track_t i_track) { if (!p_cdio) return CDIO_INVALID_LBA; if (p_cdio->op.get_track_lba) { return p_cdio->op.get_track_lba (p_cdio->env, i_track); } else { msf_t msf; if (p_cdio->op.get_track_msf) if (cdio_get_track_msf(p_cdio, i_track, &msf)) return cdio_msf_to_lba(&msf); return CDIO_INVALID_LBA; } } /*! Return the starting LSN for track number i_track in cdio. Tracks numbers start at 1. The "leadout" track is specified either by using i_track LEADOUT_TRACK or the total tracks+1. CDIO_INVALID_LSN is returned on error. */ lsn_t cdio_get_track_lsn(const CdIo_t *p_cdio, track_t i_track) { if (p_cdio == NULL) return CDIO_INVALID_LSN; if (p_cdio->op.get_track_lba) { return cdio_lba_to_lsn(p_cdio->op.get_track_lba (p_cdio->env, i_track)); } else { msf_t msf; if (cdio_get_track_msf(p_cdio, i_track, &msf)) return cdio_msf_to_lsn(&msf); return CDIO_INVALID_LSN; } } /*! Return the International Standard Recording Code (ISRC) for track number i_track in p_cdio. Track numbers start at 1. Note: string is malloc'd so caller has to free() the returned string when done with it. */ char * cdio_get_track_isrc (const CdIo_t *p_cdio, track_t i_track) { if (p_cdio == NULL) return NULL; if (p_cdio->op.get_track_isrc) { return p_cdio->op.get_track_isrc (p_cdio->env, i_track); } else { return NULL; } } /*! Return the starting LBA for the pregap for track number i_track in cdio. Track numbers start at 1. CDIO_INVALID_LBA is returned on error. */ lba_t cdio_get_track_pregap_lba(const CdIo_t *p_cdio, track_t i_track) { if (p_cdio == NULL) return CDIO_INVALID_LBA; if (p_cdio->op.get_track_pregap_lba) { return p_cdio->op.get_track_pregap_lba (p_cdio->env, i_track); } else { return CDIO_INVALID_LBA; } } /*! Return the starting LSN for the pregap for track number i_track in cdio. Track numbers start at 1. CDIO_INVALID_LSN is returned on error. */ lsn_t cdio_get_track_pregap_lsn(const CdIo_t *p_cdio, track_t i_track) { return cdio_lba_to_lsn(cdio_get_track_pregap_lba(p_cdio, i_track)); } /*! Return the ending LSN for track number i_track in cdio. CDIO_INVALID_LSN is returned on error. */ lsn_t cdio_get_track_last_lsn(const CdIo_t *p_cdio, track_t i_track) { lsn_t lsn = cdio_get_track_lsn(p_cdio, i_track+1); if (CDIO_INVALID_LSN == lsn) return CDIO_INVALID_LSN; /* Safe, we've always the leadout. */ return lsn - 1; } /*! Return the starting MSF (minutes/secs/frames) for track number i_track in cdio. Track numbers start at 1. The "leadout" track is specified either by using i_track LEADOUT_TRACK or the total tracks+1. False is returned if there is no track entry. */ bool cdio_get_track_msf(const CdIo_t *p_cdio, track_t i_track, /*out*/ msf_t *msf) { if (!p_cdio) return false; if (p_cdio->op.get_track_msf) { return p_cdio->op.get_track_msf (p_cdio->env, i_track, msf); } else if (p_cdio->op.get_track_lba) { lba_t lba = p_cdio->op.get_track_lba (p_cdio->env, i_track); if (lba == CDIO_INVALID_LBA) return false; cdio_lba_to_msf(lba, msf); return true; } else { return false; } } /*! Return copy protection status on a track. Is this meaningful if not an audio track? */ track_flag_t cdio_get_track_preemphasis(const CdIo *p_cdio, track_t i_track) { if (p_cdio->op.get_track_preemphasis) { return p_cdio->op.get_track_preemphasis (p_cdio->env, i_track); } else { return CDIO_TRACK_FLAG_UNKNOWN; } } /*! Return the number of sectors between this track an the next. This includes any pregap sectors before the start of the next track. Tracks start at 1. 0 is returned if there is an error. */ unsigned int cdio_get_track_sec_count(const CdIo_t *p_cdio, track_t i_track) { const track_t i_tracks = cdio_get_num_tracks(p_cdio); if (i_track >=1 && i_track <= i_tracks) return ( cdio_get_track_lba(p_cdio, i_track+1) - cdio_get_track_lba(p_cdio, i_track) ); return 0; } libcdio-0.83/lib/driver/util.c0000644000175000017500000000534411650123525013162 00000000000000/* Copyright (C) 2003, 2004, 2005, 2008, 2009, 2010, 2011 Rocky Bernstein Copyright (C) 2000 Herbert Valerio Riedel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #ifdef HAVE_STDLIB_H #include #endif #include #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_INTTYPES_H #include "inttypes.h" #endif #include "cdio_assert.h" #include #include #include size_t _cdio_strlenv(char **str_array) { size_t n = 0; cdio_assert (str_array != NULL); while(str_array[n]) n++; return n; } void _cdio_strfreev(char **strv) { int n; cdio_assert (strv != NULL); for(n = 0; strv[n]; n++) free(strv[n]); free(strv); } char ** _cdio_strsplit(const char str[], char delim) /* fixme -- non-reentrant */ { int n; char **strv = NULL; char *_str, *p; char _delim[2] = { 0, 0 }; cdio_assert (str != NULL); _str = strdup(str); _delim[0] = delim; cdio_assert (_str != NULL); n = 1; p = _str; while(*p) if (*(p++) == delim) n++; strv = calloc (1, sizeof (char *) * (n+1)); n = 0; while((p = strtok(n ? NULL : _str, _delim)) != NULL) strv[n++] = strdup(p); free(_str); return strv; } void * _cdio_memdup (const void *mem, size_t count) { void *new_mem = NULL; if (mem) { new_mem = calloc (1, count); memcpy (new_mem, mem, count); } return new_mem; } char * _cdio_strdup_upper (const char str[]) { char *new_str = NULL; if (str) { char *p; p = new_str = strdup (str); while (*p) { *p = toupper (*p); p++; } } return new_str; } uint8_t cdio_to_bcd8 (uint8_t n) { /*cdio_assert (n < 100);*/ return ((n/10)<<4) | (n%10); } uint8_t cdio_from_bcd8(uint8_t p) { return (0xf & p)+(10*(p >> 4)); } const char *cdio_version_string = CDIO_VERSION; const unsigned int libcdio_version_num = LIBCDIO_VERSION_NUM; /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/lib/driver/ds.c0000644000175000017500000001143411650122412012602 00000000000000/* Copyright (C) 2005, 2008, 2011 Rocky Bernstein Copyright (C) 2000 Herbert Valerio Riedel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #include #include #include #include "cdio_assert.h" static const char _rcsid[] = "$Id: ds.c,v 1.4 2008/04/22 15:29:12 karl Exp $"; struct _CdioList { unsigned length; CdioListNode_t *begin; CdioListNode_t *end; }; struct _CdioListNode { CdioList_t *list; CdioListNode_t *next; void *data; }; /* impl */ CdioList_t * _cdio_list_new (void) { CdioList_t *p_new_obj = calloc (1, sizeof (CdioList_t)); return p_new_obj; } void _cdio_list_free (CdioList_t *p_list, int free_data) { while (_cdio_list_length (p_list)) _cdio_list_node_free (_cdio_list_begin (p_list), free_data); free (p_list); } unsigned _cdio_list_length (const CdioList_t *p_list) { cdio_assert (p_list != NULL); return p_list->length; } void _cdio_list_prepend (CdioList_t *p_list, void *p_data) { CdioListNode_t *p_new_node; cdio_assert (p_list != NULL); p_new_node = calloc (1, sizeof (CdioListNode_t)); p_new_node->list = p_list; p_new_node->next = p_list->begin; p_new_node->data = p_data; p_list->begin = p_new_node; if (p_list->length == 0) p_list->end = p_new_node; p_list->length++; } void _cdio_list_append (CdioList_t *p_list, void *p_data) { cdio_assert (p_list != NULL); if (p_list->length == 0) { _cdio_list_prepend (p_list, p_data); } else { CdioListNode_t *p_new_node = calloc (1, sizeof (CdioListNode_t)); p_new_node->list = p_list; p_new_node->next = NULL; p_new_node->data = p_data; p_list->end->next = p_new_node; p_list->end = p_new_node; p_list->length++; } } void _cdio_list_foreach (CdioList_t *p_list, _cdio_list_iterfunc_t func, void *p_user_data) { CdioListNode_t *node; cdio_assert (p_list != NULL); cdio_assert (func != 0); for (node = _cdio_list_begin (p_list); node != NULL; node = _cdio_list_node_next (node)) func (_cdio_list_node_data (node), p_user_data); } CdioListNode_t * _cdio_list_find (CdioList_t *p_list, _cdio_list_iterfunc_t cmp_func, void *p_user_data) { CdioListNode_t *p_node; cdio_assert (p_list != NULL); cdio_assert (cmp_func != 0); for (p_node = _cdio_list_begin (p_list); p_node != NULL; p_node = _cdio_list_node_next (p_node)) if (cmp_func (_cdio_list_node_data (p_node), p_user_data)) break; return p_node; } CdioListNode_t * _cdio_list_begin (const CdioList_t *p_list) { cdio_assert (p_list != NULL); return p_list->begin; } CdioListNode_t * _cdio_list_end (CdioList_t *p_list) { cdio_assert (p_list != NULL); return p_list->end; } CdioListNode_t * _cdio_list_node_next (CdioListNode_t *p_node) { if (p_node) return p_node->next; return NULL; } void _cdio_list_node_free (CdioListNode_t *p_node, int free_data) { CdioList_t *p_list; CdioListNode_t *prev_node; cdio_assert (p_node != NULL); p_list = p_node->list; cdio_assert (_cdio_list_length (p_list) > 0); if (free_data) free (_cdio_list_node_data (p_node)); if (_cdio_list_length (p_list) == 1) { cdio_assert (p_list->begin == p_list->end); p_list->end = p_list->begin = NULL; p_list->length = 0; free (p_node); return; } cdio_assert (p_list->begin != p_list->end); if (p_list->begin == p_node) { p_list->begin = p_node->next; free (p_node); p_list->length--; return; } for (prev_node = p_list->begin; prev_node->next; prev_node = prev_node->next) if (prev_node->next == p_node) break; cdio_assert (prev_node->next != NULL); if (p_list->end == p_node) p_list->end = prev_node; prev_node->next = p_node->next; p_list->length--; free (p_node); } void * _cdio_list_node_data (CdioListNode_t *p_node) { if (p_node) return p_node->data; return NULL; } /* eof */ /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/lib/driver/utf8.c0000644000175000017500000001134411650123500013061 00000000000000/* Copyright (C) 2006, 2008 Burkhard Plaum Copyright (C) 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* UTF-8 support */ #ifdef HAVE_CONFIG_H # define __CDIO_CONFIG_H__ 1 # include "config.h" #endif #ifdef HAVE_JOLIET #ifdef HAVE_STRING_H # include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_ICONV # include #endif #ifdef HAVE_ERRNO_H #include #endif #include #include struct cdio_charset_coverter_s { iconv_t ic; }; cdio_charset_coverter_t * cdio_charset_converter_create(const char * src_charset, const char * dst_charset) { cdio_charset_coverter_t * ret; ret = calloc(1, sizeof(*ret)); ret->ic = iconv_open(dst_charset, src_charset); return ret; } #if 0 static void bgav_hexdump(uint8_t * data, int len, int linebreak) { int i; int bytes_written = 0; int imax; while(bytes_written < len) { imax = (bytes_written + linebreak > len) ? len - bytes_written : linebreak; for(i = 0; i < imax; i++) fprintf(stderr, "%02x ", data[bytes_written + i]); for(i = imax; i < linebreak; i++) fprintf(stderr, " "); for(i = 0; i < imax; i++) { if(!(data[bytes_written + i] & 0x80) && (data[bytes_written + i] >= 32)) fprintf(stderr, "%c", data[bytes_written + i]); else fprintf(stderr, "."); } bytes_written += imax; fprintf(stderr, "\n"); } } #endif void cdio_charset_converter_destroy(cdio_charset_coverter_t*cnv) { iconv_close(cnv->ic); free(cnv); } #define BYTES_INCREMENT 16 static bool do_convert(iconv_t cd, char * src, int src_len, char ** dst, int *dst_len) { char * ret; char *inbuf; char *outbuf; int alloc_size; int output_pos; size_t inbytesleft; size_t outbytesleft; if(src_len < 0) src_len = strlen(src); #if 0 fprintf(stderr, "Converting:\n"); bgav_hexdump(src, src_len, 16); #endif alloc_size = src_len + BYTES_INCREMENT; inbytesleft = src_len; /* We reserve space here to add a final '\0' */ outbytesleft = alloc_size-1; ret = malloc(alloc_size); inbuf = src; outbuf = ret; while(1) { if(iconv(cd, (ICONV_CONST char **)&inbuf, &inbytesleft, &outbuf, &outbytesleft) == (size_t)-1) { switch(errno) { case E2BIG: output_pos = (int)(outbuf - ret); alloc_size += BYTES_INCREMENT; outbytesleft += BYTES_INCREMENT; ret = realloc(ret, alloc_size); if (ret == NULL) { fprintf(stderr, "Can't realloc(%d).\n", alloc_size); return false; } outbuf = ret + output_pos; break; default: fprintf(stderr, "Iconv failed: %s\n", strerror(errno)); if (ret != NULL) free(ret); return false; break; } } if(!inbytesleft) break; } /* Zero terminate */ *outbuf = '\0'; /* Set return values */ *dst = ret; if(dst_len) *dst_len = (int)(outbuf - ret); #if 0 fprintf(stderr, "Conversion done, src:\n"); bgav_hexdump(src, src_len, 16); fprintf(stderr, "dst:\n"); bgav_hexdump((uint8_t*)(ret), (int)(outbuf - ret), 16); #endif return true; } bool cdio_charset_convert(cdio_charset_coverter_t*cnv, char * src, int src_len, char ** dst, int * dst_len) { return do_convert(cnv->ic, src, src_len, dst, dst_len); } bool cdio_charset_from_utf8(cdio_utf8_t * src, char ** dst, int * dst_len, const char * dst_charset) { iconv_t ic; bool result; ic = iconv_open(dst_charset, "UTF-8"); result = do_convert(ic, src, -1, dst, dst_len); iconv_close(ic); return result; } bool cdio_charset_to_utf8(char *src, size_t src_len, cdio_utf8_t **dst, const char * src_charset) { iconv_t ic; bool result; ic = iconv_open("UTF-8", src_charset); result = do_convert(ic, src, src_len, dst, NULL); iconv_close(ic); return result; } #endif /* HAVE_JOLIET */ libcdio-0.83/lib/driver/cd_types.c0000644000175000017500000002522511650122226014014 00000000000000/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* This tries to determine what kind of CD-image or filesystems on a track we've got. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_STRING_H #include #endif #include #include #include #include #include /* Subject: -65- How can I read an IRIX (EFS) CD-ROM on a machine which doesn't use EFS? Date: 18 Jun 1995 00:00:01 EST You want 'efslook', at ftp://viz.tamu.edu/pub/sgi/software/efslook.tar.gz. and ! Robert E. Seastrom 's software (with source ! code) for using an SGI CD-ROM on a Macintosh is at ! ftp://bifrost.seastrom.com/pub/mac/CDROM-Jumpstart.sit151.hqx. */ /** The below variables are trickery to force enum symbol values to be recorded in debug symbol tables. They are used to allow one to refer to the enumeration value names in the typedefs above in a debugger and debugger expressions. */ cdio_fs_cap_t debug_cdio_fs_cap; cdio_fs_t debug_cdio_fs; static char buffer[6][CDIO_CD_FRAMESIZE_RAW]; /* for CD-Data */ /* Some interesting sector numbers stored in the above buffer. */ #define ISO_SUPERBLOCK_SECTOR 16 /* buffer[0] */ #define UFS_SUPERBLOCK_SECTOR 4 /* buffer[2] */ #define BOOT_SECTOR 17 /* buffer[3] */ #define VCD_INFO_SECTOR 150 /* buffer[4] */ #define XISO_SECTOR 32 /* buffer[4] */ #define UDFX_SECTOR 32 /* buffer[4] */ #define UDF_ANCHOR_SECTOR 256 /* buffer[5] */ typedef struct signature { unsigned int buf_num; unsigned int offset; char sig_str[60]; char description[60]; } signature_t; static const signature_t sigs[] = { /*buffer[x] off look for description */ {0, 0, "MICROSOFT*XBOX*MEDIA", "XBOX CD"}, {0, 1, "BEA01", "UDF"}, {0, 1, ISO_STANDARD_ID, "ISO 9660"}, {0, 1, "CD-I", "CD-I"}, {0, 8, "CDTV", "CDTV"}, {0, 8, "CD-RTOS", "CD-RTOS"}, {0, 9, "CDROM", "HIGH SIERRA"}, {0, 16, "CD-BRIDGE", "BRIDGE"}, {0, ISO_XA_MARKER_OFFSET, ISO_XA_MARKER_STRING, "XA"}, {1, 64, "PPPPHHHHOOOOTTTTOOOO____CCCCDDDD", "PHOTO CD"}, {1, 0x438, "\x53\xef", "EXT2 FS"}, {2, 1372, "\x54\x19\x01\x0", "UFS"}, {3, 7, "EL TORITO", "BOOTABLE"}, {4, 0, "VIDEO_CD", "VIDEO CD"}, {4, 0, "SUPERVCD", "SVCD or Chaoji VCD"} }; /* The below index into the above sigs array. Make sure things match. */ #define INDEX_XISO 0 /* Microsoft X-BOX filesystem */ #define INDEX_UDF 1 #define INDEX_ISOFS 2 #define INDEX_CD_I 3 #define INDEX_CDTV 4 #define INDEX_CD_RTOS 5 #define INDEX_HS 6 #define INDEX_BRIDGE 7 #define INDEX_XA 8 #define INDEX_PHOTO_CD 9 #define INDEX_EXT2 10 #define INDEX_UFS 11 #define INDEX_BOOTABLE 12 #define INDEX_VIDEO_CD 13 /* Video CD */ #define INDEX_SVCD 14 /* CVD *or* SVCD */ /* Read a particular block into the global array to be used for further analysis later. */ static driver_return_code_t _cdio_read_block(const CdIo_t *p_cdio, int superblock, uint32_t offset, uint8_t bufnum, track_t i_track) { unsigned int track_sec_count = cdio_get_track_sec_count(p_cdio, i_track); memset(buffer[bufnum], 0, CDIO_CD_FRAMESIZE); if ( track_sec_count < superblock) { cdio_debug("reading block %u skipped track %d has only %u sectors\n", superblock, i_track, track_sec_count); return DRIVER_OP_ERROR; } cdio_debug("about to read sector %lu\n", (long unsigned int) offset+superblock); return cdio_read_data_sectors (p_cdio, buffer[bufnum], offset+superblock, ISO_BLOCKSIZE, 1); } /* Return true if the previously read-in buffer contains a "signature" that matches index "num". */ static bool _cdio_is_it(int num) { const signature_t *sigp=&sigs[num]; int len=strlen(sigp->sig_str); /* TODO: check that num < largest sig. */ return 0 == memcmp(&buffer[sigp->buf_num][sigp->offset], sigp->sig_str, len); } static int _cdio_is_hfs(void) { return (0 == memcmp(&buffer[1][512],"PM",2)) || (0 == memcmp(&buffer[1][512],"TS",2)) || (0 == memcmp(&buffer[1][1024], "BD",2)); } static int _cdio_is_3do(void) { return (0 == memcmp(&buffer[1][0],"\x01\x5a\x5a\x5a\x5a\x5a\x01", 7)) && (0 == memcmp(&buffer[1][40], "CD-ROM", 6)); } static int _cdio_is_joliet(void) { return 2 == buffer[3][0] && buffer[3][88] == 0x25 && buffer[3][89] == 0x2f; } static int _cdio_is_UDF(void) { return 2 == ((uint16_t)buffer[5][0] | ((uint16_t)buffer[5][1] << 8)); } /* ISO 9660 volume space in M2F1_SECTOR_SIZE byte units */ static int _cdio_get_iso9660_fs_sec_count(void) { return ((buffer[0][80] & 0xff) | ((buffer[0][81] & 0xff) << 8) | ((buffer[0][82] & 0xff) << 16) | ((buffer[0][83] & 0xff) << 24)); } static int _cdio_get_joliet_level( void ) { switch (buffer[3][90]) { case 0x40: return 1; case 0x43: return 2; case 0x45: return 3; } return 0; } /* Try to determine what kind of CD-image and/or filesystem we have at track i_track. Return information about the CD image is returned in cdio_analysis and the return value. */ cdio_fs_anal_t cdio_guess_cd_type(const CdIo_t *p_cdio, int start_session, track_t i_track, /*out*/ cdio_iso_analysis_t *iso_analysis) { int ret = CDIO_FS_UNKNOWN; bool sector0_read_ok; if (TRACK_FORMAT_AUDIO == cdio_get_track_format(p_cdio, i_track)) return CDIO_FS_AUDIO; if ( DRIVER_OP_SUCCESS != _cdio_read_block(p_cdio, ISO_PVD_SECTOR, start_session, 0, i_track) ) return CDIO_FS_UNKNOWN; if ( _cdio_is_it(INDEX_XISO) ) return CDIO_FS_ANAL_XISO; if ( DRIVER_OP_SUCCESS != _cdio_read_block(p_cdio, ISO_SUPERBLOCK_SECTOR, start_session, 0, i_track) ) return ret; if ( _cdio_is_it(INDEX_UDF) ) { /* Detect UDF version Test if we have a valid version of UDF the xbox can read natively */ if (_cdio_read_block(p_cdio, 35, start_session, 5, i_track) < 0) return CDIO_FS_UNKNOWN; iso_analysis->UDFVerMinor=(unsigned int)buffer[5][240]; iso_analysis->UDFVerMajor=(unsigned int)buffer[5][241]; /* Read disc label */ if (_cdio_read_block(p_cdio, 32, start_session, 5, i_track) < 0) return CDIO_FS_UDF; strncpy(iso_analysis->iso_label, buffer[5]+25, 33); iso_analysis->iso_label[32] = '\0'; return CDIO_FS_UDF; } /* We have something that smells of a filesystem. */ if (_cdio_is_it(INDEX_CD_I) && _cdio_is_it(INDEX_CD_RTOS) && !_cdio_is_it(INDEX_BRIDGE) && !_cdio_is_it(INDEX_XA)) { return (CDIO_FS_INTERACTIVE | CDIO_FS_ANAL_ISO9660_ANY); } else { /* read sector 0 ONLY, when NO greenbook CD-I !!!! */ sector0_read_ok = _cdio_read_block(p_cdio, 0, start_session, 1, i_track) == 0; if (_cdio_is_it(INDEX_HS)) ret |= CDIO_FS_HIGH_SIERRA; else if (_cdio_is_it(INDEX_ISOFS)) { if (_cdio_is_it(INDEX_CD_RTOS) && _cdio_is_it(INDEX_BRIDGE)) ret = (CDIO_FS_ISO_9660_INTERACTIVE | CDIO_FS_ANAL_ISO9660_ANY); else if (_cdio_is_hfs()) ret = CDIO_FS_ISO_HFS; else ret = (CDIO_FS_ISO_9660 | CDIO_FS_ANAL_ISO9660_ANY); iso_analysis->isofs_size = _cdio_get_iso9660_fs_sec_count(); strncpy(iso_analysis->iso_label, buffer[0]+40,33); iso_analysis->iso_label[32] = '\0'; if ( _cdio_read_block(p_cdio, UDF_ANCHOR_SECTOR, start_session, 5, i_track) < 0) return ret; /* Maybe there is an UDF anchor in IOS session so its ISO/UDF session and we prefere UDF */ if ( _cdio_is_UDF() ) { /* Detect UDF version. Test if we have a valid version of UDF the xbox can read natively */ if ( _cdio_read_block(p_cdio, 35, start_session, 5, i_track) < 0) return ret; iso_analysis->UDFVerMinor=(unsigned int)buffer[5][240]; iso_analysis->UDFVerMajor=(unsigned int)buffer[5][241]; #if 0 /* We are using ISO/UDF cd's as iso, no need to get UDF disc label */ if (_cdio_read_block(p_cdio, 32, start_session, 5, i_track) < 0) return ret; stnrcpy(iso_analysis->iso_label, buffer[5]+25, 33); iso_analysis->iso_label[32] = '\0'; #endif ret=CDIO_FS_ISO_UDF; } #if 0 if (_cdio_is_rockridge()) ret |= CDIO_FS_ANAL_ROCKRIDGE; #endif if (_cdio_read_block(p_cdio, BOOT_SECTOR, start_session, 3, i_track) < 0) return ret; if (_cdio_is_joliet()) { iso_analysis->joliet_level = _cdio_get_joliet_level(); ret |= (CDIO_FS_ANAL_JOLIET | CDIO_FS_ANAL_ISO9660_ANY); } if (_cdio_is_it(INDEX_BOOTABLE)) ret |= CDIO_FS_ANAL_BOOTABLE; if ( _cdio_is_it(INDEX_XA) && _cdio_is_it(INDEX_ISOFS) && !(sector0_read_ok && _cdio_is_it(INDEX_PHOTO_CD)) ) { if ( _cdio_read_block(p_cdio, VCD_INFO_SECTOR, start_session, 4, i_track) < 0 ) return ret; if (_cdio_is_it(INDEX_BRIDGE) && _cdio_is_it(INDEX_CD_RTOS)) { ret |= CDIO_FS_ANAL_ISO9660_ANY; if (_cdio_is_it(INDEX_VIDEO_CD)) ret |= CDIO_FS_ANAL_VIDEOCD; else if (_cdio_is_it(INDEX_SVCD)) ret |= CDIO_FS_ANAL_SVCD; } else if (_cdio_is_it(INDEX_SVCD)) ret |= CDIO_FS_ANAL_CVD; } } else if (_cdio_is_hfs()) ret |= CDIO_FS_HFS; else if (sector0_read_ok && _cdio_is_it(INDEX_EXT2)) ret |= (CDIO_FS_EXT2 | CDIO_FS_ANAL_ISO9660_ANY); else if (_cdio_is_3do()) ret |= CDIO_FS_3DO; else { if ( _cdio_read_block(p_cdio, UFS_SUPERBLOCK_SECTOR, start_session, 2, i_track) < 0 ) return ret; if (sector0_read_ok && _cdio_is_it(INDEX_UFS)) ret |= CDIO_FS_UFS; else ret |= CDIO_FS_UNKNOWN; } } /* other checks */ if (_cdio_is_it(INDEX_XA)) ret |= (CDIO_FS_ANAL_XA | CDIO_FS_ANAL_ISO9660_ANY); if (_cdio_is_it(INDEX_PHOTO_CD)) ret |= (CDIO_FS_ANAL_PHOTO_CD | CDIO_FS_ANAL_ISO9660_ANY); if (_cdio_is_it(INDEX_CDTV)) ret |= CDIO_FS_ANAL_CDTV; return ret; } libcdio-0.83/lib/driver/mmc/0000755000175000017500000000000011652210414012663 500000000000000libcdio-0.83/lib/driver/mmc/mmc.c0000644000175000017500000007572611650123061013543 00000000000000/* Common Multimedia Command (MMC) routines. Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #include #include #include #include "cdio_private.h" #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_ERRNO_H #include #endif /************************************************************************* MMC CdIo Operations which a driver may use. These are not accessible directly. Most of these routines just pick out the cdio pointer and call the corresponding publically-accessible routine. *************************************************************************/ /** Read Audio Subchannel information @param p_user_data the CD object to be acted upon. */ driver_return_code_t audio_read_subchannel_mmc ( void *p_user_data, cdio_subchannel_t *p_subchannel) { generic_img_private_t *p_env = p_user_data; if (!p_env) return DRIVER_OP_UNINIT; return mmc_audio_read_subchannel(p_env->cdio, p_subchannel); } /** Get the block size for subsequest read requests, via MMC. @return the blocksize if > 0; error if <= 0 */ int get_blocksize_mmc (void *p_user_data) { generic_img_private_t *p_env = p_user_data; if (!p_env) return DRIVER_OP_UNINIT; return mmc_get_blocksize(p_env->cdio); } /** Get the lsn of the end of the CD (via MMC). */ lsn_t get_disc_last_lsn_mmc (void *p_user_data) { generic_img_private_t *p_env = p_user_data; if (!p_env) return CDIO_INVALID_LSN; return mmc_get_disc_last_lsn(p_env->cdio); } void get_drive_cap_mmc (const void *p_user_data, /*out*/ cdio_drive_read_cap_t *p_read_cap, /*out*/ cdio_drive_write_cap_t *p_write_cap, /*out*/ cdio_drive_misc_cap_t *p_misc_cap) { const generic_img_private_t *p_env = p_user_data; mmc_get_drive_cap( p_env->cdio, p_read_cap, p_write_cap, p_misc_cap ); } /** Find out if media has changed since the last call. @param p_user_data the environment of the CD object to be acted upon. @return 1 if media has changed since last call, 0 if not. Error return codes are the same as driver_return_code_t */ int get_media_changed_mmc (const void *p_user_data) { const generic_img_private_t *p_env = p_user_data; return mmc_get_media_changed( p_env->cdio ); } char * get_mcn_mmc (const void *p_user_data) { const generic_img_private_t *p_env = p_user_data; return mmc_get_mcn( p_env->cdio ); } driver_return_code_t get_tray_status (const void *p_user_data) { const generic_img_private_t *p_env = p_user_data; return mmc_get_tray_status( p_env->cdio ); } /** Read sectors using SCSI-MMC GPCMD_READ_CD. */ driver_return_code_t mmc_read_data_sectors ( CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn, uint16_t i_blocksize, uint32_t i_blocks ) { return mmc_read_cd(p_cdio, p_buf, /* place to store data */ i_lsn, /* lsn */ 0, /* read_sector_type */ false, /* digital audio play */ false, /* return sync header */ 0, /* header codes */ true, /* return user data */ false, /* return EDC ECC */ false, /* return C2 Error information */ 0, /* subchannel selection bits */ ISO_BLOCKSIZE, /* blocksize*/ i_blocks /* Number of blocks. */); } /** Read sectors using SCSI-MMC GPCMD_READ_CD. Can read only up to 25 blocks. */ driver_return_code_t read_data_sectors_mmc ( void *p_user_data, void *p_buf, lsn_t i_lsn, uint16_t i_blocksize, uint32_t i_blocks ) { const generic_img_private_t *p_env = p_user_data; return mmc_read_data_sectors( p_env->cdio, p_buf, i_lsn, i_blocksize, i_blocks ); } /** Set read blocksize (via MMC) */ driver_return_code_t set_blocksize_mmc (void *p_user_data, uint16_t i_blocksize) { generic_img_private_t *p_env = p_user_data; if (!p_env) return DRIVER_OP_UNINIT; return mmc_set_blocksize(p_env->cdio, i_blocksize); } /** Set the drive speed Set the drive speed in K bytes per second. (via MMC). */ driver_return_code_t set_speed_mmc (void *p_user_data, int i_speed) { generic_img_private_t *p_env = p_user_data; if (!p_env) return DRIVER_OP_UNINIT; return mmc_set_speed( p_env->cdio, i_speed, 0); } /** Set the drive speed in CD-ROM speed units (via MMC). */ driver_return_code_t set_drive_speed_mmc (void *p_user_data, int i_Kbs_speed) { generic_img_private_t *p_env = p_user_data; if (!p_env) return DRIVER_OP_UNINIT; return mmc_set_drive_speed( p_env->cdio, i_Kbs_speed ); } /** Get the output port volumes and port selections used on AUDIO PLAY commands via a MMC MODE SENSE command using the CD Audio Control Page. */ driver_return_code_t mmc_audio_get_volume( CdIo_t *p_cdio, /*out*/ mmc_audio_volume_t *p_volume ) { uint8_t buf[16]; int i_rc = mmc_mode_sense(p_cdio, buf, sizeof(buf), CDIO_MMC_AUDIO_CTL_PAGE); if ( DRIVER_OP_SUCCESS == i_rc ) { p_volume->port[0].selection = 0xF & buf[8]; p_volume->port[0].volume = buf[9]; p_volume->port[1].selection = 0xF & buf[10]; p_volume->port[1].volume = buf[11]; p_volume->port[2].selection = 0xF & buf[12]; p_volume->port[2].volume = buf[13]; p_volume->port[3].selection = 0xF & buf[14]; p_volume->port[3].volume = buf[15]; return DRIVER_OP_SUCCESS; } return i_rc; } /** Get the DVD type associated with cd object. */ discmode_t mmc_get_dvd_struct_physical_private ( void *p_env, mmc_run_cmd_fn_t run_mmc_cmd, cdio_dvd_struct_t *s) { mmc_cdb_t cdb = {{0, }}; unsigned char buf[4 + 4 * 20], *base; int i_status; uint8_t layer_num = s->physical.layer_num; cdio_dvd_layer_t *layer; if (!p_env) return DRIVER_OP_UNINIT; if (!run_mmc_cmd) return DRIVER_OP_UNSUPPORTED; if (layer_num >= CDIO_DVD_MAX_LAYERS) return -EINVAL; CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_READ_DVD_STRUCTURE); cdb.field[6] = layer_num; cdb.field[7] = CDIO_DVD_STRUCT_PHYSICAL; cdb.field[9] = sizeof(buf) & 0xff; i_status = run_mmc_cmd(p_env, mmc_timeout_ms, mmc_get_cmd_len(cdb.field[0]), &cdb, SCSI_MMC_DATA_READ, sizeof(buf), &buf); if (0 != i_status) return CDIO_DISC_MODE_ERROR; base = &buf[4]; layer = &s->physical.layer[layer_num]; /* * place the data... really ugly, but at least we won't have to * worry about endianess in userspace. */ memset(layer, 0, sizeof(*layer)); layer->book_version = base[0] & 0xf; layer->book_type = base[0] >> 4; layer->min_rate = base[1] & 0xf; layer->disc_size = base[1] >> 4; layer->layer_type = base[2] & 0xf; layer->track_path = (base[2] >> 4) & 1; layer->nlayers = (base[2] >> 5) & 3; layer->track_density = base[3] & 0xf; layer->linear_density = base[3] >> 4; layer->start_sector = base[5] << 16 | base[6] << 8 | base[7]; layer->end_sector = base[9] << 16 | base[10] << 8 | base[11]; layer->end_sector_l0 = base[13] << 16 | base[14] << 8 | base[15]; layer->bca = base[16] >> 7; return DRIVER_OP_SUCCESS; } /** Return the media catalog number MCN. Note: string is malloc'd so caller should free() then returned string when done with it. */ char * mmc_get_mcn_private ( void *p_env, const mmc_run_cmd_fn_t run_mmc_cmd ) { mmc_cdb_t cdb = {{0, }}; char buf[28] = { 0, }; int i_status; if ( ! p_env || ! run_mmc_cmd ) return NULL; CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_READ_SUBCHANNEL); CDIO_MMC_SET_READ_LENGTH8(cdb.field, sizeof(buf)); cdb.field[1] = 0x0; cdb.field[2] = 0x40; cdb.field[3] = CDIO_SUBCHANNEL_MEDIA_CATALOG; i_status = run_mmc_cmd(p_env, mmc_timeout_ms, mmc_get_cmd_len(cdb.field[0]), &cdb, SCSI_MMC_DATA_READ, sizeof(buf), buf); if(i_status == 0) { return strdup(&buf[9]); } return NULL; } /** Read cdtext information for a CdIo_t object . return true on success, false on error or CD-Text information does not exist. */ bool mmc_init_cdtext_private ( void *p_user_data, const mmc_run_cmd_fn_t run_mmc_cmd, set_cdtext_field_fn_t set_cdtext_field_fn ) { generic_img_private_t *p_env = p_user_data; mmc_cdb_t cdb = {{0, }}; unsigned char wdata[5000] = { 0, }; int i_status, i_errno; if ( ! p_env || ! run_mmc_cmd || p_env->b_cdtext_error ) return false; /* Operation code */ CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_READ_TOC); /* Setup to read header, to get length of data */ CDIO_MMC_SET_READ_LENGTH8(cdb.field, 4); cdb.field[1] = CDIO_CDROM_MSF; /* Format */ cdb.field[2] = CDIO_MMC_READTOC_FMT_CDTEXT; errno = 0; /* We may need to give CD-Text a little more time to complete. */ /* First off, just try and read the size */ i_status = run_mmc_cmd (p_env, mmc_read_timeout_ms, mmc_get_cmd_len(cdb.field[0]), &cdb, SCSI_MMC_DATA_READ, 4, &wdata); if (i_status != 0) { cdio_info ("CD-Text read failed for header: %s\n", strerror(errno)); i_errno = errno; p_env->b_cdtext_error = true; return false; } else { /* Now read the CD-Text data */ int i_cdtext = CDIO_MMC_GET_LEN16(wdata); if (i_cdtext > sizeof(wdata)) i_cdtext = sizeof(wdata); CDIO_MMC_SET_READ_LENGTH16(cdb.field, i_cdtext); i_status = run_mmc_cmd (p_env, mmc_read_timeout_ms, mmc_get_cmd_len(cdb.field[0]), &cdb, SCSI_MMC_DATA_READ, i_cdtext, &wdata); if (i_status != 0) { cdio_info ("CD-Text read for text failed: %s\n", strerror(errno)); i_errno = errno; p_env->b_cdtext_error = true; return false; } p_env->b_cdtext_init = true; return cdtext_data_init(p_env, p_env->i_first_track, wdata, i_cdtext-2, set_cdtext_field_fn); } } driver_return_code_t mmc_set_blocksize_private ( void *p_env, const mmc_run_cmd_fn_t run_mmc_cmd, uint16_t i_blocksize) { mmc_cdb_t cdb = {{0, }}; struct { uint8_t reserved1; uint8_t medium; uint8_t reserved2; uint8_t block_desc_length; uint8_t density; uint8_t number_of_blocks_hi; uint8_t number_of_blocks_med; uint8_t number_of_blocks_lo; uint8_t reserved3; uint8_t block_length_hi; uint8_t block_length_med; uint8_t block_length_lo; } mh; if ( ! p_env ) return DRIVER_OP_UNINIT; if ( ! run_mmc_cmd ) return DRIVER_OP_UNSUPPORTED; memset (&mh, 0, sizeof (mh)); mh.block_desc_length = 0x08; /* while i_blocksize is uint16_t, this expression is always 0 */ mh.block_length_hi = (i_blocksize >> 16) & 0xff; mh.block_length_med = (i_blocksize >> 8) & 0xff; mh.block_length_lo = (i_blocksize >> 0) & 0xff; CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_MODE_SELECT_6); cdb.field[1] = 1 << 4; cdb.field[4] = 12; return run_mmc_cmd (p_env, mmc_timeout_ms, mmc_get_cmd_len(cdb.field[0]), &cdb, SCSI_MMC_DATA_WRITE, sizeof(mh), &mh); } /*********************************************************** User-accessible Operations. ************************************************************/ /** Read Audio Subchannel information @param p_cdio the CD object to be acted upon. */ driver_return_code_t mmc_audio_read_subchannel (CdIo_t *p_cdio, cdio_subchannel_t *p_subchannel) { mmc_cdb_t cdb; driver_return_code_t i_rc; cdio_mmc_subchannel_t mmc_subchannel; if (!p_cdio) return DRIVER_OP_UNINIT; memset(&mmc_subchannel, 0, sizeof(mmc_subchannel)); mmc_subchannel.format = CDIO_CDROM_MSF; memset(&cdb, 0, sizeof(mmc_cdb_t)); CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_READ_SUBCHANNEL); CDIO_MMC_SET_READ_LENGTH8(cdb.field, sizeof(cdio_mmc_subchannel_t)); cdb.field[1] = CDIO_CDROM_MSF; cdb.field[2] = 0x40; /* subq */ cdb.field[3] = CDIO_SUBCHANNEL_CURRENT_POSITION; cdb.field[6] = 0; /* track number (only in isrc mode, ignored) */ i_rc = mmc_run_cmd(p_cdio, mmc_timeout_ms, &cdb, SCSI_MMC_DATA_READ, sizeof(cdio_mmc_subchannel_t), &mmc_subchannel); if (DRIVER_OP_SUCCESS == i_rc) { p_subchannel->format = mmc_subchannel.format; p_subchannel->audio_status = mmc_subchannel.audio_status; p_subchannel->address = mmc_subchannel.address; p_subchannel->control = mmc_subchannel.control; p_subchannel->track = mmc_subchannel.track; p_subchannel->index = mmc_subchannel.index; p_subchannel->abs_addr.m = cdio_to_bcd8(mmc_subchannel.abs_addr[1]); p_subchannel->abs_addr.s = cdio_to_bcd8(mmc_subchannel.abs_addr[2]); p_subchannel->abs_addr.f = cdio_to_bcd8(mmc_subchannel.abs_addr[3]); p_subchannel->rel_addr.m = cdio_to_bcd8(mmc_subchannel.rel_addr[1]); p_subchannel->rel_addr.s = cdio_to_bcd8(mmc_subchannel.rel_addr[2]); p_subchannel->rel_addr.f = cdio_to_bcd8(mmc_subchannel.rel_addr[3]); } return i_rc; } /** Read ISRC Subchannel information. Contributed by Scot C. Bontrager (scot@indievisible.org) May 15, 2011 - @param p_cdio the CD object to be acted upon. @param track the track you to get ISRC info @param buf place to put ISRC info */ driver_return_code_t mmc_isrc_track_read_subchannel (CdIo_t *p_cdio, /*in*/ const track_t track, /*out*/ char *p_isrc) { mmc_cdb_t cdb = {{0, }}; driver_return_code_t i_rc; char buf[28] = { 0, }; if (!p_cdio) return DRIVER_OP_UNINIT; CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_READ_SUBCHANNEL); CDIO_MMC_SET_READ_LENGTH8(cdb.field, sizeof(buf)); cdb.field[1] = 0x0; cdb.field[2] = 1 << 6; cdb.field[3] = CDIO_SUBCHANNEL_TRACK_ISRC; /* 0x03 */ cdb.field[6] = track; i_rc = mmc_run_cmd(p_cdio, mmc_timeout_ms, &cdb, SCSI_MMC_DATA_READ, sizeof(buf), buf); if (DRIVER_OP_SUCCESS == i_rc) { strncpy(p_isrc, &buf[9], CDIO_ISRC_SIZE+1); } return i_rc; } /** Get the block size used in read requests, via MMC (e.g. READ_10, READ_MSF, ...) @param p_cdio the CD object to be acted upon. @return the blocksize if > 0; error if <= 0 */ int mmc_get_blocksize ( CdIo_t *p_cdio) { int i_status; uint8_t buf[255] = { 0, }; uint8_t *p; /* First try using the 6-byte MODE SENSE command. */ i_status = mmc_mode_sense_6(p_cdio, buf, sizeof(buf), CDIO_MMC_R_W_ERROR_PAGE); if (DRIVER_OP_SUCCESS == i_status && buf[3]>=8) { p = &buf[4+5]; return CDIO_MMC_GET_LEN16(p); } /* Next try using the 10-byte MODE SENSE command. */ i_status = mmc_mode_sense_10(p_cdio, buf, sizeof(buf), CDIO_MMC_R_W_ERROR_PAGE); p = &buf[6]; if (DRIVER_OP_SUCCESS == i_status && CDIO_MMC_GET_LEN16(p)>=8) { return CDIO_MMC_GET_LEN16(p); } #ifdef IS_THIS_CORRECT /* Lastly try using the READ CAPACITY command. */ { lba_t lba = 0; uint16_t i_blocksize; i_status = mmc_read_capacity(p_cdio, &lba, &i_blocksize); if ( DRIVER_OP_SUCCESS == i_status ) return i_blocksize; #endif return DRIVER_OP_UNSUPPORTED; } /** Return the number of length in bytes of the Command Descriptor buffer (CDB) for a given MMC command. The length will be either 6, 10, or 12. */ uint8_t mmc_get_cmd_len(uint8_t scsi_cmd) { static const uint8_t scsi_cdblen[8] = {6, 10, 10, 12, 12, 12, 10, 10}; return scsi_cdblen[((scsi_cmd >> 5) & 7)]; } /** Return the size of the CD in logical block address (LBA) units. @param p_cdio the CD object to be acted upon. @return the lsn. On error 0 or CDIO_INVALD_LSN. */ lsn_t mmc_get_disc_last_lsn ( const CdIo_t *p_cdio ) { mmc_cdb_t cdb = {{0, }}; uint8_t buf[12] = { 0, }; lsn_t retval = 0; int i_status; /* Operation code */ CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_READ_TOC); cdb.field[1] = 0; /* lba; msf: 0x2 */ /* Format */ cdb.field[2] = CDIO_MMC_READTOC_FMT_TOC; CDIO_MMC_SET_START_TRACK(cdb.field, CDIO_CDROM_LEADOUT_TRACK); CDIO_MMC_SET_READ_LENGTH16(cdb.field, sizeof(buf)); i_status = mmc_run_cmd(p_cdio, mmc_timeout_ms, &cdb, SCSI_MMC_DATA_READ, sizeof(buf), buf); if (i_status) return CDIO_INVALID_LSN; { int i; for (i = 8; i < 12; i++) { retval <<= 8; retval += buf[i]; } } return retval; } /** Return the discmode as reported by the SCSI-MMC Read (FULL) TOC command. Information was obtained from Section 5.1.13 (Read TOC/PMA/ATIP) pages 56-62 from the MMC draft specification, revision 10a at http://www.t10.org/ftp/t10/drafts/mmc/mmc-r10a.pdf See especially tables 72, 73 and 75. */ discmode_t mmc_get_discmode( const CdIo_t *p_cdio ) { uint8_t buf[14] = { 0, }; mmc_cdb_t cdb; memset(&cdb, 0, sizeof(mmc_cdb_t)); CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_READ_TOC); CDIO_MMC_SET_READ_LENGTH8(cdb.field, sizeof(buf)); cdb.field[1] = CDIO_CDROM_MSF; /* The MMC-5 spec may require this. */ cdb.field[2] = CDIO_MMC_READTOC_FMT_FULTOC; mmc_run_cmd(p_cdio, 2000, &cdb, SCSI_MMC_DATA_READ, sizeof(buf), buf); if (buf[7] == 0xA0) { if (buf[13] == 0x00) { if (buf[5] & 0x04) return CDIO_DISC_MODE_CD_DATA; else return CDIO_DISC_MODE_CD_DA; } else if (buf[13] == 0x10) return CDIO_DISC_MODE_CD_I; else if (buf[13] == 0x20) return CDIO_DISC_MODE_CD_XA; } return CDIO_DISC_MODE_NO_INFO; } /** Get drive capabilities for a device. @param p_cdio the CD object to be acted upon. @return the drive capabilities. */ void mmc_get_drive_cap (CdIo_t *p_cdio, /*out*/ cdio_drive_read_cap_t *p_read_cap, /*out*/ cdio_drive_write_cap_t *p_write_cap, /*out*/ cdio_drive_misc_cap_t *p_misc_cap) { /* Largest buffer size we use. */ #define BUF_MAX 2048 uint8_t buf[BUF_MAX] = { 0, }; int i_status; uint16_t i_data = BUF_MAX; int page = CDIO_MMC_ALL_PAGES; if ( ! p_cdio ) return; retry: /* In the first run we run MODE SENSE 10 we are trying to get the length of the data features. */ i_status = mmc_mode_sense_10(p_cdio, buf, 8, CDIO_MMC_ALL_PAGES); if (DRIVER_OP_SUCCESS == i_status) { uint16_t i_data_try = (uint16_t) CDIO_MMC_GET_LEN16(buf); if (i_data_try < BUF_MAX) i_data = i_data_try; } /* Now try getting all features with length set above, possibly truncated or the default length if we couldn't get the proper length. */ i_status = mmc_mode_sense_10(p_cdio, buf, i_data, CDIO_MMC_ALL_PAGES); if (0 != i_status && CDIO_MMC_CAPABILITIES_PAGE != page) { page = CDIO_MMC_CAPABILITIES_PAGE; goto retry; } if (DRIVER_OP_SUCCESS == i_status) { uint8_t *p; uint8_t *p_max = buf + 256; *p_read_cap = 0; *p_write_cap = 0; *p_misc_cap = 0; /* set to first sense mask, and then walk through the masks */ p = buf + 8; while( (p < &(buf[2+i_data])) && (p < p_max) ) { uint8_t which_page; which_page = p[0] & 0x3F; switch( which_page ) { case CDIO_MMC_AUDIO_CTL_PAGE: case CDIO_MMC_R_W_ERROR_PAGE: case CDIO_MMC_CDR_PARMS_PAGE: /* Don't handle these yet. */ break; case CDIO_MMC_CAPABILITIES_PAGE: mmc_get_drive_cap_buf(p, p_read_cap, p_write_cap, p_misc_cap); break; default: ; } p += (p[1] + 2); } } else { cdio_info("%s: %s\n", "error in MODE_SELECT", strerror(errno)); *p_read_cap = CDIO_DRIVE_CAP_ERROR; *p_write_cap = CDIO_DRIVE_CAP_ERROR; *p_misc_cap = CDIO_DRIVE_CAP_ERROR; } return; } /** Get the MMC level supported by the device. */ cdio_mmc_level_t mmc_get_drive_mmc_cap(CdIo_t *p_cdio) { uint8_t buf[256] = { 0, }; uint8_t len; int rc = mmc_mode_sense(p_cdio, buf, sizeof(buf), CDIO_MMC_CAPABILITIES_PAGE); if (DRIVER_OP_SUCCESS != rc) { return CDIO_MMC_LEVEL_NONE; } len = buf[1]; if (16 > len) { return CDIO_MMC_LEVEL_WEIRD; } else if (28 <= len) { return CDIO_MMC_LEVEL_3; } else if (24 <= len) { return CDIO_MMC_LEVEL_2; printf("MMC 2"); } else if (20 <= len) { return CDIO_MMC_LEVEL_1; } else { return CDIO_MMC_LEVEL_WEIRD; } } /** Get the DVD type associated with cd object. @param p_cdio the CD object to be acted upon. @return the DVD discmode. */ discmode_t mmc_get_dvd_struct_physical ( const CdIo_t *p_cdio, cdio_dvd_struct_t *s) { if ( ! p_cdio ) return -2; return mmc_get_dvd_struct_physical_private (p_cdio->env, p_cdio->op.run_mmc_cmd, s); } /** Get the CD-ROM hardware info via a MMC INQUIRY command. False is returned if we had an error getting the information. @param p_cdio the CD object to be acted upon. @return true if we were able to get hardware info, false if we had an error. */ bool mmc_get_hwinfo ( const CdIo_t *p_cdio, /*out*/ cdio_hwinfo_t *hw_info ) { int i_status; /* Result of MMC command */ char buf[36] = { 0, }; /* Place to hold returned data */ mmc_cdb_t cdb = {{0, }}; /* Command Descriptor Block */ CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_INQUIRY); cdb.field[4] = sizeof(buf); if (! p_cdio || ! hw_info ) return false; i_status = mmc_run_cmd(p_cdio, mmc_timeout_ms, &cdb, SCSI_MMC_DATA_READ, sizeof(buf), &buf); if (i_status == 0) { memcpy(hw_info->psz_vendor, buf + 8, sizeof(hw_info->psz_vendor)-1); hw_info->psz_vendor[sizeof(hw_info->psz_vendor)-1] = '\0'; memcpy(hw_info->psz_model, buf + 8 + CDIO_MMC_HW_VENDOR_LEN, sizeof(hw_info->psz_model)-1); hw_info->psz_model[sizeof(hw_info->psz_model)-1] = '\0'; memcpy(hw_info->psz_revision, buf + 8 + CDIO_MMC_HW_VENDOR_LEN + CDIO_MMC_HW_MODEL_LEN, sizeof(hw_info->psz_revision)-1); hw_info->psz_revision[sizeof(hw_info->psz_revision)-1] = '\0'; return true; } return false; } /** Find out if media has changed since the last call. @param p_cdio the CD object to be acted upon. @return 1 if media has changed since last call, 0 if not. Error return codes are the same as driver_return_code_t */ int mmc_get_media_changed(const CdIo_t *p_cdio) { uint8_t status_buf[2]; int i_status; i_status = mmc_get_event_status(p_cdio, status_buf); if (i_status != DRIVER_OP_SUCCESS) return i_status; return (status_buf[0] & 0x02) ? 1 : 0; } /** Get the media catalog number (MCN) from the CD via MMC. @param p_cdio the CD object to be acted upon. @return the media catalog number r NULL if there is none or we don't have the ability to get it. Note: string is malloc'd so caller has to free() the returned string when done with it. */ char * mmc_get_mcn ( const CdIo_t *p_cdio ) { if ( ! p_cdio ) return NULL; return mmc_get_mcn_private (p_cdio->env, p_cdio->op.run_mmc_cmd ); } /** Find out if media tray is open or closed. @param p_cdio the CD object to be acted upon. @return 1 if media is open, 0 if closed. Error return codes are the same as driver_return_code_t */ int mmc_get_tray_status(const CdIo_t *p_cdio) { uint8_t status_buf[2]; int i_status; i_status = mmc_get_event_status(p_cdio, status_buf); if (i_status != DRIVER_OP_SUCCESS) return i_status; return (status_buf[1] & 0x01) ? 1 : 0; } /* Added in version 0.83 by scdbackup */ /** Obtain the SCSI sense reply of the most-recently-performed MMC command. These bytes give an indication of possible problems which occured in the drive while the command was performed. With some commands they tell about the current state of the drive (e.g. 00h TEST UNIT READY). @param p_cdio CD structure set by cdio_open(). @param sense returns the sense bytes received from the drive. This is allocated memory or NULL if no sense bytes are available. Dispose non-NULL pointers by free() when no longer needed. See SPC-3 4.5.3 Fixed format sense data. SCSI error codes as of SPC-3 Annex D, MMC-5 Annex F: sense[2]&15 = Key , sense[12] = ASC , sense[13] = ASCQ @return number of valid bytes in sense, 0 in case of no sense bytes available, <0 in case of internal error. */ int mmc_last_cmd_sense(const CdIo_t *p_cdio, cdio_mmc_request_sense_t **pp_sense) { generic_img_private_t *gen; if (!p_cdio) return DRIVER_OP_UNINIT; gen = p_cdio->env; *pp_sense = NULL; if (gen->scsi_mmc_sense_valid <= 0) return 0; *pp_sense = calloc(1, gen->scsi_mmc_sense_valid); if (*pp_sense == NULL) return DRIVER_OP_ERROR; memcpy(*pp_sense, gen->scsi_mmc_sense, gen->scsi_mmc_sense_valid); return gen->scsi_mmc_sense_valid; } /** Run a MMC command. @param cdio CD structure set by cdio_open(). @param i_timeout time in milliseconds we will wait for the command to complete. If this value is -1, use the default time-out value. @param buf Buffer for data, both sending and receiving @param len Size of buffer @param e_direction direction the transfer is to go @param cdb CDB bytes. All values that are needed should be set on input. We'll figure out what the right CDB length should be. */ driver_return_code_t mmc_run_cmd( const CdIo_t *p_cdio, unsigned int i_timeout_ms, const mmc_cdb_t *p_cdb, cdio_mmc_direction_t e_direction, unsigned int i_buf, /*in/out*/ void *p_buf ) { if (!p_cdio) return DRIVER_OP_UNINIT; if (!p_cdio->op.run_mmc_cmd) return DRIVER_OP_UNSUPPORTED; return p_cdio->op.run_mmc_cmd(p_cdio->env, i_timeout_ms, mmc_get_cmd_len(p_cdb->field[0]), p_cdb, e_direction, i_buf, p_buf); } /* Added by SukkoPera to allow CDB length to be specified manually */ /** Run a Multimedia command (MMC) specifying the CDB length. The motivation here is for example ot use in is an undocumented debug command for LG drives (namely E7), whose length is being miscalculated by mmc_get_cmd_len(); it doesn't follow the usual code number to length conventions. Patch supplied by SukkoPera. @param p_cdio CD structure set by cdio_open(). @param i_timeout_ms time in milliseconds we will wait for the command to complete. @param p_cdb CDB bytes. All values that are needed should be set on input. @param i_cdb number of CDB bytes. @param e_direction direction the transfer is to go. @param i_buf Size of buffer @param p_buf Buffer for data, both sending and receiving. @return 0 if command completed successfully. */ driver_return_code_t mmc_run_cmd_len( const CdIo_t *p_cdio, unsigned int i_timeout_ms, const mmc_cdb_t *p_cdb, unsigned int i_cdb, cdio_mmc_direction_t e_direction, unsigned int i_buf, /*in/out*/ void *p_buf ) { if (!p_cdio) return DRIVER_OP_UNINIT; if (!p_cdio->op.run_mmc_cmd) return DRIVER_OP_UNSUPPORTED; return p_cdio->op.run_mmc_cmd(p_cdio->env, i_timeout_ms, i_cdb, p_cdb, e_direction, i_buf, p_buf); } /** See if CD-ROM has feature with value value @return true if we have the feature and false if not. */ bool_3way_t mmc_have_interface( CdIo_t *p_cdio, cdio_mmc_feature_interface_t e_interface ) { int i_status; /* Result of MMC command */ uint8_t buf[500] = { 0, }; /* Place to hold returned data */ mmc_cdb_t cdb = {{0, }}; /* Command Descriptor Buffer */ if (!p_cdio || !p_cdio->op.run_mmc_cmd) return nope; CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_GET_CONFIGURATION); CDIO_MMC_SET_READ_LENGTH8(cdb.field, sizeof(buf)); cdb.field[1] = CDIO_MMC_GET_CONF_NAMED_FEATURE; cdb.field[3] = CDIO_MMC_FEATURE_CORE; i_status = mmc_run_cmd(p_cdio, 0, &cdb, SCSI_MMC_DATA_READ, sizeof(buf), &buf); if (DRIVER_OP_SUCCESS == i_status) { uint8_t *p; uint32_t i_data; uint8_t *p_max = buf + 65530; i_data = (unsigned int) CDIO_MMC_GET_LEN32(buf); /* set to first sense feature code, and then walk through the masks */ p = buf + 8; while( (p < &(buf[i_data])) && (p < p_max) ) { uint16_t i_feature; uint8_t i_feature_additional = p[3]; i_feature = CDIO_MMC_GET_LEN16(p); if (CDIO_MMC_FEATURE_CORE == i_feature) { uint8_t *q = p+4; uint32_t i_interface_standard = CDIO_MMC_GET_LEN32(q); if (e_interface == i_interface_standard) return yep; } p += i_feature_additional + 4; } return nope; } else return dunno; } /** Read sectors using SCSI-MMC GPCMD_READ_CD. Can read only up to 25 blocks. */ driver_return_code_t mmc_read_sectors ( const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn, int sector_type, uint32_t i_blocks ) { mmc_cdb_t cdb = {{0, }}; mmc_run_cmd_fn_t run_mmc_cmd; if (!p_cdio) return DRIVER_OP_UNINIT; if (!p_cdio->op.run_mmc_cmd ) return DRIVER_OP_UNSUPPORTED; run_mmc_cmd = p_cdio->op.run_mmc_cmd; CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_READ_CD); CDIO_MMC_SET_READ_TYPE (cdb.field, sector_type); CDIO_MMC_SET_READ_LBA (cdb.field, i_lsn); CDIO_MMC_SET_READ_LENGTH24(cdb.field, i_blocks); CDIO_MMC_SET_MAIN_CHANNEL_SELECTION_BITS(cdb.field, CDIO_MMC_MCSB_ALL_HEADERS); return run_mmc_cmd (p_cdio->env, mmc_timeout_ms, mmc_get_cmd_len(cdb.field[0]), &cdb, SCSI_MMC_DATA_READ, CDIO_CD_FRAMESIZE_RAW * i_blocks, p_buf); } driver_return_code_t mmc_set_blocksize ( const CdIo_t *p_cdio, uint16_t i_blocksize) { if ( ! p_cdio ) return DRIVER_OP_UNINIT; return mmc_set_blocksize_private (p_cdio->env, p_cdio->op.run_mmc_cmd, i_blocksize); } /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/lib/driver/mmc/Makefile0000644000175000017500000000155311114145233014246 00000000000000# $Id: Makefile,v 1.2 2008/04/21 18:30:21 karl Exp $ # # Copyright (C) 2004, 2008 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # The make is done above. This boilerplate Makefile just transfers the call all install check clean: cd .. && $(MAKE) $@ libcdio-0.83/lib/driver/mmc/mmc_ll_cmds.c0000644000175000017500000003657511650123141015236 00000000000000/* Wrappers for specific Multimedia Command (MMC) commands e.g., READ DISC, START/STOP UNIT. Copyright (C) 2010, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #include "cdio_private.h" #include "mmc_cmd_helper.h" #ifdef HAVE_STRING_H #include #endif /** Get drive capabilities vis SCSI-MMC GET CONFIGURATION @param p_cdio the CD object to be acted upon. @return DRIVER_OP_SUCCESS (0) if we got the status. return codes are the same as driver_return_code_t */ driver_return_code_t mmc_get_configuration(const CdIo_t *p_cdio, void *p_buf, unsigned int i_size, unsigned int return_type, unsigned int i_starting_feature_number, unsigned int i_timeout_ms) { MMC_CMD_SETUP(CDIO_MMC_GPCMD_GET_CONFIGURATION); CDIO_MMC_SET_READ_LENGTH8(cdb.field, i_size); if (0 == i_timeout_ms) i_timeout_ms = mmc_timeout_ms; cdb.field[1] = return_type & 0x3; CDIO_MMC_SET_LEN16(cdb.field, 2, i_starting_feature_number); return MMC_RUN_CMD(SCSI_MMC_DATA_READ, i_timeout_ms); } /** Return results of media event status via SCSI-MMC GET EVENT STATUS @param p_cdio the CD object to be acted upon. @param out_buf media status code from operation @return DRIVER_OP_SUCCESS (0) if we got the status. Return codes are the same as driver_return_code_t */ driver_return_code_t mmc_get_event_status(const CdIo_t *p_cdio, uint8_t out_buf[2]) { uint8_t buf[8] = { 0, }; void *p_buf = &buf; const unsigned int i_size = sizeof(buf); driver_return_code_t i_status; MMC_CMD_SETUP_READ16(CDIO_MMC_GPCMD_GET_EVENT_STATUS); cdb.field[1] = 1; /* We poll for info */ cdb.field[4] = 1 << 4; /* We want Media events */ i_status = MMC_RUN_CMD(SCSI_MMC_DATA_READ, mmc_timeout_ms); if (i_status == DRIVER_OP_SUCCESS) { out_buf[0] = buf[4]; out_buf[1] = buf[5]; } return i_status; } /** Run a SCSI-MMC MODE SELECT (10-byte) command and put the results in p_buf. @param p_cdio the CD object to be acted upon. @param p_buf pointer to location to store mode sense information @param i_size number of bytes allocated to p_buf @param page which "page" of the mode sense command we are interested in @param i_timeout_ms value in milliseconds to use on timeout. Setting to 0 uses the default time-out value stored in mmc_timeout_ms. @return DRIVER_OP_SUCCESS if we ran the command ok. */ driver_return_code_t mmc_mode_select_10(CdIo_t *p_cdio, /*out*/ void *p_buf, unsigned int i_size, int page, unsigned int i_timeout_ms) { MMC_CMD_SETUP_READ16(CDIO_MMC_GPCMD_MODE_SELECT_10); if (0 == i_timeout_ms) i_timeout_ms = mmc_timeout_ms; cdb.field[1] = page; return MMC_RUN_CMD(SCSI_MMC_DATA_WRITE, i_timeout_ms); } /** Run a SCSI-MMC MODE SENSE command (10-byte version) and put the results in p_buf @param p_cdio the CD object to be acted upon. @param p_buf pointer to location to store mode sense information @param i_size number of bytes allocated to p_buf @param page which "page" of the mode sense command we are interested in @return DRIVER_OP_SUCCESS if we ran the command ok. */ driver_return_code_t mmc_mode_sense_10(CdIo_t *p_cdio, void *p_buf, unsigned int i_size, unsigned int page) { MMC_CMD_SETUP_READ16(CDIO_MMC_GPCMD_MODE_SENSE_10); cdb.field[2] = CDIO_MMC_ALL_PAGES & page; return MMC_RUN_CMD(SCSI_MMC_DATA_READ, mmc_timeout_ms); } /** Run a SCSI-MMC MODE SENSE command (6-byte version) and put the results in p_buf @param p_cdio the CD object to be acted upon. @param p_buf pointer to location to store mode sense information @param i_size number of bytes allocated to p_buf @param page which "page" of the mode sense command we are interested in @return DRIVER_OP_SUCCESS if we ran the command ok. */ driver_return_code_t mmc_mode_sense_6(CdIo_t *p_cdio, void *p_buf, unsigned int i_size, int page) { MMC_CMD_SETUP(CDIO_MMC_GPCMD_MODE_SENSE_6); cdb.field[4] = i_size; cdb.field[2] = CDIO_MMC_ALL_PAGES & page; return MMC_RUN_CMD(SCSI_MMC_DATA_READ, mmc_timeout_ms); } /** Request preventing/allowing medium removal on a drive via SCSI-MMC PREVENT/ALLOW MEDIUM REMOVAL. @param p_cdio the CD object to be acted upon. @param b_prevent true of drive locked and false if unlocked @param b_persisent make b_prevent state persistent @return DRIVER_OP_SUCCESS (0) if we got the status. return codes are the same as driver_return_code_t */ driver_return_code_t mmc_prevent_allow_medium_removal(const CdIo_t *p_cdio, bool b_persistent, bool b_prevent, unsigned int i_timeout_ms) { uint8_t buf[8] = { 0, }; void *p_buf = &buf; const unsigned int i_size = 0; MMC_CMD_SETUP(CDIO_MMC_GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL); if (0 == i_timeout_ms) i_timeout_ms = mmc_timeout_ms; if (b_prevent) cdb.field[4] |= 1; if (b_persistent) cdb.field[4] |= 2; return MMC_RUN_CMD(SCSI_MMC_DATA_WRITE, i_timeout_ms); } /* Maximum blocks to retrieve. Would be nice to customize this based on drive capabilities. */ #define MAX_CD_READ_BLOCKS 16 /** Issue a MMC READ_CD command. @param p_cdio object to read from @param p_buf1 Place to store data. The caller should ensure that p_buf1 can hold at least i_blocksize * i_blocks bytes. @param i_lsn sector to read @param expected_sector_type restricts reading to a specific CD sector type. Only 3 bits with values 1-5 are used: 0 all sector types 1 CD-DA sectors only 2 Mode 1 sectors only 3 Mode 2 formless sectors only. Note in contrast to all other values an MMC CD-ROM is not required to support this mode. 4 Mode 2 Form 1 sectors only 5 Mode 2 Form 2 sectors only @param b_digital_audio_play Control error concealment when the data being read is CD-DA. If the data being read is not CD-DA, this parameter is ignored. If the data being read is CD-DA and DAP is false zero, then the user data returned should not be modified by flaw obscuring mechanisms such as audio data mute and interpolate. If the data being read is CD-DA and DAP is true, then the user data returned should be modified by flaw obscuring mechanisms such as audio data mute and interpolate. b_sync_header return the sync header (which will probably have the same value as CDIO_SECTOR_SYNC_HEADER of size CDIO_CD_SYNC_SIZE). @param header_codes Header Codes refer to the sector header and the sub-header that is present in mode 2 formed sectors: 0 No header information is returned. 1 The 4-byte sector header of data sectors is be returned, 2 The 8-byte sector sub-header of mode 2 formed sectors is returned. 3 Both sector header and sub-header (12 bytes) is returned. The Header preceeds the rest of the bytes (e.g. user-data bytes) that might get returned. @param b_user_data Return user data if true. For CD-DA, the User Data is CDIO_CD_FRAMESIZE_RAW bytes. For Mode 1, The User Data is ISO_BLOCKSIZE bytes beginning at offset CDIO_CD_HEADER_SIZE+CDIO_CD_SUBHEADER_SIZE. For Mode 2 formless, The User Data is M2RAW_SECTOR_SIZE bytes beginning at offset CDIO_CD_HEADER_SIZE+CDIO_CD_SUBHEADER_SIZE. For data Mode 2, form 1, User Data is ISO_BLOCKSIZE bytes beginning at offset CDIO_CD_XA_SYNC_HEADER. For data Mode 2, form 2, User Data is 2 324 bytes beginning at offset CDIO_CD_XA_SYNC_HEADER. @param b_sync @param b_edc_ecc true if we return EDC/ECC error detection/correction bits. The presence and size of EDC redundancy or ECC parity is defined according to sector type: CD-DA sectors have neither EDC redundancy nor ECC parity. Data Mode 1 sectors have 288 bytes of EDC redundancy, Pad, and ECC parity beginning at offset 2064. Data Mode 2 formless sectors have neither EDC redundancy nor ECC parity Data Mode 2 form 1 sectors have 280 bytes of EDC redundancy and ECC parity beginning at offset 2072 Data Mode 2 form 2 sectors optionally have 4 bytes of EDC redundancy beginning at offset 2348. @param c2_error_information If true associate a bit with each sector for C2 error The resulting bit field is ordered exactly as the main channel bytes. Each 8-bit boundary defines a byte of flag bits. @param subchannel_selection subchannel-selection bits 0 No Sub-channel data shall be returned. (0 bytes) 1 RAW P-W Sub-channel data shall be returned. (96 byte) 2 Formatted Q sub-channel data shall be transferred (16 bytes) 3 Reserved 4 Corrected and de-interleaved R-W sub-channel (96 bytes) 5-7 Reserved @param i_blocksize size of the a block expected to be returned @param i_blocks number of blocks expected to be returned. @return DRIVER_OP_SUCCESS if we ran the command ok. */ driver_return_code_t mmc_read_cd(const CdIo_t *p_cdio, void *p_buf1, lsn_t i_lsn, int read_sector_type, bool b_digital_audio_play, bool b_sync, uint8_t header_codes, bool b_user_data, bool b_edc_ecc, uint8_t c2_error_information, uint8_t subchannel_selection, uint16_t i_blocksize, uint32_t i_blocks) { void *p_buf = p_buf1; uint8_t cdb9 = 0; const unsigned int i_timeout = mmc_timeout_ms * (MAX_CD_READ_BLOCKS/2); MMC_CMD_SETUP(CDIO_MMC_GPCMD_READ_CD); CDIO_MMC_SET_READ_TYPE(cdb.field, read_sector_type); if (b_digital_audio_play) cdb.field[1] |= 0x2; if (b_sync) cdb9 |= 128; if (b_user_data) cdb9 |= 16; if (b_edc_ecc) cdb9 |= 8; cdb9 |= (header_codes & 3) << 5; cdb9 |= (c2_error_information & 3) << 1; cdb.field[9] = cdb9; cdb.field[10] = (subchannel_selection & 7); { unsigned int j = 0; int i_status = DRIVER_OP_SUCCESS; while (i_blocks > 0) { const unsigned i_blocks2 = (i_blocks > MAX_CD_READ_BLOCKS) ? MAX_CD_READ_BLOCKS : i_blocks; const unsigned int i_size = i_blocksize * i_blocks2; p_buf = ((char *)p_buf1 ) + (j * i_blocksize); CDIO_MMC_SET_READ_LBA (cdb.field, (i_lsn+j)); CDIO_MMC_SET_READ_LENGTH24(cdb.field, i_blocks2); i_status = MMC_RUN_CMD(SCSI_MMC_DATA_READ, i_timeout); if (i_status) return i_status; i_blocks -= i_blocks2; j += i_blocks2; } return i_status; } } /** Request information about et drive capabilities vis SCSI-MMC READ DISC INFORMATION @param p_cdio the CD object to be acted upon. @param p_buf pointer to location to store mode sense information @param i_size number of bytes allocated to p_buf @param data_type kind of information to retrieve. @return DRIVER_OP_SUCCESS (0) if we got the status. */ driver_return_code_t mmc_read_disc_information(const CdIo_t *p_cdio, /*out*/ void *p_buf, unsigned int i_size, cdio_mmc_read_disc_info_datatype_t data_type, unsigned int i_timeout_ms) { MMC_CMD_SETUP(CDIO_MMC_GPCMD_READ_DISC_INFO); CDIO_MMC_SET_READ_LENGTH8(cdb.field, i_size); if (0 == i_timeout_ms) i_timeout_ms = mmc_timeout_ms; cdb.field[1] = data_type & 0x7; return MMC_RUN_CMD(SCSI_MMC_DATA_READ, i_timeout_ms); } /** Set the drive speed in K bytes per second using SCSI-MMC SET SPEED. . @param p_cdio CD structure set by cdio_open(). @param i_Kbs_speed speed in K bytes per second. Note this is not in standard CD-ROM speed units, e.g. 1x, 4x, 16x as it is in cdio_set_speed. To convert CD-ROM speed units to Kbs, multiply the number by 176 (for raw data) and by 150 (for filesystem data). Also note that ATAPI specs say that a value less than 176 will result in an error. On many CD-ROM drives, specifying a value too large will result in using the fastest speed. @return the drive speed if greater than 0. -1 if we had an error. is -2 returned if this is not implemented for the current driver. @see cdio_set_speed and mmc_set_drive_speed @return DRIVER_OP_SUCCESS if we ran the command ok. */ int mmc_set_speed(const CdIo_t *p_cdio, int i_Kbs_speed, unsigned int i_timeout_ms) { uint8_t buf[14] = { 0, }; void * p_buf = &buf; const unsigned int i_size = sizeof(buf); if (0 == i_timeout_ms) i_timeout_ms = mmc_timeout_ms; MMC_CMD_SETUP(CDIO_MMC_GPCMD_SET_SPEED); /* If the requested speed is less than 1x 176 kb/s this command will return an error - it's part of the ATAPI specs. Therefore, test and stop early. */ if ( i_Kbs_speed < 176 ) return -1; CDIO_MMC_SET_LEN16(cdb.field, 2, i_Kbs_speed); /* Some drives like the Creative 24x CDRW require one to set a nonzero write speed or else one gets an error back. Some specifications have setting the value 0xfffff indicate setting to the maximum allowable speed. */ CDIO_MMC_SET_LEN16(cdb.field, 4, 0xffff); return MMC_RUN_CMD(SCSI_MMC_DATA_WRITE, i_timeout_ms); } /** Load or Unload media using a SCSI-MMC START/STOP UNIT command. @param p_cdio the CD object to be acted upon. @param b_eject eject if true and close tray if false @param b_immediate wait or don't wait for operation to complete @param power_condition Set CD-ROM to idle/standby/sleep. If nonzero, eject/load is ignored, so set to 0 if you want to eject or load. @see mmc_eject_media or mmc_close_tray */ driver_return_code_t mmc_start_stop_unit(const CdIo_t *p_cdio, bool b_eject, bool b_immediate, uint8_t power_condition, unsigned int i_timeout_ms) { uint8_t buf[1]; void * p_buf = &buf; const unsigned int i_size = 0; MMC_CMD_SETUP_READ16(CDIO_MMC_GPCMD_START_STOP_UNIT); if (b_immediate) cdb.field[1] |= 1; if (power_condition) cdb.field[4] = power_condition << 4; else { if (b_eject) cdb.field[4] = 2; /* eject */ else cdb.field[4] = 3; /* close tray for tray-type */ } return MMC_RUN_CMD(SCSI_MMC_DATA_WRITE, mmc_timeout_ms); } /** Check if drive is ready using SCSI-MMC TEST UNIT READY command. @param p_cdio the CD object to be acted upon. @return DRIVER_OP_SUCCESS if we ran the command ok. */ driver_return_code_t mmc_test_unit_ready(const CdIo_t *p_cdio, unsigned int i_timeout_ms) { const unsigned int i_size = 0; void * p_buf = NULL; if (0 == i_timeout_ms) i_timeout_ms = mmc_timeout_ms; MMC_CMD_SETUP_READ16(CDIO_MMC_GPCMD_TEST_UNIT_READY); return MMC_RUN_CMD(SCSI_MMC_DATA_NONE, i_timeout_ms); } libcdio-0.83/lib/driver/mmc/mmc_cmd_helper.h0000644000175000017500000000436411334113641015722 00000000000000/* Copyright (C) 2010 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef __CDIO_MMC_CMD_HELPER_H__ #define __CDIO_MMC_CMD_HELPER_H__ /* Boilerplate initialization code to setup running MMC command. We assume variables 'p_cdio', 'p_buf', and 'i_size' are previously defined. It does the following: 1. Defines a cdb variable, 2 Checks to see if we have a cdio object and can run an MMC command 3. zeros the buffer (p_buf) using i_size. 4. Sets up the command field of cdb to passed in value mmc_cmd. */ #define MMC_CMD_SETUP(mmc_cmd) \ mmc_cdb_t cdb = {{0, }}; \ \ if ( ! p_cdio ) return DRIVER_OP_UNINIT; \ if ( ! p_cdio->op.run_mmc_cmd ) return DRIVER_OP_UNSUPPORTED; \ \ CDIO_MMC_SET_COMMAND(cdb.field, mmc_cmd) /* Boilerplate initialization code to setup running MMC read command needs to set the cdb 16-bit length field. See above comment for MMC_CMD_SETUP. */ #define MMC_CMD_SETUP_READ16(mmc_cmd) \ MMC_CMD_SETUP(mmc_cmd); \ \ /* Setup to read header, to get length of data */ \ CDIO_MMC_SET_READ_LENGTH16(cdb.field, i_size) /* Boilerplate code to run a MMC command. We assume variables 'p_cdio', 'mmc_timeout_ms', 'cdb', 'i_size' and 'p_buf' are defined previously. 'direction' is the SCSI direction (read, write, none) of the command. */ #define MMC_RUN_CMD(direction, i_timeout) \ p_cdio->op.run_mmc_cmd(p_cdio->env, \ i_timeout, \ mmc_get_cmd_len(cdb.field[0]), \ &cdb, \ direction, i_size, p_buf) #endif /* __CDIO_MMC_CMD_HELPER_H__ */ libcdio-0.83/lib/driver/mmc/mmc_util.c0000644000175000017500000003231211650123163014563 00000000000000/* Multimedia Command (MMC) "helper" routines that don't depend on anything other than headers. Copyright (C) 2010, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #ifdef HAVE_STDIO_H #include #endif #include #include "mmc_private.h" /** The below variables are trickery to force enum symbol values to be recorded in debug symbol tables. They are used to allow one to refer to the enumeration value names in the typedefs above in a debugger and debugger expressions */ cdio_mmc_feature_t debug_cdio_mmc_feature; cdio_mmc_feature_interface_t debug_cdio_mmc_feature_interface; cdio_mmc_feature_profile_t debug_cdio_mmc_feature_profile; cdio_mmc_get_conf_t debug_cdio_mmc_get_conf; cdio_mmc_gpcmd_t debug_cdio_mmc_gpcmd; cdio_mmc_read_sub_state_t debug_cdio_mmc_read_sub_state; cdio_mmc_read_cd_type_t debug_cdio_mmc_read_cd_type; cdio_mmc_readtoc_t debug_cdio_mmc_readtoc; cdio_mmc_mode_page_t debug_cdio_mmc_mode_page; /** Maps a mmc_sense_key_t into a string name. */ const char mmc_sense_key2str[16][40] = { "No Sense", /**< 0 No specific Sense Key info reported */ "Recovered Error", /**< 1 Completed ok with recovery */ "Not Ready", /**< 2 */ "Medium Error", /**< 3 */ "Hardware Error", /**< 4 */ "Illegal Request", /**< 5 */ "Unit Attention", /**< 6 */ "Data Protect", /**< 7 */ "Blank Check", /**< 8 */ "Vendor Specific", /**< 9 */ "Copy aborted", /**< A */ "Aborted Command", /**< B */ "Obsolete", /**< C */ "Unknown - 13", /**< D */ "Unknown - 14", /**< E */ "Unknown - 15", /**< F */ }; /** The maximum value in milliseconds that we will wait on an MMC command. */ uint32_t mmc_timeout_ms = MMC_TIMEOUT_DEFAULT; /** The maximum value in milliseconds that we will wait on an MMC read command. */ uint32_t mmc_read_timeout_ms = MMC_READ_TIMEOUT_DEFAULT; /*! Return a string containing the name of the audio state as returned from the Q_SUBCHANNEL. */ const char * mmc_audio_state2str( uint8_t i_audio_state ) { switch(i_audio_state) { case CDIO_MMC_READ_SUB_ST_INVALID: return "invalid"; case CDIO_MMC_READ_SUB_ST_PLAY: return "playing"; case CDIO_MMC_READ_SUB_ST_PAUSED: return "paused"; case CDIO_MMC_READ_SUB_ST_COMPLETED: return "completed"; case CDIO_MMC_READ_SUB_ST_ERROR: return "error"; case CDIO_MMC_READ_SUB_ST_NO_STATUS: return "no status"; default: return "unknown"; } } /** On input a MODE_SENSE command was issued and we have the results in p. We interpret this and return a bit mask set according to the capabilities. */ void mmc_get_drive_cap_buf(const uint8_t *p, /*out*/ cdio_drive_read_cap_t *p_read_cap, /*out*/ cdio_drive_write_cap_t *p_write_cap, /*out*/ cdio_drive_misc_cap_t *p_misc_cap) { /* Reader */ if (p[2] & 0x01) *p_read_cap |= CDIO_DRIVE_CAP_READ_CD_R; if (p[2] & 0x02) *p_read_cap |= CDIO_DRIVE_CAP_READ_CD_RW; if (p[2] & 0x08) *p_read_cap |= CDIO_DRIVE_CAP_READ_DVD_ROM; if (p[4] & 0x01) *p_read_cap |= CDIO_DRIVE_CAP_READ_AUDIO; if (p[4] & 0x10) *p_read_cap |= CDIO_DRIVE_CAP_READ_MODE2_FORM1; if (p[4] & 0x20) *p_read_cap |= CDIO_DRIVE_CAP_READ_MODE2_FORM2; if (p[5] & 0x01) *p_read_cap |= CDIO_DRIVE_CAP_READ_CD_DA; if (p[5] & 0x10) *p_read_cap |= CDIO_DRIVE_CAP_READ_C2_ERRS; if (p[5] & 0x20) *p_read_cap |= CDIO_DRIVE_CAP_READ_ISRC; if (p[5] & 0x40) *p_read_cap |= CDIO_DRIVE_CAP_READ_MCN; /* Writer */ if (p[3] & 0x01) *p_write_cap |= CDIO_DRIVE_CAP_WRITE_CD_R; if (p[3] & 0x02) *p_write_cap |= CDIO_DRIVE_CAP_WRITE_CD_RW; if (p[3] & 0x10) *p_write_cap |= CDIO_DRIVE_CAP_WRITE_DVD_R; if (p[3] & 0x20) *p_write_cap |= CDIO_DRIVE_CAP_WRITE_DVD_RAM; if (p[4] & 0x80) *p_misc_cap |= CDIO_DRIVE_CAP_WRITE_BURN_PROOF; /* Misc */ if (p[4] & 0x40) *p_misc_cap |= CDIO_DRIVE_CAP_MISC_MULTI_SESSION; if (p[6] & 0x01) *p_misc_cap |= CDIO_DRIVE_CAP_MISC_LOCK; if (p[6] & 0x08) *p_misc_cap |= CDIO_DRIVE_CAP_MISC_EJECT; if (p[6] >> 5 != 0) *p_misc_cap |= CDIO_DRIVE_CAP_MISC_CLOSE_TRAY; } /** Return a string containing the name of the given feature */ const char * mmc_feature2str( int i_feature ) { switch(i_feature) { case CDIO_MMC_FEATURE_PROFILE_LIST: return "Profile List"; case CDIO_MMC_FEATURE_CORE: return "Core"; case CDIO_MMC_FEATURE_MORPHING: return "Morphing" ; case CDIO_MMC_FEATURE_REMOVABLE_MEDIUM: return "Removable Medium"; case CDIO_MMC_FEATURE_WRITE_PROTECT: return "Write Protect"; case CDIO_MMC_FEATURE_RANDOM_READABLE: return "Random Readable"; case CDIO_MMC_FEATURE_MULTI_READ: return "Multi-Read"; case CDIO_MMC_FEATURE_CD_READ: return "CD Read"; case CDIO_MMC_FEATURE_DVD_READ: return "DVD Read"; case CDIO_MMC_FEATURE_RANDOM_WRITABLE: return "Random Writable"; case CDIO_MMC_FEATURE_INCR_WRITE: return "Incremental Streaming Writable"; case CDIO_MMC_FEATURE_SECTOR_ERASE: return "Sector Erasable"; case CDIO_MMC_FEATURE_FORMATABLE: return "Formattable"; case CDIO_MMC_FEATURE_DEFECT_MGMT: return "Management Ability of the Logical Unit/media system " "to provide an apparently defect-free space."; case CDIO_MMC_FEATURE_WRITE_ONCE: return "Write Once"; case CDIO_MMC_FEATURE_RESTRICT_OVERW: return "Restricted Overwrite"; case CDIO_MMC_FEATURE_CD_RW_CAV: return "CD-RW CAV Write"; case CDIO_MMC_FEATURE_MRW: return "MRW"; case CDIO_MMC_FEATURE_ENHANCED_DEFECT: return "Enhanced Defect Reporting"; case CDIO_MMC_FEATURE_DVD_PRW: return "DVD+RW"; case CDIO_MMC_FEATURE_DVD_PR: return "DVD+R"; case CDIO_MMC_FEATURE_RIGID_RES_OVERW: return "Rigid Restricted Overwrite"; case CDIO_MMC_FEATURE_CD_TAO: return "CD Track at Once"; case CDIO_MMC_FEATURE_CD_SAO: return "CD Mastering (Session at Once)"; case CDIO_MMC_FEATURE_DVD_R_RW_WRITE: return "DVD-R/RW Write"; case CDIO_MMC_FEATURE_CD_RW_MEDIA_WRITE: return "CD-RW Media Write Support"; case CDIO_MMC_FEATURE_DVD_PR_2_LAYER: return "DVD+R Double Layer"; case CDIO_MMC_FEATURE_POWER_MGMT: return "Initiator- and Device-directed Power Management"; case CDIO_MMC_FEATURE_CDDA_EXT_PLAY: return "CD Audio External Play"; case CDIO_MMC_FEATURE_MCODE_UPGRADE: return "Ability for the device to accept new microcode via the interface"; case CDIO_MMC_FEATURE_TIME_OUT: return "Ability to respond to all commands within a specific time"; case CDIO_MMC_FEATURE_DVD_CSS: return "Ability to perform DVD CSS/CPPM authentication via RPC"; case CDIO_MMC_FEATURE_RT_STREAMING: return "Ability to read and write using Initiator requested performance" " parameters"; case CDIO_MMC_FEATURE_LU_SN: return "The Logical Unit Unique Identifier"; default: { static char buf[100]; if ( 0 != (i_feature & 0xFF00) ) { snprintf( buf, sizeof(buf), "Vendor-specific code %x", i_feature ); } else { snprintf( buf, sizeof(buf), "Unknown code %x", i_feature ); } return buf; } } } /** Return a string containing the name of the given feature profile. */ const char * mmc_feature_profile2str( int i_feature_profile ) { switch(i_feature_profile) { case CDIO_MMC_FEATURE_PROF_NON_REMOVABLE: return "Non-removable"; case CDIO_MMC_FEATURE_PROF_REMOVABLE: return "disk Re-writable; with removable media"; case CDIO_MMC_FEATURE_PROF_MO_ERASABLE: return "Erasable Magneto-Optical disk with sector erase capability"; case CDIO_MMC_FEATURE_PROF_MO_WRITE_ONCE: return "Write Once Magneto-Optical write once"; case CDIO_MMC_FEATURE_PROF_AS_MO: return "Advance Storage Magneto-Optical"; case CDIO_MMC_FEATURE_PROF_CD_ROM: return "Read only Compact Disc capable"; case CDIO_MMC_FEATURE_PROF_CD_R: return "Write once Compact Disc capable"; case CDIO_MMC_FEATURE_PROF_CD_RW: return "CD-RW Re-writable Compact Disc capable"; case CDIO_MMC_FEATURE_PROF_DVD_ROM: return "Read only DVD"; case CDIO_MMC_FEATURE_PROF_DVD_R_SEQ: return "Re-recordable DVD using Sequential recording"; case CDIO_MMC_FEATURE_PROF_DVD_RAM: return "Re-writable DVD"; case CDIO_MMC_FEATURE_PROF_DVD_RW_RO: return "Re-recordable DVD using Restricted Overwrite"; case CDIO_MMC_FEATURE_PROF_DVD_RW_SEQ: return "Re-recordable DVD using Sequential Recording"; case CDIO_MMC_FEATURE_PROF_DVD_R_DL_SEQ: return "DVD-R - Double-Layer Sequential Recording"; case CDIO_MMC_FEATURE_PROF_DVD_R_DL_JR: return "DVD-R - Double-layer Jump Recording"; case CDIO_MMC_FEATURE_PROF_DVD_PRW: return "DVD+RW - DVD Rewritable"; case CDIO_MMC_FEATURE_RIGID_RES_OVERW: return "Rigid Restricted Overwrite"; case CDIO_MMC_FEATURE_PROF_DVD_PR: return "DVD+R - DVD Recordable"; case CDIO_MMC_FEATURE_PROF_DDCD_ROM: return "Read only DDCD"; case CDIO_MMC_FEATURE_PROF_DDCD_R: return "DDCD-R Write only DDCD"; case CDIO_MMC_FEATURE_PROF_DDCD_RW: return "Re-Write only DDCD"; case CDIO_MMC_FEATURE_PROF_DVD_PRW_DL: return "DVD+RW - Double Layer"; case CDIO_MMC_FEATURE_PROF_DVD_PR_DL: return "DVD+R Double Layer - DVD Recordable Double Layer"; case CDIO_MMC_FEATURE_PROF_BD_ROM: return "Blu Ray BD-ROM"; case CDIO_MMC_FEATURE_PROF_BD_SEQ: return "Blu Ray BD-R sequential recording"; case CDIO_MMC_FEATURE_PROF_BD_R_RANDOM: return "Blu Ray BD-R random recording"; case CDIO_MMC_FEATURE_PROF_BD_RE: return "Blu Ray BD-RE"; case CDIO_MMC_FEATURE_PROF_HD_DVD_ROM: return "HD-DVD-ROM"; case CDIO_MMC_FEATURE_PROF_HD_DVD_R: return "HD-DVD-R"; case CDIO_MMC_FEATURE_PROF_HD_DVD_RAM: return "HD-DVD-RAM"; case CDIO_MMC_FEATURE_PROF_NON_CONFORM: return "The Logical Unit does not conform to any Profile"; default: { static char buf[100]; snprintf(buf, sizeof(buf), "Unknown Profile %x", i_feature_profile); return buf; } } } bool mmc_is_disctype_bd (cdio_mmc_feature_profile_t disctype) { switch (disctype) { case CDIO_MMC_FEATURE_PROF_BD_ROM: case CDIO_MMC_FEATURE_PROF_BD_SEQ: case CDIO_MMC_FEATURE_PROF_BD_R_RANDOM: case CDIO_MMC_FEATURE_PROF_BD_RE: return true; default: return false; } } bool mmc_is_disctype_cdrom (cdio_mmc_feature_profile_t disctype) { switch (disctype) { case CDIO_MMC_FEATURE_PROF_CD_ROM: case CDIO_MMC_FEATURE_PROF_CD_R: case CDIO_MMC_FEATURE_PROF_CD_RW: return true; default: return false; } } bool mmc_is_disctype_dvd (cdio_mmc_feature_profile_t disctype) { switch (disctype) { case CDIO_MMC_FEATURE_PROF_DVD_ROM: case CDIO_MMC_FEATURE_PROF_DVD_RAM: case CDIO_MMC_FEATURE_PROF_DVD_R_SEQ: case CDIO_MMC_FEATURE_PROF_DVD_RW_RO: case CDIO_MMC_FEATURE_PROF_DVD_RW_SEQ: case CDIO_MMC_FEATURE_PROF_DVD_R_DL_SEQ: case CDIO_MMC_FEATURE_PROF_DVD_R_DL_JR: case CDIO_MMC_FEATURE_PROF_DVD_PRW: case CDIO_MMC_FEATURE_PROF_DVD_PR: case CDIO_MMC_FEATURE_PROF_DVD_PRW_DL: case CDIO_MMC_FEATURE_PROF_DVD_PR_DL: return true; default: return false; } } bool mmc_is_disctype_hd_dvd (cdio_mmc_feature_profile_t disctype) { switch (disctype) { case CDIO_MMC_FEATURE_PROF_HD_DVD_ROM: case CDIO_MMC_FEATURE_PROF_HD_DVD_R: case CDIO_MMC_FEATURE_PROF_HD_DVD_RAM: return true; default: return false; } } bool mmc_is_disctype_overwritable (cdio_mmc_feature_profile_t disctype) { switch (disctype) { case CDIO_MMC_FEATURE_PROF_DVD_RW_RO: case CDIO_MMC_FEATURE_PROF_DVD_R_DL_JR: case CDIO_MMC_FEATURE_PROF_DVD_PRW: case CDIO_MMC_FEATURE_PROF_DVD_PRW_DL: case CDIO_MMC_FEATURE_PROF_BD_R_RANDOM: /* pseudo-overwritable */ case CDIO_MMC_FEATURE_PROF_BD_RE: case CDIO_MMC_FEATURE_PROF_HD_DVD_RAM: return true; default: return false; } } bool mmc_is_disctype_rewritable (cdio_mmc_feature_profile_t disctype) { /* discs that need blanking before re-use */ if (mmc_is_disctype_overwritable (disctype)) return true; switch (disctype) { case CDIO_MMC_FEATURE_PROF_CD_RW: case CDIO_MMC_FEATURE_PROF_DVD_RW_SEQ: case CDIO_MMC_FEATURE_PROF_BD_SEQ: return true; default: return false; } } libcdio-0.83/lib/driver/mmc/mmc_private.h0000644000175000017500000001170611330424347015274 00000000000000/* private MMC helper routines. Copyright (C) 2004, 2005, 2006, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include #include "cdtext_private.h" /*! Convert milliseconds to seconds taking the ceiling value, i.e. 1002 milliseconds gets rounded to 2 seconds. */ #define SECS2MSECS 1000 static inline unsigned int msecs2secs(unsigned int msecs) { return (msecs+(SECS2MSECS-1)) / SECS2MSECS; } #undef SECS2MSECS /*********************************************************** MMC CdIo Operations which a driver may use. These are not directly user-accessible. ************************************************************/ /*! Read Audio Subchannel information @param p_user_data the CD object to be acted upon. */ driver_return_code_t audio_read_subchannel_mmc ( void *p_user_data, cdio_subchannel_t *p_subchannel); /*! Get the block size for subsequest read requests, via a SCSI MMC MODE_SENSE 6 command. */ int get_blocksize_mmc (void *p_user_data); /*! Get the lsn of the end of the CD @return the lsn. On error return CDIO_INVALID_LSN. */ lsn_t get_disc_last_lsn_mmc( void *p_user_data ); void get_drive_cap_mmc (const void *p_user_data, /*out*/ cdio_drive_read_cap_t *p_read_cap, /*out*/ cdio_drive_write_cap_t *p_write_cap, /*out*/ cdio_drive_misc_cap_t *p_misc_cap); int get_media_changed_mmc (const void *p_user_data); char *get_mcn_mmc (const void *p_user_data); driver_return_code_t get_tray_status (const void *p_user_data); /*! Read just the user data part of some sort of data sector (via mmc_read_cd). @param p_user_data object to read from @param p_buf place to read data into. The caller should make sure this location can store at least CDIO_CD_FRAMESIZE, M2RAW_SECTOR_SIZE, or M2F2_SECTOR_SIZE depending on the kind of sector getting read. If you don't know whether you have a Mode 1/2, Form 1/ Form 2/Formless sector best to reserve space for the maximum, M2RAW_SECTOR_SIZE. @param i_lsn sector to read @param i_blocksize size of block. Should be either CDIO_CD_FRAMESIZE, M2RAW_SECTOR_SIZE, or M2F2_SECTOR_SIZE. See comment above under p_buf. */ driver_return_code_t read_data_sectors_mmc ( void *p_user_data, void *p_buf, lsn_t i_lsn, uint16_t i_blocksize, uint32_t i_blocks ); char *get_mcn_mmc (const void *p_user_data); /* Set read blocksize (via MMC) */ driver_return_code_t set_blocksize_mmc (void *p_user_data, uint16_t i_blocksize); /* Set the drive speed in CD-ROM speed units (via MMC). */ driver_return_code_t set_drive_speed_mmc (void *p_user_data, int i_speed); /* Set CD-ROM drive speed in K bytes per second. (via MMC) */ driver_return_code_t set_speed_mmc (void *p_user_data, int i_Kbs_speed); /*********************************************************** Miscellaenous other "private" routines. Probably need to better classify these. ************************************************************/ typedef driver_return_code_t (*mmc_run_cmd_fn_t) ( void *p_user_data, unsigned int i_timeout_ms, unsigned int i_cdb, const mmc_cdb_t *p_cdb, cdio_mmc_direction_t e_direction, unsigned int i_buf, /*in/out*/ void *p_buf ); int mmc_set_blocksize_mmc_private ( const void *p_env, const mmc_run_cmd_fn_t run_mmc_cmd, uint16_t i_blocksize ); /*! Get the DVD type associated with cd object. */ discmode_t mmc_get_dvd_struct_physical_private ( void *p_env, mmc_run_cmd_fn_t run_mmc_cmd, cdio_dvd_struct_t *s ); char *mmc_get_mcn_private ( void *p_env, mmc_run_cmd_fn_t run_mmc_cmd ); bool mmc_init_cdtext_private ( void *p_user_data, mmc_run_cmd_fn_t run_mmc_cmd, set_cdtext_field_fn_t set_cdtext_field_fn ); /*! On input a MODE_SENSE command was issued and we have the results in p. We interpret this and return a bit mask set according to the capabilities. */ void mmc_get_drive_cap_buf(const uint8_t *p, /*out*/ cdio_drive_read_cap_t *p_read_cap, /*out*/ cdio_drive_write_cap_t *p_write_cap, /*out*/ cdio_drive_misc_cap_t *p_misc_cap); driver_return_code_t mmc_set_blocksize_private ( void *p_env, const mmc_run_cmd_fn_t run_mmc_cmd, uint16_t i_blocksize); libcdio-0.83/lib/driver/mmc/mmc_hl_cmds.c0000644000175000017500000001553611650123114015224 00000000000000/* "Higher-level" Multimedia Command (MMC) commands which build on the "lower-level" commands. Copyright (C) 2010, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include /** Close tray using a MMC START STOP UNIT command. @param p_cdio the CD object to be acted upon. @return DRIVER_OP_SUCCESS (0) if we got the status. return codes are the same as driver_return_code_t */ driver_return_code_t mmc_close_tray(CdIo_t *p_cdio) { return mmc_start_stop_unit(p_cdio, false, false, 0, 0); } /** Eject using MMC commands. If CD-ROM is "locked" we'll unlock it. Command is not "immediate" -- we'll wait for the command to complete. For a more general (and lower-level) routine, @see mmc_start_stop_media. @param p_cdio the CD object to be acted upon. @return DRIVER_OP_SUCCESS (0) if we got the status. return codes are the same as driver_return_code_t */ driver_return_code_t mmc_eject_media( const CdIo_t *p_cdio ) { int i_status = 0; i_status = mmc_prevent_allow_medium_removal(p_cdio, false, false, 0); if (0 != i_status) return i_status; return mmc_start_stop_unit(p_cdio, true, false, 0, 0); } /** Detects if a disc (CD or DVD) is erasable or not. @param p_user_data the CD object to be acted upon. @param b_erasable, if not NULL, on return will be set indicate whether the operation was a success (DRIVER_OP_SUCCESS) or if not to some other value. @return true if the disc is detected as erasable (rewritable), false otherwise. */ /* From Frank Endres: */ driver_return_code_t mmc_get_disc_erasable(const CdIo_t *p_cdio, bool *b_erasable) { uint8_t buf[42] = { 0, }; driver_return_code_t i_status; i_status = mmc_read_disc_information(p_cdio, buf, sizeof(buf), CDIO_MMC_READ_DISC_INFO_STANDARD, 0); *b_erasable = (DRIVER_OP_SUCCESS == i_status) ? (*b_erasable = ((buf[2] & 0x10) ? true : false)) : false; return i_status; } /* From Frank Endres: */ /** Detects the disc type using the SCSI-MMC GET CONFIGURATION command. @param p_cdio the CD object to be acted upon. @param i_status, if not NULL, on return will be set indicate whether the operation was a success (DRIVER_OP_SUCCESS) or if not to some other value. @param p_disctype the disc type set on success. @return DRIVER_OP_SUCCESS (0) if we got the status. return codes are the same as driver_return_code_t */ driver_return_code_t mmc_get_disctype( const CdIo_t *p_cdio, unsigned int i_timeout_ms, cdio_mmc_feature_profile_t *p_disctype) { uint8_t buf[500] = { 0, }; driver_return_code_t i_status; if (0 == i_timeout_ms) i_timeout_ms = mmc_timeout_ms; i_status = mmc_get_configuration(p_cdio, &buf, sizeof(buf), CDIO_MMC_GET_CONF_ALL_FEATURES, 0, i_timeout_ms); if (DRIVER_OP_SUCCESS == i_status) { uint8_t *p, *q; uint8_t profiles_list_length; uint16_t profile_number; bool profile_active; /* there is always a profile list feature listed at the first place of the features list */ p = buf + 8; profiles_list_length = p[3]; q = p+4; *p_disctype = CDIO_MMC_FEATURE_PROF_NON_CONFORM; while ((CDIO_MMC_FEATURE_PROF_NON_CONFORM == *p_disctype) && (q < p + profiles_list_length)) { profile_number = CDIO_MMC_GET_LEN16(q); profile_active = q[2] & 0x01; if (profile_active) switch (profile_number) { case CDIO_MMC_FEATURE_PROF_CD_ROM: case CDIO_MMC_FEATURE_PROF_CD_R: case CDIO_MMC_FEATURE_PROF_CD_RW: case CDIO_MMC_FEATURE_PROF_DVD_ROM: case CDIO_MMC_FEATURE_PROF_DVD_R_SEQ: case CDIO_MMC_FEATURE_PROF_DVD_RAM: case CDIO_MMC_FEATURE_PROF_DVD_RW_RO: case CDIO_MMC_FEATURE_PROF_DVD_RW_SEQ: case CDIO_MMC_FEATURE_PROF_DVD_R_DL_SEQ: case CDIO_MMC_FEATURE_PROF_DVD_R_DL_JR: case CDIO_MMC_FEATURE_PROF_DVD_PRW: case CDIO_MMC_FEATURE_PROF_DVD_PR: case CDIO_MMC_FEATURE_PROF_DVD_PRW_DL: case CDIO_MMC_FEATURE_PROF_DVD_PR_DL: case CDIO_MMC_FEATURE_PROF_BD_ROM: case CDIO_MMC_FEATURE_PROF_BD_SEQ: case CDIO_MMC_FEATURE_PROF_BD_R_RANDOM: case CDIO_MMC_FEATURE_PROF_BD_RE: case CDIO_MMC_FEATURE_PROF_HD_DVD_ROM: case CDIO_MMC_FEATURE_PROF_HD_DVD_R: case CDIO_MMC_FEATURE_PROF_HD_DVD_RAM: *p_disctype = (cdio_mmc_feature_profile_t) profile_number; break; } q += 4; } } return i_status; } /** Run a SCSI-MMC MMC MODE SENSE command (6- or 10-byte version) and put the results in p_buf @param p_cdio the CD object to be acted upon. @param p_buf pointer to location to store mode sense information @param i_size number of bytes allocated to p_buf @param page which "page" of the mode sense command we are interested in @return DRIVER_OP_SUCCESS if we ran the command ok. */ driver_return_code_t mmc_mode_sense(CdIo_t *p_cdio, /*out*/ void *p_buf, unsigned int i_size, int page) { /* We used to make a choice as to which routine we'd use based cdio_have_atapi(). But since that calls this in its determination, we had an infinite recursion. So we can't use cdio_have_atapi() (until we put in better capability checks.) */ if ( DRIVER_OP_SUCCESS == mmc_mode_sense_6(p_cdio, p_buf, i_size, page) ) return DRIVER_OP_SUCCESS; return mmc_mode_sense_10(p_cdio, p_buf, i_size, page); } /** Set the drive speed in CD-ROM speed units. @param p_cdio CD structure set by cdio_open(). @param i_drive_speed speed in CD-ROM speed units. Note this not Kbytes/sec as would be used in the MMC spec or in mmc_set_speed(). To convert CD-ROM speed units to Kbs, multiply the number by 176 (for raw data) and by 150 (for filesystem data). On many CD-ROM drives, specifying a value too large will result in using the fastest speed. @return the drive speed if greater than 0. -1 if we had an error. is -2 returned if this is not implemented for the current driver. @see cdio_set_speed and mmc_set_speed */ driver_return_code_t mmc_set_drive_speed( const CdIo_t *p_cdio, int i_drive_speed ) { return mmc_set_speed(p_cdio, i_drive_speed * 176, 0); } libcdio-0.83/lib/driver/image_common.c0000644000175000017500000002354111650124057014637 00000000000000/* Copyright (C) 2004, 2005, 2008, 2010, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /*! Common image routines. Because _img_private_t may vary over image formats, the routines are included into the image drivers after _img_private_t is defined. In order for the below routines to work, there is a large part of _img_private_t that is common among image drivers. For example, see image.h */ #include "image.h" #include "image_common.h" #include "_cdio_stdio.h" #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif /*! Eject media -- there's nothing to do here except free resources. We always return DRIVER_OP_UNSUPPORTED. */ driver_return_code_t _eject_media_image(void *p_user_data) { _free_image (p_user_data); return DRIVER_OP_UNSUPPORTED; } /*! We don't need the image any more. Free all memory associated with it. */ void _free_image (void *p_user_data) { _img_private_t *p_env = p_user_data; track_t i_track; if (NULL == p_env) return; for (i_track=0; i_track < p_env->gen.i_tracks; i_track++) { track_info_t *p_tocent = &(p_env->tocent[i_track]); free_if_notnull(p_tocent->filename); free_if_notnull(p_tocent->isrc); cdtext_destroy(&(p_tocent->cdtext)); if (p_tocent->data_source) cdio_stdio_destroy(p_tocent->data_source); } free_if_notnull(p_env->psz_mcn); free_if_notnull(p_env->psz_cue_name); free_if_notnull(p_env->psz_access_mode); cdtext_destroy(&(p_env->gen.cdtext)); cdio_generic_stdio_free(p_env); free(p_env); } /*! Return the value associated with the key "arg". */ const char * _get_arg_image (void *user_data, const char key[]) { _img_private_t *p_env = user_data; if (!strcmp (key, "source")) { return p_env->gen.source_name; } else if (!strcmp (key, "cue")) { return p_env->psz_cue_name; } else if (!strcmp(key, "access-mode")) { return "image"; } else if (!strcmp (key, "mmc-supported?")) { return "false"; } return NULL; } /*! Get disc type associated with cd_obj. */ discmode_t _get_discmode_image (void *p_user_data) { _img_private_t *p_env = p_user_data; return p_env->disc_mode; } /*! Return the the kind of drive capabilities of device. */ void _get_drive_cap_image (const void *user_data, cdio_drive_read_cap_t *p_read_cap, cdio_drive_write_cap_t *p_write_cap, cdio_drive_misc_cap_t *p_misc_cap) { *p_read_cap = CDIO_DRIVE_CAP_READ_CD_DA | CDIO_DRIVE_CAP_READ_CD_G | CDIO_DRIVE_CAP_READ_CD_R | CDIO_DRIVE_CAP_READ_CD_RW | CDIO_DRIVE_CAP_READ_MODE2_FORM1 | CDIO_DRIVE_CAP_READ_MODE2_FORM2 | CDIO_DRIVE_CAP_READ_MCN ; *p_write_cap = 0; /* In the future we may want to simulate LOCK, OPEN_TRAY, CLOSE_TRAY, SELECT_SPEED, etc. */ *p_misc_cap = CDIO_DRIVE_CAP_MISC_FILE; } /*! Return the number of of the first track. CDIO_INVALID_TRACK is returned on error. */ track_t _get_first_track_num_image(void *p_user_data) { _img_private_t *p_env = p_user_data; return p_env->gen.i_first_track; } /*! Find out if media has changed since the last call. @param p_user_data the CD object to be acted upon. @return 1 if media has changed since last call, 0 if not. Error return codes are the same as driver_return_code_t There is no such thing as changing a media image so we will always return 0 - no change. */ int get_media_changed_image(const void *p_user_data) { return 0; } /*! Return the media catalog number (MCN) from the CD or NULL if there is none or we don't have the ability to get it. Note: string is malloc'd so caller has to free() the returned string when done with it. */ char * _get_mcn_image(const void *p_user_data) { const _img_private_t *p_env = p_user_data; if (!p_env || !p_env->psz_mcn) return NULL; return strdup(p_env->psz_mcn); } /*! Return the number of tracks. */ track_t _get_num_tracks_image(void *p_user_data) { _img_private_t *p_env = p_user_data; return p_env->gen.i_tracks; } /*! Return the starting MSF (minutes/secs/frames) for the track number track_num in obj. Tracks numbers start at 1. The "leadout" track is specified either by using track_num LEADOUT_TRACK or the total tracks+1. */ bool _get_track_msf_image(void *p_user_data, track_t i_track, msf_t *msf) { const _img_private_t *p_env = p_user_data; if (NULL == msf) return false; if (i_track == CDIO_CDROM_LEADOUT_TRACK) i_track = p_env->gen.i_tracks+1; if (i_track <= p_env->gen.i_tracks+1 && i_track != 0) { *msf = p_env->tocent[i_track-p_env->gen.i_first_track].start_msf; return true; } else return false; } /*! Return number of channels in track: 2 or 4; -2 if not implemented or -1 for error. Not meaningful if track is not an audio track. */ int get_track_channels_image(const void *p_user_data, track_t i_track) { const _img_private_t *p_env = p_user_data; return ( p_env->tocent[i_track-p_env->gen.i_first_track].flags & FOUR_CHANNEL_AUDIO ) ? 4 : 2; } /*! Return 1 if copy is permitted on the track, 0 if not, or -1 for error. Is this meaningful if not an audio track? */ track_flag_t get_track_copy_permit_image(void *p_user_data, track_t i_track) { const _img_private_t *p_env = p_user_data; return ( p_env->tocent[i_track-p_env->gen.i_first_track].flags & COPY_PERMITTED ) ? CDIO_TRACK_FLAG_TRUE : CDIO_TRACK_FLAG_FALSE; } /*! Return 1 if track has pre-emphasis, 0 if not, or -1 for error. Is this meaningful if not an audio track? pre-emphasis is a non linear frequency response. */ track_flag_t get_track_preemphasis_image(const void *p_user_data, track_t i_track) { const _img_private_t *p_env = p_user_data; return ( p_env->tocent[i_track-p_env->gen.i_first_track].flags & PRE_EMPHASIS ) ? CDIO_TRACK_FLAG_TRUE : CDIO_TRACK_FLAG_FALSE; } /*! Return the starting LBA for the pregap for track number i_track. Track numbers start at 1. CDIO_INVALID_LBA is returned on error. */ lba_t get_track_pregap_lba_image(const void *p_user_data, track_t i_track) { const _img_private_t *p_env = p_user_data; lba_t pregap, start_lba; pregap = p_env->tocent[i_track-p_env->gen.i_first_track].pregap; start_lba = p_env->tocent[i_track-p_env->gen.i_first_track].start_lba; /* avoid initializing pregap to CDIO_INVALID_LBA by letting calloc do the work. also, nero files have the pregap set equal to the start of the track when there is no pregap */ if (!pregap || pregap == start_lba) { pregap = CDIO_INVALID_LBA; } return pregap; } /*! Return the International Standard Recording Code (ISRC) for track number i_track in p_cdio. Track numbers start at 1. Note: string is malloc'd so caller has to free() the returned string when done with it. */ char * get_track_isrc_image(const void *p_user_data, track_t i_track) { const _img_private_t *p_env = p_user_data; char *isrc = p_env->tocent[i_track-p_env->gen.i_first_track].isrc; if (isrc && isrc[0]) { return strdup(isrc); } else { return NULL; } } /*! Read a data sector @param p_cdio object to read from @param p_buf place to read data into. The caller should make sure this location can store at least ISO_BLOCKSIZE, M2RAW_SECTOR_SIZE, or M2F2_SECTOR_SIZE depending on the kind of sector getting read. If you don't know whether you have a Mode 1/2, Form 1/ Form 2/Formless sector best to reserve space for the maximum, M2RAW_SECTOR_SIZE. @param i_lsn sector to read @param i_blocksize size of block. Should be either ISO_BLOCKSIZE M2RAW_SECTOR_SIZE, or M2F2_SECTOR_SIZE. See comment above under p_buf. */ driver_return_code_t read_data_sectors_image ( void *p_user_data, void *p_buf, lsn_t i_lsn, uint16_t i_blocksize, uint32_t i_blocks ) { const _img_private_t *p_env = p_user_data; if (!p_env || !p_env->gen.cdio) return DRIVER_OP_UNINIT; { CdIo_t *p_cdio = p_env->gen.cdio; track_t i_track = cdio_get_track(p_cdio, i_lsn); track_format_t e_track_format = cdio_get_track_format(p_cdio, i_track); switch(e_track_format) { case TRACK_FORMAT_PSX: case TRACK_FORMAT_AUDIO: case TRACK_FORMAT_ERROR: return DRIVER_OP_ERROR; case TRACK_FORMAT_DATA: return cdio_read_mode1_sectors (p_cdio, p_buf, i_lsn, false, i_blocks); case TRACK_FORMAT_CDI: case TRACK_FORMAT_XA: return cdio_read_mode2_sectors (p_cdio, p_buf, i_lsn, false, i_blocks); } } return DRIVER_OP_ERROR; } /*! Set the arg "key" with "value" in the source device. Currently "source" to set the source device in I/O operations is the only valid key. */ driver_return_code_t _set_arg_image (void *p_user_data, const char key[], const char value[]) { _img_private_t *p_env = p_user_data; if (!strcmp (key, "source")) { free_if_notnull (p_env->gen.source_name); if (!value) return DRIVER_OP_ERROR; p_env->gen.source_name = strdup (value); } else if (!strcmp (key, "cue")) { free_if_notnull (p_env->psz_cue_name); if (!value) return DRIVER_OP_ERROR; p_env->psz_cue_name = strdup (value); } else if (!strcmp (key, "access-mode")) { free_if_notnull (p_env->psz_access_mode); if (!value) return DRIVER_OP_ERROR; p_env->psz_access_mode = strdup (value); } else return DRIVER_OP_ERROR; return DRIVER_OP_SUCCESS; } libcdio-0.83/lib/driver/bsdi.c0000644000175000017500000006707111650122140013123 00000000000000/* $Id: bsdi.c,v 1.15 2008/04/22 15:29:11 karl Exp $ Copyright (C) 2002, 2003, 2004, 2005, 2008 Rocky Bernstein Copyright (C) 2001 Herbert Valerio Riedel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* This file contains BSDI-specific code and implements low-level control of the CD drive. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif static const char _rcsid[] = "$Id: bsdi.c,v 1.15 2008/04/22 15:29:11 karl Exp $"; #include #include #include #include "cdio_assert.h" #include "cdio_private.h" #define DEFAULT_CDIO_DEVICE "/dev/rsr0c" #include #ifdef HAVE_BSDI_CDROM #include #include #include #include #include /*#define USE_ETC_FSTAB*/ #ifdef USE_ETC_FSTAB #include #endif #include #include #include #include #include #include #include "cdtext_private.h" #include /* This function is in the man page but seems to be missing from the above include (on Steve Schultz BSDI box). */ extern int cdpause(struct cdinfo *cdinfo, int pause_resume); typedef enum { _AM_NONE, _AM_IOCTL, } access_mode_t; typedef struct { /* Things common to all drivers like this. This must be first. */ generic_img_private_t gen; access_mode_t access_mode; /* Some of the more OS specific things. */ /* Track information */ struct cdrom_tochdr tochdr; struct cdrom_tocentry tocent[CDIO_CD_MAX_TRACKS+1]; struct cdinfo * p_cdinfo; } _img_private_t; /* Define the Cdrom Generic Command structure */ typedef struct cgc { mmc_cdb_t cdb; u_char *buf; int buflen; int rw; unsigned int timeout; scsi_user_sense_t *sus; } cgc_t; static bool get_track_msf_bsdi(void *p_user_data, track_t i_track, msf_t *msf); static lsn_t get_disc_last_lsn_bsdi (void *p_user_data); /* This code adapted from Steven M. Schultz's libdvd */ static driver_return_code_t run_mmc_cmd_bsdi(void *p_user_data, unsigned int i_timeout_ms, unsigned int i_cdb, const mmc_cdb_t *p_cdb, cdio_mmc_direction_t e_direction, unsigned int i_buf, /*in/out*/ void *p_buf ) { const _img_private_t *p_env = p_user_data; int i_status, i_asc; struct scsi_user_cdb suc; struct scsi_sense *sp; again: suc.suc_flags = SCSI_MMC_DATA_READ == e_direction ? SUC_READ : SUC_WRITE; suc.suc_cdblen = i_cdb; memcpy(suc.suc_cdb, p_cdb, i_cdb); suc.suc_data = p_buf; suc.suc_datalen = i_buf; suc.suc_timeout = msecs2secs(i_timeout_ms); if (ioctl(p_env->gen.fd, SCSIRAWCDB, &suc) == -1) return(errno); i_status = suc.suc_sus.sus_status; #if 0 /* * If the device returns a scsi sense error and debugging is enabled print * some hopefully useful information on stderr. */ if (i_status && debug) { unsigned char *cp; int i; cp = suc.suc_sus.sus_sense; fprintf(stderr,"i_status = %x cdb =", i_status); for (i = 0; i < cdblen; i++) fprintf(stderr, " %x", cgc->cdb[i]); fprintf(stderr, "\nsense ="); for (i = 0; i < 16; i++) fprintf(stderr, " %x", cp[i]); fprintf(stderr, "\n"); } #endif /* * HACK! Some drives return a silly "medium changed" on the first * command AND a non-zero i_status which gets turned into a fatal * (EIO) error even though the operation was a success. Retrying * the operation clears the media changed status and gets the * answer. */ sp = (struct scsi_sense *)&suc.suc_sus.sus_sense; i_asc = XSENSE_ASC(sp); if (i_status == STS_CHECKCOND && i_asc == 0x28) goto again; #if 0 if (cgc->sus) memcpy(cgc->sus, &suc.suc_sus, sizeof (struct scsi_user_sense)); #endif return(i_status); } /* Check a drive to see if it is a CD-ROM Return 1 if a CD-ROM. 0 if it exists but isn't a CD-ROM drive and -1 if no device exists . */ static bool cdio_is_cdrom(char *drive, char *mnttype) { bool is_cd=false; int cdfd; struct cdrom_tochdr tochdr; /* If it doesn't exist, return -1 */ if ( !cdio_is_device_quiet_generic(drive) ) { return(false); } /* If it does exist, verify that it's an available CD-ROM */ cdfd = open(drive, (O_RDONLY|O_EXCL|O_NONBLOCK), 0); /* Should we want to test the condition in more detail: ENOENT is the error for /dev/xxxxx does not exist; ENODEV means there's no drive present. */ if ( cdfd >= 0 ) { if ( ioctl(cdfd, CDROMREADTOCHDR, &tochdr) != -1 ) { is_cd = true; } close(cdfd); } /* Even if we can't read it, it might be mounted */ else if ( mnttype && (strcmp(mnttype, "cd9660") == 0) ) { is_cd = true; } return(is_cd); } /*! Initialize CD device. */ static bool _cdio_init (_img_private_t *p_env) { if (p_env->gen.init) { cdio_warn ("init called more than once"); return false; } p_env->gen.fd = open (p_env->gen.source_name, O_RDONLY|O_NONBLOCK, 0); if (p_env->gen.fd < 0) { cdio_warn ("open (%s): %s", p_env->gen.source_name, strerror (errno)); return false; } p_env->gen.init = true; p_env->gen.toc_init = false; return true; } /*! Get the volume of an audio CD. @param p_cdio the CD object to be acted upon. */ #if 0 static driver_return_code_t audio_get_volume_bsdi (void *p_user_data, /*out*/ cdio_audio_volume_t *p_volume) { const _img_private_t *p_env = p_user_data; return ioctl(p_env->gen.fd, CDROMVOLREAD, p_volume); } #endif /*! Pause playing CD through analog output @param p_cdio the CD object to be acted upon. */ static driver_return_code_t audio_pause_bsdi (void *p_user_data) { _img_private_t *p_env = p_user_data; if (!p_env->p_cdinfo) { p_env->p_cdinfo = cdopen(p_env->gen.source_name); if (!p_env->p_cdinfo) return DRIVER_OP_ERROR; } return cdpause(p_env->p_cdinfo, 0); } /*! Playing starting at given MSF through analog output @param p_cdio the CD object to be acted upon. */ static driver_return_code_t audio_play_msf_bsdi (void *p_user_data, msf_t *p_start_msf, msf_t *p_end_msf) { _img_private_t *p_env = p_user_data; lsn_t i_start_lsn = cdio_msf_to_lba(p_start_msf); lsn_t i_end_lsn = cdio_msf_to_lba(p_end_msf); if (!p_env->p_cdinfo) { p_env->p_cdinfo = cdopen(p_env->gen.source_name); if (!p_env->p_cdinfo) return DRIVER_OP_ERROR; } return cdplay(p_env->p_cdinfo, i_start_lsn, i_end_lsn); } /*! Playing CD through analog output at the desired track and index @param p_cdio the CD object to be acted upon. @param p_track_index location to start/end. */ static driver_return_code_t audio_play_track_index_bsdi (void *p_user_data, cdio_track_index_t *p_track_index) { _img_private_t *p_env = p_user_data; msf_t start_msf; msf_t end_msf; lsn_t i_start_lsn = cdio_msf_to_lsn(&start_msf); lsn_t i_end_lsn = cdio_msf_to_lsn(&end_msf); if (!p_env->p_cdinfo) { p_env->p_cdinfo = cdopen(p_env->gen.source_name); if (!p_env->p_cdinfo) return DRIVER_OP_ERROR; } get_track_msf_bsdi(p_user_data, p_track_index->i_start_track, &start_msf); get_track_msf_bsdi(p_user_data, p_track_index->i_end_track, &end_msf); return cdplay(p_env->p_cdinfo, i_start_lsn, i_end_lsn); } /*! Read Audio Subchannel information @param p_cdio the CD object to be acted upon. */ static driver_return_code_t audio_read_subchannel_bsdi (void *p_user_data, cdio_subchannel_t *p_subchannel) { int i_rc; _img_private_t *p_env = p_user_data; struct cdstatus cdstat; if (!p_env->p_cdinfo) { p_env->p_cdinfo = cdopen(p_env->gen.source_name); if (!p_env->p_cdinfo) return DRIVER_OP_ERROR; } i_rc = cdstatus(p_env->p_cdinfo, &cdstat); if (0 == i_rc) { msf_t msf; p_subchannel->control = cdstat.control; p_subchannel->track = cdstat.track_num; p_subchannel->index = cdstat.index_num; cdio_lba_to_msf(cdstat.abs_frame, &msf); p_subchannel->abs_addr.m = cdio_to_bcd8(msf.m); p_subchannel->abs_addr.s = cdio_to_bcd8(msf.s); p_subchannel->abs_addr.f = cdio_to_bcd8(msf.f); cdio_lsn_to_msf(cdstat.rel_frame, &msf); p_subchannel->rel_addr.m = cdio_to_bcd8(msf.m); p_subchannel->rel_addr.s = cdio_to_bcd8(msf.s); p_subchannel->rel_addr.f = cdio_to_bcd8(msf.f); switch(cdstat.state) { case cdstate_unknown: p_subchannel->audio_status = CDIO_MMC_READ_SUB_ST_NO_STATUS; break; case cdstate_stopped: p_subchannel->audio_status = CDIO_MMC_READ_SUB_ST_COMPLETED; break; case cdstate_playing: p_subchannel->audio_status = CDIO_MMC_READ_SUB_ST_PLAY; break; case cdstate_paused: p_subchannel->audio_status = CDIO_MMC_READ_SUB_ST_PAUSED; break; default: p_subchannel->audio_status = CDIO_MMC_READ_SUB_ST_INVALID; } } return i_rc; } /*! Resume playing an audio CD. @param p_cdio the CD object to be acted upon. */ static driver_return_code_t audio_resume_bsdi (void *p_user_data) { _img_private_t *p_env = p_user_data; if (!p_env->p_cdinfo) { p_env->p_cdinfo = cdopen(p_env->gen.source_name); if (!p_env->p_cdinfo) return DRIVER_OP_ERROR; } return cdpause(p_env->p_cdinfo, 1); } /*! Set the volume of an audio CD. We use only the first (port 0) volume level. @param p_cdio the CD object to be acted upon. */ static driver_return_code_t audio_set_volume_bsdi (void *p_user_data, cdio_audio_volume_t *p_volume) { _img_private_t *p_env = p_user_data; if (!p_env->p_cdinfo) { p_env->p_cdinfo = cdopen(p_env->gen.source_name); if (!p_env->p_cdinfo) return DRIVER_OP_ERROR; } /* Convert volume from 0..255 into 0..100. */ return cdvolume(p_env->p_cdinfo, (p_volume->level[0]*100+128) / 256); } /*! Stop playing an audio CD. @param p_user_data the CD object to be acted upon. */ static driver_return_code_t audio_stop_bsdi (void *p_user_data) { _img_private_t *p_env = p_user_data; if (!p_env->p_cdinfo) { p_env->p_cdinfo = cdopen(p_env->gen.source_name); if (!p_env->p_cdinfo) return DRIVER_OP_ERROR; } return cdstop(p_env->p_cdinfo); } /* Read audio sectors */ static driver_return_code_t _read_audio_sectors_bsdi (void *user_data, void *data, lsn_t lsn, uint32_t i_blocks) { char buf[CDIO_CD_FRAMESIZE_RAW] = { 0, }; struct cdrom_msf *msf = (struct cdrom_msf *) &buf; msf_t _msf; _img_private_t *p_env = user_data; cdio_lba_to_msf (cdio_lsn_to_lba(lsn), &_msf); msf->cdmsf_min0 = cdio_from_bcd8(_msf.m); msf->cdmsf_sec0 = cdio_from_bcd8(_msf.s); msf->cdmsf_frame0 = cdio_from_bcd8(_msf.f); if (p_env->gen.ioctls_debugged == 75) cdio_debug ("only displaying every 75th ioctl from now on"); if (p_env->gen.ioctls_debugged == 30 * 75) cdio_debug ("only displaying every 30*75th ioctl from now on"); if (p_env->gen.ioctls_debugged < 75 || (p_env->gen.ioctls_debugged < (30 * 75) && p_env->gen.ioctls_debugged % 75 == 0) || p_env->gen.ioctls_debugged % (30 * 75) == 0) cdio_debug ("reading %2.2d:%2.2d:%2.2d", msf->cdmsf_min0, msf->cdmsf_sec0, msf->cdmsf_frame0); p_env->gen.ioctls_debugged++; switch (p_env->access_mode) { case _AM_NONE: cdio_warn ("no way to read audio"); return 1; break; case _AM_IOCTL: { unsigned int i; for (i=0; i < i_blocks; i++) { if (ioctl (p_env->gen.fd, CDROMREADRAW, &buf) == -1) { perror ("ioctl()"); return 1; /* exit (EXIT_FAILURE); */ } memcpy (((char *)data) + (CDIO_CD_FRAMESIZE_RAW * i), buf, CDIO_CD_FRAMESIZE_RAW); } break; } } return DRIVER_OP_SUCCESS; } /*! Reads a single mode1 sector from cd device into data starting from lsn. Returns 0 if no error. */ static driver_return_code_t _read_mode1_sector_bsdi (void *user_data, void *data, lsn_t lsn, bool b_form2) { #if FIXED char buf[M2RAW_SECTOR_SIZE] = { 0, }; do something here. #else return cdio_generic_read_form1_sector(user_data, data, lsn); #endif } /*! Reads i_blocks of mode2 sectors from cd device into data starting from lsn. Returns 0 if no error. */ static driver_return_code_t _read_mode1_sectors_bsdi (void *p_user_data, void *p_data, lsn_t lsn, bool b_form2, uint32_t i_blocks) { _img_private_t *p_env = p_user_data; unsigned int i; int retval; uint16_t blocksize = b_form2 ? M2RAW_SECTOR_SIZE : CDIO_CD_FRAMESIZE; for (i = 0; i < i_blocks; i++) { if ( (retval = _read_mode1_sector_bsdi (p_env, ((char *)p_data) + (blocksize * i), lsn + i, b_form2)) ) return retval; } return DRIVER_OP_SUCCESS; } /*! Reads a single mode2 sector from cd device into data starting from lsn. Returns 0 if no error. */ static driver_return_code_t _read_mode2_sector_bsdi (void *p_user_data, void *p_data, lsn_t lsn, bool b_form2) { char buf[M2RAW_SECTOR_SIZE] = { 0, }; struct cdrom_msf *msf = (struct cdrom_msf *) &buf; msf_t _msf; _img_private_t *p_env = p_user_data; cdio_lba_to_msf (cdio_lsn_to_lba(lsn), &_msf); msf->cdmsf_min0 = cdio_from_bcd8(_msf.m); msf->cdmsf_sec0 = cdio_from_bcd8(_msf.s); msf->cdmsf_frame0 = cdio_from_bcd8(_msf.f); if (p_env->gen.ioctls_debugged == 75) cdio_debug ("only displaying every 75th ioctl from now on"); if (p_env->gen.ioctls_debugged == 30 * 75) cdio_debug ("only displaying every 30*75th ioctl from now on"); if (p_env->gen.ioctls_debugged < 75 || (p_env->gen.ioctls_debugged < (30 * 75) && p_env->gen.ioctls_debugged % 75 == 0) || p_env->gen.ioctls_debugged % (30 * 75) == 0) cdio_debug ("reading %2.2d:%2.2d:%2.2d", msf->cdmsf_min0, msf->cdmsf_sec0, msf->cdmsf_frame0); p_env->gen.ioctls_debugged++; switch (p_env->access_mode) { case _AM_NONE: cdio_warn ("no way to read mode2"); return 1; break; case _AM_IOCTL: if (ioctl (p_env->gen.fd, CDROMREADMODE2, &buf) == -1) { perror ("ioctl()"); return 1; /* exit (EXIT_FAILURE); */ } break; } if (b_form2) memcpy (p_data, buf, M2RAW_SECTOR_SIZE); else memcpy (((char *)p_data), buf + CDIO_CD_SUBHEADER_SIZE, CDIO_CD_FRAMESIZE); return DRIVER_OP_SUCCESS; } /*! Reads i_blocks of mode2 sectors from cd device into data starting from lsn. Returns 0 if no error. */ static driver_return_code_t _read_mode2_sectors_bsdi (void *user_data, void *data, lsn_t lsn, bool b_form2, uint32_t i_blocks) { _img_private_t *p_env = user_data; unsigned int i; unsigned int i_blocksize = b_form2 ? M2RAW_SECTOR_SIZE : CDIO_CD_FRAMESIZE; /* For each frame, pick out the data part we need */ for (i = 0; i < i_blocks; i++) { int retval = _read_mode2_sector_bsdi(p_env, ((char *)data) + (i_blocksize * i), lsn + i, b_form2); if (retval) return retval; } return DRIVER_OP_SUCCESS; } /*! Return the size of the CD in logical block address (LBA) units. */ static lsn_t get_disc_last_lsn_bsdi (void *p_user_data) { _img_private_t *p_env = p_user_data; struct cdrom_tocentry tocent; uint32_t size; tocent.cdte_track = CDIO_CDROM_LEADOUT_TRACK; tocent.cdte_format = CDROM_LBA; if (ioctl (p_env->gen.fd, CDROMREADTOCENTRY, &tocent) == -1) { perror ("ioctl(CDROMREADTOCENTRY)"); exit (EXIT_FAILURE); } size = tocent.cdte_addr.lba; return size; } /*! Set the key "arg" to "value" in source device. */ static driver_return_code_t _set_arg_bsdi (void *user_data, const char key[], const char value[]) { _img_private_t *p_env = user_data; if (!strcmp (key, "source")) { if (!value) return DRIVER_OP_ERROR; free (p_env->gen.source_name); p_env->gen.source_name = strdup (value); } else if (!strcmp (key, "access-mode")) { if (!strcmp(value, "IOCTL")) p_env->access_mode = _AM_IOCTL; else cdio_warn ("unknown access type: %s. ignored.", value); } else return DRIVER_OP_ERROR; return DRIVER_OP_SUCCESS; } /*! Read and cache the CD's Track Table of Contents and track info. Return false if successful or true if an error. */ static bool read_toc_bsdi (void *p_user_data) { _img_private_t *p_env = p_user_data; int i; /* read TOC header */ if ( ioctl(p_env->gen.fd, CDROMREADTOCHDR, &p_env->tochdr) == -1 ) { cdio_warn("%s: %s\n", "error in ioctl CDROMREADTOCHDR", strerror(errno)); return false; } p_env->gen.i_first_track = p_env->tochdr.cdth_trk0; p_env->gen.i_tracks = p_env->tochdr.cdth_trk1; /* read individual tracks */ for (i= p_env->gen.i_first_track; i<=p_env->gen.i_tracks; i++) { struct cdrom_tocentry *p_toc = &(p_env->tocent[i-p_env->gen.i_first_track]); p_toc->cdte_track = i; p_toc->cdte_format = CDROM_MSF; if (ioctl(p_env->gen.fd, CDROMREADTOCENTRY, p_toc) == -1) { cdio_warn("%s %d: %s\n", "error in ioctl CDROMREADTOCENTRY for track", i, strerror(errno)); return false; } set_track_flags(&(p_env->gen.track_flags[i]), p_toc->cdte_ctrl); /**** struct cdrom_msf0 *msf= &p_env->tocent[i-1].cdte_addr.msf; fprintf (stdout, "--- track# %d (msf %2.2x:%2.2x:%2.2x)\n", i, msf->minute, msf->second, msf->frame); ****/ } /* read the lead-out track */ p_env->tocent[p_env->gen.i_tracks].cdte_track = CDIO_CDROM_LEADOUT_TRACK; p_env->tocent[p_env->gen.i_tracks].cdte_format = CDROM_MSF; if (ioctl(p_env->gen.fd, CDROMREADTOCENTRY, &p_env->tocent[p_env->gen.i_tracks]) == -1 ) { cdio_warn("%s: %s\n", "error in ioctl CDROMREADTOCENTRY for lead-out", strerror(errno)); return false; } /* struct cdrom_msf0 *msf= &p_env->tocent[p_env->gen.i_tracks].cdte_addr.msf; fprintf (stdout, "--- track# %d (msf %2.2x:%2.2x:%2.2x)\n", i, msf->minute, msf->second, msf->frame); */ p_env->gen.toc_init = true; return true; } /*! Eject media in CD drive. If successful, as a side effect we also free obj. */ static driver_return_code_t eject_media_bsdi (void *p_user_data) { _img_private_t *p_env = p_user_data; int ret=DRIVER_OP_ERROR; int fd; close(p_env->gen.fd); p_env->gen.fd = -1; if ((fd = open (p_env->gen.source_name, O_RDONLY|O_NONBLOCK)) > -1) { if((ret = ioctl(fd, CDROMEJECT, 0)) != 0) { cdio_warn("ioctl CDROMEJECT failed: %s\n", strerror(errno)); } close(fd); } return ret; } /*! Return the value associated with the key "arg". */ static const char * _get_arg_bsdi (void *user_data, const char key[]) { _img_private_t *p_env = user_data; if (!strcmp (key, "source")) { return p_env->gen.source_name; } else if (!strcmp (key, "access-mode")) { switch (p_env->access_mode) { case _AM_IOCTL: return "ioctl"; case _AM_NONE: return "no access method"; } } return NULL; } /*! Return the media catalog number MCN. Note: string is malloc'd so caller should free() then returned string when done with it. */ static char * _get_mcn_bsdi (const void *p_user_data) { struct cdrom_mcn mcn; const _img_private_t *p_env = p_user_data; if (ioctl(p_env->gen.fd, CDROM_GET_MCN, &mcn) != 0) return NULL; return strdup(mcn.medium_catalog_number); } /*! Get format of track. */ static track_format_t get_track_format_bsdi(void *user_data, track_t i_track) { _img_private_t *p_env = user_data; if (!p_env->gen.toc_init) read_toc_bsdi (p_env) ; if (i_track > p_env->gen.i_tracks || i_track == 0) return TRACK_FORMAT_ERROR; i_track -= p_env->gen.i_first_track; /* This is pretty much copied from the "badly broken" cdrom_count_tracks in linux/cdrom.c. */ if (p_env->tocent[i_track].cdte_ctrl & CDROM_DATA_TRACK) { if (p_env->tocent[i_track].cdte_format == CDIO_CDROM_CDI_TRACK) return TRACK_FORMAT_CDI; else if (p_env->tocent[i_track].cdte_format == CDIO_CDROM_XA_TRACK) return TRACK_FORMAT_XA; else return TRACK_FORMAT_DATA; } else return TRACK_FORMAT_AUDIO; } /*! Return true if we have XA data (green, mode2 form1) or XA data (green, mode2 form2). That is track begins: sync - header - subheader 12 4 - 8 FIXME: there's gotta be a better design for this and get_track_format? */ static bool _get_track_green_bsdi(void *user_data, track_t i_track) { _img_private_t *p_env = user_data; if (!p_env->gen.toc_init) read_toc_bsdi (p_env) ; if (i_track == CDIO_CDROM_LEADOUT_TRACK) i_track = p_env->gen.i_tracks+1; if (i_track > p_env->gen.i_tracks+1 || i_track == 0) return false; /* FIXME: Dunno if this is the right way, but it's what I was using in cdinfo for a while. */ return ((p_env->tocent[i_track-1].cdte_ctrl & 2) != 0); } /*! Return the starting MSF (minutes/secs/frames) for track number i_track in obj. Track numbers start at 1. The "leadout" track is specified either by using i_track LEADOUT_TRACK or the total tracks+1. False is returned if there is no track entry. */ static bool get_track_msf_bsdi(void *user_data, track_t i_track, msf_t *msf) { _img_private_t *p_env = user_data; if (NULL == msf) return false; if (!p_env->gen.toc_init) read_toc_bsdi (p_env) ; if (i_track == CDIO_CDROM_LEADOUT_TRACK) i_track = p_env->gen.i_tracks+1; if (i_track > p_env->gen.i_tracks+1 || i_track == 0) { return false; } i_track -= p_env->gen.i_first_track; { struct cdrom_msf0 *msf0= &p_env->tocent[i_track].cdte_addr.msf; msf->m = cdio_to_bcd8(msf0->minute); msf->s = cdio_to_bcd8(msf0->second); msf->f = cdio_to_bcd8(msf0->frame); return true; } } #endif /* HAVE_BSDI_CDROM */ /*! Close tray on CD-ROM. @param p_user_data the CD object to be acted upon. */ driver_return_code_t close_tray_bsdi (const char *psz_device) { #ifdef HAVE_BSDI_CDROM int fd = open(psz_device, O_RDONLY | O_NONBLOCK, 0); if (fd < 0) return DRIVER_OP_ERROR; else { int i_rc = cdrom_tray_move(fd, 0); close(fd); return (i_rc > -1) ? DRIVER_OP_SUCCESS : DRIVER_OP_ERROR; } #else return DRIVER_OP_NO_DRIVER; #endif /*HAVE_BSDI_CDROM*/ } /*! Return an array of strings giving possible CD devices. */ char ** cdio_get_devices_bsdi (void) { #ifndef HAVE_BSDI_CDROM return NULL; #else char drive[40]; char **drives = NULL; unsigned int num_drives=0; bool exists=true; char c; /* Scan the system for CD-ROM drives. */ #ifdef USE_ETC_FSTAB struct fstab *fs; setfsent(); /* Check what's in /etc/fstab... */ while ( (fs = getfsent()) ) { if (strncmp(fs->fs_spec, "/dev/sr", 7)) cdio_add_device_list(&drives, fs->fs_spec, &num_drives); } #endif /* Scan the system for CD-ROM drives. Not always 100% reliable, so use the USE_MNTENT code above first. */ for ( c='0'; exists && c <='9'; c++ ) { sprintf(drive, "/dev/rsr%cc", c); exists = cdio_is_cdrom(drive, NULL); if ( exists ) { cdio_add_device_list(&drives, drive, &num_drives); } } cdio_add_device_list(&drives, NULL, &num_drives); return drives; #endif /*HAVE_BSDI_CDROM*/ } /*! Return a string containing the default CD device if none is specified. */ char * cdio_get_default_device_bsdi(void) { return strdup(DEFAULT_CDIO_DEVICE); } /*! Initialization routine. This is the only thing that doesn't get called via a function pointer. In fact *we* are the ones to set that up. */ CdIo_t * cdio_open_am_bsdi (const char *psz_source_name, const char *psz_access_mode) { if (psz_access_mode != NULL) cdio_warn ("there is only one access mode for bsdi. Arg %s ignored", psz_access_mode); return cdio_open_bsdi(psz_source_name); } /*! Initialization routine. This is the only thing that doesn't get called via a function pointer. In fact *we* are the ones to set that up. */ CdIo_t * cdio_open_bsdi (const char *psz_orig_source) { #ifdef HAVE_BSDI_CDROM CdIo_t *ret; _img_private_t *_data; char *psz_source; cdio_funcs_t _funcs = { .audio_pause = audio_pause_bsdi, .audio_play_msf = audio_play_msf_bsdi, .audio_play_track_index= audio_play_track_index_bsdi, #if USE_MMC_SUBCHANNEL .audio_read_subchannel = audio_read_subchannel_mmc, #else .audio_read_subchannel = audio_read_subchannel_bsdi, #endif .audio_resume = audio_resume_bsdi, .audio_set_volume = audio_set_volume_bsdi, .audio_stop = audio_stop_bsdi, .eject_media = eject_media_bsdi, .free = cdio_generic_free, .get_arg = _get_arg_bsdi, .get_cdtext = get_cdtext_generic, .get_default_device = cdio_get_default_device_bsdi, .get_devices = cdio_get_devices_bsdi, .get_drive_cap = get_drive_cap_mmc, .get_disc_last_lsn = get_disc_last_lsn_bsdi, .get_discmode = get_discmode_generic, .get_first_track_num = get_first_track_num_generic, .get_hwinfo = NULL, .get_media_changed = get_media_changed_mmc, .get_mcn = _get_mcn_bsdi, .get_num_tracks = get_num_tracks_generic, .get_track_channels = get_track_channels_generic, .get_track_copy_permit = get_track_copy_permit_generic, .get_track_format = get_track_format_bsdi, .get_track_green = _get_track_green_bsdi, .get_track_lba = NULL, /* This could be implemented if need be. */ .get_track_preemphasis = get_track_preemphasis_generic, .get_track_msf = get_track_msf_bsdi, .lseek = cdio_generic_lseek, .read = cdio_generic_read, .read_audio_sectors = _read_audio_sectors_bsdi, .read_data_sectors = read_data_sectors_mmc, .read_mode1_sector = _read_mode1_sector_bsdi, .read_mode1_sectors = _read_mode1_sectors_bsdi, .read_mode2_sector = _read_mode2_sector_bsdi, .read_mode2_sectors = _read_mode2_sectors_bsdi, .read_toc = read_toc_bsdi, .run_mmc_cmd = run_mmc_cmd_bsdi, .set_arg = _set_arg_bsdi, }; _data = calloc (1, sizeof (_img_private_t)); _data->access_mode = _AM_IOCTL; _data->gen.init = false; _data->gen.fd = -1; _data->gen.toc_init = false; _data->gen.b_cdtext_init = false; _data->gen.b_cdtext_error = false; if (NULL == psz_orig_source) { psz_source=cdio_get_default_device_bsdi(); if (NULL == psz_source) return NULL; _set_arg_bsdi(_data, "source", psz_source); free(psz_source); } else { if (cdio_is_device_generic(psz_orig_source)) _set_arg_bsdi(_data, "source", psz_orig_source); else { /* The below would be okay if all device drivers worked this way. */ #if 0 cdio_info ("source %s is not a device", psz_orig_source); #endif free(_data); return NULL; } } ret = cdio_new ( (void *) _data, &_funcs); if (ret == NULL) return NULL; ret->driver_id = DRIVER_BSDI; if (_cdio_init(_data)) return ret; else { cdio_generic_free (_data); return NULL; } #else return NULL; #endif /* HAVE_BSDI_CDROM */ } bool cdio_have_bsdi (void) { #ifdef HAVE_BSDI_CDROM return true; #else return false; #endif /* HAVE_BSDI_CDROM */ } libcdio-0.83/lib/driver/device.c0000644000175000017500000007213411650122325013442 00000000000000/* Copyright (C) 2005, 2006, 2008, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /*! device- and driver-related routines. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #include #include "cdio_private.h" #include #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif /* This probably will get moved to driver code, i.e _cdio_linux.c */ #ifdef HAVE_LINUX_MAJOR_H #include #endif #ifdef HAVE_SYS_STAT_H #include #endif /* The last valid entry of Cdio_driver. -1 or (CDIO_DRIVER_UNINIT) means uninitialzed. -2 means some sort of error. */ #define CDIO_DRIVER_UNINIT -1 int CdIo_last_driver = CDIO_DRIVER_UNINIT; #ifdef HAVE_AIX_CDROM const driver_id_t cdio_os_driver = DRIVER_AIX; #elif HAVE_BSDI_CDROM const driver_id_t cdio_os_driver = DRIVER_BSDI; #elif HAVE_FREEBSD_CDROM const driver_id_t cdio_os_driver = DRIVER_FREEBSD; #elif HAVE_LINUX_CDROM const driver_id_t cdio_os_driver = DRIVER_LINUX; #elif HAVE_DARWIN_CDROM const driver_id_t cdio_os_driver = DRIVER_OSX; #elif HAVE_OS2_CDROM const driver_id_t cdio_os_driver = DRIVER_OS2; #elif HAVE_SOLARIS_CDROM const driver_id_t cdio_os_driver = DRIVER_SOLARIS; #elif HAVE_WIN32_CDROM const driver_id_t cdio_os_driver = DRIVER_WIN32; #else const driver_id_t cdio_os_driver = DRIVER_UNKNOWN; #endif /** The below variables are trickery to force enum symbol values to be recorded in debug symbol tables. They are used to allow one to refer to the enumeration value names in the typedefs above in a debugger and debugger expressions. */ cdio_drive_cap_misc_t debug_cdio_drive_cap_misc; cdio_drive_cap_read_t debug_cdio_drive_cap_read_t; cdio_drive_cap_write_t debug_drive_cap_write_t; cdio_mmc_hw_len_t debug_cdio_mmc_hw_len; cdio_src_category_mask_t debug_cdio_src_category_mask; static bool cdio_have_false(void) { return false; } /* The below array gives all drivers that can possibly appear. on a particular host. */ CdIo_driver_t CdIo_all_drivers[] = { {DRIVER_UNKNOWN, 0, "Unknown", "No driver", &cdio_have_false, NULL, NULL, NULL, NULL, NULL, NULL }, {DRIVER_AIX, CDIO_SRC_IS_DEVICE_MASK|CDIO_SRC_IS_NATIVE_MASK|CDIO_SRC_IS_SCSI_MASK, "AIX", "AIX SCSI driver", &cdio_have_aix, &cdio_open_aix, &cdio_open_am_aix, &cdio_get_default_device_aix, &cdio_is_device_generic, &cdio_get_devices_aix, NULL }, {DRIVER_BSDI, CDIO_SRC_IS_DEVICE_MASK|CDIO_SRC_IS_NATIVE_MASK|CDIO_SRC_IS_SCSI_MASK, "BSDI", "BSDI ATAPI and SCSI driver", &cdio_have_bsdi, &cdio_open_bsdi, &cdio_open_am_bsdi, &cdio_get_default_device_bsdi, &cdio_is_device_generic, &cdio_get_devices_bsdi, &close_tray_bsdi }, {DRIVER_FREEBSD, CDIO_SRC_IS_DEVICE_MASK|CDIO_SRC_IS_NATIVE_MASK|CDIO_SRC_IS_SCSI_MASK, "FreeBSD", "FreeBSD driver", &cdio_have_freebsd, &cdio_open_freebsd, &cdio_open_am_freebsd, &cdio_get_default_device_freebsd, &cdio_is_device_generic, &cdio_get_devices_freebsd, &close_tray_freebsd }, {DRIVER_NETBSD, CDIO_SRC_IS_DEVICE_MASK|CDIO_SRC_IS_NATIVE_MASK|CDIO_SRC_IS_SCSI_MASK, "NetBSD", "NetBSD driver", &cdio_have_netbsd, &cdio_open_netbsd, &cdio_open_am_netbsd, &cdio_get_default_device_netbsd, &cdio_is_device_generic, &cdio_get_devices_netbsd, &close_tray_netbsd }, {DRIVER_LINUX, CDIO_SRC_IS_DEVICE_MASK|CDIO_SRC_IS_NATIVE_MASK, "GNU/Linux", "GNU/Linux ioctl and MMC driver", &cdio_have_linux, &cdio_open_linux, &cdio_open_am_linux, &cdio_get_default_device_linux, &cdio_is_device_generic, &cdio_get_devices_linux, &close_tray_linux }, {DRIVER_SOLARIS, CDIO_SRC_IS_DEVICE_MASK|CDIO_SRC_IS_NATIVE_MASK|CDIO_SRC_IS_SCSI_MASK, "Solaris", "Solaris ATAPI and SCSI driver", &cdio_have_solaris, &cdio_open_solaris, &cdio_open_am_solaris, &cdio_get_default_device_solaris, &cdio_is_device_generic, &cdio_get_devices_solaris, &close_tray_solaris }, {DRIVER_OS2, CDIO_SRC_IS_DEVICE_MASK|CDIO_SRC_IS_NATIVE_MASK|CDIO_SRC_IS_SCSI_MASK, "OS2", "IBM OS/2 driver", &cdio_have_os2, &cdio_open_os2, &cdio_open_am_os2, &cdio_get_default_device_os2, &cdio_is_device_os2, &cdio_get_devices_os2, &close_tray_os2 }, {DRIVER_OSX, CDIO_SRC_IS_DEVICE_MASK|CDIO_SRC_IS_NATIVE_MASK|CDIO_SRC_IS_SCSI_MASK, "OS X", "Apple Darwin OS X driver", &cdio_have_osx, &cdio_open_osx, &cdio_open_am_osx, &cdio_get_default_device_osx, &cdio_is_device_generic, &cdio_get_devices_osx, &close_tray_osx }, {DRIVER_WIN32, CDIO_SRC_IS_DEVICE_MASK|CDIO_SRC_IS_NATIVE_MASK|CDIO_SRC_IS_SCSI_MASK, "WIN32", "MS Windows ASPI and ioctl driver", &cdio_have_win32, &cdio_open_win32, &cdio_open_am_win32, &cdio_get_default_device_win32, &cdio_is_device_win32, &cdio_get_devices_win32, &close_tray_win32 }, {DRIVER_CDRDAO, CDIO_SRC_IS_DISK_IMAGE_MASK, "CDRDAO", "cdrdao (TOC) disk image driver", &cdio_have_cdrdao, &cdio_open_cdrdao, &cdio_open_am_cdrdao, &cdio_get_default_device_cdrdao, NULL, &cdio_get_devices_cdrdao, NULL }, {DRIVER_BINCUE, CDIO_SRC_IS_DISK_IMAGE_MASK, "BIN/CUE", "bin/cuesheet disk image driver", &cdio_have_bincue, &cdio_open_bincue, &cdio_open_am_bincue, &cdio_get_default_device_bincue, NULL, &cdio_get_devices_bincue, NULL }, {DRIVER_NRG, CDIO_SRC_IS_DISK_IMAGE_MASK, "NRG", "Nero NRG disk image driver", &cdio_have_nrg, &cdio_open_nrg, &cdio_open_am_nrg, &cdio_get_default_device_nrg, NULL, &cdio_get_devices_nrg, NULL } }; /* The below array gives of the drivers that are currently available for on a particular host. */ CdIo_driver_t CdIo_driver[sizeof(CdIo_all_drivers)/sizeof(CdIo_all_drivers[0])-1] = { {0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} }; const driver_id_t cdio_drivers[] = { DRIVER_AIX, DRIVER_BSDI, DRIVER_FREEBSD, DRIVER_NETBSD, DRIVER_LINUX, DRIVER_SOLARIS, DRIVER_OS2, DRIVER_OSX, DRIVER_WIN32, DRIVER_CDRDAO, DRIVER_BINCUE, DRIVER_NRG, DRIVER_UNKNOWN }; const driver_id_t cdio_device_drivers[] = { DRIVER_AIX, DRIVER_BSDI, DRIVER_FREEBSD, DRIVER_NETBSD, DRIVER_LINUX, DRIVER_SOLARIS, DRIVER_OS2, DRIVER_OSX, DRIVER_WIN32, DRIVER_UNKNOWN }; const char * cdio_driver_errmsg(driver_return_code_t drc) { switch(drc) { case DRIVER_OP_SUCCESS: return "driver operation was successful"; case DRIVER_OP_ERROR: return "driver I/O error"; case DRIVER_OP_UNSUPPORTED: return "driver operatation not supported"; case DRIVER_OP_UNINIT: return "driver not initialized"; case DRIVER_OP_NOT_PERMITTED: return "driver operatation not permitted"; case DRIVER_OP_BAD_PARAMETER: return "bad parameter passed"; case DRIVER_OP_BAD_POINTER: return "bad pointer to memory area"; case DRIVER_OP_NO_DRIVER: return "driver not available"; default: return "unknown or bad driver return status"; } } static CdIo * scan_for_driver(const driver_id_t drivers[], const char *psz_source, const char *access_mode) { const driver_id_t *driver_id_p; for (driver_id_p=drivers; *driver_id_p!=DRIVER_UNKNOWN; driver_id_p++) { if ((*CdIo_all_drivers[*driver_id_p].have_driver)()) { CdIo *ret= (*CdIo_all_drivers[*driver_id_p].driver_open_am)(psz_source, access_mode); if (ret != NULL) { ret->driver_id = *driver_id_p; return ret; } } } return NULL; } const char * cdio_driver_describe(driver_id_t driver_id) { return CdIo_all_drivers[driver_id].describe; } /*! Initialize CD Reading and control routines. Should be called first. May be implicitly called by other routines if not called first. */ bool cdio_init(void) { CdIo_driver_t *all_dp; CdIo_driver_t *dp = CdIo_driver; const driver_id_t *driver_id_p; if (CdIo_last_driver != CDIO_DRIVER_UNINIT) { cdio_warn ("Init routine called more than once."); return false; } for (driver_id_p=cdio_drivers; *driver_id_p!=DRIVER_UNKNOWN; driver_id_p++) { all_dp = &CdIo_all_drivers[*driver_id_p]; if ((*CdIo_all_drivers[*driver_id_p].have_driver)()) { *dp++ = *all_dp; CdIo_last_driver++; } } return true; } /*! Free any resources associated with cdio. */ void cdio_destroy (CdIo_t *p_cdio) { CdIo_last_driver = CDIO_DRIVER_UNINIT; if (p_cdio == NULL) return; if (p_cdio->op.free != NULL && p_cdio->env) p_cdio->op.free (p_cdio->env); p_cdio->env = NULL; free (p_cdio); } /*! Close media tray in CD drive if there is a routine to do so. @param psz_drive the name of CD-ROM to be closed. If NULL, we will use the default device. @param p_driver_id is the driver to be used or that got used if it was DRIVER_UNKNOWN or DRIVER_DEVICE; If this is NULL, we won't report back the driver used. */ driver_return_code_t cdio_close_tray (const char *psz_orig_drive, /*in/out*/ driver_id_t *p_driver_id) { driver_id_t temp_driver_id = DRIVER_DEVICE; char *psz_drive; driver_return_code_t drc; if (!p_driver_id) p_driver_id = &temp_driver_id; if (!psz_orig_drive || !*psz_orig_drive) psz_drive = cdio_get_default_device_driver(p_driver_id); else psz_drive = strdup(psz_orig_drive); if (DRIVER_UNKNOWN == *p_driver_id || DRIVER_DEVICE == *p_driver_id) { const driver_id_t *driver_id_p = (DRIVER_DEVICE == *p_driver_id)?cdio_device_drivers:cdio_drivers; /* Scan for driver */ for ( ; *driver_id_p!=DRIVER_UNKNOWN; driver_id_p++) { if ( (*CdIo_all_drivers[*driver_id_p].have_driver)() && *CdIo_all_drivers[*driver_id_p].close_tray ) { drc = (*CdIo_all_drivers[*driver_id_p].close_tray)(psz_drive); free(psz_drive); *p_driver_id = *driver_id_p; return drc; } } free(psz_drive); return DRIVER_OP_UNSUPPORTED; } /* The driver id was specified. Use that. */ if ( (*CdIo_all_drivers[*p_driver_id].have_driver)() && *CdIo_all_drivers[*p_driver_id].close_tray ) { drc = (*CdIo_all_drivers[*p_driver_id].close_tray)(psz_drive); free(psz_drive); return drc; } free(psz_drive); return DRIVER_OP_UNSUPPORTED; } /*! Eject media in CD drive if there is a routine to do so. @param p_cdio the CD object to be acted upon. If the CD is ejected *p_cdio is freed and p_cdio set to NULL. */ driver_return_code_t cdio_eject_media (CdIo_t **pp_cdio) { if ((pp_cdio == NULL) || (*pp_cdio == NULL)) return DRIVER_OP_UNINIT; if ((*pp_cdio)->op.eject_media) { int ret = (*pp_cdio)->op.eject_media ((*pp_cdio)->env); if (0 == ret) { cdio_destroy(*pp_cdio); *pp_cdio = NULL; } return ret; } else { cdio_destroy(*pp_cdio); *pp_cdio = NULL; return DRIVER_OP_UNSUPPORTED; } } /*! Eject media in CD drive if there is a routine to do so. If you want to scan for any CD-ROM and eject that, pass NULL for psz_drive. @param psz_drive the CD object to be acted upon. If NULL is given as the drive, we'll use the default driver device. */ driver_return_code_t cdio_eject_media_drive (const char *psz_drive) { CdIo_t *p_cdio = cdio_open (psz_drive, DRIVER_DEVICE); if (p_cdio) { return cdio_eject_media(&p_cdio); } else { return DRIVER_OP_UNINIT; } } /*! Free device list returned by cdio_get_devices or cdio_get_devices_with_cap. */ void cdio_free_device_list (char * ppsz_device_list[]) { char **ppsz_device_list_save=ppsz_device_list; if (!ppsz_device_list) return; for ( ; NULL != *ppsz_device_list ; ppsz_device_list++ ) { free(*ppsz_device_list); *ppsz_device_list = NULL; } free(ppsz_device_list_save); } /*! Return a string containing the default CD device if none is specified. if p_cdio is NULL (we haven't initialized a specific device driver), then find a suitable one and return the default device for that. NULL is returned if we couldn't get a default device. */ char * cdio_get_default_device (const CdIo_t *p_cdio) { if (p_cdio == NULL) { const driver_id_t *driver_id_p; /* Scan for driver */ for (driver_id_p=cdio_drivers; *driver_id_p!=DRIVER_UNKNOWN; driver_id_p++) { if ( (*CdIo_all_drivers[*driver_id_p].have_driver)() && *CdIo_all_drivers[*driver_id_p].get_default_device ) { return (*CdIo_all_drivers[*driver_id_p].get_default_device)(); } } return NULL; } if (p_cdio->op.get_default_device) { return p_cdio->op.get_default_device (); } else { return NULL; } } /*! Return a string containing the default CD device if none is specified. if p_driver_id is DRIVER_UNKNOWN or DRIVER_DEVICE then find a suitable one set the default device for that. NULL is returned if we couldn't get a default device. */ char * cdio_get_default_device_driver (/*in/out*/ driver_id_t *p_driver_id) { if (DRIVER_UNKNOWN == *p_driver_id || DRIVER_DEVICE == *p_driver_id) { const driver_id_t *driver_id_p = (DRIVER_DEVICE == *p_driver_id)?cdio_device_drivers:cdio_drivers; /* Scan for driver */ for ( ; *driver_id_p!=DRIVER_UNKNOWN; driver_id_p++) { if ( (*CdIo_all_drivers[*driver_id_p].have_driver)() && *CdIo_all_drivers[*driver_id_p].get_default_device ) { *p_driver_id = *driver_id_p; return (*CdIo_all_drivers[*driver_id_p].get_default_device)(); } } return NULL; } /* The driver id was specified. Use that. */ if ( (*CdIo_all_drivers[*p_driver_id].have_driver)() && *CdIo_all_drivers[*p_driver_id].get_default_device ) { return (*CdIo_all_drivers[*p_driver_id].get_default_device)(); } return NULL; } /*!Return an array of device names. If you want a specific devices, dor a driver give that device, if you want hardware devices, give DRIVER_DEVICE and if you want all possible devices, image drivers and hardware drivers give DRIVER_UNKNOWN. NULL is returned if we couldn't return a list of devices. */ char ** cdio_get_devices (driver_id_t driver_id) { /* Probably could get away with &driver_id below. */ driver_id_t driver_id_temp = driver_id; return cdio_get_devices_ret (&driver_id_temp); } char ** cdio_get_devices_ret (/*in/out*/ driver_id_t *p_driver_id) { CdIo_t *p_cdio; switch (*p_driver_id) { /* FIXME: spit out unknown to give image drivers as well. */ case DRIVER_DEVICE: p_cdio = scan_for_driver(cdio_device_drivers, NULL, NULL); *p_driver_id = cdio_get_driver_id(p_cdio); break; case DRIVER_UNKNOWN: p_cdio = scan_for_driver(cdio_drivers, NULL, NULL); *p_driver_id = cdio_get_driver_id(p_cdio); break; default: return (*CdIo_all_drivers[*p_driver_id].get_devices)(); } if (p_cdio == NULL) return NULL; if (p_cdio->op.get_devices) { char **devices = p_cdio->op.get_devices (); cdio_destroy(p_cdio); return devices; } else { return NULL; } } /*! Return an array of device names in search_devices that have at least the capabilities listed by cap. If search_devices is NULL, then we'll search all possible CD drives. If "any" is set false then every capability listed in the extended portion of capabilities (i.e. not the basic filesystem) must be satisified. If "any" is set true, then if any of the capabilities matches, we call that a success. To find a CD-drive of any type, use the mask CDIO_FS_MATCH_ALL. NULL is returned if we couldn't get a default device. It is also possible to return a non NULL but after dereferencing the the value is NULL. This also means nothing was found. */ char ** cdio_get_devices_with_cap (/*in*/ char* search_devices[], cdio_fs_anal_t capabilities, bool any) { driver_id_t p_driver_id; return cdio_get_devices_with_cap_ret (search_devices, capabilities, any, &p_driver_id); } char ** cdio_get_devices_with_cap_ret (/*in*/ char* search_devices[], cdio_fs_anal_t need_cap, bool b_any, /*out*/ driver_id_t *p_driver_id) { char **ppsz_drives=search_devices; char **ppsz_drives_ret=NULL; unsigned int i_drives=0; bool b_free_ppsz_drives = false; *p_driver_id = DRIVER_DEVICE; if (!ppsz_drives) { ppsz_drives=cdio_get_devices_ret(p_driver_id); b_free_ppsz_drives = true; } if (!ppsz_drives) return NULL; if (need_cap == CDIO_FS_MATCH_ALL) { /* Duplicate drives into drives_ret. */ char **d = ppsz_drives; for( ; *d != NULL; d++ ) { cdio_add_device_list(&ppsz_drives_ret, *d, &i_drives); } } else { const cdio_fs_anal_t need_fs = CDIO_FSTYPE(need_cap); char **d = ppsz_drives; for( ; *d != NULL; d++ ) { CdIo_t *p_cdio = cdio_open(*d, *p_driver_id); if (NULL != p_cdio) { track_t i_first_track = cdio_get_first_track_num(p_cdio); cdio_iso_analysis_t cdio_iso_analysis; if (CDIO_INVALID_TRACK != i_first_track) { const cdio_fs_anal_t got_cap = cdio_guess_cd_type(p_cdio, 0, i_first_track, &cdio_iso_analysis); /* Match on filesystem. Here either we don't know what the filesystem is - automatic match, or we no that the file system is in the set of those specified. We refine the logic further after this initial test. */ if ( CDIO_FS_UNKNOWN == need_fs || 0 == need_fs || (CDIO_FSTYPE(got_cap) == need_fs) ) { /* Match on analysis type. If we haven't set any analysis type, then an automatic match. Otherwise a match is determined by whether we need all analysis types or any of them. */ const cdio_fs_anal_t need_anal = need_cap & ~CDIO_FS_MASK; const cdio_fs_anal_t got_anal = got_cap & ~CDIO_FS_MASK; const bool b_match = !need_anal || (b_any ? (got_anal & need_anal) != 0 : (got_anal & need_anal) == need_anal); if (b_match) cdio_add_device_list(&ppsz_drives_ret, *d, &i_drives); } } cdio_destroy(p_cdio); } } } cdio_add_device_list(&ppsz_drives_ret, NULL, &i_drives); if (b_free_ppsz_drives) { cdio_free_device_list(ppsz_drives); } return ppsz_drives_ret; } /*! Return the the kind of drive capabilities of device. Note: string is malloc'd so caller should free() then returned string when done with it. */ void cdio_get_drive_cap (const CdIo_t *p_cdio, cdio_drive_read_cap_t *p_read_cap, cdio_drive_write_cap_t *p_write_cap, cdio_drive_misc_cap_t *p_misc_cap) { /* This seems like a safe bet. */ *p_read_cap = CDIO_DRIVE_CAP_UNKNOWN; *p_write_cap = CDIO_DRIVE_CAP_UNKNOWN; *p_misc_cap = CDIO_DRIVE_CAP_UNKNOWN; if (p_cdio && p_cdio->op.get_drive_cap) { p_cdio->op.get_drive_cap(p_cdio->env, p_read_cap, p_write_cap, p_misc_cap); } } /*! Return the the kind of drive capabilities of device. Note: string is malloc'd so caller should free() then returned string when done with it. */ void cdio_get_drive_cap_dev (const char *device, cdio_drive_read_cap_t *p_read_cap, cdio_drive_write_cap_t *p_write_cap, cdio_drive_misc_cap_t *p_misc_cap) { /* This seems like a safe bet. */ CdIo_t *cdio=scan_for_driver(cdio_drivers, device, NULL); if (cdio) { cdio_get_drive_cap(cdio, p_read_cap, p_write_cap, p_misc_cap); cdio_destroy(cdio); } else { *p_read_cap = CDIO_DRIVE_CAP_UNKNOWN; *p_write_cap = CDIO_DRIVE_CAP_UNKNOWN; *p_misc_cap = CDIO_DRIVE_CAP_UNKNOWN; } } /*! Return a string containing the name of the driver in use. if CdIo is NULL (we haven't initialized a specific device driver), then return NULL. */ const char * cdio_get_driver_name (const CdIo_t *p_cdio) { if (NULL==p_cdio) return NULL; return CdIo_all_drivers[p_cdio->driver_id].name; } /*! Return the driver id. if CdIo is NULL (we haven't initialized a specific device driver), then return DRIVER_UNKNOWN. */ driver_id_t cdio_get_driver_id (const CdIo_t *p_cdio) { if (!p_cdio) return DRIVER_UNKNOWN; return p_cdio->driver_id; } /*! Return a string containing the name of the driver in use. if CdIo is NULL (we haven't initialized a specific device driver), then return NULL. */ bool cdio_get_hwinfo (const CdIo_t *p_cdio, cdio_hwinfo_t *hw_info) { if (!p_cdio) return false; if (p_cdio->op.get_hwinfo) { return p_cdio->op.get_hwinfo (p_cdio, hw_info); } else { /* Perhaps driver forgot to initialize. We are no worse off Using mmc than returning false here. */ return mmc_get_hwinfo(p_cdio, hw_info); } } /*! Return the session number of the last on the CD. @param p_cdio the CD object to be acted upon. @param i_last_session pointer to the session number to be returned. */ driver_return_code_t cdio_get_last_session (CdIo_t *p_cdio, /*out*/ lsn_t *i_last_session) { if (!p_cdio) return DRIVER_OP_UNINIT; if (p_cdio->op.get_last_session) return p_cdio->op.get_last_session(p_cdio->env, i_last_session); return DRIVER_OP_UNSUPPORTED; } /*! Find out if media has changed since the last call. @param p_cdio the CD object to be acted upon. @return 1 if media has changed since last call, 0 if not. Error return codes are the same as driver_return_code_t */ int cdio_get_media_changed(CdIo_t *p_cdio) { if (!p_cdio) return DRIVER_OP_UNINIT; if (p_cdio->op.get_media_changed) return p_cdio->op.get_media_changed(p_cdio->env); return DRIVER_OP_UNSUPPORTED; } bool_3way_t cdio_have_atapi(CdIo_t *p_cdio) { bool_3way_t i_status; if (!p_cdio) return nope; i_status = mmc_have_interface(p_cdio, CDIO_MMC_FEATURE_INTERFACE_ATAPI); if (dunno != i_status) return i_status; { /* cdparanoia seems to think that if we have a mode sense command we have an atapi drive or is atapi compatible. */ uint8_t buf[22]; if (DRIVER_OP_SUCCESS == mmc_mode_sense(p_cdio, buf, sizeof(buf), CDIO_MMC_CAPABILITIES_PAGE) ) { uint8_t *b = buf; b+=b[3]+4; if( CDIO_MMC_CAPABILITIES_PAGE == (b[0]&0x3F) ) { /* MMC style drive! */ return yep; } } } /* Put these in the various drivers? If we get more, yes! */ #ifdef HAVE_LINUX_MAJOR_H { /* This too is from cdparanoia. */ struct stat st; generic_img_private_t *p_env = p_cdio->env; if ( 0 == lstat(p_env->source_name, &st) ) { if (S_ISCHR(st.st_mode) || S_ISBLK(st.st_mode)) { int drive_type=(int)(st.st_rdev>>8); switch (drive_type) { case IDE0_MAJOR: case IDE1_MAJOR: case IDE2_MAJOR: case IDE3_MAJOR: /* Yay, ATAPI... */ return yep; break; case CDU31A_CDROM_MAJOR: case CDU535_CDROM_MAJOR: case MATSUSHITA_CDROM_MAJOR: case MATSUSHITA_CDROM2_MAJOR: case MATSUSHITA_CDROM3_MAJOR: case MATSUSHITA_CDROM4_MAJOR: case SANYO_CDROM_MAJOR: case MITSUMI_CDROM_MAJOR: case MITSUMI_X_CDROM_MAJOR: case OPTICS_CDROM_MAJOR: case AZTECH_CDROM_MAJOR: case GOLDSTAR_CDROM_MAJOR: case CM206_CDROM_MAJOR: case SCSI_CDROM_MAJOR: case SCSI_GENERIC_MAJOR: return nope; break; default: return dunno; } } } } #endif /*HAVE_LINUX_MAJOR_H*/ return dunno; } bool cdio_have_driver(driver_id_t driver_id) { if (driver_id < 0 || driver_id >= sizeof(CdIo_all_drivers)/sizeof(CdIo_all_drivers[0])) return false; return (*CdIo_all_drivers[driver_id].have_driver)(); } bool cdio_is_device(const char *psz_source, driver_id_t driver_id) { if (DRIVER_UNKNOWN == driver_id || DRIVER_DEVICE == driver_id) { const driver_id_t *driver_id_p = (DRIVER_DEVICE == driver_id)?cdio_device_drivers:cdio_drivers; /* Scan for driver */ for ( ; *driver_id_p!=DRIVER_UNKNOWN; driver_id_p++) { if ( (*CdIo_all_drivers[*driver_id_p].have_driver)() && CdIo_all_drivers[*driver_id_p].is_device ) { return (*CdIo_all_drivers[*driver_id_p].is_device)(psz_source); } } } if (CdIo_all_drivers[driver_id].is_device == NULL) return false; return (*CdIo_all_drivers[driver_id].is_device)(psz_source); } /*! Sets up to read from place specified by source_name and driver_id. This should be called before using any other routine, except cdio_init. This will call cdio_init, if that hasn't been done previously. NULL is returned on error. */ CdIo_t * cdio_open (const char *orig_source_name, driver_id_t driver_id) { return cdio_open_am(orig_source_name, driver_id, NULL); } /*! Sets up to read from place specified by source_name and driver_id. This should be called before using any other routine, except cdio_init. This will call cdio_init, if that hasn't been done previously. NULL is returned on error. */ CdIo_t * cdio_open_am (const char *psz_orig_source, driver_id_t driver_id, const char *psz_access_mode) { char *psz_source; if (CdIo_last_driver == -1) cdio_init(); if (!psz_orig_source || !*psz_orig_source) psz_source = cdio_get_default_device(NULL); else psz_source = strdup(psz_orig_source); switch (driver_id) { case DRIVER_UNKNOWN: { CdIo_t *p_cdio=scan_for_driver(cdio_drivers, psz_source, psz_access_mode); free(psz_source); return p_cdio; } case DRIVER_DEVICE: { /* Scan for a driver. */ CdIo_t *ret = cdio_open_am_cd(psz_source, psz_access_mode); free(psz_source); return ret; } break; case DRIVER_AIX: case DRIVER_BSDI: case DRIVER_FREEBSD: case DRIVER_LINUX: case DRIVER_NETBSD: case DRIVER_SOLARIS: case DRIVER_WIN32: case DRIVER_OSX: case DRIVER_OS2: case DRIVER_NRG: case DRIVER_BINCUE: case DRIVER_CDRDAO: if ((*CdIo_all_drivers[driver_id].have_driver)()) { CdIo_t *ret = (*CdIo_all_drivers[driver_id].driver_open_am)(psz_source, psz_access_mode); if (ret) ret->driver_id = driver_id; free(psz_source); return ret; } } free(psz_source); return NULL; } /*! Set up CD-ROM for reading. The device_name is the some sort of device name. @return the cdio object for subsequent operations. NULL on error or there is no driver for a some sort of hardware CD-ROM. */ CdIo_t * cdio_open_cd (const char *psz_source) { return cdio_open_am_cd(psz_source, NULL); } /*! Set up CD-ROM for reading. The device_name is the some sort of device name. @return the cdio object for subsequent operations. NULL on error or there is no driver for a some sort of hardware CD-ROM. */ /* In the future we'll have more complicated code to allow selection of an I/O routine as well as code to find an appropriate default routine among the "registered" routines. Possibly classes too disk-based, SCSI-based, native-based, vendor (e.g. Sony, or Plextor) based For now though, we'll start more simply... */ CdIo_t * cdio_open_am_cd (const char *psz_source, const char *psz_access_mode) { if (CdIo_last_driver == -1) cdio_init(); /* Scan for a driver. */ return scan_for_driver(cdio_device_drivers, psz_source, psz_access_mode); } /*! Set the blocksize for subsequent reads. */ driver_return_code_t cdio_set_blocksize ( const CdIo_t *p_cdio, int i_blocksize ) { if (!p_cdio) return DRIVER_OP_UNINIT; if (!p_cdio->op.set_blocksize) return DRIVER_OP_UNSUPPORTED; return p_cdio->op.set_blocksize(p_cdio->env, i_blocksize); } /*! Set the drive speed. @param p_cdio CD structure set by cdio_open(). @param i_drive_speed speed in CD-ROM speed units. Note this not Kbs as would be used in the MMC spec or in mmc_set_speed(). To convert CD-ROM speed units to Kbs, multiply the number by 176 (for raw data) and by 150 (for filesystem data). On many CD-ROM drives, specifying a value too large will result in using the fastest speed. @see mmc_set_speed and mmc_set_drive_speed */ driver_return_code_t cdio_set_speed (const CdIo_t *p_cdio, int i_speed) { if (!p_cdio) return DRIVER_OP_UNINIT; if (!p_cdio->op.set_speed) return DRIVER_OP_UNSUPPORTED; return p_cdio->op.set_speed(p_cdio->env, i_speed); } /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/lib/driver/solaris.c0000644000175000017500000011746711650124424013672 00000000000000/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009, 2011 Rocky Bernstein Copyright (C) 2001 Herbert Valerio Riedel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #ifdef HAVE_STRING_H #include #endif #include #include #include #include #include "cdio_assert.h" #include "cdio_private.h" #define DEFAULT_CDIO_DEVICE "/vol/dev/aliases/cdrom0" #ifdef HAVE_SOLARIS_CDROM static const char _rcsid[] = "$Id: solaris.c,v 1.12 2008/04/22 15:29:12 karl Exp $"; #ifdef HAVE_GLOB_H #include #endif #include #include #include #include #include #ifdef HAVE_SYS_CDIO_H # include /* CDIOCALLOW etc... */ #else #error "You need to have CDROM support" #endif #include #include #include #include #include #include #include #include "cdtext_private.h" /* not defined in dkio.h yet */ #define DK_DVDRW 0x13 /* reader */ typedef enum { _AM_NONE, _AM_SUN_CTRL_ATAPI, _AM_SUN_CTRL_SCSI, _AM_MMC_RDWR, _AM_MMC_RDWR_EXCL #if FINISHED _AM_READ_CD, _AM_READ_10 #endif } access_mode_t; typedef struct { /* Things common to all drivers like this. This must be first. */ generic_img_private_t gen; access_mode_t access_mode; /* Some of the more OS specific things. */ /* Entry info for each track, add 1 for leadout. */ struct cdrom_tocentry tocent[CDIO_CD_MAX_TRACKS+1]; /* Track information */ struct cdrom_tochdr tochdr; } _img_private_t; static track_format_t get_track_format_solaris(void *p_user_data, track_t i_track); static char ** cdio_get_devices_solaris_cXtYdZs2(int flag); static access_mode_t str_to_access_mode_solaris(const char *psz_access_mode) { const access_mode_t default_access_mode = _AM_SUN_CTRL_SCSI; if (NULL==psz_access_mode) return default_access_mode; if (!strcmp(psz_access_mode, "ATAPI")) return _AM_SUN_CTRL_SCSI; /* force ATAPI to be SCSI */ else if (!strcmp(psz_access_mode, "SCSI")) return _AM_SUN_CTRL_SCSI; else if (!strcmp(psz_access_mode, "MMC_RDWR")) return _AM_MMC_RDWR; else if (!strcmp(psz_access_mode, "MMC_RDWR_EXCL")) return _AM_MMC_RDWR_EXCL; else { cdio_warn ("unknown access type: %s. Default SCSI used.", psz_access_mode); return default_access_mode; } } /*! Pause playing CD through analog output @param p_cdio the CD object to be acted upon. */ static driver_return_code_t audio_pause_solaris (void *p_user_data) { const _img_private_t *p_env = p_user_data; return ioctl(p_env->gen.fd, CDROMPAUSE); } /*! Playing starting at given MSF through analog output @param p_cdio the CD object to be acted upon. */ static driver_return_code_t audio_play_msf_solaris (void *p_user_data, msf_t *p_start_msf, msf_t *p_end_msf) { const _img_private_t *p_env = p_user_data; struct cdrom_msf solaris_msf; solaris_msf.cdmsf_min0 = cdio_from_bcd8(p_start_msf->m); solaris_msf.cdmsf_sec0 = cdio_from_bcd8(p_start_msf->s); solaris_msf.cdmsf_frame0 = cdio_from_bcd8(p_start_msf->f); solaris_msf.cdmsf_min1 = cdio_from_bcd8(p_end_msf->m); solaris_msf.cdmsf_sec1 = cdio_from_bcd8(p_end_msf->s); solaris_msf.cdmsf_frame1 = cdio_from_bcd8(p_end_msf->f); return ioctl(p_env->gen.fd, CDROMPLAYMSF, &solaris_msf); } /*! Playing CD through analog output at the desired track and index @param p_cdio the CD object to be acted upon. @param p_track_index location to start/end. */ static driver_return_code_t audio_play_track_index_solaris (void *p_user_data, cdio_track_index_t *p_track_index) { const _img_private_t *p_env = p_user_data; return ioctl(p_env->gen.fd, CDROMPLAYTRKIND, p_track_index); } /*! Read Audio Subchannel information @param p_cdio the CD object to be acted upon. */ static driver_return_code_t audio_read_subchannel_solaris (void *p_user_data, cdio_subchannel_t *p_subchannel) { const _img_private_t *p_env = p_user_data; struct cdrom_subchnl subchannel; int i_rc; p_subchannel->format = CDIO_CDROM_MSF; i_rc = ioctl(p_env->gen.fd, CDROMSUBCHNL, &subchannel); if (0 == i_rc) { p_subchannel->control = subchannel.cdsc_ctrl; p_subchannel->track = subchannel.cdsc_trk; p_subchannel->index = subchannel.cdsc_ind; p_subchannel->abs_addr.m = cdio_to_bcd8(subchannel.cdsc_absaddr.msf.minute); p_subchannel->abs_addr.s = cdio_to_bcd8(subchannel.cdsc_absaddr.msf.second); p_subchannel->abs_addr.f = cdio_to_bcd8(subchannel.cdsc_absaddr.msf.frame); p_subchannel->rel_addr.m = cdio_to_bcd8(subchannel.cdsc_reladdr.msf.minute); p_subchannel->rel_addr.s = cdio_to_bcd8(subchannel.cdsc_reladdr.msf.second); p_subchannel->rel_addr.f = cdio_to_bcd8(subchannel.cdsc_reladdr.msf.frame); p_subchannel->audio_status = subchannel.cdsc_audiostatus; return DRIVER_OP_SUCCESS; } else { cdio_info ("ioctl CDROMSUBCHNL failed: %s\n", strerror(errno)); return DRIVER_OP_ERROR; } } /*! Resume playing an audio CD. @param p_cdio the CD object to be acted upon. */ static driver_return_code_t audio_resume_solaris (void *p_user_data) { const _img_private_t *p_env = p_user_data; return ioctl(p_env->gen.fd, CDROMRESUME, 0); } /*! Resume playing an audio CD. @param p_cdio the CD object to be acted upon. */ static driver_return_code_t audio_set_volume_solaris (void *p_user_data, cdio_audio_volume_t *p_volume) { const _img_private_t *p_env = p_user_data; return ioctl(p_env->gen.fd, CDROMVOLCTRL, p_volume); } /*! Stop playing an audio CD. @param p_user_data the CD object to be acted upon. */ static driver_return_code_t audio_stop_solaris (void *p_user_data) { const _img_private_t *p_env = p_user_data; return ioctl(p_env->gen.fd, CDROMSTOP); } static int cdio_decode_btl_number(char **cpt, int stopper, int *no) { *no = 0; for ((*cpt)++; **cpt != stopper; (*cpt)++) { if (**cpt < '0' || **cpt > '9') return 0; *no = *no * 10 + **cpt - '0'; } return 1; } /* Read bus, target, lun from name "cXtYdZs2". Return 0 if name is not of the desired form. */ static int cdio_decode_btl_solaris(char *name, int *busno, int *tgtno, int *lunno, int flag) { char *cpt; int ret; *busno = *tgtno = *lunno = -1; cpt = name; if (*cpt != 'c') return 0; ret = cdio_decode_btl_number(&cpt, 't', busno); if (ret <= 0) return ret; ret = cdio_decode_btl_number(&cpt, 'd', tgtno); if (ret <= 0) return ret; ret = cdio_decode_btl_number(&cpt, 's', lunno); if (ret <= 0) return ret; cpt++; if (*cpt != '2' || *(cpt + 1) != 0) return 0; return 1; } static int set_scsi_tuple_solaris (_img_private_t *p_env) { int bus_no = -1, host_no = -1, channel_no = -1, target_no = -1, lun_no = -1; int ret; char tuple[160], *cpt; cpt = strrchr(p_env->gen.source_name, '/'); if (cpt == NULL) cpt = p_env->gen.source_name; else cpt++; ret = cdio_decode_btl_solaris(cpt, &bus_no, &target_no, &lun_no, 0); if (ret <= 0) return(ret); host_no = bus_no; channel_no = 0; snprintf(tuple, sizeof(tuple)-1, "%d,%d,%d,%d,%d", bus_no, host_no, channel_no, target_no, lun_no); p_env->gen.scsi_tuple = strdup(tuple); return 1; } /*! Initialize CD device. */ static bool init_solaris (_img_private_t *p_env) { int open_flags = O_RDONLY | O_NDELAY; if (_AM_MMC_RDWR != p_env->access_mode && _AM_MMC_RDWR_EXCL != p_env->access_mode) /* (was once set to _AM_SUN_CTRL_SCSI unconditionally) */ p_env->access_mode = _AM_SUN_CTRL_SCSI; if (!cdio_generic_init(p_env, open_flags)) return false; set_scsi_tuple_solaris(p_env); return true; } /*! Run a SCSI MMC command. p_user_data internal CD structure. i_timeout_ms time in milliseconds we will wait for the command to complete. i_cdb Size of p_cdb p_cdb CDB bytes. e_direction direction the transfer is to go. i_buf Size of buffer p_buf Buffer for data, both sending and receiving */ static driver_return_code_t run_mmc_cmd_solaris(void *p_user_data, unsigned int i_timeout_ms, unsigned int i_cdb, const mmc_cdb_t *p_cdb, cdio_mmc_direction_t e_direction, unsigned int i_buf, /*in/out*/ void *p_buf) { _img_private_t *p_env = p_user_data; struct uscsi_cmd cgc; int i_rc; cdio_mmc_request_sense_t sense; unsigned char *u_sense = (unsigned char *) &sense; memset (&cgc, 0, sizeof (struct uscsi_cmd)); cgc.uscsi_cdb = (caddr_t) p_cdb; /* See: man uscsi http://docs.sun.com/app/docs/doc/816-5177/uscsi-7i?a=view */ p_env->gen.scsi_mmc_sense_valid = 0; memset(u_sense, 0, sizeof(sense)); cgc.uscsi_rqbuf = (caddr_t) u_sense; cgc.uscsi_rqlen = sizeof(sense); /* No error messages, no retries, do not execute with other commands, request sense data */ cgc.uscsi_flags = USCSI_SILENT | USCSI_DIAGNOSE | USCSI_ISOLATE | USCSI_RQENABLE; if (SCSI_MMC_DATA_READ == e_direction) cgc.uscsi_flags |= USCSI_READ; else if (SCSI_MMC_DATA_WRITE == e_direction) cgc.uscsi_flags |= USCSI_WRITE; cgc.uscsi_timeout = msecs2secs(i_timeout_ms); cgc.uscsi_bufaddr = p_buf; cgc.uscsi_buflen = i_buf; cgc.uscsi_cdblen = i_cdb; i_rc = ioctl(p_env->gen.fd, USCSICMD, &cgc); /* Record SCSI sense reply for API call mmc_last_cmd_sense(). */ if (sense.additional_sense_len) { /* sense data available */ int sense_size = sense.additional_sense_len + 8; if (sense_size > sizeof(sense)) sense_size = sizeof(sense); memcpy((void *) p_env->gen.scsi_mmc_sense, &sense, sense_size); p_env->gen.scsi_mmc_sense_valid = sense_size; } if (0 == i_rc) return DRIVER_OP_SUCCESS; if (-1 == i_rc) { cdio_info ("ioctl USCSICMD failed: %s", strerror(errno)); switch (errno) { case EPERM: return DRIVER_OP_NOT_PERMITTED; break; case EINVAL: return DRIVER_OP_BAD_PARAMETER; break; case EFAULT: return DRIVER_OP_BAD_POINTER; break; case EIO: default: return DRIVER_OP_ERROR; break; } } else if (i_rc < -1) return DRIVER_OP_ERROR; else /*Not sure if this the best thing, but we'll use anyway. */ return DRIVER_OP_SUCCESS; } /*! Reads audio sectors from CD device into data starting from lsn. Returns 0 if no error. May have to check size of nblocks. There may be a limit that can be read in one go, e.g. 25 blocks. */ static int _read_audio_sectors_solaris (void *p_user_data, void *data, lsn_t i_lsn, unsigned int i_blocks) { struct cdrom_msf solaris_msf; msf_t _msf; struct cdrom_cdda cdda; _img_private_t *p_env = p_user_data; cdio_lba_to_msf (cdio_lsn_to_lba(i_lsn), &_msf); solaris_msf.cdmsf_min0 = cdio_from_bcd8(_msf.m); solaris_msf.cdmsf_sec0 = cdio_from_bcd8(_msf.s); solaris_msf.cdmsf_frame0 = cdio_from_bcd8(_msf.f); if (p_env->gen.ioctls_debugged == 75) cdio_debug ("only displaying every 75th ioctl from now on"); if (p_env->gen.ioctls_debugged == 30 * 75) cdio_debug ("only displaying every 30*75th ioctl from now on"); if (p_env->gen.ioctls_debugged < 75 || (p_env->gen.ioctls_debugged < (30 * 75) && p_env->gen.ioctls_debugged % 75 == 0) || p_env->gen.ioctls_debugged % (30 * 75) == 0) cdio_debug ("reading %d", i_lsn); p_env->gen.ioctls_debugged++; if (i_blocks > 60) { cdio_warn("%s:\n", "we can't handle reading more than 60 blocks. Reset to 60"); } cdda.cdda_addr = i_lsn; cdda.cdda_length = i_blocks; cdda.cdda_data = (caddr_t) data; cdda.cdda_subcode = CDROM_DA_NO_SUBCODE; if (ioctl (p_env->gen.fd, CDROMCDDA, &cdda) == -1) { perror ("ioctl(..,CDROMCDDA,..)"); return DRIVER_OP_ERROR; /* exit (EXIT_FAILURE); */ } return DRIVER_OP_SUCCESS; } /*! Reads a single mode1 sector from cd device into data starting from i_lsn. */ static driver_return_code_t _read_mode1_sector_solaris (void *p_env, void *data, lsn_t i_lsn, bool b_form2) { #if FIXED do something here. #else return cdio_generic_read_form1_sector(p_env, data, i_lsn); #endif } /*! Reads i_blocks of mode2 sectors from cd device into data starting from i_lsn. */ static driver_return_code_t _read_mode1_sectors_solaris (void *p_user_data, void *p_data, lsn_t i_lsn, bool b_form2, unsigned int i_blocks) { _img_private_t *p_env = p_user_data; unsigned int i; int retval; unsigned int blocksize = b_form2 ? M2RAW_SECTOR_SIZE : CDIO_CD_FRAMESIZE; for (i = 0; i < i_blocks; i++) { if ( (retval = _read_mode1_sector_solaris (p_env, ((char *)p_data) + (blocksize * i), i_lsn + i, b_form2)) ) return retval; } return DRIVER_OP_SUCCESS; } /*! Reads a single mode2 sector from cd device into data starting from lsn. */ static driver_return_code_t _read_mode2_sector_solaris (void *p_user_data, void *p_data, lsn_t i_lsn, bool b_form2) { char buf[CDIO_CD_FRAMESIZE_RAW] = { 0, }; struct cdrom_msf solaris_msf; msf_t _msf; int offset = 0; struct cdrom_cdxa cd_read; _img_private_t *p_env = p_user_data; cdio_lba_to_msf (cdio_lsn_to_lba(i_lsn), &_msf); solaris_msf.cdmsf_min0 = cdio_from_bcd8(_msf.m); solaris_msf.cdmsf_sec0 = cdio_from_bcd8(_msf.s); solaris_msf.cdmsf_frame0 = cdio_from_bcd8(_msf.f); if (p_env->gen.ioctls_debugged == 75) cdio_debug ("only displaying every 75th ioctl from now on"); if (p_env->gen.ioctls_debugged == 30 * 75) cdio_debug ("only displaying every 30*75th ioctl from now on"); if (p_env->gen.ioctls_debugged < 75 || (p_env->gen.ioctls_debugged < (30 * 75) && p_env->gen.ioctls_debugged % 75 == 0) || p_env->gen.ioctls_debugged % (30 * 75) == 0) cdio_debug ("reading %2.2d:%2.2d:%2.2d", solaris_msf.cdmsf_min0, solaris_msf.cdmsf_sec0, solaris_msf.cdmsf_frame0); p_env->gen.ioctls_debugged++; /* Using CDROMXA ioctl will actually use the same uscsi command * as ATAPI, except we don't need to be root */ offset = CDIO_CD_XA_SYNC_HEADER; cd_read.cdxa_addr = i_lsn; cd_read.cdxa_data = buf; cd_read.cdxa_length = 1; cd_read.cdxa_format = CDROM_XA_SECTOR_DATA; if (ioctl (p_env->gen.fd, CDROMCDXA, &cd_read) == -1) { perror ("ioctl(..,CDROMCDXA,..)"); return 1; /* exit (EXIT_FAILURE); */ } if (b_form2) memcpy (p_data, buf + (offset-CDIO_CD_SUBHEADER_SIZE), M2RAW_SECTOR_SIZE); else memcpy (((char *)p_data), buf + offset, CDIO_CD_FRAMESIZE); return DRIVER_OP_SUCCESS; } /*! Reads i_blocks of mode2 sectors from cd device into data starting from i_lsn. */ static driver_return_code_t _read_mode2_sectors_solaris (void *p_user_data, void *data, lsn_t i_lsn, bool b_form2, unsigned int i_blocks) { _img_private_t *p_env = p_user_data; unsigned int i; int retval; unsigned int blocksize = b_form2 ? M2RAW_SECTOR_SIZE : CDIO_CD_FRAMESIZE; for (i = 0; i < i_blocks; i++) { if ( (retval = _read_mode2_sector_solaris (p_env, ((char *)data) + (blocksize * i), i_lsn + i, b_form2)) ) return retval; } return 0; } /*! Return the size of the CD in logical block address (LBA) units. @return the size. On error return CDIO_INVALID_LSN. */ static lsn_t get_disc_last_lsn_solaris (void *p_user_data) { _img_private_t *p_env = p_user_data; struct cdrom_tocentry tocent; uint32_t size; tocent.cdte_track = CDIO_CDROM_LEADOUT_TRACK; tocent.cdte_format = CDIO_CDROM_LBA; if (ioctl (p_env->gen.fd, CDROMREADTOCENTRY, &tocent) == -1) { perror ("ioctl(CDROMREADTOCENTRY)"); exit (EXIT_FAILURE); } size = tocent.cdte_addr.lba; return size; } /*! Set the arg "key" with "value" in the source device. Currently "source" and "access-mode" are valid keys. "source" sets the source device in I/O operations "access-mode" sets the the method of CD access DRIVER_OP_SUCCESS is returned if no error was found, and nonzero if there as an error. */ static driver_return_code_t _set_arg_solaris (void *p_user_data, const char key[], const char value[]) { _img_private_t *p_env = p_user_data; if (!strcmp (key, "source")) { if (!value) return DRIVER_OP_ERROR; free (p_env->gen.source_name); p_env->gen.source_name = strdup (value); } else if (!strcmp (key, "access-mode")) { p_env->access_mode = str_to_access_mode_solaris(key); } else return DRIVER_OP_ERROR; return DRIVER_OP_SUCCESS; } /*! Read and cache the CD's Track Table of Contents and track info. Return true if successful or false if an error. */ static bool read_toc_solaris (void *p_user_data) { _img_private_t *p_env = p_user_data; int i; /* read TOC header */ if ( ioctl(p_env->gen.fd, CDROMREADTOCHDR, &p_env->tochdr) == -1 ) { cdio_warn("%s: %s\n", "error in ioctl CDROMREADTOCHDR", strerror(errno)); return false; } p_env->gen.i_first_track = p_env->tochdr.cdth_trk0; p_env->gen.i_tracks = p_env->tochdr.cdth_trk1; /* read individual tracks */ for (i=p_env->gen.i_first_track; i<=p_env->gen.i_tracks; i++) { struct cdrom_tocentry *p_toc = &(p_env->tocent[i-p_env->gen.i_first_track]); p_toc->cdte_track = i; p_toc->cdte_format = CDIO_CDROM_MSF; if ( ioctl(p_env->gen.fd, CDROMREADTOCENTRY, p_toc) == -1 ) { cdio_warn("%s %d: %s\n", "error in ioctl CDROMREADTOCENTRY for track", i, strerror(errno)); return false; } set_track_flags(&(p_env->gen.track_flags[i]), p_toc->cdte_ctrl); } /* read the lead-out track */ p_env->tocent[p_env->tochdr.cdth_trk1].cdte_track = CDIO_CDROM_LEADOUT_TRACK; p_env->tocent[p_env->tochdr.cdth_trk1].cdte_format = CDIO_CDROM_MSF; if (ioctl(p_env->gen.fd, CDROMREADTOCENTRY, &p_env->tocent[p_env->tochdr.cdth_trk1]) == -1 ) { cdio_warn("%s: %s\n", "error in ioctl CDROMREADTOCENTRY for lead-out", strerror(errno)); return false; } p_env->gen.toc_init = true; return true; } /*! Eject media in CD drive. If successful, as a side effect we also free obj. */ static driver_return_code_t eject_media_solaris (void *p_user_data) { _img_private_t *p_env = p_user_data; int ret; close(p_env->gen.fd); p_env->gen.fd = -1; if (p_env->gen.fd > -1) { if ((ret = ioctl(p_env->gen.fd, CDROMEJECT)) != 0) { cdio_generic_free((void *) p_env); cdio_warn ("CDROMEJECT failed: %s\n", strerror(errno)); return DRIVER_OP_ERROR; } else { return DRIVER_OP_SUCCESS; } } return DRIVER_OP_ERROR; } static bool is_mmc_supported(void *user_data) { _img_private_t *env = user_data; return (_AM_NONE == env->access_mode) ? false : true; } /*! Return the value associated with the key "arg". */ static const char * get_arg_solaris (void *p_user_data, const char key[]) { _img_private_t *p_env = p_user_data; if (!strcmp (key, "source")) { return p_env->gen.source_name; } else if (!strcmp (key, "access-mode")) { switch (p_env->access_mode) { case _AM_SUN_CTRL_ATAPI: return "ATAPI"; case _AM_SUN_CTRL_SCSI: return "SCSI"; case _AM_MMC_RDWR: return "MMC_RDWR"; case _AM_MMC_RDWR_EXCL: return "MMC_RDWR_EXCL"; case _AM_NONE: return "no access method"; } } else if (!strcmp (key, "scsi-tuple")) { return p_env->gen.scsi_tuple; } else if (!strcmp (key, "mmc-supported?")) { return is_mmc_supported(p_user_data) ? "true" : "false"; } return NULL; } /*! Get the block size used in read requests, via ioctl. @return the blocksize if > 0; error if <= 0 */ static int get_blocksize_solaris (void *p_user_data) { _img_private_t *p_env = p_user_data; int ret; int i_blocksize; if ( !p_env || p_env->gen.fd <=0 ) return DRIVER_OP_UNINIT; if ((ret = ioctl(p_env->gen.fd, CDROMGBLKMODE, &i_blocksize)) != 0) { cdio_warn ("CDROMGBLKMODE failed: %s\n", strerror(errno)); return DRIVER_OP_ERROR; } else { return i_blocksize; } } /*! Return a string containing the default CD device if none is specified. This call does not assume a fixed default drive address but rather uses the first drive that gets enumerated by cdio_get_devices_solaris_cXtYdZs2(). */ static char * cdio_get_default_cXtYdZs2(void) { char **devlist, *result = NULL; devlist = cdio_get_devices_solaris_cXtYdZs2(1); if(devlist != NULL) { if(devlist[0] != NULL) result = strdup(devlist[0]); free(devlist); } if(result != NULL) return result; return strdup(DEFAULT_CDIO_DEVICE); } /*! Return a string containing the default CD device if none is specified. */ char * cdio_get_default_device_solaris(void) { char *volume_device; char *volume_name; char *volume_action; char *device; struct stat stb; /* vold and its directory /vol have been replaced by "Tamarack" which is based on hald. This happened in 2006. */ if(stat("/vol", &stb) == -1) return cdio_get_default_cXtYdZs2(); if((stb.st_mode & S_IFMT) != S_IFDIR) return cdio_get_default_cXtYdZs2(); if ((volume_device = getenv("VOLUME_DEVICE")) != NULL && (volume_name = getenv("VOLUME_NAME")) != NULL && (volume_action = getenv("VOLUME_ACTION")) != NULL && strcmp(volume_action, "insert") == 0) { uint len = strlen(volume_device) + strlen(volume_name) + 2; device = calloc(1, len); if (device == NULL) return strdup(DEFAULT_CDIO_DEVICE); snprintf(device, len, "%s/%s", volume_device, volume_name); if (stat(device, &stb) != 0 || !S_ISCHR(stb.st_mode)) { free(device); return strdup(DEFAULT_CDIO_DEVICE); } return device; } /* Check if it could be a Solaris media*/ if((stat(DEFAULT_CDIO_DEVICE, &stb) == 0) && S_ISDIR(stb.st_mode)) { uint len = strlen(DEFAULT_CDIO_DEVICE + 4); device = calloc(1, len); snprintf(device, len, "%s/s0", DEFAULT_CDIO_DEVICE); return device; } return strdup(DEFAULT_CDIO_DEVICE); } /*! Get disc type associated with cd object. */ static discmode_t get_discmode_solaris (void *p_user_data) { _img_private_t *p_env = p_user_data; track_t i_track; discmode_t discmode=CDIO_DISC_MODE_NO_INFO; struct dk_minfo media; int ret; /* Get the media info */ if((ret = ioctl(p_env->gen.fd, DKIOCGMEDIAINFO, &media)) != 0) { cdio_warn ("DKIOCGMEDIAINFO failed: %s\n", strerror(errno)); return CDIO_DISC_MODE_NO_INFO; } switch(media.dki_media_type) { case DK_CDROM: case DK_CDR: case DK_CDRW: /* Do cdrom detection */ break; case DK_DVDROM: return CDIO_DISC_MODE_DVD_ROM; case DK_DVDR: discmode = CDIO_DISC_MODE_DVD_R; break; case DK_DVDRAM: discmode = CDIO_DISC_MODE_DVD_RAM; break; case DK_DVDRW: case DK_DVDRW+1: discmode = CDIO_DISC_MODE_DVD_RW; break; default: /* no valid match */ return CDIO_DISC_MODE_NO_INFO; } /* GNU/Linux ioctl(.., CDROM_DISC_STATUS) does not return "CD DATA Form 2" for SVCD's even though they are are form 2. Issue a SCSI MMC-2 FULL TOC command first to try get more accurate information. */ discmode = mmc_get_discmode(p_env->gen.cdio); if (CDIO_DISC_MODE_NO_INFO != discmode) return discmode; if((discmode == CDIO_DISC_MODE_DVD_RAM || discmode == CDIO_DISC_MODE_DVD_RW || discmode == CDIO_DISC_MODE_DVD_R)) { /* Fallback to uscsi if we can */ if(geteuid() == 0) return get_discmode_solaris(p_user_data); return discmode; } if (!p_env->gen.toc_init) read_toc_solaris (p_env); if (!p_env->gen.toc_init) return CDIO_DISC_MODE_NO_INFO; for (i_track = p_env->gen.i_first_track; i_track < p_env->gen.i_first_track + p_env->tochdr.cdth_trk1 ; i_track ++) { track_format_t track_fmt=get_track_format_solaris(p_env, i_track); switch(track_fmt) { case TRACK_FORMAT_AUDIO: switch(discmode) { case CDIO_DISC_MODE_NO_INFO: discmode = CDIO_DISC_MODE_CD_DA; break; case CDIO_DISC_MODE_CD_DA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_ERROR: /* No change*/ break; default: discmode = CDIO_DISC_MODE_CD_MIXED; } break; case TRACK_FORMAT_XA: switch(discmode) { case CDIO_DISC_MODE_NO_INFO: discmode = CDIO_DISC_MODE_CD_XA; break; case CDIO_DISC_MODE_CD_XA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_ERROR: /* No change*/ break; default: discmode = CDIO_DISC_MODE_CD_MIXED; } break; case TRACK_FORMAT_DATA: switch(discmode) { case CDIO_DISC_MODE_NO_INFO: discmode = CDIO_DISC_MODE_CD_DATA; break; case CDIO_DISC_MODE_CD_DATA: case CDIO_DISC_MODE_CD_MIXED: case CDIO_DISC_MODE_ERROR: /* No change*/ break; default: discmode = CDIO_DISC_MODE_CD_MIXED; } break; case TRACK_FORMAT_ERROR: default: discmode = CDIO_DISC_MODE_ERROR; } } return discmode; } /*! Return the session number of the last on the CD. @param p_cdio the CD object to be acted upon. @param i_last_session pointer to the session number to be returned. */ static driver_return_code_t get_last_session_solaris (void *p_user_data, /*out*/ lsn_t *i_last_session_lsn) { const _img_private_t *p_env = p_user_data; int i_rc; i_rc = ioctl(p_env->gen.fd, CDROMREADOFFSET, &i_last_session_lsn); if (0 == i_rc) { return DRIVER_OP_SUCCESS; } else { cdio_warn ("ioctl CDROMREADOFFSET failed: %s\n", strerror(errno)); return DRIVER_OP_ERROR; } } /*! Get format of track. */ static track_format_t get_track_format_solaris(void *p_user_data, track_t i_track) { _img_private_t *p_env = p_user_data; if ( !p_env ) return TRACK_FORMAT_ERROR; if (!p_env->gen.init) init_solaris(p_env); if (!p_env->gen.toc_init) read_toc_solaris (p_user_data) ; if ( (i_track > p_env->gen.i_tracks+p_env->gen.i_first_track) || i_track < p_env->gen.i_first_track) return TRACK_FORMAT_ERROR; i_track -= p_env->gen.i_first_track; /* This is pretty much copied from the "badly broken" cdrom_count_tracks in linux/cdrom.c. */ if (p_env->tocent[i_track].cdte_ctrl & CDROM_DATA_TRACK) { if (p_env->tocent[i_track].cdte_format == CDIO_CDROM_CDI_TRACK) return TRACK_FORMAT_CDI; else if (p_env->tocent[i_track].cdte_format == CDIO_CDROM_XA_TRACK) return TRACK_FORMAT_XA; else return TRACK_FORMAT_DATA; } else return TRACK_FORMAT_AUDIO; } /*! Return true if we have XA data (green, mode2 form1) or XA data (green, mode2 form2). That is track begins: sync - header - subheader 12 4 - 8 FIXME: there's gotta be a better design for this and get_track_format? */ static bool get_track_green_solaris(void *p_user_data, track_t i_track) { _img_private_t *p_env = p_user_data; if ( !p_env ) return false; if (!p_env->gen.init) init_solaris(p_env); if (!p_env->gen.toc_init) read_toc_solaris (p_env) ; if (i_track >= p_env->gen.i_tracks+p_env->gen.i_first_track || i_track < p_env->gen.i_first_track) return false; i_track -= p_env->gen.i_first_track; /* FIXME: Dunno if this is the right way, but it's what I was using in cd-info for a while. */ return ((p_env->tocent[i_track].cdte_ctrl & 2) != 0); } /*! Return the starting MSF (minutes/secs/frames) for track number track_num in obj. Track numbers usually start at something greater than 0, usually 1. The "leadout" track is specified either by using track_num LEADOUT_TRACK or the total tracks+1. False is returned if there is no entry. */ static bool get_track_msf_solaris(void *p_user_data, track_t i_track, msf_t *msf) { _img_private_t *p_env = p_user_data; if (NULL == msf) return false; if (!p_env->gen.init) init_solaris(p_env); if (!p_env->gen.toc_init) read_toc_solaris (p_env) ; if (i_track == CDIO_CDROM_LEADOUT_TRACK) i_track = p_env->gen.i_tracks + p_env->gen.i_first_track; if (i_track > (p_env->gen.i_tracks+p_env->gen.i_first_track) || i_track < p_env->gen.i_first_track) { return false; } else { struct cdrom_tocentry *msf0 = &p_env->tocent[i_track-1]; msf->m = cdio_to_bcd8(msf0->cdte_addr.msf.minute); msf->s = cdio_to_bcd8(msf0->cdte_addr.msf.second); msf->f = cdio_to_bcd8(msf0->cdte_addr.msf.frame); return true; } } /*! Get the block size used in read requests, via ioctl. @return the blocksize if > 0; error if <= 0 */ static driver_return_code_t set_blocksize_solaris (void *p_user_data, uint16_t i_blocksize) { _img_private_t *p_env = p_user_data; int ret; if ( !p_env || p_env->gen.fd <=0 ) return DRIVER_OP_UNINIT; if ((ret = ioctl(p_env->gen.fd, CDROMSBLKMODE, i_blocksize)) != 0) { cdio_warn ("CDROMSBLKMODE failed: %s\n", strerror(errno)); return DRIVER_OP_ERROR; } else { return DRIVER_OP_SUCCESS; } } /* Set CD-ROM drive speed */ static driver_return_code_t set_speed_solaris (void *p_user_data, int i_speed) { const _img_private_t *p_env = p_user_data; if (!p_env) return DRIVER_OP_UNINIT; return ioctl(p_env->gen.fd, CDROMSDRVSPEED, i_speed); } #else /*! Return a string containing the default VCD device if none is specified. */ char * cdio_get_default_device_solaris(void) { return strdup(DEFAULT_CDIO_DEVICE); } #endif /* HAVE_SOLARIS_CDROM */ /*! Close tray on CD-ROM. @param psz_device the CD-ROM drive to be closed. */ driver_return_code_t close_tray_solaris (const char *psz_device) { #ifdef HAVE_SOLARIS_CDROM int i_rc; int fd = open (psz_device, O_RDONLY|O_NONBLOCK); if ( fd > -1 ) { i_rc = DRIVER_OP_SUCCESS; if((i_rc = ioctl(fd, CDROMSTART)) != 0) { cdio_warn ("ioctl CDROMSTART failed: %s\n", strerror(errno)); i_rc = DRIVER_OP_ERROR; } close(fd); } else i_rc = DRIVER_OP_ERROR; return i_rc; #else return DRIVER_OP_NO_DRIVER; #endif /*HAVE_SOLARIS_CDROM*/ } /*! Return an array of strings giving possible CD devices. New method after demise of vold in 2006. */ /* flag bit0= need only the first drive */ static char ** cdio_get_devices_solaris_cXtYdZs2(int flag) { #ifndef HAVE_SOLARIS_CDROM return NULL; #else int busno, tgtno, lunno, ret; char volpath[160]; char **drives = NULL; unsigned int i_files=0; DIR *dir = NULL; struct dirent *entry; #ifdef LIBCDIO_SOLARIS_WITH_CD_INQUIRY CdIo_t *cdio = NULL; mmc_cdb_t cdb = {{0, }}; int timeout_ms; driver_return_code_t i_status; char reply[36]; static unsigned char spc_inquiry[] = { 0x12, 0, 0, 0, 36, 0 }; #else struct dk_cinfo cinfo; int fd = -1; #endif static int recursion = 0; if (recursion) { fprintf(stderr, "Program error ! Recursion of cdio_get_devices_solaris_cXtYdZs2()\n"); return NULL; } recursion = 1; dir = opendir("/dev/rdsk"); if (dir == NULL) { cdio_warn ("opendir(\"/dev/rdsk\") failed: %s\n", strerror(errno)); goto ex; } while (1) { entry = readdir(dir); if (entry == NULL) { if (errno) { cdio_warn ("readdir(/dev/rdsk) failed: %s\n", strerror(errno)); goto ex; } break; } ret = cdio_decode_btl_solaris(entry->d_name, &busno, &tgtno, &lunno, 0); if (ret < 0) goto ex; if (ret == 0) continue; /* not cXtYdZs2 */ if (strlen(entry->d_name) > sizeof(volpath) - 11) continue; snprintf(volpath, sizeof(volpath), "/dev/rdsk/%s", entry->d_name); #ifdef LIBCDIO_SOLARIS_WITH_CD_INQUIRY cdio = cdio_open_am_solaris(volpath, "MMC_RDWR"); if(cdio == NULL) continue; memcpy(cdb.field, spc_inquiry, 6); timeout_ms = 10000; i_status = run_mmc_cmd_solaris(cdio->env, timeout_ms, 6, &cdb, SCSI_MMC_DATA_READ, (unsigned int) spc_inquiry[4], reply); cdio_destroy(cdio); cdio = NULL; if (i_status != 0) continue; /* SBC-3 , table 83 , PERIPHERAL DEVICE TYPE : 5 = CD/DVD device */ if((reply[0] & 0x1F) != 5) continue; #else /* LIBCDIO_SOLARIS_WITH_CD_INQUIRY */ fd = open(volpath, O_RDONLY | O_NDELAY); if (fd < 0) continue; /* See man dkio */ ret = ioctl(fd, DKIOCINFO, &cinfo); close(fd); fd = -1; if (ret < 0) continue; if (cinfo.dki_ctype != DKC_CDROM) continue; #endif /* ! LIBCDIO_SOLARIS_WITH_CD_INQUIRY */ cdio_add_device_list(&drives, volpath, &i_files); if(flag & 1) goto ex; /* Only the first drive is desired */ } ex:; recursion = 0; if(dir != NULL) closedir(dir); cdio_add_device_list(&drives, NULL, &i_files); return drives; #endif /*HAVE_SOLARIS_CDROM*/ } /*! Return an array of strings giving possible CD devices. */ char ** cdio_get_devices_solaris (void) { #ifndef HAVE_SOLARIS_CDROM return NULL; #else char volpath[256]; struct stat st; char **drives = NULL; unsigned int i_files=0; #ifdef HAVE_GLOB_H unsigned int i; glob_t globbuf; #endif /* vold and its directory /vol have been replaced by "Tamarack" which is based on hald. This happened in 2006. */ if(stat("/vol", &st) == -1) return cdio_get_devices_solaris_cXtYdZs2(0); if((st.st_mode & S_IFMT) != S_IFDIR) return cdio_get_devices_solaris_cXtYdZs2(0); #ifdef HAVE_GLOB_H globbuf.gl_offs = 0; glob("/vol/dev/aliases/cdrom*", GLOB_DOOFFS, NULL, &globbuf); for (i=0; iaccess_mode = str_to_access_mode_solaris(access_mode); _data->gen.init = false; _data->gen.fd = -1; _data->gen.toc_init = false; _data->gen.b_cdtext_init = false; _data->gen.b_cdtext_error = false; if (NULL == psz_orig_source) { psz_source = cdio_get_default_device_solaris(); if (NULL == psz_source) return NULL; _set_arg_solaris(_data, "source", psz_source); free(psz_source); } else { if (cdio_is_device_generic(psz_orig_source)) _set_arg_solaris(_data, "source", psz_orig_source); else { /* The below would be okay if all device drivers worked this way. */ #if 0 cdio_info ("source %s is not a device", psz_orig_source); #endif free(_data); return NULL; } } ret = cdio_new ( (void *) _data, &_funcs ); if (ret == NULL) return NULL; ret->driver_id = DRIVER_SOLARIS; if (init_solaris(_data)) return ret; else { cdio_generic_free (_data); return NULL; } #else return NULL; #endif /* HAVE_SOLARIS_CDROM */ } bool cdio_have_solaris (void) { #ifdef HAVE_SOLARIS_CDROM return true; #else return false; #endif /* HAVE_SOLARIS_CDROM */ } libcdio-0.83/lib/driver/_cdio_stdio.h0000644000175000017500000000273011114145233014460 00000000000000/* $Id: _cdio_stdio.h,v 1.3 2008/04/22 15:29:11 karl Exp $ Copyright (C) 2003, 2008 Rocky Bernstein Copyright (C) 2000 Herbert Valerio Riedel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef __CDIO_STDIO_H__ #define __CDIO_STDIO_H__ #include "_cdio_stream.h" /*! Initialize a new stdio stream reading from pathname. A pointer to the stream is returned or NULL if there was an error. cdio_stream_free should be called on the returned value when you don't need the stream any more. No other finalization is needed. */ CdioDataSource_t * cdio_stdio_new(const char psz_path[]); /*! Deallocate resources assocaited with obj. After this obj is unusable. */ void cdio_stdio_destroy(CdioDataSource_t *p_obj); #endif /* __CDIO_STREAM_STDIO_H__ */ /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/lib/driver/_cdio_stream.h0000644000175000017500000001050111114145233014624 00000000000000/* $Id: _cdio_stream.h,v 1.5 2008/04/22 15:29:11 karl Exp $ Copyright (C) 2003, 2004, 2005, 2006, 2008 Rocky Bernstein Copyright (C) 2000 Herbert Valerio Riedel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef __CDIO_STREAM_H__ #define __CDIO_STREAM_H__ #include #include "cdio_private.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* typedef'ed IO functions prototypes */ typedef int(*cdio_data_open_t)(void *user_data); typedef long(*cdio_data_read_t)(void *user_data, void *buf, long count); typedef driver_return_code_t(*cdio_data_seek_t)(void *user_data, long offset, int whence); typedef long(*cdio_data_stat_t)(void *user_data); typedef int(*cdio_data_close_t)(void *user_data); typedef void(*cdio_data_free_t)(void *user_data); /* abstract data source */ typedef struct { cdio_data_open_t open; cdio_data_seek_t seek; cdio_data_stat_t stat; cdio_data_read_t read; cdio_data_close_t close; cdio_data_free_t free; } cdio_stream_io_functions; /** Like 3 fgetpos. This function gets the current file position indicator for the stream pointed to by stream. @return unpon successful completion, return value is positive, else, the global variable errno is set to indicate the error. */ ssize_t cdio_stream_getpos(CdioDataSource_t* p_obj, /*out*/ ssize_t *i_offset); CdioDataSource_t * cdio_stream_new(void *user_data, const cdio_stream_io_functions *funcs); /** Like fread(3) and in fact may be the same. DESCRIPTION: The function fread reads nmemb elements of data, each size bytes long, from the stream pointed to by stream, storing them at the location given by ptr. RETURN VALUE: return the number of items successfully read or written (i.e., not the number of characters). If an error occurs, or the end-of-file is reached, the return value is a short item count (or zero). We do not distinguish between end-of-file and error, and callers must use feof(3) and ferror(3) to determine which occurred. */ ssize_t cdio_stream_read(CdioDataSource_t* p_obj, void *ptr, long i_size, long nmemb); /** Like fseek(3) and in fact may be the same. This function sets the file position indicator for the stream pointed to by stream. The new position, measured in bytes, is obtained by adding offset bytes to the position specified by whence. If whence is set to SEEK_SET, SEEK_CUR, or SEEK_END, the offset is relative to the start of the file, the current position indicator, or end-of-file, respectively. A successful call to the fseek function clears the end- of-file indicator for the stream and undoes any effects of the ungetc(3) function on the same stream. @return upon successful completion, DRIVER_OP_SUCCESS, else, DRIVER_OP_ERROR is returned and the global variable errno is set to indicate the error. */ ssize_t cdio_stream_seek(CdioDataSource_t *p_obj, ssize_t i_offset, int whence); /** Return whatever size of stream reports, I guess unit size is bytes. On error return -1; */ ssize_t cdio_stream_stat(CdioDataSource_t *p_obj); /** Deallocate resources associated with p_obj. After this p_obj is unusable. */ void cdio_stream_destroy(CdioDataSource_t *p_obj); void cdio_stream_close(CdioDataSource_t *p_obj); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __CDIO_STREAM_H__ */ /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/lib/driver/cdio_private.h0000644000175000017500000004150011333643546014664 00000000000000/* $Id: cdio_private.h,v 1.37 2008/04/22 15:29:11 karl Exp $ Copyright (C) 2003, 2004, 2005, 2008, 2009 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Internal routines for CD I/O drivers. */ #ifndef __CDIO_PRIVATE_H__ #define __CDIO_PRIVATE_H__ #if defined(HAVE_CONFIG_H) && !defined(LIBCDIO_CONFIG_H) # include "config.h" #endif #include #include #include #include "mmc/mmc_private.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* Opaque type */ typedef struct _CdioDataSource CdioDataSource_t; #ifdef __cplusplus } #endif /* __cplusplus */ #include "generic.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef struct { /*! Get volume of an audio CD. @param p_env the CD object to be acted upon. */ driver_return_code_t (*audio_get_volume) (void *p_env, /*out*/ cdio_audio_volume_t *p_volume); /*! Pause playing CD through analog output @param p_env the CD object to be acted upon. */ driver_return_code_t (*audio_pause) (void *p_env); /*! Playing CD through analog output @param p_env the CD object to be acted upon. */ driver_return_code_t (*audio_play_msf) ( void *p_env, msf_t *p_start_msf, msf_t *p_end_msf ); /*! Playing CD through analog output @param p_env the CD object to be acted upon. */ driver_return_code_t (*audio_play_track_index) ( void *p_env, cdio_track_index_t *p_track_index ); /*! Get subchannel information. @param p_env the CD object to be acted upon. */ driver_return_code_t (*audio_read_subchannel) ( void *p_env, cdio_subchannel_t *subchannel ); /*! Resume playing an audio CD. @param p_env the CD object to be acted upon. */ driver_return_code_t (*audio_resume) ( void *p_env ); /*! Set volume of an audio CD. @param p_env the CD object to be acted upon. */ driver_return_code_t (*audio_set_volume) ( void *p_env, cdio_audio_volume_t *p_volume ); /*! Stop playing an audio CD. @param p_env the CD object to be acted upon. */ driver_return_code_t (*audio_stop) ( void *p_env ); /*! Eject media in CD drive. If successful, as a side effect we also free p_env. @param p_env the CD object to be acted upon. If the CD is ejected *p_env is freed and p_env set to NULL. */ driver_return_code_t (*eject_media) ( void *p_env ); /*! Release and free resources associated with cd. */ void (*free) (void *p_env); /*! Return the value associated with the key "arg". */ const char * (*get_arg) (void *p_env, const char key[]); /*! Get the block size for subsequest read requests, via a SCSI MMC MODE_SENSE 6 command. */ int (*get_blocksize) ( void *p_env ); /*! Get cdtext information for a CdIo object. @param obj the CD object that may contain CD-TEXT information. @return the CD-TEXT object or NULL if obj is NULL or CD-TEXT information does not exist. If i_track is 0 or CDIO_CDROM_LEADOUT_TRACK the track returned is the information assocated with the CD. */ cdtext_t * (*get_cdtext) ( void *p_env, track_t i_track ); /*! Return an array of device names. if CdIo is NULL (we haven't initialized a specific device driver), then find a suitable device driver. NULL is returned if we couldn't return a list of devices. */ char ** (*get_devices) ( void ); /*! Get the default CD device. @return a string containing the default CD device or NULL is if we couldn't get a default device. In some situations of drivers or OS's we can't find a CD device if there is no media in it and it is possible for this routine to return NULL even though there may be a hardware CD-ROM. */ char * (*get_default_device) ( void ); /*! Return the size of the CD in logical block address (LBA) units. @return the lsn. On error 0 or CDIO_INVALD_LSN. */ lsn_t (*get_disc_last_lsn) ( void *p_env ); /*! Get disc mode associated with cd_obj. */ discmode_t (*get_discmode) ( void *p_env ); /*! Return the what kind of device we've got. See cd_types.h for a list of bitmasks for the drive type; */ void (*get_drive_cap) (const void *p_env, cdio_drive_read_cap_t *p_read_cap, cdio_drive_write_cap_t *p_write_cap, cdio_drive_misc_cap_t *p_misc_cap); /*! Return the number of of the first track. CDIO_INVALID_TRACK is returned on error. */ track_t (*get_first_track_num) ( void *p_env ); /*! Get the CD-ROM hardware info via a SCSI MMC INQUIRY command. False is returned if we had an error getting the information. */ bool (*get_hwinfo) ( const CdIo_t *p_cdio, /* out*/ cdio_hwinfo_t *p_hw_info ); /*! Get the LSN of the first track of the last session of on the CD. @param p_cdio the CD object to be acted upon. @param i_last_session pointer to the session number to be returned. */ driver_return_code_t (*get_last_session) ( void *p_env, /*out*/ lsn_t *i_last_session ); /*! Find out if media has changed since the last call. @param p_env the CD object to be acted upon. @return 1 if media has changed since last call, 0 if not. Error return codes are the same as driver_return_code_t */ int (*get_media_changed) ( const void *p_env ); /*! Return the media catalog number MCN from the CD or NULL if there is none or we don't have the ability to get it. */ char * (*get_mcn) ( const void *p_env ); /*! Return the number of tracks in the current medium. CDIO_INVALID_TRACK is returned on error. */ track_t (*get_num_tracks) ( void *p_env ); /*! Return number of channels in track: 2 or 4; -2 if not implemented or -1 for error. Not meaningful if track is not an audio track. */ int (*get_track_channels) ( const void *p_env, track_t i_track ); /*! Return 0 if track is copy protected, 1 if not, or -1 for error or -2 if not implimented (yet). Is this meaningful if not an audio track? */ track_flag_t (*get_track_copy_permit) ( void *p_env, track_t i_track ); /*! Return the starting LBA for track number i_track in p_env. Tracks numbers start at 1. The "leadout" track is specified either by using track_num LEADOUT_TRACK or the total tracks+1. CDIO_INVALID_LBA is returned on error. */ lba_t (*get_track_lba) ( void *p_env, track_t i_track ); /*! Return the starting LBA for the pregap for track number i_track in p_env. Tracks numbers start at 1. CDIO_INVALID_LBA is returned on error. */ lba_t (*get_track_pregap_lba) ( const void *p_env, track_t i_track ); /*! Return the International Standard Recording Code (ISRC) for track number i_track in p_cdio. Track numbers start at 1. Note: string is malloc'd so caller has to free() the returned string when done with it. */ char * (*get_track_isrc) ( const void *p_env, track_t i_track ); /*! Get format of track. */ track_format_t (*get_track_format) ( void *p_env, track_t i_track ); /*! Return true if we have XA data (green, mode2 form1) or XA data (green, mode2 form2). That is track begins: sync - header - subheader 12 4 - 8 FIXME: there's gotta be a better design for this and get_track_format? */ bool (*get_track_green) ( void *p_env, track_t i_track ); /*! Return the starting MSF (minutes/secs/frames) for track number i_track in p_env. Tracks numbers start at 1. The "leadout" track is specified either by using i_track LEADOUT_TRACK or the total tracks+1. False is returned on error. */ bool (*get_track_msf) ( void *p_env, track_t i_track, msf_t *p_msf ); /*! Return 1 if track has pre-emphasis, 0 if not, or -1 for error or -2 if not implimented (yet). Is this meaningful if not an audio track? */ track_flag_t (*get_track_preemphasis) ( const void *p_env, track_t i_track ); /*! lseek - reposition read/write file offset Returns (off_t) -1 on error. Similar to libc's lseek() */ off_t (*lseek) ( void *p_env, off_t offset, int whence ); /*! Reads into buf the next size bytes. Returns -1 on error. Similar to libc's read() */ ssize_t (*read) ( void *p_env, void *p_buf, size_t i_size ); /*! Reads a single mode2 sector from cd device into buf starting from lsn. Returns 0 if no error. */ int (*read_audio_sectors) ( void *p_env, void *p_buf, lsn_t i_lsn, unsigned int i_blocks ); /*! Read a data sector @param p_env environment to read from @param p_buf place to read data into. The caller should make sure this location can store at least CDIO_CD_FRAMESIZE, M2RAW_SECTOR_SIZE, or M2F2_SECTOR_SIZE depending on the kind of sector getting read. If you don't know whether you have a Mode 1/2, Form 1/ Form 2/Formless sector best to reserve space for the maximum, M2RAW_SECTOR_SIZE. @param i_lsn sector to read @param i_blocksize size of block. Should be either CDIO_CD_FRAMESIZE, M2RAW_SECTOR_SIZE, or M2F2_SECTOR_SIZE. See comment above under p_buf. */ driver_return_code_t (*read_data_sectors) ( void *p_env, void *p_buf, lsn_t i_lsn, uint16_t i_blocksize, uint32_t i_blocks ); /*! Reads a single mode2 sector from cd device into buf starting from lsn. Returns 0 if no error. */ int (*read_mode2_sector) ( void *p_env, void *p_buf, lsn_t i_lsn, bool b_mode2_form2 ); /*! Reads i_blocks of mode2 sectors from cd device into data starting from lsn. Returns 0 if no error. */ int (*read_mode2_sectors) ( void *p_env, void *p_buf, lsn_t i_lsn, bool b_mode2_form2, unsigned int i_blocks ); /*! Reads a single mode1 sector from cd device into buf starting from lsn. Returns 0 if no error. */ int (*read_mode1_sector) ( void *p_env, void *p_buf, lsn_t i_lsn, bool mode1_form2 ); /*! Reads i_blocks of mode1 sectors from cd device into data starting from lsn. Returns 0 if no error. */ int (*read_mode1_sectors) ( void *p_env, void *p_buf, lsn_t i_lsn, bool mode1_form2, unsigned int i_blocks ); bool (*read_toc) ( void *p_env ) ; /*! Run a SCSI MMC command. cdio CD structure set by cdio_open(). i_timeout_ms time in milliseconds we will wait for the command to complete. cdb_len number of bytes in cdb (6, 10, or 12). cdb CDB bytes. All values that are needed should be set on input. b_return_data TRUE if the command expects data to be returned in the buffer len Size of buffer buf Buffer for data, both sending and receiving Returns 0 if command completed successfully. */ mmc_run_cmd_fn_t run_mmc_cmd; /*! Set the arg "key" with "value" in the source device. */ int (*set_arg) ( void *p_env, const char key[], const char value[] ); /*! Set the blocksize for subsequent reads. */ driver_return_code_t (*set_blocksize) ( void *p_env, uint16_t i_blocksize ); /*! Set the drive speed. @return 0 if everything went okay, -1 if we had an error. is -2 returned if this is not implemented for the current driver. */ int (*set_speed) ( void *p_env, int i_speed ); } cdio_funcs_t; /*! Implementation of CdIo type */ struct _CdIo { driver_id_t driver_id; /**< Particular driver opened. */ cdio_funcs_t op; /**< driver-specific routines handling implementation*/ void *env; /**< environment. Passed to routine above. */ }; /* This is used in drivers that must keep their own internal position pointer for doing seeks. Stream-based drivers (like bincue, nrg, toc, network) would use this. */ typedef struct { off_t buff_offset; /* buffer offset in disk-image seeks. */ track_t index; /* Current track index in tocent. */ lba_t lba; /* Current LBA */ } internal_position_t; CdIo_t * cdio_new (generic_img_private_t *p_env, cdio_funcs_t *p_funcs); /* The below structure describes a specific CD Input driver */ typedef struct { driver_id_t id; unsigned int flags; const char *name; const char *describe; bool (*have_driver) (void); CdIo_t *(*driver_open) (const char *psz_source_name); CdIo_t *(*driver_open_am) (const char *psz_source_name, const char *psz_access_mode); char *(*get_default_device) (void); bool (*is_device) (const char *psz_source_name); char **(*get_devices) (void); driver_return_code_t (*close_tray) (const char *psz_device); } CdIo_driver_t; /* The below array gives of the drivers that are currently available for on a particular host. */ extern CdIo_driver_t CdIo_driver[]; /* The last valid entry of Cdio_driver. -1 means uninitialzed. -2 means some sort of error. */ extern int CdIo_last_driver; /* The below array gives all drivers that can possibly appear. on a particular host. */ extern CdIo_driver_t CdIo_all_drivers[]; /*! Add/allocate a drive to the end of drives. Use cdio_free_device_list() to free this device_list. */ void cdio_add_device_list(char **device_list[], const char *psz_drive, unsigned int *i_drives); driver_return_code_t close_tray_bsdi (const char *psz_drive); driver_return_code_t close_tray_freebsd (const char *psz_drive); driver_return_code_t close_tray_linux (const char *psz_drive); driver_return_code_t close_tray_netbsd (const char *psz_drive); driver_return_code_t close_tray_os2 (const char *psz_drive); driver_return_code_t close_tray_osx (const char *psz_drive); driver_return_code_t close_tray_solaris (const char *psz_drive); driver_return_code_t close_tray_win32 (const char *psz_drive); bool cdio_have_netbsd(void); CdIo_t * cdio_open_netbsd (const char *psz_source); char * cdio_get_default_device_netbsd(void); char **cdio_get_devices_netbsd(void); /*! Set up CD-ROM for reading using the NetBSD driver. The device_name is the some sort of device name. NULL is returned on error or there is no FreeBSD driver. @see cdio_open_cd, cdio_open */ CdIo_t * cdio_open_am_netbsd (const char *psz_source, const char *psz_access_mode); /*! DEPRICATED: use cdio_have_driver(). True if AIX driver is available. */ bool cdio_have_aix (void); /*! DEPRICATED: use cdio_have_driver(). True if BSDI driver is available. */ bool cdio_have_bsdi (void); /*! DEPRICATED: use cdio_have_driver(). True if FreeBSD driver is available. */ bool cdio_have_freebsd (void); /*! DEPRICATED: use cdio_have_driver(). True if GNU/Linux driver is available. */ bool cdio_have_linux (void); /*! DEPRICATED: use cdio_have_driver(). True if Sun Solaris driver is available. */ bool cdio_have_solaris (void); /*! DEPRICATED: use cdio_have_driver(). True if IBM OS2 driver is available. */ bool cdio_have_os2 (void); /*! DEPRICATED: use cdio_have_driver(). True if Apple OSX driver is available. */ bool cdio_have_osx (void); /*! DEPRICATED: use cdio_have_driver(). True if Microsoft Windows driver is available. */ bool cdio_have_win32 (void); /*! True if Nero driver is available. */ bool cdio_have_nrg (void); /*! True if BIN/CUE driver is available. */ bool cdio_have_bincue (void); /*! True if cdrdao CDRDAO driver is available. */ bool cdio_have_cdrdao (void); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __CDIO_PRIVATE_H__ */ libcdio-0.83/lib/driver/aix.c0000644000175000017500000006417111650122066012770 00000000000000/* Copyright (C) 2004, 2005, 2006, 2008, 2010, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #ifdef HAVE_STRING_H #include #endif #include #include #include #include #include "cdio_assert.h" #include "cdio_private.h" #define DEFAULT_CDIO_DEVICE "/dev/rcd0" #ifdef HAVE_AIX_CDROM static const char _rcsid[] = "$Id: aix.c,v 1.3 2008/04/22 15:29:11 karl Exp $"; #ifdef HAVE_GLOB_H #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include "cdtext_private.h" typedef struct _TRACK_DATA { uchar Format; uchar Control : 4; uchar Adr : 4; uchar TrackNumber; uchar Reserved1; uchar Address[4]; } TRACK_DATA, *PTRACK_DATA; typedef struct _CDROM_TOC { uchar Length[2]; uchar FirstTrack; uchar LastTrack; TRACK_DATA TrackData[CDIO_CD_MAX_TRACKS+1]; } CDROM_TOC, *PCDROM_TOC; typedef struct _TRACK_DATA_FULL { uchar SessionNumber; uchar Control : 4; uchar Adr : 4; uchar TNO; uchar POINT; /* Tracknumber (of session?) or lead-out/in (0xA0, 0xA1, 0xA2) */ uchar Min; /* Only valid if disctype is CDDA ? */ uchar Sec; /* Only valid if disctype is CDDA ? */ uchar Frame; /* Only valid if disctype is CDDA ? */ uchar Zero; /* Always zero */ uchar PMIN; /* start min, if POINT is a track; if lead-out/in 0xA0: First Track */ uchar PSEC; uchar PFRAME; } TRACK_DATA_FULL, *PTRACK_DATA_FULL; typedef struct _CDROM_TOC_FULL { uchar Length[2]; uchar FirstSession; uchar LastSession; TRACK_DATA_FULL TrackData[CDIO_CD_MAX_TRACKS+3]; } CDROM_TOC_FULL, *PCDROM_TOC_FULL; /* reader */ typedef enum { _AM_NONE, _AM_CTRL_SCSI } access_mode_t; typedef struct { lsn_t start_lsn; uchar Control : 4; uchar Format; cdtext_t cdtext; /* CD-TEXT */ } track_info_t; typedef struct { /* Things common to all drivers like this. This must be first. */ generic_img_private_t gen; access_mode_t access_mode; /* Some of the more OS specific things. */ /* Entry info for each track, add 1 for leadout. */ track_info_t tocent[CDIO_CD_MAX_TRACKS+1]; } _img_private_t; static track_format_t get_track_format_aix(void *p_user_data, track_t i_track); static access_mode_t str_to_access_mode_aix(const char *psz_access_mode) { const access_mode_t default_access_mode = _AM_CTRL_SCSI; if (NULL==psz_access_mode) return default_access_mode; if (!strcmp(psz_access_mode, "SCSI")) return _AM_CTRL_SCSI; else { cdio_warn ("unknown access type: %s. Default SCSI used.", psz_access_mode); return default_access_mode; } } /*! Initialize CD device. */ static bool init_aix (_img_private_t *p_env) { if (p_env->gen.init) { cdio_warn ("init called more than once"); return false; } p_env->gen.fd = openx (p_env->gen.source_name, O_RDONLY, NULL, SC_DIAGNOSTIC); /*p_env->gen.fd = openx (p_env->gen.source_name, O_RDONLY, NULL, IDE_SINGLE);*/ if (p_env->gen.fd < 0) { cdio_warn ("open (%s): %s", p_env->gen.source_name, strerror (errno)); return false; } p_env->gen.init = true; p_env->gen.toc_init = false; p_env->gen.b_cdtext_init = false; p_env->gen.b_cdtext_error = false; p_env->gen.i_joliet_level = 0; /* Assume no Joliet extensions initally */ p_env->access_mode = _AM_CTRL_SCSI; return true; } /*! Run a SCSI MMC command. p_user_data internal CD structure. i_timeout_ms time in milliseconds we will wait for the command to complete. i_cdb Size of p_cdb p_cdb CDB bytes. e_direction direction the transfer is to go. i_buf Size of buffer p_buf Buffer for data, both sending and receiving */ static driver_return_code_t run_mmc_cmd_aix( void *p_user_data, unsigned int i_timeout_ms, unsigned int i_cdb, const mmc_cdb_t *p_cdb, cdio_mmc_direction_t e_direction, unsigned int i_buf, /*in/out*/ void *p_buf ) { const _img_private_t *p_env = p_user_data; struct sc_passthru cgc; int i_rc; memset (&cgc, 0, sizeof (cgc)); memcpy(cgc.scsi_cdb, p_cdb, sizeof(mmc_cdb_t)); #ifdef AIX_DISABLE_ASYNC /* This enables synchronous negotiation mode. Some CD-ROM drives * don't handle this well. */ cgc.flags = 0; #else cgc.flags = SC_ASYNC; #endif if (0 != i_buf) cgc.flags |= MMC_DATA_READ == e_direction ? B_READ : B_WRITE; cgc.timeout_value = msecs2secs(i_timeout_ms); cgc.buffer = p_buf; cgc.data_length = i_buf; cgc.command_length= i_cdb; i_rc = ioctl(p_env->gen.fd, DK_PASSTHRU, &cgc); if (-1 == i_rc) { cdio_warn("DKIOCMD error: %s", strerror(errno)); } return i_rc; } /*! Reads audio sectors from CD device into data starting from lsn. Returns 0 if no error. May have to check size of nblocks. There may be a limit that can be read in one go, e.g. 25 blocks. */ static driver_return_code_t _read_audio_sectors_aix (void *p_user_data, void *data, lsn_t lsn, unsigned int nblocks) { char buf[CDIO_CD_FRAMESIZE_RAW] = { 0, }; #ifdef FINISHED struct cdrom_msf *msf = (struct cdrom_msf *) &buf; msf_t _msf; struct cdrom_cdda cdda; _img_private_t *env = p_user_data; cdio_lba_to_msf (cdio_lsn_to_lba(lsn), &_msf); msf->cdmsf_min0 = from_bcd8(_msf.m); msf->cdmsf_sec0 = from_bcd8(_msf.s); msf->cdmsf_frame0 = from_bcd8(_msf.f); if (env->gen.ioctls_debugged == 75) cdio_debug ("only displaying every 75th ioctl from now on"); if (env->gen.ioctls_debugged == 30 * 75) cdio_debug ("only displaying every 30*75th ioctl from now on"); if (env->gen.ioctls_debugged < 75 || (env->gen.ioctls_debugged < (30 * 75) && env->gen.ioctls_debugged % 75 == 0) || env->gen.ioctls_debugged % (30 * 75) == 0) cdio_debug ("reading %d", lsn); env->gen.ioctls_debugged++; cdda.cdda_addr = lsn; cdda.cdda_length = nblocks; cdda.cdda_data = (caddr_t) data; if (ioctl (env->gen.fd, CDROMCDDA, &cdda) == -1) { perror ("ioctl(..,CDROMCDDA,..)"); return 1; /* exit (EXIT_FAILURE); */ } #endif memcpy (data, buf, CDIO_CD_FRAMESIZE_RAW); return 0; } /*! Reads a single mode1 sector from cd device into data starting from lsn. Returns 0 if no error. */ static driver_return_code_t _read_mode1_sector_aix (void *env, void *data, lsn_t lsn, bool b_form2) { #if FIXED do something here. #else return cdio_generic_read_form1_sector(env, data, lsn); #endif } /*! Reads nblocks of mode2 sectors from cd device into data starting from lsn. Returns 0 if no error. */ static driver_return_code_t _read_mode1_sectors_aix (void *p_user_data, void *p_data, lsn_t lsn, bool b_form2, unsigned int nblocks) { _img_private_t *p_env = p_user_data; unsigned int i; int retval; unsigned int blocksize = b_form2 ? M2RAW_SECTOR_SIZE : CDIO_CD_FRAMESIZE; for (i = 0; i < nblocks; i++) { if ( (retval = _read_mode1_sector_aix (p_env, ((char *)p_data) + (blocksize * i), lsn + i, b_form2)) ) return retval; } return 0; } /*! Reads a single mode2 sector from cd device into data starting from lsn. Returns 0 if no error. */ static driver_return_code_t _read_mode2_sector_aix (void *p_user_data, void *p_data, lsn_t lsn, bool b_form2) { char buf[CDIO_CD_FRAMESIZE_RAW] = { 0, }; int offset = 0; #ifdef FINISHED struct cdrom_msf *msf = (struct cdrom_msf *) &buf; msf_t _msf; struct cdrom_cdxa cd_read; _img_private_t *p_env = p_user_data; cdio_lba_to_msf (cdio_lsn_to_lba(lsn), &_msf); msf->cdmsf_min0 = from_bcd8(_msf.m); msf->cdmsf_sec0 = from_bcd8(_msf.s); msf->cdmsf_frame0 = from_bcd8(_msf.f); if (p_env->gen.ioctls_debugged == 75) cdio_debug ("only displaying every 75th ioctl from now on"); if (p_env->gen.ioctls_debugged == 30 * 75) cdio_debug ("only displaying every 30*75th ioctl from now on"); if (p_env->gen.ioctls_debugged < 75 || (p_env->gen.ioctls_debugged < (30 * 75) && p_env->gen.ioctls_debugged % 75 == 0) || p_env->gen.ioctls_debugged % (30 * 75) == 0) cdio_debug ("reading %2.2d:%2.2d:%2.2d", msf->cdmsf_min0, msf->cdmsf_sec0, msf->cdmsf_frame0); p_env->gen.ioctls_debugged++; /* Using CDROMXA ioctl will actually use the same uscsi command * as ATAPI, except we don't need to be root */ offset = CDIO_CD_XA_SYNC_HEADER; cd_read.cdxa_addr = lsn; cd_read.cdxa_data = buf; cd_read.cdxa_length = 1; cd_read.cdxa_format = CDROM_XA_SECTOR_DATA; if (ioctl (p_env->gen.fd, CDROMCDXA, &cd_read) == -1) { perror ("ioctl(..,CDROMCDXA,..)"); return 1; /* exit (EXIT_FAILURE); */ } #endif if (b_form2) memcpy (p_data, buf + (offset-CDIO_CD_SUBHEADER_SIZE), M2RAW_SECTOR_SIZE); else memcpy (((char *)p_data), buf + offset, CDIO_CD_FRAMESIZE); return 0; } /*! Reads nblocks of mode2 sectors from cd device into data starting from lsn. Returns 0 if no error. */ static driver_return_code_t _read_mode2_sectors_aix (void *p_user_data, void *data, lsn_t lsn, bool b_form2, unsigned int nblocks) { _img_private_t *env = p_user_data; unsigned int i; int retval; unsigned int blocksize = b_form2 ? M2RAW_SECTOR_SIZE : CDIO_CD_FRAMESIZE; for (i = 0; i < nblocks; i++) { if ( (retval = _read_mode2_sector_aix (env, ((char *)data) + (blocksize * i), lsn + i, b_form2)) ) return retval; } return 0; } /*! Return the size of the CD in logical block address (LBA) units. */ static lsn_t get_disc_last_lsn_aix (void *p_user_data) { uint32_t i_size=0; #ifdef FINISHED _img_private_t *env = p_user_data; struct cdrom_tocentry tocent; tocent.cdte_track = CDIO_CDROM_LEADOUT_TRACK; tocent.cdte_format = CDIO_CDROM_LBA; if (ioctl (env->gen.fd, CDROMREADTOCENTRY, &tocent) == -1) { perror ("ioctl(CDROMREADTOCENTRY)"); exit (EXIT_FAILURE); } i_size = tocent.cdte_addr.lba; #endif return i_size; } /*! Set the arg "key" with "value" in the source device. Currently "source" and "access-mode" are valid keys. "source" sets the source device in I/O operations "access-mode" sets the the method of CD access 0 is returned if no error was found, and nonzero if there as an error. */ static driver_return_code_t _set_arg_aix (void *p_user_data, const char key[], const char value[]) { _img_private_t *p_env = p_user_data; if (!strcmp (key, "source")) { if (!value) return DRIVER_OP_ERROR; free (p_env->gen.source_name); p_env->gen.source_name = strdup (value); } else if (!strcmp (key, "access-mode")) { p_env->access_mode = str_to_access_mode_aix(key); } else return DRIVER_OP_ERROR; return DRIVER_OP_SUCCESS; } /* * aixioc_send Issue ioctl command. Args: p_env - environment cmd - ioctl command arg - ioctl argument b_print_err - whether an error message is to be displayed if the ioctl fails Return: true/false - ioctl successful */ static bool aixioc_send(_img_private_t *p_env, int cmd, void *arg, bool b_print_err) { struct cd_audio_cmd *ac; if (p_env->gen.fd < 0) return false; if (cmd == DKAUDIO) { ac = (struct cd_audio_cmd *) arg; ac->status = 0; /* Nuke status for audio cmds */ } if (ioctl(p_env->gen.fd, cmd, arg) < 0) { if (b_print_err) { cdio_warn("errno=%d (%s)", errno, strerror(errno)); } return false; } return true; } /*! Read and cache the CD's Track Table of Contents and track info. via a SCSI MMC READ_TOC (FULTOC). Return true if successful or false if an error. */ static bool read_toc_ioctl_aix (void *p_user_data) { _img_private_t *p_env = p_user_data; struct cd_audio_cmd cmdbuf; int i; cmdbuf.msf_flag = false; cmdbuf.audio_cmds = CD_TRK_INFO_AUDIO; if (!aixioc_send(p_env, IDE_CDAUDIO, (void *) &cmdbuf, true)) return false; p_env->gen.i_first_track = cmdbuf.indexing.track_index.first_track; p_env->gen.i_tracks = ( cmdbuf.indexing.track_index.last_track - p_env->gen.i_first_track ) + 1; /* Do it again to get the last MSF data */ cmdbuf.msf_flag = true; if (!aixioc_send(p_env, IDE_CDAUDIO, (void *) &cmdbuf, true)) return false; cmdbuf.audio_cmds = CD_GET_TRK_MSF; for (i = 0; i <= p_env->gen.i_tracks; i++) { int i_track = i + p_env->gen.i_first_track; /* Get the track info */ cmdbuf.indexing.track_msf.track = i_track; if (!aixioc_send(p_env, IDE_CDAUDIO, (void *) &cmdbuf, TRUE)) return false; p_env->tocent[ i_track ].start_lsn = cdio_msf3_to_lba( cmdbuf.indexing.track_msf.mins, cmdbuf.indexing.track_msf.secs, cmdbuf.indexing.track_msf.frames ); } return true; } /*! Read and cache the CD's Track Table of Contents and track info. via a SCSI MMC READ_TOC (FULTOC). Return true if successful or false if an error. */ static bool read_toc_aix (void *p_user_data) { _img_private_t *p_env = p_user_data; mmc_cdb_t cdb = {{0, }}; CDROM_TOC_FULL cdrom_toc_full; int i_status, i, i_seen_flag; int i_track_format = 0; /* Operation code */ CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_READ_TOC); cdb.field[1] = 0x00; /* Format */ cdb.field[2] = CDIO_MMC_READTOC_FMT_FULTOC; memset(&cdrom_toc_full, 0, sizeof(cdrom_toc_full)); /* Setup to read header, to get length of data */ CDIO_MMC_SET_READ_LENGTH16(cdb.field, sizeof(cdrom_toc_full)); i_status = run_scsi_cmd_aix (p_env, 1000*60*3, mmc_get_cmd_len(cdb.field[0]), &cdb, MMC_DATA_READ, sizeof(cdrom_toc_full), &cdrom_toc_full); if ( 0 != i_status ) { cdio_debug ("SCSI MMC READ_TOC failed\n"); return read_toc_ioctl_aix(p_user_data); } i_seen_flag=0; for( i = 0 ; i <= CDIO_CD_MAX_TRACKS+3; i++ ) { if ( 0xA0 == cdrom_toc_full.TrackData[i].POINT ) { /* First track number */ p_env->gen.i_first_track = cdrom_toc_full.TrackData[i].PMIN; i_track_format = cdrom_toc_full.TrackData[i].PSEC; i_seen_flag|=0x01; } if ( 0xA1 == cdrom_toc_full.TrackData[i].POINT ) { /* Last track number */ p_env->gen.i_tracks = cdrom_toc_full.TrackData[i].PMIN - p_env->gen.i_first_track + 1; i_seen_flag|=0x02; } if ( 0xA2 == cdrom_toc_full.TrackData[i].POINT ) { /* Start position of the lead out */ p_env->tocent[ p_env->gen.i_tracks ].start_lsn = cdio_msf3_to_lba( cdrom_toc_full.TrackData[i].PMIN, cdrom_toc_full.TrackData[i].PSEC, cdrom_toc_full.TrackData[i].PFRAME ); p_env->tocent[ p_env->gen.i_tracks ].Control = cdrom_toc_full.TrackData[i].Control; p_env->tocent[ p_env->gen.i_tracks ].Format = i_track_format; i_seen_flag|=0x04; } if (cdrom_toc_full.TrackData[i].POINT > 0 && cdrom_toc_full.TrackData[i].POINT <= p_env->gen.i_tracks) { p_env->tocent[ cdrom_toc_full.TrackData[i].POINT - 1 ].start_lsn = cdio_msf3_to_lba( cdrom_toc_full.TrackData[i].PMIN, cdrom_toc_full.TrackData[i].PSEC, cdrom_toc_full.TrackData[i].PFRAME ); p_env->tocent[ cdrom_toc_full.TrackData[i].POINT - 1 ].Control = cdrom_toc_full.TrackData[i].Control; p_env->tocent[ cdrom_toc_full.TrackData[i].POINT - 1 ].Format = i_track_format; cdio_debug("p_sectors: %i, %lu", i, (unsigned long int) (p_env->tocent[i].start_lsn)); if (cdrom_toc_full.TrackData[i].POINT == p_env->gen.i_tracks) i_seen_flag|=0x08; } if ( 0x0F == i_seen_flag ) break; } if ( 0x0F == i_seen_flag ) { p_env->gen.toc_init = true; return true; } return false; } /*! Eject media in CD drive. If successful, as a side effect we also free obj. */ static driver_return_code_t eject_media_aix (void *p_user_data) { _img_private_t *p_env = p_user_data; driver_return_code_t ret=DRIVER_OP_SUCCESS; int i_status; if (p_env->gen.fd <= -1) return DRIVER_OP_UNINIT; i_status = ioctl(p_env->gen.fd, DKEJECT); if ( i_status != 0) { cdio_generic_free((void *) p_env); cdio_warn ("DKEJECT failed: %s", strerror(errno)); ret = DRIVER_OP_ERROR; } close(p_env->gen.fd); p_env->gen.fd = -1; return ret; } #if 0 static void * _cdio_malloc_and_zero(size_t size) { void *ptr; if( !size ) size++; if((ptr = malloc(size)) == NULL) { cdio_warn("malloc() failed: %s", strerror(errno)); return NULL; } memset(ptr, 0, size); return ptr; } #endif static bool is_mmc_supported(void *user_data) { _img_private_t *env = user_data; return (_AM_NONE == env->access_mode) ? false : true; } /*! Return the value associated with the key "arg". */ static const char * get_arg_aix (void *p_user_data, const char key[]) { _img_private_t *p_env = p_user_data; if (!strcmp (key, "source")) { return p_env->gen.source_name; } else if (!strcmp (key, "access-mode")) { switch (p_env->access_mode) { case _AM_CTRL_SCSI: return "SCSI"; case _AM_NONE: return "no access method"; } } else if (!strcmp (key, "mmc-supported?")) { return is_mmc_supported(env) ? "true" : "false"; } return NULL; } /*! Return a string containing the default CD device if none is specified. */ char * cdio_get_default_device_aix(void) { return strdup(DEFAULT_CDIO_DEVICE); } /*! Get disc type associated with cd object. */ static discmode_t get_discmode_aix (void *p_user_data) { _img_private_t *p_env = p_user_data; struct mode_form_op media; int ret; /* Get the media info */ media.action= CD_GET_MODE; if((ret = ioctl(p_env->gen.fd, DK_CD_MODE, &media)) != 0) { cdio_warn ("DK_CD_MODE failed: %s", strerror(errno)); return CDIO_DISC_MODE_NO_INFO; } switch(media.cd_mode_form) { case CD_DA: return CDIO_DISC_MODE_CD_DA; case DVD_ROM: return CDIO_DISC_MODE_DVD_ROM; case DVD_RAM: return CDIO_DISC_MODE_DVD_RAM; case DVD_RW: return CDIO_DISC_MODE_DVD_RW; default: /* no valid match */ return CDIO_DISC_MODE_NO_INFO; } } /*! Get format of track. */ static track_format_t get_track_format_aix(void *p_user_data, track_t i_track) { _img_private_t *p_env = p_user_data; if ( !p_env ) return TRACK_FORMAT_ERROR; if (!p_env->gen.init) init_aix(p_env); if (!p_env->gen.toc_init) read_toc_aix (p_user_data) ; if ( (i_track > p_env->gen.i_tracks+p_env->gen.i_first_track) || i_track < p_env->gen.i_first_track) return TRACK_FORMAT_ERROR; i_track -= p_env->gen.i_first_track; #ifdef FINISHED /* This is pretty much copied from the "badly broken" cdrom_count_tracks in linux/cdrom.c. */ if (p_env->tocent[i_track].cdte_ctrl & CDROM_DATA_TRACK) { if (p_env->tocent[i_track].cdte_format == CDIO_CDROM_CDI_TRACK) return TRACK_FORMAT_CDI; else if (p_env->tocent[i_track].cdte_format == CDIO_CDROM_XA_TRACK) return TRACK_FORMAT_XA; else return TRACK_FORMAT_DATA; } else return TRACK_FORMAT_AUDIO; #else return TRACK_FORMAT_ERROR; #endif } /*! Return true if we have XA data (green, mode2 form1) or XA data (green, mode2 form2). That is track begins: sync - header - subheader 12 4 - 8 FIXME: there's gotta be a better design for this and get_track_format? */ static bool _cdio_get_track_green(void *p_user_data, track_t i_track) { _img_private_t *p_env = p_user_data; if ( !p_env ) return false; if (!p_env->gen.init) init_aix(p_env); if (!p_env->gen.toc_init) read_toc_aix (p_env) ; if (i_track >= p_env->gen.i_tracks+p_env->gen.i_first_track || i_track < p_env->gen.i_first_track) return false; i_track -= p_env->gen.i_first_track; /* FIXME: Dunno if this is the right way, but it's what I was using in cd-info for a while. */ #ifdef FINISHED return ((p_env->tocent[i_track].cdte_ctrl & 2) != 0); #else return false; #endif } /*! Return the starting MSF (minutes/secs/frames) for track number track_num in obj. Track numbers usually start at something greater than 0, usually 1. The "leadout" track is specified either by using track_num LEADOUT_TRACK or the total tracks+1. False is returned if there is no entry. */ static bool _cdio_get_track_msf(void *p_user_data, track_t i_track, msf_t *msf) { _img_private_t *p_env = p_user_data; if (NULL == msf) return false; if (!p_env->gen.init) init_aix(p_env); if (!p_env->gen.toc_init) read_toc_aix (p_env) ; if (i_track == CDIO_CDROM_LEADOUT_TRACK) i_track = p_env->gen.i_tracks + p_env->gen.i_first_track; #ifdef FINISHED if (i_track > (p_env->gen.i_tracks+p_env->gen.i_first_track) || i_track < p_env->gen.i_first_track) { return false; } else { struct cdrom_tocentry *msf0 = &p_env->tocent[i_track-1]; msf->m = to_bcd8(msf0->cdte_addr.msf.minute); msf->s = to_bcd8(msf0->cdte_addr.msf.second); msf->f = to_bcd8(msf0->cdte_addr.msf.frame); return true; } #else return FALSE; #endif } #else /*! Return a string containing the default VCD device if none is specified. */ char * cdio_get_default_device_aix(void) { return strdup(DEFAULT_CDIO_DEVICE); } #endif /* HAVE_AIX_CDROM */ /*! Return an array of strings giving possible CD devices. */ char ** cdio_get_devices_aix (void) { #ifndef HAVE_AIX_CDROM return NULL; #else struct stat st; char **drives = NULL; unsigned int i_files=0; #ifdef HAVE_GLOB_H unsigned int i; glob_t globbuf; globbuf.gl_offs = 0; glob("/dev/rcd?", 0, NULL, &globbuf); for (i=0; iaccess_mode = _AM_CTRL_SCSI; _data->gen.init = false; _data->gen.fd = -1; _data->gen.toc_init = false; _data->gen.b_cdtext_init = false; _data->gen.b_cdtext_error = false; if (NULL == psz_orig_source) { psz_source = cdio_get_default_device_aix(); if (NULL == psz_source) return NULL; _set_arg_aix(_data, "source", psz_source); free(psz_source); } else { if (cdio_is_device_generic(psz_orig_source)) _set_arg_aix(_data, "source", psz_orig_source); else { /* The below would be okay if all device drivers worked this way. */ #if 0 cdio_info ("source %s is not a device", psz_orig_source); #endif return NULL; } } ret = cdio_new ( (void *) _data, &_funcs ); ret->driver_id = DRIVER_AIX; if (ret == NULL) return NULL; if (init_aix(_data)) return ret; else { cdio_generic_free (_data); return NULL; } #else return NULL; #endif /* HAVE_AIX_CDROM */ } bool cdio_have_aix (void) { #ifdef HAVE_AIX_CDROM return true; #else return false; #endif /* HAVE_AIX_CDROM */ } /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/lib/driver/cdtext_private.h0000644000175000017500000002127211554615331015241 00000000000000/* Copyright (C) 2004, 2005, 2008, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef __CDIO_CDTEXT_PRIVATE_H__ #define __CDIO_CDTEXT_PRIVATE_H__ #include #include /*! An enumeration for some of the CDIO_CDTEXT_* #defines below. This isn't really an enumeration one would really use in a program it is here to be helpful in debuggers where wants just to refer to the ISO_*_ names and get something. */ extern const enum cdtext_enum1_s { CDIO_CDTEXT_MAX_PACK_DATA = 255, CDIO_CDTEXT_MAX_TEXT_DATA = 12, CDIO_CDTEXT_TITLE = 0x80, CDIO_CDTEXT_PERFORMER = 0x81, CDIO_CDTEXT_SONGWRITER = 0x82, CDIO_CDTEXT_COMPOSER = 0x83, CDIO_CDTEXT_ARRANGER = 0x84, CDIO_CDTEXT_MESSAGE = 0x85, CDIO_CDTEXT_DISCID = 0x86, CDIO_CDTEXT_GENRE = 0x87, CDIO_CDTEXT_TOC = 0x88, CDIO_CDTEXT_TOC2 = 0x89, CDIO_CDTEXT_UPC = 0x8E, CDIO_CDTEXT_BLOCKSIZE = 0x8F } cdtext_enums1; /*! * CD-Text Genre Codes */ extern const enum cdtext_genre_enum_s { CDIO_CDTEXT_GENRE_UNUSED = 0, /**< not used */ CDIO_CDTEXT_GENRE_UNDEFINED = 1, /**< not defined */ CDIO_CDTEXT_GENRE_ADULT_CONTEMP = 2, /**< Adult Contemporary */ CDIO_CDTEXT_GENRE_ALT_ROCK = 3, /**< Alternative Rock */ CDIO_CDTEXT_GENRE_CHILDRENS = 4, /**< Childrens Music */ CDIO_CDTEXT_GENRE_CLASSIC = 5, /**< Classical */ CDIO_CDTEXT_GENRE_CHRIST_CONTEMP = 6, /**< Contemporary Christian */ CDIO_CDTEXT_GENRE_COUNTRY = 7, /**< Country */ CDIO_CDTEXT_GENRE_DANCE = 8, /**< Dance */ CDIO_CDTEXT_GENRE_EASY_LISTENING = 9, /**< Easy Listening */ CDIO_CDTEXT_GENRE_EROTIC = 10, /**< Erotic */ CDIO_CDTEXT_GENRE_FOLK = 11, /**< Folk */ CDIO_CDTEXT_GENRE_GOSPEL = 12, /**< Gospel */ CDIO_CDTEXT_GENRE_HIPHOP = 13, /**< Hip Hop */ CDIO_CDTEXT_GENRE_JAZZ = 14, /**< Jazz */ CDIO_CDTEXT_GENRE_LATIN = 15, /**< Latin */ CDIO_CDTEXT_GENRE_MUSICAL = 16, /**< Musical */ CDIO_CDTEXT_GENRE_NEWAGE = 17, /**< New Age */ CDIO_CDTEXT_GENRE_OPERA = 18, /**< Opera */ CDIO_CDTEXT_GENRE_OPERETTA = 19, /**< Operetta */ CDIO_CDTEXT_GENRE_POP = 20, /**< Pop Music */ CDIO_CDTEXT_GENRE_RAP = 21, /**< RAP */ CDIO_CDTEXT_GENRE_REGGAE = 22, /**< Reggae */ CDIO_CDTEXT_GENRE_ROCK = 23, /**< Rock Music */ CDIO_CDTEXT_GENRE_RYTHMANDBLUES = 24, /**< Rhythm & Blues */ CDIO_CDTEXT_GENRE_SOUNDEFFECTS = 25, /**< Sound Effects */ CDIO_CDTEXT_GENRE_SOUNDTRACK = 26, /**< Soundtrack */ CDIO_CDTEXT_GENRE_SPOKEN_WORD = 27, /**< Spoken Word */ CDIO_CDTEXT_GENRE_WORLD_MUSIC = 28 /**< World Music */ } cdtext_genre_enum; /*! * CD-Text character codes */ extern const enum cdtext_charcode_enum_s { CDIO_CDTEXT_CHARCODE_ISO_8859_1 = 0x00, /**< ISO-8859-1 */ CDIO_CDTEXT_CHARCODE_ASCII = 0x01, /**< ASCII - 7 bit */ CDIO_CDTEXT_CHARCODE_KANJI = 0x80, /**< Music Shift-JIS Kanji - double byte */ CDIO_CDTEXT_CHARCODE_KOREAN = 0x81, /**< Korean */ CDIO_CDTEXT_CHARCODE_CHINESE = 0x82, /**< Mandarin Chinese */ CDIO_CDTEXT_CHARCODE_UNDEFINED = 0xFF, /**< everything else */ } cdtext_charcode_enum; /*! * The language code is encoded as specified in ANNEX 1 to part 5 of EBU * Tech 32 58 -E (1991). */ extern const enum cdtext_lang_enum_s { CDIO_CDTEXT_LANG_CZECH = 0x06, CDIO_CDTEXT_LANG_DANISH = 0x07, CDIO_CDTEXT_LANG_GERMAN = 0x08, CDIO_CDTEXT_LANG_ENGLISH = 0x09, CDIO_CDTEXT_LANG_SPANISH = 0x0A, CDIO_CDTEXT_LANG_FRENCH = 0x0F, CDIO_CDTEXT_LANG_ITALIAN = 0x15, CDIO_CDTEXT_LANG_HUNGARIAN = 0x1b, CDIO_CDTEXT_LANG_DUTCH = 0x1d, CDIO_CDTEXT_LANG_NORWEGIAN = 0x1e, CDIO_CDTEXT_LANG_POLISH = 0x20, CDIO_CDTEXT_LANG_PORTUGUESE = 0x21, CDIO_CDTEXT_LANG_SLOVENE = 0x26, CDIO_CDTEXT_LANG_FINNISH = 0x27, CDIO_CDTEXT_LANG_SWEDISH = 0x28, CDIO_CDTEXT_LANG_RUSSIAN = 0x56, CDIO_CDTEXT_LANG_KOREAN = 0x65, CDIO_CDTEXT_LANG_JAPANESE = 0x69, CDIO_CDTEXT_LANG_GREEK = 0x70, CDIO_CDTEXT_LANG_CHINESE = 0x75, } cdtext_lang_enum; #define CDIO_CDTEXT_MAX_PACK_DATA 255 #define CDIO_CDTEXT_MAX_TEXT_DATA 12 /* From table J.2 - Pack Type Indicator Definitions from Working Draft NCITS XXX T10/1364-D Revision 10G. November 12, 2001. */ /* Title of Album name (ID=0) or Track Titles (ID != 0) */ #define CDIO_CDTEXT_TITLE 0x80 /* Name(s) of the performer(s) in ASCII */ #define CDIO_CDTEXT_PERFORMER 0x81 /* Name(s) of the songwriter(s) in ASCII */ #define CDIO_CDTEXT_SONGWRITER 0x82 /* Name(s) of the Composers in ASCII */ #define CDIO_CDTEXT_COMPOSER 0x83 /* Name(s) of the Arrangers in ASCII */ #define CDIO_CDTEXT_ARRANGER 0x84 /* Message(s) from content provider and/or artist in ASCII */ #define CDIO_CDTEXT_MESSAGE 0x85 /* Disc Identificatin information */ #define CDIO_CDTEXT_DISCID 0x86 /* Genre Identification and Genre Information */ #define CDIO_CDTEXT_GENRE 0x87 /* Table of Content Information */ #define CDIO_CDTEXT_TOC 0x88 /* Second Table of Content Information */ #define CDIO_CDTEXT_TOC2 0x89 /* 0x8A, 0x8B, 0x8C are reserved 0x8D Reserved for content provider only. */ /* UPC/EAN code of the album and ISRC code of each track */ #define CDIO_CDTEXT_UPC 0x8E /* Size information of the Block */ #define CDIO_CDTEXT_BLOCKSIZE 0x8F PRAGMA_BEGIN_PACKED struct CDText_data { uint8_t type; track_t i_track; uint8_t seq; #ifdef WORDS_BIGENDIAN uint8_t bDBC: 1; /* double byte character */ uint8_t block: 3; /* block number 0..7 */ uint8_t characterPosition:4; /* character position */ #else uint8_t characterPosition:4; /* character position */ uint8_t block :3; /* block number 0..7 */ uint8_t bDBC :1; /* double byte character */ #endif char text[CDIO_CDTEXT_MAX_TEXT_DATA]; uint8_t crc[2]; } GNUC_PACKED; PRAGMA_END_PACKED /* * content of BLOCKSIZE packs */ typedef struct CDText_blocksize { uint8_t charcode; /* character code */ uint8_t i_firstTrack; /* first track number */ uint8_t i_lastTrack; /* last track number */ uint8_t copyright; /* cd-text information copyright byte */ uint8_t packcount[16];/* number of packs of each type * 0 TITLE; 1 PERFORMER; 2 SONGWRITER; 3 COMPOSER; * 4 ARRANGER; 5 MESSAGE; 6 DISCID; 7 GENRE; * 8 TOC; 9 TOC2; 10-12 RESERVED; 13 CLOSED; * 14 UPC_ISRC; 15 BLOCKSIZE */ uint8_t lastseq[8]; /* last sequence for block 0..7 */ uint8_t langcode[8]; /* language code for block 0..7 */ } CDText_blocksize_t; typedef struct CDText_data CDText_data_t; typedef void (*set_cdtext_field_fn_t) (void *user_data, track_t i_track, track_t i_first_track, cdtext_field_t field, const char *buffer); /* Internal routine to parse all CD-TEXT data retrieved. */ bool cdtext_data_init(void *user_data, track_t i_first_track, unsigned char *wdata, int i_data, set_cdtext_field_fn_t set_cdtext_field_fn); #endif /* __CDIO_CDTEXT_PRIVATE_H__ */ /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/lib/driver/gnu_linux.c0000644000175000017500000014321211650121657014216 00000000000000/* Copyright (C) 2001 Herbert Valerio Riedel Copyright (C) 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* This file contains Linux-specific code and implements low-level control of the CD drive. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #ifdef HAVE_STRING_H #include #endif #include #include #include #include #include #include #include "cdtext_private.h" #include "cdio_assert.h" #include "cdio_private.h" #ifdef HAVE_LINUX_CDROM #include #include #include #if defined(HAVE_LINUX_VERSION_H) # include # if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,16) # define __CDIO_LINUXCD_BUILD # else # error "You need a kernel greater than 2.2.16 to have CDROM support" # endif #else # error "You need to have CDROM support" #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifndef PATH_MAX #define PATH_MAX 4096 #endif typedef enum { _AM_NONE, _AM_IOCTL, _AM_READ_CD, _AM_READ_10, _AM_MMC_RDWR, _AM_MMC_RDWR_EXCL, } access_mode_t; typedef struct { /* Things common to all drivers like this. This must be first. */ generic_img_private_t gen; access_mode_t access_mode; /* Some of the more OS specific things. */ /* Entry info for each track, add 1 for leadout. */ struct cdrom_tocentry tocent[CDIO_CD_MAX_TRACKS+1]; struct cdrom_tochdr tochdr; } _img_private_t; /* Some ioctl() errno values which occur when the tray is empty */ #define ERRNO_TRAYEMPTY(errno) \ ((errno == EIO) || (errno == ENOENT) || (errno == EINVAL)) /**** prototypes for static functions ****/ static bool is_cdrom_linux(const char *drive, char *mnttype); static bool read_toc_linux (void *p_user_data); static driver_return_code_t run_mmc_cmd_linux( void *p_user_data, unsigned int i_timeout, unsigned int i_cdb, const mmc_cdb_t *p_cdb, cdio_mmc_direction_t e_direction, unsigned int i_buf, /*in/out*/ void *p_buf ); static access_mode_t str_to_access_mode_linux(const char *psz_access_mode) { const access_mode_t default_access_mode = _AM_IOCTL; if (NULL==psz_access_mode) return default_access_mode; if (!strcmp(psz_access_mode, "IOCTL")) return _AM_IOCTL; else if (!strcmp(psz_access_mode, "READ_CD")) return _AM_READ_CD; else if (!strcmp(psz_access_mode, "READ_10")) return _AM_READ_10; else if (!strcmp(psz_access_mode, "MMC_RDWR")) return _AM_MMC_RDWR; else if (!strcmp(psz_access_mode, "MMC_RDWR_EXCL")) return _AM_MMC_RDWR_EXCL; else { cdio_warn ("unknown access type: %s. Default IOCTL used.", psz_access_mode); return default_access_mode; } } static char * check_mounts_linux(const char *mtab) { FILE *mntfp; struct mntent *mntent; mntfp = setmntent(mtab, "r"); if ( mntfp != NULL ) { char *tmp; char *mnt_type; char *mnt_dev; unsigned int i_mnt_type; unsigned int i_mnt_dev; while ( (mntent=getmntent(mntfp)) != NULL ) { i_mnt_type = strlen(mntent->mnt_type) + 1; mnt_type = calloc(1, i_mnt_type); if (mnt_type == NULL) continue; /* maybe you'll get lucky next time. */ i_mnt_dev = strlen(mntent->mnt_fsname) + 1; mnt_dev = calloc(1, i_mnt_dev); if (mnt_dev == NULL) { free(mnt_type); continue; } strncpy(mnt_type, mntent->mnt_type, i_mnt_type); strncpy(mnt_dev, mntent->mnt_fsname, i_mnt_dev); /* Handle "supermount" filesystem mounts */ if ( strcmp(mnt_type, "supermount") == 0 ) { tmp = strstr(mntent->mnt_opts, "fs="); if ( tmp ) { free(mnt_type); mnt_type = strdup(tmp + strlen("fs=")); if ( mnt_type ) { tmp = strchr(mnt_type, ','); if ( tmp ) { *tmp = '\0'; } } } tmp = strstr(mntent->mnt_opts, "dev="); if ( tmp ) { free(mnt_dev); mnt_dev = strdup(tmp + strlen("dev=")); if ( mnt_dev ) { tmp = strchr(mnt_dev, ','); if ( tmp ) { *tmp = '\0'; } } } } if ( mnt_type && mnt_dev ) { if ( strcmp(mnt_type, "iso9660") == 0 ) { if (is_cdrom_linux(mnt_dev, mnt_type) > 0) { free(mnt_type); endmntent(mntfp); return mnt_dev; } } } free(mnt_dev); free(mnt_type); } endmntent(mntfp); } return NULL; } /*! Get the volume of an audio CD. @param p_cdio the CD object to be acted upon. */ static driver_return_code_t audio_get_volume_linux (void *p_user_data, /*out*/ cdio_audio_volume_t *p_volume) { const _img_private_t *p_env = p_user_data; return ioctl(p_env->gen.fd, CDROMVOLREAD, p_volume); } /*! Pause playing CD through analog output @param p_cdio the CD object to be acted upon. */ static driver_return_code_t audio_pause_linux (void *p_user_data) { const _img_private_t *p_env = p_user_data; return ioctl(p_env->gen.fd, CDROMPAUSE); } /*! Playing starting at given MSF through analog output @param p_cdio the CD object to be acted upon. */ static driver_return_code_t audio_play_msf_linux (void *p_user_data, msf_t *p_start_msf, msf_t *p_end_msf) { const _img_private_t *p_env = p_user_data; struct cdrom_msf cdrom_msf; cdrom_msf.cdmsf_min0 = cdio_from_bcd8(p_start_msf->m); cdrom_msf.cdmsf_sec0 = cdio_from_bcd8(p_start_msf->s); cdrom_msf.cdmsf_frame0 = cdio_from_bcd8(p_start_msf->f); cdrom_msf.cdmsf_min1 = cdio_from_bcd8(p_end_msf->m); cdrom_msf.cdmsf_sec1 = cdio_from_bcd8(p_end_msf->s); cdrom_msf.cdmsf_frame1 = cdio_from_bcd8(p_end_msf->f); return ioctl(p_env->gen.fd, CDROMPLAYMSF, &cdrom_msf); } /*! Playing CD through analog output at the desired track and index @param p_cdio the CD object to be acted upon. @param p_track_index location to start/end. */ static driver_return_code_t audio_play_track_index_linux (void *p_user_data, cdio_track_index_t *p_track_index) { const _img_private_t *p_env = p_user_data; return ioctl(p_env->gen.fd, CDROMPLAYTRKIND, p_track_index); } /*! Read Audio Subchannel information @param p_user_data the CD object to be acted upon. @param p_subchannel returned information */ static driver_return_code_t audio_read_subchannel_linux (void *p_user_data, /*out*/ cdio_subchannel_t *p_subchannel) { const _img_private_t *p_env = p_user_data; struct cdrom_subchnl subchannel; int i_rc; subchannel.cdsc_format = CDIO_CDROM_MSF; i_rc = ioctl(p_env->gen.fd, CDROMSUBCHNL, &subchannel); if (0 == i_rc) { p_subchannel->control = subchannel.cdsc_ctrl; p_subchannel->track = subchannel.cdsc_trk; p_subchannel->index = subchannel.cdsc_ind; p_subchannel->abs_addr.m = cdio_to_bcd8(subchannel.cdsc_absaddr.msf.minute); p_subchannel->abs_addr.s = cdio_to_bcd8(subchannel.cdsc_absaddr.msf.second); p_subchannel->abs_addr.f = cdio_to_bcd8(subchannel.cdsc_absaddr.msf.frame); p_subchannel->rel_addr.m = cdio_to_bcd8(subchannel.cdsc_reladdr.msf.minute); p_subchannel->rel_addr.s = cdio_to_bcd8(subchannel.cdsc_reladdr.msf.second); p_subchannel->rel_addr.f = cdio_to_bcd8(subchannel.cdsc_reladdr.msf.frame); p_subchannel->audio_status = subchannel.cdsc_audiostatus; return DRIVER_OP_SUCCESS; } else { cdio_info ("ioctl CDROMSUBCHNL failed: %s\n", strerror(errno)); return DRIVER_OP_ERROR; } } /*! Resume playing an audio CD. @param p_cdio the CD object to be acted upon. */ static driver_return_code_t audio_resume_linux (void *p_user_data) { const _img_private_t *p_env = p_user_data; return ioctl(p_env->gen.fd, CDROMRESUME, 0); } /*! Set the volume of an audio CD. @param p_user_data the CD object to be acted upon. */ static driver_return_code_t audio_set_volume_linux (void *p_user_data, cdio_audio_volume_t *p_volume) { const _img_private_t *p_env = p_user_data; return ioctl(p_env->gen.fd, CDROMVOLCTRL, p_volume); } /*! Stop playing an audio CD. @param p_user_data the CD object to be acted upon. */ static driver_return_code_t audio_stop_linux (void *p_user_data) { const _img_private_t *p_env = p_user_data; return ioctl(p_env->gen.fd, CDROMSTOP); } static bool is_mmc_supported(void *user_data) { _img_private_t *env = user_data; return (_AM_NONE == env->access_mode) ? false : true; } /*! Return the value associated with the key "arg". */ static const char * get_arg_linux (void *env, const char key[]) { _img_private_t *_obj = env; if (!strcmp (key, "source")) { return _obj->gen.source_name; } else if (!strcmp (key, "access-mode")) { switch (_obj->access_mode) { case _AM_IOCTL: return "IOCTL"; case _AM_READ_CD: return "READ_CD"; case _AM_READ_10: return "READ_10"; case _AM_MMC_RDWR: return "MMC_RDWR"; case _AM_MMC_RDWR_EXCL: return "MMC_RDWR_EXCL"; case _AM_NONE: return "no access method"; } } else if (!strcmp (key, "scsi-tuple")) { return _obj->gen.scsi_tuple; } else if (!strcmp (key, "mmc-supported?")) { return is_mmc_supported(env) ? "true" : "false"; } return NULL; } #undef USE_LINUX_CAP #ifdef USE_LINUX_CAP /*! Return the the kind of drive capabilities of device. Note: string is malloc'd so caller should free() then returned string when done with it. */ static void get_drive_cap_linux (const void *p_user_data, /*out*/ cdio_drive_read_cap_t *p_read_cap, /*out*/ cdio_drive_write_cap_t *p_write_cap, /*out*/ cdio_drive_misc_cap_t *p_misc_cap) { const _img_private_t *p_env = p_user_data; int32_t i_drivetype; i_drivetype = ioctl (p_env->gen.fd, CDROM_GET_CAPABILITY, CDSL_CURRENT); if (i_drivetype < 0) { *p_read_cap = CDIO_DRIVE_CAP_ERROR; *p_write_cap = CDIO_DRIVE_CAP_ERROR; *p_misc_cap = CDIO_DRIVE_CAP_ERROR; return; } *p_read_cap = 0; *p_write_cap = 0; *p_misc_cap = 0; /* Reader */ if (i_drivetype & CDC_PLAY_AUDIO) *p_read_cap |= CDIO_DRIVE_CAP_READ_AUDIO; if (i_drivetype & CDC_CD_R) *p_read_cap |= CDIO_DRIVE_CAP_READ_CD_R; if (i_drivetype & CDC_CD_RW) *p_read_cap |= CDIO_DRIVE_CAP_READ_CD_RW; if (i_drivetype & CDC_DVD) *p_read_cap |= CDIO_DRIVE_CAP_READ_DVD_ROM; /* Writer */ if (i_drivetype & CDC_CD_RW) *p_read_cap |= CDIO_DRIVE_CAP_WRITE_CD_RW; if (i_drivetype & CDC_DVD_R) *p_read_cap |= CDIO_DRIVE_CAP_WRITE_DVD_R; if (i_drivetype & CDC_DVD_RAM) *p_read_cap |= CDIO_DRIVE_CAP_WRITE_DVD_RAM; /* Misc */ if (i_drivetype & CDC_CLOSE_TRAY) *p_misc_cap |= CDIO_DRIVE_CAP_MISC_CLOSE_TRAY; if (i_drivetype & CDC_OPEN_TRAY) *p_misc_cap |= CDIO_DRIVE_CAP_MISC_EJECT; if (i_drivetype & CDC_LOCK) *p_misc_cap |= CDIO_DRIVE_CAP_MISC_LOCK; if (i_drivetype & CDC_SELECT_SPEED) *p_misc_cap |= CDIO_DRIVE_CAP_MISC_SELECT_SPEED; if (i_drivetype & CDC_SELECT_DISC) *p_misc_cap |= CDIO_DRIVE_CAP_MISC_SELECT_DISC; if (i_drivetype & CDC_MULTI_SESSION) *p_misc_cap |= CDIO_DRIVE_CAP_MISC_MULTI_SESSION; if (i_drivetype & CDC_MEDIA_CHANGED) *p_misc_cap |= CDIO_DRIVE_CAP_MISC_MEDIA_CHANGED; if (i_drivetype & CDC_RESET) *p_misc_cap |= CDIO_DRIVE_CAP_MISC_RESET; } #endif /*! Get the LSN of the first track of the last session of on the CD. @param p_cdio the CD object to be acted upon. @param i_last_session pointer to the session number to be returned. */ static driver_return_code_t get_last_session_linux (void *p_user_data, /*out*/ lsn_t *i_last_session) { const _img_private_t *p_env = p_user_data; struct cdrom_multisession ms; int i_rc; ms.addr_format = CDROM_LBA; i_rc = ioctl(p_env->gen.fd, CDROMMULTISESSION, &ms); if (0 == i_rc) { *i_last_session = ms.addr.lba; return DRIVER_OP_SUCCESS; } else { cdio_warn ("ioctl CDROMMULTISESSION failed: %s\n", strerror(errno)); return DRIVER_OP_ERROR; } } /*! Find out if media has changed since the last call. @param p_user_data the environment object to be acted upon. @return 1 if media has changed since last call, 0 if not. Error return codes are the same as driver_return_code_t */ static int get_media_changed_linux (const void *p_user_data) { const _img_private_t *p_env = p_user_data; return ioctl(p_env->gen.fd, CDROM_MEDIA_CHANGED, 0); } /*! Return the media catalog number MCN. Note: string is malloc'd so caller should free() then returned string when done with it. */ static char * get_mcn_linux (const void *p_user_data) { struct cdrom_mcn mcn; const _img_private_t *p_env = p_user_data; memset(&mcn, 0, sizeof(mcn)); if (ioctl(p_env->gen.fd, CDROM_GET_MCN, &mcn) != 0) return NULL; return strdup((char *)mcn.medium_catalog_number); } /*! Get format of track. */ static track_format_t get_track_format_linux(void *p_user_data, track_t i_track) { _img_private_t *p_env = p_user_data; if ( !p_env ) return TRACK_FORMAT_ERROR; if (!p_env->gen.toc_init) read_toc_linux (p_user_data) ; if (i_track > (p_env->gen.i_tracks+p_env->gen.i_first_track) || i_track < p_env->gen.i_first_track) return TRACK_FORMAT_ERROR; i_track -= p_env->gen.i_first_track; /* This is pretty much copied from the "badly broken" cdrom_count_tracks in linux/cdrom.c. */ if (p_env->tocent[i_track].cdte_ctrl & CDIO_CDROM_DATA_TRACK) { if (p_env->tocent[i_track].cdte_format == CDIO_CDROM_CDI_TRACK) return TRACK_FORMAT_CDI; else if (p_env->tocent[i_track].cdte_format == CDIO_CDROM_XA_TRACK) return TRACK_FORMAT_XA; else return TRACK_FORMAT_DATA; } else return TRACK_FORMAT_AUDIO; } /*! Return true if we have XA data (green, mode2 form1) or XA data (green, mode2 form2). That is track begins: sync - header - subheader 12 4 - 8 FIXME: there's gotta be a better design for this and get_track_format? */ static bool get_track_green_linux(void *p_user_data, track_t i_track) { _img_private_t *p_env = p_user_data; if (!p_env->gen.toc_init) read_toc_linux (p_user_data) ; if (i_track >= (p_env->gen.i_tracks+p_env->gen.i_first_track) || i_track < p_env->gen.i_first_track) return false; i_track -= p_env->gen.i_first_track; /* FIXME: Dunno if this is the right way, but it's what I was using in cd-info for a while. */ return ((p_env->tocent[i_track].cdte_ctrl & 2) != 0); } /*! Return the starting MSF (minutes/secs/frames) for track number track_num in obj. Track numbers usually start at something greater than 0, usually 1. The "leadout" track is specified either by using i_track LEADOUT_TRACK or the total tracks+1. False is returned if there is no track entry. */ static bool get_track_msf_linux(void *p_user_data, track_t i_track, msf_t *msf) { _img_private_t *p_env = p_user_data; if (NULL == msf) return false; if (!p_env->gen.toc_init) read_toc_linux (p_user_data) ; if (i_track == CDIO_CDROM_LEADOUT_TRACK) i_track = p_env->gen.i_tracks + p_env->gen.i_first_track; if (i_track > (p_env->gen.i_tracks+p_env->gen.i_first_track) || i_track < p_env->gen.i_first_track) { return false; } else { struct cdrom_msf0 *msf0= &p_env->tocent[i_track-p_env->gen.i_first_track].cdte_addr.msf; msf->m = cdio_to_bcd8(msf0->minute); msf->s = cdio_to_bcd8(msf0->second); msf->f = cdio_to_bcd8(msf0->frame); return true; } } /*! Check, if a device is mounted and return the target (=mountpoint) needed for umounting (idea taken from libunieject). */ static int is_mounted (const char * device, char * target) { FILE * fp; char real_device_1[PATH_MAX]; char real_device_2[PATH_MAX]; char file_device[PATH_MAX]; char file_target[PATH_MAX]; fp = fopen ( "/proc/mounts", "r"); /* Older systems just have /etc/mtab */ if(!fp) fp = fopen ( "/etc/mtab", "r"); /* Neither /proc/mounts nor /etc/mtab could be opened, give up here */ if(!fp) return 0; /* Get real device */ if (NULL == cdio_realpath(device, real_device_1)) { cdio_warn("Problems resolving device %s: %s\n", device, strerror(errno)); } /* Read entries */ while ( fscanf(fp, "%s %s %*s %*s %*d %*d\n", file_device, file_target) != EOF ) { if (NULL == cdio_realpath(file_device, real_device_2)) { cdio_warn("Problems resolving device %s: %s\n", file_device, strerror(errno)); } if(!strcmp(real_device_1, real_device_2)) { strcpy(target, file_target); fclose(fp); return 1; } } fclose(fp); return 0; } /*! Umount a filesystem specified by it's mountpoint. We must do this by forking and calling the umount command, because the raw umount (or umount2) system calls will *always* trigger an EPERM even if we are allowed to umount the filesystem. The umount command is suid root. Code here is inspired by the standard linux eject command by Jeff Tranter and Frank Lichtenheld. */ static int do_umount(char * target) { int status; switch (fork()) { case 0: /* child */ execlp("pumount", "pumount", target, NULL); execlp("umount", "umount", target, NULL); return -1; case -1: return -1; default: /* parent */ wait(&status); if (WIFEXITED(status) == 0) { return -1; } if (WEXITSTATUS(status) != 0) { return -1; } break; } return 0; } /*! Eject media in CD-ROM drive. Return DRIVER_OP_SUCCESS if successful, DRIVER_OP_ERROR on error. */ static driver_return_code_t eject_media_linux (void *p_user_data) { _img_private_t *p_env = p_user_data; driver_return_code_t ret=DRIVER_OP_SUCCESS; int status; bool was_open = false; char mount_target[PATH_MAX]; if ( p_env->gen.fd <= -1 ) { p_env->gen.fd = open (p_env->gen.source_name, O_RDONLY|O_NONBLOCK); } else { was_open = true; } if ( p_env->gen.fd <= -1 ) return DRIVER_OP_ERROR; if ((status = ioctl(p_env->gen.fd, CDROM_DRIVE_STATUS, CDSL_CURRENT)) > 0) { switch(status) { case CDS_TRAY_OPEN: cdio_info ("Drive status reports that tray is open\n"); break; default: cdio_info ("Unknown state of CD-ROM (%d)\n", status); /* Fall through */ case CDS_DISC_OK: /* Some systems automount the drive, so we must umount it. We check if the drive is actually mounted */ if(is_mounted (p_env->gen.source_name, mount_target)) { /* Try to umount the drive */ if(do_umount(mount_target)) { cdio_log(CDIO_LOG_WARN, "Could not umount %s\n", p_env->gen.source_name); ret=DRIVER_OP_ERROR; break; } /* For some reason, we must close and reopen the device after it got umounted (at least the commandline eject program opens the device just after umounting it) */ close(p_env->gen.fd); p_env->gen.fd = open (p_env->gen.source_name, O_RDONLY|O_NONBLOCK); } if((ret = ioctl(p_env->gen.fd, CDROMEJECT)) != 0) { int eject_error = errno; /* Try ejecting the MMC way... */ ret = mmc_eject_media(p_env->gen.cdio); if (0 != ret) { cdio_info("ioctl CDROMEJECT and MMC eject failed: %s", strerror(eject_error)); ret = DRIVER_OP_ERROR; } } /* force kernel to reread partition table when new disc inserted */ if (0 != ioctl(p_env->gen.fd, BLKRRPART)) { cdio_info ("BLKRRPART request failed: %s\n", strerror(errno)); } break; } } else { cdio_warn ("CDROM_DRIVE_STATUS failed: %s\n", strerror(errno)); ret=DRIVER_OP_ERROR; } if(!was_open) { close(p_env->gen.fd); p_env->gen.fd = -1; } return ret; } /*! Get disc type associated with cd object. */ static discmode_t dvd_discmode_linux (_img_private_t *p_env) { discmode_t discmode=CDIO_DISC_MODE_NO_INFO; /* See if this is a DVD. */ cdio_dvd_struct_t dvd; /* DVD READ STRUCT for layer 0. */ dvd.physical.type = CDIO_DVD_STRUCT_PHYSICAL; dvd.physical.layer_num = 0; if (0 == ioctl (p_env->gen.fd, DVD_READ_STRUCT, &dvd)) { switch(dvd.physical.layer[0].book_type) { case CDIO_DVD_BOOK_DVD_ROM: return CDIO_DISC_MODE_DVD_ROM; case CDIO_DVD_BOOK_DVD_RAM: return CDIO_DISC_MODE_DVD_RAM; case CDIO_DVD_BOOK_DVD_R: return CDIO_DISC_MODE_DVD_R; case CDIO_DVD_BOOK_DVD_RW: return CDIO_DISC_MODE_DVD_RW; case CDIO_DVD_BOOK_DVD_PR: return CDIO_DISC_MODE_DVD_PR; case CDIO_DVD_BOOK_DVD_PRW: return CDIO_DISC_MODE_DVD_PRW; default: return CDIO_DISC_MODE_DVD_OTHER; } } return discmode; } /*! Get disc type associated with the cd object. */ static discmode_t get_discmode_linux (void *p_user_data) { _img_private_t *p_env = p_user_data; discmode_t discmode; if (!p_env) return CDIO_DISC_MODE_ERROR; /* Try DVD types first. See note below. */ discmode = dvd_discmode_linux(p_env); if (CDIO_DISC_MODE_NO_INFO != discmode) return discmode; /* Justin B Ruggles reports that the GNU/Linux ioctl(.., CDROM_DISC_STATUS) does not return "CD DATA Form 2" for SVCD's even though they are are form 2. In mmc_get_discmode we issue a SCSI MMC-2 TOC command first to try get more accurate information. But we took care above *not* to issue a FULL TOC on DVD media. */ discmode = mmc_get_discmode(p_env->gen.cdio); if (CDIO_DISC_MODE_NO_INFO != discmode) return discmode; else { int32_t i_discmode = ioctl (p_env->gen.fd, CDROM_DISC_STATUS); if (i_discmode < 0) return CDIO_DISC_MODE_ERROR; switch(i_discmode) { case CDS_AUDIO: return CDIO_DISC_MODE_CD_DA; case CDS_DATA_1: case CDS_DATA_2: /* Actually, recent GNU/Linux kernels don't return CDS_DATA_2, but just in case. */ return CDIO_DISC_MODE_CD_DATA; case CDS_MIXED: return CDIO_DISC_MODE_CD_MIXED; case CDS_XA_2_1: case CDS_XA_2_2: return CDIO_DISC_MODE_CD_XA; case CDS_NO_INFO: return CDIO_DISC_MODE_NO_INFO; default: return CDIO_DISC_MODE_ERROR; } } } /* Check a drive to see if it is a CD-ROM Return 1 if a CD-ROM. 0 if it exists but isn't a CD-ROM drive and -1 if no device exists . */ static bool is_cdrom_linux(const char *drive, char *mnttype) { bool is_cd=false; int cdfd; /* If it doesn't exist, return -1 */ if ( !cdio_is_device_quiet_generic(drive) ) { return(false); } /* If it does exist, verify that it's an available CD-ROM */ cdfd = open(drive, (O_RDONLY|O_NONBLOCK), 0); if ( cdfd >= 0 ) { if ( ioctl(cdfd, CDROM_GET_CAPABILITY, 0) != -1 ) { is_cd = true; } close(cdfd); } /* Even if we can't read it, it might be mounted */ else if ( mnttype && (strcmp(mnttype, "iso9660") == 0) ) { is_cd = true; } return(is_cd); } /* MMC driver to read audio sectors. Can read only up to 25 blocks. */ static driver_return_code_t read_audio_sectors_linux (void *p_user_data, void *p_buf, lsn_t i_lsn, uint32_t i_blocks) { _img_private_t *p_env = p_user_data; return mmc_read_sectors( p_env->gen.cdio, p_buf, i_lsn, CDIO_MMC_READ_TYPE_CDDA, i_blocks); } /* Packet driver to read mode2 sectors. Can read only up to 25 blocks. */ static driver_return_code_t _read_mode2_sectors_mmc (_img_private_t *p_env, void *p_buf, lba_t lba, uint32_t i_blocks, bool b_read_10) { mmc_cdb_t cdb = {{0, }}; CDIO_MMC_SET_READ_LBA(cdb.field, lba); if (b_read_10) { int retval; CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_READ_10); CDIO_MMC_SET_READ_LENGTH16(cdb.field, i_blocks); if ((retval = mmc_set_blocksize (p_env->gen.cdio, M2RAW_SECTOR_SIZE))) return retval; if ((retval = run_mmc_cmd_linux (p_env, 0, mmc_get_cmd_len(cdb.field[0]), &cdb, SCSI_MMC_DATA_READ, M2RAW_SECTOR_SIZE * i_blocks, p_buf))) { mmc_set_blocksize (p_env->gen.cdio, CDIO_CD_FRAMESIZE); return retval; } /* Restore blocksize. */ retval = mmc_set_blocksize (p_env->gen.cdio, CDIO_CD_FRAMESIZE); return retval; } else { cdb.field[1] = 0; /* sector size mode2 */ cdb.field[9] = 0x58; /* 2336 mode2 */ CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_READ_CD); CDIO_MMC_SET_READ_LENGTH24(cdb.field, i_blocks); return run_mmc_cmd_linux (p_env, 0, mmc_get_cmd_len(cdb.field[0]), &cdb, SCSI_MMC_DATA_READ, M2RAW_SECTOR_SIZE * i_blocks, p_buf); } } static driver_return_code_t _read_mode2_sectors (_img_private_t *p_env, void *p_buf, lba_t lba, uint32_t i_blocks, bool b_read_10) { unsigned int l = 0; int retval = 0; while (i_blocks > 0) { const unsigned i_blocks2 = (i_blocks > 25) ? 25 : i_blocks; void *p_buf2 = ((char *)p_buf ) + (l * M2RAW_SECTOR_SIZE); retval |= _read_mode2_sectors_mmc (p_env, p_buf2, lba + l, i_blocks2, b_read_10); if (retval) break; i_blocks -= i_blocks2; l += i_blocks2; } return retval; } /*! Reads a single mode1 sector from cd device into data starting from lsn. Returns 0 if no error. */ static driver_return_code_t _read_mode1_sector_linux (void *p_user_data, void *p_data, lsn_t lsn, bool b_form2) { #if 0 char buf[M2RAW_SECTOR_SIZE] = { 0, }; struct cdrom_msf *p_msf = (struct cdrom_msf *) &buf; msf_t _msf; _img_private_t *p_env = p_user_data; cdio_lsn_to_msf (lsn, &_msf); p_msf->cdmsf_min0 = cdio_from_bcd8(_msf.m); p_msf->cdmsf_sec0 = cdio_from_bcd8(_msf.s); p_msf->cdmsf_frame0 = cdio_from_bcd8(_msf.f); retry: switch (p_env->access_mode) { case _AM_NONE: cdio_warn ("no way to read mode1"); return 1; break; case _AM_IOCTL: if (ioctl (p_env->gen.fd, CDROMREADMODE1, &buf) == -1) { perror ("ioctl()"); return 1; /* exit (EXIT_FAILURE); */ } break; case _AM_READ_CD: case _AM_READ_10: if (_read_mode2_sectors (p_env, buf, lsn, 1, (p_env->access_mode == _AM_READ_10))) { perror ("ioctl()"); if (p_env->access_mode == _AM_READ_CD) { cdio_info ("READ_CD failed; switching to READ_10 mode..."); p_env->access_mode = _AM_READ_10; goto retry; } else { cdio_info ("READ_10 failed; switching to ioctl(CDROMREADMODE2) mode..."); p_env->access_mode = _AM_IOCTL; goto retry; } return 1; } break; } memcpy (p_data, buf + CDIO_CD_SYNC_SIZE + CDIO_CD_HEADER_SIZE, b_form2 ? M2RAW_SECTOR_SIZE: CDIO_CD_FRAMESIZE); #else return cdio_generic_read_form1_sector(p_user_data, p_data, lsn); #endif return 0; } /*! Reads i_blocks of mode2 sectors from cd device into data starting from lsn. Returns 0 if no error. */ static driver_return_code_t _read_mode1_sectors_linux (void *p_user_data, void *p_data, lsn_t lsn, bool b_form2, uint32_t i_blocks) { _img_private_t *p_env = p_user_data; unsigned int i; int retval; unsigned int blocksize = b_form2 ? M2RAW_SECTOR_SIZE : CDIO_CD_FRAMESIZE; for (i = 0; i < i_blocks; i++) { if ( (retval = _read_mode1_sector_linux (p_env, ((char *)p_data) + (blocksize*i), lsn + i, b_form2)) ) return retval; } return DRIVER_OP_SUCCESS; } /*! Reads a single mode2 sector from cd device into data starting from lsn. Returns 0 if no error. */ static driver_return_code_t _read_mode2_sector_linux (void *p_user_data, void *p_data, lsn_t lsn, bool b_form2) { char buf[M2RAW_SECTOR_SIZE] = { 0, }; struct cdrom_msf *msf = (struct cdrom_msf *) &buf; msf_t _msf; _img_private_t *p_env = p_user_data; cdio_lba_to_msf (cdio_lsn_to_lba(lsn), &_msf); msf->cdmsf_min0 = cdio_from_bcd8(_msf.m); msf->cdmsf_sec0 = cdio_from_bcd8(_msf.s); msf->cdmsf_frame0 = cdio_from_bcd8(_msf.f); retry: switch (p_env->access_mode) { case _AM_NONE: cdio_warn ("no way to read mode2"); return 1; break; case _AM_IOCTL: case _AM_MMC_RDWR: case _AM_MMC_RDWR_EXCL: if (ioctl (p_env->gen.fd, CDROMREADMODE2, &buf) == -1) { perror ("ioctl()"); return 1; /* exit (EXIT_FAILURE); */ } break; case _AM_READ_CD: case _AM_READ_10: if (_read_mode2_sectors (p_env, buf, lsn, 1, (p_env->access_mode == _AM_READ_10))) { perror ("ioctl()"); if (p_env->access_mode == _AM_READ_CD) { cdio_info ("READ_CD failed; switching to READ_10 mode..."); p_env->access_mode = _AM_READ_10; goto retry; } else { cdio_info ("READ_10 failed; switching to ioctl(CDROMREADMODE2) mode..."); p_env->access_mode = _AM_IOCTL; goto retry; } return 1; } break; } if (b_form2) memcpy (p_data, buf, M2RAW_SECTOR_SIZE); else memcpy (((char *)p_data), buf + CDIO_CD_SUBHEADER_SIZE, CDIO_CD_FRAMESIZE); return DRIVER_OP_SUCCESS; } /*! Reads i_blocks of mode2 sectors from cd device into data starting from lsn. Returns 0 if no error. */ static driver_return_code_t _read_mode2_sectors_linux (void *p_user_data, void *data, lsn_t lsn, bool b_form2, uint32_t i_blocks) { _img_private_t *p_env = p_user_data; unsigned int i; uint16_t i_blocksize = b_form2 ? M2RAW_SECTOR_SIZE : CDIO_CD_FRAMESIZE; /* For each frame, pick out the data part we need */ for (i = 0; i < i_blocks; i++) { int retval; if ( (retval = _read_mode2_sector_linux (p_env, ((char *)data) + (i_blocksize*i), lsn + i, b_form2)) ) return retval; } return DRIVER_OP_SUCCESS; } /*! Read and cache the CD's Track Table of Contents and track info. Return false if successful or true if an error. */ static bool read_toc_linux (void *p_user_data) { _img_private_t *p_env = p_user_data; int i; /* read TOC header */ if ( ioctl(p_env->gen.fd, CDROMREADTOCHDR, &p_env->tochdr) == -1 ) { cdio_warn("%s: %s\n", "error in ioctl CDROMREADTOCHDR", strerror(errno)); return false; } p_env->gen.i_first_track = p_env->tochdr.cdth_trk0; p_env->gen.i_tracks = p_env->tochdr.cdth_trk1; /* read individual tracks */ for (i= p_env->gen.i_first_track; i<=p_env->gen.i_tracks; i++) { struct cdrom_tocentry *p_toc = &(p_env->tocent[i-p_env->gen.i_first_track]); p_toc->cdte_track = i; p_toc->cdte_format = CDROM_MSF; if ( ioctl(p_env->gen.fd, CDROMREADTOCENTRY, p_toc) == -1 ) { cdio_warn("%s %d: %s\n", "error in ioctl CDROMREADTOCENTRY for track", i, strerror(errno)); return false; } set_track_flags(&(p_env->gen.track_flags[i]), p_toc->cdte_ctrl); /**** struct cdrom_msf0 *msf= &env->tocent[i-1].cdte_addr.msf; fprintf (stdout, "--- track# %d (msf %2.2x:%2.2x:%2.2x)\n", i, msf->minute, msf->second, msf->frame); ****/ } /* read the lead-out track */ p_env->tocent[p_env->gen.i_tracks].cdte_track = CDIO_CDROM_LEADOUT_TRACK; p_env->tocent[p_env->gen.i_tracks].cdte_format = CDROM_MSF; if (ioctl(p_env->gen.fd, CDROMREADTOCENTRY, &p_env->tocent[p_env->gen.i_tracks]) == -1 ) { cdio_warn("%s: %s\n", "error in ioctl CDROMREADTOCENTRY for lead-out", strerror(errno)); return false; } /* struct cdrom_msf0 *msf= &env->tocent[p_env->gen.i_tracks].cdte_addr.msf; fprintf (stdout, "--- track# %d (msf %2.2x:%2.2x:%2.2x)\n", i, msf->minute, msf->second, msf->frame); */ p_env->gen.toc_init = true; return true; } /*! Run a SCSI MMC command. cdio CD structure set by cdio_open(). i_timeout time in milliseconds we will wait for the command to complete. If this value is -1, use the default time-out value. p_buf Buffer for data, both sending and receiving i_buf Size of buffer e_direction direction the transfer is to go. cdb CDB bytes. All values that are needed should be set on input. We'll figure out what the right CDB length should be. We return true if command completed successfully and false if not. */ static driver_return_code_t run_mmc_cmd_linux(void *p_user_data, unsigned int i_timeout_ms, unsigned int i_cdb, const mmc_cdb_t *p_cdb, cdio_mmc_direction_t e_direction, unsigned int i_buf, /*in/out*/ void *p_buf) { _img_private_t *p_env = p_user_data; struct cdrom_generic_command cgc; cdio_mmc_request_sense_t sense; unsigned char *u_sense = (unsigned char *) &sense; p_env->gen.scsi_mmc_sense_valid = 0; memset (&cgc, 0, sizeof (struct cdrom_generic_command)); memcpy(&cgc.cmd, p_cdb, i_cdb); cgc.buflen = i_buf; cgc.buffer = p_buf; cgc.sense = (struct request_sense *) &sense; cgc.data_direction = (SCSI_MMC_DATA_READ == e_direction) ? CGC_DATA_READ : (SCSI_MMC_DATA_WRITE == e_direction) ? CGC_DATA_WRITE : CGC_DATA_NONE; #ifdef HAVE_LINUX_CDROM_TIMEOUT cgc.timeout = i_timeout_ms; #endif memset(u_sense, 0, sizeof(sense)); { int i_rc = ioctl (p_env->gen.fd, CDROM_SEND_PACKET, &cgc); /* Record SCSI sense reply for API call mmc_last_cmd_sense(). */ if (sense.additional_sense_len) { /* SCSI Primary Command standard SPC 4.5.3, Table 26: 252 bytes legal, 263 bytes possible */ int sense_size = sense.additional_sense_len + 8; if (sense_size > sizeof(sense)) sense_size = sizeof(sense); memcpy((void *) p_env->gen.scsi_mmc_sense, &sense, sense_size); p_env->gen.scsi_mmc_sense_valid = sense_size; } if (0 == i_rc) return DRIVER_OP_SUCCESS; if (-1 == i_rc) { cdio_info ("ioctl CDROM_SEND_PACKET failed: %s", strerror(errno)); switch (errno) { case EPERM: return DRIVER_OP_NOT_PERMITTED; break; case EINVAL: return DRIVER_OP_BAD_PARAMETER; break; case EFAULT: return DRIVER_OP_BAD_POINTER; break; case EIO: default: return DRIVER_OP_ERROR; break; } } else if (i_rc < -1) return DRIVER_OP_ERROR; else /*Not sure if this the best thing, but we'll use anyway. */ return DRIVER_OP_SUCCESS; } } /*! Return the size of the CD in logical block address (LBA) units. @return the lsn. On error return CDIO_INVALID_LSN. As of GNU/Linux 2.6, CDROMTOCENTRY gives ioctl CDROMREADTOCENTRY failed: Invalid argument In some cases CDROMREADTOCHDR seems to fix this, but I haven't been able to find anything that documents this requirement or behavior. It's not the way CDROMREADTOCHDR works on other 'nixs. Also note that in one at least one test the corresponding MMC gives a different answer, so there may be some disagreement about what is in fact the last lsn. */ static lsn_t get_disc_last_lsn_linux (void *p_user_data) { _img_private_t *p_env = p_user_data; struct cdrom_tocentry tocent; uint32_t i_size; if (!p_env->gen.toc_init) read_toc_linux (p_user_data) ; tocent.cdte_track = CDIO_CDROM_LEADOUT_TRACK; tocent.cdte_format = CDROM_LBA; if (ioctl (p_env->gen.fd, CDROMREADTOCENTRY, &tocent) == -1) { cdio_warn ("ioctl CDROMREADTOCENTRY failed: %s\n", strerror(errno)); return CDIO_INVALID_LSN; } i_size = tocent.cdte_addr.lba; return i_size; } /*! Set the arg "key" with "value" in the source device. Currently "source" and "access-mode" are valid keys. "source" sets the source device in I/O operations "access-mode" sets the the method of CD access DRIVER_OP_SUCCESS is returned if no error was found, and nonzero if there as an error. */ static driver_return_code_t set_arg_linux (void *p_user_data, const char key[], const char value[]) { _img_private_t *p_env = p_user_data; if (!strcmp (key, "source")) { if (!value) return DRIVER_OP_ERROR; free (p_env->gen.source_name); p_env->gen.source_name = strdup (value); } else if (!strcmp (key, "access-mode")) { return str_to_access_mode_linux(value); } else return DRIVER_OP_ERROR; return DRIVER_OP_SUCCESS; } /* checklist: /dev/cdrom, /dev/dvd /dev/hd?, /dev/scd? /dev/sr? */ static const char checklist1[][40] = { {"cdrom"}, {"dvd"} }; static const int checklist1_size = sizeof(checklist1) / sizeof(checklist1[0]); static const struct { char format[22]; int num_min; int num_max; } checklist2[] = { { "/dev/hd%c", 'a', 'z' }, { "/dev/scd%d", 0, 27 }, { "/dev/sr%d", 0, 27 }, }; static const int checklist2_size = sizeof(checklist2) / sizeof(checklist2[0]); /* Set CD-ROM drive speed */ static driver_return_code_t set_speed_linux (void *p_user_data, int i_drive_speed) { const _img_private_t *p_env = p_user_data; if (!p_env) return DRIVER_OP_UNINIT; return ioctl(p_env->gen.fd, CDROM_SELECT_SPEED, i_drive_speed); } #endif /* HAVE_LINUX_CDROM */ /*! Return an array of strings giving possible CD devices. */ char ** cdio_get_devices_linux (void) { #ifndef HAVE_LINUX_CDROM return NULL; #else unsigned int i; char drive[40]; char *ret_drive; char **drives = NULL; unsigned int num_drives=0; /* Scan the system for CD-ROM drives. */ for ( i=0; i < checklist1_size; ++i ) { if (snprintf(drive, sizeof(drive), "/dev/%s", checklist1[i]) < 0) continue; if ( is_cdrom_linux(drive, NULL) > 0 ) { cdio_add_device_list(&drives, drive, &num_drives); } } /* Now check the currently mounted CD drives */ if (NULL != (ret_drive = check_mounts_linux("/etc/mtab"))) { cdio_add_device_list(&drives, ret_drive, &num_drives); free(ret_drive); } /* Finally check possible mountable drives in /etc/fstab */ if (NULL != (ret_drive = check_mounts_linux("/etc/fstab"))) { cdio_add_device_list(&drives, ret_drive, &num_drives); free(ret_drive); } /* Scan the system for CD-ROM drives. Not always 100% reliable, so use the USE_MNTENT code above first. */ for ( i=0; i < checklist2_size; ++i ) { unsigned int j; for ( j=checklist2[i].num_min; j<=checklist2[i].num_max; ++j ) { if (snprintf(drive, sizeof(drive), checklist2[i].format, j) < 0) continue; if ( (is_cdrom_linux(drive, NULL)) > 0 ) { cdio_add_device_list(&drives, drive, &num_drives); } } } cdio_add_device_list(&drives, NULL, &num_drives); return drives; #endif /*HAVE_LINUX_CDROM*/ } /*! Return a string containing the default CD device. */ char * cdio_get_default_device_linux(void) { #ifndef HAVE_LINUX_CDROM return NULL; #else unsigned int i; char drive[40]; char *ret_drive; /* Scan the system for CD-ROM drives. */ for ( i=0; i < checklist1_size; ++i ) { if (snprintf(drive, sizeof(drive), "/dev/%s", checklist1[i]) < 0) continue; if ( is_cdrom_linux(drive, NULL) > 0 ) { return strdup(drive); } } /* Now check the currently mounted CD drives */ if (NULL != (ret_drive = check_mounts_linux("/etc/mtab"))) return ret_drive; /* Finally check possible mountable drives in /etc/fstab */ if (NULL != (ret_drive = check_mounts_linux("/etc/fstab"))) return ret_drive; /* Scan the system for CD-ROM drives. Not always 100% reliable, so use the USE_MNTENT code above first. */ for ( i=0; i < checklist2_size; ++i ) { unsigned int j; for ( j=checklist2[i].num_min; j<=checklist2[i].num_max; ++j ) { if (snprintf(drive, sizeof(drive), checklist2[i].format, j) < 0) continue; if ( is_cdrom_linux(drive, NULL) > 0 ) { return(strdup(drive)); } } } return NULL; #endif /*HAVE_LINUX_CDROM*/ } /*! Close tray on CD-ROM. @param psz_device the CD-ROM drive to be closed. */ driver_return_code_t close_tray_linux (const char *psz_device) { #ifdef HAVE_LINUX_CDROM int i_rc; int fd = open (psz_device, O_RDONLY|O_NONBLOCK); int status; if ( fd > -1 ) { if((status = ioctl(fd, CDROM_DRIVE_STATUS, CDSL_CURRENT)) > 0) { switch(status) { case CDS_TRAY_OPEN: goto try_anyway; break; case CDS_DISC_OK: cdio_info ("Tray already closed."); i_rc = DRIVER_OP_SUCCESS; break; default: cdio_info ("Unknown CD-ROM status (%d), trying anyway", status); goto try_anyway; } } else { cdio_info ("CDROM_DRIVE_STATUS failed: %s, trying anyway", strerror(errno)); try_anyway: i_rc = DRIVER_OP_SUCCESS; if((i_rc = ioctl(fd, CDROMCLOSETRAY)) != 0) { cdio_warn ("ioctl CDROMCLOSETRAY failed: %s\n", strerror(errno)); i_rc = DRIVER_OP_ERROR; } } close(fd); } else i_rc = DRIVER_OP_ERROR; return i_rc; #else return DRIVER_OP_NO_DRIVER; #endif /*HAVE_LINUX_CDROM*/ } #ifdef HAVE_LINUX_CDROM /*! Produce a text composed from the system SCSI address tuple according to habits of Linux 2.4 and 2.6 : "Bus,Host,Channel,Target,Lun" and store it in generic_img_private_t.scsi_tuple. To be accessed via cdio_get_arg("scsi-tuple-linux") or ("scsi-tuple"). Drivers which implement this code have to return 5 valid decimal numbers separated by comma, or empty text if no such numbers are available. @return 1=success , 0=failure */ static int set_scsi_tuple_linux(_img_private_t *env) { int bus_no = -1, host_no = -1, channel_no = -1, target_no = -1, lun_no = -1; int ret, i; char tuple[160], hdx[10]; #ifdef SCSI_IOCTL_GET_IDLUN struct my_scsi_idlun { int x; int host_unique_id; }; struct my_scsi_idlun idlun; #endif struct stat stbuf, env_stbuf; /* Check whether this is a hdX and declare tuple unavailable. /dev/hdX is traditionally for IDE drives and the ioctls here traditionally return ok and all 0s for all IDE drives. So the tuples are no unique ids. */ if (fstat(env->gen.fd, &env_stbuf) == -1) goto no_tuple; strcpy(hdx, "/dev/hdX"); for (i = 'a'; i <= 'z'; i++) { hdx[7] = i; if (stat(hdx, &stbuf) == -1) continue; if (env_stbuf.st_dev == stbuf.st_dev && env_stbuf.st_ino == stbuf.st_ino) goto no_tuple; } #ifdef SCSI_IOCTL_GET_BUS_NUMBER if (ioctl(env->gen.fd, SCSI_IOCTL_GET_BUS_NUMBER, &bus_no) == -1) bus_no = -1; #endif #ifdef SCSI_IOCTL_GET_IDLUN /* http://www.tldp.org/HOWTO/SCSI-Generic-HOWTO/scsi_g_idlun.html */ ret = ioctl(env->gen.fd, SCSI_IOCTL_GET_IDLUN, &idlun); if (ret != -1) { host_no= (idlun.x >> 24) & 255; channel_no= (idlun.x >> 16) & 255; target_no= (idlun.x) & 255; lun_no= (idlun.x >> 8) & 255; } #endif if (env->gen.scsi_tuple != NULL) free (env->gen.scsi_tuple); env->gen.scsi_tuple = NULL; if (bus_no < 0 || host_no < 0 || channel_no < 0 || target_no < 0 || lun_no < 0) { no_tuple:; env->gen.scsi_tuple = strdup(""); return 0; } snprintf(tuple, sizeof(tuple)-1, "%d,%d,%d,%d,%d", bus_no, host_no, channel_no, target_no, lun_no); env->gen.scsi_tuple = strdup(tuple); return 1; } #endif /*! Initialization routine. This is the only thing that doesn't get called via a function pointer. In fact *we* are the ones to set that up. */ CdIo_t * cdio_open_linux (const char *psz_source_name) { #ifdef HAVE_LINUX_CDROM return cdio_open_am_linux(psz_source_name, NULL); #else return NULL; #endif /*HAVE_LINUX_CDROM*/ } /*! Initialization routine. This is the only thing that doesn't get called via a function pointer. In fact *we* are the ones to set that up. */ CdIo_t * cdio_open_am_linux (const char *psz_orig_source, const char *access_mode) { #ifdef HAVE_LINUX_CDROM CdIo_t *ret; _img_private_t *_data; char *psz_source; int open_access_mode; /* Access mode passed to cdio_generic_init. */ cdio_funcs_t _funcs = { .audio_get_volume = audio_get_volume_linux, .audio_pause = audio_pause_linux, .audio_play_msf = audio_play_msf_linux, .audio_play_track_index= audio_play_track_index_linux, #if USE_MMC_SUBCHANNEL .audio_read_subchannel = audio_read_subchannel_mmc, #else .audio_read_subchannel = audio_read_subchannel_linux, #endif .audio_resume = audio_resume_linux, .audio_set_volume = audio_set_volume_linux, .audio_stop = audio_stop_linux, .eject_media = eject_media_linux, .free = cdio_generic_free, .get_arg = get_arg_linux, .get_blocksize = get_blocksize_mmc, .get_cdtext = get_cdtext_generic, .get_default_device = cdio_get_default_device_linux, .get_devices = cdio_get_devices_linux, .get_disc_last_lsn = get_disc_last_lsn_linux, .get_discmode = get_discmode_linux, #if USE_LINUX_CAP .get_drive_cap = get_drive_cap_linux, #else .get_drive_cap = get_drive_cap_mmc, #endif .get_first_track_num = get_first_track_num_generic, .get_hwinfo = NULL, .get_last_session = get_last_session_linux, .get_media_changed = get_media_changed_linux, .get_mcn = get_mcn_linux, .get_num_tracks = get_num_tracks_generic, .get_track_channels = get_track_channels_generic, .get_track_copy_permit = get_track_copy_permit_generic, .get_track_format = get_track_format_linux, .get_track_green = get_track_green_linux, .get_track_lba = NULL, /* This could be implemented if need be. */ .get_track_preemphasis = get_track_preemphasis_generic, .get_track_msf = get_track_msf_linux, .lseek = cdio_generic_lseek, .read = cdio_generic_read, .read_audio_sectors = read_audio_sectors_linux, #if 1 .read_data_sectors = read_data_sectors_generic, #else .read_data_sectors = read_data_sectors_mmc, #endif .read_mode1_sector = _read_mode1_sector_linux, .read_mode1_sectors = _read_mode1_sectors_linux, .read_mode2_sector = _read_mode2_sector_linux, .read_mode2_sectors = _read_mode2_sectors_linux, .read_toc = read_toc_linux, .run_mmc_cmd = run_mmc_cmd_linux, .set_arg = set_arg_linux, .set_blocksize = set_blocksize_mmc, #if 1 .set_speed = set_speed_linux, #else .set_speed = set_speed_mmc, #endif }; _data = calloc (1, sizeof (_img_private_t)); _data->access_mode = str_to_access_mode_linux(access_mode); _data->gen.init = false; _data->gen.toc_init = false; _data->gen.fd = -1; _data->gen.b_cdtext_init = false; _data->gen.b_cdtext_error = false; if (NULL == psz_orig_source) { psz_source=cdio_get_default_device_linux(); if (NULL == psz_source) { free(_data); return NULL; } set_arg_linux(_data, "source", psz_source); free(psz_source); } else { if (cdio_is_device_generic(psz_orig_source)) set_arg_linux(_data, "source", psz_orig_source); else { /* The below would be okay if all device drivers worked this way. */ #if 0 cdio_info ("source %s is not a device", psz_orig_source); #endif free(_data); return NULL; } } ret = cdio_new ((void *)_data, &_funcs); if (ret == NULL) return NULL; ret->driver_id = DRIVER_LINUX; open_access_mode = O_NONBLOCK; if (_AM_MMC_RDWR == _data->access_mode) open_access_mode |= O_RDWR; else if (_AM_MMC_RDWR_EXCL == _data->access_mode) open_access_mode |= O_RDWR | O_EXCL; else open_access_mode |= O_RDONLY; if (cdio_generic_init(_data, open_access_mode)) { set_scsi_tuple_linux(_data); return ret; } else { cdio_generic_free (_data); free(ret); return NULL; } #else return NULL; #endif /* HAVE_LINUX_CDROM */ } bool cdio_have_linux (void) { #ifdef HAVE_LINUX_CDROM return true; #else return false; #endif /* HAVE_LINUX_CDROM */ } /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/lib/driver/realpath.c0000644000175000017500000000662211650123342014002 00000000000000/* Copyright (C) 2010, 2011 Rocky Bernstein Diego 'Flameeyes' Pettenò Thomas Schmitt This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* POSIX realpath if that's around, and something like it if not. To compile as a standalone program: gcc -Wall -g -I../.. -DHAVE_CONFIG_H -DSTANDALONE -o realpath realpath.c */ /* Make sure we handle: - resolve relative links like /dev/cdrom -> sr2 - abort on cyclic linking like /dev/cdrom -> /dev/cdrom */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #ifdef HAVE_STDLIB_H # include #endif #include #ifdef HAVE_STRING_H # include #endif #ifdef HAVE_UNISTD_H // readlink # include #endif #ifdef HAVE_INTTYPES_H # include "inttypes.h" #endif #ifdef HAVE_LIMITS_H # include #endif #ifndef PATH_MAX #define PATH_MAX 4096 #endif #include /*! cdio_realpath() same as POSIX.1-2001 realpath if that's around. If not we do poor-man's simulation of that behavior. */ char *cdio_realpath (const char *psz_src_path, char *psz_resolved_path) { #ifdef HAVE_REALPATH psz_resolved_path = realpath(psz_src_path, psz_resolved_path); #elif defined(HAVE_READLINK) char tmp_src[PATH_MAX+1]; char tmp_dst[PATH_MAX+1]; char *p_adr; int i, len; const int loop_limit = 100; strcpy(tmp_src, psz_src_path); /* FIXME: remove loop and change with stat before and after readlink which looks direct symlink. Rely on errno to figure out other non-existent or looped symlinks. */ for(i = 0; i < loop_limit; i++) { len = readlink(tmp_src, tmp_dst, PATH_MAX); if (-1 == len) { /* Right now we expect a "not symlink" error. However after we put in the stat() suggested above, there won't be a symlink error and we should start reporting what the failure is. */ break; } else { tmp_dst[len] = '\0'; if (tmp_dst[0] != '/') { /* Take care of relative link like /dev/cdrom -> sr2 */ p_adr = strrchr(tmp_src, '/'); if (p_adr != NULL) { strncpy(p_adr + 1, tmp_dst, PATH_MAX - (p_adr + 1 - tmp_src)); } else { strncpy(tmp_src, tmp_dst, PATH_MAX); } } else { strncpy(tmp_src, tmp_dst, PATH_MAX); } tmp_src[PATH_MAX - 1] = 0; /* strncpy() does not always set a 0 */ } } strncpy(psz_resolved_path, tmp_src, PATH_MAX); #else strncpy(psz_resolved_path, psz_src_path, PATH_MAX); #endif return psz_resolved_path; } #ifdef STANDALONE int main(int argc, char **argv) { int i; char dest[PATH_MAX]; if (argc < 2) { fprintf(stderr, "Usage: %s path [path ...]\n", argv[0]); fprintf(stderr, " Resolve symbolic links\n"); exit(1); } for (i= 1; i < argc; i++) { dest[0] = 0; cdio_realpath (argv[i], dest); printf("%s -> %s\n", argv[i], dest); } exit(0); } #endif libcdio-0.83/lib/driver/netbsd.c0000644000175000017500000003711311650125656013472 00000000000000/* Copyright (C) 2008, 2010, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Changes up to version 0.76 */ /* * Copyright (c) 2003 * Matthias Drochner. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #include "cdio_assert.h" #include "cdio_private.h" #ifdef __i386__ #define DEFAULT_CDIO_DEVICE "/dev/rcd0d" #else #define DEFAULT_CDIO_DEVICE "/dev/rcd0c" #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_NETBSD_CDROM #include #include #include #include #include #include #include #include #include #include #define TOTAL_TRACKS (_obj->tochdr.ending_track \ - _obj->tochdr.starting_track + 1) #define FIRST_TRACK_NUM (_obj->tochdr.starting_track) typedef struct { generic_img_private_t gen; bool toc_valid; struct ioc_toc_header tochdr; struct cd_toc_entry tocent[100]; bool sessionformat_valid; int sessionformat[100]; /* format of the session the track is in */ } _img_private_t; static driver_return_code_t run_scsi_cmd_netbsd(void *p_user_data, unsigned int i_timeout_ms, unsigned int i_cdb, const mmc_cdb_t *p_cdb, cdio_mmc_direction_t e_direction, unsigned int i_buf, void *p_buf ) { const _img_private_t *_obj = p_user_data; scsireq_t req; memset(&req, 0, sizeof(req)); memcpy(&req.cmd[0], p_cdb, i_cdb); req.cmdlen = i_cdb; req.datalen = i_buf; req.databuf = p_buf; req.timeout = i_timeout_ms; req.flags = e_direction == SCSI_MMC_DATA_READ ? SCCMD_READ : SCCMD_WRITE; if (ioctl(_obj->gen.fd, SCIOCCOMMAND, &req) < 0) { perror("SCIOCCOMMAND"); return -1; } if (req.retsts != SCCMD_OK) { fprintf(stderr, "SCIOCCOMMAND cmd 0x%02x sts %d\n", req.cmd[0], req.retsts); return -1; } return 0; } static int read_audio_sectors_netbsd(void *user_data, void *data, lsn_t lsn, unsigned int nblocks) { scsireq_t req; _img_private_t *_obj = user_data; memset(&req, 0, sizeof(req)); req.cmd[0] = 0xbe; req.cmd[1] = 0; req.cmd[2] = (lsn >> 24) & 0xff; req.cmd[3] = (lsn >> 16) & 0xff; req.cmd[4] = (lsn >> 8) & 0xff; req.cmd[5] = (lsn >> 0) & 0xff; req.cmd[6] = (nblocks >> 16) & 0xff; req.cmd[7] = (nblocks >> 8) & 0xff; req.cmd[8] = (nblocks >> 0) & 0xff; req.cmd[9] = 0x78; req.cmdlen = 10; req.datalen = nblocks * CDIO_CD_FRAMESIZE_RAW; req.databuf = data; req.timeout = 10000; req.flags = SCCMD_READ; if (ioctl(_obj->gen.fd, SCIOCCOMMAND, &req) < 0) { perror("SCIOCCOMMAND"); return 1; } if (req.retsts != SCCMD_OK) { fprintf(stderr, "SCIOCCOMMAND cmd 0xbe sts %d\n", req.retsts); return 1; } return 0; } static int read_mode2_sector_netbsd(void *user_data, void *data, lsn_t lsn, bool mode2_form2) { scsireq_t req; _img_private_t *_obj = user_data; char buf[M2RAW_SECTOR_SIZE] = { 0, }; memset(&req, 0, sizeof(req)); req.cmd[0] = 0xbe; req.cmd[1] = 0; req.cmd[2] = (lsn >> 24) & 0xff; req.cmd[3] = (lsn >> 16) & 0xff; req.cmd[4] = (lsn >> 8) & 0xff; req.cmd[5] = (lsn >> 0) & 0xff; req.cmd[6] = 0; req.cmd[7] = 0; req.cmd[8] = 1; req.cmd[9] = 0x58; /* subheader + userdata + ECC */ req.cmdlen = 10; req.datalen = M2RAW_SECTOR_SIZE; req.databuf = buf; req.timeout = 10000; req.flags = SCCMD_READ; if (ioctl(_obj->gen.fd, SCIOCCOMMAND, &req) < 0) { perror("SCIOCCOMMAND"); return 1; } if (req.retsts != SCCMD_OK) { fprintf(stderr, "SCIOCCOMMAND cmd 0xbe sts %d\n", req.retsts); return 1; } if (mode2_form2) memcpy(data, buf, M2RAW_SECTOR_SIZE); else memcpy(data, buf + CDIO_CD_SUBHEADER_SIZE, CDIO_CD_FRAMESIZE); return 0; } static int read_mode2_sectors_netbsd(void *user_data, void *data, lsn_t lsn, bool mode2_form2, unsigned int nblocks) { int i, res; char *buf = data; for (i = 0; i < nblocks; i++) { res = read_mode2_sector_netbsd(user_data, buf, lsn, mode2_form2); if (res) return res; buf += (mode2_form2 ? M2RAW_SECTOR_SIZE : CDIO_CD_FRAMESIZE); lsn++; } return 0; } static int set_arg_netbsd(void *user_data, const char key[], const char value[]) { _img_private_t *_obj = user_data; if (!strcmp(key, "source")) { if (!value) return -2; free(_obj->gen.source_name); _obj->gen.source_name = strdup(value); } else if (!strcmp(key, "access-mode")) { if (strcmp(value, "READ_CD")) cdio_error("unknown access type: %s ignored.", value); } else return -1; return 0; } static bool _cdio_read_toc(_img_private_t *_obj) { int res; struct ioc_read_toc_entry req; res = ioctl(_obj->gen.fd, CDIOREADTOCHEADER, &_obj->tochdr); if (res < 0) { cdio_error("error in ioctl(CDIOREADTOCHEADER): %s\n", strerror(errno)); return false; } req.address_format = CD_MSF_FORMAT; req.starting_track = FIRST_TRACK_NUM; req.data_len = (TOTAL_TRACKS + 1) /* leadout! */ * sizeof(struct cd_toc_entry); req.data = _obj->tocent; res = ioctl(_obj->gen.fd, CDIOREADTOCENTRIES, &req); if (res < 0) { cdio_error("error in ioctl(CDROMREADTOCENTRIES): %s\n", strerror(errno)); return false; } _obj->toc_valid = 1; return true; } static bool read_toc_netbsd (void *p_user_data) { return _cdio_read_toc(p_user_data); } static int _cdio_read_discinfo(_img_private_t *_obj) { scsireq_t req; #define FULLTOCBUF (4 + 1000*11) unsigned char buf[FULLTOCBUF] = { 0, }; int i, j; memset(&req, 0, sizeof(req)); req.cmd[0] = 0x43; /* READ TOC/PMA/ATIP */ req.cmd[1] = 0x02; req.cmd[2] = 0x02; /* full TOC */ req.cmd[3] = 0; req.cmd[4] = 0; req.cmd[5] = 0; req.cmd[6] = 0; req.cmd[7] = FULLTOCBUF / 256; req.cmd[8] = FULLTOCBUF % 256; req.cmd[9] = 0; req.cmdlen = 10; req.datalen = FULLTOCBUF; req.databuf = buf; req.timeout = 10000; req.flags = SCCMD_READ; if (ioctl(_obj->gen.fd, SCIOCCOMMAND, &req) < 0) { perror("SCIOCCOMMAND"); return 1; } if (req.retsts != SCCMD_OK) { fprintf(stderr, "SCIOCCOMMAND cmd 0x43 sts %d\n", req.retsts); return 1; } #if 1 printf("discinfo:"); for (i = 0; i < 4; i++) printf(" %02x", buf[i]); printf("\n"); for (i = 0; i < buf[1] - 2; i++) { printf(" %02x", buf[i + 4]); if (!((i + 1) % 11)) printf("\n"); } #endif for (i = 4; i < req.datalen_used; i += 11) { if (buf[i + 3] == 0xa0) { /* POINT */ /* XXX: assume entry 0xa1 follows */ for (j = buf[i + 8] - 1; j <= buf[i + 11 + 8] - 1; j++) _obj->sessionformat[j] = buf[i + 9]; } } _obj->sessionformat_valid = true; return 0; } static int eject_media_netbsd(void *user_data) { _img_private_t *_obj = user_data; int fd, res, ret = 0; fd = open(_obj->gen.source_name, O_RDONLY|O_NONBLOCK); if (fd < 0) return 2; res = ioctl(fd, CDIOCALLOW); if (res < 0) { cdio_error("ioctl(fd, CDIOCALLOW) failed: %s\n", strerror(errno)); /* go on... */ } res = ioctl(fd, CDIOCEJECT); if (res < 0) { cdio_error("ioctl(CDIOCEJECT) failed: %s\n", strerror(errno)); ret = 1; } close(fd); return ret; } /*! Return the value associated with the key "arg". */ static const char * get_arg_netbsd(void *user_data, const char key[]) { _img_private_t *_obj = user_data; if (!strcmp(key, "source")) { return _obj->gen.source_name; } else if (!strcmp(key, "access-mode")) { return "READ_CD"; } else if (!strcmp (key, "mmc-supported?")) { return "true" ; } return NULL; } static track_t get_first_track_num_netbsd(void *user_data) { _img_private_t *_obj = user_data; int res; if (!_obj->toc_valid) { res = _cdio_read_toc(_obj); if (!res) return CDIO_INVALID_TRACK; } return FIRST_TRACK_NUM; } static track_t get_num_tracks_netbsd(void *user_data) { _img_private_t *_obj = user_data; int res; if (!_obj->toc_valid) { res = _cdio_read_toc(_obj); if (!res) return CDIO_INVALID_TRACK; } return TOTAL_TRACKS; } /*! Get format of track. */ static track_format_t get_track_format_netbsd(void *user_data, track_t track_num) { _img_private_t *_obj = user_data; int res; if (!_obj->toc_valid) { res = _cdio_read_toc(_obj); if (!res) return CDIO_INVALID_TRACK; } if (track_num > TOTAL_TRACKS || track_num == 0) return TRACK_FORMAT_ERROR; if (_obj->tocent[track_num - 1].control & 0x04) { if (!_obj->sessionformat_valid) { res = _cdio_read_discinfo(_obj); if (res) return CDIO_INVALID_TRACK; } if (_obj->sessionformat[track_num - 1] == 0x10) return TRACK_FORMAT_CDI; else if (_obj->sessionformat[track_num - 1] == 0x20) return TRACK_FORMAT_XA; else return TRACK_FORMAT_DATA; } else return TRACK_FORMAT_AUDIO; } /*! Return true if we have XA data (green, mode2 form1) or XA data (green, mode2 form2). That is track begins: sync - header - subheader 12 4 - 8 FIXME: there's gotta be a better design for this and get_track_format? */ static bool get_track_green_netbsd(void *user_data, track_t track_num) { return (get_track_format_netbsd(user_data, track_num) == TRACK_FORMAT_XA); } /*! Return the starting MSF (minutes/secs/frames) for track number track_num in obj. Track numbers usually start at something greater than 0, usually 1. The "leadout" track is specified either by using i_track LEADOUT_TRACK or the total tracks+1. False is returned if there is no track entry. */ static bool get_track_msf_netbsd(void *user_data, track_t track_num, msf_t *msf) { _img_private_t *_obj = user_data; int res; if (!msf) return false; if (!_obj->toc_valid) { res = _cdio_read_toc(_obj); if (!res) return CDIO_INVALID_TRACK; } if (track_num == CDIO_CDROM_LEADOUT_TRACK) track_num = TOTAL_TRACKS + 1; if (track_num > TOTAL_TRACKS + 1 || track_num == 0) return false; msf->m = cdio_to_bcd8(_obj->tocent[track_num - 1].addr.msf.minute); msf->s = cdio_to_bcd8(_obj->tocent[track_num - 1].addr.msf.second); msf->f = cdio_to_bcd8(_obj->tocent[track_num - 1].addr.msf.frame); return true; } /*! Return the size of the CD in logical block address (LBA) units. @return the lsn. On error return CDIO_INVALID_LSN. Also note that in one at least one test the corresponding MMC gives a different answer, so there may be some disagreement about what is in fact the last lsn. */ static lsn_t get_disc_last_lsn_netbsd(void *user_data) { msf_t msf; get_track_msf_netbsd(user_data, CDIO_CDROM_LEADOUT_TRACK, &msf); return (((msf.m * 60) + msf.s) * CDIO_CD_FRAMES_PER_SEC + msf.f); } #endif /* HAVE_NETBSD_CDROM */ char ** cdio_get_devices_netbsd (void) { #ifndef HAVE_NETBSD_CDROM return NULL; #else return NULL; #endif /* HAVE_NETBSD_CDROM */ } /*! Return a string containing the default CD device. */ char * cdio_get_default_device_netbsd() { return strdup(DEFAULT_CDIO_DEVICE); } /*! Close tray on CD-ROM. @param psz_device the CD-ROM drive to be closed. */ driver_return_code_t close_tray_netbsd (const char *psz_device) { #ifdef HAVE_NETBSD_CDROM return DRIVER_OP_UNSUPPORTED; #else return DRIVER_OP_NO_DRIVER; #endif } #ifdef HAVE_NETBSD_CDROM static cdio_funcs_t _funcs = { .audio_read_subchannel = audio_read_subchannel_mmc, .eject_media = eject_media_netbsd, .free = cdio_generic_free, .get_arg = get_arg_netbsd, .get_blocksize = get_blocksize_mmc, .get_cdtext = get_cdtext_generic, .get_default_device = cdio_get_default_device_netbsd, .get_devices = cdio_get_devices_netbsd, .get_disc_last_lsn = get_disc_last_lsn_netbsd, .get_discmode = get_discmode_generic, .get_drive_cap = get_drive_cap_mmc, .get_first_track_num = get_first_track_num_netbsd, .get_hwinfo = NULL, .get_mcn = get_mcn_mmc, .get_num_tracks = get_num_tracks_netbsd, .get_track_channels = get_track_channels_generic, .get_track_copy_permit = get_track_copy_permit_generic, .get_track_format = get_track_format_netbsd, .get_track_green = get_track_green_netbsd, .get_track_lba = NULL, /* This could be implemented if need be. */ .get_track_preemphasis = get_track_preemphasis_generic, .get_track_msf = get_track_msf_netbsd, .lseek = cdio_generic_lseek, .read = cdio_generic_read, .read_audio_sectors = read_audio_sectors_netbsd, .read_data_sectors = read_data_sectors_generic, .read_mode2_sector = read_mode2_sector_netbsd, .read_mode2_sectors = read_mode2_sectors_netbsd, .read_toc = read_toc_netbsd, #if 1 .run_mmc_cmd = run_scsi_cmd_netbsd, #endif .set_arg = set_arg_netbsd, }; #endif /*HAVE_NETBSD_CDROM*/ /*! Initialization routine. This is the only thing that doesn't get called via a function pointer. In fact *we* are the ones to set that up. */ CdIo_t * cdio_open_netbsd(const char *source_name) { #ifdef HAVE_NETBSD_CDROM CdIo_t *ret; _img_private_t *_data; _data = calloc(1, sizeof(_img_private_t)); _data->gen.init = false; _data->gen.fd = -1; _data->toc_valid = false; _data->sessionformat_valid = false; set_arg_netbsd(_data, "source", (source_name ? source_name : DEFAULT_CDIO_DEVICE)); if (source_name && !cdio_is_device_generic(source_name)) return (NULL); ret = cdio_new(&_data->gen, &_funcs); if (!ret) return NULL; if (cdio_generic_init(_data, O_RDONLY)) { return ret; } else { cdio_generic_free(_data); return NULL; } #else return NULL; #endif /* HAVE_BSDI_CDROM */ } /*! Initialization routine. This is the only thing that doesn't get called via a function pointer. In fact *we* are the ones to set that up. */ CdIo_t * cdio_open_am_netbsd(const char *source_name, const char *am) { return (cdio_open_netbsd(source_name)); } bool cdio_have_netbsd (void) { #ifdef HAVE_NETBSD_CDROM return true; #else return false; #endif /* HAVE_NETBSD_CDROM */ } /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/lib/driver/Makefile.in0000644000175000017500000011731011652210027014077 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 # Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ######################################################## # Things to make the libcdio library ######################################################## # # From libtool documentation amended with guidance from N. Boullis: # # 1. Start with version information of `0:0:0' for each libtool library. # # 2. It is probably not a good idea to update the version information # several times between public releases, but rather once per public # release. (This seems to be more an aesthetic consideration than # a hard technical one.) # # 3. If the library source code has changed at all since the last # update, then increment REVISION (`C:R:A' becomes `C:R+1:A'). # # 4. If any interfaces have been added, removed, or changed since the # last update, increment CURRENT, and set REVISION to 0. # # 5. If any interfaces have been added since the last public release, # then increment AGE. # # 6. If any interfaces have been removed or changed since the last # public release, then set AGE to 0. A changed interface means an # incompatibility with previous versions. VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @BUILD_VERSIONED_LIBS_FALSE@libcdio_la_DEPENDENCIES = \ @BUILD_VERSIONED_LIBS_FALSE@ $(am__DEPENDENCIES_1) subdir = lib/driver DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = am__objects_1 = _cdio_generic.lo _cdio_stdio.lo _cdio_stream.lo aix.lo \ bsdi.lo audio.lo cd_types.lo cdio.lo cdtext.lo device.lo \ disc.lo ds.lo freebsd.lo freebsd_cam.lo freebsd_ioctl.lo \ gnu_linux.lo bincue.lo cdrdao.lo image_common.lo nrg.lo \ logging.lo mmc.lo mmc_hl_cmds.lo mmc_ll_cmds.lo mmc_util.lo \ aspi32.lo win32_ioctl.lo win32.lo netbsd.lo os2.lo osx.lo \ read.lo realpath.lo sector.lo solaris.lo track.lo utf8.lo \ util.lo am_libcdio_la_OBJECTS = $(am__objects_1) libcdio_la_OBJECTS = $(am_libcdio_la_OBJECTS) libcdio_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libcdio_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libcdio_la_SOURCES) DIST_SOURCES = $(libcdio_la_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDDA_PLAYER_LIBS = @CDDA_PLAYER_LIBS@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CDPARANOIA_NAME = @CDPARANOIA_NAME@ CFLAGS = @CFLAGS@ CMP = @CMP@ COS_LIB = @COS_LIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_PKG_LIB_HACK = @DARWIN_PKG_LIB_HACK@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ DIFF_OPTS = @DIFF_OPTS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GIT2CL = @GIT2CL@ GREP = @GREP@ HAVE_BSDI_CDROM = @HAVE_BSDI_CDROM@ HAVE_DARWIN_CDROM = @HAVE_DARWIN_CDROM@ HAVE_FREEBSD_CDROM = @HAVE_FREEBSD_CDROM@ HAVE_JOLIET = @HAVE_JOLIET@ HAVE_LINUX_CDROM = @HAVE_LINUX_CDROM@ HAVE_OS2_CDROM = @HAVE_OS2_CDROM@ HAVE_ROCK = @HAVE_ROCK@ HAVE_SOLARIS_CDROM = @HAVE_SOLARIS_CDROM@ HAVE_WIN32_CDROM = @HAVE_WIN32_CDROM@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDIOPP_LIBS = @LIBCDIOPP_LIBS@ LIBCDIO_CDDA_LIBS = @LIBCDIO_CDDA_LIBS@ LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ LIBCDIO_DEPS = @LIBCDIO_DEPS@ LIBCDIO_LIBS = @LIBCDIO_LIBS@ LIBCDIO_PARANOIA_LIBS = @LIBCDIO_PARANOIA_LIBS@ LIBCDIO_SOURCE_PATH = @LIBCDIO_SOURCE_PATH@ LIBCDIO_VERSION_NUM = @LIBCDIO_VERSION_NUM@ LIBICONV = @LIBICONV@ LIBISO9660PP_LIBS = @LIBISO9660PP_LIBS@ LIBISO9660_CFLAGS = @LIBISO9660_CFLAGS@ LIBISO9660_LIBS = @LIBISO9660_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBUDF_LIBS = @LIBUDF_LIBS@ LINUX_CDROM_TIMEOUT = @LINUX_CDROM_TIMEOUT@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_NO_UNDEFINED = @LT_NO_UNDEFINED@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OLD_CDPARANOIA = @OLD_CDPARANOIA@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SBPCD_H = @SBPCD_H@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TYPESIZES = @TYPESIZES@ UCDROM_H = @UCDROM_H@ VCDINFO_CFLAGS = @VCDINFO_CFLAGS@ VCDINFO_LIBS = @VCDINFO_LIBS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ libcdio_la_CURRENT = 13 libcdio_la_REVISION = 0 libcdio_la_AGE = 0 EXTRA_DIST = image/Makefile \ mmc/Makefile \ FreeBSD/Makefile MSWindows/Makefile \ libcdio.sym noinst_HEADERS = cdio_assert.h cdio_private.h portable.h libcdio_sources = \ _cdio_generic.c \ _cdio_stdio.c \ _cdio_stdio.h \ _cdio_stream.c \ _cdio_stream.h \ aix.c \ bsdi.c \ audio.c \ cd_types.c \ cdio.c \ cdtext.c \ cdtext_private.h \ device.c \ disc.c \ ds.c \ FreeBSD/freebsd.c \ FreeBSD/freebsd.h \ FreeBSD/freebsd_cam.c \ FreeBSD/freebsd_ioctl.c \ generic.h \ gnu_linux.c \ image.h \ image/bincue.c \ image/cdrdao.c \ image_common.c \ image_common.h \ image/nrg.c \ image/nrg.h \ logging.c \ mmc/mmc.c \ mmc/mmc_cmd_helper.h \ mmc/mmc_hl_cmds.c \ mmc/mmc_ll_cmds.c \ mmc/mmc_private.h \ mmc/mmc_util.c \ MSWindows/aspi32.c \ MSWindows/aspi32.h \ MSWindows/win32_ioctl.c \ MSWindows/win32.c \ MSWindows/win32.h \ netbsd.c \ os2.c \ osx.c \ read.c \ realpath.c \ sector.c \ solaris.c \ track.c \ utf8.c \ util.c lib_LTLIBRARIES = libcdio.la libcdio_la_LIBADD = $(LTLIBICONV) libcdio_la_SOURCES = $(libcdio_sources) libcdio_la_ldflags = -version-info $(libcdio_la_CURRENT):$(libcdio_la_REVISION):$(libcdio_la_AGE) @LT_NO_UNDEFINED@ INCLUDES = $(LIBCDIO_CFLAGS) ######################################################## # Things to version the symbols in the libraries ######################################################## # An explanation of the versioning problem from Nicolas Boullis and # the versioned symbol solution he uses below... # # Currently, libvcdinfo uses the cdio_open function from libcdio. # Let's imagine a program foobar that uses both the vcdinfo_open # function from libvcdinfo and the cdio_open function from libcdio. # Currently, libcdio has SONAME libcdio.so.0, libvcdinfo has SONAME # libvcdinfo.so.0 and requires libcdio.so.0, and foobar requires both # libvcdinfo.so.0 and libcdio.so.0. Everything looks fine. # # Now, for some reason, you decide to change the cdio_open function. # That's your right, but you have to bump the CURRENT version and (if I # understand it correctly, athough this is not that clear in libtool's # documentation) set the AGE to 0. Anyway, this bumps the SONAME, which is # sane since the interface changes incompatibly. # Now, you have a new libcdio with SONAME libcdio.so.1. But libvcdinfo and # foobar still require libcdio.so.0. Everything is still fine. # Now, after some minor changes, the author of foobar recompiles foobar. # Then, foobar now requires libvcdinfo.so.0 and libcdio.so.1. And foobar # now segfaults... # What is happening? When you run foobar, if brings both libvcdinfo.so.0 # and libcdio.so.1, but libvcdinfo.so.0 also brings libcdio.so.0. So you # have both libcdio.so.0 and libcdio.so.1 that bring their symbols to the # global namespace. Hence, you have to incompatible versions of the # cdio_open function in the name space. When foobar calls cdio_open, it # may choose the wrong function, and segfaults... # With versioned symbols, the cdio_open function from libcdio.so.0 may be # known as (something that looks like) cdio_open@@CDIO_0. An the cdio_open # function from libcdio.so.1 as cdio_open@@CDIO_1. Both versions of # libcdio would still be brought in by the most recent foobar, but foobar # (and libvcdinfo) know which versioned function to use and then use the # good one. # This is some simple versioning where every symbol is versioned with # something that looks like the SONAME of the library. More complex (and # better) versioning is possible; it is for example what is used by glibc. # But good complex versioning is something that requires much more # work... # The below is a impliments symbol versioning. First of all, I # compute MAJOR as CURENT - AGE; that is what is used within libtool # (at least on GNU/Linux systems) for the number in the SONAME. The # nm command gives the list of symbols known in each of the object # files that will be part of the shared library. And the sed command # extracts from this list those symbols that will be shared. (This sed # command comes from libtool.) libcdio_la_MAJOR = $(shell expr $(libcdio_la_CURRENT) - $(libcdio_la_AGE)) @BUILD_VERSIONED_LIBS_FALSE@libcdio_la_LDFLAGS = $(libcdio_la_ldflags) @BUILD_VERSIONED_LIBS_TRUE@libcdio_la_LDFLAGS = $(libcdio_la_ldflags) -Wl,--version-script=libcdio.la.ver @BUILD_VERSIONED_LIBS_TRUE@libcdio_la_DEPENDENCIES = libcdio.la.ver MOSTLYCLEANFILES = libcdio.la.ver all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/driver/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/driver/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libcdio.la: $(libcdio_la_OBJECTS) $(libcdio_la_DEPENDENCIES) $(libcdio_la_LINK) -rpath $(libdir) $(libcdio_la_OBJECTS) $(libcdio_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_cdio_generic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_cdio_stdio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_cdio_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aix.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aspi32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bincue.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsdi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cd_types.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdrdao.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdtext.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/device.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/disc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ds.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/freebsd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/freebsd_cam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/freebsd_ioctl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnu_linux.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logging.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmc_hl_cmds.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmc_ll_cmds.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmc_util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netbsd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/os2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realpath.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sector.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/solaris.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/track.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win32_ioctl.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< freebsd.lo: FreeBSD/freebsd.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT freebsd.lo -MD -MP -MF $(DEPDIR)/freebsd.Tpo -c -o freebsd.lo `test -f 'FreeBSD/freebsd.c' || echo '$(srcdir)/'`FreeBSD/freebsd.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/freebsd.Tpo $(DEPDIR)/freebsd.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='FreeBSD/freebsd.c' object='freebsd.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o freebsd.lo `test -f 'FreeBSD/freebsd.c' || echo '$(srcdir)/'`FreeBSD/freebsd.c freebsd_cam.lo: FreeBSD/freebsd_cam.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT freebsd_cam.lo -MD -MP -MF $(DEPDIR)/freebsd_cam.Tpo -c -o freebsd_cam.lo `test -f 'FreeBSD/freebsd_cam.c' || echo '$(srcdir)/'`FreeBSD/freebsd_cam.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/freebsd_cam.Tpo $(DEPDIR)/freebsd_cam.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='FreeBSD/freebsd_cam.c' object='freebsd_cam.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o freebsd_cam.lo `test -f 'FreeBSD/freebsd_cam.c' || echo '$(srcdir)/'`FreeBSD/freebsd_cam.c freebsd_ioctl.lo: FreeBSD/freebsd_ioctl.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT freebsd_ioctl.lo -MD -MP -MF $(DEPDIR)/freebsd_ioctl.Tpo -c -o freebsd_ioctl.lo `test -f 'FreeBSD/freebsd_ioctl.c' || echo '$(srcdir)/'`FreeBSD/freebsd_ioctl.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/freebsd_ioctl.Tpo $(DEPDIR)/freebsd_ioctl.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='FreeBSD/freebsd_ioctl.c' object='freebsd_ioctl.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o freebsd_ioctl.lo `test -f 'FreeBSD/freebsd_ioctl.c' || echo '$(srcdir)/'`FreeBSD/freebsd_ioctl.c bincue.lo: image/bincue.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bincue.lo -MD -MP -MF $(DEPDIR)/bincue.Tpo -c -o bincue.lo `test -f 'image/bincue.c' || echo '$(srcdir)/'`image/bincue.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/bincue.Tpo $(DEPDIR)/bincue.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='image/bincue.c' object='bincue.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bincue.lo `test -f 'image/bincue.c' || echo '$(srcdir)/'`image/bincue.c cdrdao.lo: image/cdrdao.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdrdao.lo -MD -MP -MF $(DEPDIR)/cdrdao.Tpo -c -o cdrdao.lo `test -f 'image/cdrdao.c' || echo '$(srcdir)/'`image/cdrdao.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cdrdao.Tpo $(DEPDIR)/cdrdao.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='image/cdrdao.c' object='cdrdao.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdrdao.lo `test -f 'image/cdrdao.c' || echo '$(srcdir)/'`image/cdrdao.c nrg.lo: image/nrg.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nrg.lo -MD -MP -MF $(DEPDIR)/nrg.Tpo -c -o nrg.lo `test -f 'image/nrg.c' || echo '$(srcdir)/'`image/nrg.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nrg.Tpo $(DEPDIR)/nrg.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='image/nrg.c' object='nrg.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nrg.lo `test -f 'image/nrg.c' || echo '$(srcdir)/'`image/nrg.c mmc.lo: mmc/mmc.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mmc.lo -MD -MP -MF $(DEPDIR)/mmc.Tpo -c -o mmc.lo `test -f 'mmc/mmc.c' || echo '$(srcdir)/'`mmc/mmc.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mmc.Tpo $(DEPDIR)/mmc.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mmc/mmc.c' object='mmc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mmc.lo `test -f 'mmc/mmc.c' || echo '$(srcdir)/'`mmc/mmc.c mmc_hl_cmds.lo: mmc/mmc_hl_cmds.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mmc_hl_cmds.lo -MD -MP -MF $(DEPDIR)/mmc_hl_cmds.Tpo -c -o mmc_hl_cmds.lo `test -f 'mmc/mmc_hl_cmds.c' || echo '$(srcdir)/'`mmc/mmc_hl_cmds.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mmc_hl_cmds.Tpo $(DEPDIR)/mmc_hl_cmds.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mmc/mmc_hl_cmds.c' object='mmc_hl_cmds.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mmc_hl_cmds.lo `test -f 'mmc/mmc_hl_cmds.c' || echo '$(srcdir)/'`mmc/mmc_hl_cmds.c mmc_ll_cmds.lo: mmc/mmc_ll_cmds.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mmc_ll_cmds.lo -MD -MP -MF $(DEPDIR)/mmc_ll_cmds.Tpo -c -o mmc_ll_cmds.lo `test -f 'mmc/mmc_ll_cmds.c' || echo '$(srcdir)/'`mmc/mmc_ll_cmds.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mmc_ll_cmds.Tpo $(DEPDIR)/mmc_ll_cmds.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mmc/mmc_ll_cmds.c' object='mmc_ll_cmds.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mmc_ll_cmds.lo `test -f 'mmc/mmc_ll_cmds.c' || echo '$(srcdir)/'`mmc/mmc_ll_cmds.c mmc_util.lo: mmc/mmc_util.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mmc_util.lo -MD -MP -MF $(DEPDIR)/mmc_util.Tpo -c -o mmc_util.lo `test -f 'mmc/mmc_util.c' || echo '$(srcdir)/'`mmc/mmc_util.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mmc_util.Tpo $(DEPDIR)/mmc_util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mmc/mmc_util.c' object='mmc_util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mmc_util.lo `test -f 'mmc/mmc_util.c' || echo '$(srcdir)/'`mmc/mmc_util.c aspi32.lo: MSWindows/aspi32.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT aspi32.lo -MD -MP -MF $(DEPDIR)/aspi32.Tpo -c -o aspi32.lo `test -f 'MSWindows/aspi32.c' || echo '$(srcdir)/'`MSWindows/aspi32.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/aspi32.Tpo $(DEPDIR)/aspi32.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='MSWindows/aspi32.c' object='aspi32.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o aspi32.lo `test -f 'MSWindows/aspi32.c' || echo '$(srcdir)/'`MSWindows/aspi32.c win32_ioctl.lo: MSWindows/win32_ioctl.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT win32_ioctl.lo -MD -MP -MF $(DEPDIR)/win32_ioctl.Tpo -c -o win32_ioctl.lo `test -f 'MSWindows/win32_ioctl.c' || echo '$(srcdir)/'`MSWindows/win32_ioctl.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/win32_ioctl.Tpo $(DEPDIR)/win32_ioctl.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='MSWindows/win32_ioctl.c' object='win32_ioctl.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o win32_ioctl.lo `test -f 'MSWindows/win32_ioctl.c' || echo '$(srcdir)/'`MSWindows/win32_ioctl.c win32.lo: MSWindows/win32.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT win32.lo -MD -MP -MF $(DEPDIR)/win32.Tpo -c -o win32.lo `test -f 'MSWindows/win32.c' || echo '$(srcdir)/'`MSWindows/win32.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/win32.Tpo $(DEPDIR)/win32.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='MSWindows/win32.c' object='win32.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o win32.lo `test -f 'MSWindows/win32.c' || echo '$(srcdir)/'`MSWindows/win32.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES @BUILD_VERSIONED_LIBS_TRUE@libcdio.la.ver: $(libcdio_la_OBJECTS) $(srcdir)/libcdio.sym @BUILD_VERSIONED_LIBS_TRUE@ echo 'CDIO_$(libcdio_la_MAJOR) { ' > $@ @BUILD_VERSIONED_LIBS_TRUE@ objs=`for obj in $(libcdio_la_OBJECTS); do sed -ne "s/^pic_object='\(.*\)'$$/\1/p" $$obj; done`; \ @BUILD_VERSIONED_LIBS_TRUE@ if test -n "$${objs}" ; then \ @BUILD_VERSIONED_LIBS_TRUE@ nm $${objs} | sed -n -e 's/^.*[ ][ABCDGIRSTW][ABCDGIRSTW]*[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$$/\1/p' | sort -u | { first=true; while read symbol; do if grep -q "^$${symbol}\$$" $(srcdir)/libcdio.sym; then if test $$first = true; then echo " global:"; first=false; fi; echo " $${symbol};"; fi; done; } >> $@; \ @BUILD_VERSIONED_LIBS_TRUE@ nm $${objs} | sed -n -e 's/^.*[ ][ABCDGIRSTW][ABCDGIRSTW]*[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$$/\1/p' | sort -u | { first=true; while read symbol; do if grep -q "^$${symbol}\$$" $(srcdir)/libcdio.sym; then :; else if test $$first = true; then echo " local:"; first=false; fi; echo " $${symbol};"; fi; done; } >> $@; \ @BUILD_VERSIONED_LIBS_TRUE@ fi @BUILD_VERSIONED_LIBS_TRUE@ echo '};' >> $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libcdio-0.83/lib/cdda_interface/0000755000175000017500000000000011652210414013527 500000000000000libcdio-0.83/lib/cdda_interface/low_interface.h0000644000175000017500000000331411114145233016441 00000000000000/* $Id: low_interface.h,v 1.9 2008/04/16 17:00:40 karl Exp $ Copyright (C) 2004, 2005, 2008 Rocky Bernstein Copyright (C) 1998 Monty xiphmont@mit.edu This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** internal include file for cdda interface kit for Linux */ #ifndef _CDDA_LOW_INTERFACE_ #define _CDDA_LOW_INTERFACE_ #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_LINUX_VERSION_H #include #endif #include #include /* some include file locations have changed with newer kernels */ #ifndef CDROMAUDIOBUFSIZ #define CDROMAUDIOBUFSIZ 0x5382 /* set the audio buffer size */ #endif #ifdef HAVE_LINUX_CDROM_H #include #endif #ifdef HAVE_LINUX_MAJOR_H #include #endif #define MAX_RETRIES 8 #define MAX_BIG_BUFF_SIZE 65536 #define MIN_BIG_BUFF_SIZE 4096 #define SG_OFF sizeof(struct sg_header) extern int cddap_init_drive (cdrom_drive_t *d); #endif /*_CDDA_LOW_INTERFACE_*/ libcdio-0.83/lib/cdda_interface/interface.c0000644000175000017500000001055511114145233015560 00000000000000/* $Id: interface.c,v 1.26 2008/04/16 17:00:40 karl Exp $ Copyright (C) 2005, 2008 Rocky Bernstein Copyright (C) 1998 Monty xiphmont@mit.edu This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /****************************************************************** * Top-level interface module for cdrom drive access. SCSI, ATAPI, etc * specific stuff are in other modules. Note that SCSI does use * specialized ioctls; these appear in common_interface.c where the * generic_scsi stuff is in scsi_interface.c. * ******************************************************************/ #include "common_interface.h" #include "low_interface.h" #include "utils.h" #include #include static void _clean_messages(cdrom_drive_t *d) { if(d){ if(d->messagebuf)free(d->messagebuf); if(d->errorbuf)free(d->errorbuf); d->messagebuf=NULL; d->errorbuf=NULL; } } /*! Closes d and releases all storage associated with it except the internal p_cdio pointer. @param d cdrom_drive_t object to be closed. @return 0 if passed a null pointer and 1 if not in which case some work was probably done. @see cdio_cddap_close */ bool cdio_cddap_close_no_free_cdio(cdrom_drive_t *d) { if(d){ if(d->opened) d->enable_cdda(d,0); _clean_messages(d); if (d->cdda_device_name) free(d->cdda_device_name); if (d->drive_model) free(d->drive_model); d->cdda_device_name = d->drive_model = NULL; free(d); return true; } return false; } /*! Closes d and releases all storage associated with it. Doubles as "cdrom_drive_free()". @param d cdrom_drive_t object to be closed. @return 0 if passed a null pointer and 1 if not in which case some work was probably done. @see cdio_cddap_close_no_free_cdio */ int cdio_cddap_close(cdrom_drive_t *d) { if (d) { CdIo_t *p_cdio = d->p_cdio; cdio_cddap_close_no_free_cdio(d); cdio_destroy (p_cdio); return 1; } return 0; } /* finish initializing the drive! */ int cdio_cddap_open(cdrom_drive_t *d) { int ret; if(d->opened)return(0); if ( (ret=cddap_init_drive(d)) ) return(ret); /* Check TOC, enable for CDDA */ /* Some drives happily return a TOC even if there is no disc... */ { int i; for(i=0; itracks; i++) if(d->disc_toc[i].dwStartSector<0 || d->disc_toc[i+1].dwStartSector==0){ d->opened=0; cderror(d,"009: CDROM reporting illegal table of contents\n"); return(-9); } } if((ret=d->enable_cdda(d,1))) return(ret); /* d->select_speed(d,d->maxspeed); most drives are full speed by default */ if ( -1 == d->bigendianp ) { d->bigendianp = data_bigendianp(d); } return(0); } int cdio_cddap_speed_set(cdrom_drive_t *d, int speed) { return d->set_speed ? d->set_speed(d, speed) : 0; } long cdio_cddap_read(cdrom_drive_t *d, void *buffer, lsn_t beginsector, long sectors) { if (d->opened) { if (sectors>0) { sectors=d->read_audio(d, buffer, beginsector, sectors); if (sectors > 0) { /* byteswap? */ if ( d->bigendianp == -1 ) /* not determined yet */ d->bigendianp = data_bigendianp(d); if ( d->b_swap_bytes && d->bigendianp != bigendianp() ) { int i; uint16_t *p=(uint16_t *)buffer; long els=sectors*CDIO_CD_FRAMESIZE_RAW/2; for(i=0;imessagedest=mes_action; d->errordest=err_action; } extern char * cdio_cddap_messages(cdrom_drive_t *d) { char *ret=d->messagebuf; d->messagebuf=NULL; return(ret); } extern char * cdio_cddap_errors(cdrom_drive_t *d) { char *ret=d->errorbuf; d->errorbuf=NULL; return(ret); } libcdio-0.83/lib/cdda_interface/libcdio_cdda.sym0000644000175000017500000000076411114145233016567 00000000000000cdio_cddap_find_a_cdrom cdio_cddap_identify cdio_cddap_identify_cdio cdio_cddap_speed_set cdio_cddap_verbose_set cdio_cddap_messages cdio_cddap_errors cdio_cddap_close_no_free_cdio cdio_cddap_close cdio_cddap_open cdio_cddap_read cdio_cddap_track_firstsector cdio_cddap_track_lastsector cdio_cddap_tracks cdio_cddap_sector_gettrack cdio_cddap_track_channels cdio_cddap_track_audiop cdio_cddap_track_copyp cdio_cddap_track_preemp cdio_cddap_disc_firstsector cdio_cddap_disc_lastsector data_bigendianp libcdio-0.83/lib/cdda_interface/drive_exceptions.h0000644000175000017500000000356311114145233017200 00000000000000/* $Id: drive_exceptions.h,v 1.6 2008/06/13 19:26:23 flameeyes Exp $ Copyright (C) 2004, 2008 Rocky Bernstein Copyright (C) 1998 Monty xiphmont@mit.edu This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ extern int scsi_enable_cdda(cdrom_drive_t *d, int); extern long scsi_read_mmc(cdrom_drive_t *d, void *,long,long); extern long scsi_read_D4_10(cdrom_drive_t *, void *,long,long); extern long scsi_read_D4_12(cdrom_drive_t *, void *,long,long); extern long scsi_read_D8(cdrom_drive_t *, void *,long,long); extern long scsi_read_28(cdrom_drive_t *, void *,long,long); extern long scsi_read_A8(cdrom_drive_t *, void *,long,long); typedef struct exception { const char *model; int atapi; /* If the ioctl doesn't work */ unsigned char density; int (*enable)(cdrom_drive_t *,int); long (*read)(cdrom_drive_t *,void *, long, long); int bigendianp; } exception_t; /* specific to general */ #ifdef FINISHED_DRIVE_EXCEPTIONS extern long scsi_read_mmc2(cdrom_drive_t *d, void *,long,long); #else #define scsi_read_mmc2 NULL #endif int dummy_exception (cdrom_drive_t *d,int Switch); #if HAVE_LINUX_MAJOR_H extern const exception_t atapi_list[]; #endif #ifdef NEED_MMC_LIST extern const exception_t mmc_list[]; #endif #ifdef NEED_SCSI_LIST extern const exception_t scsi_list[]; #endif libcdio-0.83/lib/cdda_interface/Makefile.am0000644000175000017500000001540111650343763015520 00000000000000# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 # Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ######################################################## # Things to make the cdda_interface library ######################################################## # # From libtool documentation amended with guidance from N. Boullis: # # 1. Start with version information of `0:0:0' for each libtool library. # # 2. It is probably not a good idea to update the version information # several times between public releases, but rather once per public # release. (This seems to be more an aesthetic consideration than # a hard technical one.) # # 3. If the library source code has changed at all since the last # update, then increment REVISION (`C:R:A' becomes `C:R+1:A'). # # 4. If any interfaces have been added, removed, or changed since the # last update, increment CURRENT, and set REVISION to 0. # # 5. If any interfaces have been added since the last public release, # then increment AGE. # # 6. If any interfaces have been removed or changed since the last # public release, then set AGE to 0. A changed interface means an # incompatibility with previous versions. EXTRA_DIST = libcdio_cdda.sym libcdio_cdda_la_CURRENT = 1 libcdio_cdda_la_REVISION = 0 libcdio_cdda_la_AGE = 0 noinst_HEADERS = common_interface.h drive_exceptions.h low_interface.h \ smallft.h utils.h libcdio_cdda_sources = common_interface.c cddap_interface.c interface.c \ scan_devices.c smallft.c toc.c utils.c drive_exceptions.c lib_LTLIBRARIES = libcdio_cdda.la libcdio_cdda_la_SOURCES = $(libcdio_cdda_sources) libcdio_cdda_la_ldflags = -version-info $(libcdio_cdda_la_CURRENT):$(libcdio_cdda_la_REVISION):$(libcdio_cdda_la_AGE) @LT_NO_UNDEFINED@ INCLUDES = $(LIBCDIO_CFLAGS) FLAGS=@LIBCDIO_CFLAGS@ @UCDROM_H@ @TYPESIZES@ @CFLAGS@ OPT=$(FLAGS) DEBUG=$(FLAGS) -DCDDA_TEST ## test: ## $(MAKE) libcdio_cdda.a CFLAGS="$(DEBUG)" ## $(CC) $(DEBUG) -c test_interface.c ## $(LD) $(DEBUG) test_interface.o $(LDFLAGS) -o cdda_test $(LIBS) libcdio_cdda.a LIBS = $(LIBCDIO_LIBS) @COS_LIB@ ######################################################## # Things to version the symbols in the libraries ######################################################## # An explanation of the versioning problem from Nicolas Boullis and # the versioned symbol solution he uses below... # # Currently, libvcdinfo uses the cdio_open function from libcdio. # Let's imagine a program foobar that uses both the vcdinfo_open # function from libvcdinfo and the cdio_open function from libcdio. # Currently, libcdio has SONAME libcdio.so.0, libvcdinfo has SONAME # libvcdinfo.so.0 and requires libcdio.so.0, and foobar requires both # libvcdinfo.so.0 and libcdio.so.0. Everything looks fine. # # Now, for some reason, you decide to change the cdio_open function. # That's your right, but you have to bump the CURRENT version and (if I # understand it correctly, athough this is not that clear in libtool's # documentation) set the AGE to 0. Anyway, this bumps the SONAME, which is # sane since the interface changes incompatibly. # Now, you have a new libcdio with SONAME libcdio.so.1. But libvcdinfo and # foobar still require libcdio.so.0. Everything is still fine. # Now, after some minor changes, the author of foobar recompiles foobar. # Then, foobar now requires libvcdinfo.so.0 and libcdio.so.1. And foobar # now segfaults... # What is happening? When you run foobar, if brings both libvcdinfo.so.0 # and libcdio.so.1, but libvcdinfo.so.0 also brings libcdio.so.0. So you # have both libcdio.so.0 and libcdio.so.1 that bring their symbols to the # global namespace. Hence, you have to incompatible versions of the # cdio_open function in the name space. When foobar calls cdio_open, it # may choose the wrong function, and segfaults... # With versioned symbols, the cdio_open function from libcdio.so.0 may be # known as (something that looks like) cdio_open@@CDIO_0. An the cdio_open # function from libcdio.so.1 as cdio_open@@CDIO_1. Both versions of # libcdio would still be brought in by the most recent foobar, but foobar # (and libvcdinfo) know which versioned function to use and then use the # good one. # This is some simple versioning where every symbol is versioned with # something that looks like the SONAME of the library. More complex (and # better) versioning is possible; it is for example what is used by glibc. # But good complex versioning is something that requires much more # work... # The below is a impliments symbol versioning. First of all, I # compute MAJOR as CURENT - AGE; that is what is used within libtool # (at least on GNU/Linux systems) for the number in the SONAME. The # nm command gives the list of symbols known in each of the object # files that will be part of the shared library. And the sed command # extracts from this list those symbols that will be shared. (This sed # command comes from libtool.) libcdio_cdda_la_MAJOR = $(shell expr $(libcdio_cdda_la_CURRENT) - $(libcdio_cdda_la_AGE)) if BUILD_VERSIONED_LIBS libcdio_cdda_la_LDFLAGS = $(libcdio_cdda_la_ldflags) -Wl,--version-script=libcdio_cdda.la.ver libcdio_cdda_la_DEPENDENCIES = libcdio_cdda.la.ver libcdio_cdda.la.ver: $(libcdio_cdda_la_OBJECTS) $(srcdir)/libcdio_cdda.sym echo 'CDIO_CDDA_$(libcdio_cdda_la_MAJOR) { ' > $@ objs=`for obj in $(libcdio_cdda_la_OBJECTS); do sed -ne "s/^pic_object='\(.*\)'$$/\1/p" $$obj; done`; \ if test -n "$$objs" ; then \ nm $${objs} | sed -n -e 's/^.*[ ][ABCDGIRSTW][ABCDGIRSTW]*[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$$/\1/p' | sort -u | { first=true; while read symbol; do if grep -q "^$${symbol}\$$" $(srcdir)/libcdio_cdda.sym; then if test $$first = true; then echo " global:"; first=false; fi; echo " $${symbol};"; fi; done; } >> $@; \ nm $${objs} | sed -n -e 's/^.*[ ][ABCDGIRSTW][ABCDGIRSTW]*[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$$/\1/p' | sort -u | { first=true; while read symbol; do if grep -q "^$${symbol}\$$" $(srcdir)/libcdio_cdda.sym; then :; else if test $$first = true; then echo " local:"; first=false; fi; echo " $${symbol};"; fi; done; } >> $@; \ fi echo '};' >> $@ else libcdio_cdda_la_LDFLAGS = $(libcdio_cdda_la_ldflags) endif MOSTLYCLEANFILES = libcdio_cdda.la.ver libcdio-0.83/lib/cdda_interface/toc.c0000644000175000017500000001342211650125257014412 00000000000000/* $Id: toc.c,v 1.7 2008/04/16 17:00:40 karl Exp $ Copyright (C) 2005, 2008 Rocky Bernstein Copyright (C) 1998 Monty xiphmont@mit.edu derived from code (C) 1994-1996 Heiko Eissfeldt This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /****************************************************************** * Table of contents convenience functions ******************************************************************/ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include "low_interface.h" #include "utils.h" /*! Return the lsn for the start of track i_track */ lsn_t cdda_track_firstsector(cdrom_drive_t *d, track_t i_track) { if(!d->opened){ cderror(d,"400: Device not open\n"); return(-1); } if (i_track == 0) { if (d->disc_toc[0].dwStartSector == 0) { /* first track starts at lsn 0 -> no pre-gap */ cderror(d,"401: Invalid track number\n"); return(-1); } else { return 0; /* pre-gap of first track always starts at lba 0 */ } } if( i_track>d->tracks) { cderror(d,"401: Invalid track number\n"); return(-1); } { const track_t i_first_track = cdio_get_first_track_num(d->p_cdio); return(d->disc_toc[i_track-i_first_track].dwStartSector); } } /*! Get first lsn of the first audio track. -1 is returned on error. */ lsn_t cdda_disc_firstsector(cdrom_drive_t *d) { int i; if(!d->opened){ cderror(d,"400: Device not open\n"); return(-1); } /* look for an audio track */ for ( i=0; itracks; i++ ) if( cdda_track_audiop(d, i+1)==1 ) { if (i == 0) /* disc starts at lba 0 if first track is an audio track */ return 0; else return cdda_track_firstsector(d, i+1); } cderror(d,"403: No audio tracks on disc\n"); return(-1); } /*! Get last lsn of the track. The lsn is generally one less than the start of the next track. -1 is returned on error. */ lsn_t cdda_track_lastsector(cdrom_drive_t *d, track_t i_track) { if (!d->opened) { cderror(d,"400: Device not open\n"); return -1; } if (i_track == 0) { if (d->disc_toc[0].dwStartSector == 0) { /* first track starts at lba 0 -> no pre-gap */ cderror(d,"401: Invalid track number\n"); return(-1); } else { return d->disc_toc[0].dwStartSector-1; } } if ( i_track<1 || i_track>d->tracks ) { cderror(d,"401: Invalid track number\n"); return -1; } /* CD Extra have their first session ending at the last audio track */ if (d->cd_extra > 0 && i_track+1 <= d->tracks) { if (d->audio_last_sector >= d->disc_toc[i_track-1].dwStartSector && d->audio_last_sector < d->disc_toc[i_track].dwStartSector) { return d->audio_last_sector; } } /* Safe, we've always the leadout at disc_toc[tracks] */ return(d->disc_toc[i_track].dwStartSector-1); } /*! Get last lsn of the last audio track. The last lssn generally one less than the start of the next track after the audio track. -1 is returned on error. */ lsn_t cdda_disc_lastsector(cdrom_drive_t *d) { if (!d->opened) { cderror(d,"400: Device not open\n"); return -1; } else { /* look for an audio track */ const track_t i_first_track = cdio_get_first_track_num(d->p_cdio); track_t i = cdio_get_last_track_num(d->p_cdio); for ( ; i >= i_first_track; i-- ) if ( cdda_track_audiop(d,i) ) return (cdda_track_lastsector(d,i)); } cderror(d,"403: No audio tracks on disc\n"); return -1; } /*! Return the number of tracks on the CD. */ track_t cdda_tracks(cdrom_drive_t *d) { if (!d->opened){ cderror(d,"400: Device not open\n"); return -1; } return(d->tracks); } /*! Return the track containing the given LSN. If the LSN is before the first track (in the pregap), 0 is returned. If there was an error or the LSN after the LEADOUT (beyond the end of the CD), then CDIO_INVALID_TRACK is returned. */ int cdda_sector_gettrack(cdrom_drive_t *d, lsn_t lsn) { if (!d->opened) { cderror(d,"400: Device not open\n"); return -1; } else { if (lsn < d->disc_toc[0].dwStartSector) return 0; /* We're in the pre-gap of first track */ return cdio_get_track(d->p_cdio, lsn); } } /*! Return the number of channels in track: 2 or 4; -2 if not implemented or -1 for error. Not meaningful if track is not an audio track. */ int cdda_track_channels(cdrom_drive_t *d, track_t i_track) { return(cdio_get_track_channels(d->p_cdio, i_track)); } /*! Return 1 is track is an audio track, 0 otherwise. */ int cdda_track_audiop(cdrom_drive_t *d, track_t i_track) { track_format_t track_format = cdio_get_track_format(d->p_cdio, i_track); return TRACK_FORMAT_AUDIO == track_format ? 1 : 0; } /*! Return 1 is track is an audio track, 0 otherwise. */ int cdda_track_copyp(cdrom_drive_t *d, track_t i_track) { track_flag_t track_flag = cdio_get_track_copy_permit(d->p_cdio, i_track); return CDIO_TRACK_FLAG_TRUE == track_flag ? 1 : 0; } /*! Return 1 is audio track has linear preemphasis set, 0 otherwise. Only makes sense for audio tracks. */ int cdda_track_preemp(cdrom_drive_t *d, track_t i_track) { track_flag_t track_flag = cdio_get_track_preemphasis(d->p_cdio, i_track); return CDIO_TRACK_FLAG_TRUE == track_flag ? 1 : 0; } libcdio-0.83/lib/cdda_interface/scan_devices.c0000644000175000017500000002231211570772032016251 00000000000000/* $Id: scan_devices.c,v 1.33 2008/06/16 19:45:44 flameeyes Exp $ Copyright (C) 2004, 2005, 2007, 2008, 2009 Rocky Bernstein Copyright (C) 1998 Monty xiphmont@mit.edu This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /****************************************************************** * * Autoscan for or verify presence of a CD-ROM device * ******************************************************************/ #include "common_interface.h" #include "low_interface.h" #include "utils.h" #include "cdio/mmc.h" #include "cdio/util.h" #include #include #ifdef HAVE_PWD_H #include #endif #ifdef HAVE_SYS_STAT_H #include #endif #ifndef PATH_MAX #define PATH_MAX 4096 #endif #define MAX_DEV_LEN 20 /* Safe because strings only come from below */ /* must be absolute paths! */ static const char scsi_cdrom_prefixes[][16]={ "/dev/scd", "/dev/sr", ""}; static const char scsi_generic_prefixes[][16]={ "/dev/sg", ""}; static const char devfs_scsi_test[]="/dev/scsi/"; static const char devfs_scsi_cd[]="cd"; static const char devfs_scsi_generic[]="generic"; static const char cdrom_devices[][32]={ "/dev/cdrom", "/dev/cdroms/cdrom?", "/dev/hd?", "/dev/sg?", "/dev/cdu31a", "/dev/cdu535", "/dev/sbpcd", "/dev/sbpcd?", "/dev/sonycd", "/dev/mcd", "/dev/sjcd", /* "/dev/aztcd", timeout is too long */ "/dev/cm206cd", "/dev/gscd", "/dev/optcd", ""}; static cdrom_drive_t * cdda_identify_device_cdio(CdIo_t *p_cdio, const char *psz_device, int messagedest, char **ppsz_messages); /* Functions here look for a cdrom drive; full init of a drive type happens in interface.c */ cdrom_drive_t * cdio_cddap_find_a_cdrom(int messagedest, char **ppsz_messages){ /* Brute force... */ int i=0; cdrom_drive_t *d; while(*cdrom_devices[i]!='\0'){ /* is it a name or a pattern? */ char *pos; if((pos=strchr(cdrom_devices[i],'?'))){ int j; /* try first eight of each device */ for(j=0;j<4;j++){ char *buffer=strdup(cdrom_devices[i]); /* number, then letter */ buffer[pos-(cdrom_devices[i])]=j+48; if((d=cdda_identify(buffer, messagedest, ppsz_messages))) return(d); idmessage(messagedest, ppsz_messages, "", NULL); buffer[pos-(cdrom_devices[i])]=j+97; if((d=cdda_identify(buffer, messagedest, ppsz_messages))) return(d); idmessage(messagedest, ppsz_messages, "", NULL); free(buffer); } }else{ /* Name. Go for it. */ if((d=cdda_identify(cdrom_devices[i], messagedest, ppsz_messages))) return(d); idmessage(messagedest, ppsz_messages, "", NULL); } i++; } { #if defined(HAVE_GETPWUID) && defined(HAVE_GETEUID) struct passwd *temp; temp=getpwuid(geteuid()); idmessage(messagedest, ppsz_messages, "\n\nNo cdrom drives accessible to %s found.\n", temp->pw_name); #else idmessage(messagedest, ppsz_messages, "\n\nNo cdrom drives accessible found.\n", NULL); #endif } return(NULL); } #ifdef DEVICE_IN_FILESYSTEM static char * test_resolve_symlink(const char *file, int messagedest, char **ppsz_messages) { char resolved[PATH_MAX]; struct stat st; if (lstat(file,&st)){ idperror(messagedest, ppsz_messages, "\t\tCould not stat %s",file); return(NULL); } if (cdio_realpath(file,resolved)) return(strdup(resolved)); idperror(messagedest, ppsz_messages, "\t\tCould not resolve symlink %s", file); return(NULL); } #endif /** Returns a paranoia CD-ROM drive object with a CD-DA in it or NULL if there was an error. @see cdio_cddap_identify_cdio */ cdrom_drive_t * cdio_cddap_identify(const char *psz_dev, int messagedest, char **ppsz_messages) { CdIo_t *p_cdio = NULL; if (psz_dev) idmessage(messagedest, ppsz_messages, "Checking %s for cdrom...", psz_dev); else idmessage(messagedest, ppsz_messages, "Checking for cdrom...", NULL); #ifdef DEVICE_IN_FILESYSTEM if (psz_dev) { char *psz_device = test_resolve_symlink(psz_dev, messagedest, ppsz_messages); if ( psz_device ) { cdrom_drive_t *d=NULL; p_cdio = cdio_open(psz_device, DRIVER_UNKNOWN); d = cdda_identify_device_cdio(p_cdio, psz_device, messagedest, ppsz_messages); free(psz_device); return d; } } #endif p_cdio = cdio_open(psz_dev, DRIVER_UNKNOWN); if (p_cdio) { if (!psz_dev) { psz_dev = cdio_get_arg(p_cdio, "source"); } return cdda_identify_device_cdio(p_cdio, psz_dev, messagedest, ppsz_messages); } return NULL; } /** Returns a paranoia CD-ROM drive object with a CD-DA in it or NULL if there was an error. In contrast to cdio_cddap_identify, we start out with an initialized p_cdio object. For example you may have used that for other purposes such as to get CDDB/CD-Text information. @see cdio_cddap_identify */ cdrom_drive_t * cdio_cddap_identify_cdio(CdIo_t *p_cdio, int messagedest, char **ppsz_messages) { if (!p_cdio) return NULL; { const char *psz_device = cdio_get_arg(p_cdio, "source"); idmessage(messagedest, ppsz_messages, "Checking %s for cdrom...", psz_device); return cdda_identify_device_cdio(p_cdio, psz_device, messagedest, ppsz_messages); } } static cdrom_drive_t * cdda_identify_device_cdio(CdIo_t *p_cdio, const char *psz_device, int messagedest, char **ppsz_messages) { cdrom_drive_t *d=NULL; int drive_type = 0; char *description=NULL; #ifdef HAVE_LINUX_MAJOR_H struct stat st; #endif if (!p_cdio) { idperror(messagedest, ppsz_messages, "\t\tUnable to open %s", psz_device); return NULL; } #ifdef HAVE_LINUX_MAJOR_H if ( 0 == stat(psz_device, &st) ) { if (S_ISCHR(st.st_mode) || S_ISBLK(st.st_mode)) { drive_type=(int)(st.st_rdev>>8); switch (drive_type) { case IDE0_MAJOR: case IDE1_MAJOR: case IDE2_MAJOR: case IDE3_MAJOR: /* Yay, ATAPI... */ description=strdup("ATAPI compatible "); break; case CDU31A_CDROM_MAJOR: /* major indicates this is a cdrom; no ping necessary. */ description=strdup("Sony CDU31A or compatible"); break; case CDU535_CDROM_MAJOR: /* major indicates this is a cdrom; no ping necessary. */ description=strdup("Sony CDU535 or compatible"); break; case MATSUSHITA_CDROM_MAJOR: case MATSUSHITA_CDROM2_MAJOR: case MATSUSHITA_CDROM3_MAJOR: case MATSUSHITA_CDROM4_MAJOR: /* major indicates this is a cdrom; no ping necessary. */ description=strdup("non-ATAPI IDE-style Matsushita/Panasonic CR-5xx or compatible"); break; case SANYO_CDROM_MAJOR: description=strdup("Sanyo proprietary or compatible: NOT CDDA CAPABLE"); break; case MITSUMI_CDROM_MAJOR: case MITSUMI_X_CDROM_MAJOR: description=strdup("Mitsumi proprietary or compatible: NOT CDDA CAPABLE"); break; case OPTICS_CDROM_MAJOR: description=strdup("Optics Dolphin or compatible: NOT CDDA CAPABLE"); break; case AZTECH_CDROM_MAJOR: description=strdup("Aztech proprietary or compatible: NOT CDDA CAPABLE"); break; case GOLDSTAR_CDROM_MAJOR: description=strdup("Goldstar proprietary: NOT CDDA CAPABLE"); break; case CM206_CDROM_MAJOR: description=strdup("Philips/LMS CM206 proprietary: NOT CDDA CAPABLE"); break; case SCSI_CDROM_MAJOR: case SCSI_GENERIC_MAJOR: /* Nope nope nope */ description=strdup("SCSI CD-ROM"); break; default: /* What the hell is this? */ idmessage(messagedest, ppsz_messages, "\t\t%s is not a cooked ioctl CDROM.", psz_device); return(NULL); } } } #endif /*HAVE_LINUX_MAJOR_H*/ /* Minimum init */ d=calloc(1, sizeof(cdrom_drive_t)); d->p_cdio = p_cdio; d->cdda_device_name = strdup(psz_device); d->drive_type = drive_type; d->bigendianp = -1; /* We don't know yet... */ d->nsectors = -1; /* We don't know yet... */ d->messagedest = messagedest; d->b_swap_bytes = true; { cdio_hwinfo_t hw_info = { "UNKNOWN", "Unknown model", "????" }; if ( mmc_get_hwinfo( p_cdio, &hw_info ) ) { unsigned int i_len = strlen(hw_info.psz_vendor) + strlen(hw_info.psz_model) + strlen(hw_info.psz_revision) + 5; if (description) { i_len += strlen(description); d->drive_model=malloc( i_len ); snprintf( d->drive_model, i_len, "%s %s %s %s", hw_info.psz_vendor, hw_info.psz_model, hw_info.psz_revision, description ); } else { d->drive_model=malloc( i_len ); snprintf( d->drive_model, i_len, "%s %s %s", hw_info.psz_vendor, hw_info.psz_model, hw_info.psz_revision ); } idmessage(messagedest, ppsz_messages, "\t\tCDROM sensed: %s\n", d->drive_model); } } if (description) free(description); return(d); } libcdio-0.83/lib/cdda_interface/common_interface.h0000644000175000017500000000325711650125217017143 00000000000000/* Copyright (C) 2004, 2005, 2008, 2009, 2010, 2011 Rocky Bernstein Copyright (C) 1998 Monty xiphmont@mit.edu This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef _CDDA_COMMON_INTERFACE_H_ #define _CDDA_COMMON_INTERFACE_H_ #if defined(HAVE_CONFIG_H) && !defined(__CDIO_CONFIG_H__) # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include "low_interface.h" #if defined(HAVE_LSTAT) && !defined(HAVE_WIN32_CDROM) && !defined(HAVE_OS2_CDROM) /* Define this if the CD-ROM device is a file in the filesystem that can be lstat'd */ #define DEVICE_IN_FILESYSTEM 1 #else #undef DEVICE_IN_FILESYSTEM #endif /** Test for presence of a cdrom by pinging with the 'CDROMVOLREAD' ioctl() */ extern int ioctl_ping_cdrom(int fd); extern char *atapi_drive_info(int fd); /*! Here we fix up a couple of things that will never happen. yeah, right. rocky OMITTED FOR NOW: The multisession stuff is from Hannu's code; it assumes it knows the leadout/leadin size. */ extern int FixupTOC(cdrom_drive_t *d, track_t tracks); #endif /*_CDDA_COMMON_INTERFACE_H_*/ libcdio-0.83/lib/cdda_interface/utils.c0000644000175000017500000000726011650125336014766 00000000000000/* Copyright (C) 2004, 2008, 2010, 2011 Rocky Bernstein Copyright (C) 1998 Monty xiphmont@mit.edu This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include "common_interface.h" #include "utils.h" void cderror(cdrom_drive_t *d,const char *s) { ssize_t bytes_ret; if(s && d){ switch(d->errordest){ case CDDA_MESSAGE_PRINTIT: bytes_ret = write(STDERR_FILENO, s, strlen(s)); if (strlen(s) != bytes_ret) break; case CDDA_MESSAGE_LOGIT: d->errorbuf=catstring(d->errorbuf,s); break; case CDDA_MESSAGE_FORGETIT: default: ; } } } void cdmessage(cdrom_drive_t *d, const char *s) { ssize_t bytes_ret; if(s && d){ switch(d->messagedest){ case CDDA_MESSAGE_PRINTIT: bytes_ret = write(STDERR_FILENO, s, strlen(s)); break; case CDDA_MESSAGE_LOGIT: d->messagebuf=catstring(d->messagebuf,s); break; case CDDA_MESSAGE_FORGETIT: default: ; } } } void idperror(int messagedest,char **messages,const char *f, const char *s) { char *buffer; int malloced=0; if(!f) buffer=(char *)s; else if(!s) buffer=(char *)f; else{ buffer=malloc(strlen(f)+strlen(s)+9); sprintf(buffer,f,s); malloced=1; } if(buffer){ ssize_t bytes_ret; switch(messagedest){ case CDDA_MESSAGE_PRINTIT: bytes_ret = write(STDERR_FILENO,buffer,strlen(buffer)); if(errno){ bytes_ret = write(STDERR_FILENO,": ",2); bytes_ret = write(STDERR_FILENO,strerror(errno),strlen(strerror(errno))); bytes_ret = write(STDERR_FILENO,"\n",1); } break; case CDDA_MESSAGE_LOGIT: if(messages){ *messages=catstring(*messages,buffer); if(errno){ *messages=catstring(*messages,": "); *messages=catstring(*messages,strerror(errno)); *messages=catstring(*messages,"\n"); } } break; case CDDA_MESSAGE_FORGETIT: default: ; } } if(malloced)free(buffer); } void idmessage(int messagedest,char **messages,const char *f, const char *s) { char *buffer; int malloced=0; if(!f) buffer=(char *)s; else if(!s) buffer=(char *)f; else{ const unsigned int i_buffer=strlen(f)+strlen(s)+10; buffer=malloc(i_buffer); sprintf(buffer,f,s); strncat(buffer,"\n", i_buffer); malloced=1; } if(buffer) { ssize_t bytes_ret; switch(messagedest){ case CDDA_MESSAGE_PRINTIT: bytes_ret = write(STDERR_FILENO,buffer,strlen(buffer)); if(!malloced) bytes_ret = write(STDERR_FILENO,"\n",1); break; case CDDA_MESSAGE_LOGIT: if(messages){ *messages=catstring(*messages,buffer); if(!malloced)*messages=catstring(*messages,"\n"); } break; case CDDA_MESSAGE_FORGETIT: default: ; } } if(malloced)free(buffer); } char * catstring(char *buff, const char *s) { if (s) { const unsigned int add_len = strlen(s) + 9; if(buff) { buff = realloc(buff, strlen(buff) + add_len); } else { buff=calloc(add_len, 1); } strncat(buff, s, add_len); } return(buff); } libcdio-0.83/lib/cdda_interface/utils.h0000644000175000017500000000361711114145233014766 00000000000000/* $Id: utils.h,v 1.8 2008/04/16 17:00:41 karl Exp $ Copyright (C) 2004, 2005, 2008 Rocky Bernstein Copyright (C) 1998 Monty xiphmont@mit.edu This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include #include /* I wonder how many alignment issues this is gonna trip in the future... it shouldn't trip any... I guess we'll find out :) */ static inline int bigendianp(void) { int test=1; char *hack=(char *)(&test); if(hack[0])return(0); return(1); } extern char *catstring(char *buff, const char *s); /*#if BYTE_ORDER == LITTLE_ENDIAN*/ #ifndef WORDS_BIGENDIAN static inline int16_t be16_to_cpu(int16_t x){ return(UINT16_SWAP_LE_BE_C(x)); } static inline int16_t le16_to_cpu(int16_t x){ return(x); } #else static inline int16_t be16_to_cpu(int16_t x){ return(x); } static inline int16_t le16_to_cpu(int16_t x){ return(UINT16_SWAP_LE_BE_C(x)); } #endif static inline int16_t cpu_to_be16(int16_t x){ return(be16_to_cpu(x)); } static inline int16_t cpu_to_le16(int16_t x){ return(le16_to_cpu(x)); } void cderror(cdrom_drive_t *d, const char *s); void cdmessage(cdrom_drive_t *d,const char *s); void idperror(int messagedest, char **messages, const char *f, const char *s); void idmessage(int messagedest, char **messages, const char *f, const char *s); libcdio-0.83/lib/cdda_interface/smallft.c0000644000175000017500000002446711271716114015277 00000000000000/* $Id: smallft.c,v 1.2 2008/04/16 17:00:40 karl Exp $ Copyright (C) 2008 Rocky Bernstein Copyright (C) 1998 Monty xiphmont@mit.edu This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /****************************************************************** * FFT implementation from OggSquish, minus cosine transforms, * minus all but radix 2/4 case * * See OggSquish or NetLib for the version that can do other than just * power-of-two sized vectors. ******************************************************************/ #include #include #include "smallft.h" static void drfti1(int n, float *wa, int *ifac){ static int ntryh[4] = { 4,2,3,5 }; static float tpi = 6.28318530717958647692528676655900577; float arg,argh,argld,fi; int ntry=0,i,j=-1; int k1, l1, l2, ib; int ld, ii, ip, is, nq, nr; int ido, ipm, nfm1; int nl=n; int nf=0; L101: j++; if (j < 4) ntry=ntryh[j]; else ntry+=2; L104: nq=nl/ntry; nr=nl-ntry*nq; if (nr!=0) goto L101; nf++; ifac[nf+1]=ntry; nl=nq; if(ntry!=2)goto L107; if(nf==1)goto L107; for (i=1;i Original interface.c Copyright (C) 1994-1997 Eissfeldt heiko@colossus.escape.de Current blenderization Copyright (C) 1998-1999 Monty xiphmont@mit.edu Copyright (C) 1998 Monty xiphmont@mit.edu This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** CD-ROM code which interfaces between user-level visible CD paranoia routines and libddio routines. (There is some GNU/Linux-specific code here too that should probably be removed. **/ #include "config.h" #include "common_interface.h" #include "low_interface.h" #include "utils.h" /** The below variables are trickery to force the above enum symbol values to be recorded in debug symbol tables. They are used to allow one to refer to the enumeration value names in the typedefs above in a debugger and debugger expressions */ paranoia_jitter_t debug_paranoia_jitter; paranoia_cdda_enums_t debug_paranoia_cdda_enums; /*! reads TOC via libcdio and returns the number of tracks in the disc. 0 is returned if there was an error. */ static int cddap_readtoc (cdrom_drive_t *d) { int i; track_t i_track; /* Save TOC Entries */ d->tracks = cdio_get_num_tracks(d->p_cdio) ; if (CDIO_INVALID_TRACK == d->tracks) return 0; i_track = cdio_get_first_track_num(d->p_cdio); for ( i=0; i < d->tracks; i++) { d->disc_toc[i].bTrack = i_track; d->disc_toc[i].dwStartSector = cdio_get_track_lsn(d->p_cdio, i_track); i_track++; } d->disc_toc[i].bTrack = i_track; d->disc_toc[i].dwStartSector = cdio_get_track_lsn(d->p_cdio, CDIO_CDROM_LEADOUT_TRACK); d->cd_extra=FixupTOC(d, i_track); return --i_track; /* without lead-out */ } /* Set operating speed */ static int cddap_setspeed(cdrom_drive_t *d, int i_speed) { return cdio_set_speed(d->p_cdio, i_speed); } /* read 'i_sector' adjacent audio sectors * into buffer '*p' beginning at sector 'begin' */ static long int read_blocks (cdrom_drive_t *d, void *p, lsn_t begin, long i_sectors) { int retry_count = 0; int err; char *buffer=(char *)p; do { err = cdio_read_audio_sectors( d->p_cdio, buffer, begin, i_sectors); if ( DRIVER_OP_SUCCESS != err ) { if (!d->error_retry) return -7; if (i_sectors==1) { /* *Could* be I/O or media error. I think. If we're at 30 retries, we better skip this unhappy little sector. */ if (retry_count>MAX_RETRIES-1) { char b[256]; snprintf(b, sizeof(b), "010: Unable to access sector %ld: skipping...\n", (long int) begin); cderror(d, b); return -10; } } if(retry_count>4) if(i_sectors>1) i_sectors=i_sectors*3/4; retry_count++; if (retry_count>MAX_RETRIES) { cderror(d,"007: Unknown, unrecoverable error reading data\n"); return(-7); } } else break; } while (err); return(i_sectors); } typedef enum { JITTER_NONE = 0, JITTER_SMALL= 1, JITTER_LARGE= 2, JITTER_MASSIVE=3 } jitter_baddness_t; /* read 'i_sector' adjacent audio sectors * into buffer '*p' beginning at sector 'begin' */ static long int jitter_read (cdrom_drive_t *d, void *p, lsn_t begin, long i_sectors, jitter_baddness_t jitter_badness) { static int i_jitter=0; int jitter_flag; long i_sectors_orig = i_sectors; long i_jitter_offset = 0; char *p_buf=malloc(CDIO_CD_FRAMESIZE_RAW*(i_sectors+1)); if (d->i_test_flags & CDDA_TEST_ALWAYS_JITTER) jitter_flag = 1; else #ifdef HAVE_DRAND48 jitter_flag = (drand48() > .9) ? 1 : 0; #else jitter_flag = (rand() > .9) ? 1 : 0; #endif if (jitter_flag) { int i_coeff = 0; int i_jitter_sectors = 0; switch(jitter_badness) { case JITTER_SMALL : i_coeff = 4; break; case JITTER_LARGE : i_coeff = 32; break; case JITTER_MASSIVE: i_coeff = 128; break; case JITTER_NONE : default : ; } #ifdef HAVE_DRAND48 i_jitter = i_coeff * (int)((drand48()-.5)*CDIO_CD_FRAMESIZE_RAW/8); #else i_jitter = i_coeff * (int)((rand()-.5)*CDIO_CD_FRAMESIZE_RAW/8); #endif /* We may need to add another sector to compensate for the bytes that will be dropped off when jittering, and the begin location may be a little different. */ i_jitter_sectors = i_jitter / CDIO_CD_FRAMESIZE_RAW; if (i_jitter >= 0) i_jitter_offset = i_jitter % CDIO_CD_FRAMESIZE_RAW; else { i_jitter_offset = CDIO_CD_FRAMESIZE_RAW - (-i_jitter % CDIO_CD_FRAMESIZE_RAW); i_jitter_sectors--; } if (begin + i_jitter_sectors > 0) { #if !TRACE_PARANOIA char buffer[256]; sprintf(buffer, "jittering by %d, offset %ld\n", i_jitter, i_jitter_offset); cdmessage(d,buffer); #endif begin += i_jitter_sectors; i_sectors ++; } else i_jitter_offset = 0; } i_sectors = read_blocks(d, p_buf, begin, i_sectors); if (i_sectors < 0) return i_sectors; if (i_sectors < i_sectors_orig) /* Had to reduce # of sectors due to read errors. So give full amount, with no jittering. */ memcpy(p, p_buf, i_sectors*CDIO_CD_FRAMESIZE_RAW); else { /* Got full amount, but now adjust size for jittering. */ memcpy(p, p_buf+i_jitter_offset, i_sectors_orig*CDIO_CD_FRAMESIZE_RAW); i_sectors = i_sectors_orig; } free(p_buf); return(i_sectors); } /* read 'i_sector' adjacent audio sectors * into buffer '*p' beginning at sector 'begin' */ static long int cddap_read (cdrom_drive_t *d, void *p, lsn_t begin, long i_sectors) { jitter_baddness_t jitter_badness = d->i_test_flags & 0x3; /* read d->nsectors at a time, max. */ i_sectors = ( i_sectors > d->nsectors && d->nsectors > 0 ) ? d->nsectors : i_sectors; /* If we are testing under-run correction, we will deliberately set what we read a frame short. */ if (d->i_test_flags & CDDA_TEST_UNDERRUN ) i_sectors--; if (jitter_badness) { return jitter_read(d, p, begin, i_sectors, jitter_badness); } else return read_blocks(d, p, begin, i_sectors); } static int verify_read_command(cdrom_drive_t *d) { int i; int16_t *buff=malloc(CDIO_CD_FRAMESIZE_RAW); int audioflag=0; int i_test_flags = d->i_test_flags; d->i_test_flags = 0; cdmessage(d,"Verifying drive can read CDDA...\n"); d->enable_cdda(d,1); for(i=1;i<=d->tracks;i++){ if(cdda_track_audiop(d,i)==1){ long firstsector=cdda_track_firstsector(d,i); long lastsector=cdda_track_lastsector(d,i); long sector=(firstsector+lastsector)>>1; audioflag=1; if(d->read_audio(d,buff,sector,1)>0){ cdmessage(d,"\tExpected command set reads OK.\n"); d->enable_cdda(d,0); free(buff); d->i_test_flags = i_test_flags; return(0); } } } d->enable_cdda(d,0); if(!audioflag){ cdmessage(d,"\tCould not find any audio tracks on this disk.\n"); free(buff); return(-403); } cdmessage(d,"\n\tUnable to read any data; " "drive probably not CDDA capable.\n"); cderror(d,"006: Could not read any data from drive\n"); free(buff); return(-6); } #include "drive_exceptions.h" #ifdef HAVE_LINUX_MAJOR_H static void check_exceptions(cdrom_drive_t *d, const exception_t *list) { int i=0; while(list[i].model){ if(!strncmp(list[i].model,d->drive_model,strlen(list[i].model))){ if(list[i].bigendianp!=-1)d->bigendianp=list[i].bigendianp; return; } i++; } } #endif /* HAVE_LINUX_MAJOR_H */ /* set function pointers to use the ioctl routines */ int cddap_init_drive (cdrom_drive_t *d) { int ret; #if HAVE_LINUX_MAJOR_H switch(d->drive_type){ case MATSUSHITA_CDROM_MAJOR: /* sbpcd 1 */ case MATSUSHITA_CDROM2_MAJOR: /* sbpcd 2 */ case MATSUSHITA_CDROM3_MAJOR: /* sbpcd 3 */ case MATSUSHITA_CDROM4_MAJOR: /* sbpcd 4 */ /* don't make the buffer too big; this sucker don't preempt */ cdmessage(d,"Attempting to set sbpcd buffer size...\n"); d->nsectors=8; #if BUFSIZE_DETERMINATION_FIXED while(1){ /* this ioctl returns zero on error; exactly wrong, but that's what it does. */ if (ioctl(d->ioctl_fd, CDROMAUDIOBUFSIZ, d->nsectors)==0) { d->nsectors>>=1; if(d->nsectors==0){ char buffer[256]; d->nsectors=8; sprintf(buffer,"\tTrouble setting buffer size. Defaulting to %d sectors.\n", d->nsectors); cdmessage(d,buffer); break; /* Oh, well. Try to read anyway.*/ } } else { char buffer[256]; sprintf(buffer,"\tSetting read block size at %d sectors (%ld bytes).\n", d->nsectors,(long)d->nsectors*CDIO_CD_FRAMESIZE_RAW); cdmessage(d,buffer); break; } } #endif /* BUFSIZE_DETERMINATION_FIXED */ break; case IDE0_MAJOR: case IDE1_MAJOR: case IDE2_MAJOR: case IDE3_MAJOR: d->nsectors=8; /* it's a define in the linux kernel; we have no way of determining other than this guess tho */ d->bigendianp=0; d->is_atapi=1; check_exceptions(d, atapi_list); break; default: d->nsectors=25; /* The max for SCSI MMC2 */ } #else { char buffer[256]; d->nsectors = 8; sprintf(buffer,"\tSetting read block size at %d sectors (%ld bytes).\n", d->nsectors,(long)d->nsectors*CDIO_CD_FRAMESIZE_RAW); cdmessage(d,buffer); } #endif /*HAVE_LINUX_MAJOR_H*/ d->enable_cdda = dummy_exception; d->set_speed = cddap_setspeed; d->read_toc = cddap_readtoc; d->read_audio = cddap_read; ret = d->tracks = d->read_toc(d); if(d->tracks<1) return(ret); d->opened=1; if( (ret=verify_read_command(d)) ) return(ret); d->error_retry=1; return(0); } libcdio-0.83/lib/cdda_interface/drive_exceptions.c0000644000175000017500000000704011650125375017177 00000000000000/* Copyright (C) 2004, 2008, 2011 Rocky Bernstein Copyright (C) 1998 Monty xiphmont@mit.edu This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include "common_interface.h" #include "drive_exceptions.h" int dummy_exception (cdrom_drive_t *d,int Switch) { return(0); } #if HAVE_LINUX_MAJOR_H /* list of drives that affect autosensing in ATAPI specific portions of code (force drives to detect as ATAPI or SCSI, force ATAPI read command */ const exception_t atapi_list[]={ {"SAMSUNG SCR-830 REV 2.09 2.09 ", 1, 0, dummy_exception,scsi_read_mmc2,0}, {"Memorex CR-622", 1, 0, dummy_exception, NULL,0}, {"SONY CD-ROM CDU-561", 0, 0, dummy_exception, NULL,0}, {"Chinon CD-ROM CDS-525", 0, 0, dummy_exception, NULL,0}, {NULL,0,0,NULL,NULL,0}}; #endif /*HAVE_LINUX_MAJOR_H*/ /* list of drives that affect MMC default settings */ #ifdef NEED_MMC_LIST static exception_t mmc_list[]={ {"SAMSUNG SCR-830 REV 2.09 2.09 ", 1, 0, dummy_exception,scsi_read_mmc2,0}, {"Memorex CR-622", 1, 0, dummy_exception, NULL,0}, {"SONY CD-ROM CDU-561", 0, 0, dummy_exception, NULL,0}, {"Chinon CD-ROM CDS-525", 0, 0, dummy_exception, NULL,0}, {"KENWOOD CD-ROM UCR", -1, 0, NULL,scsi_read_D8, 0}, {NULL,0,0,NULL,NULL,0}}; #endif /*NEED_MMC_LIST*/ /* list of drives that affect SCSI default settings */ #ifdef NEED_SCSI_LIST static exception_t scsi_list[]={ {"TOSHIBA", -1,0x82,scsi_enable_cdda,scsi_read_28, 0}, {"IBM", -1,0x82,scsi_enable_cdda,scsi_read_28, 0}, {"DEC", -1,0x82,scsi_enable_cdda,scsi_read_28, 0}, {"IMS", -1, 0,scsi_enable_cdda,scsi_read_28, 1}, {"KODAK", -1, 0,scsi_enable_cdda,scsi_read_28, 1}, {"RICOH", -1, 0,scsi_enable_cdda,scsi_read_28, 1}, {"HP", -1, 0,scsi_enable_cdda,scsi_read_28, 1}, {"PHILIPS", -1, 0,scsi_enable_cdda,scsi_read_28, 1}, {"PLASMON", -1, 0,scsi_enable_cdda,scsi_read_28, 1}, {"GRUNDIG CDR100IPW", -1, 0,scsi_enable_cdda,scsi_read_28, 1}, {"MITSUMI CD-R ", -1, 0,scsi_enable_cdda,scsi_read_28, 1}, {"KENWOOD CD-ROM UCR", -1, 0, NULL,scsi_read_D8, 0}, {"YAMAHA", -1, 0,scsi_enable_cdda, NULL, 0}, {"PLEXTOR", -1, 0, NULL, NULL, 0}, {"SONY", -1, 0, NULL, NULL, 0}, {"NEC", -1, 0, NULL,scsi_read_D4_10,0}, /* the 7501 locks up if hit with the 10 byte version from the autoprobe first */ {"MATSHITA CD-R CW-7501", -1, 0, NULL,scsi_read_D4_12,-1}, {NULL,0,0,NULL,NULL,0}}; #endif /* NEED_SCSI_LIST*/ libcdio-0.83/lib/cdda_interface/smallft.h0000644000175000017500000000232511114145233015263 00000000000000/* $Id: smallft.h,v 1.2 2008/04/16 17:00:40 karl Exp $ Copyright (C) 2008 Rocky Bernstein Copyright (C) 1998 Monty xiphmont@mit.edu This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /****************************************************************** * FFT implementation from OggSquish, minus cosine transforms. * Only convenience functions exposed ******************************************************************/ extern void fft_forward(int n, float *buf, float *trigcache, int *sp); extern void fft_backward(int n, float *buf, float *trigcache, int *sp); extern void fft_i(int n, float **trigcache, int **splitcache); libcdio-0.83/lib/cdda_interface/common_interface.c0000644000175000017500000001762311650125163017140 00000000000000/* Copyright (C) 2004, 2005, 2007, 2008, 2010, 2011 Rocky Bernstein Copyright (C) 1998, 2002 Monty monty@xiph.org This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /****************************************************************** * * CDROM communication common to all interface methods is done here * (mostly ioctl stuff, but not ioctls specific to the 'cooked' * interface) * ******************************************************************/ /* common_interface.h has to come first else _FILE_OFFSET_BITS are redefined in say opensolaris. */ #include "common_interface.h" #include #include "utils.h" #include "smallft.h" /* Variables to hold debugger-helping enumerations */ enum paranoia_cdda_enums; enum paranoia_jitter_enums; /*! Determine Endian-ness of the CD-drive based on reading data from it. Some drives return audio data Big Endian while some (most) return data Little Endian. Drives known to return data bigendian are SCSI drives from Kodak, Ricoh, HP, Philips, Plasmon, Grundig CDR100IPW, and Mitsumi CD-R. ATAPI and MMC drives are little endian. rocky: As someone who didn't write the code, I have to say this is nothing less than brilliant. An FFT is done both ways and the the transform is looked at to see which has data in the FFT (or audible) portion. (Or so that's how I understand it.) @return 1 if big-endian, 0 if little-endian, -1 if we couldn't figure things out or some error. */ int data_bigendianp(cdrom_drive_t *d) { float lsb_votes=0; float msb_votes=0; int i,checked; int endiancache=d->bigendianp; float *a=calloc(1024,sizeof(float)); float *b=calloc(1024,sizeof(float)); long readsectors=5; int16_t *buff=malloc(readsectors*CDIO_CD_FRAMESIZE_RAW*sizeof(int16_t)); memset(buff, 0, readsectors*CDIO_CD_FRAMESIZE_RAW*sizeof(int16_t)); /* look at the starts of the audio tracks */ /* if real silence, tool in until some static is found */ /* Force no swap for now */ d->bigendianp=-1; cdmessage(d,"\nAttempting to determine drive endianness from data..."); d->enable_cdda(d,1); for(i=0,checked=0;itracks;i++){ float lsb_energy=0; float msb_energy=0; if(cdda_track_audiop(d,i+1)==1){ long firstsector=cdda_track_firstsector(d,i+1); long lastsector=cdda_track_lastsector(d,i+1); int zeroflag=-1; long beginsec=0; /* find a block with nonzero data */ while(firstsector+readsectors<=lastsector){ int j; if(d->read_audio(d,buff,firstsector,readsectors)>0){ /* Avoid scanning through jitter at the edges */ for(beginsec=0;beginsecenable_cdda(d,0); free(a); free(b); free(buff); return(-1); } } beginsec*=CDIO_CD_FRAMESIZE_RAW/2; /* un-interleave for an FFT */ if(!zeroflag){ int j; for(j=0;j<128;j++) a[j] = le16_to_cpu(buff[j*2+beginsec+460]); for(j=0;j<128;j++) b[j] = le16_to_cpu(buff[j*2+beginsec+461]); fft_forward(128,a,NULL,NULL); fft_forward(128,b,NULL,NULL); for(j=0;j<128;j++) lsb_energy+=fabs(a[j])+fabs(b[j]); for(j=0;j<128;j++) a[j] = be16_to_cpu(buff[j*2+beginsec+460]); for(j=0;j<128;j++) b[j] = be16_to_cpu(buff[j*2+beginsec+461]); fft_forward(128,a,NULL,NULL); fft_forward(128,b,NULL,NULL); for(j=0;j<128;j++) msb_energy+=fabs(a[j])+fabs(b[j]); } } if(lsb_energymsb_energy){ msb_votes+=lsb_energy/msb_energy; checked++; } if(checked==5 && (lsb_votes==0 || msb_votes==0))break; cdmessage(d,"."); } free(buff); free(a); free(b); d->bigendianp=endiancache; d->enable_cdda(d,0); /* How did we vote? Be potentially noisy */ if (lsb_votes>msb_votes) { char buffer[256]; cdmessage(d,"\n\tData appears to be coming back Little Endian.\n"); sprintf(buffer,"\tcertainty: %d%%\n",(int) (100.*lsb_votes/(lsb_votes+msb_votes)+.5)); cdmessage(d,buffer); return(0); } else { if(msb_votes>lsb_votes){ char buffer[256]; cdmessage(d,"\n\tData appears to be coming back Big Endian.\n"); sprintf(buffer,"\tcertainty: %d%%\n",(int) (100.*msb_votes/(lsb_votes+msb_votes)+.5)); cdmessage(d,buffer); return(1); } cdmessage(d,"\n\tCannot determine CDROM drive endianness.\n"); return(bigendianp()); } } /************************************************************************/ /*! Here we fix up a couple of things that will never happen. yeah, right. The multisession stuff is from Hannu code; it assumes it knows the leadout/leadin size. [I think Hannu refers to Hannu Savolainen from GNU/Linux Kernel code.] @return -1 if we can't get multisession info, 0 if there is one session only or the last session LBA is the same as the first audio track and 1 if the multi-session lba is higher than first audio track */ int FixupTOC(cdrom_drive_t *d, track_t i_tracks) { int j; /* First off, make sure the 'starting sector' is >=0 */ for( j=0; jdisc_toc[j].dwStartSector<0 ) { cdmessage(d,"\n\tTOC entry claims a negative start offset: massaging" ".\n"); d->disc_toc[j].dwStartSector=0; } if( jdisc_toc[j].dwStartSector> d->disc_toc[j+1].dwStartSector ) { cdmessage(d,"\n\tTOC entry claims an overly large start offset: massaging" ".\n"); d->disc_toc[j].dwStartSector=0; } } /* Make sure the listed 'starting sectors' are actually increasing. Flag things that are blatant/stupid/wrong */ { lsn_t last=d->disc_toc[0].dwStartSector; for ( j=1; jdisc_toc[j].dwStartSectordisc_toc[j].dwStartSector=last; } last=d->disc_toc[j].dwStartSector; } } d->audio_last_sector = CDIO_INVALID_LSN; { lsn_t last_ses_lsn; if (cdio_get_last_session (d->p_cdio, &last_ses_lsn) < 0) return -1; /* A Red Book Disc must have only one session, otherwise this is a * CD Extra */ if (last_ses_lsn > d->disc_toc[0].dwStartSector) { /* CD Extra discs have two session, the first one ending after * the last audio track * Thus the need to fix the length of the the audio data portion to * not cross the lead-out of this session */ for (j = i_tracks-1; j > 1; j--) { if (cdio_get_track_format(d->p_cdio, j+1) != TRACK_FORMAT_AUDIO && cdio_get_track_format(d->p_cdio, j) == TRACK_FORMAT_AUDIO) { /* First session lead-out is 1:30 * Lead-ins are 1:00 * Every session's first track have a 0:02 pregap * * That makes a control data section of (90+60+2)*75 sectors in the * last audio track */ const int gap = ((90+60+2) * CDIO_CD_FRAMES_PER_SEC); if ((last_ses_lsn - gap >= d->disc_toc[j-1].dwStartSector) && (last_ses_lsn - gap < d->disc_toc[j].dwStartSector)) { d->audio_last_sector = last_ses_lsn - gap - 1; break; } } } return 1; } } return 0; } libcdio-0.83/lib/cdda_interface/Makefile.in0000644000175000017500000006244111652210027015523 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 # Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ######################################################## # Things to make the cdda_interface library ######################################################## # # From libtool documentation amended with guidance from N. Boullis: # # 1. Start with version information of `0:0:0' for each libtool library. # # 2. It is probably not a good idea to update the version information # several times between public releases, but rather once per public # release. (This seems to be more an aesthetic consideration than # a hard technical one.) # # 3. If the library source code has changed at all since the last # update, then increment REVISION (`C:R:A' becomes `C:R+1:A'). # # 4. If any interfaces have been added, removed, or changed since the # last update, increment CURRENT, and set REVISION to 0. # # 5. If any interfaces have been added since the last public release, # then increment AGE. # # 6. If any interfaces have been removed or changed since the last # public release, then set AGE to 0. A changed interface means an # incompatibility with previous versions. VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = lib/cdda_interface DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libcdio_cdda_la_LIBADD = am__objects_1 = common_interface.lo cddap_interface.lo interface.lo \ scan_devices.lo smallft.lo toc.lo utils.lo drive_exceptions.lo am_libcdio_cdda_la_OBJECTS = $(am__objects_1) libcdio_cdda_la_OBJECTS = $(am_libcdio_cdda_la_OBJECTS) libcdio_cdda_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libcdio_cdda_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libcdio_cdda_la_SOURCES) DIST_SOURCES = $(libcdio_cdda_la_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDDA_PLAYER_LIBS = @CDDA_PLAYER_LIBS@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CDPARANOIA_NAME = @CDPARANOIA_NAME@ CFLAGS = @CFLAGS@ CMP = @CMP@ COS_LIB = @COS_LIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_PKG_LIB_HACK = @DARWIN_PKG_LIB_HACK@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ DIFF_OPTS = @DIFF_OPTS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GIT2CL = @GIT2CL@ GREP = @GREP@ HAVE_BSDI_CDROM = @HAVE_BSDI_CDROM@ HAVE_DARWIN_CDROM = @HAVE_DARWIN_CDROM@ HAVE_FREEBSD_CDROM = @HAVE_FREEBSD_CDROM@ HAVE_JOLIET = @HAVE_JOLIET@ HAVE_LINUX_CDROM = @HAVE_LINUX_CDROM@ HAVE_OS2_CDROM = @HAVE_OS2_CDROM@ HAVE_ROCK = @HAVE_ROCK@ HAVE_SOLARIS_CDROM = @HAVE_SOLARIS_CDROM@ HAVE_WIN32_CDROM = @HAVE_WIN32_CDROM@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDIOPP_LIBS = @LIBCDIOPP_LIBS@ LIBCDIO_CDDA_LIBS = @LIBCDIO_CDDA_LIBS@ LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ LIBCDIO_DEPS = @LIBCDIO_DEPS@ LIBCDIO_LIBS = @LIBCDIO_LIBS@ LIBCDIO_PARANOIA_LIBS = @LIBCDIO_PARANOIA_LIBS@ LIBCDIO_SOURCE_PATH = @LIBCDIO_SOURCE_PATH@ LIBCDIO_VERSION_NUM = @LIBCDIO_VERSION_NUM@ LIBICONV = @LIBICONV@ LIBISO9660PP_LIBS = @LIBISO9660PP_LIBS@ LIBISO9660_CFLAGS = @LIBISO9660_CFLAGS@ LIBISO9660_LIBS = @LIBISO9660_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = $(LIBCDIO_LIBS) @COS_LIB@ LIBTOOL = @LIBTOOL@ LIBUDF_LIBS = @LIBUDF_LIBS@ LINUX_CDROM_TIMEOUT = @LINUX_CDROM_TIMEOUT@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_NO_UNDEFINED = @LT_NO_UNDEFINED@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OLD_CDPARANOIA = @OLD_CDPARANOIA@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SBPCD_H = @SBPCD_H@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TYPESIZES = @TYPESIZES@ UCDROM_H = @UCDROM_H@ VCDINFO_CFLAGS = @VCDINFO_CFLAGS@ VCDINFO_LIBS = @VCDINFO_LIBS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = libcdio_cdda.sym libcdio_cdda_la_CURRENT = 1 libcdio_cdda_la_REVISION = 0 libcdio_cdda_la_AGE = 0 noinst_HEADERS = common_interface.h drive_exceptions.h low_interface.h \ smallft.h utils.h libcdio_cdda_sources = common_interface.c cddap_interface.c interface.c \ scan_devices.c smallft.c toc.c utils.c drive_exceptions.c lib_LTLIBRARIES = libcdio_cdda.la libcdio_cdda_la_SOURCES = $(libcdio_cdda_sources) libcdio_cdda_la_ldflags = -version-info $(libcdio_cdda_la_CURRENT):$(libcdio_cdda_la_REVISION):$(libcdio_cdda_la_AGE) @LT_NO_UNDEFINED@ INCLUDES = $(LIBCDIO_CFLAGS) FLAGS = @LIBCDIO_CFLAGS@ @UCDROM_H@ @TYPESIZES@ @CFLAGS@ OPT = $(FLAGS) DEBUG = $(FLAGS) -DCDDA_TEST ######################################################## # Things to version the symbols in the libraries ######################################################## # An explanation of the versioning problem from Nicolas Boullis and # the versioned symbol solution he uses below... # # Currently, libvcdinfo uses the cdio_open function from libcdio. # Let's imagine a program foobar that uses both the vcdinfo_open # function from libvcdinfo and the cdio_open function from libcdio. # Currently, libcdio has SONAME libcdio.so.0, libvcdinfo has SONAME # libvcdinfo.so.0 and requires libcdio.so.0, and foobar requires both # libvcdinfo.so.0 and libcdio.so.0. Everything looks fine. # # Now, for some reason, you decide to change the cdio_open function. # That's your right, but you have to bump the CURRENT version and (if I # understand it correctly, athough this is not that clear in libtool's # documentation) set the AGE to 0. Anyway, this bumps the SONAME, which is # sane since the interface changes incompatibly. # Now, you have a new libcdio with SONAME libcdio.so.1. But libvcdinfo and # foobar still require libcdio.so.0. Everything is still fine. # Now, after some minor changes, the author of foobar recompiles foobar. # Then, foobar now requires libvcdinfo.so.0 and libcdio.so.1. And foobar # now segfaults... # What is happening? When you run foobar, if brings both libvcdinfo.so.0 # and libcdio.so.1, but libvcdinfo.so.0 also brings libcdio.so.0. So you # have both libcdio.so.0 and libcdio.so.1 that bring their symbols to the # global namespace. Hence, you have to incompatible versions of the # cdio_open function in the name space. When foobar calls cdio_open, it # may choose the wrong function, and segfaults... # With versioned symbols, the cdio_open function from libcdio.so.0 may be # known as (something that looks like) cdio_open@@CDIO_0. An the cdio_open # function from libcdio.so.1 as cdio_open@@CDIO_1. Both versions of # libcdio would still be brought in by the most recent foobar, but foobar # (and libvcdinfo) know which versioned function to use and then use the # good one. # This is some simple versioning where every symbol is versioned with # something that looks like the SONAME of the library. More complex (and # better) versioning is possible; it is for example what is used by glibc. # But good complex versioning is something that requires much more # work... # The below is a impliments symbol versioning. First of all, I # compute MAJOR as CURENT - AGE; that is what is used within libtool # (at least on GNU/Linux systems) for the number in the SONAME. The # nm command gives the list of symbols known in each of the object # files that will be part of the shared library. And the sed command # extracts from this list those symbols that will be shared. (This sed # command comes from libtool.) libcdio_cdda_la_MAJOR = $(shell expr $(libcdio_cdda_la_CURRENT) - $(libcdio_cdda_la_AGE)) @BUILD_VERSIONED_LIBS_FALSE@libcdio_cdda_la_LDFLAGS = $(libcdio_cdda_la_ldflags) @BUILD_VERSIONED_LIBS_TRUE@libcdio_cdda_la_LDFLAGS = $(libcdio_cdda_la_ldflags) -Wl,--version-script=libcdio_cdda.la.ver @BUILD_VERSIONED_LIBS_TRUE@libcdio_cdda_la_DEPENDENCIES = libcdio_cdda.la.ver MOSTLYCLEANFILES = libcdio_cdda.la.ver all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/cdda_interface/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/cdda_interface/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libcdio_cdda.la: $(libcdio_cdda_la_OBJECTS) $(libcdio_cdda_la_DEPENDENCIES) $(libcdio_cdda_la_LINK) -rpath $(libdir) $(libcdio_cdda_la_OBJECTS) $(libcdio_cdda_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cddap_interface.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common_interface.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drive_exceptions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interface.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scan_devices.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smallft.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/toc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES @BUILD_VERSIONED_LIBS_TRUE@libcdio_cdda.la.ver: $(libcdio_cdda_la_OBJECTS) $(srcdir)/libcdio_cdda.sym @BUILD_VERSIONED_LIBS_TRUE@ echo 'CDIO_CDDA_$(libcdio_cdda_la_MAJOR) { ' > $@ @BUILD_VERSIONED_LIBS_TRUE@ objs=`for obj in $(libcdio_cdda_la_OBJECTS); do sed -ne "s/^pic_object='\(.*\)'$$/\1/p" $$obj; done`; \ @BUILD_VERSIONED_LIBS_TRUE@ if test -n "$$objs" ; then \ @BUILD_VERSIONED_LIBS_TRUE@ nm $${objs} | sed -n -e 's/^.*[ ][ABCDGIRSTW][ABCDGIRSTW]*[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$$/\1/p' | sort -u | { first=true; while read symbol; do if grep -q "^$${symbol}\$$" $(srcdir)/libcdio_cdda.sym; then if test $$first = true; then echo " global:"; first=false; fi; echo " $${symbol};"; fi; done; } >> $@; \ @BUILD_VERSIONED_LIBS_TRUE@ nm $${objs} | sed -n -e 's/^.*[ ][ABCDGIRSTW][ABCDGIRSTW]*[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$$/\1/p' | sort -u | { first=true; while read symbol; do if grep -q "^$${symbol}\$$" $(srcdir)/libcdio_cdda.sym; then :; else if test $$first = true; then echo " local:"; first=false; fi; echo " $${symbol};"; fi; done; } >> $@; \ @BUILD_VERSIONED_LIBS_TRUE@ fi @BUILD_VERSIONED_LIBS_TRUE@ echo '};' >> $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libcdio-0.83/lib/cdio++/0000755000175000017500000000000011652210414011660 500000000000000libcdio-0.83/lib/cdio++/iso9660.cpp0000644000175000017500000001566411650126247013447 00000000000000/* -*- C++ -*- Copyright (C) 2006, 2008, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #ifdef HAVE_SYS_TYPES_H #include #endif #include /*! Given a directory pointer, find the filesystem entry that contains lsn and return information about it. @return Stat * of entry if we found lsn, or NULL otherwise. Caller must free return value. */ ISO9660::Stat * ISO9660::FS::find_lsn(lsn_t i_lsn) { return new Stat(iso9660_find_fs_lsn(p_cdio, i_lsn)); } /*! Read the Primary Volume Descriptor for a CD. True is returned if read, and false if there was an error. */ ISO9660::PVD * ISO9660::FS::read_pvd () { iso9660_pvd_t pvd; bool b_okay = iso9660_fs_read_pvd (p_cdio, &pvd); if (b_okay) { return new PVD(&pvd); } return (PVD *) NULL; } /*! Read the Super block of an ISO 9660 image. This is the Primary Volume Descriptor (PVD) and perhaps a Supplemental Volume Descriptor if (Joliet) extensions are acceptable. */ bool ISO9660::FS::read_superblock (iso_extension_mask_t iso_extension_mask) { return iso9660_fs_read_superblock (p_cdio, iso_extension_mask); } /*! Read psz_path (a directory) and return a list of iso9660_stat_t pointers for the files inside that directory. The caller must free the returned result. */ bool ISO9660::FS::readdir (const char psz_path[], stat_vector_t& stat_vector, bool b_mode2) { CdioList_t * p_stat_list = iso9660_fs_readdir (p_cdio, psz_path, b_mode2); if (p_stat_list) { CdioListNode_t *p_entnode; _CDIO_LIST_FOREACH (p_entnode, p_stat_list) { iso9660_stat_t *p_statbuf = (iso9660_stat_t *) _cdio_list_node_data (p_entnode); stat_vector.push_back(new ISO9660::Stat(p_statbuf)); } _cdio_list_free (p_stat_list, false); return true; } else { return false; } } /*! Close previously opened ISO 9660 image and free resources associated with the image. Call this when done using using an ISO 9660 image. @return true is unconditionally returned. If there was an error false would be returned. */ bool ISO9660::IFS::close() { iso9660_close(p_iso9660); p_iso9660 = (iso9660_t *) NULL; return true; } /*! Given a directory pointer, find the filesystem entry that contains lsn and return information about it. Returns Stat* of entry if we found lsn, or NULL otherwise. */ ISO9660::Stat * ISO9660::IFS::find_lsn(lsn_t i_lsn) { return new Stat(iso9660_ifs_find_lsn(p_iso9660, i_lsn)); } /*! Return the Joliet level recognized. */ uint8_t ISO9660::IFS::get_joliet_level() { return iso9660_ifs_get_joliet_level(p_iso9660); } /*! Return true if ISO 9660 image has extended attrributes (XA). */ bool ISO9660::IFS::is_xa () { return iso9660_ifs_is_xa (p_iso9660); } /*! Open an ISO 9660 image for "fuzzy" reading. This means that we will try to guess various internal offset based on internal checks. This may be useful when trying to read an ISO 9660 image contained in a file format that libiso9660 doesn't know natively (or knows imperfectly.) Maybe in the future we will have a mode. NULL is returned on error. @see open */ bool ISO9660::IFS::open_fuzzy (const char *psz_path, iso_extension_mask_t iso_extension_mask, uint16_t i_fuzz) { p_iso9660 = iso9660_open_fuzzy_ext(psz_path, iso_extension_mask, i_fuzz); //return p_iso9660 != (iso9660_t *) NULL; return true; } /*! Read the Primary Volume Descriptor for an ISO 9660 image. A PVD object is returned if read, and NULL if there was an error. */ ISO9660::PVD * ISO9660::IFS::read_pvd () { iso9660_pvd_t pvd; bool b_okay = iso9660_ifs_read_pvd (p_iso9660, &pvd); if (b_okay) { return new PVD(&pvd); } return (PVD *) NULL; } /*! Read the Super block of an ISO 9660 image but determine framesize and datastart and a possible additional offset. Generally here we are not reading an ISO 9660 image but a CD-Image which contains an ISO 9660 filesystem. @see read_superblock */ bool ISO9660::IFS::read_superblock (iso_extension_mask_t iso_extension_mask, uint16_t i_fuzz) { return iso9660_ifs_read_superblock (p_iso9660, iso_extension_mask); } /*! Read the Super block of an ISO 9660 image but determine framesize and datastart and a possible additional offset. Generally here we are not reading an ISO 9660 image but a CD-Image which contains an ISO 9660 filesystem. @see read_superblock */ bool ISO9660::IFS::read_superblock_fuzzy (iso_extension_mask_t iso_extension_mask, uint16_t i_fuzz) { return iso9660_ifs_fuzzy_read_superblock (p_iso9660, iso_extension_mask, i_fuzz); } char * ISO9660::PVD::get_application_id() { return iso9660_get_application_id(&pvd); } int ISO9660::PVD::get_pvd_block_size() { return iso9660_get_pvd_block_size(&pvd); } /*! Return the PVD's preparer ID. NULL is returned if there is some problem in getting this. */ char * ISO9660::PVD::get_preparer_id() { return iso9660_get_preparer_id(&pvd); } /*! Return the PVD's publisher ID. NULL is returned if there is some problem in getting this. */ char * ISO9660::PVD::get_publisher_id() { return iso9660_get_publisher_id(&pvd); } const char * ISO9660::PVD::get_pvd_id() { return iso9660_get_pvd_id(&pvd); } int ISO9660::PVD::get_pvd_space_size() { return iso9660_get_pvd_space_size(&pvd); } uint8_t ISO9660::PVD::get_pvd_type() { return iso9660_get_pvd_type(&pvd); } /*! Return the primary volume id version number (of pvd). If there is an error 0 is returned. */ int ISO9660::PVD::get_pvd_version() { return iso9660_get_pvd_version(&pvd); } /*! Return the LSN of the root directory for pvd. If there is an error CDIO_INVALID_LSN is returned. */ lsn_t ISO9660::PVD::get_root_lsn() { return iso9660_get_root_lsn(&pvd); } /*! Return the PVD's system ID. NULL is returned if there is some problem in getting this. */ char * ISO9660::PVD::get_system_id() { return iso9660_get_system_id(&pvd); } /*! Return the PVD's volume ID. NULL is returned if there is some problem in getting this. */ char * ISO9660::PVD::get_volume_id() { return iso9660_get_volume_id(&pvd); } /*! Return the PVD's volumeset ID. NULL is returned if there is some problem in getting this. */ char * ISO9660::PVD::get_volumeset_id() { return iso9660_get_volumeset_id(&pvd); } libcdio-0.83/lib/cdio++/cdio.cpp0000644000175000017500000000265211114145233013226 00000000000000/* -*- C++ -*- $Id: cdio.cpp,v 1.2 2008/04/20 13:44:31 karl Exp $ Copyright (C) 2006, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include #include void possible_throw_device_exception(driver_return_code_t drc) { switch (drc) { case DRIVER_OP_SUCCESS: return; case DRIVER_OP_ERROR: throw DriverOpError(); case DRIVER_OP_UNSUPPORTED: throw DriverOpUnsupported(); case DRIVER_OP_UNINIT: throw DriverOpUninit(); case DRIVER_OP_NOT_PERMITTED: throw DriverOpNotPermitted(); case DRIVER_OP_BAD_PARAMETER: throw DriverOpBadParameter(); case DRIVER_OP_BAD_POINTER: throw DriverOpBadPointer(); case DRIVER_OP_NO_DRIVER: throw DriverOpNoDriver(); default: throw DriverOpException(drc); } } libcdio-0.83/lib/cdio++/Makefile.am0000644000175000017500000000523611126441340013642 00000000000000# $Id: Makefile.am,v 1.11 2008/10/29 09:53:00 rocky Exp $ # # Copyright (C) 2005, 2006, 2007, 2008 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ######################################################## # Things to make the libcdio++ library ######################################################## # # From libtool documentation amended with guidance from N. Boullis: # # 1. Start with version information of `0:0:0' for each libtool library. # # 2. It is probably not a good idea to update the version information # several times between public releases, but rather once per public # release. (This seems to be more an aesthetic consideration than # a hard technical one.) # # 3. If the library source code has changed at all since the last # update, then increment REVISION (`C:R:A' becomes `C:R+1:A'). # # 4. If any interfaces have been added, removed, or changed since the # last update, increment CURRENT, and set REVISION to 0. # # 5. If any interfaces have been added since the last public release, # then increment AGE. # # 6. If any interfaces have been removed or changed since the last # public release, then set AGE to 0. A changed interface means an # incompatibility with previous versions. lib_LTLIBRARIES = libiso9660++.la libcdio++.la libcdiopp_la_CURRENT = 0 libcdiopp_la_REVISION = 2 libcdiopp_la_AGE = 0 libcdiopp_sources = cdio.cpp devices.cpp libcdio___la_SOURCES = $(libcdiopp_sources) libcdio___la_LDFLAGS = -version-info $(libcdiopp_la_CURRENT):$(libcdiopp_la_REVISION):$(libcdiopp_la_AGE) @LT_NO_UNDEFINED@ libcdio___la_LIBADD = $(top_builddir)/lib/driver/libcdio.la libiso9660pp_la_CURRENT = 0 libiso9660pp_la_REVISION = 0 libiso9660pp_la_AGE = 0 libiso9660pp_sources = iso9660.cpp libiso9660___la_SOURCES = $(libiso9660pp_sources) libiso9660___la_LIBADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) libiso9660___la_LDFLAGS = -version-info $(libiso9660pp_la_CURRENT):$(libiso9660pp_la_REVISION):$(libiso9660pp_la_AGE) @LT_NO_UNDEFINED@ INCLUDES = -I$(top_srcdir)/include/ -I$(top_builddir)/include libcdio-0.83/lib/cdio++/devices.cpp0000644000175000017500000001540211650126312013731 00000000000000/* -*- C++ -*- Copyright (C) 2006, 2008, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #ifdef HAVE_SYS_TYPES_H #include #endif #include #include /*! Close media tray in CD drive if there is a routine to do so. @param psz_drive the name of CD-ROM to be closed. @param driver_id is the driver to be used or that got used if it was DRIVER_UNKNOWN or DRIVER_DEVICE; If this is NULL, we won't report back the driver used. */ void closeTray (const char *psz_drive, /*in/out*/ driver_id_t &driver_id) { driver_return_code_t drc = cdio_close_tray (psz_drive, &driver_id); possible_throw_device_exception(drc); } /*! Close media tray in CD drive if there is a routine to do so. @param psz_drive the name of CD-ROM to be closed. If omitted or NULL, we'll scan for a suitable CD-ROM. */ void closeTray (const char *psz_drive) { driver_id_t driver_id = DRIVER_UNKNOWN; closeTray(psz_drive, driver_id); } /*! Get a string decribing driver_id. @param driver_id the driver you want the description for @return a sring of driver description */ const char * driverDescribe (driver_id_t driver_id) { return cdio_driver_describe(driver_id); } /*! Eject media in CD drive if there is a routine to do so. If the CD is ejected, object is destroyed. */ void ejectMedia (const char *psz_drive) { driver_return_code_t drc = cdio_eject_media_drive(psz_drive); possible_throw_device_exception(drc); } /*! Free device list returned by GetDevices @param device_list list returned by GetDevices @see GetDevices */ void freeDeviceList (char * device_list[]) { cdio_free_device_list(device_list); } /*! Return a string containing the default CD device if none is specified. if p_driver_id is DRIVER_UNKNOWN or DRIVER_DEVICE then find a suitable one set the default device for that. NULL is returned if we couldn't get a default device. */ char * getDefaultDevice(/*in/out*/ driver_id_t &driver_id) { return cdio_get_default_device_driver(&driver_id); } /*! Return an array of device names. If you want a specific devices for a driver, give that device. If you want hardware devices, give DRIVER_DEVICE and if you want all possible devices, image drivers and hardware drivers give DRIVER_UNKNOWN. NULL is returned if we couldn't return a list of devices. In some situations of drivers or OS's we can't find a CD device if there is no media in it and it is possible for this routine to return NULL even though there may be a hardware CD-ROM. */ char ** getDevices(driver_id_t driver_id) { return cdio_get_devices(driver_id); } /*! Like GetDevices above, but we may change the p_driver_id if we were given DRIVER_DEVICE or DRIVER_UNKNOWN. This is because often one wants to get a drive name and then *open* it afterwards. Giving the driver back facilitates this, and speeds things up for libcdio as well. */ char ** getDevices (driver_id_t &driver_id) { return cdio_get_devices_ret(&driver_id); } /*! Get an array of device names in search_devices that have at least the capabilities listed by the capabities parameter. If search_devices is NULL, then we'll search all possible CD drives. If "b_any" is set false then every capability listed in the extended portion of capabilities (i.e. not the basic filesystem) must be satisified. If "any" is set true, then if any of the capabilities matches, we call that a success. To find a CD-drive of any type, use the mask CDIO_FS_MATCH_ALL. @return the array of device names or NULL if we couldn't get a default device. It is also possible to return a non NULL but after dereferencing the the value is NULL. This also means nothing was found. */ char ** getDevices(/*in*/ char *ppsz_search_devices[], cdio_fs_anal_t capabilities, bool b_any) { return cdio_get_devices_with_cap(ppsz_search_devices, capabilities, b_any); } /*! Like GetDevices above but we return the driver we found as well. This is because often one wants to search for kind of drive and then *open* it afterwards. Giving the driver back facilitates this, and speeds things up for libcdio as well. */ char ** getDevices(/*in*/ char* ppsz_search_devices[], cdio_fs_anal_t capabilities, /*out*/ driver_id_t &driver_id, bool b_any) { return cdio_get_devices_with_cap_ret(ppsz_search_devices, capabilities, b_any, &driver_id); } /*! Return true if we Have driver for driver_id */ bool haveDriver (driver_id_t driver_id) { return cdio_have_driver(driver_id); } /*! Determine if bin_name is the bin file part of a CDRWIN CD disk image. @param bin_name location of presumed CDRWIN bin image file. @return the corresponding CUE file if bin_name is a BIN file or NULL if not a BIN file. */ char *isBinFile(const char *psz_bin_name) { return cdio_is_binfile(psz_bin_name); } /*! Determine if cue_name is the cue sheet for a CDRWIN CD disk image. @return corresponding BIN file if cue_name is a CDRWIN cue file or NULL if not a CUE file. */ char * isCueFile(const char *psz_cue_name) { return cdio_is_cuefile(psz_cue_name); } /*! Determine if psz_source refers to a real hardware CD-ROM. @param psz_source location name of object @param driver_id driver for reading object. Use DRIVER_UNKNOWN if you don't know what driver to use. @return true if psz_source is a device; If false is returned we could have a CD disk image. */ bool isDevice(const char *psz_source, driver_id_t driver_id) { return cdio_is_device(psz_source, driver_id); } /*! Determine if psz_nrg is a Nero CD disk image. @param psz_nrg location of presumed NRG image file. @return true if psz_nrg is a Nero NRG image or false if not a NRG image. */ bool isNero(const char *psz_nrg) { return cdio_is_nrg(psz_nrg); } /*! Determine if psz_toc is a TOC file for a cdrdao CD disk image. @param psz_toc location of presumed TOC image file. @return true if toc_name is a cdrdao TOC file or false if not a TOC file. */ bool isTocFile(const char *psz_toc) { return cdio_is_tocfile(psz_toc); } libcdio-0.83/lib/cdio++/Makefile.in0000644000175000017500000005232311652210027013652 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Id: Makefile.am,v 1.11 2008/10/29 09:53:00 rocky Exp $ # # Copyright (C) 2005, 2006, 2007, 2008 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ######################################################## # Things to make the libcdio++ library ######################################################## # # From libtool documentation amended with guidance from N. Boullis: # # 1. Start with version information of `0:0:0' for each libtool library. # # 2. It is probably not a good idea to update the version information # several times between public releases, but rather once per public # release. (This seems to be more an aesthetic consideration than # a hard technical one.) # # 3. If the library source code has changed at all since the last # update, then increment REVISION (`C:R:A' becomes `C:R+1:A'). # # 4. If any interfaces have been added, removed, or changed since the # last update, increment CURRENT, and set REVISION to 0. # # 5. If any interfaces have been added since the last public release, # then increment AGE. # # 6. If any interfaces have been removed or changed since the last # public release, then set AGE to 0. A changed interface means an # incompatibility with previous versions. VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = lib/cdio++ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libcdio___la_DEPENDENCIES = $(top_builddir)/lib/driver/libcdio.la am__objects_1 = cdio.lo devices.lo am_libcdio___la_OBJECTS = $(am__objects_1) libcdio___la_OBJECTS = $(am_libcdio___la_OBJECTS) libcdio___la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libcdio___la_LDFLAGS) $(LDFLAGS) -o $@ am__DEPENDENCIES_1 = libiso9660___la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am__objects_2 = iso9660.lo am_libiso9660___la_OBJECTS = $(am__objects_2) libiso9660___la_OBJECTS = $(am_libiso9660___la_OBJECTS) libiso9660___la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libiso9660___la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libcdio___la_SOURCES) $(libiso9660___la_SOURCES) DIST_SOURCES = $(libcdio___la_SOURCES) $(libiso9660___la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDDA_PLAYER_LIBS = @CDDA_PLAYER_LIBS@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CDPARANOIA_NAME = @CDPARANOIA_NAME@ CFLAGS = @CFLAGS@ CMP = @CMP@ COS_LIB = @COS_LIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_PKG_LIB_HACK = @DARWIN_PKG_LIB_HACK@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ DIFF_OPTS = @DIFF_OPTS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GIT2CL = @GIT2CL@ GREP = @GREP@ HAVE_BSDI_CDROM = @HAVE_BSDI_CDROM@ HAVE_DARWIN_CDROM = @HAVE_DARWIN_CDROM@ HAVE_FREEBSD_CDROM = @HAVE_FREEBSD_CDROM@ HAVE_JOLIET = @HAVE_JOLIET@ HAVE_LINUX_CDROM = @HAVE_LINUX_CDROM@ HAVE_OS2_CDROM = @HAVE_OS2_CDROM@ HAVE_ROCK = @HAVE_ROCK@ HAVE_SOLARIS_CDROM = @HAVE_SOLARIS_CDROM@ HAVE_WIN32_CDROM = @HAVE_WIN32_CDROM@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDIOPP_LIBS = @LIBCDIOPP_LIBS@ LIBCDIO_CDDA_LIBS = @LIBCDIO_CDDA_LIBS@ LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ LIBCDIO_DEPS = @LIBCDIO_DEPS@ LIBCDIO_LIBS = @LIBCDIO_LIBS@ LIBCDIO_PARANOIA_LIBS = @LIBCDIO_PARANOIA_LIBS@ LIBCDIO_SOURCE_PATH = @LIBCDIO_SOURCE_PATH@ LIBCDIO_VERSION_NUM = @LIBCDIO_VERSION_NUM@ LIBICONV = @LIBICONV@ LIBISO9660PP_LIBS = @LIBISO9660PP_LIBS@ LIBISO9660_CFLAGS = @LIBISO9660_CFLAGS@ LIBISO9660_LIBS = @LIBISO9660_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBUDF_LIBS = @LIBUDF_LIBS@ LINUX_CDROM_TIMEOUT = @LINUX_CDROM_TIMEOUT@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_NO_UNDEFINED = @LT_NO_UNDEFINED@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OLD_CDPARANOIA = @OLD_CDPARANOIA@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SBPCD_H = @SBPCD_H@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TYPESIZES = @TYPESIZES@ UCDROM_H = @UCDROM_H@ VCDINFO_CFLAGS = @VCDINFO_CFLAGS@ VCDINFO_LIBS = @VCDINFO_LIBS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ lib_LTLIBRARIES = libiso9660++.la libcdio++.la libcdiopp_la_CURRENT = 0 libcdiopp_la_REVISION = 2 libcdiopp_la_AGE = 0 libcdiopp_sources = cdio.cpp devices.cpp libcdio___la_SOURCES = $(libcdiopp_sources) libcdio___la_LDFLAGS = -version-info $(libcdiopp_la_CURRENT):$(libcdiopp_la_REVISION):$(libcdiopp_la_AGE) @LT_NO_UNDEFINED@ libcdio___la_LIBADD = $(top_builddir)/lib/driver/libcdio.la libiso9660pp_la_CURRENT = 0 libiso9660pp_la_REVISION = 0 libiso9660pp_la_AGE = 0 libiso9660pp_sources = iso9660.cpp libiso9660___la_SOURCES = $(libiso9660pp_sources) libiso9660___la_LIBADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) libiso9660___la_LDFLAGS = -version-info $(libiso9660pp_la_CURRENT):$(libiso9660pp_la_REVISION):$(libiso9660pp_la_AGE) @LT_NO_UNDEFINED@ INCLUDES = -I$(top_srcdir)/include/ -I$(top_builddir)/include all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/cdio++/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/cdio++/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libcdio++.la: $(libcdio___la_OBJECTS) $(libcdio___la_DEPENDENCIES) $(libcdio___la_LINK) -rpath $(libdir) $(libcdio___la_OBJECTS) $(libcdio___la_LIBADD) $(LIBS) libiso9660++.la: $(libiso9660___la_OBJECTS) $(libiso9660___la_DEPENDENCIES) $(libiso9660___la_LINK) -rpath $(libdir) $(libiso9660___la_OBJECTS) $(libiso9660___la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/devices.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iso9660.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libcdio-0.83/lib/paranoia/0000755000175000017500000000000011652210414012406 500000000000000libcdio-0.83/lib/paranoia/p_block.h0000644000175000017500000001322311114145233014110 00000000000000/* $Id: p_block.h,v 1.6 2008/04/17 17:39:48 karl Exp $ Copyright (C) 2004, 2005, 2008 Rocky Bernstein Copyright (C) by Monty (xiphmont@mit.edu) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef _P_BLOCK_H_ #define _P_BLOCK_H_ #include #include #define MIN_WORDS_OVERLAP 64 /* 16 bit words */ #define MIN_WORDS_SEARCH 64 /* 16 bit words */ #define MIN_WORDS_RIFT 16 /* 16 bit words */ #define MAX_SECTOR_OVERLAP 32 /* sectors */ #define MIN_SECTOR_EPSILON 128 /* words */ #define MIN_SECTOR_BACKUP 16 /* sectors */ #define JIGGLE_MODULO 15 /* sectors */ #define MIN_SILENCE_BOUNDARY 1024 /* 16 bit words */ #define min(x,y) ((x)>(y)?(y):(x)) #define max(x,y) ((x)<(y)?(y):(x)) #include "isort.h" typedef struct { /* linked list */ struct linked_element *head; struct linked_element *tail; void *(*new_poly)(); void (*free_poly)(void *poly); long current; long active; } linked_list_t; typedef struct linked_element{ void *ptr; struct linked_element *prev; struct linked_element *next; linked_list_t *list; int stamp; } linked_element; extern linked_list_t *new_list(void *(*new_fn)(void),void (*free)(void *)); extern linked_element *new_elem(linked_list_t *list); extern linked_element *add_elem(linked_list_t *list,void *elem); extern void free_list(linked_list_t *list,int free_ptr); /* unlink or free */ extern void free_elem(linked_element *e,int free_ptr); /* unlink or free */ extern void *get_elem(linked_element *e); /* This is a shallow copy; it doesn't copy contained structures */ extern linked_list_t *copy_list(linked_list_t *p_list); typedef struct c_block { /* The buffer */ int16_t *vector; long begin; long size; /* auxiliary support structures */ unsigned char *flags; /* 1 known boundaries in read data 2 known blanked data 4 matched sample 8 reserved 16 reserved 32 reserved 64 reserved 128 reserved */ /* end of session cases */ long lastsector; cdrom_paranoia_t *p; struct linked_element *e; } c_block_t; extern void free_c_block(c_block_t *c); extern void i_cblock_destructor(c_block_t *c); extern c_block_t *new_c_block(cdrom_paranoia_t *p); typedef struct v_fragment_s { c_block_t *one; long begin; long size; int16_t *vector; /* end of session cases */ long lastsector; /* linked list */ cdrom_paranoia_t *p; struct linked_element *e; } v_fragment_t; extern void free_v_fragment(v_fragment_t *c); extern v_fragment_t *new_v_fragment(cdrom_paranoia_t *p, c_block_t *one, long int begin, long int end, int lastsector); extern int16_t *v_buffer(v_fragment_t *v); extern c_block_t *c_first(cdrom_paranoia_t *p); extern c_block_t *c_last(cdrom_paranoia_t *p); extern c_block_t *c_next(c_block_t *c); extern c_block_t *c_prev(c_block_t *c); extern v_fragment_t *v_first(cdrom_paranoia_t *p); extern v_fragment_t *v_last(cdrom_paranoia_t *p); extern v_fragment_t *v_next(v_fragment_t *v); extern v_fragment_t *v_prev(v_fragment_t *v); typedef struct root_block{ long returnedlimit; long lastsector; cdrom_paranoia_t *p; c_block_t *vector; /* doesn't use any sorting */ int silenceflag; long silencebegin; } root_block; typedef struct offsets{ long offpoints; long newpoints; long offaccum; long offdiff; long offmin; long offmax; } offsets; struct cdrom_paranoia_s { cdrom_drive_t *d; root_block root; /* verified/reconstructed cached data */ linked_list_t *cache; /* our data as read from the cdrom */ long int cache_limit; linked_list_t *fragments; /* fragments of blocks that have been 'verified' */ sort_info_t *sortcache; int readahead; /* sectors of readahead in each readop */ int jitter; long lastread; paranoia_cb_mode_t enable; long int cursor; long int current_lastsector; long int current_firstsector; /* statistics for drift/overlap */ struct offsets stage1; struct offsets stage2; long dynoverlap; long dyndrift; /* statistics for verification */ }; extern c_block_t *c_alloc(int16_t *vector,long begin,long size); extern void c_set(c_block_t *v,long begin); extern void c_insert(c_block_t *v,long pos,int16_t *b,long size); extern void c_remove(c_block_t *v,long cutpos,long cutsize); extern void c_overwrite(c_block_t *v,long pos,int16_t *b,long size); extern void c_append(c_block_t *v, int16_t *vector, long size); extern void c_removef(c_block_t *v, long cut); #define ce(v) (v->begin+v->size) #define cb(v) (v->begin) #define cs(v) (v->size) /* pos here is vector position from zero */ extern void recover_cache(cdrom_paranoia_t *p); extern void i_paranoia_firstlast(cdrom_paranoia_t *p); #define cv(c) (c->vector) #define fe(f) (f->begin+f->size) #define fb(f) (f->begin) #define fs(f) (f->size) #define fv(f) (v_buffer(f)) #ifndef DO_NOT_WANT_PARANOIA_COMPATIBILITY /** For compatibility with good ol' paranoia */ #define linked_list linked_list_t #endif /*DO_NOT_WANT_PARANOIA_COMPATIBILITY*/ #define CDP_COMPILE #endif /*_P_BLOCK_H_*/ libcdio-0.83/lib/paranoia/gap.h0000644000175000017500000000316611114145233013253 00000000000000/* $Id: gap.h,v 1.2 2008/04/17 17:39:48 karl Exp $ Copyright (C) 2004, 2008 Rocky Bernstein Copyright (C) 1998 Monty xiphmont@mit.edu This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef _GAP_H_ #define _GAP_H_ extern long i_paranoia_overlap_r(int16_t *buffA,int16_t *buffB, long offsetA, long offsetB); extern long i_paranoia_overlap_f(int16_t *buffA,int16_t *buffB, long offsetA, long offsetB, long sizeA,long sizeB); extern int i_stutter_or_gap(int16_t *A, int16_t *B,long offA, long offB, long gap); extern void i_analyze_rift_f(int16_t *A,int16_t *B, long sizeA, long sizeB, long aoffset, long boffset, long *matchA,long *matchB,long *matchC); extern void i_analyze_rift_r(int16_t *A,int16_t *B, long sizeA, long sizeB, long aoffset, long boffset, long *matchA,long *matchB,long *matchC); extern void analyze_rift_silence_f(int16_t *A,int16_t *B,long sizeA,long sizeB, long aoffset, long boffset, long *matchA, long *matchB); #endif /*_GAP_H*/ libcdio-0.83/lib/paranoia/libcdio_paranoia.sym0000644000175000017500000000030311114145233016332 00000000000000cdio_paranoia_init cdio_paranoia_free cdio_paranoia_modeset cdio_paranoia_seek cdio_paranoia_read cdio_paranoia_read_limited cdio_paranoia_overlapset cdio_paranoia_set_range paranoia_cb_mode2str libcdio-0.83/lib/paranoia/Makefile.am0000644000175000017500000001544711650344050014377 00000000000000# Copyright (C) 2004, 2006, 2008, 2011 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ######################################################## # Things to make the libcdio_paranoia library ######################################################## # # From libtool documentation amended with guidance from N. Boullis: # # 1. Start with version information of `0:0:0' for each libtool library. # # 2. It is probably not a good idea to update the version information # several times between public releases, but rather once per public # release. (This seems to be more an aesthetic consideration than # a hard technical one.) # # 3. If the library source code has changed at all since the last # update, then increment REVISION (`C:R:A' becomes `C:R+1:A'). # # 4. If any interfaces have been added, removed, or changed since the # last update, increment CURRENT, and set REVISION to 0. # # 5. If any interfaces have been added since the last public release, # then increment AGE. # # 6. If any interfaces have been removed or changed since the last # public release, then set AGE to 0. A changed interface means an # incompatibility with previous versions. EXTRA_DIST = libcdio_paranoia.sym libcdio_paranoia_la_CURRENT = 1 libcdio_paranoia_la_REVISION = 0 libcdio_paranoia_la_AGE = 0 noinst_HEADERS = gap.h isort.h overlap.h p_block.h libcdio_paranoia_sources = gap.c isort.c overlap.c overlap.h \ p_block.c paranoia.c lib_LTLIBRARIES = libcdio_paranoia.la libcdio_paranoia_la_SOURCES = $(libcdio_paranoia_sources) libcdio_paranoia_la_ldflags = -version-info $(libcdio_paranoia_la_CURRENT):$(libcdio_paranoia_la_REVISION):$(libcdio_paranoia_la_AGE) @LT_NO_UNDEFINED@ INCLUDES = $(LIBCDIO_CFLAGS) FLAGS=@LIBCDIO_CFLAGS@ @TYPESIZES@ @CFLAGS@ -I.. -I../.. OPT=$(FLAGS) DEBUG=$(FLAGS) ## SUFFIXES = .t ## TFILES = isort.t gap.t p_block.t paranoia.t ##test: $(TFILES) ##.c.t: ## $(CC) -g -DTEST $(DEBUG) -o $@ $< $(LIBS) ## $@ ##debug: ## $(MAKE) libcdio_paranoia.a CFLAGS="$(DEBUG)" LIBS = $(LIBCDIO_LIBS) $(LIBCDIO_CDDA_LIBS) ######################################################## # Things to version the symbols in the libraries ######################################################## # An explanation of the versioning problem from Nicolas Boullis and # the versioned symbol solution he uses below... # # Currently, libvcdinfo uses the cdio_open function from libcdio. # Let's imagine a program foobar that uses both the vcdinfo_open # function from libvcdinfo and the cdio_open function from libcdio. # Currently, libcdio has SONAME libcdio.so.0, libvcdinfo has SONAME # libvcdinfo.so.0 and requires libcdio.so.0, and foobar requires both # libvcdinfo.so.0 and libcdio.so.0. Everything looks fine. # # Now, for some reason, you decide to change the cdio_open function. # That's your right, but you have to bump the CURRENT version and (if I # understand it correctly, athough this is not that clear in libtool's # documentation) set the AGE to 0. Anyway, this bumps the SONAME, which is # sane since the interface changes incompatibly. # Now, you have a new libcdio with SONAME libcdio.so.1. But libvcdinfo and # foobar still require libcdio.so.0. Everything is still fine. # Now, after some minor changes, the author of foobar recompiles foobar. # Then, foobar now requires libvcdinfo.so.0 and libcdio.so.1. And foobar # now segfaults... # What is happening? When you run foobar, if brings both libvcdinfo.so.0 # and libcdio.so.1, but libvcdinfo.so.0 also brings libcdio.so.0. So you # have both libcdio.so.0 and libcdio.so.1 that bring their symbols to the # global namespace. Hence, you have to incompatible versions of the # cdio_open function in the name space. When foobar calls cdio_open, it # may choose the wrong function, and segfaults... # With versioned symbols, the cdio_open function from libcdio.so.0 may be # known as (something that looks like) cdio_open@@CDIO_0. An the cdio_open # function from libcdio.so.1 as cdio_open@@CDIO_1. Both versions of # libcdio would still be brought in by the most recent foobar, but foobar # (and libvcdinfo) know which versioned function to use and then use the # good one. # This is some simple versioning where every symbol is versioned with # something that looks like the SONAME of the library. More complex (and # better) versioning is possible; it is for example what is used by glibc. # But good complex versioning is something that requires much more # work... # The below is a impliments symbol versioning. First of all, I # compute MAJOR as CURENT - AGE; that is what is used within libtool # (at least on GNU/Linux systems) for the number in the SONAME. The # nm command gives the list of symbols known in each of the object # files that will be part of the shared library. And the sed command # extracts from this list those symbols that will be shared. (This sed # command comes from libtool.) libcdio_paranoia_la_MAJOR = $(shell expr $(libcdio_paranoia_la_CURRENT) - $(libcdio_paranoia_la_AGE)) if BUILD_VERSIONED_LIBS libcdio_paranoia_la_LDFLAGS = $(libcdio_paranoia_la_ldflags) -Wl,--version-script=libcdio_paranoia.la.ver libcdio_paranoia_la_DEPENDENCIES = libcdio_paranoia.la.ver libcdio_paranoia.la.ver: $(libcdio_paranoia_la_OBJECTS) $(srcdir)/libcdio_paranoia.sym echo 'CDIO_PARANOIA_$(libcdio_paranoia_la_MAJOR) { ' > $@ objs=`for obj in $(libcdio_paranoia_la_OBJECTS); do sed -ne "s/^pic_object='\(.*\)'$$/\1/p" $$obj; done`; \ if test -n "$$objs" ; then \ nm $${objs} | sed -n -e 's/^.*[ ][ABCDGIRSTW][ABCDGIRSTW]*[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$$/\1/p' | sort -u | { first=true; while read symbol; do if grep -q "^$${symbol}\$$" $(srcdir)/libcdio_paranoia.sym; then if test $$first = true; then echo " global:"; first=false; fi; echo " $${symbol};"; fi; done; } >> $@; \ nm $${objs} | sed -n -e 's/^.*[ ][ABCDGIRSTW][ABCDGIRSTW]*[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$$/\1/p' | sort -u | { first=true; while read symbol; do if grep -q "^$${symbol}\$$" $(srcdir)/libcdio_paranoia.sym; then :; else if test $$first = true; then echo " local:"; first=false; fi; echo " $${symbol};"; fi; done; } >> $@; \ fi echo '};' >> $@ else libcdio_paranoia_la_LDFLAGS = $(libcdio_paranoia_la_ldflags) endif MOSTLYCLEANFILES = libcdio_paranoia.la.ver libcdio-0.83/lib/paranoia/overlap.h0000644000175000017500000000246411114145233014154 00000000000000/* $Id: overlap.h,v 1.2 2008/04/17 17:39:48 karl Exp $ Copyright (C) 2004, 2008 Rocky Bernstein Copyright (C) 1998 Monty xiphmont@mit.edu This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef _OVERLAP_H_ #define _OVERLAP_H_ extern void offset_add_value(cdrom_paranoia_t *p,offsets *o,long value, void(*callback)(long int, paranoia_cb_mode_t)); extern void offset_clear_settings(offsets *o); extern void offset_adjust_settings(cdrom_paranoia_t *p, void(*callback)(long, paranoia_cb_mode_t)); extern void i_paranoia_trim(cdrom_paranoia_t *p,long beginword,long endword); extern void paranoia_resetall(cdrom_paranoia_t *p); extern void paranoia_resetcache(cdrom_paranoia_t *p); #endif /*_OVERLAP_H_*/ libcdio-0.83/lib/paranoia/paranoia.c0000644000175000017500000030775411650126167014315 00000000000000/* Copyright (C) 2004, 2005, 2006, 2008, 2011 Rocky Bernstein Copyright (C) 1998 Monty xiphmont@mit.edu This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /*** * Toplevel file for the paranoia abstraction over the cdda lib * ***/ /* immediate todo:: */ /* Allow disabling of root fixups? */ /* Dupe bytes are creeping into cases that require greater overlap than a single fragment can provide. We need to check against a larger area* (+/-32 sectors of root?) to better eliminate dupes. Of course this leads to other problems... Is it actually a practically solvable problem? */ /* Bimodal overlap distributions break us. */ /* scratch detection/tolerance not implemented yet */ /*************************************************************** Da new shtick: verification now a two-step assymetric process. A single 'verified/reconstructed' data segment cache, and then the multiple fragment cache verify a newly read block against previous blocks; do it only this once. We maintain a list of 'verified sections' from these matches. We then glom these verified areas into a new data buffer. Defragmentation fixups are allowed here alone. We also now track where read boundaries actually happened; do not verify across matching boundaries. **************************************************************/ /*************************************************************** Silence. "It's BAAAAAAaaack." audio is now treated as great continents of values floating on a mantle of molten silence. Silence is not handled by basic verification at all; we simply anchor sections of nonzero audio to a position and fill in everything else as silence. We also note the audio that interfaces with silence; an edge must be 'wet'. **************************************************************/ /* =========================================================================== * Let's translate the above vivid metaphor into something a mere mortal * can understand: * * Non-silent audio is "solid." Silent audio is "wet" and fluid. The reason * to treat silence as fluid is that if there's a long enough span of * silence, we can't reliably detect jitter or dropped samples within that * span (since all silence looks alike). Non-silent audio, on the other * hand, is distinctive and can be reliably reassembled. * * So we treat long spans of silence specially. We only consider an edge * of a non-silent region ("continent" or "island") to be "wet" if it borders * a long span of silence. Short spans of silence are merely damp and can * be reliably placed within a continent. * * We position ("anchor") the non-silent regions somewhat arbitrarily (since * they may be jittered and we have no way to verify their exact position), * and fill the intervening space with silence. * * See i_silence_match() for the gory details. * =========================================================================== */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #ifdef HAVE_STDLIB_H #include #endif #include #include #ifdef HAVE_STRING_H #include #endif #include #include #include "../cdda_interface/smallft.h" #include "p_block.h" #include #include "overlap.h" #include "gap.h" #include "isort.h" const char *paranoia_cb_mode2str[] = { "read", "verify", "fixup edge", "fixup atom", "scratch", "repair", "skip", "drift", "backoff", "overlap", "fixup dropped", "fixup duplicated", "read error" }; /** The below variables are trickery to force the above enum symbol values to be recorded in debug symbol tables. They are used to allow one to refer to the enumeration value names in the typedefs above in a debugger and debugger expressions */ paranoia_mode_t debug_paranoia_mode; paranoia_cb_mode_t debug_paranoia_cb_mode; static inline long re(root_block *root) { if (!root)return(-1); if (!root->vector)return(-1); return(ce(root->vector)); } static inline long rb(root_block *root) { if (!root)return(-1); if (!root->vector)return(-1); return(cb(root->vector)); } static inline long rs(root_block *root) { if (!root)return(-1); if (!root->vector)return(-1); return(cs(root->vector)); } static inline int16_t * rv(root_block *root){ if (!root)return(NULL); if (!root->vector)return(NULL); return(cv(root->vector)); } #define rc(r) (r->vector) /** Flags indicating the status of a read samples. Imagine the below enumeration values are #defines to be used in a bitmask rather than distinct values of an enum. The variable part of the declaration is trickery to force the enum symbol values to be recorded in debug symbol tables. They are used to allow one refer to the enumeration value names in a debugger and in debugger expressions. */ enum { FLAGS_EDGE =0x1, /**< first/last N words of frame */ FLAGS_UNREAD =0x2, /**< unread, hence missing and unmatchable */ FLAGS_VERIFIED=0x4 /**< block read and verified */ } paranoia_read_flags; /**** matching and analysis code *****************************************/ /* =========================================================================== * i_paranoia_overlap() (internal) * * This function is called when buffA[offsetA] == buffB[offsetB]. This * function searches backward and forward to see how many consecutive * samples also match. * * This function is called by do_const_sync() when we're not doing any * verification. Its more complicated sibling is i_paranoia_overlap2. * * This function returns the number of consecutive matching samples. * If (ret_begin) or (ret_end) are not NULL, it fills them with the * offsets of the first and last matching samples in A. */ static inline long i_paranoia_overlap(int16_t *buffA,int16_t *buffB, long offsetA, long offsetB, long sizeA,long sizeB, long *ret_begin, long *ret_end) { long beginA=offsetA,endA=offsetA; long beginB=offsetB,endB=offsetB; /* Scan backward to extend the matching run in that direction. */ for(; beginA>=0 && beginB>=0; beginA--,beginB--) if (buffA[beginA] != buffB[beginB]) break; beginA++; beginB++; /* Scan forward to extend the matching run in that direction. */ for(; endA=0 && beginB>=0; beginA--,beginB--) { if (buffA[beginA] != buffB[beginB]) break; /* don't allow matching across matching sector boundaries */ /* Stop if both samples were at the edges of a low-level read. * ???: What implications does this have? * ???: Why do we include the first sample for which this is true? */ if ((flagsA[beginA]&flagsB[beginB]&FLAGS_EDGE)) { beginA--; beginB--; break; } /* don't allow matching through known missing data */ if ((flagsA[beginA]&FLAGS_UNREAD) || (flagsB[beginB]&FLAGS_UNREAD)) break; } beginA++; beginB++; /* Scan forward to extend the matching run in that direction. */ for (; endAflags; long ret=0; /* If we're doing any verification whatsoever, we have flags in stage * 1, and will take them into account. Otherwise (e.g. in stage 2), * we just do the simple equality test for samples on both sides of * the initial match. */ if (flagB==NULL) ret=i_paranoia_overlap(cv(A), iv(B), posA, posB, cs(A), is(B), begin, end); else if ((flagB[posB]&FLAGS_UNREAD)==0) ret=i_paranoia_overlap2(cv(A), iv(B), flagA, flagB, posA, posB, cs(A), is(B), begin, end); /* Small matching runs could just be coincidental. We only consider this * a real match if it's long enough. */ if (ret > MIN_WORDS_SEARCH) { *offset=+(posA+cb(A))-(posB+ib(B)); /* Note that try_sort_sync()'s swaps A & B when it calls this function, * so while we adjust begin & end to be relative to A here, that means * it's relative to B in try_sort_sync(). */ *begin+=cb(A); *end+=cb(A); return(ret); } return(0); } /* =========================================================================== * try_sort_sync() (internal) * * Starting from the sample in B with the absolute position (post), look * for a matching run in A. This search will look in A for a first * matching sample within (p->dynoverlap) samples around (post). If it * finds one, it will then determine how many consecutive samples match * both A and B from that point, looking backwards and forwards. If * this search produces a matching run longer than MIN_WORDS_SEARCH, we * consider it a match. * * When used by stage 1, the "post" is planted with respect to the old * c_block being compare to the new c_block. In stage 2, the "post" is * planted with respect to the verified root. * * This function returns 1 if a match is found and 0 if not. When a match * is found, (begin) and (end) are set to the boundaries of the run, and * (offset) is set to the difference in position of the run in A and B. * (begin) and (end) are the absolute positions of the samples in * B. (offset) transforms A to B's frame of reference. I.e., an offset of * 2 would mean that A's absolute 3 is equivalent to B's 5. */ /* post is w.r.t. B. in stage one, we post from old. In stage 2 we post from root. Begin, end, offset count from B's frame of reference */ static inline long int try_sort_sync(cdrom_paranoia_t *p, sort_info_t *A, unsigned char *Aflags, c_block_t *B, long int post, long int *begin, long int *end, long *offset, void (*callback)(long int, paranoia_cb_mode_t)) { long int dynoverlap=p->dynoverlap; sort_link_t *ptr=NULL; unsigned char *Bflags=B->flags; /* block flag matches FLAGS_UNREAD (and hence unmatchable) */ if (Bflags==NULL || (Bflags[post-cb(B)]&FLAGS_UNREAD)==0){ /* always try absolute offset zero first! */ { long zeropos=post-ib(A); if (zeropos>=0 && zeroposstage1),*offset,callback); return(1); } } } } } else return(0); /* If the samples with the same absolute position didn't match, it's * either a bad sample, or the two c_blocks are jittered with respect * to each other. Now we search through A for samples that do have * the same value as B's post. The search looks from first to last * occurrence witin (dynoverlap) samples of (post). */ ptr=sort_getmatch(A,post-ib(A),dynoverlap,cv(B)[post-cb(B)]); while (ptr){ /* We've found a matching sample, so try to grow the matching run in * both directions. If we find a long enough run (longer than * MIN_WORDS_SEARCH), we've found a match. */ if (do_const_sync(B,A,Aflags, post-cb(B),ipos(A,ptr), begin,end,offset)){ /* ???BUG??? Jitter cannot be accurately detected when there are * large regions of silence. Silence all looks alike, so if * there is actually jitter but lots of silence, jitter (offset) * will be incorrectly identified as 0. When the incorrect zero * jitter is passed to offset_add_value, it eventually reduces * dynoverlap so much that it's impossible for stage 2 to merge * jittered fragments into the root (it doesn't search far enough). * * A potential solution (tested, but not committed) is to check * for silence in do_const_sync and simply not call * offset_add_value if the match is all silence. * * This bug is not fixed yet. */ /* ???: To be studied. */ offset_add_value(p,&(p->stage1),*offset,callback); return(1); } /* The matching sample was just a fluke -- there weren't enough adjacent * samples that matched to consider a matching run. So now we check * for the next occurrence of that value in A. */ ptr=sort_nextmatch(A,ptr); } /* We didn't find any matches. */ *begin=-1; *end=-1; *offset=-1; return(0); } /* =========================================================================== * STAGE 1 MATCHING * * ???: Insert high-level explanation here. * =========================================================================== */ /* Top level of the first stage matcher */ /* We match each analysis point of new to the preexisting blocks recursively. We can also optionally maintain a list of fragments of the preexisting block that didn't match anything, and match them back afterward. */ #define OVERLAP_ADJ (MIN_WORDS_OVERLAP/2-1) /* =========================================================================== * stage1_matched() (internal) * * This function is called whenever stage 1 verification finds two identical * runs of samples from different reads. The runs must be more than * MIN_WORDS_SEARCH samples long. They may be jittered (i.e. their absolute * positions on the CD may not match due to inaccurate seeking) with respect * to each other, but they have been verified to have no dropped samples * within them. * * This function provides feedback via the callback mechanism and marks the * runs as verified. The details of the marking are somehwat subtle and * are described near the relevant code. * * Subsequent portions of the stage 1 code will build a verified fragment * from this run. The verified fragment will eventually be merged * into the verified root (and its absolute position determined) in * stage 2. */ static inline void stage1_matched(c_block_t *old, c_block_t *new, long matchbegin,long matchend, long matchoffset, void (*callback)(long int, paranoia_cb_mode_t)) { long i; long oldadjbegin=matchbegin-cb(old); long oldadjend=matchend-cb(old); long newadjbegin=matchbegin-matchoffset-cb(new); long newadjend=matchend-matchoffset-cb(new); /* Provide feedback via the callback about the samples we've just * verified. * * ???: How can matchbegin ever be < cb(old)? * * ???: Why do edge samples get logged only when there's jitter * between the matched runs (matchoffset != 0)? */ if ( matchbegin-matchoffset<=cb(new) || matchbegin<=cb(old) || (new->flags[newadjbegin]&FLAGS_EDGE) || (old->flags[oldadjbegin]&FLAGS_EDGE) ) { if ( matchoffset && callback ) (*callback)(matchbegin,PARANOIA_CB_FIXUP_EDGE); } else if (callback) (*callback)(matchbegin,PARANOIA_CB_FIXUP_ATOM); if ( matchend-matchoffset>=ce(new) || (new->flags[newadjend]&FLAGS_EDGE) || matchend>=ce(old) || (old->flags[oldadjend]&FLAGS_EDGE) ) { if ( matchoffset && callback ) (*callback)(matchend,PARANOIA_CB_FIXUP_EDGE); } else if (callback) (*callback)(matchend, PARANOIA_CB_FIXUP_ATOM); #if TRACE_PARANOIA & 1 fprintf(stderr, "- Matched [%ld-%ld] against [%ld-%ld]\n", newadjbegin+cb(new), newadjend+cb(new), oldadjbegin+cb(old), oldadjend+cb(old)); #endif /* Mark verified samples as "verified," but trim the verified region * by OVERLAP_ADJ samples on each side. There are several significant * implications of this trimming: * * 1) Why we trim at all: We have to trim to distinguish between two * adjacent verified runs and one long verified run. We encounter this * situation when samples have been dropped: * * matched portion of read 1 ....)(.... matched portion of read 1 * read 2 adjacent run .....)(..... read 2 adjacent run * || * dropped samples in read 2 * * So at this point, the fact that we have two adjacent runs means * that we have not yet verified that the two runs really are adjacent. * (In fact, just the opposite: there are two runs because they were * matched by separate runs, indicating that some samples didn't match * across the length of read 2.) * * If we verify that they are actually adjacent (e.g. if the two runs * are simply a result of matching runs from different reads, not from * dropped samples), we will indeed mark them as one long merged run. * * 2) Why we trim by this amount: We want to ensure that when we * verify the relationship between these two runs, we do so with * an overlapping fragment at least OVERLAP samples long. Following * from the above example: * * (..... matched portion of read 3 .....) * read 2 adjacent run .....)(..... read 2 adjacent run * * Assuming there were no dropped samples between the adjacent runs, * the matching portion of read 3 will need to be at least OVERLAP * samples long to mark the two runs as one long verified run. * If there were dropped samples, read 3 wouldn't match across the * two runs, proving our caution worthwhile. * * 3) Why we partially discard the work we've done: We don't. * When subsequently creating verified fragments from this run, * we compensate for this trimming. Thus the verified fragment will * contain the full length of verified samples. Only the c_blocks * will reflect this trimming. * * ???: The comment below indicates that the sort cache is updated in * some way, but this does not appear to be the case. */ /* Mark the verification flags. Don't mark the first or last OVERLAP/2 elements so that overlapping fragments have to overlap by OVERLAP to actually merge. We also remove elements from the sort such that later sorts do not have to sift through already matched data */ newadjbegin+=OVERLAP_ADJ; newadjend-=OVERLAP_ADJ; for(i=newadjbegin;iflags[i]|=FLAGS_VERIFIED; /* mark verified */ oldadjbegin+=OVERLAP_ADJ; oldadjend-=OVERLAP_ADJ; for(i=oldadjbegin;iflags[i]|=FLAGS_VERIFIED; /* mark verified */ } /* =========================================================================== * i_iterate_stage1 (internal) * * This function is called by i_stage1() to compare newly read samples with * previously read samples, searching for contiguous runs of identical * samples. Matching runs indicate that at least two reads of the CD * returned identical data, with no dropped samples in that run. * The runs may be jittered (i.e. their absolute positions on the CD may * not be accurate due to inaccurate seeking) at this point. Their * positions will be determined in stage 2. * * This function compares the new c_block (which has been indexed in * p->sortcache) to a previous c_block. It is called for each previous * c_block. It searches for runs of identical samples longer than * MIN_WORDS_SEARCH. Samples in matched runs are marked as verified. * * Subsequent stage 1 code builds verified fragments from the runs of * verified samples. These fragments are merged into the verified root * in stage 2. * * This function returns the number of distinct runs verified in the new * c_block when compared against this old c_block. */ static long int i_iterate_stage1(cdrom_paranoia_t *p, c_block_t *old, c_block_t *new, void(*callback)(long int, paranoia_cb_mode_t)) { long matchbegin = -1; long matchend = -1; long matchoffset; /* ???: Why do we limit our search only to the samples with overlapping * absolute positions? It could be because it eliminates some further * bounds checking. * * Why do we "no longer try to spread the ... search" as mentioned below? */ /* we no longer try to spread the stage one search area by dynoverlap */ long searchend = min(ce(old), ce(new)); long searchbegin = max(cb(old), cb(new)); long searchsize = searchend-searchbegin; sort_info_t *i = p->sortcache; long ret = 0; long int j; long tried = 0; long matched = 0; if (searchsize<=0) return(0); /* match return values are in terms of the new vector, not old */ /* ???: Why 23? */ for (j=searchbegin; jflags[j-cb(new)] & (FLAGS_VERIFIED|FLAGS_UNREAD)) == 0) { tried++; /* Starting from the sample in the old c_block with the absolute * position j, look for a matching run in the new c_block. This * search will look a certain distance around j, and if successful * will extend the matching run as far backward and forward as * it can. * * The search will only return 1 if it finds a matching run long * enough to be deemed significant. */ if (try_sort_sync(p, i, new->flags, old, j, &matchbegin, &matchend, &matchoffset, callback) == 1) { matched+=matchend-matchbegin; /* purely cosmetic: if we're matching zeros, don't use the callback because they will appear to be all skewed */ { long j = matchbegin-cb(old); long end = matchend-cb(old); for (; j j) j = matchend-1; } } } /* end for */ #ifdef NOISY fprintf(stderr,"iterate_stage1: search area=%ld[%ld-%ld] tried=%ld matched=%ld spans=%ld\n", searchsize,searchbegin,searchend,tried,matched,ret); #endif return(ret); } /* =========================================================================== * i_stage1() (internal) * * Compare newly read samples against previously read samples, searching * for contiguous runs of identical samples. Matching runs indicate that * at least two reads of the CD returned identical data, with no dropped * samples in that run. The runs may be jittered (i.e. their absolute * positions on the CD may not be accurate due to inaccurate seeking) at * this point. Their positions will be determined in stage 2. * * This function compares a new c_block against all other c_blocks in memory, * searching for sufficiently long runs of identical samples. Since each * c_block represents a separate call to read_c_block, this ensures that * multiple reads have returned identical data. (Additionally, read_c_block * varies the reads so that multiple reads are unlikely to produce identical * errors, so any matches between reads are considered verified. See * i_read_c_block for more details.) * * Each time we find such a run (longer than MIN_WORDS_SEARCH), we mark * the samples as "verified" in both c_blocks. Runs of verified samples in * the new c_block are promoted into verified fragments, which will later * be merged into the verified root in stage 2. * * In reality, not all the verified samples are marked as "verified." * See stage1_matched() for an explanation. * * This function returns the number of verified fragments created by the * stage 1 matching. */ static long int i_stage1(cdrom_paranoia_t *p, c_block_t *p_new, void (*callback)(long int, paranoia_cb_mode_t)) { long size=cs(p_new); c_block_t *ptr=c_last(p); int ret=0; long int begin=0; long int end; #if TRACE_PARANOIA & 1 long int block_count = 0; fprintf(stderr, "Verifying block %ld:[%ld-%ld] against previously read blocks...\n", p->cache->active, cb(p_new), ce(p_new)); #endif /* We're going to be comparing the new c_block against the other * c_blocks in memory. Initialize the "sort cache" index to allow * for fast searching through the new c_block. (The index will * actually be built the first time we search.) */ if (ptr) sort_setup( p->sortcache, cv(p_new), &cb(p_new), cs(p_new), cb(p_new), ce(p_new) ); /* Iterate from oldest to newest c_block, comparing the new c_block * to each, looking for a sufficiently long run of identical samples * (longer than MIN_WORDS_SEARCH), which will be marked as "verified" * in both c_blocks. * * Since the new c_block is already in the list (at the head), don't * compare it against itself. */ while ( ptr && ptr != p_new ) { #if TRACE_PARANOIA & 1 block_count++; fprintf(stderr, "- Verifying against block %ld:[%ld-%ld] dynoverlap=%ld\n", block_count, cb(ptr), ce(ptr), p->dynoverlap); #endif if (callback) (*callback)(cb(p_new), PARANOIA_CB_VERIFY); i_iterate_stage1(p,ptr,p_new,callback); ptr=c_prev(ptr); } /* parse the verified areas of p_new into v_fragments */ /* Find each run of contiguous verified samples in the new c_block * and create a verified fragment from each run. */ begin=0; while (beginflags[begin]&FLAGS_VERIFIED) break; for (end=begin; end < size; end++) if ((p_new->flags[end]&FLAGS_VERIFIED)==0) break; if (begin>=size) break; ret++; /* We create a new verified fragment from the contiguous run * of verified samples. * * We expand the "verified" range by OVERLAP_ADJ on each side * to compensate for trimming done to the verified range by * stage1_matched(). The samples were actually verified, and * hence belong in the verified fragment. See stage1_matched() * for an explanation of the trimming. */ new_v_fragment(p,p_new,cb(p_new)+max(0,begin-OVERLAP_ADJ), cb(p_new)+min(size,end+OVERLAP_ADJ), (end+OVERLAP_ADJ>=size && p_new->lastsector)); begin=end; } /* Return the number of distinct verified fragments we found with * stage 1 matching. */ return(ret); } /* =========================================================================== * STAGE 2 MATCHING * * ???: Insert high-level explanation here. * =========================================================================== */ typedef struct sync_result { long offset; long begin; long end; } sync_result_t; /* Reconcile v_fragments to root buffer. Free if matched, fragment/fixup root if necessary. Do *not* match using zero posts */ /* =========================================================================== * i_iterate_stage2 (internal) * * This function searches for a sufficiently long run of identical samples * between the passed verified fragment and the verified root. The search * is similar to that performed by i_iterate_stage1. Of course, what we do * as a result of a match is different. * * Our search is slightly different in that we refuse to match silence to * silence. All silence looks alike, and it would result in too many false * positives here, so we handle silence separately. * * Also, because we're trying to determine whether this fragment as a whole * overlaps with the root at all, we narrow our search (since it should match * immediately or not at all). This is in contrast to stage 1, where we * search the entire vector looking for all possible matches. * * This function returns 0 if no match was found (including failure to find * one due to silence), or 1 if we found a match. * * When a match is found, the sync_result_t is set to the boundaries of * matching run (begin/end, in terms of the root) and how far out of sync * the fragment is from the canonical root (offset). Note that this offset * is opposite in sign from the notion of offset used by try_sort_sync() * and stage 1 generally. */ static long int i_iterate_stage2(cdrom_paranoia_t *p, v_fragment_t *v, sync_result_t *r, void(*callback)(long int, paranoia_cb_mode_t)) { root_block *root=&(p->root); long matchbegin=-1,matchend=-1,offset; long fbv,fev; #if TRACE_PARANOIA & 2 fprintf(stderr, "- Comparing fragment [%ld-%ld] to root [%ld-%ld]...", fb(v), fe(v), rb(root), re(root)); #endif #ifdef NOISY fprintf(stderr,"Stage 2 search: fbv=%ld fev=%ld\n",fb(v),fe(v)); #endif /* Quickly check whether there could possibly be any overlap between * the verified fragment and the root. Our search will allow up to * (p->dynoverlap) jitter between the two, so we expand the fragment * search area by p->dynoverlap on both sides and see if that expanded * area overlaps with the root. * * We could just as easily expand root's boundaries by p->dynoverlap * instead and achieve the same result. */ if (min(fe(v) + p->dynoverlap,re(root)) - max(fb(v) - p->dynoverlap,rb(root)) <= 0) return(0); if (callback) (*callback)(fb(v), PARANOIA_CB_VERIFY); /* We're going to try to match the fragment to the root while allowing * for p->dynoverlap jitter, so we'll actually be looking at samples * in the fragment whose position claims to be up to p->dynoverlap * outside the boundaries of the root. But, of course, don't extend * past the edges of the fragment. */ fbv = max(fb(v), rb(root)-p->dynoverlap); /* Skip past leading zeroes in the fragment, and bail if there's nothing * but silence. We handle silence later separately. */ while (fbvdynoverlap outside the boundaries * of the root, but don't extend past the edges of the fragment. * * However, we also limit the search to no more than 256 samples. * Unlike stage 1, we're not trying to find all possible matches within * two runs -- rather, we're trying to see if the fragment as a whole * overlaps with the root. If we can't find a match within 256 samples, * there's probably no match to be found (because this fragment doesn't * overlap with the root). * * ??? Is this why? Why 256? */ fev = min(min(fbv+256, re(root)+p->dynoverlap), fe(v)); { /* Because we'll allow for up to (p->dynoverlap) jitter between the * fragment and the root, we expand the search area (fbv to fev) by * p->dynoverlap on both sides. But, because we're iterating through * root, we need to constrain the search area not to extend beyond * the root's boundaries. */ long searchend=min(fev+p->dynoverlap,re(root)); long searchbegin=max(fbv-p->dynoverlap,rb(root)); sort_info_t *i=p->sortcache; long j; /* Initialize the "sort cache" index to allow for fast searching * through the verified fragment between (fbv,fev). (The index will * actually be built the first time we search.) */ sort_setup(i, fv(v), &fb(v), fs(v), fbv, fev); /* ??? Why 23? */ for(j=searchbegin; jbegin=matchbegin; r->end=matchend; r->offset=-offset; if (offset)if (callback)(*callback)(r->begin,PARANOIA_CB_FIXUP_EDGE); return(1); } } } return(0); } /* =========================================================================== * i_silence_test() (internal) * * If the entire root is silent, or there's enough trailing silence * to be significant (MIN_SILENCE_BOUNDARY samples), mark the beginning * of the silence and "light" the silence flag. This flag will remain lit * until i_silence_match() appends some non-silent samples to the root. * * We do this because if there's a long enough span of silence, we can't * reliably detect jitter or dropped samples within that span. See * i_silence_match() for details on how we recover from this situation. */ static void i_silence_test(root_block *root) { int16_t *vec=rv(root); long end=re(root)-rb(root)-1; long j; /* Look backward from the end of the root to find the first non-silent * sample. */ for(j=end-1;j>=0;j--) if (vec[j]!=0) break; /* If the entire root is silent, or there's enough trailing silence * to be significant, mark the beginning of the silence and "light" * the silence flag. */ if (j<0 || end-j>MIN_SILENCE_BOUNDARY) { /* ???BUG???: * * The original code appears to have a bug, as it points to the * last non-zero sample, and silence matching appears to treat * silencebegin as the first silent sample. As a result, in certain * situations, the last non-zero sample can get clobbered. * * This bug has been tentatively fixed, since it allows more regression * tests to pass. The original code was: * if (j<0)j=0; */ j++; root->silenceflag=1; root->silencebegin=rb(root)+j; /* ???: To be studied. */ if (root->silencebeginreturnedlimit) root->silencebegin=root->returnedlimit; } } /* =========================================================================== * i_silence_match() (internal) * * This function is merges verified fragments into the verified root in cases * where there is a problematic amount of silence (MIN_SILENCE_BOUNDARY * samples) at the end of the root. * * We need a special approach because if there's a long enough span of * silence, we can't reliably detect jitter or dropped samples within that * span (since all silence looks alike). * * Only fragments that begin with MIN_SILENCE_BOUNDARY samples are eligible * to be merged in this case. Fragments that are too far beyond the edge * of the root to possibly overlap are also disregarded. * * Our first approach is to assume that such fragments have no jitter (since * we can't establish otherwise) and merge them. However, if it's clear * that there must be jitter (i.e. because non-silent samples overlap when * we assume no jitter), we assume the fragment has the minimum possible * jitter and then merge it. * * This function extends silence fairly aggressively, so it must be called * with fragments in ascending order (beginning position) in case there are * small non-silent regions within the silence. */ static long int i_silence_match(root_block *root, v_fragment_t *v, void(*callback)(long int, paranoia_cb_mode_t)) { cdrom_paranoia_t *p=v->p; int16_t *vec=fv(v); long end=fs(v),begin; long j; #if TRACE_PARANOIA & 2 fprintf(stderr, "- Silence matching fragment [%ld-%ld] to root [%ld-%ld]" " silencebegin=%ld\n", fb(v), fe(v), rb(root), re(root), root->silencebegin); #endif /* See how much leading silence this fragment has. If there are fewer than * MIN_SILENCE_BOUNDARY leading silent samples, we don't do this special * silence matching. * * This fragment could actually belong here, but we can't be sure unless * it has enough silence on its leading edge. This fragment will likely * stick around until we do successfully extend the root, at which point * it will be merged using the usual method. */ if (enddynoverlap samples of the end of root). */ if (fb(v)>=re(root) && fb(v)-p->dynoverlapsilencebegin); end = min(j,re(root)); /* If there is an overlap, we assume that both the root and the fragment * are jitter-free (since there's no way for us to tell otherwise). */ if (beginre(root)){ long int voff = begin-fb(v); /* Truncate the overlapping silence from the end of the root. */ c_remove(rc(root),begin-rb(root),-1); /* Append the fragment to the root, starting from the point of overlap. */ c_append(rc(root),vec+voff,fs(v)-voff); #if TRACE_PARANOIA & 2 fprintf(stderr, "* Adding [%ld-%ld] to root (no jitter)\n", begin, re(root)); #endif } /* Record the fact that we merged this fragment assuming zero jitter. */ offset_add_value(p,&p->stage2,0,callback); } else { /* We weren't able to merge the fragment assuming zero jitter. * * Check whether the fragment's leading silence ends before the root's * trailing silence begins. If it does, we assume that the root is * jittered forward. */ if (jre(root)) { /* Truncate the trailing silence from the root. */ c_remove(rc(root),root->silencebegin-rb(root),-1); /* Append the non-silent tail of the fragment to the root. */ c_append(rc(root),vec+voff,fs(v)-voff); #if TRACE_PARANOIA & 2 fprintf(stderr, "* Adding [%ld-%ld] to root (jitter=%ld)\n", root->silencebegin, re(root), end-begin); #endif } /* Record the fact that we merged this fragment assuming (end-begin) * jitter. */ offset_add_value(p,&p->stage2,end-begin,callback); } else /* We only get here if the fragment is past the end of the root, * which means it must be farther than (dynoverlap) away, due to our * root extension above. */ /* We weren't able to merge this fragment into the root after all. */ return(0); } /* We only get here if we merged the fragment into the root. Update * the root's silence flag. * * Note that this is the only place silenceflag is reset. In other words, * once i_silence_test() lights the silence flag, it can only be reset * by i_silence_match(). */ root->silenceflag = 0; /* Now see if the new, extended root ends in silence. */ i_silence_test(root); /* Since we merged the fragment, we can free it now. But first we propagate * its lastsector flag. */ if (v->lastsector) root->lastsector=1; free_v_fragment(v); return(1); } /* =========================================================================== * i_stage2_each (internal) * * This function (which is entirely too long) attempts to merge the passed * verified fragment into the verified root. * * First this function looks for a run of identical samples between * the root and the fragment. If it finds a long enough run, it then * checks for "rifts" (see below) and fixes the root and/or fragment as * necessary. Finally, if the fragment will extend the tail of the root, * we merge the fragment and extend the root. * * Most of the ugliness in this function has to do with handling "rifts", * which are points of disagreement between the root and the verified * fragment. This can happen when a drive consistently drops a few samples * or stutters and repeats a few samples. It has to be consistent enough * to result in a verified fragment (i.e. it happens twice), but inconsistent * enough (e.g. due to the jiggled reads) not to happen every time. * * This function returns 1 if the fragment was successfully merged into the * root, and 0 if not. */ static long int i_stage2_each(root_block *root, v_fragment_t *v, void(*callback)(long int, paranoia_cb_mode_t)) { /* If this fragment has already been merged & freed, abort. */ if (!v || !v->one) return(0); cdrom_paranoia_t *p=v->p; /* ??? Why do we round down to an even dynoverlap? */ long dynoverlap=p->dynoverlap/2*2; /* If there's no verified root yet, abort. */ if (!rv(root)){ return(0); } else { sync_result_t r; /* Search for a sufficiently long run of identical samples between * the verified fragment and the verified root. There's a little * bit of subtlety in the search when silence is involved. */ if (i_iterate_stage2(p,v,&r,callback)){ /* Convert the results of the search to be relative to the root. */ long int begin=r.begin-rb(root); long int end=r.end-rb(root); /* Convert offset into a value that will transform a relative * position in the root to the corresponding relative position in * the fragment. I.e., if offset = -2, then the sample at relative * position 2 in the root is at relative position 0 in the fragment. * * While a bit opaque, this does reduce the number of calculations * below. */ long int offset=r.begin+r.offset-fb(v)-begin; long int temp; c_block_t *l=NULL; /* we have a match! We don't rematch off rift, we chase the match all the way to both extremes doing rift analysis. */ #if TRACE_PARANOIA & 2 fprintf(stderr, "matched [%ld-%ld], offset=%ld\n", r.begin, r.end, r.offset); int traced = 0; #endif #ifdef NOISY fprintf(stderr,"Stage 2 match\n"); #endif /* Now that we've found a sufficiently long run of identical samples * between the fragment and the root, we need to check for rifts. * * A "rift", as mentioned above, is a disagreement between the * fragment and the root. When there's a rift, the matching run * found by i_iterate_stage2() will obviously stop where the root * and the fragment disagree. * * So we detect rifts by checking whether the matching run extends * to the ends of the fragment and root. If the run does extend to * the ends of the fragment and root, then all overlapping samples * agreed, and there's no rift. If, however, the matching run * stops with samples left over in both the root and the fragment, * that means the root and fragment disagreed at that point. * Leftover samples at the beginning of the match indicate a * leading rift, and leftover samples at the end of the match indicate * a trailing rift. * * Once we detect a rift, we attempt to fix it, depending on the * nature of the disagreement. See i_analyze_rift_[rf] for details * on how we determine what kind of rift it is. See below for * how we attempt to fix the rifts. */ /* First, check for a leading rift, fix it if possible, and then * extend the match forward until either we hit the limit of the * overlapping samples, or until we encounter another leading rift. * Keep doing this until we hit the beginning of the overlap. * * Note that while we do fix up leading rifts, we don't extend * the root backward (earlier samples) -- only forward (later * samples). */ /* If the beginning of the match didn't reach the beginning of * either the fragment or the root, we have a leading rift to be * examined. * * Remember that (begin) is the offset into the root, and (begin+offset) * is the equivalent offset into the fragment. If neither one is at * zero, then they both have samples before the match, and hence a * rift. */ while ((begin+offset>0 && begin>0)){ long matchA=0,matchB=0,matchC=0; /* (begin) is the offset into the root of the first matching sample, * (beginL) is the offset into the fragment of the first matching * sample. These samples are at the edge of the rift. */ long beginL=begin+offset; #if TRACE_PARANOIA & 2 if ((traced & 1) == 0) { fprintf(stderr, "- Analyzing leading rift...\n"); traced |= 1; } #endif /* The first time we encounter a leading rift, allocate a * scratch copy of the verified fragment which we'll use if * we need to fix up the fragment before merging it into * the root. */ if (l==NULL){ int16_t *buff=malloc(fs(v)*sizeof(int16_t)); l=c_alloc(buff,fb(v),fs(v)); memcpy(buff,fv(v),fs(v)*sizeof(int16_t)); } /* Starting at the first mismatching sample, see how far back the * rift goes, and determine what kind of rift it is. Note that * we're searching through the fixed up copy of the fragment. * * matchA > 0 if there are samples missing from the root * matchA < 0 if there are duplicate samples (stuttering) in the root * matchB > 0 if there are samples missing from the fragment * matchB < 0 if there are duplicate samples in the fragment * matchC != 0 if there's a section of garbage, after which * the fragment and root agree and are in sync */ i_analyze_rift_r(rv(root),cv(l), rs(root),cs(l), begin-1,beginL-1, &matchA,&matchB,&matchC); #ifdef NOISY fprintf(stderr,"matching rootR: matchA:%ld matchB:%ld matchC:%ld\n", matchA,matchB,matchC); #endif /* ??? The root.returnedlimit checks below are presently a mystery. */ if (matchA){ /* There's a problem with the root */ if (matchA>0){ /* There were (matchA) samples dropped from the root. We'll add * them back from the fixed up fragment. */ if (callback) (*callback)(begin+rb(root)-1,PARANOIA_CB_FIXUP_DROPPED); if (rb(root)+beginroot.returnedlimit) break; else{ /* At the edge of the rift in the root, insert the missing * samples from the fixed up fragment. They're the (matchA) * samples immediately preceding the edge of the rift in the * fragment. */ c_insert(rc(root),begin,cv(l)+beginL-matchA, matchA); /* We just inserted (matchA) samples into the root, so update * our begin/end offsets accordingly. Also adjust the * (offset) to compensate (since we use it to find samples in * the fragment, and the fragment hasn't changed). */ offset-=matchA; begin+=matchA; end+=matchA; } } else { /* There were (-matchA) duplicate samples (stuttering) in the * root. We'll drop them. */ if (callback) (*callback)(begin+rb(root)-1,PARANOIA_CB_FIXUP_DUPED); if (rb(root)+begin+matchAroot.returnedlimit) break; else{ /* Remove the (-matchA) samples immediately preceding the * edge of the rift in the root. */ c_remove(rc(root),begin+matchA,-matchA); /* We just removed (-matchA) samples from the root, so update * our begin/end offsets accordingly. Also adjust the offset * to compensate. Remember that matchA < 0, so we're actually * subtracting from begin/end. */ offset-=matchA; begin+=matchA; end+=matchA; } } } else if (matchB){ /* There's a problem with the fragment */ if (matchB>0){ /* There were (matchB) samples dropped from the fragment. We'll * add them back from the root. */ if (callback) (*callback)(begin+rb(root)-1,PARANOIA_CB_FIXUP_DROPPED); /* At the edge of the rift in the fragment, insert the missing * samples from the root. They're the (matchB) samples * immediately preceding the edge of the rift in the root. * Note that we're fixing up the scratch copy of the fragment. */ c_insert(l,beginL,rv(root)+begin-matchB, matchB); /* We just inserted (matchB) samples into the fixed up fragment, * so update (offset), since we use it to find samples in the * fragment based on the root's unchanged offsets. */ offset+=matchB; } else { /* There were (-matchB) duplicate samples (stuttering) in the * fixed up fragment. We'll drop them. */ if (callback) (*callback)(begin+rb(root)-1,PARANOIA_CB_FIXUP_DUPED); /* Remove the (-matchB) samples immediately preceding the edge * of the rift in the fixed up fragment. */ c_remove(l,beginL+matchB,-matchB); /* We just removed (-matchB) samples from the fixed up fragment, * so update (offset), since we use it to find samples in the * fragment based on the root's unchanged offsets. */ offset+=matchB; } } else if (matchC){ /* There are (matchC) samples that simply disagree between the * fragment and the root. On the other side of the mismatch, the * fragment and root agree again. We can't classify the mismatch * as either a stutter or dropped samples, and we have no way of * telling whether the fragment or the root is right. * * The original comment indicated that we set "disagree" flags * in the root, but it seems to be historical. */ if (rb(root)+begin-matchCroot.returnedlimit) break; /* Overwrite the mismatching (matchC) samples in root with the * samples from the fixed up fragment. * * ??? Do we think the fragment is more likely correct, is this * just arbitrary, or is there some other reason for overwriting * the root? */ c_overwrite(rc(root),begin-matchC, cv(l)+beginL-matchC,matchC); } else { /* We may have had a mismatch because we ran into leading silence. * * ??? To be studied: why would this cause a mismatch? Neither * i_analyze_rift_r nor i_iterate_stage2() nor i_paranoia_overlap() * appear to take silence into consideration in this regard. * It could be due to our skipping of silence when searching for * a match. * * Since we don't extend the root in that direction, we don't * do anything, just move on to trailing rifts. */ /* If the rift was too complex to fix (see i_analyze_rift_r), * we just stop and leave the leading edge where it is. */ /*RRR(*callback)(post,PARANOIA_CB_XXX);*/ break; } /* Recalculate the offset of the edge of the rift in the fixed * up fragment, in case it changed. * * ??? Why is this done here rather than in the (matchB) case above, * which should be the only time beginL will change. */ beginL=begin+offset; /* Now that we've fixed up the root or fragment as necessary, see * how far we can extend the matching run. This function is * overkill, as it tries to extend the matching run in both * directions (and rematches what we already matched), but it works. */ i_paranoia_overlap(rv(root),cv(l), begin,beginL, rs(root),cs(l), &begin,&end); } /* end while (leading rift) */ /* Second, check for a trailing rift, fix it if possible, and then * extend the match forward until either we hit the limit of the * overlapping samples, or until we encounter another trailing rift. * Keep doing this until we hit the end of the overlap. */ /* If the end of the match didn't reach the end of either the fragment * or the root, we have a trailing rift to be examined. * * Remember that (end) is the offset into the root, and (end+offset) * is the equivalent offset into the fragment. If neither one is * at the end of the vector, then they both have samples after the * match, and hence a rift. * * (temp) is the size of the (potentially fixed-up) fragment. If * there was a leading rift, (l) is the fixed up fragment, and * (offset) is now relative to it. */ temp=l ? cs(l) : fs(v); while (end+offset 0 if there are samples missing from the root * matchA < 0 if there are duplicate samples (stuttering) in the root * matchB > 0 if there are samples missing from the fragment * matchB < 0 if there are duplicate samples in the fragment * matchC != 0 if there's a section of garbage, after which * the fragment and root agree and are in sync */ i_analyze_rift_f(rv(root),cv(l), rs(root),cs(l), end,endL, &matchA,&matchB,&matchC); #ifdef NOISY fprintf(stderr,"matching rootF: matchA:%ld matchB:%ld matchC:%ld\n", matchA,matchB,matchC); #endif /* ??? The root.returnedlimit checks below are presently a mystery. */ if (matchA){ /* There's a problem with the root */ if (matchA>0){ /* There were (matchA) samples dropped from the root. We'll add * them back from the fixed up fragment. */ if (callback)(*callback)(end+rb(root),PARANOIA_CB_FIXUP_DROPPED); if (end+rb(root)root.returnedlimit) break; /* At the edge of the rift in the root, insert the missing * samples from the fixed up fragment. They're the (matchA) * samples immediately preceding the edge of the rift in the * fragment. */ c_insert(rc(root),end,cv(l)+endL,matchA); /* Although we just inserted samples into the root, we did so * after (begin) and (end), so we needn't update those offsets. */ } else { /* There were (-matchA) duplicate samples (stuttering) in the * root. We'll drop them. */ if (callback)(*callback)(end+rb(root),PARANOIA_CB_FIXUP_DUPED); if (end+rb(root)root.returnedlimit) break; /* Remove the (-matchA) samples immediately following the edge * of the rift in the root. */ c_remove(rc(root),end,-matchA); /* Although we just removed samples from the root, we did so * after (begin) and (end), so we needn't update those offsets. */ } } else if (matchB){ /* There's a problem with the fragment */ if (matchB>0){ /* There were (matchB) samples dropped from the fragment. We'll * add them back from the root. */ if (callback)(*callback)(end+rb(root),PARANOIA_CB_FIXUP_DROPPED); /* At the edge of the rift in the fragment, insert the missing * samples from the root. They're the (matchB) samples * immediately following the dge of the rift in the root. * Note that we're fixing up the scratch copy of the fragment. */ c_insert(l,endL,rv(root)+end,matchB); /* Although we just inserted samples into the fragment, we did so * after (begin) and (end), so (offset) hasn't changed either. */ } else { /* There were (-matchB) duplicate samples (stuttering) in the * fixed up fragment. We'll drop them. */ if (callback)(*callback)(end+rb(root),PARANOIA_CB_FIXUP_DUPED); /* Remove the (-matchB) samples immediately following the edge * of the rift in the fixed up fragment. */ c_remove(l,endL,-matchB); /* Although we just removed samples from the fragment, we did so * after (begin) and (end), so (offset) hasn't changed either. */ } } else if (matchC){ /* There are (matchC) samples that simply disagree between the * fragment and the root. On the other side of the mismatch, the * fragment and root agree again. We can't classify the mismatch * as either a stutter or dropped samples, and we have no way of * telling whether the fragment or the root is right. * * The original comment indicated that we set "disagree" flags * in the root, but it seems to be historical. */ if (end+rb(root)root.returnedlimit) break; /* Overwrite the mismatching (matchC) samples in root with the * samples from the fixed up fragment. * * ??? Do we think the fragment is more likely correct, is this * just arbitrary, or is there some other reason for overwriting * the root? */ c_overwrite(rc(root),end,cv(l)+endL,matchC); } else { /* We may have had a mismatch because we ran into trailing silence. * * ??? To be studied: why would this cause a mismatch? Neither * i_analyze_rift_f nor i_iterate_stage2() nor i_paranoia_overlap() * appear to take silence into consideration in this regard. * It could be due to our skipping of silence when searching for * a match. */ /* At this point we have a trailing rift. We check whether * one of the vectors (fragment or root) has trailing silence. */ analyze_rift_silence_f(rv(root),cv(l), rs(root),cs(l), end,endL, &matchA,&matchB); if (matchA){ /* The contents of the root's trailing rift are silence. The * fragment's are not (otherwise there wouldn't be a rift). * We therefore assume that the root has garbage from this * point forward and truncate it. * * This will have the effect of eliminating the trailing * rift, causing the fragment's samples to be appended to * the root. * * ??? Does this have any negative side effects? Why is this * a good idea? */ /* ??? TODO: returnedlimit */ /* Can only do this if we haven't already returned data */ if (end+rb(root)>=p->root.returnedlimit){ c_remove(rc(root),end,-1); } } else if (matchB){ /* The contents of the fragment's trailing rift are silence. * The root's are not (otherwise there wouldn't be a rift). * We therefore assume that the fragment has garbage from this * point forward. * * We needn't actually truncate the fragment, because the root * has already been fixed up from this fragment as much as * possible, and the truncated fragment wouldn't extend the * root. Therefore, we can consider this (truncated) fragment * to be already merged into the root. So we dispose of it and * return a success. */ if (l)i_cblock_destructor(l); free_v_fragment(v); return(1); } else { /* If the rift was too complex to fix (see i_analyze_rift_f), * we just stop and leave the trailing edge where it is. */ /*RRR(*callback)(post,PARANOIA_CB_XXX);*/ } break; } /* Now that we've fixed up the root or fragment as necessary, see * how far we can extend the matching run. This function is * overkill, as it tries to extend the matching run in both * directions (and rematches what we already matched), but it works. */ i_paranoia_overlap(rv(root),cv(l), begin,beginL, rs(root),cs(l), NULL,&end); /* ???BUG??? (temp) never gets updated within the loop, even if the * fragment gets fixed up. In contrast, rs(root) is inherently * updated when the verified root gets fixed up. * * This bug is not fixed yet. */ } /* end while (trailing rift) */ /* Third and finally, if the overlapping verified fragment extends * our range forward (later samples), we append ("glom") the new * samples to the end of the root. * * Note that while we did fix up leading rifts, we don't extend * the root backward (earlier samples) -- only forward (later * samples). * * This is generally fine, since the verified root is supposed to * slide from earlier samples to later samples across multiple calls * to paranoia_read(). * * ??? But, is this actually right? Because of this, we don't * extend the root to hold the earliest read sample, if we happened * to initialize the root with a later sample due to jitter. * There are probably some ugly side effects from extending the root * backward, in the general case, but it may not be so dire if we're * near sample 0. To be investigated. */ { long sizeA=rs(root); long sizeB; long vecbegin; int16_t *vector; /* If there were any rifts, we'll use the fixed up fragment (l), * otherwise, we use the original fragment (v). */ if (l){ sizeB=cs(l); vector=cv(l); vecbegin=cb(l); } else { sizeB=fs(v); vector=fv(v); vecbegin=fb(v); } /* Convert the fragment-relative offset (sizeB) into an offset * relative to the root (A), and see if the offset is past the * end of the root (> sizeA). If it is, this fragment will extend * our root. * * ??? Why do we check for v->lastsector separately? */ if (sizeB-offset>sizeA || v->lastsector){ if (v->lastsector){ root->lastsector=1; } /* ??? Why would end be < sizeA? Why do we truncate root? */ if (endstage2,offset+vecbegin-rb(root),callback); } } if (l)i_cblock_destructor(l); free_v_fragment(v); return(1); } else { /* !i_iterate_stage2(...) */ #if TRACE_PARANOIA & 2 fprintf(stderr, "no match"); #endif /* We were unable to merge this fragment into the root. * * Check whether the fragment should have overlapped with the root, * even taking possible jitter into account. (I.e., If the fragment * ends so far before the end of the root that even (dynoverlap) * samples of jitter couldn't push it beyond the end of the root, * it should have overlapped.) * * It is, however, possible that we failed to match using the normal * tests because we're dealing with silence, which we handle * separately. * * If the fragment should have overlapped, and we're not dealing * with the special silence case, we don't know what to make of * this fragment, and we just discard it. */ if (fe(v)+dynoverlapsilenceflag){ /* It *should* have matched. No good; free it. */ free_v_fragment(v); #if TRACE_PARANOIA & 2 fprintf(stderr, ", discarding fragment."); #endif } #if TRACE_PARANOIA & 2 fprintf(stderr, "\n"); #endif /* otherwise, we likely want this for an upcoming match */ /* we don't free the sort info (if it was collected) */ return(0); } } /* endif rv(root) */ } static int i_init_root(root_block *root, v_fragment_t *v,long int begin, void(*callback)(long int, paranoia_cb_mode_t)) { if (fb(v)<=begin && fe(v)>begin){ root->lastsector=v->lastsector; root->returnedlimit=begin; if (rv(root)){ i_cblock_destructor(rc(root)); rc(root)=NULL; } { int16_t *buff=malloc(fs(v)*sizeof(int16_t)); memcpy(buff,fv(v),fs(v)*sizeof(int16_t)); root->vector=c_alloc(buff,fb(v),fs(v)); } /* Check whether the new root has a long span of trailing silence. */ i_silence_test(root); #if TRACE_PARANOIA & 2 fprintf(stderr, "* Assigning fragment [%ld-%ld] to root, silencebegin=%ld\n", rb(root), re(root), root->silencebegin); #endif return(1); } else return(0); } static int vsort(const void *a,const void *b) { return((*(v_fragment_t **)a)->begin-(*(v_fragment_t **)b)->begin); } /* =========================================================================== * i_stage2 (internal) * * This function attempts to extend the verified root by merging verified * fragments into it. It keeps extending the tail end of the root until * it runs out of matching fragments. See i_stage2_each (and * i_iterate_stage2) for details of fragment matching and merging. * * This function is called by paranoia_read_limited when the verified root * doesn't contain sufficient data to satisfy the request for samples. * If this function fails to extend the verified root far enough (having * exhausted the currently available verified fragments), the caller * will then read the device again to try and establish more verified * fragments. * * We first try to merge all the fragments in ascending order using the * standard method (i_stage2_each()), and then we try to merge the * remaining fragments using silence matching (i_silence_match()) * if the root has a long span of trailing silence. See the initial * comments on silence and i_silence_match() for an explanation of this * distinction. * * This function returns the number of verified fragments successfully * merged into the verified root. */ static int i_stage2(cdrom_paranoia_t *p, long int beginword, long int endword, void (*callback)(long int, paranoia_cb_mode_t)) { int flag=1,ret=0; root_block *root=&(p->root); #ifdef NOISY fprintf(stderr,"Fragments:%ld\n",p->fragments->active); fflush(stderr); #endif /* even when the 'silence flag' is lit, we try to do non-silence matching in the event that there are still audio vectors with content to be sunk before the silence */ /* This flag is not the silence flag. Rather, it indicates whether * we succeeded in adding a verified fragment to the verified root. * In short, we keep adding fragments until we no longer find a * match. */ while (flag) { /* Convert the linked list of verified fragments into an array, * to be sorted in order of beginning sample position */ v_fragment_t *first=v_first(p); long active=p->fragments->active,count=0; v_fragment_t **list = calloc(active, sizeof(v_fragment_t *)); while (first){ v_fragment_t *next=v_next(first); list[count++]=first; first=next; } /* Reset the flag so that if we don't match any fragments, we * stop looping. Then, proceed only if there are any fragments * to match. */ flag=0; if (count){ /* Sort the array of verified fragments in order of beginning * sample position. */ qsort(list,active,sizeof(v_fragment_t *),&vsort); /* We don't check for the silence flag yet, because even if the * verified root ends in silence (and thus the silence flag is set), * there may be a non-silent region at the beginning of the verified * root, into which we can merge the verified fragments. */ /* Iterate through the verified fragments, starting at the fragment * with the lowest beginning sample position. */ for(count=0;countone){ /* If we don't have a verified root yet, just promote the first * fragment (with lowest beginning sample) to be the verified * root. * * ??? It seems that this could be fairly arbitrary if jitter * is an issue. If we've verified two fragments allegedly * beginning at "0" (which are actually slightly offset due to * jitter), the root might not begin at the earliest read * sample. Additionally, because subsequent fragments are * only merged at the tail end of the root, this situation * won't be fixed by merging the earlier samples. * * Practically, this ends up not being critical since most * drives insert some extra silent samples at the beginning * of the stream. Missing a few of them doesn't cause any * real lost data. But it is non-deterministic. */ if (rv(root)==NULL){ if (i_init_root(&(p->root),first,beginword,callback)){ free_v_fragment(first); /* Consider this a merged fragment, so set the flag * to keep looping. */ flag=1; ret++; } } else { /* Try to merge this fragment with the verified root, * extending the tail of the root. */ if (i_stage2_each(root,first,callback)){ /* If we successfully merged the fragment, set the flag * to keep looping. */ ret++; flag=1; } } } } /* If the verified root ends in a long span of silence, iterate * through the remaining unmerged fragments to see if they can be * merged using our special silence matching. */ if (!flag && p->root.silenceflag){ for(count=0;countone){ if (rv(root)!=NULL){ /* Try to merge the fragment into the root. This will only * succeed if the fragment overlaps and begins with sufficient * silence to be a presumed match. * * Note that the fragments must be passed to i_silence_match() * in ascending order, as they are here. */ if (i_silence_match(root,first,callback)){ /* If we successfully merged the fragment, set the flag * to keep looping. */ ret++; flag=1; } } } } /* end for */ } } /* end if(count) */ free(list); /* If we were able to extend the verified root at all during this pass * through the loop, loop again to see if we can merge any remaining * fragments with the extended root. */ #if TRACE_PARANOIA & 2 if (flag) fprintf(stderr, "- Root updated, comparing remaining fragments again.\n"); #endif } /* end while */ /* Return the number of fragments we successfully merged into the * verified root. */ return(ret); } static void i_end_case(cdrom_paranoia_t *p,long endword, void(*callback)(long int, paranoia_cb_mode_t)) { root_block *root=&p->root; /* have an 'end' flag; if we've just read in the last sector in a session, set the flag. If we verify to the end of a fragment which has the end flag set, we're done (set a done flag). Pad zeroes to the end of the read */ if (root->lastsector==0)return; if (endwordroot); c_block_t *graft=NULL; int vflag=0; int gend=0; long post; #ifdef NOISY fprintf(stderr,"\nskipping\n"); #endif if (rv(root)==NULL){ post=0; } else { post=re(root); } if (post==-1)post=0; if (callback)(*callback)(post,PARANOIA_CB_SKIP); #if TRACE_PARANOIA fprintf(stderr, "Skipping [%ld-", post); #endif /* We want to add a sector. Look for a c_block that spans, preferrably a verified area */ { c_block_t *c=c_first(p); while (c){ long cbegin=cb(c); long cend=ce(c); if (cbegin<=post && cend>post){ long vend=post; if (c->flags[post-cbegin]&FLAGS_VERIFIED){ /* verified area! */ while (vendflags[vend-cbegin]&FLAGS_VERIFIED))vend++; if (!vflag || vend>vflag){ graft=c; gend=vend; } vflag=1; } else { /* not a verified area */ if (!vflag){ while (vendflags[vend-cbegin]&FLAGS_VERIFIED)==0)vend++; if (graft==NULL || gend>vend){ /* smallest unverified area */ graft=c; gend=vend; } } } } c=c_next(c); } if (graft){ long cbegin=cb(graft); long cend=ce(graft); while (gendflags[gend-cbegin]&FLAGS_VERIFIED))gend++; gend=min(gend+OVERLAP_ADJ,cend); if (rv(root)==NULL){ int16_t *buff=malloc(cs(graft)); memcpy(buff,cv(graft),cs(graft)); rc(root)=c_alloc(buff,cb(graft),cs(graft)); } else { c_append(rc(root),cv(graft)+post-cbegin, gend-post); } #if TRACE_PARANOIA fprintf(stderr, "%d], filled with %s data from block [%ld-%ld]\n", gend, (graft->flags[post-cbegin]&FLAGS_VERIFIED) ? "verified" : "unverified", cbegin, cend); #endif root->returnedlimit=re(root); return; } } /* No? Fine. Great. Write in some zeroes :-P */ { void *temp=calloc(CDIO_CD_FRAMESIZE_RAW,sizeof(int16_t)); if (rv(root)==NULL){ rc(root)=c_alloc(temp,post,CDIO_CD_FRAMESIZE_RAW); } else { c_append(rc(root),temp,CDIO_CD_FRAMESIZE_RAW); free(temp); } #if TRACE_PARANOIA fprintf(stderr, "%ld], filled with zero\n", re(root)); #endif root->returnedlimit=re(root); } } /**** toplevel ****************************************/ void paranoia_free(cdrom_paranoia_t *p) { paranoia_resetall(p); sort_free(p->sortcache); free_list(p->cache, 1); free_list(p->fragments, 1); free(p); } /*! Set the kind of repair you want to on for reading. The modes are listed above @param p paranoia type @mode mode paranoia mode flags built from values in paranoia_mode_t, e.g. PARANOIA_MODE_FULL^PARANOIA_MODE_NEVERSKIP */ void paranoia_modeset(cdrom_paranoia_t *p, int mode_flags) { p->enable=mode_flags; } /*! reposition reading offset. @param p paranoia type @param seek byte offset to seek to @param whence like corresponding parameter in libc's lseek, e.g. SEEK_SET or SEEK_END. */ lsn_t paranoia_seek(cdrom_paranoia_t *p, int32_t seek, int whence) { long sector; long ret; switch(whence){ case SEEK_SET: sector=seek; break; case SEEK_END: sector=cdda_disc_lastsector(p->d)+seek; break; default: sector=p->cursor+seek; break; } if (cdda_sector_gettrack(p->d,sector)==-1)return(-1); i_cblock_destructor(p->root.vector); p->root.vector=NULL; p->root.lastsector=0; p->root.returnedlimit=0; ret=p->cursor; p->cursor=sector; i_paranoia_firstlast(p); /* Evil hack to fix pregap patch for NEC drives! To be rooted out in a10 */ p->current_firstsector=sector; return(ret); } /* =========================================================================== * read_c_block() (internal) * * This funtion reads many (p->readahead) sectors, encompassing at least * the requested words. * * It returns a c_block which encapsulates these sectors' data and sector * number. The sectors come come from multiple low-level read requests. * * This function reads many sectors in order to exhaust any caching on the * drive itself, as caching would simply return the same incorrect data * over and over. Paranoia depends on truly re-reading portions of the * disc to make sure the reads are accurate and correct any inaccuracies. * * Which precise sectors are read varies ("jiggles") between calls to * read_c_block, to prevent consistent errors across multiple reads * from being misinterpreted as correct data. * * The size of each low-level read is determined by the underlying driver * (p->d->nsectors), which allows the driver to specify how many sectors * can be read in a single request. Historically, the Linux kernel could * only read 8 sectors at a time, with likely dropped samples between each * read request. Other operating systems may have different limitations. * * This function is called by paranoia_read_limited(), which breaks the * c_block of read data into runs of samples that are likely to be * contiguous, verifies them and stores them in verified fragments, and * eventually merges the fragments into the verified root. * * This function returns the last c_block read or NULL on error. */ static c_block_t * i_read_c_block(cdrom_paranoia_t *p,long beginword,long endword, void(*callback)(long, paranoia_cb_mode_t)) { /* why do it this way? We need to read lots of sectors to kludge around stupid read ahead buffers on cheap drives, as well as avoid expensive back-seeking. We also want to 'jiggle' the start address to try to break borderline drives more noticeably (and make broken drives with unaddressable sectors behave more often). */ long readat,firstread; long totaltoread=p->readahead; long sectatonce=p->d->nsectors; long driftcomp=(float)p->dyndrift/CD_FRAMEWORDS+.5; c_block_t *new=NULL; root_block *root=&p->root; int16_t *buffer=NULL; unsigned char *flags=NULL; long sofar; long dynoverlap=(p->dynoverlap+CD_FRAMEWORDS-1)/CD_FRAMEWORDS; long anyflag=0; /* Calculate the first sector to read. This calculation takes * into account the need to jitter the starting point of the read * to reveal consistent errors as well as the low reliability of * the edge words of a read. * * ???: Document more clearly how dynoverlap and MIN_SECTOR_BACKUP * are calculated and used. */ /* What is the first sector to read? want some pre-buffer if we're not at the extreme beginning of the disc */ if (p->enable&(PARANOIA_MODE_VERIFY|PARANOIA_MODE_OVERLAP)){ /* we want to jitter the read alignment boundary */ long target; if (rv(root)==NULL || rb(root)>beginword) target=p->cursor-dynoverlap; else target=re(root)/(CD_FRAMEWORDS)-dynoverlap; if (target+MIN_SECTOR_BACKUP>p->lastread && target<=p->lastread) target=p->lastread-MIN_SECTOR_BACKUP; /* we want to jitter the read alignment boundary, as some drives, beginning from a specific point, will tend to lose bytes between sectors in the same place. Also, as our vectors are being made up of multiple reads, we want the overlap boundaries to move.... */ readat=(target&(~((long)JIGGLE_MODULO-1)))+p->jitter; if (readat>target)readat-=JIGGLE_MODULO; p->jitter++; if (p->jitter>=JIGGLE_MODULO) p->jitter=0; } else { readat=p->cursor; } readat+=driftcomp; /* Create a new, empty c_block and add it to the head of the * list of c_blocks in memory. It will be empty until the end of * this subroutine. */ if (p->enable&(PARANOIA_MODE_OVERLAP|PARANOIA_MODE_VERIFY)) { flags=calloc(totaltoread*CD_FRAMEWORDS, 1); new=new_c_block(p); recover_cache(p); } else { /* in the case of root it's just the buffer */ paranoia_resetall(p); new=new_c_block(p); } buffer=calloc(totaltoread*CDIO_CD_FRAMESIZE_RAW, 1); sofar=0; firstread=-1; #if TRACE_PARANOIA fprintf(stderr, "Reading [%ld-%ld] from media\n", readat*CD_FRAMEWORDS, (readat+totaltoread)*CD_FRAMEWORDS); #endif /* Issue each of the low-level reads until we've read enough sectors * to exhaust the drive's cache. * * p->readahead = total number of sectors to read * p->d->nsectors = number of sectors to read per request * * The driver determines this latter number, which is the maximum * number of sectors the kernel can reliably read per request. In * old Linux kernels, there was a hard limit of 8 sectors per read. * While this limit has since been removed, certain motherboards * can't handle DMA requests larger than 64K. And other operating * systems may have similar limitations. So the method of splitting * up reads is still useful. */ /* actual read loop */ while (sofarcurrent_firstsector){ secread-=p->current_firstsector-adjread; adjread=p->current_firstsector; } if (adjread+secread-1>p->current_lastsector) secread=p->current_lastsector-adjread+1; if (sofar+secread>totaltoread)secread=totaltoread-sofar; if (secread>0){ if (firstread<0) firstread = adjread; /* Issue the low-level read to the driver. */ thisread = cdda_read(p->d, buffer+sofar*CD_FRAMEWORDS, adjread, secread); #if TRACE_PARANOIA & 1 fprintf(stderr, "- Read [%ld-%ld] (0x%04X...0x%04X)%s", adjread*CD_FRAMEWORDS, (adjread+thisread)*CD_FRAMEWORDS, buffer[sofar*CD_FRAMEWORDS] & 0xFFFF, buffer[(sofar+thisread)*CD_FRAMEWORDS - 1] & 0xFFFF, thisread < secread ? "" : "\n"); #endif /* If the low-level read returned too few sectors, pad the result * with null data and mark it as invalid (FLAGS_UNREAD). We pad * because we're going to be appending further reads to the current * c_block. * * ???: Why not re-read? It might be to keep you from getting * hung up on a bad sector. Or it might be to avoid interrupting * the streaming as much as possible. */ if ( thisread < secread) { if (thisread<0) thisread=0; #if TRACE_PARANOIA & 1 fprintf(stderr, " -- couldn't read [%ld-%ld]\n", (adjread+thisread)*CD_FRAMEWORDS, (adjread+secread)*CD_FRAMEWORDS); #endif /* Uhhh... right. Make something up. But don't make us seek backward! */ if (callback) (*callback)((adjread+thisread)*CD_FRAMEWORDS, PARANOIA_CB_READERR); memset(buffer+(sofar+thisread)*CD_FRAMEWORDS,0, CDIO_CD_FRAMESIZE_RAW*(secread-thisread)); if (flags) memset(flags+(sofar+thisread)*CD_FRAMEWORDS, FLAGS_UNREAD, CD_FRAMEWORDS*(secread-thisread)); } if (thisread!=0)anyflag=1; /* Because samples are likely to be dropped between read requests, * mark the samples near the the boundaries of the read requests * as suspicious (FLAGS_EDGE). This means that any span of samples * against which these adjacent read requests are compared must * overlap beyond the edges and into the more trustworthy data. * Such overlapping spans are accordingly at least MIN_WORDS_OVERLAP * words long (and naturally longer if any samples were dropped * between the read requests). * * (EEEEE...overlapping span...EEEEE) * (read 1 ...........EEEEE) (EEEEE...... read 2 ......EEEEE) ... * dropped samples --^ */ if (flags && sofar!=0){ /* Don't verify across overlaps that are too close to one another */ int i=0; for(i=-MIN_WORDS_OVERLAP/2;ilastread=adjread+secread; if (adjread+secread-1==p->current_lastsector) new->lastsector=-1; if (callback)(*callback)((adjread+secread-1)*CD_FRAMEWORDS,PARANOIA_CB_READ); sofar+=secread; readat=adjread+secread; } else /* secread <= 0 */ if (readatcurrent_firstsector) readat+=sectatonce; /* due to being before the readable area */ else break; /* due to being past the readable area */ /* Keep issuing read requests until we've read enough sectors to * exhaust the drive's cache. */ } /* end while */ /* If we managed to read any sectors at all (anyflag), fill in the * previously allocated c_block with the read data. Otherwise, free * our buffers, dispose of the c_block, and return NULL. */ if (anyflag) { new->vector=buffer; new->begin=firstread*CD_FRAMEWORDS-p->dyndrift; new->size=sofar*CD_FRAMEWORDS; new->flags=flags; #if TRACE_PARANOIA fprintf(stderr, "- Read block %ld:[%ld-%ld] from media\n", p->cache->active, cb(new), ce(new)); #endif } else { if (new)free_c_block(new); free(buffer); free(flags); new=NULL; } return(new); } /** ========================================================================== * cdio_paranoia_read(), cdio_paranoia_read_limited() * * These functions "read" the next sector of audio data and returns * a pointer to a full sector of verified samples (2352 bytes). * * The returned buffer is *not* to be freed by the caller. It will * persist only until the next call to paranoia_read() for this p */ int16_t * cdio_paranoia_read(cdrom_paranoia_t *p, void(*callback)(long, paranoia_cb_mode_t)) { return paranoia_read_limited(p, callback, 20); } /* I added max_retry functionality this way in order to avoid breaking any old apps using the nerw libs. cdparanoia 9.8 will need the updated libs, but nothing else will require it. */ int16_t * cdio_paranoia_read_limited(cdrom_paranoia_t *p, void(*callback)(long int, paranoia_cb_mode_t), int max_retries) { long int beginword = p->cursor*(CD_FRAMEWORDS); long int endword = beginword+CD_FRAMEWORDS; long int retry_count= 0; long int lastend = -2; root_block *root = &p->root; if (beginword > p->root.returnedlimit) p->root.returnedlimit=beginword; lastend=re(root); /* Since paranoia reads and verifies chunks of data at a time * (which it needs to counteract dropped samples and inaccurate * seeking), the requested samples may already be in memory, * in the verified "root". * * The root is where paranoia stores samples that have been * verified and whose position has been accurately determined. */ /* First, is the sector we want already in the root? */ while (rv(root)==NULL || rb(root)>beginword || (re(root)enable&(PARANOIA_MODE_VERIFY|PARANOIA_MODE_OVERLAP)) || re(root)enable&(PARANOIA_MODE_VERIFY|PARANOIA_MODE_OVERLAP)){ /* We need to make sure our memory consumption doesn't grow * to the size of the whole CD. But at the same time, we * need to hang onto some of the verified data (even perhaps * data that's already been returned by paranoia_read()) in * order to verify and accurately position future samples. * * Therefore, we free some of the verified data that we * no longer need. */ i_paranoia_trim(p,beginword,endword); recover_cache(p); if (rb(root)!=-1 && p->root.lastsector) i_end_case(p, endword+(MAX_SECTOR_OVERLAP*CD_FRAMEWORDS), callback); else /* Merge as many verified fragments into the verified root * as we need to satisfy the pending request. We may * not have all the fragments we need, in which case we'll * read data from the CD further below. */ i_stage2(p, beginword, endword+(MAX_SECTOR_OVERLAP*CD_FRAMEWORDS), callback); } else i_end_case(p,endword+(MAX_SECTOR_OVERLAP*CD_FRAMEWORDS), callback); /* only trips if we're already done */ #if TRACE_PARANOIA fprintf(stderr, "- Root is now [%ld-%ld] silencebegin=%ld\n", rb(root), re(root), root->silencebegin); #endif /* If we were able to fill the verified root with data already * in memory, we don't need to read any more data from the drive. */ if (!(rb(root)==-1 || rb(root)>beginword || re(root)enable&(PARANOIA_MODE_OVERLAP|PARANOIA_MODE_VERIFY)){ /* If we need to verify these samples, send them to * stage 1 verification, which will add verified samples * to the set of verified fragments. Verified fragments * will be merged into the verified root during stage 2 * overlap analysis. */ if (p->enable&PARANOIA_MODE_VERIFY) i_stage1(p,new,callback); /* If we're only doing overlapping reads (no stage 1 * verification), consider each low-level read in the * c_block to be a verified fragment. We exclude the * edges from these fragments to enforce the requirement * that we overlap the reads by the minimum amount. * These fragments will be merged into the verified * root during stage 2 overlap analysis. */ else{ /* just make v_fragments from the boundary information. */ long begin=0,end=0; while (beginflags[begin]&FLAGS_EDGE))begin++; end=begin+1; while (endflags[end]&FLAGS_EDGE)==0)end++; { new_v_fragment(p,new,begin+cb(new), end+cb(new), (new->lastsector && cb(new)+end==ce(new))); } begin=end; } } } else { /* If we're not doing any overlapping reads or verification * of data, skip over the stage 1 and stage 2 verification and * promote this c_block directly to the current "verified" root. */ if (p->root.vector)i_cblock_destructor(p->root.vector); free_elem(new->e,0); p->root.vector=new; i_end_case(p,endword+(MAX_SECTOR_OVERLAP*CD_FRAMEWORDS), callback); } } } /* Are we doing lots of retries? **************************************/ /* ???: To be studied */ /* Check unaddressable sectors first. There's no backoff here; jiggle and minimum backseek handle that for us */ if (rb(root)!=-1 && lastend+588dynoverlap==MAX_SECTOR_OVERLAP*CD_FRAMEWORDS || retry_count==max_retries){ if (!(p->enable&PARANOIA_MODE_NEVERSKIP)) verify_skip_case(p,callback); retry_count=0; } else { if (p->stage1.offpoints!=-1){ /* hack */ p->dynoverlap*=1.5; if (p->dynoverlap>MAX_SECTOR_OVERLAP*CD_FRAMEWORDS) p->dynoverlap=MAX_SECTOR_OVERLAP*CD_FRAMEWORDS; if (callback) (*callback)(p->dynoverlap,PARANOIA_CB_OVERLAP); } } } } /* Having read data from the drive and placed it into verified * fragments, we now loop back to try to extend the root with * the newly loaded data. Alternatively, if the root already * contains the needed data, we'll just fall through. */ } /* end while */ p->cursor++; /* Return a pointer into the verified root. Thus, the caller * must NOT free the returned pointer! */ return(rv(root)+(beginword-rb(root))); } /* a temporary hack */ void cdio_paranoia_overlapset(cdrom_paranoia_t *p, long int overlap) { p->dynoverlap=overlap*CD_FRAMEWORDS; p->stage1.offpoints=-1; } libcdio-0.83/lib/paranoia/p_block.c0000644000175000017500000002212011650126146014106 00000000000000/* Copyright (C) 2004, 2005, 2007, 2008 Rocky Bernstein Copyright (C) 1998 Monty xiphmont@mit.edu This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #ifdef HAVE_STDLIB_H #include #endif #include #ifdef HAVE_STRING_H #include #endif #include #include "p_block.h" #include #include linked_list_t *new_list(void *(*newp)(void),void (*freep)(void *)) { linked_list_t *ret=calloc(1,sizeof(linked_list_t)); ret->new_poly=newp; ret->free_poly=freep; return(ret); } linked_element *add_elem(linked_list_t *l,void *elem) { linked_element *ret=calloc(1,sizeof(linked_element)); ret->stamp=l->current++; ret->ptr=elem; ret->list=l; if(l->head) l->head->prev=ret; else l->tail=ret; ret->next=l->head; ret->prev=NULL; l->head=ret; l->active++; return(ret); } linked_element * new_elem(linked_list_t *p_list) { void *p_new=p_list->new_poly(); return(add_elem(p_list,p_new)); } void free_elem(linked_element *e,int free_ptr) { linked_list_t *l=e->list; if(free_ptr)l->free_poly(e->ptr); if(e==l->head) l->head=e->next; if(e==l->tail) l->tail=e->prev; if(e->prev) e->prev->next=e->next; if(e->next) e->next->prev=e->prev; l->active--; free(e); } void free_list(linked_list_t *list,int free_ptr) { while(list->head) free_elem(list->head,free_ptr); free(list); } void *get_elem(linked_element *e) { return(e->ptr); } linked_list_t *copy_list(linked_list_t *list) { linked_list_t *new=new_list(list->new_poly,list->free_poly); linked_element *i=list->tail; while(i){ add_elem(new,i->ptr); i=i->prev; } return(new); } /**** C_block stuff ******************************************************/ static c_block_t * i_cblock_constructor(cdrom_paranoia_t *p) { c_block_t *ret=calloc(1,sizeof(c_block_t)); return(ret); } void i_cblock_destructor(c_block_t *c) { if(c){ if(c->vector)free(c->vector); if(c->flags)free(c->flags); c->e=NULL; free(c); } } c_block_t * new_c_block(cdrom_paranoia_t *p) { linked_element *e=new_elem(p->cache); c_block_t *c=e->ptr; c->e=e; c->p=p; return(c); } void free_c_block(c_block_t *c) { /* also rid ourselves of v_fragments that reference this block */ v_fragment_t *v=v_first(c->p); while(v){ v_fragment_t *next=v_next(v); if(v->one==c)free_v_fragment(v); v=next; } free_elem(c->e,1); } static v_fragment_t * i_vfragment_constructor(void) { v_fragment_t *ret=calloc(1,sizeof(v_fragment_t)); return(ret); } static void i_v_fragment_destructor(v_fragment_t *v) { free(v); } v_fragment_t * new_v_fragment(cdrom_paranoia_t *p, c_block_t *one, long int begin, long int end, int last) { linked_element *e=new_elem(p->fragments); v_fragment_t *b=e->ptr; b->e=e; b->p=p; b->one=one; b->begin=begin; b->vector=one->vector+begin-one->begin; b->size=end-begin; b->lastsector=last; #if TRACE_PARANOIA fprintf(stderr, "- Verified [%ld-%ld] (0x%04X...0x%04X)%s\n", begin, end, b->vector[0]&0xFFFF, b->vector[b->size-1]&0xFFFF, last ? " *" : ""); #endif return(b); } void free_v_fragment(v_fragment_t *v) { free_elem(v->e,1); } c_block_t * c_first(cdrom_paranoia_t *p) { if(p->cache->head) return(p->cache->head->ptr); return(NULL); } c_block_t * c_last(cdrom_paranoia_t *p) { if(p->cache->tail) return(p->cache->tail->ptr); return(NULL); } c_block_t * c_next(c_block_t *c) { if(c->e->next) return(c->e->next->ptr); return(NULL); } c_block_t * c_prev(c_block_t *c) { if(c->e->prev) return(c->e->prev->ptr); return(NULL); } v_fragment_t * v_first(cdrom_paranoia_t *p) { if(p->fragments->head){ return(p->fragments->head->ptr); } return(NULL); } v_fragment_t * v_last(cdrom_paranoia_t *p) { if(p->fragments->tail) return(p->fragments->tail->ptr); return(NULL); } v_fragment_t * v_next(v_fragment_t *v) { if(v->e->next) return(v->e->next->ptr); return(NULL); } v_fragment_t * v_prev(v_fragment_t *v) { if(v->e->prev) return(v->e->prev->ptr); return(NULL); } void recover_cache(cdrom_paranoia_t *p) { linked_list_t *l=p->cache; /* Are we at/over our allowed cache size? */ while(l->active>p->cache_limit) /* cull from the tail of the list */ free_c_block(c_last(p)); } int16_t * v_buffer(v_fragment_t *v) { if(!v->one)return(NULL); if(!cv(v->one))return(NULL); return(v->vector); } /* alloc a c_block not on a cache list */ c_block_t * c_alloc(int16_t *vector, long begin, long size) { c_block_t *c=calloc(1,sizeof(c_block_t)); c->vector=vector; c->begin=begin; c->size=size; return(c); } void c_set(c_block_t *v,long begin){ v->begin=begin; } /* pos here is vector position from zero */ void c_insert(c_block_t *v,long pos,int16_t *b,long size) { int vs=cs(v); if(pos<0 || pos>vs)return; if(v->vector) { v->vector = realloc(v->vector,sizeof(int16_t)*(size+vs)); } else { v->vector = calloc(1, sizeof(int16_t)*size); } if(posvector+pos+size,v->vector+pos, (vs-pos)*sizeof(int16_t)); memcpy(v->vector+pos,b,size*sizeof(int16_t)); v->size+=size; } void c_remove(c_block_t *v, long cutpos, long cutsize) { int vs=cs(v); if(cutpos<0 || cutpos>vs)return; if(cutpos+cutsize>vs)cutsize=vs-cutpos; if(cutsize<0)cutsize=vs-cutpos; if(cutsize<1)return; memmove(v->vector+cutpos,v->vector+cutpos+cutsize, (vs-cutpos-cutsize)*sizeof(int16_t)); v->size-=cutsize; } void c_overwrite(c_block_t *v,long pos,int16_t *b,long size) { int vs=cs(v); if(pos<0)return; if(pos+size>vs)size=vs-pos; memcpy(v->vector+pos,b,size*sizeof(int16_t)); } void c_append(c_block_t *v, int16_t *vector, long size) { int vs=cs(v); /* update the vector */ if(v->vector) v->vector=realloc(v->vector,sizeof(int16_t)*(size+vs)); else { v->vector=calloc(1, sizeof(int16_t)*size); } memcpy(v->vector+vs,vector,sizeof(int16_t)*size); v->size+=size; } void c_removef(c_block_t *v, long cut) { c_remove(v,0,cut); v->begin+=cut; } /**** Initialization *************************************************/ /*! Get the beginning and ending sector bounds given cursor position. There are a couple of subtle differences between this and the cdda_firsttrack_sector and cdda_lasttrack_sector. If the cursor is an a sector later than cdda_firsttrack_sector, that sectur will be used. As for the difference between cdda_lasttrack_sector, if the CD is mixed and there is a data track after the cursor but before the last audio track, the end of the audio sector before that is used. */ void i_paranoia_firstlast(cdrom_paranoia_t *p) { track_t i, j; cdrom_drive_t *d=p->d; const track_t i_first_track = cdio_get_first_track_num(d->p_cdio); const track_t i_last_track = cdio_get_last_track_num(d->p_cdio); p->current_lastsector = p->current_firstsector = -1; i = cdda_sector_gettrack(d, p->cursor); if ( CDIO_INVALID_TRACK != i ) { if ( 0 == i ) i++; j = i; /* In the below loops, We assume the cursor already is on an audio sector. Not sure if this is correct if p->cursor is in the pregap before the first track. */ for ( ; i < i_last_track; i++) if( !cdda_track_audiop(d,i) ) { p->current_lastsector=cdda_track_lastsector(d,i-1); break; } i = j; for ( ; i >= i_first_track; i-- ) if( !cdda_track_audiop(d,i) ) { p->current_firstsector = cdda_track_firstsector(d,i+1); break; } } if (p->current_lastsector == -1) p->current_lastsector = cdda_disc_lastsector(d); if(p->current_firstsector == -1) p->current_firstsector = cdda_disc_firstsector(d); } cdrom_paranoia_t * paranoia_init(cdrom_drive_t *d) { cdrom_paranoia_t *p=calloc(1,sizeof(cdrom_paranoia_t)); p->cache=new_list((void *)&i_cblock_constructor, (void *)&i_cblock_destructor); p->fragments=new_list((void *)&i_vfragment_constructor, (void *)&i_v_fragment_destructor); p->readahead=150; p->sortcache=sort_alloc(p->readahead*CD_FRAMEWORDS); p->d=d; p->dynoverlap=MAX_SECTOR_OVERLAP*CD_FRAMEWORDS; p->cache_limit=JIGGLE_MODULO; p->enable=PARANOIA_MODE_FULL; p->cursor=cdda_disc_firstsector(d); p->lastread=LONG_MAX; /* One last one... in case data and audio tracks are mixed... */ i_paranoia_firstlast(p); return(p); } void paranoia_set_range(cdrom_paranoia_t *p, long start, long end) { p->cursor = start; p->current_firstsector = start; p->current_lastsector = end; } libcdio-0.83/lib/paranoia/isort.c0000644000175000017500000002135011650126074013641 00000000000000/* Copyright (C) 2004, 2005, 2008, 2011 Rocky Bernstein Copyright (C) 1998 Monty xiphmont@mit.edu This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* sorted vector abstraction for paranoia */ /* Old isort got a bit complex. This re-constrains complexity to give a go at speed through a more alpha-6-like mechanism. */ /* "Sort" is a bit of a misnomer in this implementation. It's actually * basically a hash table of sample values (with a linked-list collision * resolution), which lets you quickly determine where in a vector a * particular sample value occurs. * * Collisions aren't due to hash collisions, as the table has one bucket * for each possible sample value. Instead, the "collisions" represent * multiple occurrences of a given value. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #include "p_block.h" #include "isort.h" /* =========================================================================== * sort_alloc() * * Allocates and initializes a new, empty sort_info object, which can be * used to index up to (size) samples from a vector. */ sort_info_t * sort_alloc(long size) { sort_info_t *ret=calloc(1, sizeof(sort_info_t)); ret->vector=NULL; ret->sortbegin=-1; ret->size=-1; ret->maxsize=size; ret->head=calloc(65536,sizeof(sort_link_t *)); ret->bucketusage=calloc(1, 65536*sizeof(long)); ret->revindex=calloc(size,sizeof(sort_link_t)); ret->lastbucket=0; return(ret); } /* =========================================================================== * sort_unsortall() (internal) * * This function resets the index for further use with a different vector * or range, without the overhead of an unnecessary free/alloc. */ void sort_unsortall(sort_info_t *i) { /* If there were few enough different samples encountered (and hence few * enough buckets used), we can just zero out those buckets. If there * were many (2000 is picked somewhat arbitrarily), it's faster simply to * zero out all buckets with a memset() rather than walking the data * structure and zeroing them out one by one. */ if (i->lastbucket>2000) { /* a guess */ memset(i->head,0,65536*sizeof(sort_link_t *)); } else { long b; for (b=0; blastbucket; b++) i->head[i->bucketusage[b]]=NULL; } i->lastbucket=0; i->sortbegin=-1; /* Curiously, this function preserves the vector association created * by sort_setup(), but it is used only internally by sort_setup, so * preserving this association is unnecessary. */ } /* =========================================================================== * sort_free() * * Releases all memory consumed by a sort_info object. */ void sort_free(sort_info_t *i) { free(i->revindex); free(i->head); free(i->bucketusage); free(i); } /* =========================================================================== * sort_sort() (internal) * * This function builds the index to allow for fast searching for sample * values within a portion (sortlo - sorthi) of the object's associated * vector. It is called internally and only when needed. */ static void sort_sort(sort_info_t *i,long sortlo,long sorthi) { long j; /* We walk backward through the range to index because we insert new * samples at the head of each bucket's list. At the end, they'll be * sorted from first to last occurrence. */ for (j=sorthi-1; j>=sortlo; j--) { /* i->vector[j] = the signed 16-bit sample to index. * hv = pointer to the head of the sorted list of occurences * of this sample * l = the node to associate with this sample * * We add 32768 to convert the signed 16-bit integer to an unsigned * range from 0 to 65535. * * Note that l is located within i->revindex at a position * corresponding to the sample's position in the vector. This allows * ipos() to determine the sample position from a returned sort_link. */ sort_link_t **hv = i->head+i->vector[j]+32768; sort_link_t *l = i->revindex+j; /* If this is the first time we've encountered this sample, add its * bucket to the list of buckets used. This list is used only for * resetting the index quickly. */ if(*hv==NULL){ i->bucketusage[i->lastbucket] = i->vector[j]+32768; i->lastbucket++; } /* Point the new node at the old head, then assign the new node as * the new head. */ l->next=*hv; *hv=l; } /* Mark the index as initialized. */ i->sortbegin=0; } /* =========================================================================== * sort_setup() * * This function initializes a previously allocated sort_info_t. The * sort_info_t is associated with a vector of samples of length * (size), whose position begins at (*abspos) within the CD's stream * of samples. Only the range of samples between (sortlo, sorthi) * will eventually be indexed for fast searching. (sortlo, sorthi) * are absolute sample positions. * * ???: Why is abspos a pointer? Why not just store a copy? * * Note: size *must* be <= the size given to the preceding sort_alloc(), * but no error checking is done here. */ void sort_setup(sort_info_t *i, int16_t *vector, long int *abspos, long int size, long int sortlo, long int sorthi) { /* Reset the index if it has already been built. */ if (i->sortbegin!=-1) sort_unsortall(i); i->vector=vector; i->size=size; i->abspos=abspos; /* Convert the absolute (sortlo, sorthi) to offsets within the vector. * Note that the index will not be built until sort_getmatch() is called. * Here we're simply hanging on to the range to index until then. */ i->lo = min(size, max(sortlo - *abspos, 0)); i->hi = max(0, min(sorthi - *abspos, size)); } /* =========================================================================== * sort_getmatch() * * This function returns a sort_link_t pointer which refers to the * first sample equal to (value) in the vector. It only searches for * hits within (overlap) samples of (post), where (post) is an offset * within the vector. The caller can determine the position of the * matched sample using ipos(sort_info *, sort_link *). * * This function returns NULL if no matches were found. */ sort_link_t * sort_getmatch(sort_info_t *i, long post, long overlap, int value) { sort_link_t *ret; /* If the vector hasn't been indexed yet, index it now. */ if (i->sortbegin==-1) sort_sort(i,i->lo,i->hi); /* Now we reuse lo and hi */ /* We'll only return samples within (overlap) samples of (post). * Clamp the boundaries to search to the boundaries of the array, * convert the signed sample to an unsigned offset, and store the * state so that future calls to sort_nextmatch do the right thing. * * Reusing lo and hi this way is awful. */ post=max(0,min(i->size,post)); i->val=value+32768; i->lo=max(0,post-overlap); /* absolute position */ i->hi=min(i->size,post+overlap); /* absolute position */ /* Walk through the linked list of samples with this value, until * we find the first one within the bounds specified. If there * aren't any, return NULL. */ ret=i->head[i->val]; while (ret) { /* ipos() calculates the offset (in terms of the original vector) * of this hit. */ if (ipos(i,ret)lo) { ret=ret->next; } else { if (ipos(i,ret)>=i->hi) ret=NULL; break; } } /*i->head[i->val]=ret;*/ return(ret); } /* =========================================================================== * sort_nextmatch() * * This function returns a sort_link_t pointer which refers to the next sample * matching the criteria previously passed to sort_getmatch(). See * sort_getmatch() for details. * * This function returns NULL if no further matches were found. */ sort_link_t * sort_nextmatch(sort_info_t *i, sort_link_t *prev) { sort_link_t *ret=prev->next; /* If there aren't any more hits, or we've passed the boundary requested * of sort_getmatch(), we're done. */ if (!ret || ipos(i,ret)>=i->hi) return(NULL); return(ret); } libcdio-0.83/lib/paranoia/overlap.c0000644000175000017500000001533611650126122014152 00000000000000/* Copyright (C) 2004, 2005, 2008, 2011 Rocky Bernstein Copyright (C) 1998 Monty xiphmont@mit.edu This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /*** * * Statistic code and cache management for overlap settings * ***/ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #ifdef HAVE_STDLIB_H #include #endif #include #ifdef HAVE_STRING_H #include #endif #include #include "p_block.h" #include "overlap.h" #include "isort.h" /**** Internal cache management *****************************************/ void paranoia_resetcache(cdrom_paranoia_t *p) { c_block_t *c=c_first(p); v_fragment_t *v; while(c){ free_c_block(c); c=c_first(p); } v=v_first(p); while(v){ free_v_fragment(v); v=v_first(p); } } void paranoia_resetall(cdrom_paranoia_t *p) { p->root.returnedlimit=0; p->dyndrift=0; p->root.lastsector=0; if(p->root.vector){ i_cblock_destructor(p->root.vector); p->root.vector=NULL; } paranoia_resetcache(p); } void i_paranoia_trim(cdrom_paranoia_t *p, long int beginword, long int endword) { root_block *root=&(p->root); if(root->vector!=NULL){ long target=beginword-MAX_SECTOR_OVERLAP*CD_FRAMEWORDS; long rbegin=cb(root->vector); long rend=ce(root->vector); if(rbegin>beginword) goto rootfree; if(rbegin+MAX_SECTOR_OVERLAP*CD_FRAMEWORDSrend) goto rootfree; { long int offset=target-rbegin; c_removef(root->vector,offset); } } { c_block_t *c=c_first(p); while(c){ c_block_t *next=c_next(c); if(ce(c)vector); root->vector=NULL; root->returnedlimit=-1; root->lastsector=0; } /**** Statistical and heuristic[al? :-] management ************************/ /* =========================================================================== * offset_adjust_settings (internal) * * This function is called by offset_add_value() every time 10 samples have * been accumulated. This function updates the internal statistics for * paranoia (dynoverlap, dyndrift) that compensate for jitter and drift. * * (dynoverlap) influences how far stage 1 and stage 2 search for matching * runs. In low-jitter conditions, it will be very small (or even 0), * narrowing our search. In high-jitter conditions, it will be much larger, * widening our search at the cost of speed. * * ???: To be studied further. */ void offset_adjust_settings(cdrom_paranoia_t *p, void(*callback)(long int, paranoia_cb_mode_t)) { if(p->stage2.offpoints>=10){ /* drift: look at the average offset value. If it's over one sector, frob it. We just want a little hysteresis [sp?]*/ long av=(p->stage2.offpoints?p->stage2.offaccum/p->stage2.offpoints:0); if(abs(av)>p->dynoverlap/4){ av=(av/MIN_SECTOR_EPSILON)*MIN_SECTOR_EPSILON; if(callback)(*callback)(ce(p->root.vector),PARANOIA_CB_DRIFT); p->dyndrift+=av; /* Adjust all the values in the cache otherwise we get a (potentially unstable) feedback loop */ { c_block_t *c=c_first(p); v_fragment_t *v=v_first(p); while(v && v->one){ /* safeguard beginning bounds case with a hammer */ if(fb(v)one)one=NULL; }else{ fb(v)-=av; } v=v_next(v); } while(c){ long adj=min(av,cb(c)); c_set(c,cb(c)-adj); c=c_next(c); } } p->stage2.offaccum=0; p->stage2.offmin=0; p->stage2.offmax=0; p->stage2.offpoints=0; p->stage2.newpoints=0; p->stage2.offdiff=0; } } if(p->stage1.offpoints>=10){ /* dynoverlap: we arbitrarily set it to 4x the running difference value, unless min/max are more */ p->dynoverlap=(p->stage1.offpoints?p->stage1.offdiff/ p->stage1.offpoints*3:CD_FRAMEWORDS); if(p->dynoverlap<-p->stage1.offmin*1.5) p->dynoverlap=-p->stage1.offmin*1.5; if(p->dynoverlapstage1.offmax*1.5) p->dynoverlap=p->stage1.offmax*1.5; if(p->dynoverlapdynoverlap=MIN_SECTOR_EPSILON; if(p->dynoverlap>MAX_SECTOR_OVERLAP*CD_FRAMEWORDS) p->dynoverlap=MAX_SECTOR_OVERLAP*CD_FRAMEWORDS; if(callback)(*callback)(p->dynoverlap,PARANOIA_CB_OVERLAP); if(p->stage1.offpoints>600){ /* bit of a bug; this routine is called too often due to the overlap mesh alg we use in stage 1 */ p->stage1.offpoints/=1.2; p->stage1.offaccum/=1.2; p->stage1.offdiff/=1.2; } p->stage1.offmin=0; p->stage1.offmax=0; p->stage1.newpoints=0; } } /* =========================================================================== * offset_add_value (internal) * * This function adds the given jitter detected (value) to the statistics * for the given stage (o). It is called whenever jitter has been identified * by stage 1 or 2. After every 10 samples, we update the overall jitter- * compensation settings (e.g. dynoverlap). This allows us to narrow our * search for matching runs (in both stages) in low-jitter conditions * and also widen our search appropriately when there is jitter. * * ???BUG???: * Note that there is a bug in the way that this is called by try_sort_sync(). * Silence looks like zero jitter, and dynoverlap may be incorrectly reduced * when there's lots of silence but also jitter. * * See the bug notes in try_sort_sync() for details. */ void offset_add_value(cdrom_paranoia_t *p,offsets *o,long value, void(*callback)(long int, paranoia_cb_mode_t)) { if(o->offpoints!=-1){ /* Track the average magnitude of jitter (in either direction) */ o->offdiff+=abs(value); o->offpoints++; o->newpoints++; /* Track the net value of the jitter (to track drift) */ o->offaccum+=value; /* Track the largest jitter we've encountered in each direction */ if(valueoffmin)o->offmin=value; if(value>o->offmax)o->offmax=value; /* After 10 samples, update dynoverlap, etc. */ if(o->newpoints>=10)offset_adjust_settings(p,callback); } } libcdio-0.83/lib/paranoia/gap.c0000644000175000017500000004373111650126013013250 00000000000000/* Copyright (C) 2004, 2008, 2011 Rocky Bernstein Copyright (C) 1998 Monty xiphmont@mit.edu This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /*** * Gap analysis support code for paranoia * ***/ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include "p_block.h" #include #include "gap.h" #include /**** Gap analysis code ***************************************************/ /* =========================================================================== * i_paranoia_overlap_r (internal) * * This function seeks backward through two vectors (starting at the given * offsets) to determine how many consecutive samples agree. It returns * the number of matching samples, which may be 0. * * Unlike its sibling, i_paranoia_overlap_f, this function doesn't need to * be given the size of the vectors (all vectors stop at offset 0). * * This function is used by i_analyze_rift_r() below to find where a * leading rift ends. */ long int i_paranoia_overlap_r(int16_t *buffA,int16_t *buffB, long offsetA, long offsetB) { long beginA=offsetA; long beginB=offsetB; /* Start at the given offsets and work our way backwards until we hit * the beginning of one of the vectors. */ for( ; beginA>=0 && beginB>=0; beginA--,beginB-- ) if (buffA[beginA] != buffB[beginB]) break; /* These values will either point to the first mismatching sample, or * -1 if we hit the beginning of a vector. So increment to point to the * last matching sample. * * ??? Why? This would appear to return one less sample than actually * matched. E.g., no matching samples returns -1! Is this a bug? */ beginA++; beginB++; return(offsetA-beginA); } /* =========================================================================== * i_paranoia_overlap_f (internal) * * This function seeks forward through two vectors (starting at the given * offsets) to determine how many consecutive samples agree. It returns * the number of matching samples, which may be 0. * * Unlike its sibling, i_paranoia_overlap_r, this function needs to given * the size of the vectors. * * This function is used by i_analyze_rift_f() below to find where a * trailing rift ends. */ long int i_paranoia_overlap_f(int16_t *buffA,int16_t *buffB, long offsetA, long offsetB, long sizeA,long sizeB) { long endA=offsetA; long endB=offsetB; /* Start at the given offsets and work our way forward until we hit * the end of one of the vectors. */ for(;endA or <- */ /* =========================================================================== * i_analyze_rift_f (internal) * * This function examines a trailing rift to see how far forward the rift goes * and to determine what kind of rift it is. This function is called by * i_stage2_each() when a trailing rift is detected. (aoffset,boffset) are * the offsets into (A,B) of the first mismatching sample. * * This function returns: * matchA > 0 if there are (matchA) samples missing from A * matchA < 0 if there are (-matchA) duplicate samples (stuttering) in A * matchB > 0 if there are (matchB) samples missing from B * matchB < 0 if there are (-matchB) duplicate samples in B * matchC != 0 if there are (matchC) samples of garbage, after which * both A and B are in sync again */ void i_analyze_rift_f(int16_t *A,int16_t *B, long sizeA, long sizeB, long aoffset, long boffset, long *matchA,long *matchB,long *matchC) { long apast=sizeA-aoffset; long bpast=sizeB-boffset; long i; *matchA=0, *matchB=0, *matchC=0; /* Look forward to see where we regain agreement between vectors * A and B (of at least MIN_WORDS_RIFT samples). We look for one of * the following possible matches: * * edge * v * (1) (... A matching run)|(aoffset matches ...) * (... B matching run)| (rift) |(boffset+i matches ...) * * (2) (... A matching run)| (rift) |(aoffset+i matches ...) * (... B matching run)|(boffset matches ...) * * (3) (... A matching run)| (rift) |(aoffset+i matches ...) * (... B matching run)| (rift) |(boffset+i matches ...) * * Anything that doesn't match one of these three is too corrupt to * for us to recover from. E.g.: * * (... A matching run)| (rift) |(eventual match ...) * (... B matching run)| (big rift) |(eventual match ...) * * We won't find the eventual match, since we wouldn't be sure how * to fix the rift. */ for(i=0;;i++){ /* Search for whatever case we hit first, so as to end up with the * smallest rift. * * ??? Why do we start at 0? It should never match. */ /* Don't search for (1) past the end of B */ if (i=MIN_WORDS_RIFT){ *matchA=i; break; } /* Don't search for (2) or (3) past the end of A */ if (i=MIN_WORDS_RIFT){ *matchB=i; break; } /* Don't search for (3) past the end of B */ if (i=MIN_WORDS_RIFT){ *matchC=i; break; } }else /* Stop searching when we've reached the end of both vectors. * In theory we could stop when there aren't MIN_WORDS_RIFT samples * left in both vectors, but this case should happen fairly rarely. */ if(i>=bpast)break; /* Try the search again with a larger tentative rift. */ } if(*matchA==0 && *matchB==0 && *matchC==0)return; if(*matchC)return; /* For case (1) or (2), we need to determine whether the rift contains * samples dropped by the other vector (that should be inserted), or * whether the rift contains a stutter (that should be dropped). To * distinguish, we check the contents of the rift against the good samples * just before the rift. If the contents match, then the rift contains * a stutter. * * A stutter in the second vector: * (...good samples... 1234)|(567 ...newly matched run...) * (...good samples... 1234)| (1234) | (567 ...newly matched run) * * Samples missing from the first vector: * (...good samples... 1234)|(901 ...newly matched run...) * (...good samples... 1234)| (5678) |(901 ...newly matched run...) * * Of course, there's no theoretical guarantee that a non-stutter * truly represents missing samples, but given that we're dealing with * verified fragments in stage 2, we can have some confidence that this * is the case. */ if(*matchA){ /* For case (1), we need to determine whether A dropped samples at the * rift or whether B stuttered. * * If the rift doesn't match the good samples in A (and hence in B), * it's not a stutter, and the rift should be inserted into A. */ if(i_stutter_or_gap(A,B,aoffset-*matchA,boffset,*matchA)) return; /* It is a stutter, so we need to signal that we need to remove * (matchA) bytes from B. */ *matchB = -*matchA; *matchA=0; return; }else{ /* Case (2) is the inverse of case (1) above. */ if(i_stutter_or_gap(B,A,boffset-*matchB,aoffset,*matchB)) return; *matchA = -*matchB; *matchB=0; return; } } /* riftv must be first even val of rift moving back */ /* =========================================================================== * i_analyze_rift_r (internal) * * This function examines a leading rift to see how far back the rift goes * and to determine what kind of rift it is. This function is called by * i_stage2_each() when a leading rift is detected. (aoffset,boffset) are * the offsets into (A,B) of the first mismatching sample. * * This function returns: * matchA > 0 if there are (matchA) samples missing from A * matchA < 0 if there are (-matchA) duplicate samples (stuttering) in A * matchB > 0 if there are (matchB) samples missing from B * matchB < 0 if there are (-matchB) duplicate samples in B * matchC != 0 if there are (matchC) samples of garbage, after which * both A and B are in sync again */ void i_analyze_rift_r(int16_t *A,int16_t *B, long sizeA, long sizeB, long aoffset, long boffset, long *matchA,long *matchB,long *matchC) { long apast=aoffset+1; long bpast=boffset+1; long i; *matchA=0, *matchB=0, *matchC=0; /* Look backward to see where we regain agreement between vectors * A and B (of at least MIN_WORDS_RIFT samples). We look for one of * the following possible matches: * * edge * v * (1) (... aoffset matches)|(A matching run ...) * (... boffset-i matches)| (rift) |(B matching run ...) * * (2) (... aoffset-i matches)| (rift) |(A matching run ...) * (... boffset matches)|(B matching run ...) * * (3) (... aoffset-i matches)| (rift) |(A matching run ...) * (... boffset-i matches)| (rift) |(B matching run ...) * * Anything that doesn't match one of these three is too corrupt to * for us to recover from. E.g.: * * (... eventual match)| (rift) |(A matching run ...) * (... eventual match) | (big rift) |(B matching run ...) * * We won't find the eventual match, since we wouldn't be sure how * to fix the rift. */ for(i=0;;i++){ /* Search for whatever case we hit first, so as to end up with the * smallest rift. * * ??? Why do we start at 0? It should never match. */ /* Don't search for (1) past the beginning of B */ if (i=MIN_WORDS_RIFT){ *matchA=i; break; } /* Don't search for (2) or (3) past the beginning of A */ if (i=MIN_WORDS_RIFT){ *matchB=i; break; } /* Don't search for (3) past the beginning of B */ if (i=MIN_WORDS_RIFT){ *matchC=i; break; } }else /* Stop searching when we've reached the end of both vectors. * In theory we could stop when there aren't MIN_WORDS_RIFT samples * left in both vectors, but this case should happen fairly rarely. */ if(i>=bpast)break; /* Try the search again with a larger tentative rift. */ } if(*matchA==0 && *matchB==0 && *matchC==0)return; if(*matchC)return; /* For case (1) or (2), we need to determine whether the rift contains * samples dropped by the other vector (that should be inserted), or * whether the rift contains a stutter (that should be dropped). To * distinguish, we check the contents of the rift against the good samples * just after the rift. If the contents match, then the rift contains * a stutter. * * A stutter in the second vector: * (...newly matched run... 234)|(5678 ...good samples...) * (...newly matched run... 234)| (5678) |(5678 ...good samples...) * * Samples missing from the first vector: * (...newly matched run... 890)|(5678 ...good samples...) * (...newly matched run... 890)| (1234) |(5678 ...good samples...) * * Of course, there's no theoretical guarantee that a non-stutter * truly represents missing samples, but given that we're dealing with * verified fragments in stage 2, we can have some confidence that this * is the case. */ if(*matchA){ /* For case (1), we need to determine whether A dropped samples at the * rift or whether B stuttered. * * If the rift doesn't match the good samples in A (and hence in B), * it's not a stutter, and the rift should be inserted into A. * * ???BUG??? It's possible for aoffset+1+*matchA to be > sizeA, in * which case the comparison in i_stutter_or_gap() will extend beyond * the bounds of A. Thankfully, this isn't writing data and thus * trampling memory, but it's still a memory access error that should * be fixed. * * This bug is not fixed yet. */ if(i_stutter_or_gap(A,B,aoffset+1,boffset-*matchA+1,*matchA)) return; /* It is a stutter, so we need to signal that we need to remove * (matchA) bytes from B. */ *matchB = -*matchA; *matchA=0; return; }else{ /* Case (2) is the inverse of case (1) above. */ if(i_stutter_or_gap(B,A,boffset+1,aoffset-*matchB+1,*matchB)) return; *matchA = -*matchB; *matchB=0; return; } } /* =========================================================================== * analyze_rift_silence_f (internal) * * This function examines the fragment and root from the rift onward to * see if they have a rift's worth of silence (or if they end with silence). * It sets (*matchA) to -1 if A's rift is silence, (*matchB) to -1 if B's * rift is silence, and sets them to 0 otherwise. * * Note that, unlike every other function in cdparanoia, this function * considers any repeated value to be silence (which, in effect, it is). * All other functions only consider repeated zeroes to be silence. * * ??? Is this function name just a misnomer, as it's really looking for * repeated garbage? * * This function is called by i_stage2_each() if it runs into a trailing rift * that i_analyze_rift_f couldn't diagnose. This checks for another variant: * where one vector has silence and the other doesn't. We then assume * that the silence (and anything following it) is garbage. * * Note that while this function checks both A and B for silence, the caller * assumes that only one or the other has silence. */ void analyze_rift_silence_f(int16_t *A,int16_t *B,long sizeA,long sizeB, long aoffset, long boffset, long *matchA, long *matchB) { *matchA=-1; *matchB=-1; /* Search for MIN_WORDS_RIFT samples, or to the end of the vector, * whichever comes first. */ sizeA=min(sizeA,aoffset+MIN_WORDS_RIFT); sizeB=min(sizeB,boffset+MIN_WORDS_RIFT); aoffset++; boffset++; /* Check whether A has only "silence" within the search range. Note * that "silence" here is a single, repeated value (zero or not). */ while(aoffset Copyright (C) 1998 Monty xiphmont@mit.edu This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef _ISORT_H_ #define _ISORT_H_ typedef struct sort_link{ struct sort_link *next; } sort_link_t; typedef struct sort_info { int16_t *vector; /* vector (storage doesn't belong to us) */ long *abspos; /* pointer for side effects */ long size; /* vector size */ long maxsize; /* maximum vector size */ long sortbegin; /* range of contiguous sorted area */ long lo,hi; /* current post, overlap range */ int val; /* ...and val */ /* sort structs */ sort_link_t **head; /* sort buckets (65536) */ long *bucketusage; /* of used buckets (65536) */ long lastbucket; sort_link_t *revindex; } sort_info_t; /*! ======================================================================== * sort_alloc() * * Allocates and initializes a new, empty sort_info object, which can * be used to index up to (size) samples from a vector. */ extern sort_info_t *sort_alloc(long int size); /*! ======================================================================== * sort_unsortall() (internal) * * This function resets the index for further use with a different * vector or range, without the overhead of an unnecessary free/alloc. */ extern void sort_unsortall(sort_info_t *i); /*! ======================================================================== * sort_setup() * * This function initializes a previously allocated sort_info_t. The * sort_info_t is associated with a vector of samples of length * (size), whose position begins at (*abspos) within the CD's stream * of samples. Only the range of samples between (sortlo, sorthi) * will eventually be indexed for fast searching. (sortlo, sorthi) * are absolute sample positions. * * ???: Why is abspos a pointer? Why not just store a copy? * * Note: size *must* be <= the size given to the preceding sort_alloc(), * but no error checking is done here. */ extern void sort_setup(sort_info_t *i, int16_t *vector, long int *abspos, long int size, long int sortlo, long int sorthi); /* ========================================================================= * sort_free() * * Releases all memory consumed by a sort_info object. */ extern void sort_free(sort_info_t *i); /*! ======================================================================== * sort_getmatch() * * This function returns a sort_link_t pointer which refers to the * first sample equal to (value) in the vector. It only searches for * hits within (overlap) samples of (post), where (post) is an offset * within the vector. The caller can determine the position of the * matched sample using ipos(sort_info *, sort_link *). * * This function returns NULL if no matches were found. */ extern sort_link_t *sort_getmatch(sort_info_t *i, long post, long overlap, int value); /*! ======================================================================== * sort_nextmatch() * * This function returns a sort_link_t pointer which refers to the * next sample matching the criteria previously passed to * sort_getmatch(). See sort_getmatch() for details. * * This function returns NULL if no further matches were found. */ extern sort_link_t *sort_nextmatch(sort_info_t *i, sort_link_t *prev); /* =========================================================================== * is() * * This macro returns the size of the vector indexed by the given sort_info_t. */ #define is(i) (i->size) /* =========================================================================== * ib() * * This macro returns the absolute position of the first sample in the vector * indexed by the given sort_info_t. */ #define ib(i) (*i->abspos) /* =========================================================================== * ie() * * This macro returns the absolute position of the sample after the last * sample in the vector indexed by the given sort_info_t. */ #define ie(i) (i->size+*i->abspos) /* =========================================================================== * iv() * * This macro returns the vector indexed by the given sort_info_t. */ #define iv(i) (i->vector) /* =========================================================================== * ipos() * * This macro returns the relative position (offset) within the indexed vector * at which the given match was found. * * It uses a little-known and frightening aspect of C pointer arithmetic: * subtracting a pointer is not an arithmetic subtraction, but rather the * additive inverse. In other words, since * q = p + n returns a pointer to the nth object in p, * q - p = p + n - p, and * q - p = n, not the difference of the two addresses. */ #define ipos(i,l) (l-i->revindex) #endif /* _ISORT_H_ */ libcdio-0.83/lib/paranoia/Makefile.in0000644000175000017500000006203111652210027014375 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 2004, 2006, 2008, 2011 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ######################################################## # Things to make the libcdio_paranoia library ######################################################## # # From libtool documentation amended with guidance from N. Boullis: # # 1. Start with version information of `0:0:0' for each libtool library. # # 2. It is probably not a good idea to update the version information # several times between public releases, but rather once per public # release. (This seems to be more an aesthetic consideration than # a hard technical one.) # # 3. If the library source code has changed at all since the last # update, then increment REVISION (`C:R:A' becomes `C:R+1:A'). # # 4. If any interfaces have been added, removed, or changed since the # last update, increment CURRENT, and set REVISION to 0. # # 5. If any interfaces have been added since the last public release, # then increment AGE. # # 6. If any interfaces have been removed or changed since the last # public release, then set AGE to 0. A changed interface means an # incompatibility with previous versions. VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = lib/paranoia DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libcdio_paranoia_la_LIBADD = am__objects_1 = gap.lo isort.lo overlap.lo p_block.lo paranoia.lo am_libcdio_paranoia_la_OBJECTS = $(am__objects_1) libcdio_paranoia_la_OBJECTS = $(am_libcdio_paranoia_la_OBJECTS) libcdio_paranoia_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libcdio_paranoia_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libcdio_paranoia_la_SOURCES) DIST_SOURCES = $(libcdio_paranoia_la_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDDA_PLAYER_LIBS = @CDDA_PLAYER_LIBS@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CDPARANOIA_NAME = @CDPARANOIA_NAME@ CFLAGS = @CFLAGS@ CMP = @CMP@ COS_LIB = @COS_LIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_PKG_LIB_HACK = @DARWIN_PKG_LIB_HACK@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ DIFF_OPTS = @DIFF_OPTS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GIT2CL = @GIT2CL@ GREP = @GREP@ HAVE_BSDI_CDROM = @HAVE_BSDI_CDROM@ HAVE_DARWIN_CDROM = @HAVE_DARWIN_CDROM@ HAVE_FREEBSD_CDROM = @HAVE_FREEBSD_CDROM@ HAVE_JOLIET = @HAVE_JOLIET@ HAVE_LINUX_CDROM = @HAVE_LINUX_CDROM@ HAVE_OS2_CDROM = @HAVE_OS2_CDROM@ HAVE_ROCK = @HAVE_ROCK@ HAVE_SOLARIS_CDROM = @HAVE_SOLARIS_CDROM@ HAVE_WIN32_CDROM = @HAVE_WIN32_CDROM@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDIOPP_LIBS = @LIBCDIOPP_LIBS@ LIBCDIO_CDDA_LIBS = @LIBCDIO_CDDA_LIBS@ LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ LIBCDIO_DEPS = @LIBCDIO_DEPS@ LIBCDIO_LIBS = @LIBCDIO_LIBS@ LIBCDIO_PARANOIA_LIBS = @LIBCDIO_PARANOIA_LIBS@ LIBCDIO_SOURCE_PATH = @LIBCDIO_SOURCE_PATH@ LIBCDIO_VERSION_NUM = @LIBCDIO_VERSION_NUM@ LIBICONV = @LIBICONV@ LIBISO9660PP_LIBS = @LIBISO9660PP_LIBS@ LIBISO9660_CFLAGS = @LIBISO9660_CFLAGS@ LIBISO9660_LIBS = @LIBISO9660_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = $(LIBCDIO_LIBS) $(LIBCDIO_CDDA_LIBS) LIBTOOL = @LIBTOOL@ LIBUDF_LIBS = @LIBUDF_LIBS@ LINUX_CDROM_TIMEOUT = @LINUX_CDROM_TIMEOUT@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_NO_UNDEFINED = @LT_NO_UNDEFINED@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OLD_CDPARANOIA = @OLD_CDPARANOIA@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SBPCD_H = @SBPCD_H@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TYPESIZES = @TYPESIZES@ UCDROM_H = @UCDROM_H@ VCDINFO_CFLAGS = @VCDINFO_CFLAGS@ VCDINFO_LIBS = @VCDINFO_LIBS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = libcdio_paranoia.sym libcdio_paranoia_la_CURRENT = 1 libcdio_paranoia_la_REVISION = 0 libcdio_paranoia_la_AGE = 0 noinst_HEADERS = gap.h isort.h overlap.h p_block.h libcdio_paranoia_sources = gap.c isort.c overlap.c overlap.h \ p_block.c paranoia.c lib_LTLIBRARIES = libcdio_paranoia.la libcdio_paranoia_la_SOURCES = $(libcdio_paranoia_sources) libcdio_paranoia_la_ldflags = -version-info $(libcdio_paranoia_la_CURRENT):$(libcdio_paranoia_la_REVISION):$(libcdio_paranoia_la_AGE) @LT_NO_UNDEFINED@ INCLUDES = $(LIBCDIO_CFLAGS) FLAGS = @LIBCDIO_CFLAGS@ @TYPESIZES@ @CFLAGS@ -I.. -I../.. OPT = $(FLAGS) DEBUG = $(FLAGS) ######################################################## # Things to version the symbols in the libraries ######################################################## # An explanation of the versioning problem from Nicolas Boullis and # the versioned symbol solution he uses below... # # Currently, libvcdinfo uses the cdio_open function from libcdio. # Let's imagine a program foobar that uses both the vcdinfo_open # function from libvcdinfo and the cdio_open function from libcdio. # Currently, libcdio has SONAME libcdio.so.0, libvcdinfo has SONAME # libvcdinfo.so.0 and requires libcdio.so.0, and foobar requires both # libvcdinfo.so.0 and libcdio.so.0. Everything looks fine. # # Now, for some reason, you decide to change the cdio_open function. # That's your right, but you have to bump the CURRENT version and (if I # understand it correctly, athough this is not that clear in libtool's # documentation) set the AGE to 0. Anyway, this bumps the SONAME, which is # sane since the interface changes incompatibly. # Now, you have a new libcdio with SONAME libcdio.so.1. But libvcdinfo and # foobar still require libcdio.so.0. Everything is still fine. # Now, after some minor changes, the author of foobar recompiles foobar. # Then, foobar now requires libvcdinfo.so.0 and libcdio.so.1. And foobar # now segfaults... # What is happening? When you run foobar, if brings both libvcdinfo.so.0 # and libcdio.so.1, but libvcdinfo.so.0 also brings libcdio.so.0. So you # have both libcdio.so.0 and libcdio.so.1 that bring their symbols to the # global namespace. Hence, you have to incompatible versions of the # cdio_open function in the name space. When foobar calls cdio_open, it # may choose the wrong function, and segfaults... # With versioned symbols, the cdio_open function from libcdio.so.0 may be # known as (something that looks like) cdio_open@@CDIO_0. An the cdio_open # function from libcdio.so.1 as cdio_open@@CDIO_1. Both versions of # libcdio would still be brought in by the most recent foobar, but foobar # (and libvcdinfo) know which versioned function to use and then use the # good one. # This is some simple versioning where every symbol is versioned with # something that looks like the SONAME of the library. More complex (and # better) versioning is possible; it is for example what is used by glibc. # But good complex versioning is something that requires much more # work... # The below is a impliments symbol versioning. First of all, I # compute MAJOR as CURENT - AGE; that is what is used within libtool # (at least on GNU/Linux systems) for the number in the SONAME. The # nm command gives the list of symbols known in each of the object # files that will be part of the shared library. And the sed command # extracts from this list those symbols that will be shared. (This sed # command comes from libtool.) libcdio_paranoia_la_MAJOR = $(shell expr $(libcdio_paranoia_la_CURRENT) - $(libcdio_paranoia_la_AGE)) @BUILD_VERSIONED_LIBS_FALSE@libcdio_paranoia_la_LDFLAGS = $(libcdio_paranoia_la_ldflags) @BUILD_VERSIONED_LIBS_TRUE@libcdio_paranoia_la_LDFLAGS = $(libcdio_paranoia_la_ldflags) -Wl,--version-script=libcdio_paranoia.la.ver @BUILD_VERSIONED_LIBS_TRUE@libcdio_paranoia_la_DEPENDENCIES = libcdio_paranoia.la.ver MOSTLYCLEANFILES = libcdio_paranoia.la.ver all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/paranoia/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/paranoia/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libcdio_paranoia.la: $(libcdio_paranoia_la_OBJECTS) $(libcdio_paranoia_la_DEPENDENCIES) $(libcdio_paranoia_la_LINK) -rpath $(libdir) $(libcdio_paranoia_la_OBJECTS) $(libcdio_paranoia_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isort.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/overlap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/p_block.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/paranoia.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES @BUILD_VERSIONED_LIBS_TRUE@libcdio_paranoia.la.ver: $(libcdio_paranoia_la_OBJECTS) $(srcdir)/libcdio_paranoia.sym @BUILD_VERSIONED_LIBS_TRUE@ echo 'CDIO_PARANOIA_$(libcdio_paranoia_la_MAJOR) { ' > $@ @BUILD_VERSIONED_LIBS_TRUE@ objs=`for obj in $(libcdio_paranoia_la_OBJECTS); do sed -ne "s/^pic_object='\(.*\)'$$/\1/p" $$obj; done`; \ @BUILD_VERSIONED_LIBS_TRUE@ if test -n "$$objs" ; then \ @BUILD_VERSIONED_LIBS_TRUE@ nm $${objs} | sed -n -e 's/^.*[ ][ABCDGIRSTW][ABCDGIRSTW]*[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$$/\1/p' | sort -u | { first=true; while read symbol; do if grep -q "^$${symbol}\$$" $(srcdir)/libcdio_paranoia.sym; then if test $$first = true; then echo " global:"; first=false; fi; echo " $${symbol};"; fi; done; } >> $@; \ @BUILD_VERSIONED_LIBS_TRUE@ nm $${objs} | sed -n -e 's/^.*[ ][ABCDGIRSTW][ABCDGIRSTW]*[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$$/\1/p' | sort -u | { first=true; while read symbol; do if grep -q "^$${symbol}\$$" $(srcdir)/libcdio_paranoia.sym; then :; else if test $$first = true; then echo " local:"; first=false; fi; echo " $${symbol};"; fi; done; } >> $@; \ @BUILD_VERSIONED_LIBS_TRUE@ fi @BUILD_VERSIONED_LIBS_TRUE@ echo '};' >> $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libcdio-0.83/lib/Makefile.in0000644000175000017500000004614611652210027012614 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Id: Makefile.am,v 1.70 2008/03/20 19:02:38 karl Exp $ # # Copyright (C) 2003, 2004, 2006, 2008 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # ######################################################## # make all libraries ######################################################## VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = lib DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = driver iso9660 udf cdda_interface paranoia cdio++ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDDA_PLAYER_LIBS = @CDDA_PLAYER_LIBS@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CDPARANOIA_NAME = @CDPARANOIA_NAME@ CFLAGS = @CFLAGS@ CMP = @CMP@ COS_LIB = @COS_LIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_PKG_LIB_HACK = @DARWIN_PKG_LIB_HACK@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ DIFF_OPTS = @DIFF_OPTS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GIT2CL = @GIT2CL@ GREP = @GREP@ HAVE_BSDI_CDROM = @HAVE_BSDI_CDROM@ HAVE_DARWIN_CDROM = @HAVE_DARWIN_CDROM@ HAVE_FREEBSD_CDROM = @HAVE_FREEBSD_CDROM@ HAVE_JOLIET = @HAVE_JOLIET@ HAVE_LINUX_CDROM = @HAVE_LINUX_CDROM@ HAVE_OS2_CDROM = @HAVE_OS2_CDROM@ HAVE_ROCK = @HAVE_ROCK@ HAVE_SOLARIS_CDROM = @HAVE_SOLARIS_CDROM@ HAVE_WIN32_CDROM = @HAVE_WIN32_CDROM@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDIOPP_LIBS = @LIBCDIOPP_LIBS@ LIBCDIO_CDDA_LIBS = @LIBCDIO_CDDA_LIBS@ LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ LIBCDIO_DEPS = @LIBCDIO_DEPS@ LIBCDIO_LIBS = @LIBCDIO_LIBS@ LIBCDIO_PARANOIA_LIBS = @LIBCDIO_PARANOIA_LIBS@ LIBCDIO_SOURCE_PATH = @LIBCDIO_SOURCE_PATH@ LIBCDIO_VERSION_NUM = @LIBCDIO_VERSION_NUM@ LIBICONV = @LIBICONV@ LIBISO9660PP_LIBS = @LIBISO9660PP_LIBS@ LIBISO9660_CFLAGS = @LIBISO9660_CFLAGS@ LIBISO9660_LIBS = @LIBISO9660_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBUDF_LIBS = @LIBUDF_LIBS@ LINUX_CDROM_TIMEOUT = @LINUX_CDROM_TIMEOUT@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_NO_UNDEFINED = @LT_NO_UNDEFINED@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OLD_CDPARANOIA = @OLD_CDPARANOIA@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SBPCD_H = @SBPCD_H@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TYPESIZES = @TYPESIZES@ UCDROM_H = @UCDROM_H@ VCDINFO_CFLAGS = @VCDINFO_CFLAGS@ VCDINFO_LIBS = @VCDINFO_LIBS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @BUILD_CD_PARANOIA_TRUE@paranoiadirs = cdda_interface paranoia @ENABLE_CXX_BINDINGS_TRUE@cxxdirs = cdio++ SUBDIRS = driver iso9660 udf $(paranoiadirs) $(cxxdirs) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libcdio-0.83/configure.ac0000644000175000017500000005573011652124346012276 00000000000000dnl Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2011 dnl Rocky Bernstein dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2, or (at your option) dnl any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA dnl 02110-1301 USA. define(RELEASE_NUM, 83) define(CDIO_VERSION_STR, 0.$1) AC_PREREQ(2.67) AC_INIT([libcdio], [CDIO_VERSION_STR(RELEASE_NUM)], [libcdio-help@gnu.org]) AC_CONFIG_SRCDIR(src/cd-info.c) AM_INIT_AUTOMAKE AC_CANONICAL_HOST AM_CONFIG_HEADER(config.h) AC_CONFIG_MACRO_DIR([m4]) LIBCDIO_VERSION_NUM=`echo RELEASE_NUM | cut -d . -f 1 | tr -d a-z` AC_SUBST(LIBCDIO_VERSION_NUM) AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir) AM_MISSING_PROG(GIT2CL, git2cl, $missing_dir) AM_MAINTAINER_MODE AM_SANITY_CHECK AC_ARG_WITH(cd-drive, AC_HELP_STRING([--without-cd-drive], [don't build program cd-drive (default with)]), enable_cd_drive="${withval}", enable_cd_drive=yes) AC_ARG_WITH(cd-info, AC_HELP_STRING([--without-cd-info], [don't build program cd-info (default with)]), enable_cd_info="${withval}", enable_cd_info=yes) AC_ARG_WITH(cd-paranoia, AC_HELP_STRING([--without-cd-paranoia], [don't build program cd-paranoia and paranoia libraries (default with)]), enable_cd_paranoia="${withval}", enable_cd_paranoia=yes) AC_ARG_WITH(cdda-player, AC_HELP_STRING([--without-cdda-player], [don't build program cdda-player (default with)]), enable_cdda_player="${withval}", enable_cdda_player=yes) AC_ARG_WITH(cd-paranoia-name, AC_HELP_STRING([--with-cd-paranoia-name], [name to use as the cd-paranoia program name (default cd-paranoia)]), cd_paranoia_name="${withval}", cd_paranoia_name="cd-paranoia") CDPARANOIA_NAME="$cd_paranoia_name" AC_SUBST(CDPARANOIA_NAME) AC_ARG_WITH(cd-read, AC_HELP_STRING([--without-cd-read], [don't build program cd-read (default with)]), enable_cd_read="${withval}", enable_cd_read=yes) AC_ARG_WITH(iso-info, AC_HELP_STRING([--without-iso-info], [don't build program iso-info (default with)]), enable_iso_info="${withval}", enable_iso_info=yes) AC_ARG_WITH(iso-read, AC_HELP_STRING([--without-iso-read], [don't build program iso-read (default with)]), enable_iso_read="${withval}", enable_iso_read=yes) AC_ARG_WITH(versioned-libs, AC_HELP_STRING([--without-versioned-libs], [build versioned library symbols (default enabled if you have GNU ld)]), enable_versioned_libs="${withval}", enable_versioned_libs=yes) AC_ARG_ENABLE([cxx], AC_HELP_STRING([--disable-cxx], [Disable C++ bindings (default enabled)])) AM_CONDITIONAL([ENABLE_CXX_BINDINGS], [test "x$enable_cxx" != "xno"]) AC_ARG_ENABLE(cpp-progs, AC_HELP_STRING([--enable-cpp-progs], [make C++ example programs (default enabled)])) AM_CONDITIONAL(ENABLE_CPP, test x"$enable_cpp_progs" = "xyes") AC_ARG_ENABLE(example-progs, AC_HELP_STRING([--disable-example-progs], [Don't build libcdio sample programs])) AM_CONDITIONAL(BUILD_EXAMPLES, test "x$enable_example_progs" != "xno") dnl We use C AC_PROG_CC AM_PROG_CC_C_O dnl We also use C++ in example programs and for CXX bindings AC_PROG_CXX dnl Checks for programs. AC_AIX cd_drivers='cdrdao, BIN/CUE, NRG' if test "x$GCC" != "xyes" then AC_MSG_WARN([ *** non GNU CC compiler detected. *** This package has not been tested very well with non GNU compilers *** you should try to use 'gcc' for compiling this package.]) else WARN_CFLAGS="-Wall -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations -Wunused -Wpointer-arith -Wwrite-strings -Wnested-externs -Wno-sign-compare" for WOPT in $WARN_CFLAGS; do SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $WOPT" AC_MSG_CHECKING([whether $CC understands $WOPT]) AC_TRY_COMPILE([], [], has_option=yes, has_option=no,) CFLAGS="$SAVE_CFLAGS" AC_MSG_RESULT($has_option) if test $has_option = yes; then warning_flags="$warning_flags $option" fi unset has_option unset SAVE_CFLAGS done WARNING_FLAGS="$warning_flags" unset warning_flags fi # We use Perl for documentation and regression tests AC_PATH_PROG(PERL, perl, false) AC_SUBST(PERL) AM_CONDITIONAL(HAVE_PERL, test "$PERL" != "false") # We use a diff in regression testing AC_PATH_PROG(DIFF, diff, no) DIFF_OPTS= if test "$DIFF" = no ; then AC_PATH_PROG(DIFF, cmp, no) else # Try for GNU diff options. # MSDOG output uses \r\n rather than \n in tests for diff_opt in -w --unified ; do if $DIFF $diff_opt ./configure ./configure > /dev/null 2>&1; then AC_MSG_RESULT([adding $diff_opt to diff in regression tests]) DIFF_OPTS="$DIFF_OPTS $diff_opt" fi done fi AC_SUBST(DIFF) AC_SUBST(DIFF_OPTS) dnl check for large file support AC_SYS_LARGEFILE dnl we need to define _FILE_OFFSET_BITS or _LARGE_FILES on the compiler command dnl line because otherwise the system headers risk being included before dnl problems if test "x$ac_cv_sys_largefiles" = "xyes"; then if test "x$ac_cv_sys_file_offset_bits" = "x64"; then LIBCDIO_LARGEFILE_FLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES" else LIBCDIO_LARGEFILE_FLAGS="-D_LARGE_FILES" fi dnl AC_FUNC_FSEEKO sets HAVE_FSEEKO and $ac_cv_sys_largefile_source AC_FUNC_FSEEKO if test "$ac_cv_sys_largefile_source" != no; then LIBCDIO_LARGEFILE_FLAGS="$LIBDDIO_LARGEFILE_FLAGS -D_LARGEFILE_SOURCE=$ac_cv_sys_largefile_source" fi CPPFLAGS="$CPPFLAGS $LIBCDIO_LARGEFILE_FLAGS" fi # We use cmp and cdparanoia in cd-paranoia regression testing AC_PATH_PROG(CMP, cmp, no) AC_SUBST(CMP) AC_PATH_PROG(OLD_CDPARANOIA, cdparanoia, no) AC_SUBST(OLD_CDPARANOIA) AC_DEFINE(LIBCDIO_CONFIG_H, 1, [Is set when libcdio's config.h has been included. Applications wishing to sue their own config.h values (such as set by the application's configure script can define this before including any of libcdio's headers.]) dnl headers AC_HEADER_STDC AC_CHECK_HEADERS(errno.h fcntl.h glob.h limits.h pwd.h) AC_CHECK_HEADERS(stdarg.h stdbool.h stdio.h sys/cdio.h sys/param.h \ sys/time.h sys/timeb.h sys/utsname.h) # We have to disable cdda_player unless we have either ncurses.h or # curses.h if test $enable_cdda_player = 'yes' ; then enable_cdda_player='no' AC_CHECK_HEADERS(ncurses.h curses.h, enable_cdda_player='yes') fi # FreeBSD 4 has getopt in unistd.h. So we include that before # getopt.h AC_CHECK_HEADERS(unistd.h getopt.h) AC_SUBST(SBPCD_H) AC_SUBST(UCDROM_H) AC_SUBST(TYPESIZES) dnl compiler AC_C_BIGENDIAN AC_C_CONST AC_C_INLINE dnl ISOC99_PRAGMA AC_MSG_CHECKING([whether $CC supports ISOC99 _Pragma()]) AC_TRY_COMPILE([],[_Pragma("pack(1)")], [ ISOC99_PRAGMA=yes AC_DEFINE(HAVE_ISOC99_PRAGMA, [], [Supports ISO _Pragma() macro]) ],ISOC99_PRAGMA=no) AC_MSG_RESULT($ISOC99_PRAGMA) ## ## Check for S_ISSOCK() and S_ISLNK() macros ## AC_MSG_CHECKING(for S_ISLNK() macro) AC_LINK_IFELSE([AC_LANG_PROGRAM([ #ifdef HAVE_SYS_STAT_H # include #endif ],[return S_ISLNK(0);])], [ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_S_ISLNK, [], [Define this defines S_ISLNK()]) ], [ AC_MSG_RESULT(no) ]) AC_MSG_CHECKING([for S_ISSOCK() macro]) AC_LINK_IFELSE([AC_LANG_PROGRAM([ #ifdef HAVE_SYS_STAT_H # include #endif ],[return S_ISSOCK(0);])], [ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_S_ISSOCK, [], [Define this defines S_ISSOCK()]) ], [ AC_MSG_RESULT(no) ]) AC_MSG_CHECKING([for struct timespec]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ #ifdef HAVE_SYS_TIME_H #include #endif ],[struct timespec ts;])], [ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_STRUCT_TIMESPEC, [], [Define this if you have struct timespec]) ], [ AC_MSG_RESULT(no) ]) dnl empty_array_size AC_MSG_CHECKING([how to create empty arrays]) empty_array_size="xxxx" AC_TRY_COMPILE([],[struct { int foo; int bar[]; } doo;], empty_array_size="") if test "x$empty_array_size" = "xxxx";then AC_TRY_COMPILE([],[struct { int foo; int bar[0]; } doo;], empty_array_size="0") fi if test "x$empty_array_size" = "xxxx" then AC_MSG_ERROR([compiler is unable to creaty empty arrays]) else AC_DEFINE_UNQUOTED(EMPTY_ARRAY_SIZE, $empty_array_size, [what to put between the brackets for empty arrays]) changequote(`,') msg="[${empty_array_size}]" changequote([,]) AC_MSG_RESULT($msg) fi dnl Enable the creation of shared libraries under Win32. AC_LIBTOOL_WIN32_DLL dnl AM_PROG_LIBTOOL tests whether we have GNU ld dnl this must come before checking --with-versioned-libs dnl which requires GNU ld. AM_PROG_LIBTOOL dnl system # FIXME: # I believe some OS's require -lm, but I don't recall for what function # When we find it, put it in below instead of "cos". AC_CHECK_LIB(m, cos, [LIBS="$LIBS -lm"; COS_LIB="-lm"]) CFLAGS="$CFLAGS $WARN_CFLAGS" AC_SUBST(COS_LIB) # Do we have GNU ld? If we don't, we can't build versioned symbols. if test "$with_gnu_ld" != yes; then AC_MSG_WARN([I don't see GNU ld. I'm going to assume --without-versioned-libs]) enable_versioned_libs='no' fi # We also need GNU make to build versioned symbols. if test "x$enable_versioned_libs" = "xyes" ; then if test -n "$MAKE" ; then $MAKE --version 2>/dev/null >/dev/null if test "$?" -ne 0 ; then AC_MSG_ERROR(Either set MAKE variable to GNU make or use --without-versioned-libs option) fi else make --version 2>/dev/null >/dev/null if test "$?" -ne 0 ; then AC_MSG_ERROR(Either set MAKE variable to GNU make or use --without-versioned-libs option) fi fi fi AM_CONDITIONAL(CYGWIN, test "x$CYGWIN" = "xyes") AM_CONDITIONAL(BUILD_CD_DRIVE, test "x$enable_cd_drive" = "xyes") AM_CONDITIONAL(BUILD_CDINFO, test "x$enable_cd_info" = "xyes") AM_CONDITIONAL(BUILD_CD_READ, test "x$enable_cd_read" = "xyes") AM_CONDITIONAL(BUILD_CD_PARANOIA, test "x$enable_cd_paranoia" = "xyes") AM_CONDITIONAL(BUILD_ISO_INFO, test "x$enable_iso_info" = "xyes") AM_CONDITIONAL(BUILD_ISO_READ, test "x$enable_iso_read" = "xyes") AM_CONDITIONAL(BUILD_CDINFO_LINUX, test "x$enable_cd_info_linux" = "xyes") AM_CONDITIONAL(BUILD_CDIOTEST, test "x$enable_cdiotest" = "xyes") AM_CONDITIONAL(BUILD_VERSIONED_LIBS, test "x$enable_versioned_libs" = "xyes") AM_CONDITIONAL(DISABLE_CPP, test "x$disable_cpp" = "xyes") dnl Checks for header files. LIBCDIO_CDDA_LIBS='$(top_builddir)/lib/cdda_interface/libcdio_cdda.la' LIBCDIO_CFLAGS='-I$(top_srcdir)/lib/driver -I$(top_builddir)/include -I$(top_srcdir)/include/' LIBCDIO_LIBS='$(top_builddir)/lib/driver/libcdio.la' LIBCDIO_DEPS="$LIBCDIO_LIBS" LIBCDIOPP_LIBS='$(top_builddir)/lib/cdio++/libcdio++.la' LIBISO9660PP_LIBS='$(top_builddir)/lib/cdio++/libiso9660++.la' LIBCDIO_PARANOIA_LIBS='$(top_builddir)/lib/paranoia/libcdio_paranoia.la' LIBISO9660_CFLAGS='-I$(top_srcdir)/lib/iso9660/' LIBISO9660_LIBS='$(top_builddir)/lib/iso9660/libiso9660.la' LIBUDF_CFLAGS='-I$(top_srcdir)/lib/udf/' LIBUDF_LIBS='$(top_builddir)/lib/udf/libudf.la' AC_SUBST(LIBCDIO_CDDA_LIBS) AC_SUBST(LIBCDIO_CFLAGS) AC_SUBST(LIBISO9660_CFLAGS) AC_SUBST(LIBISO9660PP_LIBS) AC_SUBST(LIBCDIO_LIBS) AC_SUBST(LIBCDIOPP_LIBS) AC_SUBST(LIBCDIO_DEPS) AC_SUBST(LIBCDIO_PARANOIA_LIBS) AC_SUBST(LIBISO9660_LIBS) AC_SUBST(LIBUDF_LIBS) dnl Libtool flag for strict linkage LT_NO_UNDEFINED= case $host_os in aix*) ## Don't use AIX driver until starts to really work ## cd_drivers="${cd_drivers}, AIX" ## AC_DEFINE([HAVE_AIX_CDROM], [1], ## [Define 1 if you have AIX CD-ROM support]) ;; darwin6*|darwin7*|darwin8*|darwin9*) AC_CHECK_HEADERS(IOKit/IOKitLib.h CoreFoundation/CFBase.h, [have_iokit_h="yes"]) if test "x$have_iokit_h" = "xyes" ; then AC_DEFINE([HAVE_DARWIN_CDROM], [1], [Define 1 if you have Darwin OS X-type CD-ROM support]) DARWIN_PKG_LIB_HACK="-Wl,-framework,CoreFoundation -Wl,-framework,IOKit" dnl Prior to Mac OS X 10.4 (Tiger), DiskArbitration was a private framework. dnl It's now public, and it's needed to do cd/dvd unmount/eject. AC_MSG_CHECKING([for DiskArbitration framework]) ac_save_LIBS="$LIBS" LIBS="$LIBS -framework CoreFoundation -framework DiskArbitration" AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[]])], [have_diskarbitration_framework=yes], [have_diskarbitration_framework=no]) LIBS="$ac_save_LIBS" AC_MSG_RESULT([$have_diskarbitration_framework]) if test x"$have_diskarbitration_framework" = x"yes"; then AC_DEFINE([HAVE_DISKARBITRATION], 1, [Define to 1 if you have the Apple DiskArbitration framework]) DARWIN_PKG_LIB_HACK="$DARWIN_PKG_LIB_HACK -Wl,-framework,DiskArbitration" fi AC_SUBST(DARWIN_PKG_LIB_HACK) LIBCDIO_LIBS="$LIBCDIO_LIBS $DARWIN_PKG_LIB_HACK" cd_drivers="${cd_drivers}, Darwin" fi ;; linux*|uclinux) AC_CHECK_HEADERS(linux/version.h linux/major.h) AC_CHECK_HEADERS(linux/cdrom.h, [have_linux_cdrom_h="yes"]) if test "x$have_linux_cdrom_h" = "xyes" ; then AC_TRY_COMPILE(,[ #include struct cdrom_generic_command test; int has_timeout=sizeof(test.timeout);], [AC_DEFINE([HAVE_LINUX_CDROM_TIMEOUT], [1], [Define 1 if timeout is in cdrom_generic_command struct])]) AC_DEFINE([HAVE_LINUX_CDROM], [1], [Define 1 if you have Linux-type CD-ROM support]) cd_drivers="${cd_drivers}, GNU/Linux" fi ;; bsdi*) AC_CHECK_HEADERS(dvd.h, [have_bsdi_dvd_h="yes"]) if test "x$have_bsdi_dvd_h" = "xyes" ; then AC_DEFINE([HAVE_BSDI_CDROM], [1], [Define 1 if you have BSDI-type CD-ROM support]) LIBS="$LIBS -ldvd -lcdrom" LIBCDIO_LIBS="$LIBCDIO_LIBS -lcdrom" cd_drivers="${cd_drivers}, BSDI" fi ;; sunos*|sun*|solaris*) AC_DEFINE([HAVE_SOLARIS_CDROM], [1], [Define 1 if you have Solaris CD-ROM support]) cd_drivers="${cd_drivers}, Solaris" ;; cygwin*) AC_DEFINE([CYGWIN], [1], [Define 1 if you are compiling using cygwin]) AC_DEFINE([HAVE_WIN32_CDROM], [1], [Define 1 if you have MinGW CD-ROM support]) LIBS="$LIBS -lwinmm" LT_NO_UNDEFINED="-no-undefined" cd_drivers="${cd_drivers}, MinGW" AC_DEFINE([NEED_TIMEZONEVAR], [1], [Define 1 if you need timezone defined to get timzone defined as a variable. In cygwin it is a function too]) ;; mingw*) AC_CHECK_HEADERS(windows.h) AC_DEFINE([MINGW32], [1], [Define 1 if you are compiling using MinGW]) AC_DEFINE([HAVE_WIN32_CDROM], [1], [Define 1 if you have MinGW CD-ROM support]) LIBS="$LIBS -lwinmm -mwindows" LT_NO_UNDEFINED="-no-undefined" cd_drivers="${cd_drivers}, MinGW " ;; freebsd4.*|freebsd5.*|freebsd6*|freebsd7*|freebsd8*|dragonfly*|kfreebsd*) AC_DEFINE([HAVE_FREEBSD_CDROM], [1], [Define 1 if you have FreeBSD CD-ROM support]) LIBS="$LIBS -lcam" cd_drivers="${cd_drivers}, FreeBSD " ;; netbsd*) AC_DEFINE([HAVE_NETBSD_CDROM], [1], [Define 1 if you have NetBSD CD-ROM support]) # LIBS="$LIBS -lcam" cd_drivers="${cd_drivers}, NetBSD " ;; os2*) AC_DEFINE([HAVE_OS2_CDROM], [1], [Define 1 if you have OS/2 CD-ROM support]) LT_NO_UNDEFINED="-no-undefined" LDFLAGS="$LDFLAGS -Zbin-files" cd_drivers="${cd_drivers}, OS2 " ;; *) AC_MSG_WARN([Don't have OS CD-reading support for ${host_os}...]) AC_MSG_WARN([Will use generic support.]) ;; esac AC_SUBST(LT_NO_UNDEFINED) AC_MSG_CHECKING(extern long timezone variable) AC_LINK_IFELSE([AC_LANG_SOURCE([[ #ifdef NEED_TIMEZONEVAR #define timezonevar 1 #endif #include extern long timezone; int main(int argc, char **argv) { long test_timezone = timezone; return 0; } ]]) ], [AC_MSG_RESULT(yes); AC_DEFINE([HAVE_TIMEZONE_VAR], 1, [Define if you have an extern long timenzone variable.])], [AC_MSG_RESULT(no)]) dnl AC_SUBST(LINUX_CDROM_TIMEOUT) AC_SUBST(DARWIN_PKG_LIB_HACK) AC_SUBST(HAVE_BSDI_CDROM) AC_SUBST(HAVE_DARWIN_CDROM) AC_SUBST(HAVE_FREEBSD_CDROM) AC_SUBST(HAVE_LINUX_CDROM) AC_SUBST(HAVE_SOLARIS_CDROM) AC_SUBST(HAVE_WIN32_CDROM) AC_SUBST(HAVE_OS2_CDROM) LIBCDIO_SOURCE_PATH="`pwd`" AC_DEFINE_UNQUOTED(LIBCDIO_SOURCE_PATH, "$LIBCDIO_SOURCE_PATH", [Full path to libcdio top_sourcedir.]) AC_SUBST(LIBCDIO_SOURCE_PATH) AC_CHECK_FUNCS( [bzero chdir drand48 ftruncate geteuid getgid \ getuid getpwuid gettimeofday lstat memcpy memset \ rand seteuid setegid snprintf setenv unsetenv tzset \ sleep usleep vsnprintf readlink realpath gmtime_r localtime_r] ) # check for timegm() support AC_CHECK_FUNC(timegm, AC_DEFINE(HAVE_TIMEGM,1, [Define to 1 if timegm is available])) AC_CHECK_MEMBER([struct tm.tm_gmtoff], [AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if struct tm has the tm_gmtoff member.])], , [#include ]) if test $ac_cv_member_struct_tm_tm_gmtoff = yes ; then AC_MSG_CHECKING([whether time.h defines daylight and timezone variables]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ #include ],[return (timezone != 0) + daylight;])], [AC_DEFINE(HAVE_DAYLIGHT, 1, [Define if time.h defines extern long timezone and int daylight vars.]) has_daylight=yes ],[has_daylight=no]) AC_MSG_RESULT($has_daylight) AC_MSG_CHECKING([whether time.h defines tzname variable]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ #include ],[return (tzname != NULL);])], [AC_DEFINE(HAVE_TZNAME, 1, [Define if time.h defines extern extern char *tzname[2] variable]) has_tzname=yes ],[has_tzname=no]) AC_MSG_RESULT($has_tzname) fi AC_ARG_ENABLE(joliet, AS_HELP_STRING([--disable-joliet], [don't include Joliet extension support (default enabled)]), [enable_joliet=$enableval], [enable_joliet=yes]) if test "${enable_joliet}" != "no" ; then AM_ICONV AM_LANGINFO_CODESET if test "$am_cv_func_iconv" = yes ; then AC_DEFINE(HAVE_JOLIET, [1], [Define 1 if you want ISO-9660 Joliet extension support. You must have also libiconv installed to get Joliet extension support.]) HAVE_JOLIET=1 else AC_MSG_ERROR([You must have iconv installed.]) fi fi AC_SUBST(HAVE_JOLIET) AC_ARG_ENABLE(rock, AC_HELP_STRING([--enable-rock], [include Rock-Ridge extension support (default enabled)]), enable_rock=$enableval, enable_rock=no) if test "${enable_rock}" != "no" ; then AC_DEFINE(HAVE_ROCK, [1], [Define 1 if you want ISO-9660 Rock-Ridge extension support.]) HAVE_ROCK=1 fi AC_SUBST(HAVE_ROCK) AM_CONDITIONAL(ENABLE_ROCK, test x"$enable_rock" = "xyes") AC_ARG_ENABLE(cddb, AC_HELP_STRING([--enable-cddb], [include CDDB lookups in cd_info (default enabled)]), enable_cddb=$enableval, enable_cddb=check) if test x"$enable_cddb" != x"no" ; then PKG_CHECK_MODULES(CDDB, libcddb >= 1.0.1, [ HAVE_CDDB=yes AC_DEFINE(HAVE_CDDB, [], [Define this if you have libcddb installed]) ], [AC_MSG_WARN([new enough libcddb not found. CDDB access disabled. Get libcddb from http://libcddb.sourceforge.net]) HAVE_CDDB=no]) AC_CHECK_LIB(socket, connect) AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, gethostbyname)) fi AC_SUBST(CDDB_LIBS) AC_DEFINE(HAVE_KEYPAD, [], [Define this if your libcurses has keypad]) if test x"$enable_cdda_player" = xyes; then AC_CHECK_LIB(ncurses, mvprintw, [LIBCURSES=ncurses; CDDA_PLAYER_LIBS="$CDDA_PLAYER_LIBS -lncurses"], AC_CHECK_LIB(curses, mvprintw, [LIBCURSES=curses; CDDA_PLAYER_LIBS="$CDDA_PLAYER_LIBS -lcurses"], [AC_MSG_WARN([Will not build cdda-player - did not find libcurses or libncurses]) enable_cdda_player=no])) if test x"$enable_cdda_player" = xyes; then AC_CHECK_LIB($LIBCURSES, keypad, [HAVE_KEYPAD=yes]) fi fi AM_CONDITIONAL(BUILD_CDDA_PLAYER, test "x$enable_cdda_player" = "xyes") AC_SUBST(CDDA_PLAYER_LIBS) AC_ARG_ENABLE(vcd_info, AC_HELP_STRING([--enable-vcd-info], [include Video CD Info from libvcd]), enable_vcd_info=${enableval}, enable_vcd_info=no) if test "x$enable_vcd_info" = xyes; then PKG_CHECK_MODULES(VCDINFO, libvcdinfo >= 0.7.21, [AC_DEFINE([HAVE_VCDINFO],1, [Define this if you have libvcdinfo installed])], [AC_MSG_WARN(a new enough libvcdinfo not found. VCD info display in cd-info disabled. libvcdinfo is part of vcdimager. Get it from http://vcdimager.org) enable_vcd_info=no]) fi AC_SUBST(VCDINFO_LIBS) AC_SUBST(VCDINFO_CFLAGS) dnl dnl Newest automake workaround - needed for multi-language manual pages dnl AC_SUBST(mkdir_p) AC_CONFIG_COMMANDS([checks], [chmod +x test/check_cue.sh; chmod +x test/check_nrg.sh ]) dnl dnl Output configuration files dnl ## AC_CONFIG_FILES([ po/Makefile.in\ AC_CONFIG_FILES([ Makefile \ example/C++/Makefile \ example/C++/OO/Makefile \ example/Makefile \ include/Makefile \ include/cdio/Makefile \ include/cdio++/Makefile \ include/cdio/version.h \ doc/doxygen/Doxyfile \ doc/Makefile \ lib/Makefile \ lib/cdda_interface/Makefile \ lib/cdio++/Makefile \ lib/driver/Makefile \ lib/iso9660/Makefile \ lib/paranoia/Makefile \ lib/udf/Makefile \ libcdio.pc \ libcdio++.pc \ libcdio_cdda.pc \ libcdio_paranoia.pc \ libiso9660.pc \ libiso9660++.pc \ libudf.pc \ package/libcdio.spec \ src/cd-paranoia/Makefile \ src/cd-paranoia/usage.txt \ src/cd-paranoia/doc/Makefile \ src/cd-paranoia/doc/en/cd-paranoia.1 \ src/cd-paranoia/doc/en/Makefile \ src/cd-paranoia/doc/ja/cd-paranoia.1 \ src/cd-paranoia/doc/ja/Makefile \ src/Makefile \ test/data/Makefile \ test/driver/Makefile \ test/driver/bincue.c \ test/driver/cdrdao.c \ test/driver/nrg.c \ test/testgetdevices.c \ test/testisocd2.c \ test/testpregap.c \ test/check_common_fn \ test/Makefile \ ]) # AC_CONFIG_FILES([po/Makefile]) AC_CONFIG_FILES([test/check_cue.sh], [chmod +x test/check_cue.sh]) AC_CONFIG_FILES([test/check_iso.sh], [chmod +x test/check_iso.sh]) AC_CONFIG_FILES([test/check_nrg.sh], [chmod +x test/check_nrg.sh]) AC_CONFIG_FILES([test/check_paranoia.sh], [chmod +x test/check_paranoia.sh]) AC_OUTPUT AC_MSG_NOTICE([ Using CD-ROM drivers : $cd_drivers Building cd-paranoia : $(test "x$enable_cd_paranoia" = "xyes" && echo yes || echo no) Building cd-info : $(test "x$enable_cd_info" = "xyes" && echo yes || echo no) Building cd-read : $(test "x$enable_cd_read" = "xyes" && echo yes || echo no) Building cdda-player : $(test "x$enable_cdda_player" = "xyes" && echo yes || echo no) Building iso-info : $(test "x$enable_iso_info" = "xyes" && echo yes || echo no) Building iso-read : $(test "x$enable_iso_read" = "xyes" && echo yes || echo no) Building C++ programs: $(test "x$enable_cxx" != "xno" && echo yes || echo no)]) libcdio-0.83/README.libcdio0000644000175000017500000001717011650234512012263 00000000000000See README.develop if you plan use the git or development version. 0. To compile the source, you'll need a POSIX shell and utilities (sh, sed, grep, cat), an ANSI C compiler like gcc, and a POSIX "make" program like GNU make or remake. You may also want to have "libtool" installed for building portable shared libraries. 1. Uncompress and unpack the source code using for example "tar". Recent versions of GNU tar can do this in one step like this: tar -xpf libcdio-*.bz # or libcdio-*.gz 2. Go into the directory, run "configure" followed by "make": cd libcdio-* sh ./configure MAKE=make # or remake or gmake 3. If step 2 works, compile everything: make # or remake 4. Run the regression tests if you want: make check # or remake check 5. Install. If the preceding steps were successful: make install # you may have to do this as root # or "sudo make install" If you have problems linking libcdio or libiso9660, see the BSD section. You might also try the option --without-versioned-libs. However this option does help with the situation described below so it is preferred all other things being equal. If you are debugging libcdio, the libtool and the dynamic libraries can make things harder. I suggest setting CFLAGS to include '-fno-inline -g' and using --disable-shared on configure. VCD dependency: --------------- One thing that confuses people is the "dependency" on libvcdinfo from vcdimager, while vcdimager has a dependency on libcdio. This libcdio dependency on vcdimager is an optional (i.e. not mandatory) dependency, while the vcdimager dependency right now is mandatory. libvcdinfo is used only by the utility program cd-info. If you want cd-info to use the VCD reporting portion and you don't already have vcdimager installed, build and install libcdio, then vcdimager, then configure libcdio again and it should find libvcdinfo. People who make packages might consider making two packages, a libcdio package with just the libraries (and no dependency on libvcdinfo) and a libcdio-utils which contains cd-info and iso-info, cd-read, iso-read. Should you want cd-info with VCD support then you'd add a dependency in that package to libvcdinfo. Another thing one can do is "make install" inside the library, or run "configure --without-vcd-info --without-cddb" (since libcddb also has an optional dependency on libcdio). Microsoft Windows ------- The building under Microsoft Windows the thing to do is to install cygwin (http://www.cygwin.com). It has been reported that MinGW (http://www.mingw.org/) also works, but it is possible you may encounter more problems there. Folks may have used Microsoft compilers (e.g. Visual C), but you may find you need to make your own "project" files. Don't undertake this unless you are willing to spend time hacking. xboxmediacenter team folks I believe go this route, so you may be able to use their project files as a starting point. XBOX ------- Consult the xboxmediacenter team (www.xboxmediacenter.de) BSD, FreeBSD, NetBSD --- Unless you use --without-versioned-libs (not recommended), you need to use GNU make or remake (http://bashdb.sf.net/remake). GNU make can be found under the name "gmake". If you use another make you are likely to get problems linking libcdio and libiso9660. Solaris ------- You may need to use --without-versioned-libs if you get a problem building libcdio or libiso9660. If you get a message like: libcdio.so: attempted multiple inclusion of file because you have enable vcd-info and it is installed, then the only way I know how to get around is to use configure with --disable-shared. OS Support --------------- Support for Operating Systems's is really based on the desire, ability and willingness of others to help out. I use GNU/Linux so that probably works best. Before a release I'll test on servers I have available. I also announce a pending release on libcdio-devel@gnu.org and ask others to test out. Steve Schultz has done a great job making BSDI CD support look like GNU/Linux and usually he let's me know where I've blown things on BSDI and Darwin. Usage on Darwin has been picking up although Darwin is in a world of its own so support for that (e.g. issuing MMC commands) seems to lag behind. Of late FreeBSD folks have been pretty good about testing new releases and reporting problems. Specific libcdio configure options and environment variables --------------- --disable-cxx Disable C++ bindings (default enabled) --enable-cpp-progs make C++ example programs (default enabled) --disable-example-progs Don't build libcdio sample programs --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-largefile omit support for large files --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-joliet don't include Joliet extension support (default enabled) --disable-rpath do not hardcode runtime library paths --enable-rock include Rock-Ridge extension support (default enabled) --enable-cddb include CDDB lookups in cd_info (default enabled) --enable-vcd-info include Video CD Info from libvcd Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --without-cd-drive don't build program cd-drive (default with) --without-cd-info don't build program cd-info (default with) --without-cd-paranoia don't build program cd-paranoia and paranoia libraries (default with) --without-cdda-player don't build program cdda-player (default with) --with-cd-paranoia-name name to use as the cd-paranoia program name (default cd-paranoia) --without-cd-read don't build program cd-read (default with) --without-iso-info don't build program iso-info (default with) --without-iso-read don't build program iso-read (default with) --without-versioned-libs build versioned library symbols (default enabled if you have GNU ld) --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-gnu-ld assume the C compiler uses GNU ld default=no --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CXX C++ compiler command CXXFLAGS C++ compiler flags CPP C preprocessor CXXCPP C++ preprocessor PKG_CONFIG path to pkg-config utility CDDB_CFLAGS C compiler flags for CDDB, overriding pkg-config CDDB_LIBS linker flags for CDDB, overriding pkg-config VCDINFO_CFLAGS C compiler flags for VCDINFO, overriding pkg-config VCDINFO_LIBS linker flags for VCDINFO, overriding pkg-config libcdio-0.83/MSVC/0000755000175000017500000000000011652210413010615 500000000000000libcdio-0.83/MSVC/libcdio.vcproj0000644000175000017500000003217211114145233013374 00000000000000 libcdio-0.83/MSVC/cd-info.vcproj0000644000175000017500000002372611114145233013313 00000000000000 libcdio-0.83/MSVC/config.h0000644000175000017500000001204611114145233012156 00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* compiler does lsbf in struct bitfields */ #undef BITFIELD_LSBF /* Define 1 if you are compiling using cygwin */ #undef CYGWIN /* what to put between the brackets for empty arrays */ #define EMPTY_ARRAY_SIZE /* Define 1 if you have BSDI-type CD-ROM support */ #undef HAVE_BSDI_CDROM /* Define to 1 if you have the `bzero' function. */ #undef HAVE_BZERO /* Define this if you have libcddb installed */ #undef HAVE_CDDB /* Define to 1 if you have the header file. */ #undef HAVE_COREFOUNDATION_CFBASE_H /* Define 1 if you have Darwin OS X-type CD-ROM support */ #undef HAVE_DARWIN_CDROM /* Define if time.h defines extern long timezone and int daylight vars. */ #undef HAVE_DAYLIGHT /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_DVD_H /* Define to 1 if you have the header file. */ #define HAVE_ERRNO_H 1 /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define 1 if you have FreeBSD CD-ROM support */ #undef HAVE_FREEBSD_CDROM /* Define to 1 if you have the header file. */ #undef HAVE_GLOB_H /* Define if you have the iconv() function. */ #undef HAVE_ICONV /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 /* Define to 1 if you have the header file. */ #undef HAVE_IOKIT_IOKITLIB_H /* Supports ISO _Pragma() macro */ #undef HAVE_ISOC99_PRAGMA /* Define 1 if you want ISO-9660 Joliet extension support. You must have also libiconv installed to get Joliet extension support. */ #undef HAVE_JOLIET /* Define if you have and nl_langinfo(CODESET). */ #undef HAVE_LANGINFO_CODESET /* Define to 1 if you have the `nsl' library (-lnsl). */ #undef HAVE_LIBNSL /* Define to 1 if you have the `socket' library (-lsocket). */ #undef HAVE_LIBSOCKET /* Define 1 if you have Linux-type CD-ROM support */ #undef HAVE_LINUX_CDROM /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_CDROM_H /* Define 1 if timeout is in cdrom_generic_command struct */ #undef HAVE_LINUX_CDROM_TIMEOUT /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_VERSION_H /* Define to 1 if you have the `memcpy' function. */ #define HAVE_MEMCPY 1 /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the `memset' function. */ #define HAVE_MEMSET 1 /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF /* Define 1 if you have Solaris CD-ROM support */ #undef HAVE_SOLARIS_CDROM /* Define to 1 if you have the header file. */ #undef HAVE_STDBOOL_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #define HAVE_STDIO_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the header file. */ #undef HAVE_SYS_CDIO_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #define HAVE_SYS_TYPES_H 1 /* Define if struct tm has the tm_gmtoff member. */ #undef HAVE_TM_GMTOFF /* Define if time.h defines extern extern char *tzname[2] variable */ #undef HAVE_TZNAME /* Define to 1 if you have the `tzset' function. */ #undef HAVE_TZSET /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define this if you have libvcdinfo installed */ #undef HAVE_VCDINFO /* Define to 1 if you have the `vsnprintf' function. */ #undef HAVE_VSNPRINTF /* Define 1 if you have MinGW CD-ROM support */ #define HAVE_WIN32_CDROM 1 /* Define as const if the declaration of iconv() needs const. */ #undef ICONV_CONST /* Define 1 if you are compiling using MinGW */ #undef MINGW32 /* Name of package */ #define PACKAGE "libcdio" /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #define PACKAGE_NAME "libcdio" /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #define PACKAGE_VERSION 1 /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Version number of package */ #define VERSION "1" /* Define to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel and VAX). */ #undef WORDS_BIGENDIAN /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #define inline libcdio-0.83/MSVC/libcdio.sln0000644000175000017500000000410411114145233012657 00000000000000Microsoft Visual Studio Solution File, Format Version 8.00 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcdio", "libcdio.vcproj", "{E465056A-C6F3-45EE-B791-CAF8E0CE629D}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cd-info", "cd-info.vcproj", "{8E55CFDB-5E38-4A07-84F8-36939C825735}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject Global GlobalSection(SolutionConfiguration) = preSolution Debug = Debug Release = Release XBOX_Debug = XBOX_Debug XBOX_Release = XBOX_Release EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution {E465056A-C6F3-45EE-B791-CAF8E0CE629D}.Debug.ActiveCfg = Debug|Win32 {E465056A-C6F3-45EE-B791-CAF8E0CE629D}.Debug.Build.0 = Debug|Win32 {E465056A-C6F3-45EE-B791-CAF8E0CE629D}.Release.ActiveCfg = Release|Win32 {E465056A-C6F3-45EE-B791-CAF8E0CE629D}.Release.Build.0 = Release|Win32 {E465056A-C6F3-45EE-B791-CAF8E0CE629D}.XBOX_Debug.ActiveCfg = XBOX_Debug|Xbox {E465056A-C6F3-45EE-B791-CAF8E0CE629D}.XBOX_Debug.Build.0 = XBOX_Debug|Xbox {E465056A-C6F3-45EE-B791-CAF8E0CE629D}.XBOX_Release.ActiveCfg = XBOX_Release|Xbox {E465056A-C6F3-45EE-B791-CAF8E0CE629D}.XBOX_Release.Build.0 = XBOX_Release|Xbox {8E55CFDB-5E38-4A07-84F8-36939C825735}.Debug.ActiveCfg = Debug|Win32 {8E55CFDB-5E38-4A07-84F8-36939C825735}.Debug.Build.0 = Debug|Win32 {8E55CFDB-5E38-4A07-84F8-36939C825735}.Release.ActiveCfg = Release|Win32 {8E55CFDB-5E38-4A07-84F8-36939C825735}.Release.Build.0 = Release|Win32 {8E55CFDB-5E38-4A07-84F8-36939C825735}.XBOX_Debug.ActiveCfg = XBOX_Debug|Xbox {8E55CFDB-5E38-4A07-84F8-36939C825735}.XBOX_Debug.Build.0 = XBOX_Debug|Xbox {8E55CFDB-5E38-4A07-84F8-36939C825735}.XBOX_Release.ActiveCfg = XBOX_Release|Xbox {8E55CFDB-5E38-4A07-84F8-36939C825735}.XBOX_Release.Build.0 = XBOX_Release|Xbox EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection GlobalSection(ExtensibilityAddIns) = postSolution EndGlobalSection EndGlobal libcdio-0.83/MSVC/README0000644000175000017500000000023711114145233011417 00000000000000Files in this directory are for compiling with Microsoft Visual C. They are courtesy of John Oseman (mog). $Id: README,v 1.1 2004/10/30 14:18:17 rocky Exp $ libcdio-0.83/doc/0000755000175000017500000000000011652210413010612 500000000000000libcdio-0.83/doc/fdl.texi0000644000175000017500000005103011114145233012171 00000000000000@c The GNU Free Documentation License. @center Version 1.2, November 2002 @c This file is intended to be included within another document, @c hence no sectioning command or @node. @display Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @end display @enumerate 0 @item PREAMBLE The purpose of this License is to make a manual, textbook, or other functional and useful document @dfn{free} in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of ``copyleft'', which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. @item APPLICABILITY AND DEFINITIONS This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The ``Document'', below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as ``you''. You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. A ``Modified Version'' of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A ``Secondary Section'' is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The ``Invariant Sections'' are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. The ``Cover Texts'' are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. A ``Transparent'' copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not ``Transparent'' is called ``Opaque''. Examples of suitable formats for Transparent copies include plain @sc{ascii} without markup, Texinfo input format, La@TeX{} input format, @acronym{SGML} or @acronym{XML} using a publicly available @acronym{DTD}, and standard-conforming simple @acronym{HTML}, PostScript or @acronym{PDF} designed for human modification. Examples of transparent image formats include @acronym{PNG}, @acronym{XCF} and @acronym{JPG}. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, @acronym{SGML} or @acronym{XML} for which the @acronym{DTD} and/or processing tools are not generally available, and the machine-generated @acronym{HTML}, PostScript or @acronym{PDF} produced by some word processors for output purposes only. The ``Title Page'' means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, ``Title Page'' means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. A section ``Entitled XYZ'' means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as ``Acknowledgements'', ``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title'' of such a section when you modify the Document means that it remains a section ``Entitled XYZ'' according to this definition. The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. @item VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. @item COPYING IN QUANTITY If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. @item MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: @enumerate A @item Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. @item List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. @item State on the Title page the name of the publisher of the Modified Version, as the publisher. @item Preserve all the copyright notices of the Document. @item Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. @item Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. @item Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. @item Include an unaltered copy of this License. @item Preserve the section Entitled ``History'', Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled ``History'' in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. @item Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the ``History'' section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. @item For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. @item Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. @item Delete any section Entitled ``Endorsements''. Such a section may not be included in the Modified Version. @item Do not retitle any existing section to be Entitled ``Endorsements'' or to conflict in title with any Invariant Section. @item Preserve any Warranty Disclaimers. @end enumerate If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section Entitled ``Endorsements'', provided it contains nothing but endorsements of your Modified Version by various parties---for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. @item COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections Entitled ``History'' in the various original documents, forming one section Entitled ``History''; likewise combine any sections Entitled ``Acknowledgements'', and any sections Entitled ``Dedications''. You must delete all sections Entitled ``Endorsements.'' @item COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. @item AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an ``aggregate'' if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. @item TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. If a section in the Document is Entitled ``Acknowledgements'', ``Dedications'', or ``History'', the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. @item TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. @item FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See @uref{http://www.gnu.org/copyleft/}. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License ``or any later version'' applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. @end enumerate @page @heading ADDENDUM: How to use this License for your documents To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: @smallexample @group Copyright (C) @var{year} @var{your name}. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. @end group @end smallexample If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the ``with@dots{}Texts.'' line with this: @smallexample @group with the Invariant Sections being @var{list their titles}, with the Front-Cover Texts being @var{list}, and with the Back-Cover Texts being @var{list}. @end group @end smallexample If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. @c Local Variables: @c ispell-local-pdict: "ispell-dict" @c End: libcdio-0.83/doc/libcdio.texi0000644000175000017500000027570111650241663013057 00000000000000\input texinfo @c -*-texinfo-*- @c %**start of header @setfilename libcdio.info @include version.texi @settitle GNU @code{libcdio}: Compact Disc Input, Output, and Control Library @c %**end of header @c Karl Berry informs me that this will add straight quotes in @c typewriter text. @c See the "Inserting Quote Characters" node in the Texinfo manual @set txicodequoteundirected @set txicodequotebacktick @copying This manual documents @code{libcdio}, the GNU CD Input, Output, and Control Library. Copyright @copyright{} 2003, 2004, 2005, 2006, 2007, 2008, 2010 Rocky Bernstein and Herbert Valerio Riedel. @quotation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. @end quotation @end copying @paragraphindent 0 @exampleindent 0 @set libcdio @code{libcdio} @set program @kbd{libcdio} @c A macro for defining terms variables. @macro term{varname} @c @cindex{\varname\} @emph{\varname\} @end macro @dircategory Software libraries @direntry * libcdio: (libcdio). GNU Compact Disc Input, Output, and Control Library. @end direntry @titlepage @title GNU @code{libcdio} @subtitle GNU Compact Disc Input, Output, and Control Library @subtitle for version @value{VERSION}, @value{UPDATED} @author Rocky Bernstein et al. (@email{bug-libcdio@@gnu.org}) @page @vskip 0pt plus 1filll @insertcopying @end titlepage @contents @ifnottex @node Top @top GNU @value{libcdio} @insertcopying @menu * History:: How this came about * Previous Work:: The problem and previous work * Purpose:: What is in this package (and what's not) * CD Formats:: A tour through the CD-specification spectrum * CD Image Formats:: A tour through various CD-image formats * CD Units:: The units that make up a CD * How to use:: Okay enough babble, lemme at the library! * Utility Programs:: Diagnostic programs that come with this library * CD-ROM Access and Drivers:: CD-ROM access and drivers * Internal Program Organization:: Looking under the hood Appendices * ISO-9660 Character Sets:: * Glossary:: * GNU Free Documentation License:: Indices * General Index:: Overall index @end menu @end ifnottex @node History @chapter History As a result of the repressive Digital Millennium Copyright Act (DMCA) I became aware of Video CD's (VCD's). Video CD's are not subject to the DMCA and therefore enjoy the protection afforded by copyright but no more. But in order for VCD's to be competitive with DVD's, good tools (including GPL tools) are needed for authoring and playing them. And so through VCD's I became aware of the excellent Video CD tools by Herbert Valerio Riedel which form the @kbd{vcdimager} package. Although vcdimager is great for authoring, examining and extracting parts of a Video CD, it is not a VCD player. And when I looked at the state of Video CD handling in existing VCD players: @code{xine}, @code{MPlayer}, and @code{vlc}, I was a bit disappointed. None handled playback control, menu selections, or playing still frames and segments from track 1. Version 0.7.12 of vcdimager was very impressive, however it lacked exportable libraries that could be used in other projects. So with the blessing and encouragement of Herbert Valerio Riedel, I took to extract and create libraries from this code base. The result was two libraries: one to extract information from a VCD which I called libvcdinfo, and another to do the reading and control of a VCD. Well, actually, at this point I should say that a Video CD is really just Video put on a existing well-established Compact Disc or CD format. So the library for this is called @value{libcdio} rather than @kbd{libvcdio}. While on the topic of the name @value{libcdio}, I should also explain that the library really doesn't handle writing or output (the final "o" in the name). However it was felt that if I put @code{libcdi} that might be confused with a particular CD format called CD-I. Later on, the ISO-9660 filesystem handling component from @kbd{vcdimager} was extracted, expanded and made a separate library. Next the ability to add MMC commands was added, and then CD paranoia support. And from there, the rest is history. @node Previous Work @chapter The problem and previous work If around the year 2002 you were to look at the code for a number of free software CD or media players that work on several platforms such as vlc, MPlayer, xine, or xmms to name but a few, you'd find the code to read a CD sprinkled with conditional compilation for this or that platform. That is there was @emph{no} OS-independent programmer library for CD reading and control even though the technology was over 10 years old; yet there are media players which strive for OS independence. One early CD player, @kbd{xmcd} by Ti Kan, was I think a bit better than most in that it tried to @emph{encapsulate} the kinds of CD control mechanisms (SCSI, Linux ioctl, Toshiba, etc.) in a "CD Audio Device Interface Library" called @code{libdi}. However this library is for Audio CD's only and I don't believe this library has been used outside of xmcd. Another project, Simple DirectMedia Layer also encapsulates CD reading. @quotation SDL is a library that allows you portable low-level access to a video framebuffer, audio output, mouse, and keyboard. With SDL, it is easy to write portable games which run on ... @end quotation Many of the media players mentioned above do in fact can make use of the SDL library but for @emph{video} output only. Because the encapsulation is over @emph{many} kinds of I/O (video, joysticks, mice, as well as CD's), I believe that the level of control provided for CD a little bit limited. (However to be fair, it may have only been intended for games and may be suitable for that). Applications that just want the CD reading and control portion I think will find quite a bit overhead. Another related project is J@"org Schilling's SCSI library. You can use that to make a non-SCSI CD-ROM act like one that understands SCSI MMC commands which is a neat thing to do. However it is a little weird to have to install drivers just so you can run a particular user-level program. Installing drivers often requires special privileges and permissions and it is pervasive on a system. It is a little sad that along the way to creating such a SCSI library a library similar to @value{libcdio} wasn't created which could be used. Were that the case, this library certainly never would have been written. At the OS level there is the ``A Linux CD-ROM Standard'' by David van Leeuwen from around 1999. This defines a set of definitions and ioctl's that mask hardware differences of various Compact Disc hardware. It is a great idea, however this ``standard'' lacked adoption on OS's other than GNU/Linux. Or maybe it's the case that the standard on other OS's lacked adoption on GNU/Linux. For example on FreeBSD there is a ``Common Access Method'' (CAM) used for all SCSI access which seems not to be adopted in GNU/Linux.@footnote{And I'm thankful for that since, at least for MMC commands, it is inordinately complicated and in some places arcane.} Finally at the hardware level where a similar chaos exists, there has been an attempt to do something similar with the MMC (multimedia commands). This attempts to provide a uniform command set for CD devices like PostScript does for printer commands.@footnote{I wrote ``attempts'' because over time the command set has changed and now there are several different commands to do a particular function like read a CD table of contents and some hardware understands some of the version of the commands set but might not others} In contrast to PostScript where there one in theory can write a PostScript program in a uniform ASCII representation and send that to a printer, for MMC although there are common internal structures defined, there is no common syntax for representing the structures or an OS-independent library or API for issuing MMC-commands which a programmer would need to use. Instead each Operating System has its own interface. For example Adaptec's ASPI or Microsoft's DeviceIoControl on Microsoft Windows, or IOKit for Apple's OS/X, or FreeBSD's CAM. I've been positively awed at how many different variations and differing levels of complexity there are for doing basically the same thing. How easy it is to issue an MMC command from a program varies from easy to very difficult. And mastering the boilerplate code to issue an MMC command on one OS really doesn't help much in figuring out how to do it on another OS. So in @value{libcdio} we provide a common (and hopefully simple) API to issue MMC commands. @node Purpose @chapter What is in this package (and what's not) The library, @command{libcdio}, encapsulates CD-ROM reading and control. Applications wishing to be oblivious of the OS- and device-dependent properties of a CD-ROM can use this library. Also included is a library, @command{libiso9660}, for working with ISO-9660 filesystems, @command{libcdio_paranoia}, and @command{libcdio_cdda} libraries for applications which want to use cdparanoia's error-correction and jitter detection. Some support for disk-image types like cdrdao's TOC, CDRWIN's BIN/CUE and Ahead Nero's NRG format is available, so applications that use this library also have the ability to read disc images as though they were CDs. @command{libcdio} also provides a way to issue SCSI ``MultiMedia Commands'' (MMC). MMC is supported by many hardware CD-ROM manufacturers; and in some cases where a CD-ROM doesn't understand MMC directly, some Operating Systems (such as GNU/Linux, Solaris, or FreeBSD or Microsoft Windows ASPI to name a few) provide the MMC emulation.@footnote{This concept of software emulation of a common hardware command language is common for printers such as using ghostscript to private postscript emulation for a non-postscript printer.} The first use of the library in this package are the Video CD authoring and ripping tools, VCDImager (@url{http://vcdimager.org}). See @url{http://www.gnu.org/software/libcdio/projects.html} for a list of projects using @command{libcdio}. A version of the CD-DA extraction tool cdparanoia (@url{http://www.xiph.org/paranoia} and its library which corrects for CD-ROM jitter are part of the distribution. Also included in the libcdio package is a utility program @command{cd-info} which displays CD information: number of tracks, CD-format and if possible basic information about the format. If libcddb (@url{http://libcddb.sourceforge.net}) is available, the @command{cd-info} program will display CDDB matches on CD-DA discs. And if a new enough version of libvcdinfo is available (from the vcdimager project), then @command{cd-info} shows basic VCD information. Other utility programs in the libcdio package are: @table @code @item @code{cdda-player} shows off @value{libcdio} audio and CD-ROM control commands. It can play a track, eject or load media and show the the status of a CD-DA that is might be currently played via the audio control commands. It can be run in batch mode or has a simple curses-based interface. If libcddb is available or a CD has CD-Text and your CD-ROM drive supports CD-Text, track/album information about the CD can be shown. @item @code{cd-drive} shows what drivers are available and some basic properties of cd-drives attached to the system. (But media may have to be inserted in order to get this info.) lists out drive capabilities @item cd-read performs low-level block reading of a CD or CD image, @item @code{iso-info} displays ISO-9660 information from an ISO-9660 image. Below is some sample output @smallexample iso-info version 0.82 x86_64-unknown-linux-gnu Copyright (c) 2003, 2004, 2005, 2007, 2008 R. Bernstein This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. __________________________________ ISO 9660 image: ../test/joliet.iso Application: K3B THE CD KREATOR VERSION 0.11.12 (C) 2003 SEBASTIAN TRUEG AND... Preparer : K3b - Version 0.11.12 Publisher : Rocky Bernstein System : LINUX Volume : K3b data project Volume Set : __________________________________ ISO-9660 Information /: Oct 22 2004 19:44 . Oct 22 2004 19:44 .. Oct 22 2004 19:44 libcdio /libcdio/: Oct 22 2004 19:44 . Oct 22 2004 19:44 .. Mar 12 2004 02:18 COPYING Jun 26 2004 07:01 README Aug 12 2004 06:22 README.libcdio Oct 22 2004 19:44 test /libcdio/test/: Oct 22 2004 19:44 . Oct 22 2004 19:44 .. Jul 25 2004 06:52 isofs-m1.cue @end smallexample @item @code{iso-read} extracts files from an ISO-9660 image. @end table Historically, @code{libcdio} did not support write access to drives. In conjunction with additional work in a separate project @code{libburn}, Thomas Schmitt has modified @code{libcdio} to enable sending SCSI write commands on some of the drivers. This enables other programs like @code{libburn} to write to CD's, DVD's and Blu-Ray discs. For the OS drivers which are lacking write access, volunteers are welcome. @node CD Formats @chapter CD Formats Much of what I write in this section can be found elsewhere. See for example @url{http://www.pctechguide.com/08cd-rom.htm} or @url{http://www.pcguide.com/ref/cd/format.htm} We give just enough background here to cover Compact Discs and Compact Disc formats that are handled by this library. The Sony and Philips Corporations invented and Compact Disc (CD) in the early 1980s. The specifications for the layout is often referred to by the color of the cover on the specification. @menu * Red Book:: Red Book (CD-DA) CD Text, CDDB * Yellow Book:: Yellow Book (CD-ROM Digital Data) * Green Book:: Green Book (CD-i) * White Book:: White Book (DV, Video CD) @end menu @node Red Book @section Red Book (CD-DA) @cindex Red Book @menu * CD Text:: CD Text and CD+G * CDDB:: Internet CD Database (CDDB) @end menu The first type of CD that was produced was the Compact Disc Digital Audio (CD-DA) or just plain ``audio CD''. The specification, ICE 60908 (formerly IEC 908) is commonly called the ``Red Book'', @cite{@url{http://en.wikipedia.org/wiki/Red_Book_(audio_CD_standard)}}. Music CD's are recorded in this format which basically allows for around 74 minutes of audio per disc and for that information to be split up into tracks. Tracks are broken up into "sectors" and each sector contains up to 2,352 bytes. To play one 44.1 kHz CD-DA sampled audio second, 75 sectors are used. The minute/second/frame numbering of sectors or MSF format is based on the fact that 75 sectors are used in a second of playing of sound. (And for almost every other CD format and application the MSF format doesn't make that much sense). In @value{libcdio} when you you want to read an audio sector, you call @code{cdio_read_audio_sector()} or @code{cdio_read_audio_sectors()}. @cindex subchannel In addition the the audio data ``channel'' a provision for other information or @term{subchannel} information) can be stored in a sector. Other subchannels include a Media Catalog Number (also abbreviated as MCN and sometimes a UPC), or album meta data (also called CD-Text). Karioke graphics can also be stored in a format called @term{CD+G}. @node CD Text @subsection CD Text, CD+G @cindex CD Text @cindex CD+G CD Text is an extension to the CD-DA standard that adds the ability to album and track meta data (titles, artist/performer names, song titles) and and graphical (e.g. Karaoke) information. For an alternative way to get album and track meta-data see @xref{CDDB}. Information is stored in such a way that it doesn't interfere with the normal operation of any CD players or CDROM drives. There are two different parts of the CD where the data can be stored. The first place the information can be recorded is in the R-W sub codes in the lead in area of the CD giving a data capacity of about 5,000 ASCII characters (or 2,500 Kanji or Unicode characters). This information is stored as a single block of data and is the format used in virtually all of the CD Text CDs shipping today. The method for reading this data from a CDROM drive is covered under the Sony proposal to the MMC specification. The format of the data is partially covered in the MMC specification. The second place the information can be recorded is in the R-W sub codes in the program area of the CD giving a data capacity of roughly 31MB. This information is stored in a format that follows the Interactive Text Transmission System (ITTS) which is the same data transmission standard used by such things as Digital Audio Broadcasting (DAB), and virtually the same as the data standard for the MiniDisc. Traditionally the R-W sub codes have been used for text and graphics in applications such as CD+G (CD w/graphics) or in the case of most audio CDs, not at all. The methods for reading this data from a CD-ROM drive is covered by the programming specs from the individual drive manufacturers. In the case of ATAPI drives, the SFF8020 spec covers the reading of the RW subcodes. Not all drives support reading the RW subcodes from the program area. However for those that do, @value{libcdio} provides a way to get at this information via @code{cdtext_get()} and its friends. @node CDDB @subsection Internet CD Database (CDDB) @cindex CDDB CDDB is an database on the Internet of of CD album/track, artist, and genre information similar to CD Text information. Using track information (number of tracks and length of the tracks), devices that have access to the Internet can query for meta information and contribute information for CD's where there is no existing information. When storage is available (such as you'd expect for any program using @value{libcdio}, the information is often saved for later use when the Internet is not available; people tend request the same information since they via programs play the same music. Obtaining CD meta information when none is encoded in an audio CD is useful in media players or making ones own compilations from audio CDs. There are currently two popular CDDB services on the Internet. The original database has been renamed Gracenote and is a profit making entity. FreeDB (@url{http://freedb.org} is an open source CD information resource that is free for developers and the public to use. As there already is an excellent library for handling CDDB libcddb (@url{http://libcddb.sourceforge.net} we suggest using that. Our utility program @command{cd-info} will make use it if it is available and it's what we use in our applications that need it. @node Yellow Book @section Yellow Book (CD-ROM Digital Data) The CD-ROM specification or the ``Yellow Book'' followed a few years later (Standards ISO/IEC 10149), and describes the extension of CD's to store computer data, i.e. CD-ROM (Compact Disk Read Only Memory). The specification in the Yellow Book defines two modes: Mode 1 and Mode 2. @menu * ISO 9660:: * Mode 1:: Mode 1 Format * Mode 2:: Mode 2 Format @end menu @node ISO 9660 @subsection ISO 9660 @cindex ISO 9660 @menu * ISO 9660 Level 1:: * ISO 9660 Level 2:: * ISO 9660 Level 3:: * Joliet Extensions:: * Rock Ridge Extensions:: @end menu The Yellow Book doesn't specify how data is to be stored on a CD-ROM. It was feared that different companies would implement proprietary data storage formats using this specification, resulting in incompatible data CDs. To prevent this, representatives of major manufacturers met at the High Sierra Hotel and Casino in Lake Tahoe, NV, in 1985, to define a standard for storing data on CDs. This format was nicknamed High Sierra Format. In a slightly modified form it was later adopted as ISO the ISO 9660 standard. This standard is further broken down into 3 "levels", the higher the level, the more permissive. @node ISO 9660 Level 1 @subsubsection ISO 9660 Level 1 Level 1 ISO 9660 defines names in the 8+3 convention so familiar to MS-DOS: eight characters for the filename, a period, and then three characters for the file type, all in upper case. The allowed characters are A-Z, 0-9, ".", and "_".Level 1 ISO 9660 requires that files occupy a contiguous range of sectors. This allows a file to be specified with a start block and a count. The maximum directory depth is 8. For a table of the characters, see @xref{ISO-9660 Character Sets}. @node ISO 9660 Level 2 @subsubsection ISO 9660 Level 2 Level 2 ISO 9660 allows far more flexibility in filenames, but isn't usable on some systems, notably MS-DOS. @node ISO 9660 Level 3 @subsubsection ISO 9660 Level 3 Level 3 ISO-9660 allows non-contiguous files, useful if the file was written in multiple packets with packet-writing software. There have been a number of extensions to the ISO 9660 CD-ROM file format. One extension is Microsoft's Joliet specification, designed to resolve a number of deficiencies in the original ISO 9660 Level 1 file system, and in particular to support the long file names used in Windows 95 and subsequent versions of Windows. Another extension is the Rock Ridge Interchange Protocol (RRIP), which enables the recording of sufficient information to support POSIX File System semantics. @node Joliet Extensions @subsubsection Joliet Extensions @cindex Joliet extensions Joliet extensions were an upward-compatible extension to the ISO 9660 specification that removes the limitation initially put in to deal with the limited filename conventions found in Microsoft DOS OS. In particular, the Joliet specification allows for long filenames and allows for UCS-BE (BigEndian Unicode) encoding of filenames which include mixed case letter, accented characters spaces and various symbols. The way all of this is encoded is by adding a second directory and filesystem structure in addition to or in parallels to original ISO 9600 filesystem. The root node of the ISO 9660 filesystem is found via the @term{Primary Volume Descriptor} or @term{PVD}. The root of the Joliet-encode filesystem is found in a Supplementary Volume Descriptor or @term{SVD} defined in the ISO 9660 specification. The SVD structure is almost identical to a PVD with a couple of unused fields getting used and with the filename encoding changed to UCS-BE. @node Rock Ridge Extensions @subsubsection Rock Ridge Extensions @cindex Rock Ridge extensions Using the Joliet Extension one overcome the limitedness of the original ISO-9660 naming scheme. But another and probably better method is to use the Rock Ridge Extension. Not only can one store a filename as one does in a POSIX OS, but the other file attributes, such as the various timestamps (creation, modification, access), file attributes (user, group, file mode permissions, device type, symbolic links) can be stored. This is much as one would do in XA attributes; however the two are not completely interchangeable in the information they store: XA does @emph{not} address filename limitations, and the Rock Ridge extensions don't indicate if a sector is in Mode 1 or Mode 2 format. The Rock Ridge extension makes use of a hook that was defined as part of the ISO 9660 standard. @node Mode 1 @subsection Mode 1 (2048 data bytes per sector) @cindex Mode 1 Mode 1 is the data storage mode used by to store computer data. There are 3 layers of error correction. A Compact Disc using only this format can hold at most 650 MB. The data is laid out in basically the same way as in and audio CD format, except that the 2,352 bytes of data in each block are broken down further. 2,048 of these bytes are for ``real'' data. The other 304 bytes are used for an additional level of error detecting and correcting code. This is necessary because data CDs cannot tolerate the loss of a handful of bits now and then, the way audio CDs can. In @value{libcdio} when you you want to read a mode1 sector you call the @code{cdio_read_mode1_sector()} or @code{cdio_read_mode1_sectors()}. @node Mode 2 @subsection Mode 2 (2336 data bytes per sector) @cindex Mode 2 Mode 2 data CDs are the same as mode 1 CDs except that the error detecting and correcting codes are omitted. So still there are 2 layers of error correction. A Compact Disc using only this mode can thus hold at most 742 MB. Similar to audio CDs, the mode 2 format provides a more flexible vehicle for storing types of data that do not require high data integrity: for example, graphics and video can use this format. But in contrast to the Red Book standard, different modes can be mixed together; this is the basis for the extensions to the original data CD standards known as CD-ROM Extended Architecture, or CD-ROM XA. CD-ROM XA formats currently in use are CD-I Bridge formats, Photo CD and Video CD plus Sony's Playstation. In @value{libcdio} when you you want to read a mode1 sector you call the @code{cdio_read_mode2_sector()} or @code{cdio_read_mode2_sectors()}. @node Green Book @section Green Book (CD-i) @cindex Green Book This was a CD-ROM format developed by Philips for CD-i (an obsolete embedded CD-ROM application allowing limited user user interaction with films, games and educational applications). The format is ISO 9660 compliant and introduced mode 2 form 2 addressing. It also contains XA (Extended Architecture) attributes. Although some Green Book discs contain CD-i applications which can only be played on a CD-i player, others have films or music videos. Video CDs in Green-Book format are labeled "Digital Video on CD." The Green Book for video is largely superseded by White book CD-ROM which draws on this specification. @node White Book @section White Book (DV, Video CD) @cindex Green Book The White Book was released by Sony, Philips, Matsushita, and JVC in 1993, defines the Video CD specification. The White Book is also known as Digital Video (DV). A Video CD contains one data track recorded in CD-ROM XA Mode 2 Form 2. It is always the first track on the disc (Track 1). The ISO-9660 file structure and a CD-i application program are recorded in this track, as well as the Video CD Information Area which gives general information about the Video Compact Disc. After the data track, video is written in one or more subsequent tracks within the same session. These tracks are also recorded in Mode 2 Form 2. In @value{libcdio} when you you want to read a mode2 format 2 audio sector you call the @code{cdio_read_mode2_sector()} or @code{cdio_read_mode2_sectors()} setting @code{b_form2} to @code{true}. @node CD Image Formats @chapter CD Image Formats @menu * CDRDAO TOC Format:: * CDRWIN BIN/CUE Format:: * NRG Format:: @end menu In both the @command{cdrdao} and bin/cue formats there is one meta-file with extensions @code{.toc} or @code{.cue} respectively and one or more files (often with the extension @code{.bin}) which contains the content of tracks. The format of the track data is often interchangeable between the two formats. For example, in @value{libcdio}'s regression tests we make use of this to reduce the size of the test data and just provide alternate meta-data files (@code{.toc} or @code{.cue}). In contrast to the first two formats, the NRG format consists of a single file. This has the advantage of being a self-contained unit: in the other two formats it is possible for the meta file to refer to a file that can't be found. A disadvantage of the NRG format is that the meta data can't be easily viewed or modified say in a text file as it can be with the first two formats. In conjunction with this disadvantage is another disadvantage that the format is not documented, so how @value{libcdio} interprets an NRG image is based on inference. It is recommended that one of the other forms be used instead of NRG where possible. @node CDRDAO TOC Format @section CDRDAO TOC Format This is @command{cdrdao}'s CD-image description format. Since this program is GPL and everything about it is in the open, it is the preferred format to use. (Alas, at present it isn't as well supported in @value{libcdio} as the BIN/CUE format.) The @emph{toc}-file describes what data is written to the media in the @acronym{CD-ROM}; it allows control over track/index positions, pre-gaps and sub-channel information. It is a text file, so a text editor can be used to create, view or modify it. The @cite{cdrdao(1) manual page}, contains more information about this format. @subsection CDRDAO Grammar Below are the lexical tokens and grammar for a cdrdao TOC. It was taken from the cdrdao's pacct grammar; the token and nonterminal names are the same. @example #lexclass START #token Eof "@@" #token "[\t\r\ ]+" #token Comment "//~[\n@@]*" #token "\n" #token BeginString "\"" #token Integer "[0-9]+" #tokclass AudioFile @{ "AUDIOFILE" "FILE" @} #lexclass STRING #token EndString "\"" #token StringQuote "\\\"" #token StringOctal "\\[0-9][0-9][0-9]" #token String "\\" #token String "[ ]+" #token String "~[\\\n\"\t ]*" @end example @example ::= ( "CATALOG" | )* @{ @} ( )+ Eof ::= "TRACK" @{ @} ( "ISRC" | @{ "NO" @} "COPY" | @{ "NO" @} "PRE_EMPHASIS" | "TWO_CHANNEL_AUDIO" | "FOUR_CHANNEL_AUDIO" )* @{ @} @{ "PREGAP" @} ( | "START" @{ msf @} | "END" @{ msf @} )+ ( "INDEX" )* ::= AudioFile @{ "SWAP" @} @{ "#" @} | "DATAFILE" @{ "#" @{ @} @} | "FIFO" | "SILENCE" | "ZERO" @{ dataMode @} @{ @} ::= BeginString ( String | StringQuote | StringOctal )+ EndString ::= BeginString ( String | StringQuote | StringOctal )* EndString ::= Integer ::= Integer ::= Integer ":" Integer ":" Integer ::= | ::= | ::= "AUDIO" | "MODE0" | "MODE1" | "MODE1_RAW" | "MODE2" | "MODE2_RAW" | "MODE2_FORM1" | "MODE2_FORM2" | "MODE2_FORM_MIX" ::= "AUDIO" | "MODE1" | "MODE1_RAW" | "MODE2" | "MODE2_RAW" | "MODE2_FORM1" | "MODE2_FORM2" | "MODE2_FORM_MIX" ::= "RW" | "RW_RAW" ::= "CD_DA" | "CD_ROM" | "CD_ROM_XA" | "CD_I" ::= "TITLE" | "PERFORMER" | "SONGWRITER" | "COMPOSER" | "ARRANGER" | "MESSAGE" | "DISC_ID" | "GENRE" | "TOC_INFO1" | "TOC_INFO2" | "RESERVED1" | "RESERVED2" | "RESERVED3" | "RESERVED4" | "UPC_EAN" | "ISRC" | "SIZE_INFO" ::= "@{" @{ Integer ( "," Integer )* @} "@}" ::= ( | ) ::= "LANGUAGE" Integer "@{" ( )* "@}" ::= "LANGUAGE_MAP" "@{" ( Integer ":" ( Integer | "EN" ) )+ "@}" ::= "CD_TEXT" "@{" ( )* "@}" ::= "CD_TEXT" "@{" @{ @} ( )* "@}" @end example @node CDRWIN BIN/CUE Format @section CDRWIN BIN/CUE Format @cindex BIN/CUE, CD Image Format The format referred to as @emph{CDRWIN BIN/CUE Format} in this manual is a popular CD image format used in the @acronym{PC} world. Not unlike @command{cdrdao}'s TOC file, the @emph{cue} file describes the track layout, i.e. how the sectors are to be placed on the CD media. The @emph{cue} file usually contains a reference to a file traditionally having the @file{.bin} extension in its filename, the @emph{bin} file. This @emph{bin} file contains the sector data payload which is to be written to the CD medium according to the description in the @emph{cue} file. The following is an attempt to describe the subset of the @file{.cue} file syntax used in @value{libcdio} and vcdimager in an EBNF-like notation: @subsection BIN/CUE Grammar @example @cartouche ::= +( + ) ::= "0" | "1" ... "8" | "9" ::= + ::= ":" ":" ::= "FILE" ::= [ "\"" ] [ "\"" ] | "\"" "\"" ::= "BINARY" ::= [ ] [ ] * [ ] ::= "FLAGS" * ::= "DCP" ::= "TRACK" ::= "PREGAP" ::= "INDEX" ::= "POSTGAP" ::= "AUDIO" | "MODE1/2048" | "MODE1/2352" | "MODE2/2336" | "MODE2/2352" ::= "REM" * @end cartouche @end example @node NRG Format @section NRG Format @cindex Nero NRG, CD-Image format The format referred to as @emph{NRG Format} in this manual is another popular CD image format. It is available only on Nero software on a Microsoft Windows Operating System. It is proprietary and not generally published, so the information we have comes from guessing based on sample CD images. So support for this is incomplete and using this format is not recommended. Unlike @command{cdrdao}'s TOC file the BIN/CUE format everything is contained in one file. that one can edit Meta information such as the number of tracks and track format is contained at the end of the file. This information is not intended to be edited through a text editor. @node CD Units @chapter The units that make up a CD @menu * Tracks:: Tracks * Sectors:: Block addressing (MSF, LSN, LBA) * Pre-gaps:: Track pre-gaps @end menu @node Tracks @section tracks --- disc subdivisions @cindex track @cindex gaps In this section we describe CD properties and terms that we make use of in @value{libcdio}. A CD is formatted into a number of @term{tracks}, and a CD can hold at most 99 such tracks. This is defined by @code{CDIO_CD_MAX_TRACKS} in @file{cdio/sector.h}. Between some tracks CD specifications require a ``2 second'' in gap (called a @term{lead-in gap}. This is unused space with no ``data'' similar to the space between tracks on an old phonograph. The word ``second'' here really refers to a measure of space and not really necessarily an amount of time. However in the special case that the CD encodes an audio CD or CD-DA, the amount of time to play a gap of this size will take 2 seconds. @cindex lead out The beginning (or inner edge) of the CD is supposed to have a ``2 second'' lead-in gap and there is supposed to be another ``2 second'' @term{lead-out} gap at the end (or outer edge) of the CD. People have discovered that they can put useful data in the @term{lead-in} and @term{lead-out} gaps, and their equipment can read this, violating the standards but allowing a CD to store more data. In order to determine the number of tracks on a CD and where they start, commands are used to get this table-of-contents or @term{TOC} information. Asking about the start of the @term{lead-out track} gives the amount of data stored on the Compact Disk. To make it easy to specify this leadout track, special constant 0xAA (decimal 170) is used to indicate it. This is safe since this is higher than the largest legal track position. In @value{libcdio}, @code{CDIO_CDROM_LEADOUT_TRACK} is defined to be this special value. @node Sectors @section block addressing (MSF, LSN, LBA) @cindex MSF @cindex LSN @cindex LBA @cindex sectors @cindex frames A track is broken up into a number of 2352-byte @emph{blocks} which we sometimes call @emph{sectors} or @emph{frames}. Whereas tracks may have a gap between them, a block or sector does not. (In @value{libcdio} the block size constant is defined using @code{CDIO_CD_FRAMESIZE_RAW}). A Compact Disc has a limit on the number of blocks or sectors. This values is defined by constant @code{CDIO_CD_MAX_LSN} in @file{cdio/sector.h}. One can addressing a block in one of three formats. The oldest format is by it's minute/second/frame number, also referred to as @term{MSF} and written in time-like format MM:SS:FF (e.g. 30:01:40). It is best suited in audio (Red Book) applications. In @value{libcdio}, the type @code{msf_t} can be used to declare variables to hold such values. Minute, second and frame values are one byte @emph{and stored BCD notation}.@footnote{Perhaps this is a @value{libcdio} design flaw. It was originally done I guess because it was convenient for VCDs.} There are @value{libcdio} conversion routines @code{cdio_from_bcd8()} and @code{cdio_to_bcd8()} to convert the minute, second, and frame values into or out of integers. If you want to print a field in a BCD-encoded MSF, one can use the format specifier @code{%x} @emph{(not @code{%d})} and things will come out right. In the MSF notation, there are 75 ``frames'' in a ``second,'' and the familiar (if awkward) 60 seconds in a minute. @emph{Frame} here is what we called a @emph{block} above. The CD specification defines ``frame'' to be @emph{another} unit which makes up a block. Very confusing. A frame is also sometimes called a sector, analogous to hard-disk terminology. Even more confusing is using this time-like notation for an address or for a length. Too often people confuse the MSF notation this with an amount of time. A ``second'' (or @code{CDIO_CD_FRAMES_PER_SEC} blocks) in this notation is only a second of playing time for something encoded as CD-DA. It does @emph{not} necessarily represent the amount time that it will take to play a of Video CD---usually you need more blocks than this. Nor does it represent the amount of data used to play a second of an MP3---usually you need fewer blocks than this. It is also not the amount of time your CD-ROM will take to read a ``second'' of data off a Compact Disc: for example a 12x CD player will read 12x @code{CDIO_CD_FRAMES_PER_SEC} @code{CDIO_CD_FRAMSIZE_RAW}-byte blocks in a one second of time. When programming, unless one is working with a CD-DA (and even here, only in a time-like fashion), is generally more cumbersome to use an MSF rather than a LBA or LSN described below, since subtraction of two MSF's has the awkwardness akin to subtraction using Roman Numerals. Probably the simplest way to address a block is to use its @term{LSN} or ``logical sector number.'' This just numbers the blocks usually from 0 on. @emph{fix me: LSNs can be negative up to the pregap size?} The Lead-in and Lead-out gaps described above have LSNs just like any other space on a CD. The last unit of address is a @term{LBA}. It is the same as a LSN but the 150 blocks associated with the initial lead-in is are not counted. So to convert a LBA into an LSN you just add 150. Why the distinction between LBA and LSN? I don't know, perhaps this has something to do with ``multisession'' CDs. @node Pre-gaps @section track pre-gaps -- @acronym{CD-DA} discs and gaps @cindex CD-DA @cindex gaps @cindex lead in @cindex lead out @cindex pre-gap @cindex Q sub-channel Gaps are possibly one of the least understood topics in audio discs. In the case of @acronym{CD-DA} discs, standards require a silent 2 second gap before the first audio track and after the last audio track (in each session.) These are respectively referred to as @term{lead-in} and @term{lead-out} gaps. No other gaps are required. It is important not to confuse the required @term{lead-in} and @term{lead-out} gaps with the optional track @term{pre-gap}s. Track @term{pre-gap}s are the gaps that may occur between audio tracks. Typically, track @term{pre-gap}s are filled with silence so that the listener knows that one song has ended, and the next will soon begin. However, track @term{pre-gap}s do not have to contain silence. One exception is an audio disc of a live performance. Because the performer may seamlessly move from one piece of the performance to the next, it would be unnatural for the disc to contain silence between the two pieces. Instead, the track number updates with no interruption in the performance. This allows the listener to either hear the entire performance without unnatural interruptions, or to conveniently skip to certain pieces of the performance. Finally, some @acronym{CD-DA} discs--whose behavior will be described below--lack track @term{pre-gap}s altogether although they must still include the @term{lead-in} and @term{lead-out} gaps. In order to understand the track @term{pre-gap}s that occur between audio tracks, it is necessary to understand how CD players display the track number and time. Embedded in each block of audio data is non-audio information known as the @term{Q sub-channel}. The @term{Q sub-channel} data tells the CD player what track number and time it should display while it is playing the block of audio data in which the @term{Q sub-channel} data is embedded. Near the end of some tracks, the @term{Q sub-channel} may instruct the CD player to update the track number to the next track, and display a count down to the next track, often starting at -2 seconds and proceeding to zero. This is known as an audio track @term{pre-gap}. It may either contain silence, or as previously discussed--in the case of live performances--it may contain audio. Almost as often as not, there is no @term{pre-gap} whatsoever. Regardless, an audio track @term{pre-gap} is purely determined by the contents of the @term{Q sub-channel}, which is embedded in each audio sector. This has some interesting implications for the track forward button. When the track forward button is pressed on a CD player, the CD player advances to the next track, skipping that track's @term{pre-gap}. This is because the CD player uses the starting address of the track from the disc's table of contents (TOC) to determine where to start playing a track when either the track forward or track backward buttons are pressed. So to hear a @term{pre-gap} for track 4, the listener must either listen to track 3 first, or use the track forward or backward buttons to go to track 4, then use the seek backward button to back up into track 4's @term{pre-gap}, which is really part of track 3, at least according to the TOC. Track 1 @term{pre-gap}s are especially interesting because some commercial discs have audio hidden before the beginning of the first track! The only way to hear this hidden audio with a standard player is to use the seek backward button as soon as track 1 begins playing! Audio track @term{pre-gap}s may be specified in a couple of different ways in the popular cue file format. The first way of specifying a @term{pre-gap} is to use the @command{PREGAP} command. This will place a @term{pre-gap} containing silence before a track. The second way of specifying a @term{pre-gap} is to give a track an @command{INDEX 00} as well as the more normal @command{INDEX 01}. @command{INDEX 01} will be used to specify the start of the track in the disc's TOC, while @command{INDEX 00} will be used to specify the start of the track's @term{pre-gap} as recorded in the @term{Q sub-channel}. @command{INDEX 00} is ordinarily used for specifying track @term{pre-gap}s that contain audio rather than silence. Thus, the cue file format may be used to specify track @term{pre-gap}s with silence or audio, depending on whether the @command{PREGAP} or @command{INDEX 00} commands are specified. If neither type of @term{pre-gap} is specified for a track, no @term{pre-gap} is created for that track, which merely means the absence of @term{pre-gap} information in the @term{Q sub-channel}, and the lack of a short count down to the next track. Various @acronym{CD-DA} ripping programs take various approaches to track @term{pre-gap}s. Some ripping programs ignore track @term{pre-gap}s altogether, relying solely on the disc's TOC to determine where tracks begin and end. If a disc is ripped with such a program, then re-burned later, the resulting disc will lack track @term{pre-gap}s, and thereby lack the playback behavior of counting down to the next track. Other ripping programs detect track @term{pre-gap}s and record them in the popular cue file format among others. Such ripping programs sometimes allow the user to determine whether track @term{pre-gap}s will be appended to the prior track or pre-pended to the track to which they "belong". Note that if a ripping program is ignorant of track @term{pre-gap}s, the track @term{pre-gap}s will be appended to the prior track, because that is where the disc's TOC puts them. Thus, there are many different ways an application may chose to deal with track @term{pre-gap}s. Consequently, @kbd{libcdio} does not dictate the policy a ripping program should use in dealing with track @term{pre-gap}s. Hence, @kbd{libcdio} provides the @code{cdio_get_track_pregap_[lba|lsn]()} interfaces to allow the application to deal with track @term{pre-gap}s as it sees fit. Note that the @code{cdio_get_track_pregap_[lba|lsn]()} interfaces currently only provide information for CDRDAO TOC, CDRWIN BIN/CUE, and NRG images. Getting the track @term{pre-gap}s from a CD drive is a more complicated problem because not all CD drives support reading the @term{Q sub-channel} @emph{directly} at @emph{high} speed, and there is no interface to determine whether or not a drive supports this optional feature, aside from trying to read the @term{Q sub-channel}, and possibly incurring IO errors. However, all drives @emph{do} support reading the @term{Q sub-channel} @emph{indirectly} while playing an audio disc by asking the drive for the current position. Unfortunately, this occurs at normal playback speed, and requires a certain settling time after the disc starts playing. Thus, using this @emph{slow} interface requires a more sophisticated algorithm, such as binary search or some heuristic, like backing up progressively from the end of the prior track to look for the next track's @term{pre-gap}. Note that CD drives seek @emph{slow}ly, so it is better to simply use a drive that can read the @term{Q sub-channel} directly at @emph{high} speed, and avoid complicated software solutions. (Not to mention that if the user has an older system with an analog audio cable hooked up between their soundboard and their drive, and a ripping program uses the @emph{slow} interface, the user will hear bits of the audio on the disc!) Consequently, because there is no good universal solution to the problem of reading the @term{Q sub-channel} from a drive, @kbd{libcdio} currently leaves this problem up to the application, a problem which is readily approachable through either @kbd{libcdio}'s MMC interface or @kbd{libcdio}'s cdda interface. For an example of one such application, see @url{https://gna.org/projects/cued/}. The preceding section on track @term{pre-gaps} and @acronym{CD-DA} was contributed by Robert William Fuller (@email{hydrologiccycle@@gmail.com}). @node How to use @chapter How to use The @value{libcdio} package comes with a number of small example programs in the directory @file{example} which demonstrate different aspects of the library and show how to use the library. The source code to all of the examples here are contained on the package. Other sources for examples would be the larger utility programs @command{cd-drive}, @command{cd-info}, @command{cd-read}, @command{iso-info}, and @command{iso-read} which are all in the @file{src} directory of the @value{libcdio} package. See also @xref{Utility Programs}. @menu * Include problem:: A note about including * Example 1:: list out tracks and LSNs * Example 2:: list drivers available and default CD device * Example 3:: figure out what kind of CD (image) we've got * Example 4:: use libiso9660 to extract a file from an ISO-9660 image * Example 5:: list CD-Text and CD disc mode info * Example 6:: run a MMC INQUIRY command * Example 7:: using the CD Paranoia library for CD-DA reading * All sample programs:: list of all programs in the example directory @end menu @node Include problem @section A note about including @code{} libcdio installs @code{}. This file contains all of the C Preprocessor values from @code{config.h} (created by configure). This header can be used to consult exactly how libcdio was built. Initially I had selected ``interesting'' values, but this became too hard to maintain. One set of values that libdio needs internally is the whether the CPU that was used to compile libcdio is BigEndian or not; it can get this from libcdio's @code{config.h} which is not installed and preferred or @code{cdio/cdio_config.h}. Some of the libcdio programs like the demo programs include @code{config.h} for the generic reasons that the configuration-created @code{config.h} file is used: to figure out what headers are available. For example, do we have @code{}? The file @code{config.h} is generated by an autotools-generated @code{configure} script. It doesn't check to see if it has been included previously. Later, the demo programs include @code{} to get libcdio headers. But because libcdio needs some of the same information like the BigEndian value, this creates a duplicate include. The way I get around this in the demo programs is by defining @code{__CDIO_CONFIG_H__} after including @code{config.h} as follows: @smallexample #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif @end smallexample Applications using libcdio may find it handy to do something like this as well. Defining @code{__CDIO_CONFIG_H__} will make sure @code{config_cdio.h} which is internally used, doesn't try to redefine preprocessor symbols. Ok. But now what about the problem that there are common preprocessor symbols in @code{config_cdio.h} that an application may want to define in a different manner, like @code{PACKAGE_NAME}? For this, there is yet another header, @code{}. This file undefines any symbol that @code{config.h} defines. And now we bounce to the problem that there may be symbols that are normally defined (@code{HAVE_UNISTD_H}) and you want to keep that way, but others that you don't. So here is what I suggest: @smallexample // for cdio: #include #include # remove *all* symbols libcdio defines // Add back in the ones you want your program #include @end smallexample The solution isn't the most simple or natural, but programming sometimes can be difficult. If someone has a better solution, let me know. Between header files @code{cdio_config.h} and @code{cdio_unconfig.h} and all the fact that almost all headers@footnote{@code{} is one of the few headers that doesn't set a preprocessor symbol: it does its thing every time it is @code{#included}} define a symbol to indicate they have been included, I think there is enough mechanism to cover most situations that may arise. @node Example 1 @section Example 1: list out tracks and LSNs Here we will give an annotated example which can be found in the distribution as @file{example/tracks.c}. @smallexample 1: #include 2: #include 3: #include 4: int 5: main(int argc, const char *argv[]) 6: @{ 7: CdIo_t *p_cdio = cdio_open ("/dev/cdrom", DRIVER_DEVICE); 8: track_t first_track_num = cdio_get_first_track_num(p_cdio); 9: track_t i_tracks = cdio_get_num_tracks(p_cdio); 10: int j, i=first_track_num; 11: 12: printf("CD-ROM Track List (%i - %i)\n", first_track_num, i_tracks); 13 14: printf(" #: LSN\n"); 15: 16: for (j = 0; j < i_tracks; i++, j++) @{ 17: lsn_t lsn = cdio_get_track_lsn(p_cdio, i); 18: if (CDIO_INVALID_LSN != lsn) 19: printf("%3d: %06d\n", (int) i, lsn); 20: @} 21: printf("%3X: %06d leadout\n", CDIO_CDROM_LEADOUT_TRACK, 22: cdio_get_track_lsn(p_cdio, CDIO_CDROM_LEADOUT_TRACK)); 23: cdio_destroy(p_cdio); 24: return 0; 25: @} @end smallexample Already from the beginning on line 2 we see something odd. The @code{#include } is needed because @value{libcdio} assumes type definitions exist for @code{uint32_t}, @code{uint16_t} and so on. Alternatively you change line 2 to: @smallexample #define HAVE_SYS_TYPES_H @end smallexample and @code{} will insert line 2. If you use GNU autoconf to configure your program, add @code{sys/types.h} to @code{AC_HAVE_HEADERS} and @emph{it} will arrange for @code{HAVE_SYS_TYPES_H} to get defined. If you don't have @code{} but have some other include that defines these types, put that instead of line 2. Or you could roll your own typedefs. (Note: In the future, this will probably get ``fixed'' by requiring glib.h.) Okay after getting over the hurdle of line 2, the next line pretty straightforward: you need to include this to get cdio definitions. One of the types that is defined via line 3 is @code{CdIo_t} and a pointer that is used pretty much in all operations. Line 6 initializes the variable @code{cdio} which we will be using in all of the subsequent libcdio calls. It does this via a call to @code{cdio_open()}. The second parameter of @code{cdio_open} is DRIVER_UNKNOWN. For any given installation a number of Compact Disc device drivers may be available. In particular it's not uncommon to have several drivers that can read CD disk-image formats as well as a driver that handles some CD-ROM piece of hardware. Using DRIVER_UNKNOWN as that second parameter we let the library select a driver amongst those that are available; generally the first hardware driver that is available is the one selected. If there is no CD in any of the CD-ROM drives or one does not have access to the CD-ROM, it is possible that @value{libcdio} will find a CD image in the directory you run this program and will pick a suitable CD-image driver. If this is not what you want, but always want some sort of CD-ROM driver (or failure if none), then use DRIVER_DEVICE instead of DRIVER_UNKNOWN. Note that in contrast to what is typically done using ioctls to read a CD, you don't issue any sort of CD-ROM read TOC command---that is all done by the driver. Of course, the information that you get from reading the TOC is often desired: many tracks are on the CD, or what number the first one is called. This is done through calls on lines 8 and 9. For each track, we call a cdio routine to get the logical sector number, @code{cdio_get_track_lsn()} on line 17 and print the track number and LSN value. Finally we print out the ``lead-out track'' information and we finally call @code{cdio_destroy()} in line 23 to indicate we're done with the CD. @node Example 2 @section Example 2: list drivers available and default CD device One thing that's a bit hockey in Example 1 is hard-coding the name of the device used: @code{/dev/cdrom}. Although often this is the name of a CD-ROM device on GNU/Linux and possibly some other Unix derivatives, there are many OSs for which use a different device name. In the next example, we'll let the driver give us the name of the CD-ROM device that is right for it. @smallexample 1: #include 2: #include 3: #include 4: int 5: main(int argc, const char *argv[]) 6: @{ 7: CdIo_t *p_cdio = cdio_open (NULL, DRIVER_DEVICE); 8: const driver_id_t *driver_id_p; 9: 10: if (NULL != p_cdio) @{ 11: printf("The driver selected is %s\n", cdio_get_driver_name(p_cdio)); 12: printf("The default device for this driver is %s\n\n", 13: cdio_get_default_device(p_cdio)); 14: cdio_destroy(p_cdio); 15: @} else @{ 16: printf("Problem in trying to find a driver.\n\n"); 17: @} 18: 19: for (driver_id_p=cdio_drivers; *driver_id_p!=DRIVER_UNKNOWN; driver_id_p++) 20: if (cdio_have_driver(*driver_id_p)) 21: printf("We have: %s\n", cdio_driver_describe(*driver_id_p)); 22: else 23: printf("We don't have: %s\n", cdio_driver_describe(*driver_id_p)); 24: return 0; 25: @} @end smallexample @node Example 3 @section Example 3: figure out what kind of CD (image) we've got In this example is a somewhat simplified program to show the use of @command{cdio_guess_cd_type()} to figure out the kind of CD image we've got. This can be found in the distribution as @file{example/sample3.c}. @smallexample #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include #include static void print_analysis(cdio_iso_analysis_t cdio_iso_analysis, cdio_fs_anal_t fs, int first_data, unsigned int num_audio, track_t i_tracks, track_t first_track_num, CdIo_t *cdio) @{ switch(CDIO_FSTYPE(fs)) @{ case CDIO_FS_AUDIO: break; case CDIO_FS_ISO_9660: printf("CD-ROM with ISO 9660 filesystem"); if (fs & CDIO_FS_ANAL_JOLIET) @{ printf(" and joliet extension level %d", cdio_iso_analysis.joliet_level); @} if (fs & CDIO_FS_ANAL_ROCKRIDGE) printf(" and rockridge extensions"); printf("\n"); break; case CDIO_FS_ISO_9660_INTERACTIVE: printf("CD-ROM with CD-RTOS and ISO 9660 filesystem\n"); break; case CDIO_FS_HIGH_SIERRA: printf("CD-ROM with High Sierra filesystem\n"); break; case CDIO_FS_INTERACTIVE: printf("CD-Interactive%s\n", num_audio > 0 ? "/Ready" : ""); break; case CDIO_FS_HFS: printf("CD-ROM with Macintosh HFS\n"); break; case CDIO_FS_ISO_HFS: printf("CD-ROM with both Macintosh HFS and ISO 9660 filesystem\n"); break; case CDIO_FS_UFS: printf("CD-ROM with Unix UFS\n"); break; case CDIO_FS_EXT2: printf("CD-ROM with Linux second extended filesystem\n"); break; case CDIO_FS_3DO: printf("CD-ROM with Panasonic 3DO filesystem\n"); break; case CDIO_FS_UNKNOWN: printf("CD-ROM with unknown filesystem\n"); break; @} switch(CDIO_FSTYPE(fs)) @{ case CDIO_FS_ISO_9660: case CDIO_FS_ISO_9660_INTERACTIVE: case CDIO_FS_ISO_HFS: printf("ISO 9660: %i blocks, label `%.32s'\n", cdio_iso_analysis.isofs_size, cdio_iso_analysis.iso_label); break; @} if (first_data == 1 && num_audio > 0) printf("mixed mode CD "); if (fs & CDIO_FS_ANAL_XA) printf("XA sectors "); if (fs & CDIO_FS_ANAL_MULTISESSION) printf("Multisession"); if (fs & CDIO_FS_ANAL_HIDDEN_TRACK) printf("Hidden Track "); if (fs & CDIO_FS_ANAL_PHOTO_CD) printf("%sPhoto CD ", num_audio > 0 ? " Portfolio " : ""); if (fs & CDIO_FS_ANAL_CDTV) printf("Commodore CDTV "); if (first_data > 1) printf("CD-Plus/Extra "); if (fs & CDIO_FS_ANAL_BOOTABLE) printf("bootable CD "); if (fs & CDIO_FS_ANAL_VIDEOCD && num_audio == 0) @{ printf("Video CD "); @} if (fs & CDIO_FS_ANAL_SVCD) printf("Super Video CD (SVCD) or Chaoji Video CD (CVD)"); if (fs & CDIO_FS_ANAL_CVD) printf("Chaoji Video CD (CVD)"); printf("\n"); @} int main(int argc, const char *argv[]) @{ CdIo_t *p_cdio = cdio_open (NULL, DRIVER_UNKNOWN); cdio_fs_anal_t fs=0; track_t i_tracks; track_t first_track_num; lsn_t start_track; /* first sector of track */ lsn_t data_start =0; /* start of data area */ int first_data = -1; /* # of first data track */ int first_audio = -1; /* # of first audio track */ unsigned int num_data = 0; /* # of data tracks */ unsigned int num_audio = 0; /* # of audio tracks */ unsigned int i; if (NULL == p_cdio) @{ printf("Problem in trying to find a driver.\n\n"); return 1; @} first_track_num = cdio_get_first_track_num(p_cdio); i_tracks = cdio_get_num_tracks(p_cdio); /* Count the number of data and audio tracks. */ for (i = first_track_num; i <= i_tracks; i++) @{ if (TRACK_FORMAT_AUDIO == cdio_get_track_format(p_cdio, i)) @{ num_audio++; if (-1 == first_audio) first_audio = i; @} else @{ num_data++; if (-1 == first_data) first_data = i; @} @} /* try to find out what sort of CD we have */ if (0 == num_data) @{ printf("Audio CD\n"); @} else @{ /* we have data track(s) */ int j; cdio_iso_analysis_t cdio_iso_analysis; memset(&cdio_iso_analysis, 0, sizeof(cdio_iso_analysis)); for (j = 2, i = first_data; i <= i_tracks; i++) @{ lsn_t lsn; track_format_t track_format = cdio_get_track_format(p_cdio, i); lsn = cdio_get_track_lsn(p_cdio, i); switch ( track_format ) @{ case TRACK_FORMAT_AUDIO: case TRACK_FORMAT_ERROR: break; case TRACK_FORMAT_CDI: case TRACK_FORMAT_XA: case TRACK_FORMAT_DATA: case TRACK_FORMAT_PSX: ; @} start_track = (i == 1) ? 0 : lsn; /* save the start of the data area */ if (i == first_data) data_start = start_track; /* skip tracks which belong to the current walked session */ if (start_track < data_start + cdio_iso_analysis.isofs_size) continue; fs = cdio_guess_cd_type(p_cdio, start_track, i, &cdio_iso_analysis); print_analysis(cdio_iso_analysis, fs, first_data, num_audio, i_tracks, first_track_num, p_cdio); if ( !(CDIO_FSTYPE(fs) == CDIO_FS_ISO_9660 || CDIO_FSTYPE(fs) == CDIO_FS_ISO_HFS || CDIO_FSTYPE(fs) == CDIO_FS_ISO_9660_INTERACTIVE) ) /* no method for non-ISO9660 multisessions */ break; @} @} cdio_destroy(p_cdio); return 0; @} @end smallexample @node Example 4 @section Example 4: use libiso9660 to extract a file from an ISO-9660 image Next a program to show using @command{libiso9660} to extract a file from an ISO-9660 image. This can be found in the distribution as @file{example/isofile.c}. A more complete and expanded version of this is @command{iso-read}, part of this distribution. @smallexample /* This is the ISO 9660 image. */ #define ISO9660_IMAGE_PATH "../" #define ISO9660_IMAGE ISO9660_IMAGE_PATH "test/copying.iso" #define LOCAL_FILENAME "copying" #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #define my_exit(rc) \ fclose (p_outfd); \ free(p_statbuf); \ iso9660_close(p_iso); \ return rc; \ int main(int argc, const char *argv[]) @{ iso9660_stat_t *p_statbuf; FILE *p_outfd; int i; iso9660_t *p_iso = iso9660_open (ISO9660_IMAGE); if (NULL == p_iso) @{ fprintf(stderr, "Sorry, couldn't open ISO 9660 image %s\n", ISO9660_IMAGE); return 1; @} p_statbuf = iso9660_ifs_stat_translate (p_iso, LOCAL_FILENAME); if (NULL == p_statbuf) @{ fprintf(stderr, "Could not get ISO-9660 file information for file %s\n", LOCAL_FILENAME); iso9660_close(p_iso); return 2; @} if (!(p_outfd = fopen (LOCAL_FILENAME, "wb"))) @{ perror ("fopen()"); free(p_statbuf); iso9660_close(p_iso); return 3; @} /* Copy the blocks from the ISO-9660 filesystem to the local filesystem. */ for (i = 0; i < p_statbuf->size; i += ISO_BLOCKSIZE) @{ char buf[ISO_BLOCKSIZE]; memset (buf, 0, ISO_BLOCKSIZE); if ( ISO_BLOCKSIZE != iso9660_iso_seek_read (p_iso, buf, p_statbuf->lsn + (i / ISO_BLOCKSIZE), 1) ) @{ fprintf(stderr, "Error reading ISO 9660 file at lsn %lu\n", (long unsigned int) p_statbuf->lsn + (i / ISO_BLOCKSIZE)); my_exit(4); @} fwrite (buf, ISO_BLOCKSIZE, 1, p_outfd); if (ferror (p_outfd)) @{ perror ("fwrite()"); my_exit(5); @} @} fflush (p_outfd); /* Make sure the file size has the exact same byte size. Without the truncate below, the file will a multiple of ISO_BLOCKSIZE. */ if (ftruncate (fileno (p_outfd), p_statbuf->size)) perror ("ftruncate()"); my_exit(0); @} @end smallexample @node Example 5 @section Example 5: list CD-Text and disc mode info Next a program to show using @command{libcdio} to list CD-TEXT data. This can be found in the distribution as @file{example/cdtext.c}. @smallexample /* Simple program to list CD-Text info of a Compact Disc using libcdio. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include static void print_cdtext_track_info(CdIo_t *p_cdio, track_t i_track, const char *message) @{ const cdtext_t *cdtext = cdio_get_cdtext(p_cdio, 0); if (NULL != cdtext) @{ cdtext_field_t i; printf("%s\n", message); for (i=0; i < MAX_CDTEXT_FIELDS; i++) @{ if (cdtext->field[i]) @{ printf("\t%s: %s\n", cdtext_field2str(i), cdtext->field[i]); @} @} @} @} static void print_disc_info(CdIo_t *p_cdio, track_t i_tracks, track_t i_first_track) @{ track_t i_last_track = i_first_track+i_tracks; discmode_t cd_discmode = cdio_get_discmode(p_cdio); printf("%s\n", discmode2str[cd_discmode]); print_cdtext_track_info(p_cdio, 0, "\nCD-Text for Disc:"); for ( ; i_first_track < i_last_track; i_first_track++ ) @{ char psz_msg[50]; sprintf(msg, "CD-Text for Track %d:", i_first_track); print_cdtext_track_info(p_cdio, i_first_track, psz_msg); @} @} int main(int argc, const char *argv[]) @{ track_t i_first_track; track_t i_tracks; CdIo_t *p_cdio; cdio = cdio_open (NULL, DRIVER_UNKNOWN); i_first_track = cdio_get_first_track_num(p_cdio); i_tracks = cdio_get_num_tracks(p_cdio); if (NULL == p_cdio) @{ printf("Couldn't find CD\n"); return 1; @} else @{ print_disc_info(p_cdio, i_tracks, i_first_track); @} cdio_destroy(p_cdio); return 0; @} @end smallexample @node Example 6 @section Example 6: Using MMC to run an @code{INQURY} command Now a program to show issuing a simple MMC command (@code{INQUIRY}). This MMC command retrieves the vendor, model and firmware revision number of a CD drive. For this command to work, usually a CD to be loaded into the drive; odd since the CD itself is not used. This can be found in the distribution as @file{example/mmc1.c}. @smallexample #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 /* assumes config.h is libcdio's config.h / #endif #include #include #include #include #include /* Set how long to wait for MMC commands to complete */ #define DEFAULT_TIMEOUT_MS 10000 int main(int argc, const char *argv[]) @{ CdIo_t *p_cdio; p_cdio = cdio_open (NULL, DRIVER_UNKNOWN); if (NULL == p_cdio) @{ printf("Couldn't find CD\n"); return 1; @} else @{ int i_status; /* Result of MMC command */ char buf[36] = @{ 0, @}; /* Place to hold returned data */ scsi_mmc_cdb_t cdb = @{@{0, @}@}; /* Command Descriptor Buffer */ CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_INQUIRY); cdb.field[4] = sizeof(buf); i_status = scsi_mmc_run_cmd(p_cdio, DEFAULT_TIMEOUT_MS, &cdb, SCSI_MMC_DATA_READ, sizeof(buf), &buf); if (i_status == 0) @{ char psz_vendor[CDIO_MMC_HW_VENDOR_LEN+1]; char psz_model[CDIO_MMC_HW_MODEL_LEN+1]; char psz_rev[CDIO_MMC_HW_REVISION_LEN+1]; memcpy(psz_vendor, buf + 8, sizeof(psz_vendor)-1); psz_vendor[sizeof(psz_vendor)-1] = '\0'; memcpy(psz_model, buf + 8 + CDIO_MMC_HW_VENDOR_LEN, sizeof(psz_model)-1); psz_model[sizeof(psz_model)-1] = '\0'; memcpy(psz_rev, buf + 8 + CDIO_MMC_HW_VENDOR_LEN +CDIO_MMC_HW_MODEL_LEN, sizeof(psz_rev)-1); psz_rev[sizeof(psz_rev)-1] = '\0'; printf("Vendor: %s\nModel: %s\nRevision: %s\n", psz_vendor, psz_model, psz_rev); @} else @{ printf("Couldn't get INQUIRY data (vendor, model, and revision\n"); @} @} cdio_destroy(p_cdio); return 0; @} @end smallexample Note the include of @code{#define} of @code{__CDIO_CONFIG_H__} towards the beginning. This is useful if the prior @code{#include} of @code{config.h} refers to libcdio's configuration header. It indicates that libcdio's configuration settings have been used. Without it, you may get messages about C Preprocessor symbols getting redefined in the @code{#include} of @code{}. @node Example 7 @section Example 7: Using the CD Paranoia library for CD-DA reading The below program reads CD-DA data. For a more complete program to add a WAV header so that the CD can be played from a copy on a hard disk, see the corresponding distribution program. This can be found in the distribution as @file{example/paranoia.c}. @smallexample #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 /* assumes config.h is libcdio's config.h / #endif #include #include #include #ifdef HAVE_STDLIB_H #include #endif int main(int argc, const char *argv[]) @{ cdrom_drive_t *d = NULL; /* Place to store handle given by cd-paranoia. */ char **ppsz_cd_drives; /* List of all drives with a loaded CDDA in it. */ /* See if we can find a device with a loaded CD-DA in it. */ ppsz_cd_drives = cdio_get_devices_with_cap(NULL, CDIO_FS_AUDIO, false); if (ppsz_cd_drives) @{ /* Found such a CD-ROM with a CD-DA loaded. Use the first drive in the list. */ d=cdio_cddap_identify(*ppsz_cd_drives, 1, NULL); @} else @{ printf("Unable find or access a CD-ROM drive with an audio CD in it.\n"); exit(1); @} /* Don't need a list of CD's with CD-DA's any more. */ cdio_free_device_list(ppsz_cd_drives); /* We'll set for verbose paranoia messages. */ cdio_cddap_verbose_set(d, CDDA_MESSAGE_PRINTIT, CDDA_MESSAGE_PRINTIT); if ( 0 != cdio_cddap_open(d) ) @{ printf("Unable to open disc.\n"); exit(1); @} /* Okay now set up to read up to the first 300 frames of the first audio track of the Audio CD. */ @{ cdrom_paranoia_t *p = cdio_paranoia_init(d); lsn_t i_first_lsn = cdio_cddap_disc_firstsector(d); if ( -1 == i_first_lsn ) @{ printf("Trouble getting starting LSN\n"); @} else @{ lsn_t i_cursor; track_t i_track = cdio_cddap_sector_gettrack(d, i_first_lsn); lsn_t i_last_lsn = cdio_cddap_track_lastsector(d, i_track); /* For demo purposes we'll read only 300 frames (about 4 seconds). We don't want this to take too long. On the other hand, I suppose it should be something close to a real test. */ if ( i_last_lsn - i_first_lsn > 300) i_last_lsn = i_first_lsn + 299; printf("Reading track %d from LSN %ld to LSN %ld\n", i_track, (long int) i_first_lsn, (long int) i_last_lsn); /* Set reading mode for full paranoia, but allow skipping sectors. */ paranoia_modeset(p, PARANOIA_MODE_FULL^PARANOIA_MODE_NEVERSKIP); paranoia_seek(p, i_first_lsn, SEEK_SET); for ( i_cursor = i_first_lsn; i_cursor <= i_last_lsn; i_cursor ++) @{ /* read a sector */ int16_t *p_readbuf=cdio_paranoia_read(p, NULL); char *psz_err=cdio_cddap_errors(d); char *psz_mes=cdio_cddap_messages(d); if (psz_mes || psz_err) printf("%s%s\n", psz_mes ? psz_mes: "", psz_err ? psz_err: ""); if (psz_err) free(psz_err); if (psz_mes) free(psz_mes); if( !p_readbuf ) @{ printf("paranoia read error. Stopping.\n"); break; @} @} @} cdio_paranoia_free(p); @} cdio_cdda_close(d); exit(0); @} @end smallexample Those who are die-hard cdparanoia programmers will notice that the @value{libcdio} paranoia names are similar but a little bit different. In particular instead of @code{paranoia_read} we have above @code{cdio_paranoia_read} and instead of @code{cdda_open} we have @code{cdio_cddap_open}. This was done intentionally so that it is possible for the original paranoia program can co-exist both in source code and linked libraries and not conflict with @value{libcdio}'s paranoia source and libraries. In general in place of any paranoia routine that begins @code{paranoia_}, use @code{cdio_paranoia_} and in place of any paranoia routine that begins @code{cdda_}, use @code{cdio_cddap_}. But for a limited time @value{libcdio} will accept the old paranoia names which may be useful for legacy paranoia code. The way this magic works is by defining the old paranoia name to be the @value{libcdio} name. In the unusual case where you do want to use both the original paranoia and @value{libcdio} routines in a single source, the C preprocessor symbol @code{DO_NOT_WANT_PARANOIA_COMPATIBILITY} can be @code{define}'d and this disables the @code{#define} substitution done automatically. The may still be a problem with conflicting structure definitions like @code{cdrom_drive_t}. @node All sample programs @section A list of all sample programs in the @code{example} directory The @code{example} directory contains some simple examples of the use of the @value{libcdio} library. A larger more-complicated example are the @command{cd-drive}, @command{cd-info}, @command{cd-read}, @command{iso-info} and @command{iso-info} programs in the @command{src} directory. Descriptions of the sample are as follows... @table @code @item @code{audio.c} A program to show audio controls. @item @code{cdchange.c} A program to test if a CD has been changed since the last change test. @item @code{cd-eject.c} A a stripped-down "eject" command to open or close a CD-ROM tray. @item @code{cdtext.c} A program to show CD-Text and CD disc mode info. @item @code{drives.c} A program to show drivers installed and what the default CD-ROM drive is and what CD drives are available. @item @code{eject.c} A program eject a CD from a CD-ROM drive and then close the door again. @item @code{isofile.c} A program to show using libiso9660 to extract a file from an ISO-9660 image. @item @code{isofile2.c} A program to show using libiso9660 to extract a file from a CDRWIN cue/bin CD image. @item @code{C++/isofile2.cpp} The same program as @code{isofile2.c} written in C++. @item @code{isofuzzy.c} A program showing fuzzy ISO-9660 detection/reading. @item @code{isolist.c} A program to show using @code{libiso9660} to list files in a directory of an ISO-9660 image. @item @code{C++/isolist.cpp} The same program as @code{isolist.c} written in C++. @item @code{C++/isolist.cpp} The same program as @code{isolist.c} written in C++. @item @code{isofuzzy.c} A program showing fuzzy ISO-9660 detection/reading. @item @code{mmc1.c} A program to show issuing a simple MMC command (@code{INQUIRY}). @item @code{C++/mmc1.cpp} The same program as @code{mmc1.c} written in C++. @item @code{mmc2.c} A more involved MMC command to list CD and drive features from a SCSI-MMC @code{GET_CONFIGURATION} command. @item @code{mmc2a.c} Prints MMC @command{MODE_SENSE} page 2A parameters. Page 2a are the CD/DVD Capabilities and Mechanical Status. @item @code{C++/mmc2.cpp} The same program as @code{mmc2.c} written in C++. @item @code{paranoia.c} A program to show using libcdio's version of the CD-DA paranoia. @item @code{paranoia2.c} A program to show using libcdio's version of the CD-DA paranoia library. But in this version, we'll open a cdio object before calling paranoia's open. I imagine in many cases such as media players this may be what will be done since, one may want to get CDDB/CD-Text info beforehand. @item @code{tracks.c} A simple program to list track numbers and logical sector numbers of a Compact Disc using @value{libcdio}. @item @code{sample2.c} A simple program to show drivers installed and what the default CD-ROM drive is. @item @code{sample3.c} A simple program to show the use of @code{cdio_guess_cd_type()}. Figures out the kind of CD image we've got. @item @code{sample4.c} A slightly improved sample3 program: we handle cdio logging and take an optional CD-location. @item @code{udf1.c} A program to show using libudf to list files in a directory of an UDF image. @item @code{udf2.c} A program to show using libudf to extract a file from an UDF image. @end table @node Utility Programs @chapter Diagnostic programs: @command{cd-drive}, @command{cd-info}, @command{cd-read}, @command{iso-info}, @command{iso-read} @menu * cd-drive:: list out CD-ROM drive information * cd-info:: list out CD or CD-image information * cd-read:: read blocks of a CD or CD image * iso-info:: list out ISO-9600 image information * iso-read:: extract a file from an ISO 9660 image @end menu @node cd-drive @section @samp{cd-drive} @samp{cd-drive} lists out drive information, what features drive supports, and information about what hardware drivers are available. @node cd-info @section @samp{cd-info} @samp{cd-info} will print out the structure of a CD medium which could either be a Compact Disc in a CD ROM or an CD image. It can try to analyze the medium to give characteristics of the medium, such as how many tracks are in the CD and the format of each track, whether a CD contains a Video CD, CD-DA, PhotoCD, whether a track has an ISO-9660 filesystem. @node cd-read @section @samp{cd-read} @samp{cd-info} can be used to read blocks a CD medium which could either be a Compact Disc in a CD ROM or an CD image. You specify the beginning and ending LSN and what mode format to use in the reading. @node iso-info @section @samp{iso-info} @samp{iso-info} can be used to print out the structure of an ISO 9660 image. @node iso-read @section @samp{iso-read} @samp{iso-read} can be used to extract a file in an ISO-9660 image. @node CD-ROM Access and Drivers @chapter CD-ROM Access and Drivers @menu * SCSI mess:: SCSI, SCSI commands, and MMC commands * Access Modes:: Access Modes * Accessing Driver Parameters:: Accessing Driver Parameters * GNU/Linux:: GNU/Linux ioctl * Microsoft:: Microsoft Windows ioctl and ASPI * Solaris:: Solaris ATAPI and SCSI * FreeBSD:: FreeBSD ioctl and CAM * OS X:: OSX (non-exclussive access) @end menu @node SCSI mess @section SCSI, SCSI commands, and MMC commands Historically, SCSI referred to a class of hardware devices and device controllers, bus technology and the data cables and protocols which attached to such devices. This is now called ``Parallel SCSI''. A specification standard grew out of the @emph{commands} that controlled such SCSI devices, but now covers a wider variety of bus technologies including Parallel SCSI, ATA/ATAPI, Serial ATA, Universal Serial Bus (USB versions 1.1 and 2.0), and High Performance Serial Bus (IEEE 1394, 1394A, and 1394B). Another similar class of hardware devices and controllers is called ATA and a command interface to that is called ATAPI (ATA Packetized Interface). ATAPI provides a mechanism for transferring and executing SCSI commands. MMC (Multimedia commands) is a specification which adds special SCSI commands for CD, DVD, Blu-Ray devices. If your optical drive understands MMC commands as most do nowadays, this probably gives the most flexibility in control. SCSI and ATAPI CD-ROM devices generally support a fairly large set of MMC commands. Unfortunately, on most Operating Systems one may need to do some additional setup, such as install drivers or modules, to allow access in this manner. The name ``SCSI MMC'' is often found in the literature in specifications and on the Internet. The ``SCSI'' part is probably a little bit misleading because a drive can understand ``SCSI MMC'' commands but not use a SCSI bus protocol---ATAPI CD-ROMs are one such broad class of examples. In fact there are drivers to ``encapsulate'' non-SCSI drives to make them act like more like SCSI drives, such as by adding SCSI address naming. For clarity and precision we will use the term ``MMC'' rather than ``SCSI MMC''. One of the problems with MMC is that there are so many different ``standards''. In particular: @itemize @item MMC --- @url{ftp://ftp.t10.org/t10/drafts/mmc/}, @item MMC 2 --- @url{ftp://ftp.t10.org/t10/drafts/mmc2/} @item MMC 3 --- @url{ftp://ftp.t10.org/t10/drafts/mmc3/} @item MMC 4 --- @url{ftp://ftp.t10.org/t10/drafts/mmc4/} @item MMC 5 --- @url{ftp://ftp.t10.org/t10/drafts/mmc5/} @end itemize along with the several ``drafts'' of these. Another problem with the MMC commands related to the variations in standards is the variation in the commands themselves and there are perhaps two or three ways to do many of the basic commands like read a CD frame. There seems to be a fascination with the number of bytes a command takes in the MMC-specification world. (Size matters?) So often the name of an operation will have a suffix with the number of bytes of the command (actually in MMC jargon this is called a ``CDB'' @cindex CDB (Command Descriptor Block) or command descriptor block). So for example there is a 6-byte ``MODE SELECT'' often called ``MODE SELECT 6'' and a 10-byte ``MODE SELECT'' often called ``MODE SELECT 10''. Presumably the 6-byte command came first and it was discovered that there was some deficiency causing the longer command. In @value{libcdio} where there are two formats we add the suffix in the name, e.g. @code{CDIO_MMC_GPCMD_MODE_SELECT_6} or @code{CDIO_MMC_GPCMD_MODE_SELECT_10}. If the fascination and emphasis in the MMC specifications of CDB size is a bit odd, equally so is the fact that this too often has bled through at the OS programming API. However in @value{libcdio}, you just give the opcode in @code{scsi_mmc_run_cmd()} and we'll do the work to figure out how many bytes of the CDB are used. Down the line it is hoped that @value{libcdio} will have a way to remove a distinction between the various alternative and alternative-size MMC commands. In @code{cdio/scsi-mmc.h} you will find a little bit of this for example via the routine @code{scsi_mmc_get_drive_cap()}. However much more work is needed. Finally, in @code{libcdio} there is a driver access mode (not a driver) called ``MMC''. It tells the specific drivers to use MMC commands instead of other OS-specific mechanisms. @node Access Modes @section Access Modes There are serveral ways that you can open a CD-ROM drive for subsequent use. Each way is called an @emph{access mode}. Historically libcdio only supported a reading kind of access. Adding the abilty to writing to a drive for ``burning'' is being added by Thomas Schmitt, and this is accomplished by opening the drive in a read-write mode. Currently writing modes are only supported via the MMC command interface. Under this, one can get exclusive read-write access or non-exclusive read-write access. The names of these two modes are @code{MMC_RDWR_EXCL} and @code{MMC_RDWR} respectively. On various OS's often there are two kinds of read modes that are supported, one which uses MMC commands and one which uses some sort of OS-specific native command interface. For example on Unix, there is often a access mode associated with issuing an device-specific @code{ioctl}'s that the OS supports. To specify a particular kind of access mode, use @code{cdio_open_am} which is like @code{cdio_open} but it requires one to specify an access mode. @node Accessing Driver Parameters @section Accessing Driver Parameters --- @code{cdio_get_arg} Once a driver is opened, you can use call @code{cdio_get_arg} to get information about the driver. Each driver can have specific features that can be queried, but there are features that are common to all drivers. These are listed below: @table @code @item @code{access-mode} This returns a string which is the name of the access mode in use. @item @code{mmc-supported?} This returns a string ``true'' or ``false'' depending whether the driver with this access mode support MMC commands. @item @code{scsi-tuple} On drivers that support MMC commands, this returns the SCSI name or a faked-up SCSI name that ripping front ends typically use. @end table @node GNU/Linux @section GNU/Linux The GNU/Linux uses a hybrid of methods. Somethings are done via ioctl and some things via MMC. GNU/Linux has a rather nice and complete ioctl mechanism. On the other hand, the MMC mechanism is more universal. There are other ``access modes'' listed which are not really access modes and should probably be redone/rethought. They are just different ways to run the read command. But for completeness These are ``READ_CD'' and ``READ_10''. Writing/burning to a drive is supported via access modes @code{MMC_RDWR_EXCL} or @code{MMC_RDWR}. @node Microsoft @section Microsoft Windows ioctl and ASPI There are two CD drive access methods on Microsoft Windows platforms: ioctl and ASPI. The ASPI interface specification was developed by Adaptec for sending commands to a SCSI host adapter (such as those controlling CD and DVD drives) and used on Window 9x/NT and later. Emulation for ATAPI drives was added so that the same sets of commands worked those even though the drives might not be SCSI nor might there even be a SCSI controller attached. The DLL is not part of Microsoft Windows and has to be downloaded and installed separately. However in Windows NT/2K/XP, Microsoft provides their Win32 ioctl interface, and has taken steps to make using ASPI more inaccessible (e.g. requiring administrative access to use ASPI). @node Solaris @section Solaris ATAPI and SCSI There is currently only one CD drive access methods in Solaris: SCSI (called ``USCSI'' or ``user SCSI'' in Solaris). There used to be an ATAPI method and it could be resurrected if needed. USCSI was preferred since on newer releases of Solaris and Solaris environments one need to have root access for ATAPI. @node FreeBSD @section FreeBSD ioctl and CAM There are two classes of access methods on FreeBSD: ioctl and CAM (common access method). CAM is preferred when possible, especially on newer releases. However CAM is right now sort of a hybrid and includes some ioctl code. Writing/burning to a drive is supported via access modes @code{MMC_RDWR_EXCL} or @code{MMC_RDWR} which underneath use CAM access. @node OS X @section OS X (non-exclusive access) A problem with libcdio on OS/X is that if the OS thinks it understands the drive, it will get exclusive access to the drive and thus prevents a library like this from obtaining non-exclusive access. Currently @value{libcdio} access the CD-ROM non-exclusively. However in order to be able to issue MMC, the current belief is that exclusive access is needed. Probably in a future @value{libcdio}, there will be some way to specify which kind of access is desired (with the inherent consequences of each). More work on this driver is needed. Volunteers? @node Internal Program Organization @chapter Internal Program Organization @menu * File Organization:: * Library Organization:: * Programming Conventions:: @end menu @node File Organization @section File Organization Here is a list of @value{libcdio} directories. @itemize @item @code{include/cdio} This contains the headers that are public. One that will probably be used quite a bit is @code{}. @item @code{lib} Code for installed libraries. See below for further breakout @item @code{lib/driver} Code for various OS-specific CD-ROM drivers, image drivers, and common MMC routines. This code comprises @code{libcdio.a} (or the shared version of it). @item @code{lib/iso9660} Code for to extract or query ISO-9660 images. This code comprises @code{libiso9660.a} (or the shared version of it). @item @code{lib/paranoia} This is from cdparanoia. It is the OS- and hardware- dependent code to detect and correct jitter for CD-DA CDs. @item @code{lib/cdda_interface} This is also from cdparanoia. It is the OS- and hardware- independent code to detect and correct jitter for CD-DA CDs. @item @code{doc} A home for fine documentation such as this masterpiece. @item @code{example} Here you will find various small example programs using @value{libcdio} which are largely for pedagogical purposes. You might be able to find one that is similar to what you want to do that could be extended. In fact some these are contain the kernel ideas behind of some of the larger programs in @file{src}. @item @code{src} Various stand-alone utility programs. See below. @item @code{src/paranoia} @value{libcdio}'s version of @code{cdparanoia}. Except for the fact that the back-end CD-reading code has been replaced by @value{libcdio}'s routines the code is pretty much identical. @item @code{test} Regression tests @item @code{test/data} Disk images and image meta-data used in tests @item @code{test/driver} Unit tests centered around the libcdio library (@code{libcdio}, source location @code{lib/driver} @end itemize @node Library Organization @section Library Organization @menu * libcdio:: * libcdio_cdda:: Access to CD-DA via the CD Paranoia library * libcdio_paranoia:: Access to the CD Paranoia library * libiso9660:: Access to ISO 9660 file systems and structures * libudf:: Access to UDF file systems and structures @end menu @node libcdio @subsection @samp{libcdio} @value{libcdio} exports one opaque type @code{CdIo_t}. Internally this a structure containing an enumeration for the driver, a structure containing function pointers and a generic ``environment'' pointer which is passed as a parameter on a function call. See @file{lib/driver/cdio_private.h}. The initialization routine for each driver sets up the function pointers and allocates memory for the environment. When a particular user-level cdio routine is called (e.g @code{cdio_get_first_track_num} for lib/driver/track.c), the environment pointer is passed to a device-specific routine which will then cast this pointer into something of the appropriate type. Because function pointers are used, there can be and is quite a bit of sharing of common routines. Some of the common routines are found in the file @file{lib/driver/_cdio_generic.c}. Another set of routines that one is likely to find shared amongst drivers are the MMC commands. These are located in @file{lib/driver/scsi_mmc.c}. There is not only an attempt to share functions but we've tried to create a generic CD structure @code{generic_img_private_t} of file @file{lib/driver/generic.h}. By putting information into a common structure, we increase the likelihood of being able to have a common routine to perform some sort of function. The generic CD structure would also be useful in a utility to convert one CD-image format to another. Basically the first image format is ``parsed'' into the common internal format and then from this structure it is not parsed. @node libcdio_cdda @subsection @samp{libcdio_cdda} This library is intended to give access CD-DA disks using Monty's cd-paranoia library underneath. To be completed.... @node libcdio_paranoia @subsection @samp{libcdio_paranoia} This library is intended to give access Monty's cd-paranoia library. It is the gap detection and jitter correction part without the part dealing with CD-DA reading. To be completed.... @node libiso9660 @subsection @samp{libiso9660} This library is intended to give access and manipulate a ISO-9600 file image. One part of it is concerned with the the entire ISO-9660 file system image, and the other part access routines for manipulating data structures and fields that go into such an image. To be completed.... @node libudf @subsection @samp{libudf} This library is intended to give access and manipulate a UDF file image. To be completed.... @node Programming Conventions @section Programming Conventions @menu * Coding Conventions:: * Namespace Conventions:: @end menu @node Coding Conventions @subsection Coding Conventions In @value{libcdio} there are a number of conventions used. If you understand some of these conventions it may facilitate understanding the code a little. @node Namespace Conventions @subsection Namespace Conventions For the most part, the visible external @value{libcdio} names follow conventions so as not to be confused with other applications or libraries. If you understand these conventions, there will be little or no chance that the names you use will conflict with @value{libcdio} and @code{libiso9660} and vice versa. All of the external @value{libcdio} C routines start out with @code{cdio_}, e.g. @code{cdio_open}; as a corollary, the @value{libcdio} CD-Paranoia routines start @code{cdio_cddap_}, e.g. @code{cdio_cddap_open}. @code{libiso9660} routines start @code{iso9660_}, e.g. @code{iso9660_open}. @value{libcdio} C-Preprocessor names generally start @code{CDIO_}, for example @code{CDIO_CD_FRAMESIZE_RAW}; @code{libiso9660} C-preprocessor names start @code{ISO9660_}, e.g. @code{ISO9660_FRAMESIZE}. @subsubsection suffixes (type and structure names) A few suffixes are used in type and structure names: @itemize @item @code{_e} An enumeration tag. Generally though the same name will appear with the @code{_t} suffix and probably that should be used instead. @item @code{_s} A structure tag. Generally though the same name will appear with the @code{_t} suffix and probably that should be used instead. @item @code{_t} A type suffix. @end itemize @subsubsection prefixes (variable names) A number of prefixes are used in variable names here's what they mean @itemize @item @code{i_} An integer type of some sort. A variable of this ilk one might find being iterated over in @code{for} loops or used as the index of an array for example. @item @code{b_} A Boolean type of some sort. A variable of this ilk one might find being in an @code{if} condition for example. @item @code{p_} A pointer of some sort. A variable of this ilk, say @code{p_foo} one is like likely to see @code{*p_foo} or @code{p_foo->...}. @item @code{pp_} A pointer to a pointer of some sort. A variable of this ilk, say @code{pp_foo} one is like likely to see @code{**p_foo} or @code{p_foo[x][y]} for example @item @code{psz_} A @code{char *} pointer of some sort. A variable of this ilk, say @code{psz_foo} may be used in a string operation. For example @code{printf(%s\n", psz_foo)} or @code{strdup(psz_foo)}. @item @code{ppsz_} A pointer to a @code{char *} pointer of some sort. A variable of this ilk, say @code{ppsz_foo} is used for example to return a list of CD-ROM device names @end itemize There are a some other naming conventions. Generally if a routine name starts @code{cdio_}, e.g. @code{cdio_open}, then it is an externally visible routine in @code{libcdio}. If a name starts @code{iso9660_}, e.g. @code{iso9660_is_dchar} then it is an externally visible routine in @code{libiso9660}. If a name starts @code{scsi_mmc_}, e.g. @code{scsi_mmc_get_discmode}, then it is an externally visible MMC routine. (We don't have a separate library for this yet. Names using entirely capital letters and that start @code{CDIO_} are externally visible @code{#defines}. @node ISO-9660 Character Sets @appendix ISO-9660 Character Sets For a description of where are used see @xref{ISO 9660 Level 1}. @menu * ISO646 d-Characters:: * ISO646 a-Characters:: @end menu @node ISO646 d-Characters @appendixsec ISO646 d-Characters @example | 0 1 2 3 4 5 6 7 --+----------------- 0 | 0 P 1 | 1 A Q 2 | 2 B R 3 | 3 C S 4 | 4 D T 5 | 5 E U 6 | 6 F V 7 | 7 G W 8 | 8 H X 9 | 9 I Y a | J Z b | K c | L d | M e | N f | O _ @end example @node ISO646 a-Characters @appendixsec ISO646 a-Characters @example | 0 1 2 3 4 5 6 7 --+----------------- 0 | 0 P 1 | ! 1 A Q 2 | " 2 B R 3 | 3 C S 4 | 4 D T 5 | % 5 E U 6 | & 6 F V 7 | ' 7 G W 8 | ( 8 H X 9 | ) 9 I Y a | * : J Z b | + ; K c | , < L d | - = M e | . > N f | / ? O _ @end example @node Glossary @appendix Glossary @include glossary.texi @node GNU Free Documentation License @appendix GNU Free Documentation License @cindex FDL, GNU Free Documentation License @include fdl.texi @node General Index @unnumbered General Index @printindex cp @bye libcdio-0.83/doc/Makefile.am0000644000175000017500000000265311647774502012616 00000000000000# Copyright (C) 2003, 2004, 2008 Rocky Bernstein # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . EXTRA_DIST = doxygen/Doxyfile.in doxygen/run_doxygen info_TEXINFOS = libcdio.texi libcdio_TEXINFOS = fdl.texi glossary.texi reference: -( cd ${top_srcdir} && $(MAKE) doxygen ) #: Create documentation in PDF format pdf: libcdio.pdf #: Create documentation as a text file txt: libcdio.txt #: Create documentation in PostScript format ps: libcdio.ps #: Create documentation in HTML format html: libcdio.html %.ps.gz: %.ps gzip -9c $< > $@ .texi.pdf: stamp-vti texi2pdf $< .texi.html: stamp-vti texi2html $< .texi.txt: makeinfo --no-headers $< > $@ # Create documentation in all formats, e.g. PDF, DVI, plain text and HTML all-formats: pdf dvi txt ps html MOSTLYCLEANFILES = libcdio.html libcdio.pdf libcdio.ps.gz libcdio-0.83/doc/stamp-vti0000644000175000017500000000014111652140300012372 00000000000000@set UPDATED 21 October 2011 @set UPDATED-MONTH October 2011 @set EDITION 0.83 @set VERSION 0.83 libcdio-0.83/doc/version.texi0000644000175000017500000000014111652127273013121 00000000000000@set UPDATED 21 October 2011 @set UPDATED-MONTH October 2011 @set EDITION 0.83 @set VERSION 0.83 libcdio-0.83/doc/doxygen/0000755000175000017500000000000011652210413012267 500000000000000libcdio-0.83/doc/doxygen/run_doxygen0000755000175000017500000000527611114145233014510 00000000000000#!/bin/sh # $Id: run_doxygen,v 1.1 2003/11/09 14:11:02 rocky Exp $ # Runs doxygen and massages the output files. # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. # # Synopsis: run_doxygen --mode=[user|maint|man] v3srcdir v3builddir # # Originally hacked together by Phil Edwards # We can check now that the version of doxygen is >= this variable. DOXYVER=1.2.15 doxygen= find_doxygen() { v_required=`echo $DOXYVER | \ awk -F. '{if(NF<3)$3=0;print ($1*100+$2)*100+$3}'` testing_version= # thank you goat book set `IFS=:; X="$PATH:/usr/local/bin:/bin:/usr/bin"; echo $X` for dir do # AC_EXEEXT could come in useful here maybedoxy="$dir/doxygen" test -f "$maybedoxy" && testing_version=`$maybedoxy --version` if test -n "$testing_version"; then v_found=`echo $testing_version | \ awk -F. '{if(NF<3)$3=0;print ($1*100+$2)*100+$3}'` if test $v_found -ge $v_required; then doxygen="$maybedoxy" break fi fi done if test -z "$doxygen"; then echo run_doxygen error: Could not find Doxygen $DOXYVER in path. 1>&2 print_usage fi } print_usage() { cat 1>&2 <] MODE is one of: user Generate user-level HTML library documentation. maint Generate maintainers' HTML documentation (lots more; exposes non-public members, etc). man Generate user-level man pages. more options when i think of them Note: Requires Doxygen ${DOXYVER} or later; get it at ftp://ftp.stack.nl/pub/users/dimitri/doxygen-${DOXYVER}.src.tar.gz EOF exit 1 } parse_options() { for o do # Blatantly ripped from autoconf, er, I mean, "gratefully standing # on the shoulders of those giants who have gone before us." case "$o" in -*=*) arg=`echo "$o" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) arg= ;; esac case "$o" in --mode=*) mode=$arg ;; --mode | --help | -h) print_usage ;; *) # this turned out to be a mess, maybe change to --srcdir=, etc if test $srcdir = unset; then srcdir=$o elif test $outdir = unset; then builddir=${o} outdir=${o}/doc/doxygen else echo run_doxygen error: Too many arguments 1>&2 exit 1 fi ;; esac done } # script begins here mode=unset srcdir=unset outdir=unset do_html=no do_man=no enabled_sections= DATEtext=`date '+%Y-%m-%d'` parse_options $* find_doxygen $doxygen ./Doxyfile exit 0 # vim:ts=4:et: libcdio-0.83/doc/doxygen/Doxyfile.in0000644000175000017500000015221411114145233014327 00000000000000# Doxyfile 1.5.3 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file that # follow. The default is UTF-8 which is also the encoding used for all text before # the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into # libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of # possible encodings. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = @PACKAGE@ # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = @VERSION@ # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, # Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, # Italian, Japanese, Japanese-en (Japanese with English messages), Korean, # Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, # Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator # that is used to form the text in various listings. Each string # in this list, if found as the leading text of the brief description, will be # stripped from the text and the result after processing the whole list, is # used as the annotated text. Otherwise, the brief description is used as-is. # If left blank, the following values are used ("$name" is automatically # replaced with the name of the entity): "The $name class" "The $name widget" # "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = "The $name class " \ "The $name widget " \ "The $name file " \ is \ provides \ specifies \ contains \ represents \ a \ an \ the # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = NO # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the # path to strip. STRIP_FROM_PATH = @LIBCDIO_SOURCE_PATH@ # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells # the reader which header file to include in order to use a class. # If left blank only the name of the header file containing the class # definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like regular Qt-style comments # (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = NO # If the QT_AUTOBRIEF tag is set to YES then Doxygen will # interpret the first line (until the first dot) of a Qt-style # comment as the brief description. If set to NO, the comments # will behave just like regular Qt-style comments (thus requiring # an explicit \brief command for a brief description.) QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the DETAILS_AT_TOP tag is set to YES then Doxygen # will output the detailed description near the top, like JavaDoc. # If set to NO, the detailed description appears after the member # documentation. DETAILS_AT_TOP = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java # sources only. Doxygen will then generate output that is more tailored for Java. # For instance, namespaces will be presented as packages, qualified scopes # will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to # include (a tag file for) the STL sources as input, then you should # set this tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. # func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. CPP_CLI_SUPPORT = NO # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a # subgroup of that type (e.g. under the Public Functions section). Set it to # NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = YES # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in # the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be extracted # and appear in the documentation as a namespace called 'anonymous_namespace{file}', # where file will be replaced with the base name of the file that contains the anonymous # namespace. By default anonymous namespace are hidden. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, # not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or define consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and defines in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES # If the sources in your project are distributed over multiple directories # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = NO # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from the # version control system). Doxygen will invoke the program by executing (via # popen()) the command , where is the value of # the FILE_VERSION_FILTER tag, and is the name of an input file # provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. FILE_VERSION_FILTER = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some # parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be abled to get warnings for # functions that are documented, but have no documentation for their parameters # or return value. If set to NO (the default) doxygen will only warn about # wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. Optionally the format may contain # $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text " # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = ../../include/cdio/ # This tag can be used to specify the character encoding of the source files that # doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default # input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. # See http://www.gnu.org/software/libiconv for the list of possible encodings. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py FILE_PATTERNS = *.h # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = NO # The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. Note that the wildcards are matched # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the output. # The symbol name can be a fully qualified name, a word, or if the wildcard * is used, # a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = ../../example # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. If FILTER_PATTERNS is specified, this tag will be # ignored. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further # info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER # is applied to all files. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. If you have enabled CALL_GRAPH or CALLER_GRAPH # then you must also enable this option. If you don't then doxygen will produce # a warning and turn it on anyway SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES (the default) # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES (the default) # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will # link to the source code. Otherwise they will link to the documentstion. REFERENCES_LINK_SOURCE = YES # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen # built-in source browser. The htags tool is part of GNU's global source # tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet. Note that doxygen will try to copy # the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compressed HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. For this to work a browser that supports # JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). HTML_DYNAMIC_SECTIONS = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output directory. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 # If the GENERATE_TREEVIEW tag is set to YES, a side panel will be # generated containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, # Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are # probably better off using the HTML help feature. GENERATE_TREEVIEW = NO # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = YES # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = letter # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = # If the XML_PROGRAMLISTING tag is set to YES Doxygen will # dump the program listings (including syntax highlighting # and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- # If the GENERATE_PERLMOD tag is set to YES Doxygen will # generate a Perl module file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES Doxygen will generate # the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be # nicely formatted so it can be parsed by a human reader. This is useful # if you want to understand what is going on. On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. # This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. To prevent a macro definition from being # undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone # on a line, have an all uppercase name, and do not end with a semicolon. Such # function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. # Optionally an initial location of the external documentation # can be added for each tagfile. The format of a tag file without # this location is as follows: # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths or # URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) # If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = libcdio.xml # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option is superseded by the HAVE_DOT option below. This is only a # fallback. It is recommended to install and use dot, since it yields more # powerful graphs. CLASS_DIAGRAMS = YES # You can define message sequence charts within doxygen comments using the \msc # command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to # produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to # specify the directory where the mscgen tool resides. If left empty the tool is assumed to # be found in the default search path. MSCGEN_PATH = # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will # generate a call dependency graph for every global function or class method. # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable call graphs for selected # functions only using the \callgraph command. CALL_GRAPH = NO # If the CALLER_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will # generate a caller dependency graph for every global function or class method. # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable caller graphs for selected # functions only using the \callergraph command. CALLER_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of # nodes that will be shown in the graph. If the number of nodes in a graph # becomes larger than this value, doxygen will truncate the graph, which is # visualized by representing a node as a red box. Note that doxygen if the number # of direct children of the root node in a graph is already larger than # MAX_DOT_GRAPH_NOTES then the graph will not be shown at all. Also note # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. DOT_GRAPH_MAX_NODES = 50 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large # code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. MAX_DOT_GRAPH_DEPTH = 0 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, which results in a white background. # Warning: Depending on the platform used, enabling this option may lead to # badly anti-aliased labels on the edges of a graph (i.e. they become hard to # read). DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::additions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO libcdio-0.83/doc/glossary.texi0000644000175000017500000005005211333775101013300 00000000000000Thomas Schmitt has made significant contributions to this glossary. See also @uref{http://www.dvdrhelp.com/glossary}. @table @dfn @item @anchor{ASPI}ASPI @cindex ASPI See @acronym{Win32 ASPI} @item ATA Advanced Technology Attachment (ATA). The same thing as IDE. @item ATAPI Advanced Technology Attachment (ATA) Packet Interface. The interface provides a mechanism for transferring and executing SCSI CDBs on IDE CD Drives and DVD Drives. IDE (also called ATA) was originally designed for hard drives only, but with help of ATAPI it is possible to connect other devices, in particular CD-ROMS to the IDE/EIDE connections. The ATAPI CD-ROM drives understand a subset of SCSI commands. In particular multi-initiator commands are neither needed nor defined for ATAPI devices. @item BIN/CUE A CD-image format developed by Jeff Arnold for CDRWIN software on Microsoft Windows. Many other programs subsequently support using this format. The @code{.CUE} file is a text file which contains CD format and track layout information, while the @code{.BIN} file holds the actual data of each track. @item Blu-ray Disc (BD) @cindex Blu-ray Disc (BD) Optical media with capacity of 25 GB as single layer and 50 GB as double layer. See also @pxref{models-profiles,,"Media models and profiles"}. @item CD @cindex CD Compact Disc. Capacity up to 900 MB. See also @pxref{models-profiles,,"Media models and profiles"}. @item CD-DA @cindex CD-DA Compact Disc Digital Audio, described in the ``Red Book'' or IEC 60908 (formerly IEC 908). This commonly referred to as an audio @acronym{CD} and what most people think of when you play a @acronym{CD} as it was the first to use the @acronym{CD} medium. See @url{http://en.wikipedia.org/wiki/Red_Book_(audio_CD_standard)} @item CD+G @cindex CD+G Compact Disc + Graphics. An extension of the CD audio format contains a limited amount of graphics in subcode channels. This disc works in all audio players but the graphics portion is only available in a special CD+G or Karaoke player. @item CD-i @cindex CD-i Compact Disc Interactive. An extension of the CD format designed around a set-top computer that connects to a TV to provide interactive home entertainment, including digital audio and video, video games, and software applications. Defined by the ``Green Book'' standard. @uref{http://www.icdia.org/}. CD-i for video and video music has largely (if not totally) been superseded by VCDs. @item CD-i Bridge @cindex CD-i Bridge A standard allowing CD-ROM XA discs to play on CD-i. Kodak PhotoCDs are CD-XA Bridge discs. @item CD-ROM @cindex CD-ROM Compact Disc Read Only Memory or ``Yellow Book'' describe in Standards ISO/IEC 10149. The data stored on it can be either in the form of audio, computer or video files. @item CD-ROM Mode 1 and Mode2 The Yellow Book specifies two types of tracks, Mode 1 and Mode 2. Mode 1 is used for computer data and text and has an extra error correction layer. Mode 2 is for audio and video data and has no extra correction layer. CD-ROM/XA An expansion of the CD-ROM Mode 2 format that allows both computer and audio/video to be mixed in the same track. @item CD Text @cindex CD Text CD Text is a technology developed by Sony Corporation and Philips Electronics in 1996 that allows storing in an audio CD and its tracks information such as artist name, title, songwriter, composer, or arranger. Commercially available audio CDs sometimes contain CD Text information. @item @anchor{XA}CD XA @cindex CD XA CD-ROM EXtended Architecture. A modification to the CD-ROM specification that defines two new types of sectors. CD-ROM XA was developed jointly by Sony, Philips, and Microsoft, and announced in August 1988. Its specifications were published in an extension to the Yellow Book. CD-i, Photo CD, Video CD and CD-EXTRA have all subsequently been based on CD-ROM XA. CD-XA defines another way of formatting sectors on a CD-ROM, including headers in the sectors that describe the type (audio, video, data) and some additional info (markers, resolution in case of a video or audio sector, file numbers, etc). The data written on a CD-XA is consistent with and can be in ISO-9660 file system format and therefore be readable by ISO-9660 file system translators. But also a CD-I player can read CD-XA discs even if its own `Green Book' file system only resembles ISO 9660 and isn't fully compatible. @item DVD @cindex DVD Digital Versatile Disc. Capacity up to 4.5 GB as single layer and 8.5 GB as double layer media. See also @pxref{models-profiles,,"Media models and profiles"}. @item Defect management @cindex Defect management A method to compensate small amounts of bad spots on media by replacing them out of a pool of reserve blocks and performing address translation. The necessary checkreading slows down write performance by a factor of 2 or 3. Defect management applies by default to DVD-RAM and BD-RE. Optionally it can be formatted onto CD-RW and DVD+RW, where it has the name "Mount Rainier". Sequential BD-R can be formatted for defect management too. @item Command Packet @cindex Command Packet The data structure that is used to issue an ATAPI command. It contains a SCSI Command Descriptor Block (CDB). @item ECMA-119 (ISO-9660) @cindex ECMA-119 (@uref{http://www.ecma-international.org/publications/standards/Ecma-119.htm} is a freely available specification which is technically identical to ISO 9660. @item ECMA-167 (UDF) @cindex ECMA-167 (@uref{http://www.ecma-international.org/publications/standards/Ecma-167.htm} is a freely available specification which is also approved as ISO 13346. It serves as base for UDF. @item ECMA-168 @cindex ECMA-168 (@uref{http://www.ecma-international.org/publications/standards/Ecma-168.htm} is a freely available specification which is also approved as ISO 13490. @item FSF @cindex FSF Free Software Foundation, @uref{http://www.fsf.org/} @item GNU @cindex GNU @acronym{GNU} is not @acronym{UNIX}, @uref{http://www.gnu.org/} @item IDE Integrated Drive Electronics. This is a commonly used interface for hard disk drives and CD-ROM drives. It is less expensive than SCSI, but offers slightly less in terms of performance. @item ISO @cindex ISO International Standards Organization. @item ISO 13346 @cindex ISO 13346 ISO 13346 / ECMA-167 is a filesystem framework for data exchange on overwriteable or pseudo-overwriteable media. It serves as base of UDF. @item ISO 13490 @cindex ISO 13490 ISO 13490 / ECMA-168 is an attempt to replace ISO 9660 by a format that allows finer write granularity and representation of typical disk file properties. It resembles ECMA-167 which led to UDF. @item ISO 9660 @cindex ISO 9660 ISO 9660 / ECMA-119 is an operating-system independent filesystem format originally intended for CD-ROM media. It was standardized in 1988 and replaced the High Sierra standard for the logical format on CD-ROM media (ISO 9660 and High Sierra are identical in content, but the exact format is different). ISO 9660 and ECMA-119 are technically identical meanwhile. There are several specification levels. In Level 1, file names must be in the 8.3 format (no more than eight characters in the name, no more than three characters in the suffix) and in capital letters. Directory names can be no longer than eight characters. There can be no more than eight nested directory levels. Level 2 and 3 specifications allow file names up to 32 characters long. Level 3 allows data file sizes to be 4 GB or larger. File data content is stored in extents, i.e. contiguous sequences of blocks. A single extent can hold only up to 2 exp 32 - 1 bytes. So files of 4 GB or larger need more than one extent to be stored. Older operating systems might have trouble with multi-extent files. @item Joliet extensions @cindex Joliet extensions This ISO-9660 upward-compatible standard was developed for Windows 95 and Windows NT by Microsoft as an extension of ISO 9600 which allows the use of Unicode characters and supports file names up to 64 characters. See @uref{http://bmrc.berkeley.edu/people/chaffee/jolspec.html} for the Joliet Specification. The name Joliet comes from the city in Illinois (U.S) that the standard was defined. @item LBA @cindex LBA Logical Block Addressing. Mapped integer numbers from CD Red Book Addressing MSF. The starting sector is -150 and ending sector is 449849, which correlates directly to MSF: 00:00:00 to 99:59:74. Because an LBA is a single number it is often easier to work with in programming than an MSF. @item Lead in @cindex lead in The area of a CD where the Table Of Contents (TOC) and CD Text are stored. I think it is supposed to be around 4500 (1 min) or more sectors in length. On a CDR(W) the lead-in length is variable, because manufacturers have a different starting position indicated by the ATIP start of lead-in position that is recorded in the ATIP groove on the disk. For example: @table @dfn @item Ricoh Company Limited 97:27:00, 97:27:06, 97:27:66 @item Mitsubishi Chemical (Verbatim) 97:34:21 to 97:34:25 @end table @item LSN @cindex LSN Logical Sector Number. Mapped integer numbers from CD Red Book Addressing MSF. The starting sector is 0 and ending sector is 449699, which correlates to MSF: 00:00:00 to 99:59:74. Because an LSN is a single number it is often easier to work with in programming than an MSF. Because it starts at 0 rather than -150 as is the case of an LBA it can be represented as an unsigned value. @item MCN @cindex MCN Media Catalog Number. A identification number on an audio CD. Also called a UPC. Another identification number is ISRC. @item @anchor{MMC}MMC @cindex MMC (Multimedia Commands) MMC (Multimedia Commands). MMC are raw commands for communicating with CDROM drives, CD-Rewriters, DVD-Rewriters, etc. The are subset of the larger SCSI command set. See also @pxref{SCSI,,@acronym{SCSI}}. Many manufacturers have adopted this standard and it also applies to ATAPI versions of their drives. The documents @code{libcdio} makes use of are described in the Multi-Media Commands standard (MMC). This document generally has a numeric level number appended. For example MMC-5 refers to ``Multi-Media Commands - 5. @item @anchor{models-profiles}Media models and profiles @cindex Media models and profiles MMC classifies media as models, which describe their logical structure, and as profiles, which describe the capabilities of the drive with the particular media. So both are closely related but not identical. There are three model families: CD, DVD, Blu-ray. CD allows special sector formats like audio as well as data sectors of 2048 bytes. DVD and Blu-ray only record data sectors. @table @dfn @item Non-writable media: CD-ROM, DVD-ROM, BD-ROM. @item Write-once media: CD-R, DVD-R, DVD+R, BD-R. @item Reusable media: CD-RW, DVD-RW, DVD+RW, DVD-RAM, BD-RE. @end table Profiles depend on drive type and media state. They are expressed as numbers. It is unfortunate that formatted CD-RW have the same profile number as unformatted ones. ROM drives often announce all media as ROM profiles. Some writer drives show closed sequential media as ROM profile. @table @dfn @item CD-ROM 0x08 @item DVD-ROM 0x10 @item BD-ROM 0x40 @end table Sequentially recordable profiles allow multisession in most cases. Special burn programs are needed for writing to them. @table @dfn @item CD-R 0x09 @item CD-RW 0x0a (unformatted) @item DVD-R 0x11 @item DVD-RW 0x14 (unformatted) @item DVD-R DL 0x15 (double layer) @item DVD-R DL 0x16 (double layer, jump recording) @item DVD+R 0x1a @item DVD+RW DL 0x2a (double layer) @item DVD+R DL 0x2b (double layer) @item BD-R 0x41 (single or double layer, formatted or not) @item HD DVD-ROM 0x50 @item HD DVD-R 0x51 @item HD DVD-RAM 0x52 @end table They can assume three states: @table @dfn @item "Blank" is not readable but writeable from scratch @item "Appendable" is readable and after the readable part still writeable @item "Closed" is only readable @end table CD-RW and DVD-RW can be brought back to blank state, or they can be formatted to become overwriteable. Overwriteable profiles allow random read-write access with a granularity of 2 kB or 32 kB. One can hope for having read-write access via the normal POSIX operations lseek(), read(), write() of the operating system. @table @dfn @item CD-RW 0x0a (formatted) @item DVD-RAM 0x12 @item DVD-RW 0x13 (formatted, 32 kB write granularity) @item DVD+RW 0x1a @item BD-R 0x42 (formatted for pseudo-random recording) @item BD-RE 0x43 (single or double layer) @end table BD-R profile 0x42 is defined by MMC but not implemented by the consumer priced Blu-ray burners as of year 2010. @item Mixed Mode CD @cindex Mixed Mode CD A Mixed Mode is a CD that contains tracks of differing CD-ROM Mode formats. In particular the first track may contain both computer data (Yellow Book) CD ROM data while the remaining tracks are audio or video data. Video CD's can be Mixed Mode CDs. @item Multisession @cindex Multisession A way of writing to a CD , DVD or Blu-ray Disc that allows more data to be added to readable discs at a later time. The media must not have been closed by the previous write session. This applies originally to unformatted CD-R, CD-RW, DVD-R, DVD-RW, DVD+R, and sequential BD-R which all can record more than one session. They hold a table-of-content with sessions and tracks. Formatted CD-RW, DVD-RAM, DVD+RW, DVD-RW, and BD-RE have only one track. Multisession on these media needs help by the recorded data formats. Multisession can be used to add a changeset to an existing ISO 9660 filesystem. Typically the add-on session contains a whole new filesystem tree with old and new files. It also contains the data blocks of the newly introduced or freshly overwritten files. The convention for mounting multisession ISO 9660 images is to load the superblock from the start of the first track in the last session as listed in the media table-of-content. Formatted media are assumed to have a single track starting at block 0. So ISO 9660 multisession on formatted media has to overwrite the volume descriptors at block 16 ff. with every new session. A chain of recognizable sessions can be achieved by starting the first ISO 9660 image at block 32 so that its descriptors get not overwritten later. @item Nero NRG format file @cindex Nero NRG, CD-Image format A proprietary CD image file format use by a popular program for Microsoft Windows, Ahead Nero. The specification of this format is not to our knowledge published. @item Rock Ridge Extensions @cindex Rock Ridge extensions An extension to the ISO-9660 standard which adds POSIX information to files. It allows long file names, owner, group, access permissions @code{ugo+-rwx}, inode numbers, hard-link count, file types other than directory or regular file. Rock Ridge is described by unapproved standard IEEE P1282 / RRIP-1.12 and based on unapproved IEEE P1281 / SUSP-1.10. It has become a de-facto standard on X/Open systems like GNU/Linux, FreeBSD, Solaris, et.\ al. @item @anchor{SCSI}SCSI @cindex SCSI Small Computer System Interface. A set of ANSI standard electronic interfaces (originally developed at Apple Computer) that allow personal computers to communicate with peripheral hardware such as CD-ROM drives, disk drives, printers, etc. Although the original hardware is outdated since years, the SCSI command set nowadays controls most storage devices including all optical disc drives. The contemporary electronic technologies which transport SCSI commands to optical drives are P-ATA, SATA, and USB. A SCSI programming specification made by the SCSI committee T10 organization @url{http://www.t10.org/}. The documents @code{libcdio} makes use of are described in SCSI standards documents SCSI Primary Commands (SPC), SCSI Block Commands (SBC), and Multi-Media Commands (MMC). These documents generally have a numeric level number appended. For example SPC-3 refers to ``SCSI Primary Commands - 3'. In year 2010 the current versions were SPC-3, SBC-2, MMC-5. @item SCSI CDB @cindex SCSI CDB SCSI Command Descriptor Block. The data structure that is used to issue a SCSI command. @item SCSI Pass Through Interface. @cindex SCSI Pass Through Interface. Yet another way of issuing MMC commands for accessing a CD-ROM. As with MMC or ASPI, the CD-ROM doesn't necessarily have to be a SCSI-attached drive. See also @pxref{MMC,,@acronym{MMC}} and @pxref{MMC,,@acronym{ASPI}}. @item Session A fully readable complete recording that contains one or more tracks of computer data or audio on a CD. On a DVD or Blu-ray Disc, there are only data sessions. @item SVCD @cindex Super VCD (SVCD) Super @acronym{VCD} An improvement of Video CD 2.0 specification which includes most notably a switch from @acronym{MPEG}-1 (constant bit rate encoding) to @acronym{MPEG}-2 (variable bit rate encoding) for the video stream. Also added was higher video-stream resolution, up to 4 overlay graphics and text (@dfn{OGT}) sub-channels for user switchable subtitle displaying, closed caption text, and command lists for controlling the @acronym{SVCD} virtual machine. See @uref{http://www.dvdrhelp.com/svcd} @item TOC @cindex TOC (CD Table of Contents) (Compact Disc) Table of Contents. The TOC contains a list of sessions and their tracks. For sessions, it records the starting track number and the last track number. For tracks it records starting time block address, size, copy protection, linear audio preemphasis, track format (CDDA or data) in that order. Session and track information is also available on sequential DVD and Blu-ray Discs. Several track properties are fixed to equivalents of CD data. @item Track @cindex track A unit of data of a CD. The size of a track can vary; it can occupy the entire contents of the CD. Most CD standards however require that tracks have a 150 frame (or ``2 second'') lead-in gap. An abstraction of tracks for CD, DVD and Blu-ray Discs is the Logical Track as of MMC specs. Overwriteable media have a single logical track, sequential media can have one or more logical tracks which they describe in their TOC. @item UDF @cindex UDF Universal Disc Format was designed as successor of ISO 9660. It allows to record long file names and advanced file properties. Although intended as format for data exchange its main importance is with DVD video players. Video DVDs have to bear a simple UDF filesystem with a prescribed set of files. @item VCD @cindex Video CD (VCD) The Video Compact Disc (@dfn{Video CD} or @dfn{VCD}) is a standardized digital video storage format. It is based on the commonly available Compact Disc technology, which allows for low-cost video authoring. Video CD's can be played in most @acronym{DVD} standalone player, dedicated VCD players and finally, modern Personal Computers with multimedia support. A Video CD is made up of @acronym{CD-ROM XA} sectors, i.e. @acronym{CD-ROM} mode 2 form 1 & 2 sectors. Non-@acronym{MPEG} data is stored in mode 2 form 1 sectors with a user data area of 2048 byte, which have a similar L2 error correction and detection (@acronym{ECC}/@acronym{EDC}) to @acronym{CD-ROM} mode 1 sectors. While real-time @acronym{MPEG} streams is stored in @acronym{CD-ROM} mode 2 form 2 sectors, which by have no L2 @acronym{ECC}, yield a ~14% greater user data area consisting of 2324 bytes@footnote{actually raw mode 2 sectors have a 2336 byte user data area, but parts of it are used for error codes and headers when using the mode 2 form 1 or form 2 configurations.} @uref{http://www.dvdrhelp.com/vcd} @item Win32 ASPI @cindex ASPI The ASPI interface specification was developed by Adaptec for sending commands to a SCSI host adapter (such as those controlling CD and DVD drives) and used on Window 9x/NT and later. Emulation for ATAPI drives was added so that the same sets of commands worked those even though the drives might not be SCSI nor might there even be a SCSI controller attached. However in Windows NT/2K/XP, Microsoft provides their Win32 ioctl interface, and has take steps to make using ASPI more inaccessible (e.g. requiring administrative access to use ASPI). See also @pxref{MMC,,@acronym{MMC}}. @item Win32 ioctl driver Ioctl (Input Output ConTroLs). A Win32 function, implemented in all Microsoft Windows. It is used for sending commands to devices using defined codes and structures. @item XA @cindex XA @xref{XA,,@acronym{CD-ROM XA}}. @end table libcdio-0.83/doc/texinfo.tex0000644000175000017500000110035111652140255012737 00000000000000% texinfo.tex -- TeX macros to handle Texinfo files. % % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % \def\texinfoversion{2009-08-14.15} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, % 2007, 2008, 2009 Free Software Foundation, Inc. % % This texinfo.tex file is free software: you can redistribute it and/or % modify it under the terms of the GNU General Public License as % published by the Free Software Foundation, either version 3 of the % License, or (at your option) any later version. % % This texinfo.tex file is distributed in the hope that it will be % useful, but WITHOUT ANY WARRANTY; without even the implied warranty % of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU % General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program. If not, see . % % As a special exception, when this file is read by TeX when processing % a Texinfo source document, you may use the result without % restriction. (This has been our intent since Texinfo was invented.) % % Please try the latest version of texinfo.tex before submitting bug % reports; you can get the latest version from: % http://www.gnu.org/software/texinfo/ (the Texinfo home page), or % ftp://tug.org/tex/texinfo.tex % (and all CTAN mirrors, see http://www.ctan.org). % The texinfo.tex in any given distribution could well be out % of date, so if that's what you're using, please check. % % Send bug reports to bug-texinfo@gnu.org. Please include including a % complete document in each bug report with which we can reproduce the % problem. Patches are, of course, greatly appreciated. % % To process a Texinfo manual with TeX, it's most reliable to use the % texi2dvi shell script that comes with the distribution. For a simple % manual foo.texi, however, you can get away with this: % tex foo.texi % texindex foo.?? % tex foo.texi % tex foo.texi % dvips foo.dvi -o # or whatever; this makes foo.ps. % The extra TeX runs get the cross-reference information correct. % Sometimes one run after texindex suffices, and sometimes you need more % than two; texi2dvi does it as many times as necessary. % % It is possible to adapt texinfo.tex for other languages, to some % extent. You can get the existing language-specific files from the % full Texinfo distribution. % % The GNU Texinfo home page is http://www.gnu.org/software/texinfo. \message{Loading texinfo [version \texinfoversion]:} % If in a .fmt file, print the version number % and turn on active characters that we couldn't do earlier because % they might have appeared in the input file name. \everyjob{\message{[Texinfo version \texinfoversion]}% \catcode`+=\active \catcode`\_=\active} \chardef\other=12 % We never want plain's \outer definition of \+ in Texinfo. % For @tex, we can use \tabalign. \let\+ = \relax % Save some plain tex macros whose names we will redefine. \let\ptexb=\b \let\ptexbullet=\bullet \let\ptexc=\c \let\ptexcomma=\, \let\ptexdot=\. \let\ptexdots=\dots \let\ptexend=\end \let\ptexequiv=\equiv \let\ptexexclam=\! \let\ptexfootnote=\footnote \let\ptexgtr=> \let\ptexhat=^ \let\ptexi=\i \let\ptexindent=\indent \let\ptexinsert=\insert \let\ptexlbrace=\{ \let\ptexless=< \let\ptexnewwrite\newwrite \let\ptexnoindent=\noindent \let\ptexplus=+ \let\ptexrbrace=\} \let\ptexslash=\/ \let\ptexstar=\* \let\ptext=\t \let\ptextop=\top {\catcode`\'=\active \global\let\ptexquoteright'}% Math-mode def from plain.tex. \let\ptexraggedright=\raggedright % If this character appears in an error message or help string, it % starts a new line in the output. \newlinechar = `^^J % Use TeX 3.0's \inputlineno to get the line number, for better error % messages, but if we're using an old version of TeX, don't do anything. % \ifx\inputlineno\thisisundefined \let\linenumber = \empty % Pre-3.0. \else \def\linenumber{l.\the\inputlineno:\space} \fi % Set up fixed words for English if not already set. \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi \ifx\putwordfile\undefined \gdef\putwordfile{file}\fi \ifx\putwordin\undefined \gdef\putwordin{in}\fi \ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi \ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi \ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi \ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi \ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi \ifx\putwordof\undefined \gdef\putwordof{of}\fi \ifx\putwordon\undefined \gdef\putwordon{on}\fi \ifx\putwordpage\undefined \gdef\putwordpage{page}\fi \ifx\putwordsection\undefined \gdef\putwordsection{section}\fi \ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi \ifx\putwordsee\undefined \gdef\putwordsee{see}\fi \ifx\putwordSee\undefined \gdef\putwordSee{See}\fi \ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi \ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi % \ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi \ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi \ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi \ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi \ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi \ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi \ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi \ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi \ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi \ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi \ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi \ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi % \ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi \ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi \ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi % Since the category of space is not known, we have to be careful. \chardef\spacecat = 10 \def\spaceisspace{\catcode`\ =\spacecat} % sometimes characters are active, so we need control sequences. \chardef\colonChar = `\: \chardef\commaChar = `\, \chardef\dashChar = `\- \chardef\dotChar = `\. \chardef\exclamChar= `\! \chardef\lquoteChar= `\` \chardef\questChar = `\? \chardef\rquoteChar= `\' \chardef\semiChar = `\; \chardef\underChar = `\_ % Ignore a token. % \def\gobble#1{} % The following is used inside several \edef's. \def\makecsname#1{\expandafter\noexpand\csname#1\endcsname} % Hyphenation fixes. \hyphenation{ Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script ap-pen-dix bit-map bit-maps data-base data-bases eshell fall-ing half-way long-est man-u-script man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces spell-ing spell-ings stand-alone strong-est time-stamp time-stamps which-ever white-space wide-spread wrap-around } % Margin to add to right of even pages, to left of odd pages. \newdimen\bindingoffset \newdimen\normaloffset \newdimen\pagewidth \newdimen\pageheight % For a final copy, take out the rectangles % that mark overfull boxes (in case you have decided % that the text looks ok even though it passes the margin). % \def\finalout{\overfullrule=0pt} % @| inserts a changebar to the left of the current line. It should % surround any changed text. This approach does *not* work if the % change spans more than two lines of output. To handle that, we would % have adopt a much more difficult approach (putting marks into the main % vertical list for the beginning and end of each change). % \def\|{% % \vadjust can only be used in horizontal mode. \leavevmode % % Append this vertical mode material after the current line in the output. \vadjust{% % We want to insert a rule with the height and depth of the current % leading; that is exactly what \strutbox is supposed to record. \vskip-\baselineskip % % \vadjust-items are inserted at the left edge of the type. So % the \llap here moves out into the left-hand margin. \llap{% % % For a thicker or thinner bar, change the `1pt'. \vrule height\baselineskip width1pt % % This is the space between the bar and the text. \hskip 12pt }% }% } % Sometimes it is convenient to have everything in the transcript file % and nothing on the terminal. We don't just call \tracingall here, % since that produces some useless output on the terminal. We also make % some effort to order the tracing commands to reduce output in the log % file; cf. trace.sty in LaTeX. % \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% \def\loggingall{% \tracingstats2 \tracingpages1 \tracinglostchars2 % 2 gives us more in etex \tracingparagraphs1 \tracingoutput1 \tracingmacros2 \tracingrestores1 \showboxbreadth\maxdimen \showboxdepth\maxdimen \ifx\eTeXversion\undefined\else % etex gives us more logging \tracingscantokens1 \tracingifs1 \tracinggroups1 \tracingnesting2 \tracingassigns1 \fi \tracingcommands3 % 3 gives us more in etex \errorcontextlines16 }% % add check for \lastpenalty to plain's definitions. If the last thing % we did was a \nobreak, we don't want to insert more space. % \def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount \removelastskip\penalty-50\smallskip\fi\fi} \def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount \removelastskip\penalty-100\medskip\fi\fi} \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount \removelastskip\penalty-200\bigskip\fi\fi} % For @cropmarks command. % Do @cropmarks to get crop marks. % \newif\ifcropmarks \let\cropmarks = \cropmarkstrue % % Dimensions to add cropmarks at corners. % Added by P. A. MacKay, 12 Nov. 1986 % \newdimen\outerhsize \newdimen\outervsize % set by the paper size routines \newdimen\cornerlong \cornerlong=1pc \newdimen\cornerthick \cornerthick=.3pt \newdimen\topandbottommargin \topandbottommargin=.75in % Output a mark which sets \thischapter, \thissection and \thiscolor. % We dump everything together because we only have one kind of mark. % This works because we only use \botmark / \topmark, not \firstmark. % % A mark contains a subexpression of the \ifcase ... \fi construct. % \get*marks macros below extract the needed part using \ifcase. % % Another complication is to let the user choose whether \thischapter % (\thissection) refers to the chapter (section) in effect at the top % of a page, or that at the bottom of a page. The solution is % described on page 260 of The TeXbook. It involves outputting two % marks for the sectioning macros, one before the section break, and % one after. I won't pretend I can describe this better than DEK... \def\domark{% \toks0=\expandafter{\lastchapterdefs}% \toks2=\expandafter{\lastsectiondefs}% \toks4=\expandafter{\prevchapterdefs}% \toks6=\expandafter{\prevsectiondefs}% \toks8=\expandafter{\lastcolordefs}% \mark{% \the\toks0 \the\toks2 \noexpand\or \the\toks4 \the\toks6 \noexpand\else \the\toks8 }% } % \topmark doesn't work for the very first chapter (after the title % page or the contents), so we use \firstmark there -- this gets us % the mark with the chapter defs, unless the user sneaks in, e.g., % @setcolor (or @url, or @link, etc.) between @contents and the very % first @chapter. \def\gettopheadingmarks{% \ifcase0\topmark\fi \ifx\thischapter\empty \ifcase0\firstmark\fi \fi } \def\getbottomheadingmarks{\ifcase1\botmark\fi} \def\getcolormarks{\ifcase2\topmark\fi} % Avoid "undefined control sequence" errors. \def\lastchapterdefs{} \def\lastsectiondefs{} \def\prevchapterdefs{} \def\prevsectiondefs{} \def\lastcolordefs{} % Main output routine. \chardef\PAGE = 255 \output = {\onepageout{\pagecontents\PAGE}} \newbox\headlinebox \newbox\footlinebox % \onepageout takes a vbox as an argument. Note that \pagecontents % does insertions, but you have to call it yourself. \def\onepageout#1{% \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi % \ifodd\pageno \advance\hoffset by \bindingoffset \else \advance\hoffset by -\bindingoffset\fi % % Do this outside of the \shipout so @code etc. will be expanded in % the headline as they should be, not taken literally (outputting ''code). \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% % {% % Have to do this stuff outside the \shipout because we want it to % take effect in \write's, yet the group defined by the \vbox ends % before the \shipout runs. % \indexdummies % don't expand commands in the output. \normalturnoffactive % \ in index entries must not stay \, e.g., if % the page break happens to be in the middle of an example. % We don't want .vr (or whatever) entries like this: % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}} % "\acronym" won't work when it's read back in; % it needs to be % {\code {{\tt \backslashcurfont }acronym} \shipout\vbox{% % Do this early so pdf references go to the beginning of the page. \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi % \ifcropmarks \vbox to \outervsize\bgroup \hsize = \outerhsize \vskip-\topandbottommargin \vtop to0pt{% \line{\ewtop\hfil\ewtop}% \nointerlineskip \line{% \vbox{\moveleft\cornerthick\nstop}% \hfill \vbox{\moveright\cornerthick\nstop}% }% \vss}% \vskip\topandbottommargin \line\bgroup \hfil % center the page within the outer (page) hsize. \ifodd\pageno\hskip\bindingoffset\fi \vbox\bgroup \fi % \unvbox\headlinebox \pagebody{#1}% \ifdim\ht\footlinebox > 0pt % Only leave this space if the footline is nonempty. % (We lessened \vsize for it in \oddfootingyyy.) % The \baselineskip=24pt in plain's \makefootline has no effect. \vskip 24pt \unvbox\footlinebox \fi % \ifcropmarks \egroup % end of \vbox\bgroup \hfil\egroup % end of (centering) \line\bgroup \vskip\topandbottommargin plus1fill minus1fill \boxmaxdepth = \cornerthick \vbox to0pt{\vss \line{% \vbox{\moveleft\cornerthick\nsbot}% \hfill \vbox{\moveright\cornerthick\nsbot}% }% \nointerlineskip \line{\ewbot\hfil\ewbot}% }% \egroup % \vbox from first cropmarks clause \fi }% end of \shipout\vbox }% end of group with \indexdummies \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi } \newinsert\margin \dimen\margin=\maxdimen \def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} {\catcode`\@ =11 \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi % marginal hacks, juha@viisa.uucp (Juha Takala) \ifvoid\margin\else % marginal info is present \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi \dimen@=\dp#1\relax \unvbox#1\relax \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi \ifr@ggedbottom \kern-\dimen@ \vfil \fi} } % Here are the rules for the cropmarks. Note that they are % offset so that the space between them is truly \outerhsize or \outervsize % (P. A. MacKay, 12 November, 1986) % \def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong} \def\nstop{\vbox {\hrule height\cornerthick depth\cornerlong width\cornerthick}} \def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong} \def\nsbot{\vbox {\hrule height\cornerlong depth\cornerthick width\cornerthick}} % Parse an argument, then pass it to #1. The argument is the rest of % the input line (except we remove a trailing comment). #1 should be a % macro which expects an ordinary undelimited TeX argument. % \def\parsearg{\parseargusing{}} \def\parseargusing#1#2{% \def\argtorun{#2}% \begingroup \obeylines \spaceisspace #1% \parseargline\empty% Insert the \empty token, see \finishparsearg below. } {\obeylines % \gdef\parseargline#1^^M{% \endgroup % End of the group started in \parsearg. \argremovecomment #1\comment\ArgTerm% }% } % First remove any @comment, then any @c comment. \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} \def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} % Each occurrence of `\^^M' or `\^^M' is replaced by a single space. % % \argremovec might leave us with trailing space, e.g., % @end itemize @c foo % This space token undergoes the same procedure and is eventually removed % by \finishparsearg. % \def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M} \def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M} \def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{% \def\temp{#3}% \ifx\temp\empty % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp: \let\temp\finishparsearg \else \let\temp\argcheckspaces \fi % Put the space token in: \temp#1 #3\ArgTerm } % If a _delimited_ argument is enclosed in braces, they get stripped; so % to get _exactly_ the rest of the line, we had to prevent such situation. % We prepended an \empty token at the very beginning and we expand it now, % just before passing the control to \argtorun. % (Similarly, we have to think about #3 of \argcheckspacesY above: it is % either the null string, or it ends with \^^M---thus there is no danger % that a pair of braces would be stripped. % % But first, we have to remove the trailing space token. % \def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} % \parseargdef\foo{...} % is roughly equivalent to % \def\foo{\parsearg\Xfoo} % \def\Xfoo#1{...} % % Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my % favourite TeX trick. --kasal, 16nov03 \def\parseargdef#1{% \expandafter \doparseargdef \csname\string#1\endcsname #1% } \def\doparseargdef#1#2{% \def#2{\parsearg#1}% \def#1##1% } % Several utility definitions with active space: { \obeyspaces \gdef\obeyedspace{ } % Make each space character in the input produce a normal interword % space in the output. Don't allow a line break at this space, as this % is used only in environments like @example, where each line of input % should produce a line of output anyway. % \gdef\sepspaces{\obeyspaces\let =\tie} % If an index command is used in an @example environment, any spaces % therein should become regular spaces in the raw index file, not the % expansion of \tie (\leavevmode \penalty \@M \ ). \gdef\unsepspaces{\let =\space} } \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} % Define the framework for environments in texinfo.tex. It's used like this: % % \envdef\foo{...} % \def\Efoo{...} % % It's the responsibility of \envdef to insert \begingroup before the % actual body; @end closes the group after calling \Efoo. \envdef also % defines \thisenv, so the current environment is known; @end checks % whether the environment name matches. The \checkenv macro can also be % used to check whether the current environment is the one expected. % % Non-false conditionals (@iftex, @ifset) don't fit into this, so they % are not treated as environments; they don't open a group. (The % implementation of @end takes care not to call \endgroup in this % special case.) % At run-time, environments start with this: \def\startenvironment#1{\begingroup\def\thisenv{#1}} % initialize \let\thisenv\empty % ... but they get defined via ``\envdef\foo{...}'': \long\def\envdef#1#2{\def#1{\startenvironment#1#2}} \def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}} % Check whether we're in the right environment: \def\checkenv#1{% \def\temp{#1}% \ifx\thisenv\temp \else \badenverr \fi } % Environment mismatch, #1 expected: \def\badenverr{% \errhelp = \EMsimple \errmessage{This command can appear only \inenvironment\temp, not \inenvironment\thisenv}% } \def\inenvironment#1{% \ifx#1\empty out of any environment% \else in environment \expandafter\string#1% \fi } % @end foo executes the definition of \Efoo. % But first, it executes a specialized version of \checkenv % \parseargdef\end{% \if 1\csname iscond.#1\endcsname \else % The general wording of \badenverr may not be ideal, but... --kasal, 06nov03 \expandafter\checkenv\csname#1\endcsname \csname E#1\endcsname \endgroup \fi } \newhelp\EMsimple{Press RETURN to continue.} %% Simple single-character @ commands % @@ prints an @ % Kludge this until the fonts are right (grr). \def\@{{\tt\char64}} % This is turned off because it was never documented % and you can use @w{...} around a quote to suppress ligatures. %% Define @` and @' to be the same as ` and ' %% but suppressing ligatures. %\def\`{{`}} %\def\'{{'}} % Used to generate quoted braces. \def\mylbrace {{\tt\char123}} \def\myrbrace {{\tt\char125}} \let\{=\mylbrace \let\}=\myrbrace \begingroup % Definitions to produce \{ and \} commands for indices, % and @{ and @} for the aux/toc files. \catcode`\{ = \other \catcode`\} = \other \catcode`\[ = 1 \catcode`\] = 2 \catcode`\! = 0 \catcode`\\ = \other !gdef!lbracecmd[\{]% !gdef!rbracecmd[\}]% !gdef!lbraceatcmd[@{]% !gdef!rbraceatcmd[@}]% !endgroup % @comma{} to avoid , parsing problems. \let\comma = , % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent % Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. \let\, = \c \let\dotaccent = \. \def\ringaccent#1{{\accent23 #1}} \let\tieaccent = \t \let\ubaraccent = \b \let\udotaccent = \d % Other special characters: @questiondown @exclamdown @ordf @ordm % Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. \def\questiondown{?`} \def\exclamdown{!`} \def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} \def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} % Dotless i and dotless j, used for accents. \def\imacro{i} \def\jmacro{j} \def\dotless#1{% \def\temp{#1}% \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi \else \errmessage{@dotless can be used only with i or j}% \fi\fi } % The \TeX{} logo, as in plain, but resetting the spacing so that a % period following counts as ending a sentence. (Idea found in latex.) % \edef\TeX{\TeX \spacefactor=1000 } % @LaTeX{} logo. Not quite the same results as the definition in % latex.ltx, since we use a different font for the raised A; it's most % convenient for us to use an explicitly smaller font, rather than using % the \scriptstyle font (since we don't reset \scriptstyle and % \scriptscriptstyle). % \def\LaTeX{% L\kern-.36em {\setbox0=\hbox{T}% \vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}% \kern-.15em \TeX } % Be sure we're in horizontal mode when doing a tie, since we make space % equivalent to this in @example-like environments. Otherwise, a space % at the beginning of a line will start with \penalty -- and % since \penalty is valid in vertical mode, we'd end up putting the % penalty on the vertical list instead of in the new paragraph. {\catcode`@ = 11 % Avoid using \@M directly, because that causes trouble % if the definition is written into an index file. \global\let\tiepenalty = \@M \gdef\tie{\leavevmode\penalty\tiepenalty\ } } % @: forces normal size whitespace following. \def\:{\spacefactor=1000 } % @* forces a line break. \def\*{\hfil\break\hbox{}\ignorespaces} % @/ allows a line break. \let\/=\allowbreak % @. is an end-of-sentence period. \def\.{.\spacefactor=\endofsentencespacefactor\space} % @! is an end-of-sentence bang. \def\!{!\spacefactor=\endofsentencespacefactor\space} % @? is an end-of-sentence query. \def\?{?\spacefactor=\endofsentencespacefactor\space} % @frenchspacing on|off says whether to put extra space after punctuation. % \def\onword{on} \def\offword{off} % \parseargdef\frenchspacing{% \def\temp{#1}% \ifx\temp\onword \plainfrenchspacing \else\ifx\temp\offword \plainnonfrenchspacing \else \errhelp = \EMsimple \errmessage{Unknown @frenchspacing option `\temp', must be on/off}% \fi\fi } % @w prevents a word break. Without the \leavevmode, @w at the % beginning of a paragraph, when TeX is still in vertical mode, would % produce a whole line of output instead of starting the paragraph. \def\w#1{\leavevmode\hbox{#1}} % @group ... @end group forces ... to be all on one page, by enclosing % it in a TeX vbox. We use \vtop instead of \vbox to construct the box % to keep its height that of a normal line. According to the rules for % \topskip (p.114 of the TeXbook), the glue inserted is % max (\topskip - \ht (first item), 0). If that height is large, % therefore, no glue is inserted, and the space between the headline and % the text is small, which looks bad. % % Another complication is that the group might be very large. This can % cause the glue on the previous page to be unduly stretched, because it % does not have much material. In this case, it's better to add an % explicit \vfill so that the extra space is at the bottom. The % threshold for doing this is if the group is more than \vfilllimit % percent of a page (\vfilllimit can be changed inside of @tex). % \newbox\groupbox \def\vfilllimit{0.7} % \envdef\group{% \ifnum\catcode`\^^M=\active \else \errhelp = \groupinvalidhelp \errmessage{@group invalid in context where filling is enabled}% \fi \startsavinginserts % \setbox\groupbox = \vtop\bgroup % Do @comment since we are called inside an environment such as % @example, where each end-of-line in the input causes an % end-of-line in the output. We don't want the end-of-line after % the `@group' to put extra space in the output. Since @group % should appear on a line by itself (according to the Texinfo % manual), we don't worry about eating any user text. \comment } % % The \vtop produces a box with normal height and large depth; thus, TeX puts % \baselineskip glue before it, and (when the next line of text is done) % \lineskip glue after it. Thus, space below is not quite equal to space % above. But it's pretty close. \def\Egroup{% % To get correct interline space between the last line of the group % and the first line afterwards, we have to propagate \prevdepth. \endgraf % Not \par, as it may have been set to \lisppar. \global\dimen1 = \prevdepth \egroup % End the \vtop. % \dimen0 is the vertical size of the group's box. \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox % \dimen2 is how much space is left on the page (more or less). \dimen2 = \pageheight \advance\dimen2 by -\pagetotal % if the group doesn't fit on the current page, and it's a big big % group, force a page break. \ifdim \dimen0 > \dimen2 \ifdim \pagetotal < \vfilllimit\pageheight \page \fi \fi \box\groupbox \prevdepth = \dimen1 \checkinserts } % % TeX puts in an \escapechar (i.e., `@') at the beginning of the help % message, so this ends up printing `@group can only ...'. % \newhelp\groupinvalidhelp{% group can only be used in environments such as @example,^^J% where each line of input produces a line of output.} % @need space-in-mils % forces a page break if there is not space-in-mils remaining. \newdimen\mil \mil=0.001in % Old definition--didn't work. %\parseargdef\need{\par % %% This method tries to make TeX break the page naturally %% if the depth of the box does not fit. %{\baselineskip=0pt% %\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak %\prevdepth=-1000pt %}} \parseargdef\need{% % Ensure vertical mode, so we don't make a big box in the middle of a % paragraph. \par % % If the @need value is less than one line space, it's useless. \dimen0 = #1\mil \dimen2 = \ht\strutbox \advance\dimen2 by \dp\strutbox \ifdim\dimen0 > \dimen2 % % Do a \strut just to make the height of this box be normal, so the % normal leading is inserted relative to the preceding line. % And a page break here is fine. \vtop to #1\mil{\strut\vfil}% % % TeX does not even consider page breaks if a penalty added to the % main vertical list is 10000 or more. But in order to see if the % empty box we just added fits on the page, we must make it consider % page breaks. On the other hand, we don't want to actually break the % page after the empty box. So we use a penalty of 9999. % % There is an extremely small chance that TeX will actually break the % page at this \penalty, if there are no other feasible breakpoints in % sight. (If the user is using lots of big @group commands, which % almost-but-not-quite fill up a page, TeX will have a hard time doing % good page breaking, for example.) However, I could not construct an % example where a page broke at this \penalty; if it happens in a real % document, then we can reconsider our strategy. \penalty9999 % % Back up by the size of the box, whether we did a page break or not. \kern -#1\mil % % Do not allow a page break right after this kern. \nobreak \fi } % @br forces paragraph break (and is undocumented). \let\br = \par % @page forces the start of a new page. % \def\page{\par\vfill\supereject} % @exdent text.... % outputs text on separate line in roman font, starting at standard page margin % This records the amount of indent in the innermost environment. % That's how much \exdent should take out. \newskip\exdentamount % This defn is used inside fill environments such as @defun. \parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break} % This defn is used inside nofill environments such as @example. \parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount \leftline{\hskip\leftskip{\rm#1}}}} % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current % paragraph. For more general purposes, use the \margin insertion % class. WHICH is `l' or `r'. % \newskip\inmarginspacing \inmarginspacing=1cm \def\strutdepth{\dp\strutbox} % \def\doinmargin#1#2{\strut\vadjust{% \nobreak \kern-\strutdepth \vtop to \strutdepth{% \baselineskip=\strutdepth \vss % if you have multiple lines of stuff to put here, you'll need to % make the vbox yourself of the appropriate size. \ifx#1l% \llap{\ignorespaces #2\hskip\inmarginspacing}% \else \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}% \fi \null }% }} \def\inleftmargin{\doinmargin l} \def\inrightmargin{\doinmargin r} % % @inmargin{TEXT [, RIGHT-TEXT]} % (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right; % else use TEXT for both). % \def\inmargin#1{\parseinmargin #1,,\finish} \def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing. \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \def\lefttext{#1}% have both texts \def\righttext{#2}% \else \def\lefttext{#1}% have only one text \def\righttext{#1}% \fi % \ifodd\pageno \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin \else \def\temp{\inleftmargin\lefttext}% \fi \temp } % @include FILE -- \input text of FILE. % \def\include{\parseargusing\filenamecatcodes\includezzz} \def\includezzz#1{% \pushthisfilestack \def\thisfile{#1}% {% \makevalueexpandable % we want to expand any @value in FILE. \turnoffactive % and allow special characters in the expansion \indexnofonts % Allow `@@' and other weird things in file names. \edef\temp{\noexpand\input #1 }% % % This trickery is to read FILE outside of a group, in case it makes % definitions, etc. \expandafter }\temp \popthisfilestack } \def\filenamecatcodes{% \catcode`\\=\other \catcode`~=\other \catcode`^=\other \catcode`_=\other \catcode`|=\other \catcode`<=\other \catcode`>=\other \catcode`+=\other \catcode`-=\other \catcode`\`=\other \catcode`\'=\other } \def\pushthisfilestack{% \expandafter\pushthisfilestackX\popthisfilestack\StackTerm } \def\pushthisfilestackX{% \expandafter\pushthisfilestackY\thisfile\StackTerm } \def\pushthisfilestackY #1\StackTerm #2\StackTerm {% \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}% } \def\popthisfilestack{\errthisfilestackempty} \def\errthisfilestackempty{\errmessage{Internal error: the stack of filenames is empty.}} \def\thisfile{} % @center line % outputs that line, centered. % \parseargdef\center{% \ifhmode \let\next\centerH \else \let\next\centerV \fi \next{\hfil \ignorespaces#1\unskip \hfil}% } \def\centerH#1{% {% \hfil\break \advance\hsize by -\leftskip \advance\hsize by -\rightskip \line{#1}% \break }% } \def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}} % @sp n outputs n lines of vertical space \parseargdef\sp{\vskip #1\baselineskip} % @comment ...line which is ignored... % @c is the same as @comment % @ignore ... @end ignore is another way to write a comment \def\comment{\begingroup \catcode`\^^M=\other% \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% \commentxxx} {\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} \let\c=\comment % @paragraphindent NCHARS % We'll use ems for NCHARS, close enough. % NCHARS can also be the word `asis' or `none'. % We cannot feasibly implement @paragraphindent asis, though. % \def\asisword{asis} % no translation, these are keywords \def\noneword{none} % \parseargdef\paragraphindent{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \defaultparindent = 0pt \else \defaultparindent = #1em \fi \fi \parindent = \defaultparindent } % @exampleindent NCHARS % We'll use ems for NCHARS like @paragraphindent. % It seems @exampleindent asis isn't necessary, but % I preserve it to make it similar to @paragraphindent. \parseargdef\exampleindent{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \lispnarrowing = 0pt \else \lispnarrowing = #1em \fi \fi } % @firstparagraphindent WORD % If WORD is `none', then suppress indentation of the first paragraph % after a section heading. If WORD is `insert', then do indent at such % paragraphs. % % The paragraph indentation is suppressed or not by calling % \suppressfirstparagraphindent, which the sectioning commands do. % We switch the definition of this back and forth according to WORD. % By default, we suppress indentation. % \def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent} \def\insertword{insert} % \parseargdef\firstparagraphindent{% \def\temp{#1}% \ifx\temp\noneword \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent \else\ifx\temp\insertword \let\suppressfirstparagraphindent = \relax \else \errhelp = \EMsimple \errmessage{Unknown @firstparagraphindent option `\temp'}% \fi\fi } % Here is how we actually suppress indentation. Redefine \everypar to % \kern backwards by \parindent, and then reset itself to empty. % % We also make \indent itself not actually do anything until the next % paragraph. % \gdef\dosuppressfirstparagraphindent{% \gdef\indent{% \restorefirstparagraphindent \indent }% \gdef\noindent{% \restorefirstparagraphindent \noindent }% \global\everypar = {% \kern -\parindent \restorefirstparagraphindent }% } \gdef\restorefirstparagraphindent{% \global \let \indent = \ptexindent \global \let \noindent = \ptexnoindent \global \everypar = {}% } % @asis just yields its argument. Used with @table, for example. % \def\asis#1{#1} % @math outputs its argument in math mode. % % One complication: _ usually means subscripts, but it could also mean % an actual _ character, as in @math{@var{some_variable} + 1}. So make % _ active, and distinguish by seeing if the current family is \slfam, % which is what @var uses. { \catcode`\_ = \active \gdef\mathunderscore{% \catcode`\_=\active \def_{\ifnum\fam=\slfam \_\else\sb\fi}% } } % Another complication: we want \\ (and @\) to output a \ character. % FYI, plain.tex uses \\ as a temporary control sequence (why?), but % this is not advertised and we don't care. Texinfo does not % otherwise define @\. % % The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. \def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} % \def\math{% \tex \mathunderscore \let\\ = \mathbackslash \mathactive % make the texinfo accent commands work in math mode \let\"=\ddot \let\'=\acute \let\==\bar \let\^=\hat \let\`=\grave \let\u=\breve \let\v=\check \let\~=\tilde \let\dotaccent=\dot $\finishmath } \def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. % Some active characters (such as <) are spaced differently in math. % We have to reset their definitions in case the @math was an argument % to a command which sets the catcodes (such as @item or @section). % { \catcode`^ = \active \catcode`< = \active \catcode`> = \active \catcode`+ = \active \catcode`' = \active \gdef\mathactive{% \let^ = \ptexhat \let< = \ptexless \let> = \ptexgtr \let+ = \ptexplus \let' = \ptexquoteright } } % Some math mode symbols. \def\bullet{$\ptexbullet$} \def\geq{\ifmmode \ge\else $\ge$\fi} \def\leq{\ifmmode \le\else $\le$\fi} \def\minus{\ifmmode -\else $-$\fi} % @dots{} outputs an ellipsis using the current font. % We do .5em per period so that it has the same spacing in the cm % typewriter fonts as three actual period characters; on the other hand, % in other typewriter fonts three periods are wider than 1.5em. So do % whichever is larger. % \def\dots{% \leavevmode \setbox0=\hbox{...}% get width of three periods \ifdim\wd0 > 1.5em \dimen0 = \wd0 \else \dimen0 = 1.5em \fi \hbox to \dimen0{% \hskip 0pt plus.25fil .\hskip 0pt plus1fil .\hskip 0pt plus1fil .\hskip 0pt plus.5fil }% } % @enddots{} is an end-of-sentence ellipsis. % \def\enddots{% \dots \spacefactor=\endofsentencespacefactor } % @comma{} is so commas can be inserted into text without messing up % Texinfo's parsing. % \let\comma = , % @refill is a no-op. \let\refill=\relax % If working on a large document in chapters, it is convenient to % be able to disable indexing, cross-referencing, and contents, for test runs. % This is done with @novalidate (before @setfilename). % \newif\iflinks \linkstrue % by default we want the aux files. \let\novalidate = \linksfalse % @setfilename is done at the beginning of every texinfo file. % So open here the files we need to have open while reading the input. % This makes it possible to make a .fmt file for texinfo. \def\setfilename{% \fixbackslash % Turn off hack to swallow `\input texinfo'. \iflinks \tryauxfile % Open the new aux file. TeX will close it automatically at exit. \immediate\openout\auxfile=\jobname.aux \fi % \openindices needs to do some work in any case. \openindices \let\setfilename=\comment % Ignore extra @setfilename cmds. % % If texinfo.cnf is present on the system, read it. % Useful for site-wide @afourpaper, etc. \openin 1 texinfo.cnf \ifeof 1 \else \input texinfo.cnf \fi \closein 1 % \comment % Ignore the actual filename. } % Called from \setfilename. % \def\openindices{% \newindex{cp}% \newcodeindex{fn}% \newcodeindex{vr}% \newcodeindex{tp}% \newcodeindex{ky}% \newcodeindex{pg}% } % @bye. \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} \message{pdf,} % adobe `portable' document format \newcount\tempnum \newcount\lnkcount \newtoks\filename \newcount\filenamelength \newcount\pgn \newtoks\toksA \newtoks\toksB \newtoks\toksC \newtoks\toksD \newbox\boxA \newcount\countA \newif\ifpdf \newif\ifpdfmakepagedest % when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 % can be set). So we test for \relax and 0 as well as \undefined, % borrowed from ifpdf.sty. \ifx\pdfoutput\undefined \else \ifx\pdfoutput\relax \else \ifcase\pdfoutput \else \pdftrue \fi \fi \fi % PDF uses PostScript string constants for the names of xref targets, % for display in the outlines, and in other places. Thus, we have to % double any backslashes. Otherwise, a name like "\node" will be % interpreted as a newline (\n), followed by o, d, e. Not good. % http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html % (and related messages, the final outcome is that it is up to the TeX % user to double the backslashes and otherwise make the string valid, so % that's what we do). % double active backslashes. % {\catcode`\@=0 \catcode`\\=\active @gdef@activebackslashdouble{% @catcode`@\=@active @let\=@doublebackslash} } % To handle parens, we must adopt a different approach, since parens are % not active characters. hyperref.dtx (which has the same problem as % us) handles it with this amazing macro to replace tokens, with minor % changes for Texinfo. It is included here under the GPL by permission % from the author, Heiko Oberdiek. % % #1 is the tokens to replace. % #2 is the replacement. % #3 is the control sequence with the string. % \def\HyPsdSubst#1#2#3{% \def\HyPsdReplace##1#1##2\END{% ##1% \ifx\\##2\\% \else #2% \HyReturnAfterFi{% \HyPsdReplace##2\END }% \fi }% \xdef#3{\expandafter\HyPsdReplace#3#1\END}% } \long\def\HyReturnAfterFi#1\fi{\fi#1} % #1 is a control sequence in which to do the replacements. \def\backslashparens#1{% \xdef#1{#1}% redefine it as its expansion; the definition is simply % \lastnode when called from \setref -> \pdfmkdest. \HyPsdSubst{(}{\realbackslash(}{#1}% \HyPsdSubst{)}{\realbackslash)}{#1}% } \newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images with PDF output, and none of those formats could be found. (.eps cannot be supported due to the design of the PDF format; use regular TeX (DVI output) for that.)} \ifpdf % % Color manipulation macros based on pdfcolor.tex, % except using rgb instead of cmyk; the latter is said to render as a % very dark gray on-screen and a very dark halftone in print, instead % of actual black. \def\rgbDarkRed{0.50 0.09 0.12} \def\rgbBlack{0 0 0} % % k sets the color for filling (usual text, etc.); % K sets the color for stroking (thin rules, e.g., normal _'s). \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}} % % Set color, and create a mark which defines \thiscolor accordingly, % so that \makeheadline knows which color to restore. \def\setcolor#1{% \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}% \domark \pdfsetcolor{#1}% } % \def\maincolor{\rgbBlack} \pdfsetcolor{\maincolor} \edef\thiscolor{\maincolor} \def\lastcolordefs{} % \def\makefootline{% \baselineskip24pt \line{\pdfsetcolor{\maincolor}\the\footline}% } % \def\makeheadline{% \vbox to 0pt{% \vskip-22.5pt \line{% \vbox to8.5pt{}% % Extract \thiscolor definition from the marks. \getcolormarks % Typeset the headline with \maincolor, then restore the color. \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}% }% \vss }% \nointerlineskip } % % \pdfcatalog{/PageMode /UseOutlines} % % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). \def\dopdfimage#1#2#3{% \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% % % pdftex (and the PDF format) support .png, .jpg, .pdf (among % others). Let's try in that order. \let\pdfimgext=\empty \begingroup \openin 1 #1.png \ifeof 1 \openin 1 #1.jpg \ifeof 1 \openin 1 #1.jpeg \ifeof 1 \openin 1 #1.JPG \ifeof 1 \openin 1 #1.pdf \ifeof 1 \openin 1 #1.PDF \ifeof 1 \errhelp = \nopdfimagehelp \errmessage{Could not find image file #1 for pdf}% \else \gdef\pdfimgext{PDF}% \fi \else \gdef\pdfimgext{pdf}% \fi \else \gdef\pdfimgext{JPG}% \fi \else \gdef\pdfimgext{jpeg}% \fi \else \gdef\pdfimgext{jpg}% \fi \else \gdef\pdfimgext{png}% \fi \closein 1 \endgroup % % without \immediate, ancient pdftex seg faults when the same image is % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) \ifnum\pdftexversion < 14 \immediate\pdfimage \else \immediate\pdfximage \fi \ifdim \wd0 >0pt width \imagewidth \fi \ifdim \wd2 >0pt height \imageheight \fi \ifnum\pdftexversion<13 #1.\pdfimgext \else {#1.\pdfimgext}% \fi \ifnum\pdftexversion < 14 \else \pdfrefximage \pdflastximage \fi} % \def\pdfmkdest#1{{% % We have to set dummies so commands such as @code, and characters % such as \, aren't expanded when present in a section title. \indexnofonts \turnoffactive \activebackslashdouble \makevalueexpandable \def\pdfdestname{#1}% \backslashparens\pdfdestname \safewhatsit{\pdfdest name{\pdfdestname} xyz}% }} % % used to mark target names; must be expandable. \def\pdfmkpgn#1{#1} % % by default, use a color that is dark enough to print on paper as % nearly black, but still distinguishable for online viewing. \def\urlcolor{\rgbDarkRed} \def\linkcolor{\rgbDarkRed} \def\endlink{\setcolor{\maincolor}\pdfendlink} % % Adding outlines to PDF; macros for calculating structure of outlines % come from Petr Olsak \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% \else \csname#1\endcsname \fi} \def\advancenumber#1{\tempnum=\expnumber{#1}\relax \advance\tempnum by 1 \expandafter\xdef\csname#1\endcsname{\the\tempnum}} % % #1 is the section text, which is what will be displayed in the % outline by the pdf viewer. #2 is the pdf expression for the number % of subentries (or empty, for subsubsections). #3 is the node text, % which might be empty if this toc entry had no corresponding node. % #4 is the page number % \def\dopdfoutline#1#2#3#4{% % Generate a link to the node text if that exists; else, use the % page number. We could generate a destination for the section % text in the case where a section has no node, but it doesn't % seem worth the trouble, since most documents are normally structured. \def\pdfoutlinedest{#3}% \ifx\pdfoutlinedest\empty \def\pdfoutlinedest{#4}% \else % Doubled backslashes in the name. {\activebackslashdouble \xdef\pdfoutlinedest{#3}% \backslashparens\pdfoutlinedest}% \fi % % Also double the backslashes in the display string. {\activebackslashdouble \xdef\pdfoutlinetext{#1}% \backslashparens\pdfoutlinetext}% % \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% } % \def\pdfmakeoutlines{% \begingroup % Thanh's hack / proper braces in bookmarks \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace % % Read toc silently, to get counts of subentries for \pdfoutline. \def\numchapentry##1##2##3##4{% \def\thischapnum{##2}% \def\thissecnum{0}% \def\thissubsecnum{0}% }% \def\numsecentry##1##2##3##4{% \advancenumber{chap\thischapnum}% \def\thissecnum{##2}% \def\thissubsecnum{0}% }% \def\numsubsecentry##1##2##3##4{% \advancenumber{sec\thissecnum}% \def\thissubsecnum{##2}% }% \def\numsubsubsecentry##1##2##3##4{% \advancenumber{subsec\thissubsecnum}% }% \def\thischapnum{0}% \def\thissecnum{0}% \def\thissubsecnum{0}% % % use \def rather than \let here because we redefine \chapentry et % al. a second time, below. \def\appentry{\numchapentry}% \def\appsecentry{\numsecentry}% \def\appsubsecentry{\numsubsecentry}% \def\appsubsubsecentry{\numsubsubsecentry}% \def\unnchapentry{\numchapentry}% \def\unnsecentry{\numsecentry}% \def\unnsubsecentry{\numsubsecentry}% \def\unnsubsubsecentry{\numsubsubsecentry}% \readdatafile{toc}% % % Read toc second time, this time actually producing the outlines. % The `-' means take the \expnumber as the absolute number of % subentries, which we calculated on our first read of the .toc above. % % We use the node names as the destinations. \def\numchapentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}% \def\numsecentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}% \def\numsubsecentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}% \def\numsubsubsecentry##1##2##3##4{% count is always zero \dopdfoutline{##1}{}{##3}{##4}}% % % PDF outlines are displayed using system fonts, instead of % document fonts. Therefore we cannot use special characters, % since the encoding is unknown. For example, the eogonek from % Latin 2 (0xea) gets translated to a | character. Info from % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100. % % xx to do this right, we have to translate 8-bit characters to % their "best" equivalent, based on the @documentencoding. Right % now, I guess we'll just let the pdf reader have its way. \indexnofonts \setupdatafile \catcode`\\=\active \otherbackslash \input \tocreadfilename \endgroup } % \def\skipspaces#1{\def\PP{#1}\def\D{|}% \ifx\PP\D\let\nextsp\relax \else\let\nextsp\skipspaces \ifx\p\space\else\addtokens{\filename}{\PP}% \advance\filenamelength by 1 \fi \fi \nextsp} \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax} \ifnum\pdftexversion < 14 \let \startlink \pdfannotlink \else \let \startlink \pdfstartlink \fi % make a live url in pdf output. \def\pdfurl#1{% \begingroup % it seems we really need yet another set of dummies; have not % tried to figure out what each command should do in the context % of @url. for now, just make @/ a no-op, that's the only one % people have actually reported a problem with. % \normalturnoffactive \def\@{@}% \let\/=\empty \makevalueexpandable % do we want to go so far as to use \indexnofonts instead of just % special-casing \var here? \def\var##1{##1}% % \leavevmode\setcolor{\urlcolor}% \startlink attr{/Border [0 0 0]}% user{/Subtype /Link /A << /S /URI /URI (#1) >>}% \endgroup} \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} \def\maketoks{% \expandafter\poptoks\the\toksA|ENDTOKS|\relax \ifx\first0\adn0 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 \else \ifnum0=\countA\else\makelink\fi \ifx\first.\let\next=\done\else \let\next=\maketoks \addtokens{\toksB}{\the\toksD} \ifx\first,\addtokens{\toksB}{\space}\fi \fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \next} \def\makelink{\addtokens{\toksB}% {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} \def\pdflink#1{% \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}} \setcolor{\linkcolor}#1\endlink} \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} \else % non-pdf mode \let\pdfmkdest = \gobble \let\pdfurl = \gobble \let\endlink = \relax \let\setcolor = \gobble \let\pdfsetcolor = \gobble \let\pdfmakeoutlines = \relax \fi % \ifx\pdfoutput \message{fonts,} % Change the current font style to #1, remembering it in \curfontstyle. % For now, we do not accumulate font styles: @b{@i{foo}} prints foo in % italics, not bold italics. % \def\setfontstyle#1{% \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd. \csname ten#1\endcsname % change the current font } % Select #1 fonts with the current style. % \def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname} \def\rm{\fam=0 \setfontstyle{rm}} \def\it{\fam=\itfam \setfontstyle{it}} \def\sl{\fam=\slfam \setfontstyle{sl}} \def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} \def\tt{\fam=\ttfam \setfontstyle{tt}} % Unfortunately, we have to override this for titles and the like, since % in those cases "rm" is bold. Sigh. \def\rmisbold{\rm\def\curfontstyle{bf}} % Texinfo sort of supports the sans serif font style, which plain TeX does not. % So we set up a \sf. \newfam\sffam \def\sf{\fam=\sffam \setfontstyle{sf}} \let\li = \sf % Sometimes we call it \li, not \sf. % We don't need math for this font style. \def\ttsl{\setfontstyle{ttsl}} % Default leading. \newdimen\textleading \textleading = 13.2pt % Set the baselineskip to #1, and the lineskip and strut size % correspondingly. There is no deep meaning behind these magic numbers % used as factors; they just match (closely enough) what Knuth defined. % \def\lineskipfactor{.08333} \def\strutheightpercent{.70833} \def\strutdepthpercent {.29167} % % can get a sort of poor man's double spacing by redefining this. \def\baselinefactor{1} % \def\setleading#1{% \dimen0 = #1\relax \normalbaselineskip = \baselinefactor\dimen0 \normallineskip = \lineskipfactor\normalbaselineskip \normalbaselines \setbox\strutbox =\hbox{% \vrule width0pt height\strutheightpercent\baselineskip depth \strutdepthpercent \baselineskip }% } % PDF CMaps. See also LaTeX's t1.cmap. % % do nothing with this by default. \expandafter\let\csname cmapOT1\endcsname\gobble \expandafter\let\csname cmapOT1IT\endcsname\gobble \expandafter\let\csname cmapOT1TT\endcsname\gobble % if we are producing pdf, and we have \pdffontattr, then define cmaps. % (\pdffontattr was introduced many years ago, but people still run % older pdftex's; it's easy to conditionalize, so we do.) \ifpdf \ifx\pdffontattr\undefined \else \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1-0) %%Title: (TeX-OT1-0 TeX OT1 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1) /Supplement 0 >> def /CMapName /TeX-OT1-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 8 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <23> <26> <0023> <28> <3B> <0028> <3F> <5B> <003F> <5D> <5E> <005D> <61> <7A> <0061> <7B> <7C> <2013> endbfrange 40 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <00660066> <0C> <00660069> <0D> <0066006C> <0E> <006600660069> <0F> <00660066006C> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <21> <0021> <22> <201D> <27> <2019> <3C> <00A1> <3D> <003D> <3E> <00BF> <5C> <201C> <5F> <02D9> <60> <2018> <7D> <02DD> <7E> <007E> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% % % \cmapOT1IT \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1IT-0) %%Title: (TeX-OT1IT-0 TeX OT1IT 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1IT) /Supplement 0 >> def /CMapName /TeX-OT1IT-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 8 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <25> <26> <0025> <28> <3B> <0028> <3F> <5B> <003F> <5D> <5E> <005D> <61> <7A> <0061> <7B> <7C> <2013> endbfrange 42 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <00660066> <0C> <00660069> <0D> <0066006C> <0E> <006600660069> <0F> <00660066006C> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <21> <0021> <22> <201D> <23> <0023> <24> <00A3> <27> <2019> <3C> <00A1> <3D> <003D> <3E> <00BF> <5C> <201C> <5F> <02D9> <60> <2018> <7D> <02DD> <7E> <007E> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1IT\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% % % \cmapOT1TT \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1TT-0) %%Title: (TeX-OT1TT-0 TeX OT1TT 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1TT) /Supplement 0 >> def /CMapName /TeX-OT1TT-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 5 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <21> <26> <0021> <28> <5F> <0028> <61> <7E> <0061> endbfrange 32 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <2191> <0C> <2193> <0D> <0027> <0E> <00A1> <0F> <00BF> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <20> <2423> <27> <2019> <60> <2018> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1TT\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% \fi\fi % Set the font macro #1 to the font named #2, adding on the % specified font prefix (normally `cm'). % #3 is the font's design size, #4 is a scale factor, #5 is the CMap % encoding (currently only OT1, OT1IT and OT1TT are allowed, pass % empty to omit). \def\setfont#1#2#3#4#5{% \font#1=\fontprefix#2#3 scaled #4 \csname cmap#5\endcsname#1% } % This is what gets called when #5 of \setfont is empty. \let\cmap\gobble % emacs-page end of cmaps % Use cm as the default font prefix. % To specify the font prefix, you must define \fontprefix % before you read in texinfo.tex. \ifx\fontprefix\undefined \def\fontprefix{cm} \fi % Support font families that don't use the same naming scheme as CM. \def\rmshape{r} \def\rmbshape{bx} %where the normal face is bold \def\bfshape{b} \def\bxshape{bx} \def\ttshape{tt} \def\ttbshape{tt} \def\ttslshape{sltt} \def\itshape{ti} \def\itbshape{bxti} \def\slshape{sl} \def\slbshape{bxsl} \def\sfshape{ss} \def\sfbshape{ss} \def\scshape{csc} \def\scbshape{csc} % Definitions for a main text size of 11pt. This is the default in % Texinfo. % \def\definetextfontsizexi{% % Text fonts (11.2pt, magstep1). \def\textnominalsize{11pt} \edef\mainmagstep{\magstephalf} \setfont\textrm\rmshape{10}{\mainmagstep}{OT1} \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} \setfont\textbf\bfshape{10}{\mainmagstep}{OT1} \setfont\textit\itshape{10}{\mainmagstep}{OT1IT} \setfont\textsl\slshape{10}{\mainmagstep}{OT1} \setfont\textsf\sfshape{10}{\mainmagstep}{OT1} \setfont\textsc\scshape{10}{\mainmagstep}{OT1} \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep \def\textecsize{1095} % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstep1}{OT1} \setfont\deftt\ttshape{10}{\magstep1}{OT1TT} \setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} % Fonts for indices, footnotes, small examples (9pt). \def\smallnominalsize{9pt} \setfont\smallrm\rmshape{9}{1000}{OT1} \setfont\smalltt\ttshape{9}{1000}{OT1TT} \setfont\smallbf\bfshape{10}{900}{OT1} \setfont\smallit\itshape{9}{1000}{OT1IT} \setfont\smallsl\slshape{9}{1000}{OT1} \setfont\smallsf\sfshape{9}{1000}{OT1} \setfont\smallsc\scshape{10}{900}{OT1} \setfont\smallttsl\ttslshape{10}{900}{OT1TT} \font\smalli=cmmi9 \font\smallsy=cmsy9 \def\smallecsize{0900} % Fonts for small examples (8pt). \def\smallernominalsize{8pt} \setfont\smallerrm\rmshape{8}{1000}{OT1} \setfont\smallertt\ttshape{8}{1000}{OT1TT} \setfont\smallerbf\bfshape{10}{800}{OT1} \setfont\smallerit\itshape{8}{1000}{OT1IT} \setfont\smallersl\slshape{8}{1000}{OT1} \setfont\smallersf\sfshape{8}{1000}{OT1} \setfont\smallersc\scshape{10}{800}{OT1} \setfont\smallerttsl\ttslshape{10}{800}{OT1TT} \font\smalleri=cmmi8 \font\smallersy=cmsy8 \def\smallerecsize{0800} % Fonts for title page (20.4pt): \def\titlenominalsize{20pt} \setfont\titlerm\rmbshape{12}{\magstep3}{OT1} \setfont\titleit\itbshape{10}{\magstep4}{OT1IT} \setfont\titlesl\slbshape{10}{\magstep4}{OT1} \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} \setfont\titlesf\sfbshape{17}{\magstep1}{OT1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\titleecsize{2074} % Chapter (and unnumbered) fonts (17.28pt). \def\chapnominalsize{17pt} \setfont\chaprm\rmbshape{12}{\magstep2}{OT1} \setfont\chapit\itbshape{10}{\magstep3}{OT1IT} \setfont\chapsl\slbshape{10}{\magstep3}{OT1} \setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT} \setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT} \setfont\chapsf\sfbshape{17}{1000}{OT1} \let\chapbf=\chaprm \setfont\chapsc\scbshape{10}{\magstep3}{OT1} \font\chapi=cmmi12 scaled \magstep2 \font\chapsy=cmsy10 scaled \magstep3 \def\chapecsize{1728} % Section fonts (14.4pt). \def\secnominalsize{14pt} \setfont\secrm\rmbshape{12}{\magstep1}{OT1} \setfont\secit\itbshape{10}{\magstep2}{OT1IT} \setfont\secsl\slbshape{10}{\magstep2}{OT1} \setfont\sectt\ttbshape{12}{\magstep1}{OT1TT} \setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT} \setfont\secsf\sfbshape{12}{\magstep1}{OT1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep2}{OT1} \font\seci=cmmi12 scaled \magstep1 \font\secsy=cmsy10 scaled \magstep2 \def\sececsize{1440} % Subsection fonts (13.15pt). \def\ssecnominalsize{13pt} \setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1} \setfont\ssecit\itbshape{10}{1315}{OT1IT} \setfont\ssecsl\slbshape{10}{1315}{OT1} \setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT} \setfont\ssecttsl\ttslshape{10}{1315}{OT1TT} \setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{1315}{OT1} \font\sseci=cmmi12 scaled \magstephalf \font\ssecsy=cmsy10 scaled 1315 \def\ssececsize{1200} % Reduced fonts for @acro in text (10pt). \def\reducednominalsize{10pt} \setfont\reducedrm\rmshape{10}{1000}{OT1} \setfont\reducedtt\ttshape{10}{1000}{OT1TT} \setfont\reducedbf\bfshape{10}{1000}{OT1} \setfont\reducedit\itshape{10}{1000}{OT1IT} \setfont\reducedsl\slshape{10}{1000}{OT1} \setfont\reducedsf\sfshape{10}{1000}{OT1} \setfont\reducedsc\scshape{10}{1000}{OT1} \setfont\reducedttsl\ttslshape{10}{1000}{OT1TT} \font\reducedi=cmmi10 \font\reducedsy=cmsy10 \def\reducedecsize{1000} % reset the current fonts \textfonts \rm } % end of 11pt text font size definitions % Definitions to make the main text be 10pt Computer Modern, with % section, chapter, etc., sizes following suit. This is for the GNU % Press printing of the Emacs 22 manual. Maybe other manuals in the % future. Used with @smallbook, which sets the leading to 12pt. % \def\definetextfontsizex{% % Text fonts (10pt). \def\textnominalsize{10pt} \edef\mainmagstep{1000} \setfont\textrm\rmshape{10}{\mainmagstep}{OT1} \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} \setfont\textbf\bfshape{10}{\mainmagstep}{OT1} \setfont\textit\itshape{10}{\mainmagstep}{OT1IT} \setfont\textsl\slshape{10}{\mainmagstep}{OT1} \setfont\textsf\sfshape{10}{\mainmagstep}{OT1} \setfont\textsc\scshape{10}{\mainmagstep}{OT1} \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep \def\textecsize{1000} % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstephalf}{OT1} \setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} \setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} % Fonts for indices, footnotes, small examples (9pt). \def\smallnominalsize{9pt} \setfont\smallrm\rmshape{9}{1000}{OT1} \setfont\smalltt\ttshape{9}{1000}{OT1TT} \setfont\smallbf\bfshape{10}{900}{OT1} \setfont\smallit\itshape{9}{1000}{OT1IT} \setfont\smallsl\slshape{9}{1000}{OT1} \setfont\smallsf\sfshape{9}{1000}{OT1} \setfont\smallsc\scshape{10}{900}{OT1} \setfont\smallttsl\ttslshape{10}{900}{OT1TT} \font\smalli=cmmi9 \font\smallsy=cmsy9 \def\smallecsize{0900} % Fonts for small examples (8pt). \def\smallernominalsize{8pt} \setfont\smallerrm\rmshape{8}{1000}{OT1} \setfont\smallertt\ttshape{8}{1000}{OT1TT} \setfont\smallerbf\bfshape{10}{800}{OT1} \setfont\smallerit\itshape{8}{1000}{OT1IT} \setfont\smallersl\slshape{8}{1000}{OT1} \setfont\smallersf\sfshape{8}{1000}{OT1} \setfont\smallersc\scshape{10}{800}{OT1} \setfont\smallerttsl\ttslshape{10}{800}{OT1TT} \font\smalleri=cmmi8 \font\smallersy=cmsy8 \def\smallerecsize{0800} % Fonts for title page (20.4pt): \def\titlenominalsize{20pt} \setfont\titlerm\rmbshape{12}{\magstep3}{OT1} \setfont\titleit\itbshape{10}{\magstep4}{OT1IT} \setfont\titlesl\slbshape{10}{\magstep4}{OT1} \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} \setfont\titlesf\sfbshape{17}{\magstep1}{OT1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\titleecsize{2074} % Chapter fonts (14.4pt). \def\chapnominalsize{14pt} \setfont\chaprm\rmbshape{12}{\magstep1}{OT1} \setfont\chapit\itbshape{10}{\magstep2}{OT1IT} \setfont\chapsl\slbshape{10}{\magstep2}{OT1} \setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT} \setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT} \setfont\chapsf\sfbshape{12}{\magstep1}{OT1} \let\chapbf\chaprm \setfont\chapsc\scbshape{10}{\magstep2}{OT1} \font\chapi=cmmi12 scaled \magstep1 \font\chapsy=cmsy10 scaled \magstep2 \def\chapecsize{1440} % Section fonts (12pt). \def\secnominalsize{12pt} \setfont\secrm\rmbshape{12}{1000}{OT1} \setfont\secit\itbshape{10}{\magstep1}{OT1IT} \setfont\secsl\slbshape{10}{\magstep1}{OT1} \setfont\sectt\ttbshape{12}{1000}{OT1TT} \setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT} \setfont\secsf\sfbshape{12}{1000}{OT1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep1}{OT1} \font\seci=cmmi12 \font\secsy=cmsy10 scaled \magstep1 \def\sececsize{1200} % Subsection fonts (10pt). \def\ssecnominalsize{10pt} \setfont\ssecrm\rmbshape{10}{1000}{OT1} \setfont\ssecit\itbshape{10}{1000}{OT1IT} \setfont\ssecsl\slbshape{10}{1000}{OT1} \setfont\ssectt\ttbshape{10}{1000}{OT1TT} \setfont\ssecttsl\ttslshape{10}{1000}{OT1TT} \setfont\ssecsf\sfbshape{10}{1000}{OT1} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{1000}{OT1} \font\sseci=cmmi10 \font\ssecsy=cmsy10 \def\ssececsize{1000} % Reduced fonts for @acro in text (9pt). \def\reducednominalsize{9pt} \setfont\reducedrm\rmshape{9}{1000}{OT1} \setfont\reducedtt\ttshape{9}{1000}{OT1TT} \setfont\reducedbf\bfshape{10}{900}{OT1} \setfont\reducedit\itshape{9}{1000}{OT1IT} \setfont\reducedsl\slshape{9}{1000}{OT1} \setfont\reducedsf\sfshape{9}{1000}{OT1} \setfont\reducedsc\scshape{10}{900}{OT1} \setfont\reducedttsl\ttslshape{10}{900}{OT1TT} \font\reducedi=cmmi9 \font\reducedsy=cmsy9 \def\reducedecsize{0900} % reduce space between paragraphs \divide\parskip by 2 % reset the current fonts \textfonts \rm } % end of 10pt text font size definitions % We provide the user-level command % @fonttextsize 10 % (or 11) to redefine the text font size. pt is assumed. % \def\xword{10} \def\xiword{11} % \parseargdef\fonttextsize{% \def\textsizearg{#1}% \wlog{doing @fonttextsize \textsizearg}% % % Set \globaldefs so that documents can use this inside @tex, since % makeinfo 4.8 does not support it, but we need it nonetheless. % \begingroup \globaldefs=1 \ifx\textsizearg\xword \definetextfontsizex \else \ifx\textsizearg\xiword \definetextfontsizexi \else \errhelp=\EMsimple \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'} \fi\fi \endgroup } % In order for the font changes to affect most math symbols and letters, % we have to define the \textfont of the standard families. Since % texinfo doesn't allow for producing subscripts and superscripts except % in the main text, we don't bother to reset \scriptfont and % \scriptscriptfont (which would also require loading a lot more fonts). % \def\resetmathfonts{% \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf \textfont\ttfam=\tentt \textfont\sffam=\tensf } % The font-changing commands redefine the meanings of \tenSTYLE, instead % of just \STYLE. We do this because \STYLE needs to also set the % current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire % \tenSTYLE to set the current font. % % Each font-changing command also sets the names \lsize (one size lower) % and \lllsize (three sizes lower). These relative commands are used in % the LaTeX logo and acronyms. % % This all needs generalizing, badly. % \def\textfonts{% \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl \def\curfontsize{text}% \def\lsize{reduced}\def\lllsize{smaller}% \resetmathfonts \setleading{\textleading}} \def\titlefonts{% \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy \let\tenttsl=\titlettsl \def\curfontsize{title}% \def\lsize{chap}\def\lllsize{subsec}% \resetmathfonts \setleading{25pt}} \def\titlefont#1{{\titlefonts\rmisbold #1}} \def\chapfonts{% \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl \def\curfontsize{chap}% \def\lsize{sec}\def\lllsize{text}% \resetmathfonts \setleading{19pt}} \def\secfonts{% \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl \def\curfontsize{sec}% \def\lsize{subsec}\def\lllsize{reduced}% \resetmathfonts \setleading{16pt}} \def\subsecfonts{% \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl \def\curfontsize{ssec}% \def\lsize{text}\def\lllsize{small}% \resetmathfonts \setleading{15pt}} \let\subsubsecfonts = \subsecfonts \def\reducedfonts{% \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy \let\tenttsl=\reducedttsl \def\curfontsize{reduced}% \def\lsize{small}\def\lllsize{smaller}% \resetmathfonts \setleading{10.5pt}} \def\smallfonts{% \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy \let\tenttsl=\smallttsl \def\curfontsize{small}% \def\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{10.5pt}} \def\smallerfonts{% \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy \let\tenttsl=\smallerttsl \def\curfontsize{smaller}% \def\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{9.5pt}} % Fonts for short table of contents. \setfont\shortcontrm\rmshape{12}{1000}{OT1} \setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 \setfont\shortcontsl\slshape{12}{1000}{OT1} \setfont\shortconttt\ttshape{12}{1000}{OT1TT} % Define these just so they can be easily changed for other fonts. \def\angleleft{$\langle$} \def\angleright{$\rangle$} % Set the fonts to use with the @small... environments. \let\smallexamplefonts = \smallfonts % About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample % can fit this many characters: % 8.5x11=86 smallbook=72 a4=90 a5=69 % If we use \scriptfonts (8pt), then we can fit this many characters: % 8.5x11=90+ smallbook=80 a4=90+ a5=77 % For me, subjectively, the few extra characters that fit aren't worth % the additional smallness of 8pt. So I'm making the default 9pt. % % By the way, for comparison, here's what fits with @example (10pt): % 8.5x11=71 smallbook=60 a4=75 a5=58 % --karl, 24jan03. % Set up the default fonts, so we can use them for creating boxes. % \definetextfontsizexi \message{markup,} % Check if we are currently using a typewriter font. Since all the % Computer Modern typewriter fonts have zero interword stretch (and % shrink), and it is reasonable to expect all typewriter fonts to have % this property, we can check that font parameter. % \def\ifmonospace{\ifdim\fontdimen3\font=0pt } % Markup style infrastructure. \defmarkupstylesetup\INITMACRO will % define and register \INITMACRO to be called on markup style changes. % \INITMACRO can check \currentmarkupstyle for the innermost % style and the set of \ifmarkupSTYLE switches for all styles % currently in effect. \newif\ifmarkupvar \newif\ifmarkupsamp \newif\ifmarkupkey %\newif\ifmarkupfile % @file == @samp. %\newif\ifmarkupoption % @option == @samp. \newif\ifmarkupcode \newif\ifmarkupkbd %\newif\ifmarkupenv % @env == @code. %\newif\ifmarkupcommand % @command == @code. \newif\ifmarkuptex % @tex (and part of @math, for now). \newif\ifmarkupexample \newif\ifmarkupverb \newif\ifmarkupverbatim \let\currentmarkupstyle\empty \def\setupmarkupstyle#1{% \csname markup#1true\endcsname \def\currentmarkupstyle{#1}% \markupstylesetup } \let\markupstylesetup\empty \def\defmarkupstylesetup#1{% \expandafter\def\expandafter\markupstylesetup \expandafter{\markupstylesetup #1}% \def#1% } % Markup style setup for left and right quotes. \defmarkupstylesetup\markupsetuplq{% \expandafter\let\expandafter \temp \csname markupsetuplq\currentmarkupstyle\endcsname \ifx\temp\relax \markupsetuplqdefault \else \temp \fi } \defmarkupstylesetup\markupsetuprq{% \expandafter\let\expandafter \temp \csname markupsetuprq\currentmarkupstyle\endcsname \ifx\temp\relax \markupsetuprqdefault \else \temp \fi } { \catcode`\'=\active \catcode`\`=\active \gdef\markupsetuplqdefault{\let`\lq} \gdef\markupsetuprqdefault{\let'\rq} \gdef\markupsetcodequoteleft{\let`\codequoteleft} \gdef\markupsetcodequoteright{\let'\codequoteright} \gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft} } \let\markupsetuplqcode \markupsetcodequoteleft \let\markupsetuprqcode \markupsetcodequoteright \let\markupsetuplqexample \markupsetcodequoteleft \let\markupsetuprqexample \markupsetcodequoteright \let\markupsetuplqverb \markupsetcodequoteleft \let\markupsetuprqverb \markupsetcodequoteright \let\markupsetuplqverbatim \markupsetcodequoteleft \let\markupsetuprqverbatim \markupsetcodequoteright \let\markupsetuplqsamp \markupsetnoligaturesquoteleft \let\markupsetuplqkbd \markupsetnoligaturesquoteleft % Allow an option to not replace quotes with a regular directed right % quote/apostrophe (char 0x27), but instead use the undirected quote % from cmtt (char 0x0d). The undirected quote is ugly, so don't make it % the default, but it works for pasting with more pdf viewers (at least % evince), the lilypond developers report. xpdf does work with the % regular 0x27. % \def\codequoteright{% \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax '% \else \char'15 \fi \else \char'15 \fi } % % and a similar option for the left quote char vs. a grave accent. % Modern fonts display ASCII 0x60 as a grave accent, so some people like % the code environments to do likewise. % \def\codequoteleft{% \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax % [Knuth] pp. 380,381,391 % \relax disables Spanish ligatures ?` and !` of \tt font. \relax`% \else \char'22 \fi \else \char'22 \fi } % [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font. \def\noligaturesquoteleft{\relax\lq} % Count depth in font-changes, for error checks \newcount\fontdepth \fontdepth=0 %% Add scribe-like font environments, plus @l for inline lisp (usually sans %% serif) and @ii for TeX italic % \smartitalic{ARG} outputs arg in italics, followed by an italic correction % unless the following character is such as not to need one. \def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else \ptexslash\fi\fi\fi} \def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx} \def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx} % like \smartslanted except unconditionally uses \ttsl. % @var is set to this for defun arguments. \def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx} % @cite is like \smartslanted except unconditionally use \sl. We never want % ttsl for book titles, do we? \def\cite#1{{\sl #1}\futurelet\next\smartitalicx} \let\i=\smartitalic \let\slanted=\smartslanted \def\var#1{{\setupmarkupstyle{var}\smartslanted{#1}}} \let\dfn=\smartslanted \let\emph=\smartitalic % Explicit font changes: @r, @sc, undocumented @ii. \def\r#1{{\rm #1}} % roman font \def\sc#1{{\smallcaps#1}} % smallcaps font \def\ii#1{{\it #1}} % italic font % @b, explicit bold. Also @strong. \def\b#1{{\bf #1}} \let\strong=\b % @sansserif, explicit sans. \def\sansserif#1{{\sf #1}} % We can't just use \exhyphenpenalty, because that only has effect at % the end of a paragraph. Restore normal hyphenation at the end of the % group within which \nohyphenation is presumably called. % \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} \def\restorehyphenation{\hyphenchar\font = `- } % Set sfcode to normal for the chars that usually have another value. % Can't use plain's \frenchspacing because it uses the `\x notation, and % sometimes \x has an active definition that messes things up. % \catcode`@=11 \def\plainfrenchspacing{% \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m \def\endofsentencespacefactor{1000}% for @. and friends } \def\plainnonfrenchspacing{% \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000 \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 \def\endofsentencespacefactor{3000}% for @. and friends } \catcode`@=\other \def\endofsentencespacefactor{3000}% default % @t, explicit typewriter. \def\t#1{% {\tt \rawbackslash \plainfrenchspacing #1}% \null } % @samp. \def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}} % definition of @key that produces a lozenge. Doesn't adjust to text size. %\setfont\keyrm\rmshape{8}{1000}{OT1} %\font\keysy=cmsy9 %\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% % \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% % \vbox{\hrule\kern-0.4pt % \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% % \kern-0.4pt\hrule}% % \kern-.06em\raise0.4pt\hbox{\angleright}}}} % definition of @key with no lozenge. If the current font is already % monospace, don't change it; that way, we respect @kbdinputstyle. But % if it isn't monospace, then use \tt. % \def\key#1{{\setupmarkupstyle{key}% \nohyphenation \ifmonospace\else\tt\fi #1}\null} % ctrl is no longer a Texinfo command. \def\ctrl #1{{\tt \rawbackslash \hat}#1} % @file, @option are the same as @samp. \let\file=\samp \let\option=\samp % @code is a modification of @t, % which makes spaces the same size as normal in the surrounding text. \def\tclose#1{% {% % Change normal interword space to be same as for the current font. \spaceskip = \fontdimen2\font % % Switch to typewriter. \tt % % But `\ ' produces the large typewriter interword space. \def\ {{\spaceskip = 0pt{} }}% % % Turn off hyphenation. \nohyphenation % \rawbackslash \plainfrenchspacing #1% }% \null } % We *must* turn on hyphenation at `-' and `_' in @code. % Otherwise, it is too hard to avoid overfull hboxes % in the Emacs manual, the Library manual, etc. % Unfortunately, TeX uses one parameter (\hyphenchar) to control % both hyphenation at - and hyphenation within words. % We must therefore turn them both off (\tclose does that) % and arrange explicitly to hyphenate at a dash. % -- rms. { \catcode`\-=\active \catcode`\_=\active \catcode`\'=\active \catcode`\`=\active \global\let'=\rq \global\let`=\lq % default definitions % \global\def\code{\begingroup \setupmarkupstyle{code}% % The following should really be moved into \setupmarkupstyle handlers. \catcode\dashChar=\active \catcode\underChar=\active \ifallowcodebreaks \let-\codedash \let_\codeunder \else \let-\realdash \let_\realunder \fi \codex } } \def\realdash{-} \def\codedash{-\discretionary{}{}{}} \def\codeunder{% % this is all so @math{@code{var_name}+1} can work. In math mode, _ % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) % will therefore expand the active definition of _, which is us % (inside @code that is), therefore an endless loop. \ifusingtt{\ifmmode \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_. \else\normalunderscore \fi \discretionary{}{}{}}% {\_}% } \def\codex #1{\tclose{#1}\endgroup} % An additional complication: the above will allow breaks after, e.g., % each of the four underscores in __typeof__. This is undesirable in % some manuals, especially if they don't have long identifiers in % general. @allowcodebreaks provides a way to control this. % \newif\ifallowcodebreaks \allowcodebreakstrue \def\keywordtrue{true} \def\keywordfalse{false} \parseargdef\allowcodebreaks{% \def\txiarg{#1}% \ifx\txiarg\keywordtrue \allowcodebreakstrue \else\ifx\txiarg\keywordfalse \allowcodebreaksfalse \else \errhelp = \EMsimple \errmessage{Unknown @allowcodebreaks option `\txiarg'}% \fi\fi } % @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. \def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}} % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), % `example' (@kbd uses ttsl only inside of @example and friends), % or `code' (@kbd uses normal tty font always). \parseargdef\kbdinputstyle{% \def\txiarg{#1}% \ifx\txiarg\worddistinct \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% \else\ifx\txiarg\wordexample \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% \else\ifx\txiarg\wordcode \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% \else \errhelp = \EMsimple \errmessage{Unknown @kbdinputstyle option `\txiarg'}% \fi\fi\fi } \def\worddistinct{distinct} \def\wordexample{example} \def\wordcode{code} % Default is `distinct'. \kbdinputstyle distinct \def\xkey{\key} \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% \ifx\one\xkey\ifx\threex\three \key{#2}% \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi} % For @indicateurl, @env, @command quotes seem unnecessary, so use \code. \let\indicateurl=\code \let\env=\code \let\command=\code % @clicksequence{File @click{} Open ...} \def\clicksequence#1{\begingroup #1\endgroup} % @clickstyle @arrow (by default) \parseargdef\clickstyle{\def\click{#1}} \def\click{\arrow} % @uref (abbreviation for `urlref') takes an optional (comma-separated) % second argument specifying the text to display and an optional third % arg as text to display instead of (rather than in addition to) the url % itself. First (mandatory) arg is the url. Perhaps eventually put in % a hypertex \special here. % \def\uref#1{\douref #1,,,\finish} \def\douref#1,#2,#3,#4\finish{\begingroup \unsepspaces \pdfurl{#1}% \setbox0 = \hbox{\ignorespaces #3}% \ifdim\wd0 > 0pt \unhbox0 % third arg given, show only that \else \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \ifpdf \unhbox0 % PDF: 2nd arg given, show only it \else \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url \fi \else \code{#1}% only url given, so show it \fi \fi \endlink \endgroup} % @url synonym for @uref, since that's how everyone uses it. % \let\url=\uref % rms does not like angle brackets --karl, 17may97. % So now @email is just like @uref, unless we are pdf. % %\def\email#1{\angleleft{\tt #1}\angleright} \ifpdf \def\email#1{\doemail#1,,\finish} \def\doemail#1,#2,#3\finish{\begingroup \unsepspaces \pdfurl{mailto:#1}% \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi \endlink \endgroup} \else \let\email=\uref \fi % Typeset a dimension, e.g., `in' or `pt'. The only reason for the % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. % \def\dmn#1{\thinspace #1} % @l was never documented to mean ``switch to the Lisp font'', % and it is not used as such in any manual I can find. We need it for % Polish suppressed-l. --karl, 22sep96. %\def\l#1{{\li #1}\null} % @acronym for "FBI", "NATO", and the like. % We print this one point size smaller, since it's intended for % all-uppercase. % \def\acronym#1{\doacronym #1,,\finish} \def\doacronym#1,#2,#3\finish{% {\selectfonts\lsize #1}% \def\temp{#2}% \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi } % @abbr for "Comput. J." and the like. % No font change, but don't do end-of-sentence spacing. % \def\abbr#1{\doabbr #1,,\finish} \def\doabbr#1,#2,#3\finish{% {\plainfrenchspacing #1}% \def\temp{#2}% \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi } \message{glyphs,} % @point{}, @result{}, @expansion{}, @print{}, @equiv{}. % % Since these characters are used in examples, they should be an even number of % \tt widths. Each \tt character is 1en, so two makes it 1em. % \def\point{$\star$} \def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}} \def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} \def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}} \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} \def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}} % The @error{} command. % Adapted from the TeXbook's \boxit. % \newbox\errorbox % {\tentt \global\dimen0 = 3em}% Width of the box. \dimen2 = .55pt % Thickness of rules % The text. (`r' is open on the right, `e' somewhat less so on the left.) \setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt} % \setbox\errorbox=\hbox to \dimen0{\hfil \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. \advance\hsize by -2\dimen2 % Rules. \vbox{% \hrule height\dimen2 \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. \kern3pt\vrule width\dimen2}% Space to right. \hrule height\dimen2} \hfil} % \def\error{\leavevmode\lower.7ex\copy\errorbox} % @pounds{} is a sterling sign, which Knuth put in the CM italic font. % \def\pounds{{\it\$}} % @euro{} comes from a separate font, depending on the current style. % We use the free feym* fonts from the eurosym package by Henrik % Theiling, which support regular, slanted, bold and bold slanted (and % "outlined" (blackboard board, sort of) versions, which we don't need). % It is available from http://www.ctan.org/tex-archive/fonts/eurosym. % % Although only regular is the truly official Euro symbol, we ignore % that. The Euro is designed to be slightly taller than the regular % font height. % % feymr - regular % feymo - slanted % feybr - bold % feybo - bold slanted % % There is no good (free) typewriter version, to my knowledge. % A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide. % Hmm. % % Also doesn't work in math. Do we need to do math with euro symbols? % Hope not. % % \def\euro{{\eurofont e}} \def\eurofont{% % We set the font at each command, rather than predefining it in % \textfonts and the other font-switching commands, so that % installations which never need the symbol don't have to have the % font installed. % % There is only one designed size (nominal 10pt), so we always scale % that to the current nominal size. % % By the way, simply using "at 1em" works for cmr10 and the like, but % does not work for cmbx10 and other extended/shrunken fonts. % \def\eurosize{\csname\curfontsize nominalsize\endcsname}% % \ifx\curfontstyle\bfstylename % bold: \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize \else % regular: \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize \fi \thiseurofont } % Glyphs from the EC fonts. We don't use \let for the aliases, because % sometimes we redefine the original macro, and the alias should reflect % the redefinition. % % Use LaTeX names for the Icelandic letters. \def\DH{{\ecfont \char"D0}} % Eth \def\dh{{\ecfont \char"F0}} % eth \def\TH{{\ecfont \char"DE}} % Thorn \def\th{{\ecfont \char"FE}} % thorn % \def\guillemetleft{{\ecfont \char"13}} \def\guillemotleft{\guillemetleft} \def\guillemetright{{\ecfont \char"14}} \def\guillemotright{\guillemetright} \def\guilsinglleft{{\ecfont \char"0E}} \def\guilsinglright{{\ecfont \char"0F}} \def\quotedblbase{{\ecfont \char"12}} \def\quotesinglbase{{\ecfont \char"0D}} % % This positioning is not perfect (see the ogonek LaTeX package), but % we have the precomposed glyphs for the most common cases. We put the % tests to use those glyphs in the single \ogonek macro so we have fewer % dummy definitions to worry about for index entries, etc. % % ogonek is also used with other letters in Lithuanian (IOU), but using % the precomposed glyphs for those is not so easy since they aren't in % the same EC font. \def\ogonek#1{{% \def\temp{#1}% \ifx\temp\macrocharA\Aogonek \else\ifx\temp\macrochara\aogonek \else\ifx\temp\macrocharE\Eogonek \else\ifx\temp\macrochare\eogonek \else \ecfont \setbox0=\hbox{#1}% \ifdim\ht0=1ex\accent"0C #1% \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}% \fi \fi\fi\fi\fi }% } \def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A} \def\aogonek{{\ecfont \char"A1}}\def\macrochara{a} \def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E} \def\eogonek{{\ecfont \char"A6}}\def\macrochare{e} % % Use the ec* fonts (cm-super in outline format) for non-CM glyphs. \def\ecfont{% % We can't distinguish serif/sans and italic/slanted, but this % is used for crude hacks anyway (like adding French and German % quotes to documents typeset with CM, where we lose kerning), so % hopefully nobody will notice/care. \edef\ecsize{\csname\curfontsize ecsize\endcsname}% \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% \ifx\curfontstyle\bfstylename % bold: \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize \else % regular: \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize \fi \thisecfont } % @registeredsymbol - R in a circle. The font for the R should really % be smaller yet, but lllsize is the best we can do for now. % Adapted from the plain.tex definition of \copyright. % \def\registeredsymbol{% $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}% \hfil\crcr\Orb}}% }$% } % @textdegree - the normal degrees sign. % \def\textdegree{$^\circ$} % Laurent Siebenmann reports \Orb undefined with: % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 % so we'll define it if necessary. % \ifx\Orb\undefined \def\Orb{\mathhexbox20D} \fi % Quotes. \chardef\quotedblleft="5C \chardef\quotedblright=`\" \chardef\quoteleft=`\` \chardef\quoteright=`\' \message{page headings,} \newskip\titlepagetopglue \titlepagetopglue = 1.5in \newskip\titlepagebottomglue \titlepagebottomglue = 2pc % First the title page. Must do @settitle before @titlepage. \newif\ifseenauthor \newif\iffinishedtitlepage % Do an implicit @contents or @shortcontents after @end titlepage if the % user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage. % \newif\ifsetcontentsaftertitlepage \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue \newif\ifsetshortcontentsaftertitlepage \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue \parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% \endgroup\page\hbox{}\page} \envdef\titlepage{% % Open one extra group, as we want to close it in the middle of \Etitlepage. \begingroup \parindent=0pt \textfonts % Leave some space at the very top of the page. \vglue\titlepagetopglue % No rule at page bottom unless we print one at the top with @title. \finishedtitlepagetrue % % Most title ``pages'' are actually two pages long, with space % at the top of the second. We don't want the ragged left on the second. \let\oldpage = \page \def\page{% \iffinishedtitlepage\else \finishtitlepage \fi \let\page = \oldpage \page \null }% } \def\Etitlepage{% \iffinishedtitlepage\else \finishtitlepage \fi % It is important to do the page break before ending the group, % because the headline and footline are only empty inside the group. % If we use the new definition of \page, we always get a blank page % after the title page, which we certainly don't want. \oldpage \endgroup % % Need this before the \...aftertitlepage checks so that if they are % in effect the toc pages will come out with page numbers. \HEADINGSon % % If they want short, they certainly want long too. \ifsetshortcontentsaftertitlepage \shortcontents \contents \global\let\shortcontents = \relax \global\let\contents = \relax \fi % \ifsetcontentsaftertitlepage \contents \global\let\contents = \relax \global\let\shortcontents = \relax \fi } \def\finishtitlepage{% \vskip4pt \hrule height 2pt width \hsize \vskip\titlepagebottomglue \finishedtitlepagetrue } %%% Macros to be used within @titlepage: \let\subtitlerm=\tenrm \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} \parseargdef\title{% \checkenv\titlepage \leftline{\titlefonts\rmisbold #1} % print a rule at the page bottom also. \finishedtitlepagefalse \vskip4pt \hrule height 4pt width \hsize \vskip4pt } \parseargdef\subtitle{% \checkenv\titlepage {\subtitlefont \rightline{#1}}% } % @author should come last, but may come many times. % It can also be used inside @quotation. % \parseargdef\author{% \def\temp{\quotation}% \ifx\thisenv\temp \def\quotationauthor{#1}% printed in \Equotation. \else \checkenv\titlepage \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi {\secfonts\rmisbold \leftline{#1}}% \fi } %%% Set up page headings and footings. \let\thispage=\folio \newtoks\evenheadline % headline on even pages \newtoks\oddheadline % headline on odd pages \newtoks\evenfootline % footline on even pages \newtoks\oddfootline % footline on odd pages % Now make TeX use those variables \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline \else \the\evenheadline \fi}} \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline \else \the\evenfootline \fi}\HEADINGShook} \let\HEADINGShook=\relax % Commands to set those variables. % For example, this is what @headings on does % @evenheading @thistitle|@thispage|@thischapter % @oddheading @thischapter|@thispage|@thistitle % @evenfooting @thisfile|| % @oddfooting ||@thisfile \def\evenheading{\parsearg\evenheadingxxx} \def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish} \def\evenheadingyyy #1\|#2\|#3\|#4\finish{% \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \def\oddheading{\parsearg\oddheadingxxx} \def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish} \def\oddheadingyyy #1\|#2\|#3\|#4\finish{% \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}% \def\evenfooting{\parsearg\evenfootingxxx} \def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish} \def\evenfootingyyy #1\|#2\|#3\|#4\finish{% \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \def\oddfooting{\parsearg\oddfootingxxx} \def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish} \def\oddfootingyyy #1\|#2\|#3\|#4\finish{% \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% % % Leave some space for the footline. Hopefully ok to assume % @evenfooting will not be used by itself. \global\advance\pageheight by -12pt \global\advance\vsize by -12pt } \parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}} % @evenheadingmarks top \thischapter <- chapter at the top of a page % @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page % % The same set of arguments for: % % @oddheadingmarks % @evenfootingmarks % @oddfootingmarks % @everyheadingmarks % @everyfootingmarks \def\evenheadingmarks{\headingmarks{even}{heading}} \def\oddheadingmarks{\headingmarks{odd}{heading}} \def\evenfootingmarks{\headingmarks{even}{footing}} \def\oddfootingmarks{\headingmarks{odd}{footing}} \def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1} \headingmarks{odd}{heading}{#1} } \def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1} \headingmarks{odd}{footing}{#1} } % #1 = even/odd, #2 = heading/footing, #3 = top/bottom. \def\headingmarks#1#2#3 {% \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname \global\expandafter\let\csname get#1#2marks\endcsname \temp } \everyheadingmarks bottom \everyfootingmarks bottom % @headings double turns headings on for double-sided printing. % @headings single turns headings on for single-sided printing. % @headings off turns them off. % @headings on same as @headings double, retained for compatibility. % @headings after turns on double-sided headings after this page. % @headings doubleafter turns on double-sided headings after this page. % @headings singleafter turns on single-sided headings after this page. % By default, they are off at the start of a document, % and turned `on' after @end titlepage. \def\headings #1 {\csname HEADINGS#1\endcsname} \def\HEADINGSoff{% \global\evenheadline={\hfil} \global\evenfootline={\hfil} \global\oddheadline={\hfil} \global\oddfootline={\hfil}} \HEADINGSoff % When we turn headings on, set the page number to 1. % For double-sided printing, put current file name in lower left corner, % chapter name on inside top of right hand pages, document % title on inside top of left hand pages, and page numbers on outside top % edge of all pages. \def\HEADINGSdouble{% \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \let\contentsalignmacro = \chappager % For single-sided printing, chapter title goes across top left of page, % page number on top right. \def\HEADINGSsingle{% \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } \def\HEADINGSon{\HEADINGSdouble} \def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex} \let\HEADINGSdoubleafter=\HEADINGSafter \def\HEADINGSdoublex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex} \def\HEADINGSsinglex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } % Subroutines used in generating headings % This produces Day Month Year style of output. % Only define if not already defined, in case a txi-??.tex file has set % up a different format (e.g., txi-cs.tex does this). \ifx\today\undefined \def\today{% \number\day\space \ifcase\month \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec \fi \space\number\year} \fi % @settitle line... specifies the title of the document, for headings. % It generates no output of its own. \def\thistitle{\putwordNoTitle} \def\settitle{\parsearg{\gdef\thistitle}} \message{tables,} % Tables -- @table, @ftable, @vtable, @item(x). % default indentation of table text \newdimen\tableindent \tableindent=.8in % default indentation of @itemize and @enumerate text \newdimen\itemindent \itemindent=.3in % margin between end of table item and start of table text. \newdimen\itemmargin \itemmargin=.1in % used internally for \itemindent minus \itemmargin \newdimen\itemmax % Note @table, @ftable, and @vtable define @item, @itemx, etc., with % these defs. % They also define \itemindex % to index the item name in whatever manner is desired (perhaps none). \newif\ifitemxneedsnegativevskip \def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi} \def\internalBitem{\smallbreak \parsearg\itemzzz} \def\internalBitemx{\itemxpar \parsearg\itemzzz} \def\itemzzz #1{\begingroup % \advance\hsize by -\rightskip \advance\hsize by -\tableindent \setbox0=\hbox{\itemindicate{#1}}% \itemindex{#1}% \nobreak % This prevents a break before @itemx. % % If the item text does not fit in the space we have, put it on a line % by itself, and do not allow a page break either before or after that % line. We do not start a paragraph here because then if the next % command is, e.g., @kindex, the whatsit would get put into the % horizontal list on a line by itself, resulting in extra blank space. \ifdim \wd0>\itemmax % % Make this a paragraph so we get the \parskip glue and wrapping, % but leave it ragged-right. \begingroup \advance\leftskip by-\tableindent \advance\hsize by\tableindent \advance\rightskip by0pt plus1fil \leavevmode\unhbox0\par \endgroup % % We're going to be starting a paragraph, but we don't want the % \parskip glue -- logically it's part of the @item we just started. \nobreak \vskip-\parskip % % Stop a page break at the \parskip glue coming up. However, if % what follows is an environment such as @example, there will be no % \parskip glue; then the negative vskip we just inserted would % cause the example and the item to crash together. So we use this % bizarre value of 10001 as a signal to \aboveenvbreak to insert % \parskip glue after all. Section titles are handled this way also. % \penalty 10001 \endgroup \itemxneedsnegativevskipfalse \else % The item text fits into the space. Start a paragraph, so that the % following text (if any) will end up on the same line. \noindent % Do this with kerns and \unhbox so that if there is a footnote in % the item text, it can migrate to the main vertical list and % eventually be printed. \nobreak\kern-\tableindent \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0 \unhbox0 \nobreak\kern\dimen0 \endgroup \itemxneedsnegativevskiptrue \fi } \def\item{\errmessage{@item while not in a list environment}} \def\itemx{\errmessage{@itemx while not in a list environment}} % @table, @ftable, @vtable. \envdef\table{% \let\itemindex\gobble \tablecheck{table}% } \envdef\ftable{% \def\itemindex ##1{\doind {fn}{\code{##1}}}% \tablecheck{ftable}% } \envdef\vtable{% \def\itemindex ##1{\doind {vr}{\code{##1}}}% \tablecheck{vtable}% } \def\tablecheck#1{% \ifnum \the\catcode`\^^M=\active \endgroup \errmessage{This command won't work in this context; perhaps the problem is that we are \inenvironment\thisenv}% \def\next{\doignore{#1}}% \else \let\next\tablex \fi \next } \def\tablex#1{% \def\itemindicate{#1}% \parsearg\tabley } \def\tabley#1{% {% \makevalueexpandable \edef\temp{\noexpand\tablez #1\space\space\space}% \expandafter }\temp \endtablez } \def\tablez #1 #2 #3 #4\endtablez{% \aboveenvbreak \ifnum 0#1>0 \advance \leftskip by #1\mil \fi \ifnum 0#2>0 \tableindent=#2\mil \fi \ifnum 0#3>0 \advance \rightskip by #3\mil \fi \itemmax=\tableindent \advance \itemmax by -\itemmargin \advance \leftskip by \tableindent \exdentamount=\tableindent \parindent = 0pt \parskip = \smallskipamount \ifdim \parskip=0pt \parskip=2pt \fi \let\item = \internalBitem \let\itemx = \internalBitemx } \def\Etable{\endgraf\afterenvbreak} \let\Eftable\Etable \let\Evtable\Etable \let\Eitemize\Etable \let\Eenumerate\Etable % This is the counter used by @enumerate, which is really @itemize \newcount \itemno \envdef\itemize{\parsearg\doitemize} \def\doitemize#1{% \aboveenvbreak \itemmax=\itemindent \advance\itemmax by -\itemmargin \advance\leftskip by \itemindent \exdentamount=\itemindent \parindent=0pt \parskip=\smallskipamount \ifdim\parskip=0pt \parskip=2pt \fi % % Try typesetting the item mark that if the document erroneously says % something like @itemize @samp (intending @table), there's an error % right away at the @itemize. It's not the best error message in the % world, but it's better than leaving it to the @item. This means if % the user wants an empty mark, they have to say @w{} not just @w. \def\itemcontents{#1}% \setbox0 = \hbox{\itemcontents}% % % @itemize with no arg is equivalent to @itemize @bullet. \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi % \let\item=\itemizeitem } % Definition of @item while inside @itemize and @enumerate. % \def\itemizeitem{% \advance\itemno by 1 % for enumerations {\let\par=\endgraf \smallbreak}% reasonable place to break {% % If the document has an @itemize directly after a section title, a % \nobreak will be last on the list, and \sectionheading will have % done a \vskip-\parskip. In that case, we don't want to zero % parskip, or the item text will crash with the heading. On the % other hand, when there is normal text preceding the item (as there % usually is), we do want to zero parskip, or there would be too much % space. In that case, we won't have a \nobreak before. At least % that's the theory. \ifnum\lastpenalty<10000 \parskip=0in \fi \noindent \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% % \vadjust{\penalty 1200}}% not good to break after first line of item. \flushcr } % \splitoff TOKENS\endmark defines \first to be the first token in % TOKENS, and \rest to be the remainder. % \def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}% % Allow an optional argument of an uppercase letter, lowercase letter, % or number, to specify the first label in the enumerated list. No % argument is the same as `1'. % \envparseargdef\enumerate{\enumeratey #1 \endenumeratey} \def\enumeratey #1 #2\endenumeratey{% % If we were given no argument, pretend we were given `1'. \def\thearg{#1}% \ifx\thearg\empty \def\thearg{1}\fi % % Detect if the argument is a single token. If so, it might be a % letter. Otherwise, the only valid thing it can be is a number. % (We will always have one token, because of the test we just made. % This is a good thing, since \splitoff doesn't work given nothing at % all -- the first parameter is undelimited.) \expandafter\splitoff\thearg\endmark \ifx\rest\empty % Only one token in the argument. It could still be anything. % A ``lowercase letter'' is one whose \lccode is nonzero. % An ``uppercase letter'' is one whose \lccode is both nonzero, and % not equal to itself. % Otherwise, we assume it's a number. % % We need the \relax at the end of the \ifnum lines to stop TeX from % continuing to look for a . % \ifnum\lccode\expandafter`\thearg=0\relax \numericenumerate % a number (we hope) \else % It's a letter. \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax \lowercaseenumerate % lowercase letter \else \uppercaseenumerate % uppercase letter \fi \fi \else % Multiple tokens in the argument. We hope it's a number. \numericenumerate \fi } % An @enumerate whose labels are integers. The starting integer is % given in \thearg. % \def\numericenumerate{% \itemno = \thearg \startenumeration{\the\itemno}% } % The starting (lowercase) letter is in \thearg. \def\lowercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more lowercase letters in @enumerate; get a bigger alphabet}% \fi \char\lccode\itemno }% } % The starting (uppercase) letter is in \thearg. \def\uppercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more uppercase letters in @enumerate; get a bigger alphabet} \fi \char\uccode\itemno }% } % Call \doitemize, adding a period to the first argument and supplying the % common last two arguments. Also subtract one from the initial value in % \itemno, since @item increments \itemno. % \def\startenumeration#1{% \advance\itemno by -1 \doitemize{#1.}\flushcr } % @alphaenumerate and @capsenumerate are abbreviations for giving an arg % to @enumerate. % \def\alphaenumerate{\enumerate{a}} \def\capsenumerate{\enumerate{A}} \def\Ealphaenumerate{\Eenumerate} \def\Ecapsenumerate{\Eenumerate} % @multitable macros % Amy Hendrickson, 8/18/94, 3/6/96 % % @multitable ... @end multitable will make as many columns as desired. % Contents of each column will wrap at width given in preamble. Width % can be specified either with sample text given in a template line, % or in percent of \hsize, the current width of text on page. % Table can continue over pages but will only break between lines. % To make preamble: % % Either define widths of columns in terms of percent of \hsize: % @multitable @columnfractions .25 .3 .45 % @item ... % % Numbers following @columnfractions are the percent of the total % current hsize to be used for each column. You may use as many % columns as desired. % Or use a template: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item ... % using the widest term desired in each column. % Each new table line starts with @item, each subsequent new column % starts with @tab. Empty columns may be produced by supplying @tab's % with nothing between them for as many times as empty columns are needed, % ie, @tab@tab@tab will produce two empty columns. % @item, @tab do not need to be on their own lines, but it will not hurt % if they are. % Sample multitable: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item first col stuff @tab second col stuff @tab third col % @item % first col stuff % @tab % second col stuff % @tab % third col % @item first col stuff @tab second col stuff % @tab Many paragraphs of text may be used in any column. % % They will wrap at the width determined by the template. % @item@tab@tab This will be in third column. % @end multitable % Default dimensions may be reset by user. % @multitableparskip is vertical space between paragraphs in table. % @multitableparindent is paragraph indent in table. % @multitablecolmargin is horizontal space to be left between columns. % @multitablelinespace is space to leave between table items, baseline % to baseline. % 0pt means it depends on current normal line spacing. % \newskip\multitableparskip \newskip\multitableparindent \newdimen\multitablecolspace \newskip\multitablelinespace \multitableparskip=0pt \multitableparindent=6pt \multitablecolspace=12pt \multitablelinespace=0pt % Macros used to set up halign preamble: % \let\endsetuptable\relax \def\xendsetuptable{\endsetuptable} \let\columnfractions\relax \def\xcolumnfractions{\columnfractions} \newif\ifsetpercent % #1 is the @columnfraction, usually a decimal number like .5, but might % be just 1. We just use it, whatever it is. % \def\pickupwholefraction#1 {% \global\advance\colcount by 1 \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}% \setuptable } \newcount\colcount \def\setuptable#1{% \def\firstarg{#1}% \ifx\firstarg\xendsetuptable \let\go = \relax \else \ifx\firstarg\xcolumnfractions \global\setpercenttrue \else \ifsetpercent \let\go\pickupwholefraction \else \global\advance\colcount by 1 \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a % separator; typically that is always in the input, anyway. \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% \fi \fi \ifx\go\pickupwholefraction % Put the argument back for the \pickupwholefraction call, so % we'll always have a period there to be parsed. \def\go{\pickupwholefraction#1}% \else \let\go = \setuptable \fi% \fi \go } % multitable-only commands. % % @headitem starts a heading row, which we typeset in bold. % Assignments have to be global since we are inside the implicit group % of an alignment entry. \everycr resets \everytab so we don't have to % undo it ourselves. \def\headitemfont{\b}% for people to use in the template row; not changeable \def\headitem{% \checkenv\multitable \crcr \global\everytab={\bf}% can't use \headitemfont since the parsing differs \the\everytab % for the first item }% % % A \tab used to include \hskip1sp. But then the space in a template % line is not enough. That is bad. So let's go back to just `&' until % we again encounter the problem the 1sp was intended to solve. % --karl, nathan@acm.org, 20apr99. \def\tab{\checkenv\multitable &\the\everytab}% % @multitable ... @end multitable definitions: % \newtoks\everytab % insert after every tab. % \envdef\multitable{% \vskip\parskip \startsavinginserts % % @item within a multitable starts a normal row. % We use \def instead of \let so that if one of the multitable entries % contains an @itemize, we don't choke on the \item (seen as \crcr aka % \endtemplate) expanding \doitemize. \def\item{\crcr}% % \tolerance=9500 \hbadness=9500 \setmultitablespacing \parskip=\multitableparskip \parindent=\multitableparindent \overfullrule=0pt \global\colcount=0 % \everycr = {% \noalign{% \global\everytab={}% \global\colcount=0 % Reset the column counter. % Check for saved footnotes, etc. \checkinserts % Keeps underfull box messages off when table breaks over pages. %\filbreak % Maybe so, but it also creates really weird page breaks when the % table breaks over pages. Wouldn't \vfil be better? Wait until the % problem manifests itself, so it can be fixed for real --karl. }% }% % \parsearg\domultitable } \def\domultitable#1{% % To parse everything between @multitable and @item: \setuptable#1 \endsetuptable % % This preamble sets up a generic column definition, which will % be used as many times as user calls for columns. % \vtop will set a single line and will also let text wrap and % continue for many paragraphs if desired. \halign\bgroup &% \global\advance\colcount by 1 \multistrut \vtop{% % Use the current \colcount to find the correct column width: \hsize=\expandafter\csname col\the\colcount\endcsname % % In order to keep entries from bumping into each other % we will add a \leftskip of \multitablecolspace to all columns after % the first one. % % If a template has been used, we will add \multitablecolspace % to the width of each template entry. % % If the user has set preamble in terms of percent of \hsize we will % use that dimension as the width of the column, and the \leftskip % will keep entries from bumping into each other. Table will start at % left margin and final column will justify at right margin. % % Make sure we don't inherit \rightskip from the outer environment. \rightskip=0pt \ifnum\colcount=1 % The first column will be indented with the surrounding text. \advance\hsize by\leftskip \else \ifsetpercent \else % If user has not set preamble in terms of percent of \hsize % we will advance \hsize by \multitablecolspace. \advance\hsize by \multitablecolspace \fi % In either case we will make \leftskip=\multitablecolspace: \leftskip=\multitablecolspace \fi % Ignoring space at the beginning and end avoids an occasional spurious % blank line, when TeX decides to break the line at the space before the % box from the multistrut, so the strut ends up on a line by itself. % For example: % @multitable @columnfractions .11 .89 % @item @code{#} % @tab Legal holiday which is valid in major parts of the whole country. % Is automatically provided with highlighting sequences respectively % marking characters. \noindent\ignorespaces##\unskip\multistrut }\cr } \def\Emultitable{% \crcr \egroup % end the \halign \global\setpercentfalse } \def\setmultitablespacing{% \def\multistrut{\strut}% just use the standard line spacing % % Compute \multitablelinespace (if not defined by user) for use in % \multitableparskip calculation. We used define \multistrut based on % this, but (ironically) that caused the spacing to be off. % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100. \ifdim\multitablelinespace=0pt \setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip \global\advance\multitablelinespace by-\ht0 \fi %% Test to see if parskip is larger than space between lines of %% table. If not, do nothing. %% If so, set to same dimension as multitablelinespace. \ifdim\multitableparskip>\multitablelinespace \global\multitableparskip=\multitablelinespace \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller %% than skip between lines in the table. \fi% \ifdim\multitableparskip=0pt \global\multitableparskip=\multitablelinespace \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller %% than skip between lines in the table. \fi} \message{conditionals,} % @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext, % @ifnotxml always succeed. They currently do nothing; we don't % attempt to check whether the conditionals are properly nested. But we % have to remember that they are conditionals, so that @end doesn't % attempt to close an environment group. % \def\makecond#1{% \expandafter\let\csname #1\endcsname = \relax \expandafter\let\csname iscond.#1\endcsname = 1 } \makecond{iftex} \makecond{ifnotdocbook} \makecond{ifnothtml} \makecond{ifnotinfo} \makecond{ifnotplaintext} \makecond{ifnotxml} % Ignore @ignore, @ifhtml, @ifinfo, and the like. % \def\direntry{\doignore{direntry}} \def\documentdescription{\doignore{documentdescription}} \def\docbook{\doignore{docbook}} \def\html{\doignore{html}} \def\ifdocbook{\doignore{ifdocbook}} \def\ifhtml{\doignore{ifhtml}} \def\ifinfo{\doignore{ifinfo}} \def\ifnottex{\doignore{ifnottex}} \def\ifplaintext{\doignore{ifplaintext}} \def\ifxml{\doignore{ifxml}} \def\ignore{\doignore{ignore}} \def\menu{\doignore{menu}} \def\xml{\doignore{xml}} % Ignore text until a line `@end #1', keeping track of nested conditionals. % % A count to remember the depth of nesting. \newcount\doignorecount \def\doignore#1{\begingroup % Scan in ``verbatim'' mode: \obeylines \catcode`\@ = \other \catcode`\{ = \other \catcode`\} = \other % % Make sure that spaces turn into tokens that match what \doignoretext wants. \spaceisspace % % Count number of #1's that we've seen. \doignorecount = 0 % % Swallow text until we reach the matching `@end #1'. \dodoignore{#1}% } { \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source. \obeylines % % \gdef\dodoignore#1{% % #1 contains the command name as a string, e.g., `ifinfo'. % % Define a command to find the next `@end #1'. \long\def\doignoretext##1^^M@end #1{% \doignoretextyyy##1^^M@#1\_STOP_}% % % And this command to find another #1 command, at the beginning of a % line. (Otherwise, we would consider a line `@c @ifset', for % example, to count as an @ifset for nesting.) \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}% % % And now expand that command. \doignoretext ^^M% }% } \def\doignoreyyy#1{% \def\temp{#1}% \ifx\temp\empty % Nothing found. \let\next\doignoretextzzz \else % Found a nested condition, ... \advance\doignorecount by 1 \let\next\doignoretextyyy % ..., look for another. % If we're here, #1 ends with ^^M\ifinfo (for example). \fi \next #1% the token \_STOP_ is present just after this macro. } % We have to swallow the remaining "\_STOP_". % \def\doignoretextzzz#1{% \ifnum\doignorecount = 0 % We have just found the outermost @end. \let\next\enddoignore \else % Still inside a nested condition. \advance\doignorecount by -1 \let\next\doignoretext % Look for the next @end. \fi \next } % Finish off ignored text. { \obeylines% % Ignore anything after the last `@end #1'; this matters in verbatim % environments, where otherwise the newline after an ignored conditional % would result in a blank line in the output. \gdef\enddoignore#1^^M{\endgroup\ignorespaces}% } % @set VAR sets the variable VAR to an empty value. % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. % % Since we want to separate VAR from REST-OF-LINE (which might be % empty), we can't just use \parsearg; we have to insert a space of our % own to delimit the rest of the line, and then take it out again if we % didn't need it. % We rely on the fact that \parsearg sets \catcode`\ =10. % \parseargdef\set{\setyyy#1 \endsetyyy} \def\setyyy#1 #2\endsetyyy{% {% \makevalueexpandable \def\temp{#2}% \edef\next{\gdef\makecsname{SET#1}}% \ifx\temp\empty \next{}% \else \setzzz#2\endsetzzz \fi }% } % Remove the trailing space \setxxx inserted. \def\setzzz#1 \endsetzzz{\next{#1}} % @clear VAR clears (i.e., unsets) the variable VAR. % \parseargdef\clear{% {% \makevalueexpandable \global\expandafter\let\csname SET#1\endcsname=\relax }% } % @value{foo} gets the text saved in variable foo. \def\value{\begingroup\makevalueexpandable\valuexxx} \def\valuexxx#1{\expandablevalue{#1}\endgroup} { \catcode`\- = \active \catcode`\_ = \active % \gdef\makevalueexpandable{% \let\value = \expandablevalue % We don't want these characters active, ... \catcode`\-=\other \catcode`\_=\other % ..., but we might end up with active ones in the argument if % we're called from @code, as @code{@value{foo-bar_}}, though. % So \let them to their normal equivalents. \let-\realdash \let_\normalunderscore } } % We have this subroutine so that we can handle at least some @value's % properly in indexes (we call \makevalueexpandable in \indexdummies). % The command has to be fully expandable (if the variable is set), since % the result winds up in the index file. This means that if the % variable's value contains other Texinfo commands, it's almost certain % it will fail (although perhaps we could fix that with sufficient work % to do a one-level expansion on the result, instead of complete). % \def\expandablevalue#1{% \expandafter\ifx\csname SET#1\endcsname\relax {[No value for ``#1'']}% \message{Variable `#1', used in @value, is not set.}% \else \csname SET#1\endcsname \fi } % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined % with @set. % % To get special treatment of `@end ifset,' call \makeond and the redefine. % \makecond{ifset} \def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}} \def\doifset#1#2{% {% \makevalueexpandable \let\next=\empty \expandafter\ifx\csname SET#2\endcsname\relax #1% If not set, redefine \next. \fi \expandafter }\next } \def\ifsetfail{\doignore{ifset}} % @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been % defined with @set, or has been undefined with @clear. % % The `\else' inside the `\doifset' parameter is a trick to reuse the % above code: if the variable is not set, do nothing, if it is set, % then redefine \next to \ifclearfail. % \makecond{ifclear} \def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}} \def\ifclearfail{\doignore{ifclear}} % @dircategory CATEGORY -- specify a category of the dir file % which this file should belong to. Ignore this in TeX. \let\dircategory=\comment % @defininfoenclose. \let\definfoenclose=\comment \message{indexing,} % Index generation facilities % Define \newwrite to be identical to plain tex's \newwrite % except not \outer, so it can be used within macros and \if's. \edef\newwrite{\makecsname{ptexnewwrite}} % \newindex {foo} defines an index named foo. % It automatically defines \fooindex such that % \fooindex ...rest of line... puts an entry in the index foo. % It also defines \fooindfile to be the number of the output channel for % the file that accumulates this index. The file's extension is foo. % The name of an index should be no more than 2 characters long % for the sake of vms. % \def\newindex#1{% \iflinks \expandafter\newwrite \csname#1indfile\endcsname \openout \csname#1indfile\endcsname \jobname.#1 % Open the file \fi \expandafter\xdef\csname#1index\endcsname{% % Define @#1index \noexpand\doindex{#1}} } % @defindex foo == \newindex{foo} % \def\defindex{\parsearg\newindex} % Define @defcodeindex, like @defindex except put all entries in @code. % \def\defcodeindex{\parsearg\newcodeindex} % \def\newcodeindex#1{% \iflinks \expandafter\newwrite \csname#1indfile\endcsname \openout \csname#1indfile\endcsname \jobname.#1 \fi \expandafter\xdef\csname#1index\endcsname{% \noexpand\docodeindex{#1}}% } % @synindex foo bar makes index foo feed into index bar. % Do this instead of @defindex foo if you don't want it as a separate index. % % @syncodeindex foo bar similar, but put all entries made for index foo % inside @code. % \def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}} \def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}} % #1 is \doindex or \docodeindex, #2 the index getting redefined (foo), % #3 the target index (bar). \def\dosynindex#1#2#3{% % Only do \closeout if we haven't already done it, else we'll end up % closing the target index. \expandafter \ifx\csname donesynindex#2\endcsname \relax % The \closeout helps reduce unnecessary open files; the limit on the % Acorn RISC OS is a mere 16 files. \expandafter\closeout\csname#2indfile\endcsname \expandafter\let\csname donesynindex#2\endcsname = 1 \fi % redefine \fooindfile: \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname \expandafter\let\csname#2indfile\endcsname=\temp % redefine \fooindex: \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% } % Define \doindex, the driver for all \fooindex macros. % Argument #1 is generated by the calling \fooindex macro, % and it is "foo", the name of the index. % \doindex just uses \parsearg; it calls \doind for the actual work. % This is because \doind is more useful to call from other macros. % There is also \dosubind {index}{topic}{subtopic} % which makes an entry in a two-level index such as the operation index. \def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer} \def\singleindexer #1{\doind{\indexname}{#1}} % like the previous two, but they put @code around the argument. \def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} % Take care of Texinfo commands that can appear in an index entry. % Since there are some commands we want to expand, and others we don't, % we have to laboriously prevent expansion for those that we don't. % \def\indexdummies{% \escapechar = `\\ % use backslash in output files. \def\@{@}% change to @@ when we switch to @ as escape char in index files. \def\ {\realbackslash\space }% % % Need these in case \tex is in effect and \{ is a \delimiter again. % But can't use \lbracecmd and \rbracecmd because texindex assumes % braces and backslashes are used only as delimiters. \let\{ = \mylbrace \let\} = \myrbrace % % I don't entirely understand this, but when an index entry is % generated from a macro call, the \endinput which \scanmacro inserts % causes processing to be prematurely terminated. This is, % apparently, because \indexsorttmp is fully expanded, and \endinput % is an expandable command. The redefinition below makes \endinput % disappear altogether for that purpose -- although logging shows that % processing continues to some further point. On the other hand, it % seems \endinput does not hurt in the printed index arg, since that % is still getting written without apparent harm. % % Sample source (mac-idx3.tex, reported by Graham Percival to % help-texinfo, 22may06): % @macro funindex {WORD} % @findex xyz % @end macro % ... % @funindex commtest % % The above is not enough to reproduce the bug, but it gives the flavor. % % Sample whatsit resulting: % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} % % So: \let\endinput = \empty % % Do the redefinitions. \commondummies } % For the aux and toc files, @ is the escape character. So we want to % redefine everything using @ as the escape character (instead of % \realbackslash, still used for index files). When everything uses @, % this will be simpler. % \def\atdummies{% \def\@{@@}% \def\ {@ }% \let\{ = \lbraceatcmd \let\} = \rbraceatcmd % % Do the redefinitions. \commondummies \otherbackslash } % Called from \indexdummies and \atdummies. % \def\commondummies{% % % \definedummyword defines \#1 as \string\#1\space, thus effectively % preventing its expansion. This is used only for control% words, % not control letters, because the \space would be incorrect for % control characters, but is needed to separate the control word % from whatever follows. % % For control letters, we have \definedummyletter, which omits the % space. % % These can be used both for control words that take an argument and % those that do not. If it is followed by {arg} in the input, then % that will dutifully get written to the index (or wherever). % \def\definedummyword ##1{\def##1{\string##1\space}}% \def\definedummyletter##1{\def##1{\string##1}}% \let\definedummyaccent\definedummyletter % \commondummiesnofonts % \definedummyletter\_% % % Non-English letters. \definedummyword\AA \definedummyword\AE \definedummyword\DH \definedummyword\L \definedummyword\O \definedummyword\OE \definedummyword\TH \definedummyword\aa \definedummyword\ae \definedummyword\dh \definedummyword\exclamdown \definedummyword\l \definedummyword\o \definedummyword\oe \definedummyword\ordf \definedummyword\ordm \definedummyword\questiondown \definedummyword\ss \definedummyword\th % % Although these internal commands shouldn't show up, sometimes they do. \definedummyword\bf \definedummyword\gtr \definedummyword\hat \definedummyword\less \definedummyword\sf \definedummyword\sl \definedummyword\tclose \definedummyword\tt % \definedummyword\LaTeX \definedummyword\TeX % % Assorted special characters. \definedummyword\bullet \definedummyword\comma \definedummyword\copyright \definedummyword\registeredsymbol \definedummyword\dots \definedummyword\enddots \definedummyword\equiv \definedummyword\error \definedummyword\euro \definedummyword\guillemetleft \definedummyword\guillemetright \definedummyword\guilsinglleft \definedummyword\guilsinglright \definedummyword\expansion \definedummyword\minus \definedummyword\ogonek \definedummyword\pounds \definedummyword\point \definedummyword\print \definedummyword\quotedblbase \definedummyword\quotedblleft \definedummyword\quotedblright \definedummyword\quoteleft \definedummyword\quoteright \definedummyword\quotesinglbase \definedummyword\result \definedummyword\textdegree % % We want to disable all macros so that they are not expanded by \write. \macrolist % \normalturnoffactive % % Handle some cases of @value -- where it does not contain any % (non-fully-expandable) commands. \makevalueexpandable } % \commondummiesnofonts: common to \commondummies and \indexnofonts. % \def\commondummiesnofonts{% % Control letters and accents. \definedummyletter\!% \definedummyaccent\"% \definedummyaccent\'% \definedummyletter\*% \definedummyaccent\,% \definedummyletter\.% \definedummyletter\/% \definedummyletter\:% \definedummyaccent\=% \definedummyletter\?% \definedummyaccent\^% \definedummyaccent\`% \definedummyaccent\~% \definedummyword\u \definedummyword\v \definedummyword\H \definedummyword\dotaccent \definedummyword\ogonek \definedummyword\ringaccent \definedummyword\tieaccent \definedummyword\ubaraccent \definedummyword\udotaccent \definedummyword\dotless % % Texinfo font commands. \definedummyword\b \definedummyword\i \definedummyword\r \definedummyword\sc \definedummyword\t % % Commands that take arguments. \definedummyword\acronym \definedummyword\cite \definedummyword\code \definedummyword\command \definedummyword\dfn \definedummyword\email \definedummyword\emph \definedummyword\env \definedummyword\file \definedummyword\kbd \definedummyword\key \definedummyword\math \definedummyword\option \definedummyword\pxref \definedummyword\ref \definedummyword\samp \definedummyword\strong \definedummyword\tie \definedummyword\uref \definedummyword\url \definedummyword\var \definedummyword\verb \definedummyword\w \definedummyword\xref } % \indexnofonts is used when outputting the strings to sort the index % by, and when constructing control sequence names. It eliminates all % control sequences and just writes whatever the best ASCII sort string % would be for a given command (usually its argument). % \def\indexnofonts{% % Accent commands should become @asis. \def\definedummyaccent##1{\let##1\asis}% % We can just ignore other control letters. \def\definedummyletter##1{\let##1\empty}% % Hopefully, all control words can become @asis. \let\definedummyword\definedummyaccent % \commondummiesnofonts % % Don't no-op \tt, since it isn't a user-level command % and is used in the definitions of the active chars like <, >, |, etc. % Likewise with the other plain tex font commands. %\let\tt=\asis % \def\ { }% \def\@{@}% % how to handle braces? \def\_{\normalunderscore}% % % Non-English letters. \def\AA{AA}% \def\AE{AE}% \def\DH{DZZ}% \def\L{L}% \def\OE{OE}% \def\O{O}% \def\TH{ZZZ}% \def\aa{aa}% \def\ae{ae}% \def\dh{dzz}% \def\exclamdown{!}% \def\l{l}% \def\oe{oe}% \def\ordf{a}% \def\ordm{o}% \def\o{o}% \def\questiondown{?}% \def\ss{ss}% \def\th{zzz}% % \def\LaTeX{LaTeX}% \def\TeX{TeX}% % % Assorted special characters. % (The following {} will end up in the sort string, but that's ok.) \def\bullet{bullet}% \def\comma{,}% \def\copyright{copyright}% \def\dots{...}% \def\enddots{...}% \def\equiv{==}% \def\error{error}% \def\euro{euro}% \def\expansion{==>}% \def\guillemetleft{<<}% \def\guillemetright{>>}% \def\guilsinglleft{<}% \def\guilsinglright{>}% \def\minus{-}% \def\point{.}% \def\pounds{pounds}% \def\print{-|}% \def\quotedblbase{"}% \def\quotedblleft{"}% \def\quotedblright{"}% \def\quoteleft{`}% \def\quoteright{'}% \def\quotesinglbase{,}% \def\registeredsymbol{R}% \def\result{=>}% \def\textdegree{o}% % % We need to get rid of all macros, leaving only the arguments (if present). % Of course this is not nearly correct, but it is the best we can do for now. % makeinfo does not expand macros in the argument to @deffn, which ends up % writing an index entry, and texindex isn't prepared for an index sort entry % that starts with \. % % Since macro invocations are followed by braces, we can just redefine them % to take a single TeX argument. The case of a macro invocation that % goes to end-of-line is not handled. % \macrolist } \let\indexbackslash=0 %overridden during \printindex. \let\SETmarginindex=\relax % put index entries in margin (undocumented)? % Most index entries go through here, but \dosubind is the general case. % #1 is the index name, #2 is the entry text. \def\doind#1#2{\dosubind{#1}{#2}{}} % Workhorse for all \fooindexes. % #1 is name of index, #2 is stuff to put there, #3 is subentry -- % empty if called from \doind, as we usually are (the main exception % is with most defuns, which call us directly). % \def\dosubind#1#2#3{% \iflinks {% % Store the main index entry text (including the third arg). \toks0 = {#2}% % If third arg is present, precede it with a space. \def\thirdarg{#3}% \ifx\thirdarg\empty \else \toks0 = \expandafter{\the\toks0 \space #3}% \fi % \edef\writeto{\csname#1indfile\endcsname}% % \safewhatsit\dosubindwrite }% \fi } % Write the entry in \toks0 to the index file: % \def\dosubindwrite{% % Put the index entry in the margin if desired. \ifx\SETmarginindex\relax\else \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}% \fi % % Remember, we are within a group. \indexdummies % Must do this here, since \bf, etc expand at this stage \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now % so it will be output as is; and it will print as backslash. % % Process the index entry with all font commands turned off, to % get the string to sort by. {\indexnofonts \edef\temp{\the\toks0}% need full expansion \xdef\indexsorttmp{\temp}% }% % % Set up the complete index entry, with both the sort key and % the original text, including any font commands. We write % three arguments to \entry to the .?? file (four in the % subentry case), texindex reduces to two when writing the .??s % sorted result. \edef\temp{% \write\writeto{% \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}% }% \temp } % Take care of unwanted page breaks/skips around a whatsit: % % If a skip is the last thing on the list now, preserve it % by backing up by \lastskip, doing the \write, then inserting % the skip again. Otherwise, the whatsit generated by the % \write or \pdfdest will make \lastskip zero. The result is that % sequences like this: % @end defun % @tindex whatever % @defun ... % will have extra space inserted, because the \medbreak in the % start of the @defun won't see the skip inserted by the @end of % the previous defun. % % But don't do any of this if we're not in vertical mode. We % don't want to do a \vskip and prematurely end a paragraph. % % Avoid page breaks due to these extra skips, too. % % But wait, there is a catch there: % We'll have to check whether \lastskip is zero skip. \ifdim is not % sufficient for this purpose, as it ignores stretch and shrink parts % of the skip. The only way seems to be to check the textual % representation of the skip. % % The following is almost like \def\zeroskipmacro{0.0pt} except that % the ``p'' and ``t'' characters have catcode \other, not 11 (letter). % \edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname} % \newskip\whatsitskip \newcount\whatsitpenalty % % ..., ready, GO: % \def\safewhatsit#1{% \ifhmode #1% \else % \lastskip and \lastpenalty cannot both be nonzero simultaneously. \whatsitskip = \lastskip \edef\lastskipmacro{\the\lastskip}% \whatsitpenalty = \lastpenalty % % If \lastskip is nonzero, that means the last item was a % skip. And since a skip is discardable, that means this % -\whatsitskip glue we're inserting is preceded by a % non-discardable item, therefore it is not a potential % breakpoint, therefore no \nobreak needed. \ifx\lastskipmacro\zeroskipmacro \else \vskip-\whatsitskip \fi % #1% % \ifx\lastskipmacro\zeroskipmacro % If \lastskip was zero, perhaps the last item was a penalty, and % perhaps it was >=10000, e.g., a \nobreak. In that case, we want % to re-insert the same penalty (values >10000 are used for various % signals); since we just inserted a non-discardable item, any % following glue (such as a \parskip) would be a breakpoint. For example: % % @deffn deffn-whatever % @vindex index-whatever % Description. % would allow a break between the index-whatever whatsit % and the "Description." paragraph. \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi \else % On the other hand, if we had a nonzero \lastskip, % this make-up glue would be preceded by a non-discardable item % (the whatsit from the \write), so we must insert a \nobreak. \nobreak\vskip\whatsitskip \fi \fi } % The index entry written in the file actually looks like % \entry {sortstring}{page}{topic} % or % \entry {sortstring}{page}{topic}{subtopic} % The texindex program reads in these files and writes files % containing these kinds of lines: % \initial {c} % before the first topic whose initial is c % \entry {topic}{pagelist} % for a topic that is used without subtopics % \primary {topic} % for the beginning of a topic that is used with subtopics % \secondary {subtopic}{pagelist} % for each subtopic. % Define the user-accessible indexing commands % @findex, @vindex, @kindex, @cindex. \def\findex {\fnindex} \def\kindex {\kyindex} \def\cindex {\cpindex} \def\vindex {\vrindex} \def\tindex {\tpindex} \def\pindex {\pgindex} \def\cindexsub {\begingroup\obeylines\cindexsub} {\obeylines % \gdef\cindexsub "#1" #2^^M{\endgroup % \dosubind{cp}{#2}{#1}}} % Define the macros used in formatting output of the sorted index material. % @printindex causes a particular index (the ??s file) to get printed. % It does not print any chapter heading (usually an @unnumbered). % \parseargdef\printindex{\begingroup \dobreak \chapheadingskip{10000}% % \smallfonts \rm \tolerance = 9500 \plainfrenchspacing \everypar = {}% don't want the \kern\-parindent from indentation suppression. % % See if the index file exists and is nonempty. % Change catcode of @ here so that if the index file contains % \initial {@} % as its first line, TeX doesn't complain about mismatched braces % (because it thinks @} is a control sequence). \catcode`\@ = 11 \openin 1 \jobname.#1s \ifeof 1 % \enddoublecolumns gets confused if there is no text in the index, % and it loses the chapter title and the aux file entries for the % index. The easiest way to prevent this problem is to make sure % there is some text. \putwordIndexNonexistent \else % % If the index file exists but is empty, then \openin leaves \ifeof % false. We have to make TeX try to read something from the file, so % it can discover if there is anything in it. \read 1 to \temp \ifeof 1 \putwordIndexIsEmpty \else % Index files are almost Texinfo source, but we use \ as the escape % character. It would be better to use @, but that's too big a change % to make right now. \def\indexbackslash{\backslashcurfont}% \catcode`\\ = 0 \escapechar = `\\ \begindoublecolumns \input \jobname.#1s \enddoublecolumns \fi \fi \closein 1 \endgroup} % These macros are used by the sorted index file itself. % Change them to control the appearance of the index. \def\initial#1{{% % Some minor font changes for the special characters. \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt % % Remove any glue we may have, we'll be inserting our own. \removelastskip % % We like breaks before the index initials, so insert a bonus. \nobreak \vskip 0pt plus 3\baselineskip \penalty 0 \vskip 0pt plus -3\baselineskip % % Typeset the initial. Making this add up to a whole number of % baselineskips increases the chance of the dots lining up from column % to column. It still won't often be perfect, because of the stretch % we need before each entry, but it's better. % % No shrink because it confuses \balancecolumns. \vskip 1.67\baselineskip plus .5\baselineskip \leftline{\secbf #1}% % Do our best not to break after the initial. \nobreak \vskip .33\baselineskip plus .1\baselineskip }} % \entry typesets a paragraph consisting of the text (#1), dot leaders, and % then page number (#2) flushed to the right margin. It is used for index % and table of contents entries. The paragraph is indented by \leftskip. % % A straightforward implementation would start like this: % \def\entry#1#2{... % But this freezes the catcodes in the argument, and can cause problems to % @code, which sets - active. This problem was fixed by a kludge--- % ``-'' was active throughout whole index, but this isn't really right. % % The right solution is to prevent \entry from swallowing the whole text. % --kasal, 21nov03 \def\entry{% \begingroup % % Start a new paragraph if necessary, so our assignments below can't % affect previous text. \par % % Do not fill out the last line with white space. \parfillskip = 0in % % No extra space above this paragraph. \parskip = 0in % % Do not prefer a separate line ending with a hyphen to fewer lines. \finalhyphendemerits = 0 % % \hangindent is only relevant when the entry text and page number % don't both fit on one line. In that case, bob suggests starting the % dots pretty far over on the line. Unfortunately, a large % indentation looks wrong when the entry text itself is broken across % lines. So we use a small indentation and put up with long leaders. % % \hangafter is reset to 1 (which is the value we want) at the start % of each paragraph, so we need not do anything with that. \hangindent = 2em % % When the entry text needs to be broken, just fill out the first line % with blank space. \rightskip = 0pt plus1fil % % A bit of stretch before each entry for the benefit of balancing % columns. \vskip 0pt plus1pt % % Swallow the left brace of the text (first parameter): \afterassignment\doentry \let\temp = } \def\doentry{% \bgroup % Instead of the swallowed brace. \noindent \aftergroup\finishentry % And now comes the text of the entry. } \def\finishentry#1{% % #1 is the page number. % % The following is kludged to not output a line of dots in the index if % there are no page numbers. The next person who breaks this will be % cursed by a Unix daemon. \setbox\boxA = \hbox{#1}% \ifdim\wd\boxA = 0pt \ % \else % % If we must, put the page number on a line of its own, and fill out % this line with blank space. (The \hfil is overwhelmed with the % fill leaders glue in \indexdotfill if the page number does fit.) \hfil\penalty50 \null\nobreak\indexdotfill % Have leaders before the page number. % % The `\ ' here is removed by the implicit \unskip that TeX does as % part of (the primitive) \par. Without it, a spurious underfull % \hbox ensues. \ifpdf \pdfgettoks#1.% \ \the\toksA \else \ #1% \fi \fi \par \endgroup } % Like plain.tex's \dotfill, except uses up at least 1 em. \def\indexdotfill{\cleaders \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill} \def\primary #1{\line{#1\hfil}} \newskip\secondaryindent \secondaryindent=0.5cm \def\secondary#1#2{{% \parfillskip=0in \parskip=0in \hangindent=1in \hangafter=1 \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill \ifpdf \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. \else #2 \fi \par }} % Define two-column mode, which we use to typeset indexes. % Adapted from the TeXbook, page 416, which is to say, % the manmac.tex format used to print the TeXbook itself. \catcode`\@=11 \newbox\partialpage \newdimen\doublecolumnhsize \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns % Grab any single-column material above us. \output = {% % % Here is a possibility not foreseen in manmac: if we accumulate a % whole lot of material, we might end up calling this \output % routine twice in a row (see the doublecol-lose test, which is % essentially a couple of indexes with @setchapternewpage off). In % that case we just ship out what is in \partialpage with the normal % output routine. Generally, \partialpage will be empty when this % runs and this will be a no-op. See the indexspread.tex test case. \ifvoid\partialpage \else \onepageout{\pagecontents\partialpage}% \fi % \global\setbox\partialpage = \vbox{% % Unvbox the main output page. \unvbox\PAGE \kern-\topskip \kern\baselineskip }% }% \eject % run that output routine to set \partialpage % % Use the double-column output routine for subsequent pages. \output = {\doublecolumnout}% % % Change the page size parameters. We could do this once outside this % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 % format, but then we repeat the same computation. Repeating a couple % of assignments once per index is clearly meaningless for the % execution time, so we may as well do it in one place. % % First we halve the line length, less a little for the gutter between % the columns. We compute the gutter based on the line length, so it % changes automatically with the paper format. The magic constant % below is chosen so that the gutter has the same value (well, +-<1pt) % as it did when we hard-coded it. % % We put the result in a separate register, \doublecolumhsize, so we % can restore it in \pagesofar, after \hsize itself has (potentially) % been clobbered. % \doublecolumnhsize = \hsize \advance\doublecolumnhsize by -.04154\hsize \divide\doublecolumnhsize by 2 \hsize = \doublecolumnhsize % % Double the \vsize as well. (We don't need a separate register here, % since nobody clobbers \vsize.) \vsize = 2\vsize } % The double-column output routine for all double-column pages except % the last. % \def\doublecolumnout{% \splittopskip=\topskip \splitmaxdepth=\maxdepth % Get the available space for the double columns -- the normal % (undoubled) page height minus any material left over from the % previous page. \dimen@ = \vsize \divide\dimen@ by 2 \advance\dimen@ by -\ht\partialpage % % box0 will be the left-hand column, box2 the right. \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ \onepageout\pagesofar \unvbox255 \penalty\outputpenalty } % % Re-output the contents of the output page -- any previous material, % followed by the two boxes we just split, in box0 and box2. \def\pagesofar{% \unvbox\partialpage % \hsize = \doublecolumnhsize \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}% } % % All done with double columns. \def\enddoublecolumns{% % The following penalty ensures that the page builder is exercised % _before_ we change the output routine. This is necessary in the % following situation: % % The last section of the index consists only of a single entry. % Before this section, \pagetotal is less than \pagegoal, so no % break occurs before the last section starts. However, the last % section, consisting of \initial and the single \entry, does not % fit on the page and has to be broken off. Without the following % penalty the page builder will not be exercised until \eject % below, and by that time we'll already have changed the output % routine to the \balancecolumns version, so the next-to-last % double-column page will be processed with \balancecolumns, which % is wrong: The two columns will go to the main vertical list, with % the broken-off section in the recent contributions. As soon as % the output routine finishes, TeX starts reconsidering the page % break. The two columns and the broken-off section both fit on the % page, because the two columns now take up only half of the page % goal. When TeX sees \eject from below which follows the final % section, it invokes the new output routine that we've set after % \balancecolumns below; \onepageout will try to fit the two columns % and the final section into the vbox of \pageheight (see % \pagebody), causing an overfull box. % % Note that glue won't work here, because glue does not exercise the % page builder, unlike penalties (see The TeXbook, pp. 280-281). \penalty0 % \output = {% % Split the last of the double-column material. Leave it on the % current page, no automatic page break. \balancecolumns % % If we end up splitting too much material for the current page, % though, there will be another page break right after this \output % invocation ends. Having called \balancecolumns once, we do not % want to call it again. Therefore, reset \output to its normal % definition right away. (We hope \balancecolumns will never be % called on to balance too much material, but if it is, this makes % the output somewhat more palatable.) \global\output = {\onepageout{\pagecontents\PAGE}}% }% \eject \endgroup % started in \begindoublecolumns % % \pagegoal was set to the doubled \vsize above, since we restarted % the current page. We're now back to normal single-column % typesetting, so reset \pagegoal to the normal \vsize (after the % \endgroup where \vsize got restored). \pagegoal = \vsize } % % Called at the end of the double column material. \def\balancecolumns{% \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. \dimen@ = \ht0 \advance\dimen@ by \topskip \advance\dimen@ by-\baselineskip \divide\dimen@ by 2 % target to split to %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}% \splittopskip = \topskip % Loop until we get a decent breakpoint. {% \vbadness = 10000 \loop \global\setbox3 = \copy0 \global\setbox1 = \vsplit3 to \dimen@ \ifdim\ht3>\dimen@ \global\advance\dimen@ by 1pt \repeat }% %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}% \setbox0=\vbox to\dimen@{\unvbox1}% \setbox2=\vbox to\dimen@{\unvbox3}% % \pagesofar } \catcode`\@ = \other \message{sectioning,} % Chapters, sections, etc. % \unnumberedno is an oxymoron, of course. But we count the unnumbered % sections so that we can refer to them unambiguously in the pdf % outlines by their "section number". We avoid collisions with chapter % numbers by starting them at 10000. (If a document ever has 10000 % chapters, we're in trouble anyway, I'm sure.) \newcount\unnumberedno \unnumberedno = 10000 \newcount\chapno \newcount\secno \secno=0 \newcount\subsecno \subsecno=0 \newcount\subsubsecno \subsubsecno=0 % This counter is funny since it counts through charcodes of letters A, B, ... \newcount\appendixno \appendixno = `\@ % % \def\appendixletter{\char\the\appendixno} % We do the following ugly conditional instead of the above simple % construct for the sake of pdftex, which needs the actual % letter in the expansion, not just typeset. % \def\appendixletter{% \ifnum\appendixno=`A A% \else\ifnum\appendixno=`B B% \else\ifnum\appendixno=`C C% \else\ifnum\appendixno=`D D% \else\ifnum\appendixno=`E E% \else\ifnum\appendixno=`F F% \else\ifnum\appendixno=`G G% \else\ifnum\appendixno=`H H% \else\ifnum\appendixno=`I I% \else\ifnum\appendixno=`J J% \else\ifnum\appendixno=`K K% \else\ifnum\appendixno=`L L% \else\ifnum\appendixno=`M M% \else\ifnum\appendixno=`N N% \else\ifnum\appendixno=`O O% \else\ifnum\appendixno=`P P% \else\ifnum\appendixno=`Q Q% \else\ifnum\appendixno=`R R% \else\ifnum\appendixno=`S S% \else\ifnum\appendixno=`T T% \else\ifnum\appendixno=`U U% \else\ifnum\appendixno=`V V% \else\ifnum\appendixno=`W W% \else\ifnum\appendixno=`X X% \else\ifnum\appendixno=`Y Y% \else\ifnum\appendixno=`Z Z% % The \the is necessary, despite appearances, because \appendixletter is % expanded while writing the .toc file. \char\appendixno is not % expandable, thus it is written literally, thus all appendixes come out % with the same letter (or @) in the toc without it. \else\char\the\appendixno \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} % Each @chapter defines these (using marks) as the number+name, number % and name of the chapter. Page headings and footings can use % these. @section does likewise. \def\thischapter{} \def\thischapternum{} \def\thischaptername{} \def\thissection{} \def\thissectionnum{} \def\thissectionname{} \newcount\absseclevel % used to calculate proper heading level \newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count % @raisesections: treat @section as chapter, @subsection as section, etc. \def\raisesections{\global\advance\secbase by -1} \let\up=\raisesections % original BFox name % @lowersections: treat @chapter as section, @section as subsection, etc. \def\lowersections{\global\advance\secbase by 1} \let\down=\lowersections % original BFox name % we only have subsub. \chardef\maxseclevel = 3 % % A numbered section within an unnumbered changes to unnumbered too. % To achive this, remember the "biggest" unnum. sec. we are currently in: \chardef\unmlevel = \maxseclevel % % Trace whether the current chapter is an appendix or not: % \chapheadtype is "N" or "A", unnumbered chapters are ignored. \def\chapheadtype{N} % Choose a heading macro % #1 is heading type % #2 is heading level % #3 is text for heading \def\genhead#1#2#3{% % Compute the abs. sec. level: \absseclevel=#2 \advance\absseclevel by \secbase % Make sure \absseclevel doesn't fall outside the range: \ifnum \absseclevel < 0 \absseclevel = 0 \else \ifnum \absseclevel > 3 \absseclevel = 3 \fi \fi % The heading type: \def\headtype{#1}% \if \headtype U% \ifnum \absseclevel < \unmlevel \chardef\unmlevel = \absseclevel \fi \else % Check for appendix sections: \ifnum \absseclevel = 0 \edef\chapheadtype{\headtype}% \else \if \headtype A\if \chapheadtype N% \errmessage{@appendix... within a non-appendix chapter}% \fi\fi \fi % Check for numbered within unnumbered: \ifnum \absseclevel > \unmlevel \def\headtype{U}% \else \chardef\unmlevel = 3 \fi \fi % Now print the heading: \if \headtype U% \ifcase\absseclevel \unnumberedzzz{#3}% \or \unnumberedseczzz{#3}% \or \unnumberedsubseczzz{#3}% \or \unnumberedsubsubseczzz{#3}% \fi \else \if \headtype A% \ifcase\absseclevel \appendixzzz{#3}% \or \appendixsectionzzz{#3}% \or \appendixsubseczzz{#3}% \or \appendixsubsubseczzz{#3}% \fi \else \ifcase\absseclevel \chapterzzz{#3}% \or \seczzz{#3}% \or \numberedsubseczzz{#3}% \or \numberedsubsubseczzz{#3}% \fi \fi \fi \suppressfirstparagraphindent } % an interface: \def\numhead{\genhead N} \def\apphead{\genhead A} \def\unnmhead{\genhead U} % @chapter, @appendix, @unnumbered. Increment top-level counter, reset % all lower-level sectioning counters to zero. % % Also set \chaplevelprefix, which we prepend to @float sequence numbers % (e.g., figures), q.v. By default (before any chapter), that is empty. \let\chaplevelprefix = \empty % \outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz \def\chapterzzz#1{% % section resetting is \global in case the chapter is in a group, such % as an @include file. \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\chapno by 1 % % Used for \float. \gdef\chaplevelprefix{\the\chapno.}% \resetallfloatnos % % \putwordChapter can contain complex things in translations. \toks0=\expandafter{\putwordChapter}% \message{\the\toks0 \space \the\chapno}% % % Write the actual heading. \chapmacro{#1}{Ynumbered}{\the\chapno}% % % So @section and the like are numbered underneath this chapter. \global\let\section = \numberedsec \global\let\subsection = \numberedsubsec \global\let\subsubsection = \numberedsubsubsec } \outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz % \def\appendixzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\appendixno by 1 \gdef\chaplevelprefix{\appendixletter.}% \resetallfloatnos % % \putwordAppendix can contain complex things in translations. \toks0=\expandafter{\putwordAppendix}% \message{\the\toks0 \space \appendixletter}% % \chapmacro{#1}{Yappendix}{\appendixletter}% % \global\let\section = \appendixsec \global\let\subsection = \appendixsubsec \global\let\subsubsection = \appendixsubsubsec } \outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz \def\unnumberedzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\unnumberedno by 1 % % Since an unnumbered has no number, no prefix for figures. \global\let\chaplevelprefix = \empty \resetallfloatnos % % This used to be simply \message{#1}, but TeX fully expands the % argument to \message. Therefore, if #1 contained @-commands, TeX % expanded them. For example, in `@unnumbered The @cite{Book}', TeX % expanded @cite (which turns out to cause errors because \cite is meant % to be executed, not expanded). % % Anyway, we don't want the fully-expanded definition of @cite to appear % as a result of the \message, we just want `@cite' itself. We use % \the to achieve this: TeX expands \the only once, % simply yielding the contents of . (We also do this for % the toc entries.) \toks0 = {#1}% \message{(\the\toks0)}% % \chapmacro{#1}{Ynothing}{\the\unnumberedno}% % \global\let\section = \unnumberedsec \global\let\subsection = \unnumberedsubsec \global\let\subsubsection = \unnumberedsubsubsec } % @centerchap is like @unnumbered, but the heading is centered. \outer\parseargdef\centerchap{% % Well, we could do the following in a group, but that would break % an assumption that \chapmacro is called at the outermost level. % Thus we are safer this way: --kasal, 24feb04 \let\centerparametersmaybe = \centerparameters \unnmhead0{#1}% \let\centerparametersmaybe = \relax } % @top is like @unnumbered. \let\top\unnumbered % Sections. \outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz \def\seczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}% } \outer\parseargdef\appendixsection{\apphead1{#1}} % normally calls appendixsectionzzz \def\appendixsectionzzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}% } \let\appendixsec\appendixsection \outer\parseargdef\unnumberedsec{\unnmhead1{#1}} % normally calls unnumberedseczzz \def\unnumberedseczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}% } % Subsections. \outer\parseargdef\numberedsubsec{\numhead2{#1}} % normally calls numberedsubseczzz \def\numberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}% } \outer\parseargdef\appendixsubsec{\apphead2{#1}} % normally calls appendixsubseczzz \def\appendixsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno}% } \outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} %normally calls unnumberedsubseczzz \def\unnumberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynothing}% {\the\unnumberedno.\the\secno.\the\subsecno}% } % Subsubsections. \outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally numberedsubsubseczzz \def\numberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynumbered}% {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}% } \outer\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally appendixsubsubseczzz \def\appendixsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}% } \outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} %normally unnumberedsubsubseczzz \def\unnumberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynothing}% {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}% } % These macros control what the section commands do, according % to what kind of chapter we are in (ordinary, appendix, or unnumbered). % Define them by default for a numbered chapter. \let\section = \numberedsec \let\subsection = \numberedsubsec \let\subsubsection = \numberedsubsubsec % Define @majorheading, @heading and @subheading % NOTE on use of \vbox for chapter headings, section headings, and such: % 1) We use \vbox rather than the earlier \line to permit % overlong headings to fold. % 2) \hyphenpenalty is set to 10000 because hyphenation in a % heading is obnoxious; this forbids it. % 3) Likewise, headings look best if no \parindent is used, and % if justification is not attempted. Hence \raggedright. \def\majorheading{% {\advance\chapheadingskip by 10pt \chapbreak }% \parsearg\chapheadingzzz } \def\chapheading{\chapbreak \parsearg\chapheadingzzz} \def\chapheadingzzz#1{% {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\ptexraggedright \rmisbold #1\hfill}}% \bigskip \par\penalty 200\relax \suppressfirstparagraphindent } % @heading, @subheading, @subsubheading. \parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{} \suppressfirstparagraphindent} \parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{} \suppressfirstparagraphindent} \parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{} \suppressfirstparagraphindent} % These macros generate a chapter, section, etc. heading only % (including whitespace, linebreaking, etc. around it), % given all the information in convenient, parsed form. %%% Args are the skip and penalty (usually negative) \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} %%% Define plain chapter starts, and page on/off switching for it % Parameter controlling skip before chapter headings (if needed) \newskip\chapheadingskip \def\chapbreak{\dobreak \chapheadingskip {-4000}} \def\chappager{\par\vfill\supereject} % Because \domark is called before \chapoddpage, the filler page will % get the headings for the next chapter, which is wrong. But we don't % care -- we just disable all headings on the filler page. \def\chapoddpage{% \chappager \ifodd\pageno \else \begingroup \evenheadline={\hfil}\evenfootline={\hfil}% \oddheadline={\hfil}\oddfootline={\hfil}% \hbox to 0pt{}% \chappager \endgroup \fi } \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} \def\CHAPPAGoff{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chapbreak \global\let\pagealignmacro=\chappager} \def\CHAPPAGon{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chappager \global\let\pagealignmacro=\chappager \global\def\HEADINGSon{\HEADINGSsingle}} \def\CHAPPAGodd{% \global\let\contentsalignmacro = \chapoddpage \global\let\pchapsepmacro=\chapoddpage \global\let\pagealignmacro=\chapoddpage \global\def\HEADINGSon{\HEADINGSdouble}} \CHAPPAGon % Chapter opening. % % #1 is the text, #2 is the section type (Ynumbered, Ynothing, % Yappendix, Yomitfromtoc), #3 the chapter number. % % To test against our argument. \def\Ynothingkeyword{Ynothing} \def\Yomitfromtockeyword{Yomitfromtoc} \def\Yappendixkeyword{Yappendix} % \def\chapmacro#1#2#3{% % Insert the first mark before the heading break (see notes for \domark). \let\prevchapterdefs=\lastchapterdefs \let\prevsectiondefs=\lastsectiondefs \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}% \gdef\thissection{}}% % \def\temptype{#2}% \ifx\temptype\Ynothingkeyword \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% \gdef\thischapter{\thischaptername}}% \else\ifx\temptype\Yomitfromtockeyword \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% \gdef\thischapter{}}% \else\ifx\temptype\Yappendixkeyword \toks0={#1}% \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\appendixletter}% % \noexpand\putwordAppendix avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thischapter{\noexpand\putwordAppendix{} \noexpand\thischapternum: \noexpand\thischaptername}% }% \else \toks0={#1}% \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\the\chapno}% % \noexpand\putwordChapter avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thischapter{\noexpand\putwordChapter{} \noexpand\thischapternum: \noexpand\thischaptername}% }% \fi\fi\fi % % Output the mark. Pass it through \safewhatsit, to take care of % the preceding space. \safewhatsit\domark % % Insert the chapter heading break. \pchapsepmacro % % Now the second mark, after the heading break. No break points % between here and the heading. \let\prevchapterdefs=\lastchapterdefs \let\prevsectiondefs=\lastsectiondefs \domark % {% \chapfonts \rmisbold % % Have to define \lastsection before calling \donoderef, because the % xref code eventually uses it. On the other hand, it has to be called % after \pchapsepmacro, or the headline will change too soon. \gdef\lastsection{#1}% % % Only insert the separating space if we have a chapter/appendix % number, and don't print the unnumbered ``number''. \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unnchap}% \else\ifx\temptype\Yomitfromtockeyword \setbox0 = \hbox{}% contents like unnumbered, but no toc entry \def\toctype{omit}% \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% \def\toctype{app}% \else \setbox0 = \hbox{#3\enspace}% \def\toctype{numchap}% \fi\fi\fi % % Write the toc entry for this chapter. Must come before the % \donoderef, because we include the current node name in the toc % entry, and \donoderef resets it to empty. \writetocentry{\toctype}{#1}{#3}% % % For pdftex, we have to write out the node definition (aka, make % the pdfdest) after any page break, but before the actual text has % been typeset. If the destination for the pdf outline is after the % text, then jumping from the outline may wind up with the text not % being visible, for instance under high magnification. \donoderef{#2}% % % Typeset the actual heading. \nobreak % Avoid page breaks at the interline glue. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright \hangindent=\wd0 \centerparametersmaybe \unhbox0 #1\par}% }% \nobreak\bigskip % no page break after a chapter title \nobreak } % @centerchap -- centered and unnumbered. \let\centerparametersmaybe = \relax \def\centerparameters{% \advance\rightskip by 3\rightskip \leftskip = \rightskip \parfillskip = 0pt } % I don't think this chapter style is supported any more, so I'm not % updating it with the new noderef stuff. We'll see. --karl, 11aug03. % \def\setchapterstyle #1 {\csname CHAPF#1\endcsname} % \def\unnchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\ptexraggedright \rmisbold #1\hfill}}\bigskip \par\nobreak } \def\chfopen #1#2{\chapoddpage {\chapfonts \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% \par\penalty 5000 % } \def\centerchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt \hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak } \def\CHAPFopen{% \global\let\chapmacro=\chfopen \global\let\centerchapmacro=\centerchfopen} % Section titles. These macros combine the section number parts and % call the generic \sectionheading to do the printing. % \newskip\secheadingskip \def\secheadingbreak{\dobreak \secheadingskip{-1000}} % Subsection titles. \newskip\subsecheadingskip \def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}} % Subsubsection titles. \def\subsubsecheadingskip{\subsecheadingskip} \def\subsubsecheadingbreak{\subsecheadingbreak} % Print any size, any type, section title. % % #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is % the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the % section number. % \def\seckeyword{sec} % \def\sectionheading#1#2#3#4{% {% % Switch to the right set of fonts. \csname #2fonts\endcsname \rmisbold % \def\sectionlevel{#2}% \def\temptype{#3}% % % Insert first mark before the heading break (see notes for \domark). \let\prevsectiondefs=\lastsectiondefs \ifx\temptype\Ynothingkeyword \ifx\sectionlevel\seckeyword \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}% \gdef\thissection{\thissectionname}}% \fi \else\ifx\temptype\Yomitfromtockeyword % Don't redefine \thissection. \else\ifx\temptype\Yappendixkeyword \ifx\sectionlevel\seckeyword \toks0={#1}% \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% % \noexpand\putwordSection avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thissection{\noexpand\putwordSection{} \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi \else \ifx\sectionlevel\seckeyword \toks0={#1}% \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% % \noexpand\putwordSection avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thissection{\noexpand\putwordSection{} \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi \fi\fi\fi % % Go into vertical mode. Usually we'll already be there, but we % don't want the following whatsit to end up in a preceding paragraph % if the document didn't happen to have a blank line. \par % % Output the mark. Pass it through \safewhatsit, to take care of % the preceding space. \safewhatsit\domark % % Insert space above the heading. \csname #2headingbreak\endcsname % % Now the second mark, after the heading break. No break points % between here and the heading. \let\prevsectiondefs=\lastsectiondefs \domark % % Only insert the space after the number if we have a section number. \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unn}% \gdef\lastsection{#1}% \else\ifx\temptype\Yomitfromtockeyword % for @headings -- no section number, don't include in toc, % and don't redefine \lastsection. \setbox0 = \hbox{}% \def\toctype{omit}% \let\sectionlevel=\empty \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{#4\enspace}% \def\toctype{app}% \gdef\lastsection{#1}% \else \setbox0 = \hbox{#4\enspace}% \def\toctype{num}% \gdef\lastsection{#1}% \fi\fi\fi % % Write the toc entry (before \donoderef). See comments in \chapmacro. \writetocentry{\toctype\sectionlevel}{#1}{#4}% % % Write the node reference (= pdf destination for pdftex). % Again, see comments in \chapmacro. \donoderef{#3}% % % Interline glue will be inserted when the vbox is completed. % That glue will be a valid breakpoint for the page, since it'll be % preceded by a whatsit (usually from the \donoderef, or from the % \writetocentry if there was no node). We don't want to allow that % break, since then the whatsits could end up on page n while the % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000. \nobreak % % Output the actual section heading. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright \hangindent=\wd0 % zero if no section number \unhbox0 #1}% }% % Add extra space after the heading -- half of whatever came above it. % Don't allow stretch, though. \kern .5 \csname #2headingskip\endcsname % % Do not let the kern be a potential breakpoint, as it would be if it % was followed by glue. \nobreak % % We'll almost certainly start a paragraph next, so don't let that % glue accumulate. (Not a breakpoint because it's preceded by a % discardable item.) \vskip-\parskip % % This is purely so the last item on the list is a known \penalty > % 10000. This is so \startdefun can avoid allowing breakpoints after % section headings. Otherwise, it would insert a valid breakpoint between: % % @section sec-whatever % @deffn def-whatever \penalty 10001 } \message{toc,} % Table of contents. \newwrite\tocfile % Write an entry to the toc file, opening it if necessary. % Called from @chapter, etc. % % Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno} % We append the current node name (if any) and page number as additional % arguments for the \{chap,sec,...}entry macros which will eventually % read this. The node name is used in the pdf outlines as the % destination to jump to. % % We open the .toc file for writing here instead of at @setfilename (or % any other fixed time) so that @contents can be anywhere in the document. % But if #1 is `omit', then we don't do anything. This is used for the % table of contents chapter openings themselves. % \newif\iftocfileopened \def\omitkeyword{omit}% % \def\writetocentry#1#2#3{% \edef\writetoctype{#1}% \ifx\writetoctype\omitkeyword \else \iftocfileopened\else \immediate\openout\tocfile = \jobname.toc \global\tocfileopenedtrue \fi % \iflinks {\atdummies \edef\temp{% \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}% \temp }% \fi \fi % % Tell \shipout to create a pdf destination on each page, if we're % writing pdf. These are used in the table of contents. We can't % just write one on every page because the title pages are numbered % 1 and 2 (the page numbers aren't printed), and so are the first % two pages of the document. Thus, we'd have two destinations named % `1', and two named `2'. \ifpdf \global\pdfmakepagedesttrue \fi } % These characters do not print properly in the Computer Modern roman % fonts, so we must take special care. This is more or less redundant % with the Texinfo input format setup at the end of this file. % \def\activecatcodes{% \catcode`\"=\active \catcode`\$=\active \catcode`\<=\active \catcode`\>=\active \catcode`\\=\active \catcode`\^=\active \catcode`\_=\active \catcode`\|=\active \catcode`\~=\active } % Read the toc file, which is essentially Texinfo input. \def\readtocfile{% \setupdatafile \activecatcodes \input \tocreadfilename } \newskip\contentsrightmargin \contentsrightmargin=1in \newcount\savepageno \newcount\lastnegativepageno \lastnegativepageno = -1 % Prepare to read what we've written to \tocfile. % \def\startcontents#1{% % If @setchapternewpage on, and @headings double, the contents should % start on an odd page, unlike chapters. Thus, we maintain % \contentsalignmacro in parallel with \pagealignmacro. % From: Torbjorn Granlund \contentsalignmacro \immediate\closeout\tocfile % % Don't need to put `Contents' or `Short Contents' in the headline. % It is abundantly clear what they are. \chapmacro{#1}{Yomitfromtoc}{}% % \savepageno = \pageno \begingroup % Set up to handle contents files properly. \raggedbottom % Worry more about breakpoints than the bottom. \advance\hsize by -\contentsrightmargin % Don't use the full line length. % % Roman numerals for page numbers. \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi } % redefined for the two-volume lispref. We always output on % \jobname.toc even if this is redefined. % \def\tocreadfilename{\jobname.toc} % Normal (long) toc. % \def\contents{% \startcontents{\putwordTOC}% \openin 1 \tocreadfilename\space \ifeof 1 \else \readtocfile \fi \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \ifeof 1 \else \pdfmakeoutlines \fi \closein 1 \endgroup \lastnegativepageno = \pageno \global\pageno = \savepageno } % And just the chapters. \def\summarycontents{% \startcontents{\putwordShortTOC}% % \let\numchapentry = \shortchapentry \let\appentry = \shortchapentry \let\unnchapentry = \shortunnchapentry % We want a true roman here for the page numbers. \secfonts \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl \let\tt=\shortconttt \rm \hyphenpenalty = 10000 \advance\baselineskip by 1pt % Open it up a little. \def\numsecentry##1##2##3##4{} \let\appsecentry = \numsecentry \let\unnsecentry = \numsecentry \let\numsubsecentry = \numsecentry \let\appsubsecentry = \numsecentry \let\unnsubsecentry = \numsecentry \let\numsubsubsecentry = \numsecentry \let\appsubsubsecentry = \numsecentry \let\unnsubsubsecentry = \numsecentry \openin 1 \tocreadfilename\space \ifeof 1 \else \readtocfile \fi \closein 1 \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \endgroup \lastnegativepageno = \pageno \global\pageno = \savepageno } \let\shortcontents = \summarycontents % Typeset the label for a chapter or appendix for the short contents. % The arg is, e.g., `A' for an appendix, or `3' for a chapter. % \def\shortchaplabel#1{% % This space should be enough, since a single number is .5em, and the % widest letter (M) is 1em, at least in the Computer Modern fonts. % But use \hss just in case. % (This space doesn't include the extra space that gets added after % the label; that gets put in by \shortchapentry above.) % % We'd like to right-justify chapter numbers, but that looks strange % with appendix letters. And right-justifying numbers and % left-justifying letters looks strange when there is less than 10 % chapters. Have to read the whole toc once to know how many chapters % there are before deciding ... \hbox to 1em{#1\hss}% } % These macros generate individual entries in the table of contents. % The first argument is the chapter or section name. % The last argument is the page number. % The arguments in between are the chapter number, section number, ... % Chapters, in the main contents. \def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} % % Chapters, in the short toc. % See comments in \dochapentry re vbox and related settings. \def\shortchapentry#1#2#3#4{% \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}% } % Appendices, in the main contents. % Need the word Appendix, and a fixed-size box. % \def\appendixbox#1{% % We use M since it's probably the widest letter. \setbox0 = \hbox{\putwordAppendix{} M}% \hbox to \wd0{\putwordAppendix{} #1\hss}} % \def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}} % Unnumbered chapters. \def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} \def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}} % Sections. \def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}} \let\appsecentry=\numsecentry \def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}} % Subsections. \def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}} \let\appsubsecentry=\numsubsecentry \def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}} % And subsubsections. \def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}} \let\appsubsubsecentry=\numsubsubsecentry \def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}} % This parameter controls the indentation of the various levels. % Same as \defaultparindent. \newdimen\tocindent \tocindent = 15pt % Now for the actual typesetting. In all these, #1 is the text and #2 is the % page number. % % If the toc has to be broken over pages, we want it to be at chapters % if at all possible; hence the \penalty. \def\dochapentry#1#2{% \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip \begingroup \chapentryfonts \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup \nobreak\vskip .25\baselineskip plus.1\baselineskip } \def\dosecentry#1#2{\begingroup \secentryfonts \leftskip=\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsecentry#1#2{\begingroup \subsecentryfonts \leftskip=2\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsubsecentry#1#2{\begingroup \subsubsecentryfonts \leftskip=3\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} % We use the same \entry macro as for the index entries. \let\tocentry = \entry % Space between chapter (or whatever) number and the title. \def\labelspace{\hskip1em \relax} \def\dopageno#1{{\rm #1}} \def\doshortpageno#1{{\rm #1}} \def\chapentryfonts{\secfonts \rm} \def\secentryfonts{\textfonts} \def\subsecentryfonts{\textfonts} \def\subsubsecentryfonts{\textfonts} \message{environments,} % @foo ... @end foo. % @tex ... @end tex escapes into raw Tex temporarily. % One exception: @ is still an escape character, so that @end tex works. % But \@ or @@ will get a plain tex @ character. \envdef\tex{% \setupmarkupstyle{tex}% \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie \catcode `\%=14 \catcode `\+=\other \catcode `\"=\other \catcode `\|=\other \catcode `\<=\other \catcode `\>=\other \catcode`\`=\other \catcode`\'=\other \escapechar=`\\ % \let\b=\ptexb \let\bullet=\ptexbullet \let\c=\ptexc \let\,=\ptexcomma \let\.=\ptexdot \let\dots=\ptexdots \let\equiv=\ptexequiv \let\!=\ptexexclam \let\i=\ptexi \let\indent=\ptexindent \let\noindent=\ptexnoindent \let\{=\ptexlbrace \let\+=\tabalign \let\}=\ptexrbrace \let\/=\ptexslash \let\*=\ptexstar \let\t=\ptext \expandafter \let\csname top\endcsname=\ptextop % outer \let\frenchspacing=\plainfrenchspacing % \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% \def\@{@}% } % There is no need to define \Etex. % Define @lisp ... @end lisp. % @lisp environment forms a group so it can rebind things, % including the definition of @end lisp (which normally is erroneous). % Amount to narrow the margins by for @lisp. \newskip\lispnarrowing \lispnarrowing=0.4in % This is the definition that ^^M gets inside @lisp, @example, and other % such environments. \null is better than a space, since it doesn't % have any width. \def\lisppar{\null\endgraf} % This space is always present above and below environments. \newskip\envskipamount \envskipamount = 0pt % Make spacing and below environment symmetrical. We use \parskip here % to help in doing that, since in @example-like environments \parskip % is reset to zero; thus the \afterenvbreak inserts no space -- but the % start of the next paragraph will insert \parskip. % \def\aboveenvbreak{{% % =10000 instead of <10000 because of a special case in \itemzzz and % \sectionheading, q.v. \ifnum \lastpenalty=10000 \else \advance\envskipamount by \parskip \endgraf \ifdim\lastskip<\envskipamount \removelastskip % it's not a good place to break if the last penalty was \nobreak % or better ... \ifnum\lastpenalty<10000 \penalty-50 \fi \vskip\envskipamount \fi \fi }} \let\afterenvbreak = \aboveenvbreak % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will % also clear it, so that its embedded environments do the narrowing again. \let\nonarrowing=\relax % @cartouche ... @end cartouche: draw rectangle w/rounded corners around % environment contents. \font\circle=lcircle10 \newdimen\circthick \newdimen\cartouter\newdimen\cartinner \newskip\normbskip\newskip\normpskip\newskip\normlskip \circthick=\fontdimen8\circle % \def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth \def\ctr{{\hskip 6pt\circle\char'010}} \def\cbl{{\circle\char'012\hskip -6pt}} \def\cbr{{\hskip 6pt\circle\char'011}} \def\carttop{\hbox to \cartouter{\hskip\lskip \ctl\leaders\hrule height\circthick\hfil\ctr \hskip\rskip}} \def\cartbot{\hbox to \cartouter{\hskip\lskip \cbl\leaders\hrule height\circthick\hfil\cbr \hskip\rskip}} % \newskip\lskip\newskip\rskip \envdef\cartouche{% \ifhmode\par\fi % can't be in the midst of a paragraph. \startsavinginserts \lskip=\leftskip \rskip=\rightskip \leftskip=0pt\rightskip=0pt % we want these *outside*. \cartinner=\hsize \advance\cartinner by-\lskip \advance\cartinner by-\rskip \cartouter=\hsize \advance\cartouter by 18.4pt % allow for 3pt kerns on either % side, and for 6pt waste from % each corner char, and rule thickness \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip % Flag to tell @lisp, etc., not to narrow margin. \let\nonarrowing = t% \vbox\bgroup \baselineskip=0pt\parskip=0pt\lineskip=0pt \carttop \hbox\bgroup \hskip\lskip \vrule\kern3pt \vbox\bgroup \kern3pt \hsize=\cartinner \baselineskip=\normbskip \lineskip=\normlskip \parskip=\normpskip \vskip -\parskip \comment % For explanation, see the end of \def\group. } \def\Ecartouche{% \ifhmode\par\fi \kern3pt \egroup \kern3pt\vrule \hskip\rskip \egroup \cartbot \egroup \checkinserts } % This macro is called at the beginning of all the @example variants, % inside a group. \newdimen\nonfillparindent \def\nonfillstart{% \aboveenvbreak \hfuzz = 12pt % Don't be fussy \sepspaces % Make spaces be word-separators rather than space tokens. \let\par = \lisppar % don't ignore blank lines \obeylines % each line of input is a line of output \parskip = 0pt % Turn off paragraph indentation but redefine \indent to emulate % the normal \indent. \nonfillparindent=\parindent \parindent = 0pt \let\indent\nonfillindent % \emergencystretch = 0pt % don't try to avoid overfull boxes \ifx\nonarrowing\relax \advance \leftskip by \lispnarrowing \exdentamount=\lispnarrowing \else \let\nonarrowing = \relax \fi \let\exdent=\nofillexdent } \begingroup \obeyspaces % We want to swallow spaces (but not other tokens) after the fake % @indent in our nonfill-environments, where spaces are normally % active and set to @tie, resulting in them not being ignored after % @indent. \gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}% \gdef\nonfillindentcheck{% \ifx\temp % \expandafter\nonfillindentgobble% \else% \leavevmode\nonfillindentbox% \fi% }% \endgroup \def\nonfillindentgobble#1{\nonfillindent} \def\nonfillindentbox{\hbox to \nonfillparindent{\hss}} % If you want all examples etc. small: @set dispenvsize small. % If you want even small examples the full size: @set dispenvsize nosmall. % This affects the following displayed environments: % @example, @display, @format, @lisp % \def\smallword{small} \def\nosmallword{nosmall} \let\SETdispenvsize\relax \def\setnormaldispenv{% \ifx\SETdispenvsize\smallword % end paragraph for sake of leading, in case document has no blank % line. This is redundant with what happens in \aboveenvbreak, but % we need to do it before changing the fonts, and it's inconvenient % to change the fonts afterward. \ifnum \lastpenalty=10000 \else \endgraf \fi \smallexamplefonts \rm \fi } \def\setsmalldispenv{% \ifx\SETdispenvsize\nosmallword \else \ifnum \lastpenalty=10000 \else \endgraf \fi \smallexamplefonts \rm \fi } % We often define two environments, @foo and @smallfoo. % Let's do it by one command: \def\makedispenv #1#2{ \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2} \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2} \expandafter\let\csname E#1\endcsname \afterenvbreak \expandafter\let\csname Esmall#1\endcsname \afterenvbreak } % Define two synonyms: \def\maketwodispenvs #1#2#3{ \makedispenv{#1}{#3} \makedispenv{#2}{#3} } % @lisp: indented, narrowed, typewriter font; @example: same as @lisp. % % @smallexample and @smalllisp: use smaller fonts. % Originally contributed by Pavel@xerox. % \maketwodispenvs {lisp}{example}{% \nonfillstart \tt\setupmarkupstyle{example}% \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. \gobble % eat return } % @display/@smalldisplay: same as @lisp except keep current font. % \makedispenv {display}{% \nonfillstart \gobble } % @format/@smallformat: same as @display except don't narrow margins. % \makedispenv{format}{% \let\nonarrowing = t% \nonfillstart \gobble } % @flushleft: same as @format, but doesn't obey \SETdispenvsize. \envdef\flushleft{% \let\nonarrowing = t% \nonfillstart \gobble } \let\Eflushleft = \afterenvbreak % @flushright. % \envdef\flushright{% \let\nonarrowing = t% \nonfillstart \advance\leftskip by 0pt plus 1fill \gobble } \let\Eflushright = \afterenvbreak % @raggedright does more-or-less normal line breaking but no right % justification. From plain.tex. \envdef\raggedright{% \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax } \let\Eraggedright\par \envdef\raggedleft{% \parindent=0pt \leftskip0pt plus2em \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt \hbadness=10000 % Last line will usually be underfull, so turn off % badness reporting. } \let\Eraggedleft\par \envdef\raggedcenter{% \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt \hbadness=10000 % Last line will usually be underfull, so turn off % badness reporting. } \let\Eraggedcenter\par % @quotation does normal linebreaking (hence we can't use \nonfillstart) % and narrows the margins. We keep \parskip nonzero in general, since % we're doing normal filling. So, when using \aboveenvbreak and % \afterenvbreak, temporarily make \parskip 0. % \def\quotationstart{% {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip \parindent=0pt % % @cartouche defines \nonarrowing to inhibit narrowing at next level down. \ifx\nonarrowing\relax \advance\leftskip by \lispnarrowing \advance\rightskip by \lispnarrowing \exdentamount = \lispnarrowing \else \let\nonarrowing = \relax \fi \parsearg\quotationlabel } \envdef\quotation{% \setnormaldispenv \quotationstart } \envdef\smallquotation{% \setsmalldispenv \quotationstart } \let\Esmallquotation = \Equotation % We have retained a nonzero parskip for the environment, since we're % doing normal filling. % \def\Equotation{% \par \ifx\quotationauthor\undefined\else % indent a bit. \leftline{\kern 2\leftskip \sl ---\quotationauthor}% \fi {\parskip=0pt \afterenvbreak}% } % If we're given an argument, typeset it in bold with a colon after. \def\quotationlabel#1{% \def\temp{#1}% \ifx\temp\empty \else {\bf #1: }% \fi } % LaTeX-like @verbatim...@end verbatim and @verb{...} % If we want to allow any as delimiter, % we need the curly braces so that makeinfo sees the @verb command, eg: % `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org % % [Knuth]: Donald Ervin Knuth, 1996. The TeXbook. % % [Knuth] p.344; only we need to do the other characters Texinfo sets % active too. Otherwise, they get lost as the first character on a % verbatim line. \def\dospecials{% \do\ \do\\\do\{\do\}\do\$\do\&% \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~% \do\<\do\>\do\|\do\@\do+\do\"% % Don't do the quotes -- if we do, @set txicodequoteundirected and % @set txicodequotebacktick will not have effect on @verb and % @verbatim, and ?` and !` ligatures won't get disabled. %\do\`\do\'% } % % [Knuth] p. 380 \def\uncatcodespecials{% \def\do##1{\catcode`##1=\other}\dospecials} % % Setup for the @verb command. % % Eight spaces for a tab \begingroup \catcode`\^^I=\active \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }} \endgroup % \def\setupverb{% \tt % easiest (and conventionally used) font for verbatim \def\par{\leavevmode\endgraf}% \setupmarkupstyle{verb}% \tabeightspaces % Respect line breaks, % print special symbols as themselves, and % make each space count % must do in this order: \obeylines \uncatcodespecials \sepspaces } % Setup for the @verbatim environment % % Real tab expansion \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount % \def\starttabbox{\setbox0=\hbox\bgroup} % \begingroup \catcode`\^^I=\active \gdef\tabexpand{% \catcode`\^^I=\active \def^^I{\leavevmode\egroup \dimen0=\wd0 % the width so far, or since the previous tab \divide\dimen0 by\tabw \multiply\dimen0 by\tabw % compute previous multiple of \tabw \advance\dimen0 by\tabw % advance to next multiple of \tabw \wd0=\dimen0 \box0 \starttabbox }% } \endgroup % start the verbatim environment. \def\setupverbatim{% \let\nonarrowing = t% \nonfillstart % Easiest (and conventionally used) font for verbatim \tt \def\par{\leavevmode\egroup\box0\endgraf}% \tabexpand \setupmarkupstyle{verbatim}% % Respect line breaks, % print special symbols as themselves, and % make each space count % must do in this order: \obeylines \uncatcodespecials \sepspaces \everypar{\starttabbox}% } % Do the @verb magic: verbatim text is quoted by unique % delimiter characters. Before first delimiter expect a % right brace, after last delimiter expect closing brace: % % \def\doverb'{'#1'}'{#1} % % [Knuth] p. 382; only eat outer {} \begingroup \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next] \endgroup % \def\verb{\begingroup\setupverb\doverb} % % % Do the @verbatim magic: define the macro \doverbatim so that % the (first) argument ends when '@end verbatim' is reached, ie: % % \def\doverbatim#1@end verbatim{#1} % % For Texinfo it's a lot easier than for LaTeX, % because texinfo's \verbatim doesn't stop at '\end{verbatim}': % we need not redefine '\', '{' and '}'. % % Inspired by LaTeX's verbatim command set [latex.ltx] % \begingroup \catcode`\ =\active \obeylines % % ignore everything up to the first ^^M, that's the newline at the end % of the @verbatim input line itself. Otherwise we get an extra blank % line in the output. \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}% % We really want {...\end verbatim} in the body of the macro, but % without the active space; thus we have to use \xdef and \gobble. \endgroup % \envdef\verbatim{% \setupverbatim\doverbatim } \let\Everbatim = \afterenvbreak % @verbatiminclude FILE - insert text of file in verbatim environment. % \def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude} % \def\doverbatiminclude#1{% {% \makevalueexpandable \setupverbatim \indexnofonts % Allow `@@' and other weird things in file names. \input #1 \afterenvbreak }% } % @copying ... @end copying. % Save the text away for @insertcopying later. % % We save the uninterpreted tokens, rather than creating a box. % Saving the text in a box would be much easier, but then all the % typesetting commands (@smallbook, font changes, etc.) have to be done % beforehand -- and a) we want @copying to be done first in the source % file; b) letting users define the frontmatter in as flexible order as % possible is very desirable. % \def\copying{\checkenv{}\begingroup\scanargctxt\docopying} \def\docopying#1@end copying{\endgroup\def\copyingtext{#1}} % \def\insertcopying{% \begingroup \parindent = 0pt % paragraph indentation looks wrong on title page \scanexp\copyingtext \endgroup } \message{defuns,} % @defun etc. \newskip\defbodyindent \defbodyindent=.4in \newskip\defargsindent \defargsindent=50pt \newskip\deflastargmargin \deflastargmargin=18pt \newcount\defunpenalty % Start the processing of @deffn: \def\startdefun{% \ifnum\lastpenalty<10000 \medbreak \defunpenalty=10003 % Will keep this @deffn together with the % following @def command, see below. \else % If there are two @def commands in a row, we'll have a \nobreak, % which is there to keep the function description together with its % header. But if there's nothing but headers, we need to allow a % break somewhere. Check specifically for penalty 10002, inserted % by \printdefunline, instead of 10000, since the sectioning % commands also insert a nobreak penalty, and we don't want to allow % a break between a section heading and a defun. % % As a minor refinement, we avoid "club" headers by signalling % with penalty of 10003 after the very first @deffn in the % sequence (see above), and penalty of 10002 after any following % @def command. \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi % % Similarly, after a section heading, do not allow a break. % But do insert the glue. \medskip % preceded by discardable penalty, so not a breakpoint \fi % \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent } \def\dodefunx#1{% % First, check whether we are in the right environment: \checkenv#1% % % As above, allow line break if we have multiple x headers in a row. % It's not a great place, though. \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi % % And now, it's time to reuse the body of the original defun: \expandafter\gobbledefun#1% } \def\gobbledefun#1\startdefun{} % \printdefunline \deffnheader{text} % \def\printdefunline#1#2{% \begingroup % call \deffnheader: #1#2 \endheader % common ending: \interlinepenalty = 10000 \advance\rightskip by 0pt plus 1fil \endgraf \nobreak\vskip -\parskip \penalty\defunpenalty % signal to \startdefun and \dodefunx % Some of the @defun-type tags do not enable magic parentheses, % rendering the following check redundant. But we don't optimize. \checkparencounts \endgroup } \def\Edefun{\endgraf\medbreak} % \makedefun{deffn} creates \deffn, \deffnx and \Edeffn; % the only thing remaining is to define \deffnheader. % \def\makedefun#1{% \expandafter\let\csname E#1\endcsname = \Edefun \edef\temp{\noexpand\domakedefun \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}% \temp } % \domakedefun \deffn \deffnx \deffnheader % % Define \deffn and \deffnx, without parameters. % \deffnheader has to be defined explicitly. % \def\domakedefun#1#2#3{% \envdef#1{% \startdefun \parseargusing\activeparens{\printdefunline#3}% }% \def#2{\dodefunx#1}% \def#3% } %%% Untyped functions: % @deffn category name args \makedefun{deffn}{\deffngeneral{}} % @deffn category class name args \makedefun{defop}#1 {\defopon{#1\ \putwordon}} % \defopon {category on}class name args \def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } % \deffngeneral {subind}category name args % \def\deffngeneral#1#2 #3 #4\endheader{% % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}. \dosubind{fn}{\code{#3}}{#1}% \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}% } %%% Typed functions: % @deftypefn category type name args \makedefun{deftypefn}{\deftypefngeneral{}} % @deftypeop category class type name args \makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}} % \deftypeopon {category on}class type name args \def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } % \deftypefngeneral {subind}category type name args % \def\deftypefngeneral#1#2 #3 #4 #5\endheader{% \dosubind{fn}{\code{#4}}{#1}% \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } %%% Typed variables: % @deftypevr category type var args \makedefun{deftypevr}{\deftypecvgeneral{}} % @deftypecv category class type var args \makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}} % \deftypecvof {category of}class type var args \def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} } % \deftypecvgeneral {subind}category type var args % \def\deftypecvgeneral#1#2 #3 #4 #5\endheader{% \dosubind{vr}{\code{#4}}{#1}% \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } %%% Untyped variables: % @defvr category var args \makedefun{defvr}#1 {\deftypevrheader{#1} {} } % @defcv category class var args \makedefun{defcv}#1 {\defcvof{#1\ \putwordof}} % \defcvof {category of}class var args \def\defcvof#1#2 {\deftypecvof{#1}#2 {} } %%% Type: % @deftp category name args \makedefun{deftp}#1 #2 #3\endheader{% \doind{tp}{\code{#2}}% \defname{#1}{}{#2}\defunargs{#3\unskip}% } % Remaining @defun-like shortcuts: \makedefun{defun}{\deffnheader{\putwordDeffunc} } \makedefun{defmac}{\deffnheader{\putwordDefmac} } \makedefun{defspec}{\deffnheader{\putwordDefspec} } \makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} } \makedefun{defvar}{\defvrheader{\putwordDefvar} } \makedefun{defopt}{\defvrheader{\putwordDefopt} } \makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} } \makedefun{defmethod}{\defopon\putwordMethodon} \makedefun{deftypemethod}{\deftypeopon\putwordMethodon} \makedefun{defivar}{\defcvof\putwordInstanceVariableof} \makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof} % \defname, which formats the name of the @def (not the args). % #1 is the category, such as "Function". % #2 is the return type, if any. % #3 is the function name. % % We are followed by (but not passed) the arguments, if any. % \def\defname#1#2#3{% % Get the values of \leftskip and \rightskip as they were outside the @def... \advance\leftskip by -\defbodyindent % % How we'll format the type name. Putting it in brackets helps % distinguish it from the body text that may end up on the next line % just below it. \def\temp{#1}% \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi} % % Figure out line sizes for the paragraph shape. % The first line needs space for \box0; but if \rightskip is nonzero, % we need only space for the part of \box0 which exceeds it: \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip % The continuations: \dimen2=\hsize \advance\dimen2 by -\defargsindent % (plain.tex says that \dimen1 should be used only as global.) \parshape 2 0in \dimen0 \defargsindent \dimen2 % % Put the type name to the right margin. \noindent \hbox to 0pt{% \hfil\box0 \kern-\hsize % \hsize has to be shortened this way: \kern\leftskip % Intentionally do not respect \rightskip, since we need the space. }% % % Allow all lines to be underfull without complaint: \tolerance=10000 \hbadness=10000 \exdentamount=\defbodyindent {% % defun fonts. We use typewriter by default (used to be bold) because: % . we're printing identifiers, they should be in tt in principle. % . in languages with many accents, such as Czech or French, it's % common to leave accents off identifiers. The result looks ok in % tt, but exceedingly strange in rm. % . we don't want -- and --- to be treated as ligatures. % . this still does not fix the ?` and !` ligatures, but so far no % one has made identifiers using them :). \df \tt \def\temp{#2}% return value type \ifx\temp\empty\else \tclose{\temp} \fi #3% output function name }% {\rm\enskip}% hskip 0.5 em of \tenrm % \boldbrax % arguments will be output next, if any. } % Print arguments in slanted roman (not ttsl), inconsistently with using % tt for the name. This is because literal text is sometimes needed in % the argument list (groff manual), and ttsl and tt are not very % distinguishable. Prevent hyphenation at `-' chars. % \def\defunargs#1{% % use sl by default (not ttsl), % tt for the names. \df \sl \hyphenchar\font=0 % % On the other hand, if an argument has two dashes (for instance), we % want a way to get ttsl. Let's try @var for that. \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}% #1% \sl\hyphenchar\font=45 } % We want ()&[] to print specially on the defun line. % \def\activeparens{% \catcode`\(=\active \catcode`\)=\active \catcode`\[=\active \catcode`\]=\active \catcode`\&=\active } % Make control sequences which act like normal parenthesis chars. \let\lparen = ( \let\rparen = ) % Be sure that we always have a definition for `(', etc. For example, % if the fn name has parens in it, \boldbrax will not be in effect yet, % so TeX would otherwise complain about undefined control sequence. { \activeparens \global\let(=\lparen \global\let)=\rparen \global\let[=\lbrack \global\let]=\rbrack \global\let& = \& \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} \gdef\magicamp{\let&=\amprm} } \newcount\parencount % If we encounter &foo, then turn on ()-hacking afterwards \newif\ifampseen \def\amprm#1 {\ampseentrue{\bf\ }} \def\parenfont{% \ifampseen % At the first level, print parens in roman, % otherwise use the default font. \ifnum \parencount=1 \rm \fi \else % The \sf parens (in \boldbrax) actually are a little bolder than % the contained text. This is especially needed for [ and ] . \sf \fi } \def\infirstlevel#1{% \ifampseen \ifnum\parencount=1 #1% \fi \fi } \def\bfafterword#1 {#1 \bf} \def\opnr{% \global\advance\parencount by 1 {\parenfont(}% \infirstlevel \bfafterword } \def\clnr{% {\parenfont)}% \infirstlevel \sl \global\advance\parencount by -1 } \newcount\brackcount \def\lbrb{% \global\advance\brackcount by 1 {\bf[}% } \def\rbrb{% {\bf]}% \global\advance\brackcount by -1 } \def\checkparencounts{% \ifnum\parencount=0 \else \badparencount \fi \ifnum\brackcount=0 \else \badbrackcount \fi } % these should not use \errmessage; the glibc manual, at least, actually % has such constructs (when documenting function pointers). \def\badparencount{% \message{Warning: unbalanced parentheses in @def...}% \global\parencount=0 } \def\badbrackcount{% \message{Warning: unbalanced square brackets in @def...}% \global\brackcount=0 } \message{macros,} % @macro. % To do this right we need a feature of e-TeX, \scantokens, % which we arrange to emulate with a temporary file in ordinary TeX. \ifx\eTeXversion\undefined \newwrite\macscribble \def\scantokens#1{% \toks0={#1}% \immediate\openout\macscribble=\jobname.tmp \immediate\write\macscribble{\the\toks0}% \immediate\closeout\macscribble \input \jobname.tmp } \fi \def\scanmacro#1{% \begingroup \newlinechar`\^^M \let\xeatspaces\eatspaces % Undo catcode changes of \startcontents and \doprintindex % When called from @insertcopying or (short)caption, we need active % backslash to get it printed correctly. Previously, we had % \catcode`\\=\other instead. We'll see whether a problem appears % with macro expansion. --kasal, 19aug04 \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ % ... and \example \spaceisspace % % Append \endinput to make sure that TeX does not see the ending newline. % I've verified that it is necessary both for e-TeX and for ordinary TeX % --kasal, 29nov03 \scantokens{#1\endinput}% \endgroup } \def\scanexp#1{% \edef\temp{\noexpand\scanmacro{#1}}% \temp } \newcount\paramno % Count of parameters \newtoks\macname % Macro name \newif\ifrecursive % Is it recursive? % List of all defined macros in the form % \definedummyword\macro1\definedummyword\macro2... % Currently is also contains all @aliases; the list can be split % if there is a need. \def\macrolist{} % Add the macro to \macrolist \def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname} \def\addtomacrolistxxx#1{% \toks0 = \expandafter{\macrolist\definedummyword#1}% \xdef\macrolist{\the\toks0}% } % Utility routines. % This does \let #1 = #2, with \csnames; that is, % \let \csname#1\endcsname = \csname#2\endcsname % (except of course we have to play expansion games). % \def\cslet#1#2{% \expandafter\let \csname#1\expandafter\endcsname \csname#2\endcsname } % Trim leading and trailing spaces off a string. % Concepts from aro-bend problem 15 (see CTAN). {\catcode`\@=11 \gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }} \gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@} \gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @} \def\unbrace#1{#1} \unbrace{\gdef\trim@@@ #1 } #2@{#1} } % Trim a single trailing ^^M off a string. {\catcode`\^^M=\other \catcode`\Q=3% \gdef\eatcr #1{\eatcra #1Q^^MQ}% \gdef\eatcra#1^^MQ{\eatcrb#1Q}% \gdef\eatcrb#1Q#2Q{#1}% } % Macro bodies are absorbed as an argument in a context where % all characters are catcode 10, 11 or 12, except \ which is active % (as in normal texinfo). It is necessary to change the definition of \. % Non-ASCII encodings make 8-bit characters active, so un-activate % them to avoid their expansion. Must do this non-globally, to % confine the change to the current group. % It's necessary to have hard CRs when the macro is executed. This is % done by making ^^M (\endlinechar) catcode 12 when reading the macro % body, and then making it the \newlinechar in \scanmacro. \def\scanctxt{% \catcode`\"=\other \catcode`\+=\other \catcode`\<=\other \catcode`\>=\other \catcode`\@=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other \catcode`\~=\other \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi } \def\scanargctxt{% \scanctxt \catcode`\\=\other \catcode`\^^M=\other } \def\macrobodyctxt{% \scanctxt \catcode`\{=\other \catcode`\}=\other \catcode`\^^M=\other \usembodybackslash } \def\macroargctxt{% \scanctxt \catcode`\\=\other } % \mbodybackslash is the definition of \ in @macro bodies. % It maps \foo\ => \csname macarg.foo\endcsname => #N % where N is the macro parameter number. % We define \csname macarg.\endcsname to be \realbackslash, so % \\ in macro replacement text gets you a backslash. {\catcode`@=0 @catcode`@\=@active @gdef@usembodybackslash{@let\=@mbodybackslash} @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} } \expandafter\def\csname macarg.\endcsname{\realbackslash} \def\macro{\recursivefalse\parsearg\macroxxx} \def\rmacro{\recursivetrue\parsearg\macroxxx} \def\macroxxx#1{% \getargs{#1}% now \macname is the macname and \argl the arglist \ifx\argl\empty % no arguments \paramno=0% \else \expandafter\parsemargdef \argl;% \fi \if1\csname ismacro.\the\macname\endcsname \message{Warning: redefining \the\macname}% \else \expandafter\ifx\csname \the\macname\endcsname \relax \else \errmessage{Macro name \the\macname\space already defined}\fi \global\cslet{macsave.\the\macname}{\the\macname}% \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% \addtomacrolist{\the\macname}% \fi \begingroup \macrobodyctxt \ifrecursive \expandafter\parsermacbody \else \expandafter\parsemacbody \fi} \parseargdef\unmacro{% \if1\csname ismacro.#1\endcsname \global\cslet{#1}{macsave.#1}% \global\expandafter\let \csname ismacro.#1\endcsname=0% % Remove the macro name from \macrolist: \begingroup \expandafter\let\csname#1\endcsname \relax \let\definedummyword\unmacrodo \xdef\macrolist{\macrolist}% \endgroup \else \errmessage{Macro #1 not defined}% \fi } % Called by \do from \dounmacro on each macro. The idea is to omit any % macro definitions that have been changed to \relax. % \def\unmacrodo#1{% \ifx #1\relax % remove this \else \noexpand\definedummyword \noexpand#1% \fi } % This makes use of the obscure feature that if the last token of a % is #, then the preceding argument is delimited by % an opening brace, and that opening brace is not consumed. \def\getargs#1{\getargsxxx#1{}} \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} \def\getmacname #1 #2\relax{\macname={#1}} \def\getmacargs#1{\def\argl{#1}} % Parse the optional {params} list. Set up \paramno and \paramlist % so \defmacro knows what to do. Define \macarg.blah for each blah % in the params list, to be ##N where N is the position in that list. % That gets used by \mbodybackslash (above). % We need to get `macro parameter char #' into several definitions. % The technique used is stolen from LaTeX: let \hash be something % unexpandable, insert that wherever you need a #, and then redefine % it to # just before using the token list produced. % % The same technique is used to protect \eatspaces till just before % the macro is used. \def\parsemargdef#1;{\paramno=0\def\paramlist{}% \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,} \def\parsemargdefxxx#1,{% \if#1;\let\next=\relax \else \let\next=\parsemargdefxxx \advance\paramno by 1% \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname {\xeatspaces{\hash\the\paramno}}% \edef\paramlist{\paramlist\hash\the\paramno,}% \fi\next} % These two commands read recursive and nonrecursive macro bodies. % (They're different since rec and nonrec macros end differently.) \long\def\parsemacbody#1@end macro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% \long\def\parsermacbody#1@end rmacro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% % This defines the macro itself. There are six cases: recursive and % nonrecursive macros of zero, one, and many arguments. % Much magic with \expandafter here. % \xdef is used so that macro definitions will survive the file % they're defined in; @include reads the file inside a group. \def\defmacro{% \let\hash=##% convert placeholders to macro parameter chars \ifrecursive \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\scanmacro{\temp}}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\braceorline \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \egroup\noexpand\scanmacro{\temp}}% \else % many \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\csname\the\macname xx\endcsname}% \expandafter\xdef\csname\the\macname xx\endcsname##1{% \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% \expandafter\expandafter \expandafter\xdef \expandafter\expandafter \csname\the\macname xxx\endcsname \paramlist{\egroup\noexpand\scanmacro{\temp}}% \fi \else \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\braceorline \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \egroup \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \else % many \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \expandafter\noexpand\csname\the\macname xx\endcsname}% \expandafter\xdef\csname\the\macname xx\endcsname##1{% \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% \expandafter\expandafter \expandafter\xdef \expandafter\expandafter \csname\the\macname xxx\endcsname \paramlist{% \egroup \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \fi \fi} \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} % \braceorline decides whether the next nonwhitespace character is a % {. If so it reads up to the closing }, if not, it reads the whole % line. Whatever was read is then fed to the next control sequence % as an argument (by \parsebrace or \parsearg) \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} \def\braceorlinexxx{% \ifx\nchar\bgroup\else \expandafter\parsearg \fi \macnamexxx} % @alias. % We need some trickery to remove the optional spaces around the equal % sign. Just make them active and then expand them all to nothing. \def\alias{\parseargusing\obeyspaces\aliasxxx} \def\aliasxxx #1{\aliasyyy#1\relax} \def\aliasyyy #1=#2\relax{% {% \expandafter\let\obeyedspace=\empty \addtomacrolist{#1}% \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}% }% \next } \message{cross references,} \newwrite\auxfile \newif\ifhavexrefs % True if xref values are known. \newif\ifwarnedxrefs % True if we warned once that they aren't known. % @inforef is relatively simple. \def\inforef #1{\inforefzzz #1,,,,**} \def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, node \samp{\ignorespaces#1{}}} % @node's only job in TeX is to define \lastnode, which is used in % cross-references. The @node line might or might not have commas, and % might or might not have spaces before the first comma, like: % @node foo , bar , ... % We don't want such trailing spaces in the node name. % \parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse} % % also remove a trailing comma, in case of something like this: % @node Help-Cross, , , Cross-refs \def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse} \def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}} \let\nwnode=\node \let\lastnode=\empty % Write a cross-reference definition for the current node. #1 is the % type (Ynumbered, Yappendix, Ynothing). % \def\donoderef#1{% \ifx\lastnode\empty\else \setref{\lastnode}{#1}% \global\let\lastnode=\empty \fi } % @anchor{NAME} -- define xref target at arbitrary point. % \newcount\savesfregister % \def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} \def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} \def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} % \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an % anchor), which consists of three parts: % 1) NAME-title - the current sectioning name taken from \lastsection, % or the anchor name. % 2) NAME-snt - section number and type, passed as the SNT arg, or % empty for anchors. % 3) NAME-pg - the page number. % % This is called from \donoderef, \anchor, and \dofloat. In the case of % floats, there is an additional part, which is not written here: % 4) NAME-lof - the text as it should appear in a @listoffloats. % \def\setref#1#2{% \pdfmkdest{#1}% \iflinks {% \atdummies % preserve commands, but don't expand them \edef\writexrdef##1##2{% \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef ##1}{##2}}% these are parameters of \writexrdef }% \toks0 = \expandafter{\lastsection}% \immediate \writexrdef{title}{\the\toks0 }% \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, during \shipout }% \fi } % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is % the node name, #2 the name of the Info cross-reference, #3 the printed % node name, #4 the name of the Info file, #5 the name of the printed % manual. All but the node name can be omitted. % \def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} \def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} \def\ref#1{\xrefX[#1,,,,,,,]} \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup \unsepspaces \def\printedmanual{\ignorespaces #5}% \def\printedrefname{\ignorespaces #3}% \setbox1=\hbox{\printedmanual\unskip}% \setbox0=\hbox{\printedrefname\unskip}% \ifdim \wd0 = 0pt % No printed node name was explicitly given. \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax % Use the node name inside the square brackets. \def\printedrefname{\ignorespaces #1}% \else % Use the actual chapter/section title appear inside % the square brackets. Use the real section title if we have it. \ifdim \wd1 > 0pt % It is in another manual, so we don't have it. \def\printedrefname{\ignorespaces #1}% \else \ifhavexrefs % We know the real title if we have the xref values. \def\printedrefname{\refx{#1-title}{}}% \else % Otherwise just copy the Info node name. \def\printedrefname{\ignorespaces #1}% \fi% \fi \fi \fi % % Make link in pdf output. \ifpdf {\indexnofonts \turnoffactive % This expands tokens, so do it after making catcode changes, so _ % etc. don't get their TeX definitions. \getfilename{#4}% % % See comments at \activebackslashdouble. {\activebackslashdouble \xdef\pdfxrefdest{#1}% \backslashparens\pdfxrefdest}% % \leavevmode \startlink attr{/Border [0 0 0]}% \ifnum\filenamelength>0 goto file{\the\filename.pdf} name{\pdfxrefdest}% \else goto name{\pdfmkpgn{\pdfxrefdest}}% \fi }% \setcolor{\linkcolor}% \fi % % Float references are printed completely differently: "Figure 1.2" % instead of "[somenode], p.3". We distinguish them by the % LABEL-title being set to a magic string. {% % Have to otherify everything special to allow the \csname to % include an _ in the xref name, etc. \indexnofonts \turnoffactive \expandafter\global\expandafter\let\expandafter\Xthisreftitle \csname XR#1-title\endcsname }% \iffloat\Xthisreftitle % If the user specified the print name (third arg) to the ref, % print it instead of our usual "Figure 1.2". \ifdim\wd0 = 0pt \refx{#1-snt}{}% \else \printedrefname \fi % % if the user also gave the printed manual name (fifth arg), append % "in MANUALNAME". \ifdim \wd1 > 0pt \space \putwordin{} \cite{\printedmanual}% \fi \else % node/anchor (non-float) references. % % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not % insert empty discretionaries after hyphens, which means that it will % not find a line break at a hyphen in a node names. Since some manuals % are best written with fairly long node names, containing hyphens, this % is a loss. Therefore, we give the text of the node name again, so it % is as if TeX is seeing it for the first time. \ifdim \wd1 > 0pt \putwordSection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}% \else % _ (for example) has to be the character _ for the purposes of the % control sequence corresponding to the node, but it has to expand % into the usual \leavevmode...\vrule stuff for purposes of % printing. So we \turnoffactive for the \refx-snt, back on for the % printing, back off for the \refx-pg. {\turnoffactive % Only output a following space if the -snt ref is nonempty; for % @unnumbered and @anchor, it won't be. \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi }% % output the `[mynode]' via a macro so it can be overridden. \xrefprintnodename\printedrefname % % But we always want a comma and a space: ,\space % % output the `page 3'. \turnoffactive \putwordpage\tie\refx{#1-pg}{}% \fi \fi \endlink \endgroup} % This macro is called from \xrefX for the `[nodename]' part of xref % output. It's a separate macro only so it can be changed more easily, % since square brackets don't work well in some documents. Particularly % one that Bob is working on :). % \def\xrefprintnodename#1{[#1]} % Things referred to by \setref. % \def\Ynothing{} \def\Yomitfromtoc{} \def\Ynumbered{% \ifnum\secno=0 \putwordChapter@tie \the\chapno \else \ifnum\subsecno=0 \putwordSection@tie \the\chapno.\the\secno \else \ifnum\subsubsecno=0 \putwordSection@tie \the\chapno.\the\secno.\the\subsecno \else \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno \fi\fi\fi } \def\Yappendix{% \ifnum\secno=0 \putwordAppendix@tie @char\the\appendixno{}% \else \ifnum\subsecno=0 \putwordSection@tie @char\the\appendixno.\the\secno \else \ifnum\subsubsecno=0 \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno \else \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno \fi\fi\fi } % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. % If its value is nonempty, SUFFIX is output afterward. % \def\refx#1#2{% {% \indexnofonts \otherbackslash \expandafter\global\expandafter\let\expandafter\thisrefX \csname XR#1\endcsname }% \ifx\thisrefX\relax % If not defined, say something at least. \angleleft un\-de\-fined\angleright \iflinks \ifhavexrefs \message{\linenumber Undefined cross reference `#1'.}% \else \ifwarnedxrefs\else \global\warnedxrefstrue \message{Cross reference values unknown; you must run TeX again.}% \fi \fi \fi \else % It's defined, so just use it. \thisrefX \fi #2% Output the suffix in any case. } % This is the macro invoked by entries in the aux file. Usually it's % just a \def (we prepend XR to the control sequence name to avoid % collisions). But if this is a float type, we have more work to do. % \def\xrdef#1#2{% {% The node name might contain 8-bit characters, which in our current % implementation are changed to commands like @'e. Don't let these % mess up the control sequence name. \indexnofonts \turnoffactive \xdef\safexrefname{#1}% }% % \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref % % Was that xref control sequence that we just defined for a float? \expandafter\iffloat\csname XR\safexrefname\endcsname % it was a float, and we have the (safe) float type in \iffloattype. \expandafter\let\expandafter\floatlist \csname floatlist\iffloattype\endcsname % % Is this the first time we've seen this float type? \expandafter\ifx\floatlist\relax \toks0 = {\do}% yes, so just \do \else % had it before, so preserve previous elements in list. \toks0 = \expandafter{\floatlist\do}% \fi % % Remember this xref in the control sequence \floatlistFLOATTYPE, % for later use in \listoffloats. \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0 {\safexrefname}}% \fi } % Read the last existing aux file, if any. No error if none exists. % \def\tryauxfile{% \openin 1 \jobname.aux \ifeof 1 \else \readdatafile{aux}% \global\havexrefstrue \fi \closein 1 } \def\setupdatafile{% \catcode`\^^@=\other \catcode`\^^A=\other \catcode`\^^B=\other \catcode`\^^C=\other \catcode`\^^D=\other \catcode`\^^E=\other \catcode`\^^F=\other \catcode`\^^G=\other \catcode`\^^H=\other \catcode`\^^K=\other \catcode`\^^L=\other \catcode`\^^N=\other \catcode`\^^P=\other \catcode`\^^Q=\other \catcode`\^^R=\other \catcode`\^^S=\other \catcode`\^^T=\other \catcode`\^^U=\other \catcode`\^^V=\other \catcode`\^^W=\other \catcode`\^^X=\other \catcode`\^^Z=\other \catcode`\^^[=\other \catcode`\^^\=\other \catcode`\^^]=\other \catcode`\^^^=\other \catcode`\^^_=\other % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc. % in xref tags, i.e., node names. But since ^^e4 notation isn't % supported in the main text, it doesn't seem desirable. Furthermore, % that is not enough: for node names that actually contain a ^ % character, we would end up writing a line like this: 'xrdef {'hat % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first % argument, and \hat is not an expandable control sequence. It could % all be worked out, but why? Either we support ^^ or we don't. % % The other change necessary for this was to define \auxhat: % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter % and then to call \auxhat in \setq. % \catcode`\^=\other % % Special characters. Should be turned off anyway, but... \catcode`\~=\other \catcode`\[=\other \catcode`\]=\other \catcode`\"=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\$=\other \catcode`\#=\other \catcode`\&=\other \catcode`\%=\other \catcode`+=\other % avoid \+ for paranoia even though we've turned it off % % This is to support \ in node names and titles, since the \ % characters end up in a \csname. It's easier than % leaving it active and making its active definition an actual \ % character. What I don't understand is why it works in the *value* % of the xrdef. Seems like it should be a catcode12 \, and that % should not typeset properly. But it works, so I'm moving on for % now. --karl, 15jan04. \catcode`\\=\other % % Make the characters 128-255 be printing characters. {% \count1=128 \def\loop{% \catcode\count1=\other \advance\count1 by 1 \ifnum \count1<256 \loop \fi }% }% % % @ is our escape character in .aux files, and we need braces. \catcode`\{=1 \catcode`\}=2 \catcode`\@=0 } \def\readdatafile#1{% \begingroup \setupdatafile \input\jobname.#1 \endgroup} \message{insertions,} % including footnotes. \newcount \footnoteno % The trailing space in the following definition for supereject is % vital for proper filling; pages come out unaligned when you do a % pagealignmacro call if that space before the closing brace is % removed. (Generally, numeric constants should always be followed by a % space to prevent strange expansion errors.) \def\supereject{\par\penalty -20000\footnoteno =0 } % @footnotestyle is meaningful for info output only. \let\footnotestyle=\comment {\catcode `\@=11 % % Auto-number footnotes. Otherwise like plain. \gdef\footnote{% \let\indent=\ptexindent \let\noindent=\ptexnoindent \global\advance\footnoteno by \@ne \edef\thisfootno{$^{\the\footnoteno}$}% % % In case the footnote comes at the end of a sentence, preserve the % extra spacing after we do the footnote number. \let\@sf\empty \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi % % Remove inadvertent blank space before typesetting the footnote number. \unskip \thisfootno\@sf \dofootnote }% % Don't bother with the trickery in plain.tex to not require the % footnote text as a parameter. Our footnotes don't need to be so general. % % Oh yes, they do; otherwise, @ifset (and anything else that uses % \parseargline) fails inside footnotes because the tokens are fixed when % the footnote is read. --karl, 16nov96. % \gdef\dofootnote{% \insert\footins\bgroup % We want to typeset this text as a normal paragraph, even if the % footnote reference occurs in (for example) a display environment. % So reset some parameters. \hsize=\pagewidth \interlinepenalty\interfootnotelinepenalty \splittopskip\ht\strutbox % top baseline for broken footnotes \splitmaxdepth\dp\strutbox \floatingpenalty\@MM \leftskip\z@skip \rightskip\z@skip \spaceskip\z@skip \xspaceskip\z@skip \parindent\defaultparindent % \smallfonts \rm % % Because we use hanging indentation in footnotes, a @noindent appears % to exdent this text, so make it be a no-op. makeinfo does not use % hanging indentation so @noindent can still be needed within footnote % text after an @example or the like (not that this is good style). \let\noindent = \relax % % Hang the footnote text off the number. Use \everypar in case the % footnote extends for more than one paragraph. \everypar = {\hang}% \textindent{\thisfootno}% % % Don't crash into the line above the footnote text. Since this % expands into a box, it must come within the paragraph, lest it % provide a place where TeX can split the footnote. \footstrut \futurelet\next\fo@t } }%end \catcode `\@=11 % In case a @footnote appears in a vbox, save the footnote text and create % the real \insert just after the vbox finished. Otherwise, the insertion % would be lost. % Similarly, if a @footnote appears inside an alignment, save the footnote % text to a box and make the \insert when a row of the table is finished. % And the same can be done for other insert classes. --kasal, 16nov03. % Replace the \insert primitive by a cheating macro. % Deeper inside, just make sure that the saved insertions are not spilled % out prematurely. % \def\startsavinginserts{% \ifx \insert\ptexinsert \let\insert\saveinsert \else \let\checkinserts\relax \fi } % This \insert replacement works for both \insert\footins{foo} and % \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}. % \def\saveinsert#1{% \edef\next{\noexpand\savetobox \makeSAVEname#1}% \afterassignment\next % swallow the left brace \let\temp = } \def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}} \def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1} \def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi} \def\placesaveins#1{% \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname {\box#1}% } % eat @SAVE -- beware, all of them have catcode \other: { \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-) \gdef\gobblesave @SAVE{} } % initialization: \def\newsaveins #1{% \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}% \next } \def\newsaveinsX #1{% \csname newbox\endcsname #1% \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts \checksaveins #1}% } % initialize: \let\checkinserts\empty \newsaveins\footins \newsaveins\margin % @image. We use the macros from epsf.tex to support this. % If epsf.tex is not installed and @image is used, we complain. % % Check for and read epsf.tex up front. If we read it only at @image % time, we might be inside a group, and then its definitions would get % undone and the next image would fail. \openin 1 = epsf.tex \ifeof 1 \else % Do not bother showing banner with epsf.tex v2.7k (available in % doc/epsf.tex and on ctan). \def\epsfannounce{\toks0 = }% \input epsf.tex \fi \closein 1 % % We will only complain once about lack of epsf.tex. \newif\ifwarnednoepsf \newhelp\noepsfhelp{epsf.tex must be installed for images to work. It is also included in the Texinfo distribution, or you can get it from ftp://tug.org/tex/epsf.tex.} % \def\image#1{% \ifx\epsfbox\undefined \ifwarnednoepsf \else \errhelp = \noepsfhelp \errmessage{epsf.tex not found, images will be ignored}% \global\warnednoepsftrue \fi \else \imagexxx #1,,,,,\finish \fi } % % Arguments to @image: % #1 is (mandatory) image filename; we tack on .eps extension. % #2 is (optional) width, #3 is (optional) height. % #4 is (ignored optional) html alt text. % #5 is (ignored optional) extension. % #6 is just the usual extra ignored arg for parsing this stuff. \newif\ifimagevmode \def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup \catcode`\^^M = 5 % in case we're inside an example \normalturnoffactive % allow _ et al. in names % If the image is by itself, center it. \ifvmode \imagevmodetrue \nobreak\medskip % Usually we'll have text after the image which will insert % \parskip glue, so insert it here too to equalize the space % above and below. \nobreak\vskip\parskip \nobreak \fi % % Leave vertical mode so that indentation from an enclosing % environment such as @quotation is respected. On the other hand, if % it's at the top level, we don't want the normal paragraph indentation. \noindent % % Output the image. \ifpdf \dopdfimage{#1}{#2}{#3}% \else % \epsfbox itself resets \epsf?size at each figure. \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi \epsfbox{#1.eps}% \fi % \ifimagevmode \medskip \fi % space after the standalone image \endgroup} % @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables, % etc. We don't actually implement floating yet, we always include the % float "here". But it seemed the best name for the future. % \envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish} % There may be a space before second and/or third parameter; delete it. \def\eatcommaspace#1, {#1,} % #1 is the optional FLOATTYPE, the text label for this float, typically % "Figure", "Table", "Example", etc. Can't contain commas. If omitted, % this float will not be numbered and cannot be referred to. % % #2 is the optional xref label. Also must be present for the float to % be referable. % % #3 is the optional positioning argument; for now, it is ignored. It % will somehow specify the positions allowed to float to (here, top, bottom). % % We keep a separate counter for each FLOATTYPE, which we reset at each % chapter-level command. \let\resetallfloatnos=\empty % \def\dofloat#1,#2,#3,#4\finish{% \let\thiscaption=\empty \let\thisshortcaption=\empty % % don't lose footnotes inside @float. % % BEWARE: when the floats start float, we have to issue warning whenever an % insert appears inside a float which could possibly float. --kasal, 26may04 % \startsavinginserts % % We can't be used inside a paragraph. \par % \vtop\bgroup \def\floattype{#1}% \def\floatlabel{#2}% \def\floatloc{#3}% we do nothing with this yet. % \ifx\floattype\empty \let\safefloattype=\empty \else {% % the floattype might have accents or other special characters, % but we need to use it in a control sequence name. \indexnofonts \turnoffactive \xdef\safefloattype{\floattype}% }% \fi % % If label is given but no type, we handle that as the empty type. \ifx\floatlabel\empty \else % We want each FLOATTYPE to be numbered separately (Figure 1, % Table 1, Figure 2, ...). (And if no label, no number.) % \expandafter\getfloatno\csname\safefloattype floatno\endcsname \global\advance\floatno by 1 % {% % This magic value for \lastsection is output by \setref as the % XREFLABEL-title value. \xrefX uses it to distinguish float % labels (which have a completely different output format) from % node and anchor labels. And \xrdef uses it to construct the % lists of floats. % \edef\lastsection{\floatmagic=\safefloattype}% \setref{\floatlabel}{Yfloat}% }% \fi % % start with \parskip glue, I guess. \vskip\parskip % % Don't suppress indentation if a float happens to start a section. \restorefirstparagraphindent } % we have these possibilities: % @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap % @float Foo,lbl & no caption: Foo 1.1 % @float Foo & @caption{Cap}: Foo: Cap % @float Foo & no caption: Foo % @float ,lbl & Caption{Cap}: 1.1: Cap % @float ,lbl & no caption: 1.1 % @float & @caption{Cap}: Cap % @float & no caption: % \def\Efloat{% \let\floatident = \empty % % In all cases, if we have a float type, it comes first. \ifx\floattype\empty \else \def\floatident{\floattype}\fi % % If we have an xref label, the number comes next. \ifx\floatlabel\empty \else \ifx\floattype\empty \else % if also had float type, need tie first. \appendtomacro\floatident{\tie}% \fi % the number. \appendtomacro\floatident{\chaplevelprefix\the\floatno}% \fi % % Start the printed caption with what we've constructed in % \floatident, but keep it separate; we need \floatident again. \let\captionline = \floatident % \ifx\thiscaption\empty \else \ifx\floatident\empty \else \appendtomacro\captionline{: }% had ident, so need a colon between \fi % % caption text. \appendtomacro\captionline{\scanexp\thiscaption}% \fi % % If we have anything to print, print it, with space before. % Eventually this needs to become an \insert. \ifx\captionline\empty \else \vskip.5\parskip \captionline % % Space below caption. \vskip\parskip \fi % % If have an xref label, write the list of floats info. Do this % after the caption, to avoid chance of it being a breakpoint. \ifx\floatlabel\empty \else % Write the text that goes in the lof to the aux file as % \floatlabel-lof. Besides \floatident, we include the short % caption if specified, else the full caption if specified, else nothing. {% \atdummies % % since we read the caption text in the macro world, where ^^M % is turned into a normal character, we have to scan it back, so % we don't write the literal three characters "^^M" into the aux file. \scanexp{% \xdef\noexpand\gtemp{% \ifx\thisshortcaption\empty \thiscaption \else \thisshortcaption \fi }% }% \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident \ifx\gtemp\empty \else : \gtemp \fi}}% }% \fi \egroup % end of \vtop % % place the captured inserts % % BEWARE: when the floats start floating, we have to issue warning % whenever an insert appears inside a float which could possibly % float. --kasal, 26may04 % \checkinserts } % Append the tokens #2 to the definition of macro #1, not expanding either. % \def\appendtomacro#1#2{% \expandafter\def\expandafter#1\expandafter{#1#2}% } % @caption, @shortcaption % \def\caption{\docaption\thiscaption} \def\shortcaption{\docaption\thisshortcaption} \def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption} \def\defcaption#1#2{\egroup \def#1{#2}} % The parameter is the control sequence identifying the counter we are % going to use. Create it if it doesn't exist and assign it to \floatno. \def\getfloatno#1{% \ifx#1\relax % Haven't seen this figure type before. \csname newcount\endcsname #1% % % Remember to reset this floatno at the next chap. \expandafter\gdef\expandafter\resetallfloatnos \expandafter{\resetallfloatnos #1=0 }% \fi \let\floatno#1% } % \setref calls this to get the XREFLABEL-snt value. We want an @xref % to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we % first read the @float command. % \def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}% % Magic string used for the XREFLABEL-title value, so \xrefX can % distinguish floats from other xref types. \def\floatmagic{!!float!!} % #1 is the control sequence we are passed; we expand into a conditional % which is true if #1 represents a float ref. That is, the magic % \lastsection value which we \setref above. % \def\iffloat#1{\expandafter\doiffloat#1==\finish} % % #1 is (maybe) the \floatmagic string. If so, #2 will be the % (safe) float type for this float. We set \iffloattype to #2. % \def\doiffloat#1=#2=#3\finish{% \def\temp{#1}% \def\iffloattype{#2}% \ifx\temp\floatmagic } % @listoffloats FLOATTYPE - print a list of floats like a table of contents. % \parseargdef\listoffloats{% \def\floattype{#1}% floattype {% % the floattype might have accents or other special characters, % but we need to use it in a control sequence name. \indexnofonts \turnoffactive \xdef\safefloattype{\floattype}% }% % % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE. \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax \ifhavexrefs % if the user said @listoffloats foo but never @float foo. \message{\linenumber No `\safefloattype' floats to list.}% \fi \else \begingroup \leftskip=\tocindent % indent these entries like a toc \let\do=\listoffloatsdo \csname floatlist\safefloattype\endcsname \endgroup \fi } % This is called on each entry in a list of floats. We're passed the % xref label, in the form LABEL-title, which is how we save it in the % aux file. We strip off the -title and look up \XRLABEL-lof, which % has the text we're supposed to typeset here. % % Figures without xref labels will not be included in the list (since % they won't appear in the aux file). % \def\listoffloatsdo#1{\listoffloatsdoentry#1\finish} \def\listoffloatsdoentry#1-title\finish{{% % Can't fully expand XR#1-lof because it can contain anything. Just % pass the control sequence. On the other hand, XR#1-pg is just the % page number, and we want to fully expand that so we can get a link % in pdf output. \toksA = \expandafter{\csname XR#1-lof\endcsname}% % % use the same \entry macro we use to generate the TOC and index. \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}% \writeentry }} \message{localization,} % For single-language documents, @documentlanguage is usually given very % early, just after @documentencoding. Single argument is the language % (de) or locale (de_DE) abbreviation. % { \catcode`\_ = \active \globaldefs=1 \parseargdef\documentlanguage{\begingroup \let_=\normalunderscore % normal _ character for filenames \tex % read txi-??.tex file in plain TeX. % Read the file by the name they passed if it exists. \openin 1 txi-#1.tex \ifeof 1 \documentlanguagetrywithoutunderscore{#1_\finish}% \else \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 \endgroup % end raw TeX \endgroup} % % If they passed de_DE, and txi-de_DE.tex doesn't exist, % try txi-de.tex. % \gdef\documentlanguagetrywithoutunderscore#1_#2\finish{% \openin 1 txi-#1.tex \ifeof 1 \errhelp = \nolanghelp \errmessage{Cannot read language file txi-#1.tex}% \else \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 } }% end of special _ catcode % \newhelp\nolanghelp{The given language definition file cannot be found or is empty. Maybe you need to install it? Putting it in the current directory should work if nowhere else does.} % This macro is called from txi-??.tex files; the first argument is the % \language name to set (without the "\lang@" prefix), the second and % third args are \{left,right}hyphenmin. % % The language names to pass are determined when the format is built. % See the etex.log file created at that time, e.g., % /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log. % % With TeX Live 2008, etex now includes hyphenation patterns for all % available languages. This means we can support hyphenation in % Texinfo, at least to some extent. (This still doesn't solve the % accented characters problem.) % \catcode`@=11 \def\txisetlanguage#1#2#3{% % do not set the language if the name is undefined in the current TeX. \expandafter\ifx\csname lang@#1\endcsname \relax \message{no patterns for #1}% \else \global\language = \csname lang@#1\endcsname \fi % but there is no harm in adjusting the hyphenmin values regardless. \global\lefthyphenmin = #2\relax \global\righthyphenmin = #3\relax } % Helpers for encodings. % Set the catcode of characters 128 through 255 to the specified number. % \def\setnonasciicharscatcode#1{% \count255=128 \loop\ifnum\count255<256 \global\catcode\count255=#1\relax \advance\count255 by 1 \repeat } \def\setnonasciicharscatcodenonglobal#1{% \count255=128 \loop\ifnum\count255<256 \catcode\count255=#1\relax \advance\count255 by 1 \repeat } % @documentencoding sets the definition of non-ASCII characters % according to the specified encoding. % \parseargdef\documentencoding{% % Encoding being declared for the document. \def\declaredencoding{\csname #1.enc\endcsname}% % % Supported encodings: names converted to tokens in order to be able % to compare them with \ifx. \def\ascii{\csname US-ASCII.enc\endcsname}% \def\latnine{\csname ISO-8859-15.enc\endcsname}% \def\latone{\csname ISO-8859-1.enc\endcsname}% \def\lattwo{\csname ISO-8859-2.enc\endcsname}% \def\utfeight{\csname UTF-8.enc\endcsname}% % \ifx \declaredencoding \ascii \asciichardefs % \else \ifx \declaredencoding \lattwo \setnonasciicharscatcode\active \lattwochardefs % \else \ifx \declaredencoding \latone \setnonasciicharscatcode\active \latonechardefs % \else \ifx \declaredencoding \latnine \setnonasciicharscatcode\active \latninechardefs % \else \ifx \declaredencoding \utfeight \setnonasciicharscatcode\active \utfeightchardefs % \else \message{Unknown document encoding #1, ignoring.}% % \fi % utfeight \fi % latnine \fi % latone \fi % lattwo \fi % ascii } % A message to be logged when using a character that isn't available % the default font encoding (OT1). % \def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}} % Take account of \c (plain) vs. \, (Texinfo) difference. \def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} % First, make active non-ASCII characters in order for them to be % correctly categorized when TeX reads the replacement text of % macros containing the character definitions. \setnonasciicharscatcode\active % % Latin1 (ISO-8859-1) character definitions. \def\latonechardefs{% \gdef^^a0{~} \gdef^^a1{\exclamdown} \gdef^^a2{\missingcharmsg{CENT SIGN}} \gdef^^a3{{\pounds}} \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} \gdef^^a5{\missingcharmsg{YEN SIGN}} \gdef^^a6{\missingcharmsg{BROKEN BAR}} \gdef^^a7{\S} \gdef^^a8{\"{}} \gdef^^a9{\copyright} \gdef^^aa{\ordf} \gdef^^ab{\guillemetleft} \gdef^^ac{$\lnot$} \gdef^^ad{\-} \gdef^^ae{\registeredsymbol} \gdef^^af{\={}} % \gdef^^b0{\textdegree} \gdef^^b1{$\pm$} \gdef^^b2{$^2$} \gdef^^b3{$^3$} \gdef^^b4{\'{}} \gdef^^b5{$\mu$} \gdef^^b6{\P} % \gdef^^b7{$^.$} \gdef^^b8{\cedilla\ } \gdef^^b9{$^1$} \gdef^^ba{\ordm} % \gdef^^bb{\guilletright} \gdef^^bc{$1\over4$} \gdef^^bd{$1\over2$} \gdef^^be{$3\over4$} \gdef^^bf{\questiondown} % \gdef^^c0{\`A} \gdef^^c1{\'A} \gdef^^c2{\^A} \gdef^^c3{\~A} \gdef^^c4{\"A} \gdef^^c5{\ringaccent A} \gdef^^c6{\AE} \gdef^^c7{\cedilla C} \gdef^^c8{\`E} \gdef^^c9{\'E} \gdef^^ca{\^E} \gdef^^cb{\"E} \gdef^^cc{\`I} \gdef^^cd{\'I} \gdef^^ce{\^I} \gdef^^cf{\"I} % \gdef^^d0{\DH} \gdef^^d1{\~N} \gdef^^d2{\`O} \gdef^^d3{\'O} \gdef^^d4{\^O} \gdef^^d5{\~O} \gdef^^d6{\"O} \gdef^^d7{$\times$} \gdef^^d8{\O} \gdef^^d9{\`U} \gdef^^da{\'U} \gdef^^db{\^U} \gdef^^dc{\"U} \gdef^^dd{\'Y} \gdef^^de{\TH} \gdef^^df{\ss} % \gdef^^e0{\`a} \gdef^^e1{\'a} \gdef^^e2{\^a} \gdef^^e3{\~a} \gdef^^e4{\"a} \gdef^^e5{\ringaccent a} \gdef^^e6{\ae} \gdef^^e7{\cedilla c} \gdef^^e8{\`e} \gdef^^e9{\'e} \gdef^^ea{\^e} \gdef^^eb{\"e} \gdef^^ec{\`{\dotless i}} \gdef^^ed{\'{\dotless i}} \gdef^^ee{\^{\dotless i}} \gdef^^ef{\"{\dotless i}} % \gdef^^f0{\dh} \gdef^^f1{\~n} \gdef^^f2{\`o} \gdef^^f3{\'o} \gdef^^f4{\^o} \gdef^^f5{\~o} \gdef^^f6{\"o} \gdef^^f7{$\div$} \gdef^^f8{\o} \gdef^^f9{\`u} \gdef^^fa{\'u} \gdef^^fb{\^u} \gdef^^fc{\"u} \gdef^^fd{\'y} \gdef^^fe{\th} \gdef^^ff{\"y} } % Latin9 (ISO-8859-15) encoding character definitions. \def\latninechardefs{% % Encoding is almost identical to Latin1. \latonechardefs % \gdef^^a4{\euro} \gdef^^a6{\v S} \gdef^^a8{\v s} \gdef^^b4{\v Z} \gdef^^b8{\v z} \gdef^^bc{\OE} \gdef^^bd{\oe} \gdef^^be{\"Y} } % Latin2 (ISO-8859-2) character definitions. \def\lattwochardefs{% \gdef^^a0{~} \gdef^^a1{\ogonek{A}} \gdef^^a2{\u{}} \gdef^^a3{\L} \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} \gdef^^a5{\v L} \gdef^^a6{\'S} \gdef^^a7{\S} \gdef^^a8{\"{}} \gdef^^a9{\v S} \gdef^^aa{\cedilla S} \gdef^^ab{\v T} \gdef^^ac{\'Z} \gdef^^ad{\-} \gdef^^ae{\v Z} \gdef^^af{\dotaccent Z} % \gdef^^b0{\textdegree} \gdef^^b1{\ogonek{a}} \gdef^^b2{\ogonek{ }} \gdef^^b3{\l} \gdef^^b4{\'{}} \gdef^^b5{\v l} \gdef^^b6{\'s} \gdef^^b7{\v{}} \gdef^^b8{\cedilla\ } \gdef^^b9{\v s} \gdef^^ba{\cedilla s} \gdef^^bb{\v t} \gdef^^bc{\'z} \gdef^^bd{\H{}} \gdef^^be{\v z} \gdef^^bf{\dotaccent z} % \gdef^^c0{\'R} \gdef^^c1{\'A} \gdef^^c2{\^A} \gdef^^c3{\u A} \gdef^^c4{\"A} \gdef^^c5{\'L} \gdef^^c6{\'C} \gdef^^c7{\cedilla C} \gdef^^c8{\v C} \gdef^^c9{\'E} \gdef^^ca{\ogonek{E}} \gdef^^cb{\"E} \gdef^^cc{\v E} \gdef^^cd{\'I} \gdef^^ce{\^I} \gdef^^cf{\v D} % \gdef^^d0{\DH} \gdef^^d1{\'N} \gdef^^d2{\v N} \gdef^^d3{\'O} \gdef^^d4{\^O} \gdef^^d5{\H O} \gdef^^d6{\"O} \gdef^^d7{$\times$} \gdef^^d8{\v R} \gdef^^d9{\ringaccent U} \gdef^^da{\'U} \gdef^^db{\H U} \gdef^^dc{\"U} \gdef^^dd{\'Y} \gdef^^de{\cedilla T} \gdef^^df{\ss} % \gdef^^e0{\'r} \gdef^^e1{\'a} \gdef^^e2{\^a} \gdef^^e3{\u a} \gdef^^e4{\"a} \gdef^^e5{\'l} \gdef^^e6{\'c} \gdef^^e7{\cedilla c} \gdef^^e8{\v c} \gdef^^e9{\'e} \gdef^^ea{\ogonek{e}} \gdef^^eb{\"e} \gdef^^ec{\v e} \gdef^^ed{\'\i} \gdef^^ee{\^\i} \gdef^^ef{\v d} % \gdef^^f0{\dh} \gdef^^f1{\'n} \gdef^^f2{\v n} \gdef^^f3{\'o} \gdef^^f4{\^o} \gdef^^f5{\H o} \gdef^^f6{\"o} \gdef^^f7{$\div$} \gdef^^f8{\v r} \gdef^^f9{\ringaccent u} \gdef^^fa{\'u} \gdef^^fb{\H u} \gdef^^fc{\"u} \gdef^^fd{\'y} \gdef^^fe{\cedilla t} \gdef^^ff{\dotaccent{}} } % UTF-8 character definitions. % % This code to support UTF-8 is based on LaTeX's utf8.def, with some % changes for Texinfo conventions. It is included here under the GPL by % permission from Frank Mittelbach and the LaTeX team. % \newcount\countUTFx \newcount\countUTFy \newcount\countUTFz \gdef\UTFviiiTwoOctets#1#2{\expandafter \UTFviiiDefined\csname u8:#1\string #2\endcsname} % \gdef\UTFviiiThreeOctets#1#2#3{\expandafter \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname} % \gdef\UTFviiiFourOctets#1#2#3#4{\expandafter \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname} \gdef\UTFviiiDefined#1{% \ifx #1\relax \message{\linenumber Unicode char \string #1 not defined for Texinfo}% \else \expandafter #1% \fi } \begingroup \catcode`\~13 \catcode`\"12 \def\UTFviiiLoop{% \global\catcode\countUTFx\active \uccode`\~\countUTFx \uppercase\expandafter{\UTFviiiTmp}% \advance\countUTFx by 1 \ifnum\countUTFx < \countUTFy \expandafter\UTFviiiLoop \fi} \countUTFx = "C2 \countUTFy = "E0 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiTwoOctets\string~}} \UTFviiiLoop \countUTFx = "E0 \countUTFy = "F0 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiThreeOctets\string~}} \UTFviiiLoop \countUTFx = "F0 \countUTFy = "F4 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiFourOctets\string~}} \UTFviiiLoop \endgroup \begingroup \catcode`\"=12 \catcode`\<=12 \catcode`\.=12 \catcode`\,=12 \catcode`\;=12 \catcode`\!=12 \catcode`\~=13 \gdef\DeclareUnicodeCharacter#1#2{% \countUTFz = "#1\relax \wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% \begingroup \parseXMLCharref \def\UTFviiiTwoOctets##1##2{% \csname u8:##1\string ##2\endcsname}% \def\UTFviiiThreeOctets##1##2##3{% \csname u8:##1\string ##2\string ##3\endcsname}% \def\UTFviiiFourOctets##1##2##3##4{% \csname u8:##1\string ##2\string ##3\string ##4\endcsname}% \expandafter\expandafter\expandafter\expandafter \expandafter\expandafter\expandafter \gdef\UTFviiiTmp{#2}% \endgroup} \gdef\parseXMLCharref{% \ifnum\countUTFz < "A0\relax \errhelp = \EMsimple \errmessage{Cannot define Unicode char value < 00A0}% \else\ifnum\countUTFz < "800\relax \parseUTFviiiA,% \parseUTFviiiB C\UTFviiiTwoOctets.,% \else\ifnum\countUTFz < "10000\relax \parseUTFviiiA;% \parseUTFviiiA,% \parseUTFviiiB E\UTFviiiThreeOctets.{,;}% \else \parseUTFviiiA;% \parseUTFviiiA,% \parseUTFviiiA!% \parseUTFviiiB F\UTFviiiFourOctets.{!,;}% \fi\fi\fi } \gdef\parseUTFviiiA#1{% \countUTFx = \countUTFz \divide\countUTFz by 64 \countUTFy = \countUTFz \multiply\countUTFz by 64 \advance\countUTFx by -\countUTFz \advance\countUTFx by 128 \uccode `#1\countUTFx \countUTFz = \countUTFy} \gdef\parseUTFviiiB#1#2#3#4{% \advance\countUTFz by "#10\relax \uccode `#3\countUTFz \uppercase{\gdef\UTFviiiTmp{#2#3#4}}} \endgroup \def\utfeightchardefs{% \DeclareUnicodeCharacter{00A0}{\tie} \DeclareUnicodeCharacter{00A1}{\exclamdown} \DeclareUnicodeCharacter{00A3}{\pounds} \DeclareUnicodeCharacter{00A8}{\"{ }} \DeclareUnicodeCharacter{00A9}{\copyright} \DeclareUnicodeCharacter{00AA}{\ordf} \DeclareUnicodeCharacter{00AB}{\guillemetleft} \DeclareUnicodeCharacter{00AD}{\-} \DeclareUnicodeCharacter{00AE}{\registeredsymbol} \DeclareUnicodeCharacter{00AF}{\={ }} \DeclareUnicodeCharacter{00B0}{\ringaccent{ }} \DeclareUnicodeCharacter{00B4}{\'{ }} \DeclareUnicodeCharacter{00B8}{\cedilla{ }} \DeclareUnicodeCharacter{00BA}{\ordm} \DeclareUnicodeCharacter{00BB}{\guillemetright} \DeclareUnicodeCharacter{00BF}{\questiondown} \DeclareUnicodeCharacter{00C0}{\`A} \DeclareUnicodeCharacter{00C1}{\'A} \DeclareUnicodeCharacter{00C2}{\^A} \DeclareUnicodeCharacter{00C3}{\~A} \DeclareUnicodeCharacter{00C4}{\"A} \DeclareUnicodeCharacter{00C5}{\AA} \DeclareUnicodeCharacter{00C6}{\AE} \DeclareUnicodeCharacter{00C7}{\cedilla{C}} \DeclareUnicodeCharacter{00C8}{\`E} \DeclareUnicodeCharacter{00C9}{\'E} \DeclareUnicodeCharacter{00CA}{\^E} \DeclareUnicodeCharacter{00CB}{\"E} \DeclareUnicodeCharacter{00CC}{\`I} \DeclareUnicodeCharacter{00CD}{\'I} \DeclareUnicodeCharacter{00CE}{\^I} \DeclareUnicodeCharacter{00CF}{\"I} \DeclareUnicodeCharacter{00D0}{\DH} \DeclareUnicodeCharacter{00D1}{\~N} \DeclareUnicodeCharacter{00D2}{\`O} \DeclareUnicodeCharacter{00D3}{\'O} \DeclareUnicodeCharacter{00D4}{\^O} \DeclareUnicodeCharacter{00D5}{\~O} \DeclareUnicodeCharacter{00D6}{\"O} \DeclareUnicodeCharacter{00D8}{\O} \DeclareUnicodeCharacter{00D9}{\`U} \DeclareUnicodeCharacter{00DA}{\'U} \DeclareUnicodeCharacter{00DB}{\^U} \DeclareUnicodeCharacter{00DC}{\"U} \DeclareUnicodeCharacter{00DD}{\'Y} \DeclareUnicodeCharacter{00DE}{\TH} \DeclareUnicodeCharacter{00DF}{\ss} \DeclareUnicodeCharacter{00E0}{\`a} \DeclareUnicodeCharacter{00E1}{\'a} \DeclareUnicodeCharacter{00E2}{\^a} \DeclareUnicodeCharacter{00E3}{\~a} \DeclareUnicodeCharacter{00E4}{\"a} \DeclareUnicodeCharacter{00E5}{\aa} \DeclareUnicodeCharacter{00E6}{\ae} \DeclareUnicodeCharacter{00E7}{\cedilla{c}} \DeclareUnicodeCharacter{00E8}{\`e} \DeclareUnicodeCharacter{00E9}{\'e} \DeclareUnicodeCharacter{00EA}{\^e} \DeclareUnicodeCharacter{00EB}{\"e} \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}} \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}} \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} \DeclareUnicodeCharacter{00F0}{\dh} \DeclareUnicodeCharacter{00F1}{\~n} \DeclareUnicodeCharacter{00F2}{\`o} \DeclareUnicodeCharacter{00F3}{\'o} \DeclareUnicodeCharacter{00F4}{\^o} \DeclareUnicodeCharacter{00F5}{\~o} \DeclareUnicodeCharacter{00F6}{\"o} \DeclareUnicodeCharacter{00F8}{\o} \DeclareUnicodeCharacter{00F9}{\`u} \DeclareUnicodeCharacter{00FA}{\'u} \DeclareUnicodeCharacter{00FB}{\^u} \DeclareUnicodeCharacter{00FC}{\"u} \DeclareUnicodeCharacter{00FD}{\'y} \DeclareUnicodeCharacter{00FE}{\th} \DeclareUnicodeCharacter{00FF}{\"y} \DeclareUnicodeCharacter{0100}{\=A} \DeclareUnicodeCharacter{0101}{\=a} \DeclareUnicodeCharacter{0102}{\u{A}} \DeclareUnicodeCharacter{0103}{\u{a}} \DeclareUnicodeCharacter{0104}{\ogonek{A}} \DeclareUnicodeCharacter{0105}{\ogonek{a}} \DeclareUnicodeCharacter{0106}{\'C} \DeclareUnicodeCharacter{0107}{\'c} \DeclareUnicodeCharacter{0108}{\^C} \DeclareUnicodeCharacter{0109}{\^c} \DeclareUnicodeCharacter{0118}{\ogonek{E}} \DeclareUnicodeCharacter{0119}{\ogonek{e}} \DeclareUnicodeCharacter{010A}{\dotaccent{C}} \DeclareUnicodeCharacter{010B}{\dotaccent{c}} \DeclareUnicodeCharacter{010C}{\v{C}} \DeclareUnicodeCharacter{010D}{\v{c}} \DeclareUnicodeCharacter{010E}{\v{D}} \DeclareUnicodeCharacter{0112}{\=E} \DeclareUnicodeCharacter{0113}{\=e} \DeclareUnicodeCharacter{0114}{\u{E}} \DeclareUnicodeCharacter{0115}{\u{e}} \DeclareUnicodeCharacter{0116}{\dotaccent{E}} \DeclareUnicodeCharacter{0117}{\dotaccent{e}} \DeclareUnicodeCharacter{011A}{\v{E}} \DeclareUnicodeCharacter{011B}{\v{e}} \DeclareUnicodeCharacter{011C}{\^G} \DeclareUnicodeCharacter{011D}{\^g} \DeclareUnicodeCharacter{011E}{\u{G}} \DeclareUnicodeCharacter{011F}{\u{g}} \DeclareUnicodeCharacter{0120}{\dotaccent{G}} \DeclareUnicodeCharacter{0121}{\dotaccent{g}} \DeclareUnicodeCharacter{0124}{\^H} \DeclareUnicodeCharacter{0125}{\^h} \DeclareUnicodeCharacter{0128}{\~I} \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} \DeclareUnicodeCharacter{012A}{\=I} \DeclareUnicodeCharacter{012B}{\={\dotless{i}}} \DeclareUnicodeCharacter{012C}{\u{I}} \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} \DeclareUnicodeCharacter{0130}{\dotaccent{I}} \DeclareUnicodeCharacter{0131}{\dotless{i}} \DeclareUnicodeCharacter{0132}{IJ} \DeclareUnicodeCharacter{0133}{ij} \DeclareUnicodeCharacter{0134}{\^J} \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} \DeclareUnicodeCharacter{0139}{\'L} \DeclareUnicodeCharacter{013A}{\'l} \DeclareUnicodeCharacter{0141}{\L} \DeclareUnicodeCharacter{0142}{\l} \DeclareUnicodeCharacter{0143}{\'N} \DeclareUnicodeCharacter{0144}{\'n} \DeclareUnicodeCharacter{0147}{\v{N}} \DeclareUnicodeCharacter{0148}{\v{n}} \DeclareUnicodeCharacter{014C}{\=O} \DeclareUnicodeCharacter{014D}{\=o} \DeclareUnicodeCharacter{014E}{\u{O}} \DeclareUnicodeCharacter{014F}{\u{o}} \DeclareUnicodeCharacter{0150}{\H{O}} \DeclareUnicodeCharacter{0151}{\H{o}} \DeclareUnicodeCharacter{0152}{\OE} \DeclareUnicodeCharacter{0153}{\oe} \DeclareUnicodeCharacter{0154}{\'R} \DeclareUnicodeCharacter{0155}{\'r} \DeclareUnicodeCharacter{0158}{\v{R}} \DeclareUnicodeCharacter{0159}{\v{r}} \DeclareUnicodeCharacter{015A}{\'S} \DeclareUnicodeCharacter{015B}{\'s} \DeclareUnicodeCharacter{015C}{\^S} \DeclareUnicodeCharacter{015D}{\^s} \DeclareUnicodeCharacter{015E}{\cedilla{S}} \DeclareUnicodeCharacter{015F}{\cedilla{s}} \DeclareUnicodeCharacter{0160}{\v{S}} \DeclareUnicodeCharacter{0161}{\v{s}} \DeclareUnicodeCharacter{0162}{\cedilla{t}} \DeclareUnicodeCharacter{0163}{\cedilla{T}} \DeclareUnicodeCharacter{0164}{\v{T}} \DeclareUnicodeCharacter{0168}{\~U} \DeclareUnicodeCharacter{0169}{\~u} \DeclareUnicodeCharacter{016A}{\=U} \DeclareUnicodeCharacter{016B}{\=u} \DeclareUnicodeCharacter{016C}{\u{U}} \DeclareUnicodeCharacter{016D}{\u{u}} \DeclareUnicodeCharacter{016E}{\ringaccent{U}} \DeclareUnicodeCharacter{016F}{\ringaccent{u}} \DeclareUnicodeCharacter{0170}{\H{U}} \DeclareUnicodeCharacter{0171}{\H{u}} \DeclareUnicodeCharacter{0174}{\^W} \DeclareUnicodeCharacter{0175}{\^w} \DeclareUnicodeCharacter{0176}{\^Y} \DeclareUnicodeCharacter{0177}{\^y} \DeclareUnicodeCharacter{0178}{\"Y} \DeclareUnicodeCharacter{0179}{\'Z} \DeclareUnicodeCharacter{017A}{\'z} \DeclareUnicodeCharacter{017B}{\dotaccent{Z}} \DeclareUnicodeCharacter{017C}{\dotaccent{z}} \DeclareUnicodeCharacter{017D}{\v{Z}} \DeclareUnicodeCharacter{017E}{\v{z}} \DeclareUnicodeCharacter{01C4}{D\v{Z}} \DeclareUnicodeCharacter{01C5}{D\v{z}} \DeclareUnicodeCharacter{01C6}{d\v{z}} \DeclareUnicodeCharacter{01C7}{LJ} \DeclareUnicodeCharacter{01C8}{Lj} \DeclareUnicodeCharacter{01C9}{lj} \DeclareUnicodeCharacter{01CA}{NJ} \DeclareUnicodeCharacter{01CB}{Nj} \DeclareUnicodeCharacter{01CC}{nj} \DeclareUnicodeCharacter{01CD}{\v{A}} \DeclareUnicodeCharacter{01CE}{\v{a}} \DeclareUnicodeCharacter{01CF}{\v{I}} \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}} \DeclareUnicodeCharacter{01D1}{\v{O}} \DeclareUnicodeCharacter{01D2}{\v{o}} \DeclareUnicodeCharacter{01D3}{\v{U}} \DeclareUnicodeCharacter{01D4}{\v{u}} \DeclareUnicodeCharacter{01E2}{\={\AE}} \DeclareUnicodeCharacter{01E3}{\={\ae}} \DeclareUnicodeCharacter{01E6}{\v{G}} \DeclareUnicodeCharacter{01E7}{\v{g}} \DeclareUnicodeCharacter{01E8}{\v{K}} \DeclareUnicodeCharacter{01E9}{\v{k}} \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}} \DeclareUnicodeCharacter{01F1}{DZ} \DeclareUnicodeCharacter{01F2}{Dz} \DeclareUnicodeCharacter{01F3}{dz} \DeclareUnicodeCharacter{01F4}{\'G} \DeclareUnicodeCharacter{01F5}{\'g} \DeclareUnicodeCharacter{01F8}{\`N} \DeclareUnicodeCharacter{01F9}{\`n} \DeclareUnicodeCharacter{01FC}{\'{\AE}} \DeclareUnicodeCharacter{01FD}{\'{\ae}} \DeclareUnicodeCharacter{01FE}{\'{\O}} \DeclareUnicodeCharacter{01FF}{\'{\o}} \DeclareUnicodeCharacter{021E}{\v{H}} \DeclareUnicodeCharacter{021F}{\v{h}} \DeclareUnicodeCharacter{0226}{\dotaccent{A}} \DeclareUnicodeCharacter{0227}{\dotaccent{a}} \DeclareUnicodeCharacter{0228}{\cedilla{E}} \DeclareUnicodeCharacter{0229}{\cedilla{e}} \DeclareUnicodeCharacter{022E}{\dotaccent{O}} \DeclareUnicodeCharacter{022F}{\dotaccent{o}} \DeclareUnicodeCharacter{0232}{\=Y} \DeclareUnicodeCharacter{0233}{\=y} \DeclareUnicodeCharacter{0237}{\dotless{j}} \DeclareUnicodeCharacter{02DB}{\ogonek{ }} \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} \DeclareUnicodeCharacter{1E05}{\udotaccent{b}} \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}} \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}} \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}} \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}} \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}} \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}} \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}} \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}} \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}} \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}} \DeclareUnicodeCharacter{1E20}{\=G} \DeclareUnicodeCharacter{1E21}{\=g} \DeclareUnicodeCharacter{1E22}{\dotaccent{H}} \DeclareUnicodeCharacter{1E23}{\dotaccent{h}} \DeclareUnicodeCharacter{1E24}{\udotaccent{H}} \DeclareUnicodeCharacter{1E25}{\udotaccent{h}} \DeclareUnicodeCharacter{1E26}{\"H} \DeclareUnicodeCharacter{1E27}{\"h} \DeclareUnicodeCharacter{1E30}{\'K} \DeclareUnicodeCharacter{1E31}{\'k} \DeclareUnicodeCharacter{1E32}{\udotaccent{K}} \DeclareUnicodeCharacter{1E33}{\udotaccent{k}} \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}} \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}} \DeclareUnicodeCharacter{1E36}{\udotaccent{L}} \DeclareUnicodeCharacter{1E37}{\udotaccent{l}} \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}} \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}} \DeclareUnicodeCharacter{1E3E}{\'M} \DeclareUnicodeCharacter{1E3F}{\'m} \DeclareUnicodeCharacter{1E40}{\dotaccent{M}} \DeclareUnicodeCharacter{1E41}{\dotaccent{m}} \DeclareUnicodeCharacter{1E42}{\udotaccent{M}} \DeclareUnicodeCharacter{1E43}{\udotaccent{m}} \DeclareUnicodeCharacter{1E44}{\dotaccent{N}} \DeclareUnicodeCharacter{1E45}{\dotaccent{n}} \DeclareUnicodeCharacter{1E46}{\udotaccent{N}} \DeclareUnicodeCharacter{1E47}{\udotaccent{n}} \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}} \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}} \DeclareUnicodeCharacter{1E54}{\'P} \DeclareUnicodeCharacter{1E55}{\'p} \DeclareUnicodeCharacter{1E56}{\dotaccent{P}} \DeclareUnicodeCharacter{1E57}{\dotaccent{p}} \DeclareUnicodeCharacter{1E58}{\dotaccent{R}} \DeclareUnicodeCharacter{1E59}{\dotaccent{r}} \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}} \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}} \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}} \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}} \DeclareUnicodeCharacter{1E60}{\dotaccent{S}} \DeclareUnicodeCharacter{1E61}{\dotaccent{s}} \DeclareUnicodeCharacter{1E62}{\udotaccent{S}} \DeclareUnicodeCharacter{1E63}{\udotaccent{s}} \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}} \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}} \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}} \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}} \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}} \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}} \DeclareUnicodeCharacter{1E7C}{\~V} \DeclareUnicodeCharacter{1E7D}{\~v} \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}} \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}} \DeclareUnicodeCharacter{1E80}{\`W} \DeclareUnicodeCharacter{1E81}{\`w} \DeclareUnicodeCharacter{1E82}{\'W} \DeclareUnicodeCharacter{1E83}{\'w} \DeclareUnicodeCharacter{1E84}{\"W} \DeclareUnicodeCharacter{1E85}{\"w} \DeclareUnicodeCharacter{1E86}{\dotaccent{W}} \DeclareUnicodeCharacter{1E87}{\dotaccent{w}} \DeclareUnicodeCharacter{1E88}{\udotaccent{W}} \DeclareUnicodeCharacter{1E89}{\udotaccent{w}} \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}} \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}} \DeclareUnicodeCharacter{1E8C}{\"X} \DeclareUnicodeCharacter{1E8D}{\"x} \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}} \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}} \DeclareUnicodeCharacter{1E90}{\^Z} \DeclareUnicodeCharacter{1E91}{\^z} \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}} \DeclareUnicodeCharacter{1E93}{\udotaccent{z}} \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}} \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}} \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}} \DeclareUnicodeCharacter{1E97}{\"t} \DeclareUnicodeCharacter{1E98}{\ringaccent{w}} \DeclareUnicodeCharacter{1E99}{\ringaccent{y}} \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}} \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}} \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}} \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}} \DeclareUnicodeCharacter{1EBC}{\~E} \DeclareUnicodeCharacter{1EBD}{\~e} \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}} \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}} \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}} \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}} \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}} \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}} \DeclareUnicodeCharacter{1EF2}{\`Y} \DeclareUnicodeCharacter{1EF3}{\`y} \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}} \DeclareUnicodeCharacter{1EF8}{\~Y} \DeclareUnicodeCharacter{1EF9}{\~y} \DeclareUnicodeCharacter{2013}{--} \DeclareUnicodeCharacter{2014}{---} \DeclareUnicodeCharacter{2018}{\quoteleft} \DeclareUnicodeCharacter{2019}{\quoteright} \DeclareUnicodeCharacter{201A}{\quotesinglbase} \DeclareUnicodeCharacter{201C}{\quotedblleft} \DeclareUnicodeCharacter{201D}{\quotedblright} \DeclareUnicodeCharacter{201E}{\quotedblbase} \DeclareUnicodeCharacter{2022}{\bullet} \DeclareUnicodeCharacter{2026}{\dots} \DeclareUnicodeCharacter{2039}{\guilsinglleft} \DeclareUnicodeCharacter{203A}{\guilsinglright} \DeclareUnicodeCharacter{20AC}{\euro} \DeclareUnicodeCharacter{2192}{\expansion} \DeclareUnicodeCharacter{21D2}{\result} \DeclareUnicodeCharacter{2212}{\minus} \DeclareUnicodeCharacter{2217}{\point} \DeclareUnicodeCharacter{2261}{\equiv} }% end of \utfeightchardefs % US-ASCII character definitions. \def\asciichardefs{% nothing need be done \relax } % Make non-ASCII characters printable again for compatibility with % existing Texinfo documents that may use them, even without declaring a % document encoding. % \setnonasciicharscatcode \other \message{formatting,} \newdimen\defaultparindent \defaultparindent = 15pt \chapheadingskip = 15pt plus 4pt minus 2pt \secheadingskip = 12pt plus 3pt minus 2pt \subsecheadingskip = 9pt plus 2pt minus 2pt % Prevent underfull vbox error messages. \vbadness = 10000 % Don't be so finicky about underfull hboxes, either. \hbadness = 2000 % Following George Bush, get rid of widows and orphans. \widowpenalty=10000 \clubpenalty=10000 % Use TeX 3.0's \emergencystretch to help line breaking, but if we're % using an old version of TeX, don't do anything. We want the amount of % stretch added to depend on the line length, hence the dependence on % \hsize. We call this whenever the paper size is set. % \def\setemergencystretch{% \ifx\emergencystretch\thisisundefined % Allow us to assign to \emergencystretch anyway. \def\emergencystretch{\dimen0}% \else \emergencystretch = .15\hsize \fi } % Parameters in order: 1) textheight; 2) textwidth; % 3) voffset; 4) hoffset; 5) binding offset; 6) topskip; % 7) physical page height; 8) physical page width. % % We also call \setleading{\textleading}, so the caller should define % \textleading. The caller should also set \parskip. % \def\internalpagesizes#1#2#3#4#5#6#7#8{% \voffset = #3\relax \topskip = #6\relax \splittopskip = \topskip % \vsize = #1\relax \advance\vsize by \topskip \outervsize = \vsize \advance\outervsize by 2\topandbottommargin \pageheight = \vsize % \hsize = #2\relax \outerhsize = \hsize \advance\outerhsize by 0.5in \pagewidth = \hsize % \normaloffset = #4\relax \bindingoffset = #5\relax % \ifpdf \pdfpageheight #7\relax \pdfpagewidth #8\relax % if we don't reset these, they will remain at "1 true in" of % whatever layout pdftex was dumped with. \pdfhorigin = 1 true in \pdfvorigin = 1 true in \fi % \setleading{\textleading} % \parindent = \defaultparindent \setemergencystretch } % @letterpaper (the default). \def\letterpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \textleading = 13.2pt % % If page is nothing but text, make it come out even. \internalpagesizes{607.2pt}{6in}% that's 46 lines {\voffset}{.25in}% {\bindingoffset}{36pt}% {11in}{8.5in}% }} % Use @smallbook to reset parameters for 7x9.25 trim size. \def\smallbook{{\globaldefs = 1 \parskip = 2pt plus 1pt \textleading = 12pt % \internalpagesizes{7.5in}{5in}% {-.2in}{0in}% {\bindingoffset}{16pt}% {9.25in}{7in}% % \lispnarrowing = 0.3in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .5cm }} % Use @smallerbook to reset parameters for 6x9 trim size. % (Just testing, parameters still in flux.) \def\smallerbook{{\globaldefs = 1 \parskip = 1.5pt plus 1pt \textleading = 12pt % \internalpagesizes{7.4in}{4.8in}% {-.2in}{-.4in}% {0pt}{14pt}% {9in}{6in}% % \lispnarrowing = 0.25in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .4cm }} % Use @afourpaper to print on European A4 paper. \def\afourpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \textleading = 13.2pt % % Double-side printing via postscript on Laserjet 4050 % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm. % To change the settings for a different printer or situation, adjust % \normaloffset until the front-side and back-side texts align. Then % do the same for \bindingoffset. You can set these for testing in % your texinfo source file like this: % @tex % \global\normaloffset = -6mm % \global\bindingoffset = 10mm % @end tex \internalpagesizes{673.2pt}{160mm}% that's 51 lines {\voffset}{\hoffset}% {\bindingoffset}{44pt}% {297mm}{210mm}% % \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = 5mm }} % Use @afivepaper to print on European A5 paper. % From romildo@urano.iceb.ufop.br, 2 July 2000. % He also recommends making @example and @lisp be small. \def\afivepaper{{\globaldefs = 1 \parskip = 2pt plus 1pt minus 0.1pt \textleading = 12.5pt % \internalpagesizes{160mm}{120mm}% {\voffset}{\hoffset}% {\bindingoffset}{8pt}% {210mm}{148mm}% % \lispnarrowing = 0.2in \tolerance = 800 \hfuzz = 1.2pt \contentsrightmargin = 0pt \defbodyindent = 2mm \tableindent = 12mm }} % A specific text layout, 24x15cm overall, intended for A4 paper. \def\afourlatex{{\globaldefs = 1 \afourpaper \internalpagesizes{237mm}{150mm}% {\voffset}{4.6mm}% {\bindingoffset}{7mm}% {297mm}{210mm}% % % Must explicitly reset to 0 because we call \afourpaper. \globaldefs = 0 }} % Use @afourwide to print on A4 paper in landscape format. \def\afourwide{{\globaldefs = 1 \afourpaper \internalpagesizes{241mm}{165mm}% {\voffset}{-2.95mm}% {\bindingoffset}{7mm}% {297mm}{210mm}% \globaldefs = 0 }} % @pagesizes TEXTHEIGHT[,TEXTWIDTH] % Perhaps we should allow setting the margins, \topskip, \parskip, % and/or leading, also. Or perhaps we should compute them somehow. % \parseargdef\pagesizes{\pagesizesyyy #1,,\finish} \def\pagesizesyyy#1,#2,#3\finish{{% \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi \globaldefs = 1 % \parskip = 3pt plus 2pt minus 1pt \setleading{\textleading}% % \dimen0 = #1\relax \advance\dimen0 by \voffset % \dimen2 = \hsize \advance\dimen2 by \normaloffset % \internalpagesizes{#1}{\hsize}% {\voffset}{\normaloffset}% {\bindingoffset}{44pt}% {\dimen0}{\dimen2}% }} % Set default to letter. % \letterpaper \message{and turning on texinfo input format.} % DEL is a comment character, in case @c does not suffice. \catcode`\^^? = 14 % Define macros to output various characters with catcode for normal text. \catcode`\"=\other \catcode`\~=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\+=\other \catcode`\$=\other \def\normaldoublequote{"} \def\normaltilde{~} \def\normalcaret{^} \def\normalunderscore{_} \def\normalverticalbar{|} \def\normalless{<} \def\normalgreater{>} \def\normalplus{+} \def\normaldollar{$}%$ font-lock fix % This macro is used to make a character print one way in \tt % (where it can probably be output as-is), and another way in other fonts, % where something hairier probably needs to be done. % % #1 is what to print if we are indeed using \tt; #2 is what to print % otherwise. Since all the Computer Modern typewriter fonts have zero % interword stretch (and shrink), and it is reasonable to expect all % typewriter fonts to have this, we can check that font parameter. % \def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi} % Same as above, but check for italic font. Actually this also catches % non-italic slanted fonts since it is impossible to distinguish them from % italic fonts. But since this is only used by $ and it uses \sl anyway % this is not a problem. \def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi} % Turn off all special characters except @ % (and those which the user can use as if they were ordinary). % Most of these we simply print from the \tt font, but for some, we can % use math or other variants that look better in normal text. \catcode`\"=\active \def\activedoublequote{{\tt\char34}} \let"=\activedoublequote \catcode`\~=\active \def~{{\tt\char126}} \chardef\hat=`\^ \catcode`\^=\active \def^{{\tt \hat}} \catcode`\_=\active \def_{\ifusingtt\normalunderscore\_} \let\realunder=_ % Subroutine for the previous macro. \def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } \catcode`\|=\active \def|{{\tt\char124}} \chardef \less=`\< \catcode`\<=\active \def<{{\tt \less}} \chardef \gtr=`\> \catcode`\>=\active \def>{{\tt \gtr}} \catcode`\+=\active \def+{{\tt \char 43}} \catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix % If a .fmt file is being used, characters that might appear in a file % name cannot be active until we have parsed the command line. % So turn them off again, and have \everyjob (or @setfilename) turn them on. % \otherifyactive is called near the end of this file. \def\otherifyactive{\catcode`+=\other \catcode`\_=\other} % Used sometimes to turn off (effectively) the active characters even after % parsing them. \def\turnoffactive{% \normalturnoffactive \otherbackslash } \catcode`\@=0 % \backslashcurfont outputs one backslash character in current font, % as in \char`\\. \global\chardef\backslashcurfont=`\\ \global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work % \realbackslash is an actual character `\' with catcode other, and % \doublebackslash is two of them (for the pdf outlines). {\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} % In texinfo, backslash is an active character; it prints the backslash % in fixed width font. \catcode`\\=\active @def@normalbackslash{{@tt@backslashcurfont}} % On startup, @fixbackslash assigns: % @let \ = @normalbackslash % \rawbackslash defines an active \ to do \backslashcurfont. % \otherbackslash defines an active \ to be a literal `\' character with % catcode other. @gdef@rawbackslash{@let\=@backslashcurfont} @gdef@otherbackslash{@let\=@realbackslash} % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of % the literal character `\'. % @def@normalturnoffactive{% @let\=@normalbackslash @let"=@normaldoublequote @let~=@normaltilde @let^=@normalcaret @let_=@normalunderscore @let|=@normalverticalbar @let<=@normalless @let>=@normalgreater @let+=@normalplus @let$=@normaldollar %$ font-lock fix @markupsetuplqdefault @markupsetuprqdefault @unsepspaces } % Make _ and + \other characters, temporarily. % This is canceled by @fixbackslash. @otherifyactive % If a .fmt file is being used, we don't want the `\input texinfo' to show up. % That is what \eatinput is for; after that, the `\' should revert to printing % a backslash. % @gdef@eatinput input texinfo{@fixbackslash} @global@let\ = @eatinput % On the other hand, perhaps the file did not have a `\input texinfo'. Then % the first `\' in the file would cause an error. This macro tries to fix % that, assuming it is called before the first `\' could plausibly occur. % Also turn back on active characters that might appear in the input % file name, in case not using a pre-dumped format. % @gdef@fixbackslash{% @ifx\@eatinput @let\ = @normalbackslash @fi @catcode`+=@active @catcode`@_=@active } % Say @foo, not \foo, in error messages. @escapechar = `@@ % These look ok in all fonts, so just make them not special. @catcode`@& = @other @catcode`@# = @other @catcode`@% = @other @c Finally, make ` and ' active, so that txicodequoteundirected and @c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we @c don't make ` and ' active, @code will not get them as active chars. @c Do this last of all since we use ` in the previous @catcode assignments. @catcode`@'=@active @catcode`@`=@active @markupsetuplqdefault @markupsetuprqdefault @c Local variables: @c eval: (add-hook 'write-file-hooks 'time-stamp) @c page-delimiter: "^\\\\message" @c time-stamp-start: "def\\\\texinfoversion{" @c time-stamp-format: "%:y-%02m-%02d.%02H" @c time-stamp-end: "}" @c End: @c vim:sw=2: @ignore arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 @end ignore libcdio-0.83/doc/mdate-sh0000755000175000017500000001275111652140255012176 00000000000000#!/bin/sh # Get modification time of a file or directory and pretty-print it. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005, 2007, 2009 Free # Software Foundation, Inc. # written by Ulrich Drepper , June 1995 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . case $1 in '') echo "$0: No file. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: mdate-sh [--help] [--version] FILE Pretty-print the modification time of FILE. Report bugs to . EOF exit $? ;; -v | --v*) echo "mdate-sh $scriptversion" exit $? ;; esac # Prevent date giving response in another language. LANG=C export LANG LC_ALL=C export LC_ALL LC_TIME=C export LC_TIME # GNU ls changes its time format in response to the TIME_STYLE # variable. Since we cannot assume `unset' works, revert this # variable to its documented default. if test "${TIME_STYLE+set}" = set; then TIME_STYLE=posix-long-iso export TIME_STYLE fi save_arg1=$1 # Find out how to get the extended ls output of a file or directory. if ls -L /dev/null 1>/dev/null 2>&1; then ls_command='ls -L -l -d' else ls_command='ls -l -d' fi # Avoid user/group names that might have spaces, when possible. if ls -n /dev/null 1>/dev/null 2>&1; then ls_command="$ls_command -n" fi # A `ls -l' line looks as follows on OS/2. # drwxrwx--- 0 Aug 11 2001 foo # This differs from Unix, which adds ownership information. # drwxrwx--- 2 root root 4096 Aug 11 2001 foo # # To find the date, we split the line on spaces and iterate on words # until we find a month. This cannot work with files whose owner is a # user named `Jan', or `Feb', etc. However, it's unlikely that `/' # will be owned by a user whose name is a month. So we first look at # the extended ls output of the root directory to decide how many # words should be skipped to get the date. # On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below. set x`$ls_command /` # Find which argument is the month. month= command= until test $month do shift # Add another shift to the command. command="$command shift;" case $1 in Jan) month=January; nummonth=1;; Feb) month=February; nummonth=2;; Mar) month=March; nummonth=3;; Apr) month=April; nummonth=4;; May) month=May; nummonth=5;; Jun) month=June; nummonth=6;; Jul) month=July; nummonth=7;; Aug) month=August; nummonth=8;; Sep) month=September; nummonth=9;; Oct) month=October; nummonth=10;; Nov) month=November; nummonth=11;; Dec) month=December; nummonth=12;; esac done # Get the extended ls output of the file or directory. set dummy x`eval "$ls_command \"\$save_arg1\""` # Remove all preceding arguments eval $command # Because of the dummy argument above, month is in $2. # # On a POSIX system, we should have # # $# = 5 # $1 = file size # $2 = month # $3 = day # $4 = year or time # $5 = filename # # On Darwin 7.7.0 and 7.6.0, we have # # $# = 4 # $1 = day # $2 = month # $3 = year or time # $4 = filename # Get the month. case $2 in Jan) month=January; nummonth=1;; Feb) month=February; nummonth=2;; Mar) month=March; nummonth=3;; Apr) month=April; nummonth=4;; May) month=May; nummonth=5;; Jun) month=June; nummonth=6;; Jul) month=July; nummonth=7;; Aug) month=August; nummonth=8;; Sep) month=September; nummonth=9;; Oct) month=October; nummonth=10;; Nov) month=November; nummonth=11;; Dec) month=December; nummonth=12;; esac case $3 in ???*) day=$1;; *) day=$3; shift;; esac # Here we have to deal with the problem that the ls output gives either # the time of day or the year. case $3 in *:*) set `date`; eval year=\$$# case $2 in Jan) nummonthtod=1;; Feb) nummonthtod=2;; Mar) nummonthtod=3;; Apr) nummonthtod=4;; May) nummonthtod=5;; Jun) nummonthtod=6;; Jul) nummonthtod=7;; Aug) nummonthtod=8;; Sep) nummonthtod=9;; Oct) nummonthtod=10;; Nov) nummonthtod=11;; Dec) nummonthtod=12;; esac # For the first six month of the year the time notation can also # be used for files modified in the last year. if (expr $nummonth \> $nummonthtod) > /dev/null; then year=`expr $year - 1` fi;; *) year=$3;; esac # The result. echo $day $month $year # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: libcdio-0.83/doc/Makefile.in0000644000175000017500000005560711652210026012614 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 2003, 2004, 2008 Rocky Bernstein # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = doc DIST_COMMON = $(libcdio_TEXINFOS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/stamp-vti \ $(srcdir)/version.texi mdate-sh texinfo.tex ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = INFO_DEPS = $(srcdir)/libcdio.info am__TEXINFO_TEX_DIR = $(srcdir) DVIS = libcdio.dvi PDFS = libcdio.pdf PSS = libcdio.ps HTMLS = libcdio.html TEXINFOS = libcdio.texi TEXI2DVI = texi2dvi TEXI2PDF = $(TEXI2DVI) --pdf --batch MAKEINFOHTML = $(MAKEINFO) --html AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) DVIPS = dvips am__installdirs = "$(DESTDIR)$(infodir)" am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDDA_PLAYER_LIBS = @CDDA_PLAYER_LIBS@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CDPARANOIA_NAME = @CDPARANOIA_NAME@ CFLAGS = @CFLAGS@ CMP = @CMP@ COS_LIB = @COS_LIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_PKG_LIB_HACK = @DARWIN_PKG_LIB_HACK@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ DIFF_OPTS = @DIFF_OPTS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GIT2CL = @GIT2CL@ GREP = @GREP@ HAVE_BSDI_CDROM = @HAVE_BSDI_CDROM@ HAVE_DARWIN_CDROM = @HAVE_DARWIN_CDROM@ HAVE_FREEBSD_CDROM = @HAVE_FREEBSD_CDROM@ HAVE_JOLIET = @HAVE_JOLIET@ HAVE_LINUX_CDROM = @HAVE_LINUX_CDROM@ HAVE_OS2_CDROM = @HAVE_OS2_CDROM@ HAVE_ROCK = @HAVE_ROCK@ HAVE_SOLARIS_CDROM = @HAVE_SOLARIS_CDROM@ HAVE_WIN32_CDROM = @HAVE_WIN32_CDROM@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDIOPP_LIBS = @LIBCDIOPP_LIBS@ LIBCDIO_CDDA_LIBS = @LIBCDIO_CDDA_LIBS@ LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ LIBCDIO_DEPS = @LIBCDIO_DEPS@ LIBCDIO_LIBS = @LIBCDIO_LIBS@ LIBCDIO_PARANOIA_LIBS = @LIBCDIO_PARANOIA_LIBS@ LIBCDIO_SOURCE_PATH = @LIBCDIO_SOURCE_PATH@ LIBCDIO_VERSION_NUM = @LIBCDIO_VERSION_NUM@ LIBICONV = @LIBICONV@ LIBISO9660PP_LIBS = @LIBISO9660PP_LIBS@ LIBISO9660_CFLAGS = @LIBISO9660_CFLAGS@ LIBISO9660_LIBS = @LIBISO9660_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBUDF_LIBS = @LIBUDF_LIBS@ LINUX_CDROM_TIMEOUT = @LINUX_CDROM_TIMEOUT@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_NO_UNDEFINED = @LT_NO_UNDEFINED@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OLD_CDPARANOIA = @OLD_CDPARANOIA@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SBPCD_H = @SBPCD_H@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TYPESIZES = @TYPESIZES@ UCDROM_H = @UCDROM_H@ VCDINFO_CFLAGS = @VCDINFO_CFLAGS@ VCDINFO_LIBS = @VCDINFO_LIBS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = doxygen/Doxyfile.in doxygen/run_doxygen info_TEXINFOS = libcdio.texi libcdio_TEXINFOS = fdl.texi glossary.texi MOSTLYCLEANFILES = libcdio.html libcdio.pdf libcdio.ps.gz all: all-am .SUFFIXES: .SUFFIXES: .dvi .html .info .pdf .ps .texi .txt $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs .texi.info: restore=: && backupdir="$(am__leading_dot)am$$$$" && \ am__cwd=`pwd` && $(am__cd) $(srcdir) && \ rm -rf $$backupdir && mkdir $$backupdir && \ if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ done; \ else :; fi && \ cd "$$am__cwd"; \ if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -o $@ $<; \ then \ rc=0; \ $(am__cd) $(srcdir); \ else \ rc=$$?; \ $(am__cd) $(srcdir) && \ $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ fi; \ rm -rf $$backupdir; exit $$rc .texi.dvi: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ $(TEXI2DVI) $< $(srcdir)/libcdio.info: libcdio.texi $(srcdir)/version.texi $(libcdio_TEXINFOS) libcdio.dvi: libcdio.texi $(srcdir)/version.texi $(libcdio_TEXINFOS) libcdio.pdf: libcdio.texi $(srcdir)/version.texi $(libcdio_TEXINFOS) libcdio.html: libcdio.texi $(srcdir)/version.texi $(libcdio_TEXINFOS) $(srcdir)/version.texi: @MAINTAINER_MODE_TRUE@ $(srcdir)/stamp-vti $(srcdir)/stamp-vti: libcdio.texi $(top_srcdir)/configure @(dir=.; test -f ./libcdio.texi || dir=$(srcdir); \ set `$(SHELL) $(srcdir)/mdate-sh $$dir/libcdio.texi`; \ echo "@set UPDATED $$1 $$2 $$3"; \ echo "@set UPDATED-MONTH $$2 $$3"; \ echo "@set EDITION $(VERSION)"; \ echo "@set VERSION $(VERSION)") > vti.tmp @cmp -s vti.tmp $(srcdir)/version.texi \ || (echo "Updating $(srcdir)/version.texi"; \ cp vti.tmp $(srcdir)/version.texi) -@rm -f vti.tmp @cp $(srcdir)/version.texi $@ mostlyclean-vti: -rm -f vti.tmp maintainer-clean-vti: @MAINTAINER_MODE_TRUE@ -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi .dvi.ps: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ $(DVIPS) -o $@ $< uninstall-dvi-am: @$(NORMAL_UNINSTALL) @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \ rm -f "$(DESTDIR)$(dvidir)/$$f"; \ done uninstall-html-am: @$(NORMAL_UNINSTALL) @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \ rm -rf "$(DESTDIR)$(htmldir)/$$f"; \ done uninstall-info-am: @$(PRE_UNINSTALL) @if test -d '$(DESTDIR)$(infodir)' && \ (install-info --version && \ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \ if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \ done; \ else :; fi @$(NORMAL_UNINSTALL) @list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ else :; fi); \ done uninstall-pdf-am: @$(NORMAL_UNINSTALL) @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \ rm -f "$(DESTDIR)$(pdfdir)/$$f"; \ done uninstall-ps-am: @$(NORMAL_UNINSTALL) @list='$(PSS)'; test -n "$(psdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \ rm -f "$(DESTDIR)$(psdir)/$$f"; \ done dist-info: $(INFO_DEPS) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; \ for base in $$list; do \ case $$base in \ $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ if test -f $$base; then d=.; else d=$(srcdir); fi; \ base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ if test -f $$file; then \ relfile=`expr "$$file" : "$$d/\(.*\)"`; \ test -f "$(distdir)/$$relfile" || \ cp -p $$file "$(distdir)/$$relfile"; \ else :; fi; \ done; \ done mostlyclean-aminfo: -rm -rf libcdio.aux libcdio.cp libcdio.cps libcdio.fn libcdio.fns \ libcdio.ky libcdio.kys libcdio.log libcdio.pg libcdio.pgs \ libcdio.tmp libcdio.toc libcdio.tp libcdio.tps libcdio.vr \ libcdio.vrs clean-aminfo: -test -z "libcdio.dvi libcdio.pdf libcdio.ps libcdio.html" \ || rm -rf libcdio.dvi libcdio.pdf libcdio.ps libcdio.html maintainer-clean-aminfo: @list='$(INFO_DEPS)'; for i in $$list; do \ i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \ echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-info check-am: all-am check: check-am all-am: Makefile $(INFO_DEPS) installdirs: for dir in "$(DESTDIR)$(infodir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-aminfo clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: $(DVIS) html-am: $(HTMLS) info: info-am info-am: $(INFO_DEPS) install-data-am: install-info-am install-dvi: install-dvi-am install-dvi-am: $(DVIS) @$(NORMAL_INSTALL) test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)" @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \ done install-exec-am: install-html: install-html-am install-html-am: $(HTMLS) @$(NORMAL_INSTALL) test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \ for p in $$list; do \ if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \ $(am__strip_dir) \ if test -d "$$d$$p"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \ $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \ $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \ else \ list2="$$list2 $$d$$p"; \ fi; \ done; \ test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \ done; } install-info: install-info-am install-info-am: $(INFO_DEPS) @$(NORMAL_INSTALL) test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)" @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ if test -f $$ifile; then \ echo "$$ifile"; \ else : ; fi; \ done; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done @$(POST_INSTALL) @if (install-info --version && \ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\ install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\ done; \ else : ; fi install-man: install-pdf: install-pdf-am install-pdf-am: $(PDFS) @$(NORMAL_INSTALL) test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)" @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done install-ps: install-ps-am install-ps-am: $(PSS) @$(NORMAL_INSTALL) test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)" @list='$(PSS)'; test -n "$(psdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-aminfo \ maintainer-clean-generic maintainer-clean-vti mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \ mostlyclean-libtool mostlyclean-vti pdf-am: $(PDFS) ps-am: $(PSS) uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \ uninstall-pdf-am uninstall-ps-am .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-aminfo clean-generic \ clean-libtool dist-info distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-aminfo \ maintainer-clean-generic maintainer-clean-vti mostlyclean \ mostlyclean-aminfo mostlyclean-generic mostlyclean-libtool \ mostlyclean-vti pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-dvi-am uninstall-html-am uninstall-info-am \ uninstall-pdf-am uninstall-ps-am reference: -( cd ${top_srcdir} && $(MAKE) doxygen ) #: Create documentation in PDF format pdf: libcdio.pdf #: Create documentation as a text file txt: libcdio.txt #: Create documentation in PostScript format ps: libcdio.ps #: Create documentation in HTML format html: libcdio.html %.ps.gz: %.ps gzip -9c $< > $@ .texi.pdf: stamp-vti texi2pdf $< .texi.html: stamp-vti texi2html $< .texi.txt: makeinfo --no-headers $< > $@ # Create documentation in all formats, e.g. PDF, DVI, plain text and HTML all-formats: pdf dvi txt ps html # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libcdio-0.83/doc/libcdio.info0000644000175000017500000044456111652127274013046 00000000000000This is libcdio.info, produced by makeinfo version 4.13 from libcdio.texi. This manual documents `libcdio', the GNU CD Input, Output, and Control Library. Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2010 Rocky Bernstein and Herbert Valerio Riedel. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". INFO-DIR-SECTION Software libraries START-INFO-DIR-ENTRY * libcdio: (libcdio). GNU Compact Disc Input, Output, and Control Library. END-INFO-DIR-ENTRY  File: libcdio.info, Node: Top, Next: History, Up: (dir) GNU `libcdio' ************* This manual documents `libcdio', the GNU CD Input, Output, and Control Library. Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2010 Rocky Bernstein and Herbert Valerio Riedel. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". * Menu: * History:: How this came about * Previous Work:: The problem and previous work * Purpose:: What is in this package (and what's not) * CD Formats:: A tour through the CD-specification spectrum * CD Image Formats:: A tour through various CD-image formats * CD Units:: The units that make up a CD * How to use:: Okay enough babble, lemme at the library! * Utility Programs:: Diagnostic programs that come with this library * CD-ROM Access and Drivers:: CD-ROM access and drivers * Internal Program Organization:: Looking under the hood Appendices * ISO-9660 Character Sets:: * Glossary:: * GNU Free Documentation License:: Indices * General Index:: Overall index  File: libcdio.info, Node: History, Next: Previous Work, Prev: Top, Up: Top 1 History ********* As a result of the repressive Digital Millennium Copyright Act (DMCA) I became aware of Video CD's (VCD's). Video CD's are not subject to the DMCA and therefore enjoy the protection afforded by copyright but no more. But in order for VCD's to be competitive with DVD's, good tools (including GPL tools) are needed for authoring and playing them. And so through VCD's I became aware of the excellent Video CD tools by Herbert Valerio Riedel which form the `vcdimager' package. Although vcdimager is great for authoring, examining and extracting parts of a Video CD, it is not a VCD player. And when I looked at the state of Video CD handling in existing VCD players: `xine', `MPlayer', and `vlc', I was a bit disappointed. None handled playback control, menu selections, or playing still frames and segments from track 1. Version 0.7.12 of vcdimager was very impressive, however it lacked exportable libraries that could be used in other projects. So with the blessing and encouragement of Herbert Valerio Riedel, I took to extract and create libraries from this code base. The result was two libraries: one to extract information from a VCD which I called libvcdinfo, and another to do the reading and control of a VCD. Well, actually, at this point I should say that a Video CD is really just Video put on a existing well-established Compact Disc or CD format. So the library for this is called `libcdio' rather than `libvcdio'. While on the topic of the name `libcdio', I should also explain that the library really doesn't handle writing or output (the final "o" in the name). However it was felt that if I put `libcdi' that might be confused with a particular CD format called CD-I. Later on, the ISO-9660 filesystem handling component from `vcdimager' was extracted, expanded and made a separate library. Next the ability to add MMC commands was added, and then CD paranoia support. And from there, the rest is history.  File: libcdio.info, Node: Previous Work, Next: Purpose, Prev: History, Up: Top 2 The problem and previous work ******************************* If around the year 2002 you were to look at the code for a number of free software CD or media players that work on several platforms such as vlc, MPlayer, xine, or xmms to name but a few, you'd find the code to read a CD sprinkled with conditional compilation for this or that platform. That is there was _no_ OS-independent programmer library for CD reading and control even though the technology was over 10 years old; yet there are media players which strive for OS independence. One early CD player, `xmcd' by Ti Kan, was I think a bit better than most in that it tried to _encapsulate_ the kinds of CD control mechanisms (SCSI, Linux ioctl, Toshiba, etc.) in a "CD Audio Device Interface Library" called `libdi'. However this library is for Audio CD's only and I don't believe this library has been used outside of xmcd. Another project, Simple DirectMedia Layer also encapsulates CD reading. SDL is a library that allows you portable low-level access to a video framebuffer, audio output, mouse, and keyboard. With SDL, it is easy to write portable games which run on ... Many of the media players mentioned above do in fact can make use of the SDL library but for _video_ output only. Because the encapsulation is over _many_ kinds of I/O (video, joysticks, mice, as well as CD's), I believe that the level of control provided for CD a little bit limited. (However to be fair, it may have only been intended for games and may be suitable for that). Applications that just want the CD reading and control portion I think will find quite a bit overhead. Another related project is Jo"rg Schilling's SCSI library. You can use that to make a non-SCSI CD-ROM act like one that understands SCSI MMC commands which is a neat thing to do. However it is a little weird to have to install drivers just so you can run a particular user-level program. Installing drivers often requires special privileges and permissions and it is pervasive on a system. It is a little sad that along the way to creating such a SCSI library a library similar to `libcdio' wasn't created which could be used. Were that the case, this library certainly never would have been written. At the OS level there is the "A Linux CD-ROM Standard" by David van Leeuwen from around 1999. This defines a set of definitions and ioctl's that mask hardware differences of various Compact Disc hardware. It is a great idea, however this "standard" lacked adoption on OS's other than GNU/Linux. Or maybe it's the case that the standard on other OS's lacked adoption on GNU/Linux. For example on FreeBSD there is a "Common Access Method" (CAM) used for all SCSI access which seems not to be adopted in GNU/Linux.(1) Finally at the hardware level where a similar chaos exists, there has been an attempt to do something similar with the MMC (multimedia commands). This attempts to provide a uniform command set for CD devices like PostScript does for printer commands.(2) In contrast to PostScript where there one in theory can write a PostScript program in a uniform ASCII representation and send that to a printer, for MMC although there are common internal structures defined, there is no common syntax for representing the structures or an OS-independent library or API for issuing MMC-commands which a programmer would need to use. Instead each Operating System has its own interface. For example Adaptec's ASPI or Microsoft's DeviceIoControl on Microsoft Windows, or IOKit for Apple's OS/X, or FreeBSD's CAM. I've been positively awed at how many different variations and differing levels of complexity there are for doing basically the same thing. How easy it is to issue an MMC command from a program varies from easy to very difficult. And mastering the boilerplate code to issue an MMC command on one OS really doesn't help much in figuring out how to do it on another OS. So in `libcdio' we provide a common (and hopefully simple) API to issue MMC commands. ---------- Footnotes ---------- (1) And I'm thankful for that since, at least for MMC commands, it is inordinately complicated and in some places arcane. (2) I wrote "attempts" because over time the command set has changed and now there are several different commands to do a particular function like read a CD table of contents and some hardware understands some of the version of the commands set but might not others  File: libcdio.info, Node: Purpose, Next: CD Formats, Prev: Previous Work, Up: Top 3 What is in this package (and what's not) ****************************************** The library, `libcdio', encapsulates CD-ROM reading and control. Applications wishing to be oblivious of the OS- and device-dependent properties of a CD-ROM can use this library. Also included is a library, `libiso9660', for working with ISO-9660 filesystems, `libcdio_paranoia', and `libcdio_cdda' libraries for applications which want to use cdparanoia's error-correction and jitter detection. Some support for disk-image types like cdrdao's TOC, CDRWIN's BIN/CUE and Ahead Nero's NRG format is available, so applications that use this library also have the ability to read disc images as though they were CDs. `libcdio' also provides a way to issue SCSI "MultiMedia Commands" (MMC). MMC is supported by many hardware CD-ROM manufacturers; and in some cases where a CD-ROM doesn't understand MMC directly, some Operating Systems (such as GNU/Linux, Solaris, or FreeBSD or Microsoft Windows ASPI to name a few) provide the MMC emulation.(1) The first use of the library in this package are the Video CD authoring and ripping tools, VCDImager (`http://vcdimager.org'). See `http://www.gnu.org/software/libcdio/projects.html' for a list of projects using `libcdio'. A version of the CD-DA extraction tool cdparanoia (`http://www.xiph.org/paranoia' and its library which corrects for CD-ROM jitter are part of the distribution. Also included in the libcdio package is a utility program `cd-info' which displays CD information: number of tracks, CD-format and if possible basic information about the format. If libcddb (`http://libcddb.sourceforge.net') is available, the `cd-info' program will display CDDB matches on CD-DA discs. And if a new enough version of libvcdinfo is available (from the vcdimager project), then `cd-info' shows basic VCD information. Other utility programs in the libcdio package are: ``cdda-player'' shows off `libcdio' audio and CD-ROM control commands. It can play a track, eject or load media and show the the status of a CD-DA that is might be currently played via the audio control commands. It can be run in batch mode or has a simple curses-based interface. If libcddb is available or a CD has CD-Text and your CD-ROM drive supports CD-Text, track/album information about the CD can be shown. ``cd-drive'' shows what drivers are available and some basic properties of cd-drives attached to the system. (But media may have to be inserted in order to get this info.) lists out drive capabilities `cd-read' performs low-level block reading of a CD or CD image, ``iso-info'' displays ISO-9660 information from an ISO-9660 image. Below is some sample output iso-info version 0.82 x86_64-unknown-linux-gnu Copyright (c) 2003, 2004, 2005, 2007, 2008 R. Bernstein This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. __________________________________ ISO 9660 image: ../test/joliet.iso Application: K3B THE CD KREATOR VERSION 0.11.12 (C) 2003 SEBASTIAN TRUEG AND... Preparer : K3b - Version 0.11.12 Publisher : Rocky Bernstein System : LINUX Volume : K3b data project Volume Set : __________________________________ ISO-9660 Information /: Oct 22 2004 19:44 . Oct 22 2004 19:44 .. Oct 22 2004 19:44 libcdio /libcdio/: Oct 22 2004 19:44 . Oct 22 2004 19:44 .. Mar 12 2004 02:18 COPYING Jun 26 2004 07:01 README Aug 12 2004 06:22 README.libcdio Oct 22 2004 19:44 test /libcdio/test/: Oct 22 2004 19:44 . Oct 22 2004 19:44 .. Jul 25 2004 06:52 isofs-m1.cue ``iso-read'' extracts files from an ISO-9660 image. Historically, `libcdio' did not support write access to drives. In conjunction with additional work in a separate project `libburn', Thomas Schmitt has modified `libcdio' to enable sending SCSI write commands on some of the drivers. This enables other programs like `libburn' to write to CD's, DVD's and Blu-Ray discs. For the OS drivers which are lacking write access, volunteers are welcome. ---------- Footnotes ---------- (1) This concept of software emulation of a common hardware command language is common for printers such as using ghostscript to private postscript emulation for a non-postscript printer.  File: libcdio.info, Node: CD Formats, Next: CD Image Formats, Prev: Purpose, Up: Top 4 CD Formats ************ Much of what I write in this section can be found elsewhere. See for example `http://www.pctechguide.com/08cd-rom.htm' or `http://www.pcguide.com/ref/cd/format.htm' We give just enough background here to cover Compact Discs and Compact Disc formats that are handled by this library. The Sony and Philips Corporations invented and Compact Disc (CD) in the early 1980s. The specifications for the layout is often referred to by the color of the cover on the specification. * Menu: * Red Book:: Red Book (CD-DA) CD Text, CDDB * Yellow Book:: Yellow Book (CD-ROM Digital Data) * Green Book:: Green Book (CD-i) * White Book:: White Book (DV, Video CD)  File: libcdio.info, Node: Red Book, Next: Yellow Book, Up: CD Formats 4.1 Red Book (CD-DA) ==================== * Menu: * CD Text:: CD Text and CD+G * CDDB:: Internet CD Database (CDDB) The first type of CD that was produced was the Compact Disc Digital Audio (CD-DA) or just plain "audio CD". The specification, ICE 60908 (formerly IEC 908) is commonly called the "Red Book", ``http://en.wikipedia.org/wiki/Red_Book_(audio_CD_standard)''. Music CD's are recorded in this format which basically allows for around 74 minutes of audio per disc and for that information to be split up into tracks. Tracks are broken up into "sectors" and each sector contains up to 2,352 bytes. To play one 44.1 kHz CD-DA sampled audio second, 75 sectors are used. The minute/second/frame numbering of sectors or MSF format is based on the fact that 75 sectors are used in a second of playing of sound. (And for almost every other CD format and application the MSF format doesn't make that much sense). In `libcdio' when you you want to read an audio sector, you call `cdio_read_audio_sector()' or `cdio_read_audio_sectors()'. In addition the the audio data "channel" a provision for other information or _subchannel_ information) can be stored in a sector. Other subchannels include a Media Catalog Number (also abbreviated as MCN and sometimes a UPC), or album meta data (also called CD-Text). Karioke graphics can also be stored in a format called _CD+G_.  File: libcdio.info, Node: CD Text, Next: CDDB, Up: Red Book 4.1.1 CD Text, CD+G ------------------- CD Text is an extension to the CD-DA standard that adds the ability to album and track meta data (titles, artist/performer names, song titles) and and graphical (e.g. Karaoke) information. For an alternative way to get album and track meta-data see *Note CDDB::. Information is stored in such a way that it doesn't interfere with the normal operation of any CD players or CDROM drives. There are two different parts of the CD where the data can be stored. The first place the information can be recorded is in the R-W sub codes in the lead in area of the CD giving a data capacity of about 5,000 ASCII characters (or 2,500 Kanji or Unicode characters). This information is stored as a single block of data and is the format used in virtually all of the CD Text CDs shipping today. The method for reading this data from a CDROM drive is covered under the Sony proposal to the MMC specification. The format of the data is partially covered in the MMC specification. The second place the information can be recorded is in the R-W sub codes in the program area of the CD giving a data capacity of roughly 31MB. This information is stored in a format that follows the Interactive Text Transmission System (ITTS) which is the same data transmission standard used by such things as Digital Audio Broadcasting (DAB), and virtually the same as the data standard for the MiniDisc. Traditionally the R-W sub codes have been used for text and graphics in applications such as CD+G (CD w/graphics) or in the case of most audio CDs, not at all. The methods for reading this data from a CD-ROM drive is covered by the programming specs from the individual drive manufacturers. In the case of ATAPI drives, the SFF8020 spec covers the reading of the RW subcodes. Not all drives support reading the RW subcodes from the program area. However for those that do, `libcdio' provides a way to get at this information via `cdtext_get()' and its friends.  File: libcdio.info, Node: CDDB, Prev: CD Text, Up: Red Book 4.1.2 Internet CD Database (CDDB) --------------------------------- CDDB is an database on the Internet of of CD album/track, artist, and genre information similar to CD Text information. Using track information (number of tracks and length of the tracks), devices that have access to the Internet can query for meta information and contribute information for CD's where there is no existing information. When storage is available (such as you'd expect for any program using `libcdio', the information is often saved for later use when the Internet is not available; people tend request the same information since they via programs play the same music. Obtaining CD meta information when none is encoded in an audio CD is useful in media players or making ones own compilations from audio CDs. There are currently two popular CDDB services on the Internet. The original database has been renamed Gracenote and is a profit making entity. FreeDB (`http://freedb.org' is an open source CD information resource that is free for developers and the public to use. As there already is an excellent library for handling CDDB libcddb (`http://libcddb.sourceforge.net' we suggest using that. Our utility program `cd-info' will make use it if it is available and it's what we use in our applications that need it.  File: libcdio.info, Node: Yellow Book, Next: Green Book, Prev: Red Book, Up: CD Formats 4.2 Yellow Book (CD-ROM Digital Data) ===================================== The CD-ROM specification or the "Yellow Book" followed a few years later (Standards ISO/IEC 10149), and describes the extension of CD's to store computer data, i.e. CD-ROM (Compact Disk Read Only Memory). The specification in the Yellow Book defines two modes: Mode 1 and Mode 2. * Menu: * ISO 9660:: * Mode 1:: Mode 1 Format * Mode 2:: Mode 2 Format  File: libcdio.info, Node: ISO 9660, Next: Mode 1, Up: Yellow Book 4.2.1 ISO 9660 -------------- * Menu: * ISO 9660 Level 1:: * ISO 9660 Level 2:: * ISO 9660 Level 3:: * Joliet Extensions:: * Rock Ridge Extensions:: The Yellow Book doesn't specify how data is to be stored on a CD-ROM. It was feared that different companies would implement proprietary data storage formats using this specification, resulting in incompatible data CDs. To prevent this, representatives of major manufacturers met at the High Sierra Hotel and Casino in Lake Tahoe, NV, in 1985, to define a standard for storing data on CDs. This format was nicknamed High Sierra Format. In a slightly modified form it was later adopted as ISO the ISO 9660 standard. This standard is further broken down into 3 "levels", the higher the level, the more permissive.  File: libcdio.info, Node: ISO 9660 Level 1, Next: ISO 9660 Level 2, Up: ISO 9660 4.2.1.1 ISO 9660 Level 1 ........................ Level 1 ISO 9660 defines names in the 8+3 convention so familiar to MS-DOS: eight characters for the filename, a period, and then three characters for the file type, all in upper case. The allowed characters are A-Z, 0-9, ".", and "_".Level 1 ISO 9660 requires that files occupy a contiguous range of sectors. This allows a file to be specified with a start block and a count. The maximum directory depth is 8. For a table of the characters, see *Note ISO-9660 Character Sets::.  File: libcdio.info, Node: ISO 9660 Level 2, Next: ISO 9660 Level 3, Prev: ISO 9660 Level 1, Up: ISO 9660 4.2.1.2 ISO 9660 Level 2 ........................ Level 2 ISO 9660 allows far more flexibility in filenames, but isn't usable on some systems, notably MS-DOS.  File: libcdio.info, Node: ISO 9660 Level 3, Next: Joliet Extensions, Prev: ISO 9660 Level 2, Up: ISO 9660 4.2.1.3 ISO 9660 Level 3 ........................ Level 3 ISO-9660 allows non-contiguous files, useful if the file was written in multiple packets with packet-writing software. There have been a number of extensions to the ISO 9660 CD-ROM file format. One extension is Microsoft's Joliet specification, designed to resolve a number of deficiencies in the original ISO 9660 Level 1 file system, and in particular to support the long file names used in Windows 95 and subsequent versions of Windows. Another extension is the Rock Ridge Interchange Protocol (RRIP), which enables the recording of sufficient information to support POSIX File System semantics.  File: libcdio.info, Node: Joliet Extensions, Next: Rock Ridge Extensions, Prev: ISO 9660 Level 3, Up: ISO 9660 4.2.1.4 Joliet Extensions ......................... Joliet extensions were an upward-compatible extension to the ISO 9660 specification that removes the limitation initially put in to deal with the limited filename conventions found in Microsoft DOS OS. In particular, the Joliet specification allows for long filenames and allows for UCS-BE (BigEndian Unicode) encoding of filenames which include mixed case letter, accented characters spaces and various symbols. The way all of this is encoded is by adding a second directory and filesystem structure in addition to or in parallels to original ISO 9600 filesystem. The root node of the ISO 9660 filesystem is found via the _Primary Volume Descriptor_ or _PVD_. The root of the Joliet-encode filesystem is found in a Supplementary Volume Descriptor or _SVD_ defined in the ISO 9660 specification. The SVD structure is almost identical to a PVD with a couple of unused fields getting used and with the filename encoding changed to UCS-BE.  File: libcdio.info, Node: Rock Ridge Extensions, Prev: Joliet Extensions, Up: ISO 9660 4.2.1.5 Rock Ridge Extensions ............................. Using the Joliet Extension one overcome the limitedness of the original ISO-9660 naming scheme. But another and probably better method is to use the Rock Ridge Extension. Not only can one store a filename as one does in a POSIX OS, but the other file attributes, such as the various timestamps (creation, modification, access), file attributes (user, group, file mode permissions, device type, symbolic links) can be stored. This is much as one would do in XA attributes; however the two are not completely interchangeable in the information they store: XA does _not_ address filename limitations, and the Rock Ridge extensions don't indicate if a sector is in Mode 1 or Mode 2 format. The Rock Ridge extension makes use of a hook that was defined as part of the ISO 9660 standard.  File: libcdio.info, Node: Mode 1, Next: Mode 2, Prev: ISO 9660, Up: Yellow Book 4.2.2 Mode 1 (2048 data bytes per sector) ----------------------------------------- Mode 1 is the data storage mode used by to store computer data. There are 3 layers of error correction. A Compact Disc using only this format can hold at most 650 MB. The data is laid out in basically the same way as in and audio CD format, except that the 2,352 bytes of data in each block are broken down further. 2,048 of these bytes are for "real" data. The other 304 bytes are used for an additional level of error detecting and correcting code. This is necessary because data CDs cannot tolerate the loss of a handful of bits now and then, the way audio CDs can. In `libcdio' when you you want to read a mode1 sector you call the `cdio_read_mode1_sector()' or `cdio_read_mode1_sectors()'.  File: libcdio.info, Node: Mode 2, Prev: Mode 1, Up: Yellow Book 4.2.3 Mode 2 (2336 data bytes per sector) ----------------------------------------- Mode 2 data CDs are the same as mode 1 CDs except that the error detecting and correcting codes are omitted. So still there are 2 layers of error correction. A Compact Disc using only this mode can thus hold at most 742 MB. Similar to audio CDs, the mode 2 format provides a more flexible vehicle for storing types of data that do not require high data integrity: for example, graphics and video can use this format. But in contrast to the Red Book standard, different modes can be mixed together; this is the basis for the extensions to the original data CD standards known as CD-ROM Extended Architecture, or CD-ROM XA. CD-ROM XA formats currently in use are CD-I Bridge formats, Photo CD and Video CD plus Sony's Playstation. In `libcdio' when you you want to read a mode1 sector you call the `cdio_read_mode2_sector()' or `cdio_read_mode2_sectors()'.  File: libcdio.info, Node: Green Book, Next: White Book, Prev: Yellow Book, Up: CD Formats 4.3 Green Book (CD-i) ===================== This was a CD-ROM format developed by Philips for CD-i (an obsolete embedded CD-ROM application allowing limited user user interaction with films, games and educational applications). The format is ISO 9660 compliant and introduced mode 2 form 2 addressing. It also contains XA (Extended Architecture) attributes. Although some Green Book discs contain CD-i applications which can only be played on a CD-i player, others have films or music videos. Video CDs in Green-Book format are labeled "Digital Video on CD." The Green Book for video is largely superseded by White book CD-ROM which draws on this specification.  File: libcdio.info, Node: White Book, Prev: Green Book, Up: CD Formats 4.4 White Book (DV, Video CD) ============================= The White Book was released by Sony, Philips, Matsushita, and JVC in 1993, defines the Video CD specification. The White Book is also known as Digital Video (DV). A Video CD contains one data track recorded in CD-ROM XA Mode 2 Form 2. It is always the first track on the disc (Track 1). The ISO-9660 file structure and a CD-i application program are recorded in this track, as well as the Video CD Information Area which gives general information about the Video Compact Disc. After the data track, video is written in one or more subsequent tracks within the same session. These tracks are also recorded in Mode 2 Form 2. In `libcdio' when you you want to read a mode2 format 2 audio sector you call the `cdio_read_mode2_sector()' or `cdio_read_mode2_sectors()' setting `b_form2' to `true'.  File: libcdio.info, Node: CD Image Formats, Next: CD Units, Prev: CD Formats, Up: Top 5 CD Image Formats ****************** * Menu: * CDRDAO TOC Format:: * CDRWIN BIN/CUE Format:: * NRG Format:: In both the `cdrdao' and bin/cue formats there is one meta-file with extensions `.toc' or `.cue' respectively and one or more files (often with the extension `.bin') which contains the content of tracks. The format of the track data is often interchangeable between the two formats. For example, in `libcdio''s regression tests we make use of this to reduce the size of the test data and just provide alternate meta-data files (`.toc' or `.cue'). In contrast to the first two formats, the NRG format consists of a single file. This has the advantage of being a self-contained unit: in the other two formats it is possible for the meta file to refer to a file that can't be found. A disadvantage of the NRG format is that the meta data can't be easily viewed or modified say in a text file as it can be with the first two formats. In conjunction with this disadvantage is another disadvantage that the format is not documented, so how `libcdio' interprets an NRG image is based on inference. It is recommended that one of the other forms be used instead of NRG where possible.  File: libcdio.info, Node: CDRDAO TOC Format, Next: CDRWIN BIN/CUE Format, Up: CD Image Formats 5.1 CDRDAO TOC Format ===================== This is `cdrdao''s CD-image description format. Since this program is GPL and everything about it is in the open, it is the preferred format to use. (Alas, at present it isn't as well supported in `libcdio' as the BIN/CUE format.) The _toc_-file describes what data is written to the media in the CD-ROM; it allows control over track/index positions, pre-gaps and sub-channel information. It is a text file, so a text editor can be used to create, view or modify it. The `cdrdao(1) manual page', contains more information about this format. 5.1.1 CDRDAO Grammar -------------------- Below are the lexical tokens and grammar for a cdrdao TOC. It was taken from the cdrdao's pacct grammar; the token and nonterminal names are the same. #lexclass START #token Eof "@" #token "[\t\r\ ]+" #token Comment "//~[\n@]*" #token "\n" #token BeginString "\"" #token Integer "[0-9]+" #tokclass AudioFile { "AUDIOFILE" "FILE" } #lexclass STRING #token EndString "\"" #token StringQuote "\\\"" #token StringOctal "\\[0-9][0-9][0-9]" #token String "\\" #token String "[ ]+" #token String "~[\\\n\"\t ]*" ::= ( "CATALOG" | )* { } ( )+ Eof ::= "TRACK" { } ( "ISRC" | { "NO" } "COPY" | { "NO" } "PRE_EMPHASIS" | "TWO_CHANNEL_AUDIO" | "FOUR_CHANNEL_AUDIO" )* { } { "PREGAP" } ( | "START" { msf } | "END" { msf } )+ ( "INDEX" )* ::= AudioFile { "SWAP" } { "#" } | "DATAFILE" { "#" { } } | "FIFO" | "SILENCE" | "ZERO" { dataMode } { } ::= BeginString ( String | StringQuote | StringOctal )+ EndString ::= BeginString ( String | StringQuote | StringOctal )* EndString ::= Integer ::= Integer ::= Integer ":" Integer ":" Integer ::= | ::= | ::= "AUDIO" | "MODE0" | "MODE1" | "MODE1_RAW" | "MODE2" | "MODE2_RAW" | "MODE2_FORM1" | "MODE2_FORM2" | "MODE2_FORM_MIX" ::= "AUDIO" | "MODE1" | "MODE1_RAW" | "MODE2" | "MODE2_RAW" | "MODE2_FORM1" | "MODE2_FORM2" | "MODE2_FORM_MIX" ::= "RW" | "RW_RAW" ::= "CD_DA" | "CD_ROM" | "CD_ROM_XA" | "CD_I" ::= "TITLE" | "PERFORMER" | "SONGWRITER" | "COMPOSER" | "ARRANGER" | "MESSAGE" | "DISC_ID" | "GENRE" | "TOC_INFO1" | "TOC_INFO2" | "RESERVED1" | "RESERVED2" | "RESERVED3" | "RESERVED4" | "UPC_EAN" | "ISRC" | "SIZE_INFO" ::= "{" { Integer ( "," Integer )* } "}" ::= ( | ) ::= "LANGUAGE" Integer "{" ( )* "}" ::= "LANGUAGE_MAP" "{" ( Integer ":" ( Integer | "EN" ) )+ "}" ::= "CD_TEXT" "{" ( )* "}" ::= "CD_TEXT" "{" { } ( )* "}"  File: libcdio.info, Node: CDRWIN BIN/CUE Format, Next: NRG Format, Prev: CDRDAO TOC Format, Up: CD Image Formats 5.2 CDRWIN BIN/CUE Format ========================= The format referred to as _CDRWIN BIN/CUE Format_ in this manual is a popular CD image format used in the PC world. Not unlike `cdrdao''s TOC file, the _cue_ file describes the track layout, i.e. how the sectors are to be placed on the CD media. The _cue_ file usually contains a reference to a file traditionally having the `.bin' extension in its filename, the _bin_ file. This _bin_ file contains the sector data payload which is to be written to the CD medium according to the description in the _cue_ file. The following is an attempt to describe the subset of the `.cue' file syntax used in `libcdio' and vcdimager in an EBNF-like notation: 5.2.1 BIN/CUE Grammar --------------------- ::= +( + ) ::= "0" | "1" ... "8" | "9" ::= + ::= ":" ":" ::= "FILE" ::= [ "\"" ] [ "\"" ] | "\"" "\"" ::= "BINARY" ::= [ ] [ ] * [ ] ::= "FLAGS" * ::= "DCP" ::= "TRACK" ::= "PREGAP" ::= "INDEX" ::= "POSTGAP" ::= "AUDIO" | "MODE1/2048" | "MODE1/2352" | "MODE2/2336" | "MODE2/2352" ::= "REM" *  File: libcdio.info, Node: NRG Format, Prev: CDRWIN BIN/CUE Format, Up: CD Image Formats 5.3 NRG Format ============== The format referred to as _NRG Format_ in this manual is another popular CD image format. It is available only on Nero software on a Microsoft Windows Operating System. It is proprietary and not generally published, so the information we have comes from guessing based on sample CD images. So support for this is incomplete and using this format is not recommended. Unlike `cdrdao''s TOC file the BIN/CUE format everything is contained in one file. that one can edit Meta information such as the number of tracks and track format is contained at the end of the file. This information is not intended to be edited through a text editor.  File: libcdio.info, Node: CD Units, Next: How to use, Prev: CD Image Formats, Up: Top 6 The units that make up a CD ***************************** * Menu: * Tracks:: Tracks * Sectors:: Block addressing (MSF, LSN, LBA) * Pre-gaps:: Track pre-gaps  File: libcdio.info, Node: Tracks, Next: Sectors, Up: CD Units 6.1 tracks -- disc subdivisions =============================== In this section we describe CD properties and terms that we make use of in `libcdio'. A CD is formatted into a number of _tracks_, and a CD can hold at most 99 such tracks. This is defined by `CDIO_CD_MAX_TRACKS' in `cdio/sector.h'. Between some tracks CD specifications require a "2 second" in gap (called a _lead-in gap_. This is unused space with no "data" similar to the space between tracks on an old phonograph. The word "second" here really refers to a measure of space and not really necessarily an amount of time. However in the special case that the CD encodes an audio CD or CD-DA, the amount of time to play a gap of this size will take 2 seconds. The beginning (or inner edge) of the CD is supposed to have a "2 second" lead-in gap and there is supposed to be another "2 second" _lead-out_ gap at the end (or outer edge) of the CD. People have discovered that they can put useful data in the _lead-in_ and _lead-out_ gaps, and their equipment can read this, violating the standards but allowing a CD to store more data. In order to determine the number of tracks on a CD and where they start, commands are used to get this table-of-contents or _TOC_ information. Asking about the start of the _lead-out track_ gives the amount of data stored on the Compact Disk. To make it easy to specify this leadout track, special constant 0xAA (decimal 170) is used to indicate it. This is safe since this is higher than the largest legal track position. In `libcdio', `CDIO_CDROM_LEADOUT_TRACK' is defined to be this special value.  File: libcdio.info, Node: Sectors, Next: Pre-gaps, Prev: Tracks, Up: CD Units 6.2 block addressing (MSF, LSN, LBA) ==================================== A track is broken up into a number of 2352-byte _blocks_ which we sometimes call _sectors_ or _frames_. Whereas tracks may have a gap between them, a block or sector does not. (In `libcdio' the block size constant is defined using `CDIO_CD_FRAMESIZE_RAW'). A Compact Disc has a limit on the number of blocks or sectors. This values is defined by constant `CDIO_CD_MAX_LSN' in `cdio/sector.h'. One can addressing a block in one of three formats. The oldest format is by it's minute/second/frame number, also referred to as _MSF_ and written in time-like format MM:SS:FF (e.g. 30:01:40). It is best suited in audio (Red Book) applications. In `libcdio', the type `msf_t' can be used to declare variables to hold such values. Minute, second and frame values are one byte _and stored BCD notation_.(1) There are `libcdio' conversion routines `cdio_from_bcd8()' and `cdio_to_bcd8()' to convert the minute, second, and frame values into or out of integers. If you want to print a field in a BCD-encoded MSF, one can use the format specifier `%x' _(not `%d')_ and things will come out right. In the MSF notation, there are 75 "frames" in a "second," and the familiar (if awkward) 60 seconds in a minute. _Frame_ here is what we called a _block_ above. The CD specification defines "frame" to be _another_ unit which makes up a block. Very confusing. A frame is also sometimes called a sector, analogous to hard-disk terminology. Even more confusing is using this time-like notation for an address or for a length. Too often people confuse the MSF notation this with an amount of time. A "second" (or `CDIO_CD_FRAMES_PER_SEC' blocks) in this notation is only a second of playing time for something encoded as CD-DA. It does _not_ necessarily represent the amount time that it will take to play a of Video CD--usually you need more blocks than this. Nor does it represent the amount of data used to play a second of an MP3--usually you need fewer blocks than this. It is also not the amount of time your CD-ROM will take to read a "second" of data off a Compact Disc: for example a 12x CD player will read 12x `CDIO_CD_FRAMES_PER_SEC' `CDIO_CD_FRAMSIZE_RAW'-byte blocks in a one second of time. When programming, unless one is working with a CD-DA (and even here, only in a time-like fashion), is generally more cumbersome to use an MSF rather than a LBA or LSN described below, since subtraction of two MSF's has the awkwardness akin to subtraction using Roman Numerals. Probably the simplest way to address a block is to use its _LSN_ or "logical sector number." This just numbers the blocks usually from 0 on. _fix me: LSNs can be negative up to the pregap size?_ The Lead-in and Lead-out gaps described above have LSNs just like any other space on a CD. The last unit of address is a _LBA_. It is the same as a LSN but the 150 blocks associated with the initial lead-in is are not counted. So to convert a LBA into an LSN you just add 150. Why the distinction between LBA and LSN? I don't know, perhaps this has something to do with "multisession" CDs. ---------- Footnotes ---------- (1) Perhaps this is a `libcdio' design flaw. It was originally done I guess because it was convenient for VCDs.  File: libcdio.info, Node: Pre-gaps, Prev: Sectors, Up: CD Units 6.3 track pre-gaps - CD-DA discs and gaps ========================================= Gaps are possibly one of the least understood topics in audio discs. In the case of CD-DA discs, standards require a silent 2 second gap before the first audio track and after the last audio track (in each session.) These are respectively referred to as _lead-in_ and _lead-out_ gaps. No other gaps are required. It is important not to confuse the required _lead-in_ and _lead-out_ gaps with the optional track _pre-gap_s. Track _pre-gap_s are the gaps that may occur between audio tracks. Typically, track _pre-gap_s are filled with silence so that the listener knows that one song has ended, and the next will soon begin. However, track _pre-gap_s do not have to contain silence. One exception is an audio disc of a live performance. Because the performer may seamlessly move from one piece of the performance to the next, it would be unnatural for the disc to contain silence between the two pieces. Instead, the track number updates with no interruption in the performance. This allows the listener to either hear the entire performance without unnatural interruptions, or to conveniently skip to certain pieces of the performance. Finally, some CD-DA discs-whose behavior will be described below-lack track _pre-gap_s altogether although they must still include the _lead-in_ and _lead-out_ gaps. In order to understand the track _pre-gap_s that occur between audio tracks, it is necessary to understand how CD players display the track number and time. Embedded in each block of audio data is non-audio information known as the _Q sub-channel_. The _Q sub-channel_ data tells the CD player what track number and time it should display while it is playing the block of audio data in which the _Q sub-channel_ data is embedded. Near the end of some tracks, the _Q sub-channel_ may instruct the CD player to update the track number to the next track, and display a count down to the next track, often starting at -2 seconds and proceeding to zero. This is known as an audio track _pre-gap_. It may either contain silence, or as previously discussed-in the case of live performances-it may contain audio. Almost as often as not, there is no _pre-gap_ whatsoever. Regardless, an audio track _pre-gap_ is purely determined by the contents of the _Q sub-channel_, which is embedded in each audio sector. This has some interesting implications for the track forward button. When the track forward button is pressed on a CD player, the CD player advances to the next track, skipping that track's _pre-gap_. This is because the CD player uses the starting address of the track from the disc's table of contents (TOC) to determine where to start playing a track when either the track forward or track backward buttons are pressed. So to hear a _pre-gap_ for track 4, the listener must either listen to track 3 first, or use the track forward or backward buttons to go to track 4, then use the seek backward button to back up into track 4's _pre-gap_, which is really part of track 3, at least according to the TOC. Track 1 _pre-gap_s are especially interesting because some commercial discs have audio hidden before the beginning of the first track! The only way to hear this hidden audio with a standard player is to use the seek backward button as soon as track 1 begins playing! Audio track _pre-gap_s may be specified in a couple of different ways in the popular cue file format. The first way of specifying a _pre-gap_ is to use the `PREGAP' command. This will place a _pre-gap_ containing silence before a track. The second way of specifying a _pre-gap_ is to give a track an `INDEX 00' as well as the more normal `INDEX 01'. `INDEX 01' will be used to specify the start of the track in the disc's TOC, while `INDEX 00' will be used to specify the start of the track's _pre-gap_ as recorded in the _Q sub-channel_. `INDEX 00' is ordinarily used for specifying track _pre-gap_s that contain audio rather than silence. Thus, the cue file format may be used to specify track _pre-gap_s with silence or audio, depending on whether the `PREGAP' or `INDEX 00' commands are specified. If neither type of _pre-gap_ is specified for a track, no _pre-gap_ is created for that track, which merely means the absence of _pre-gap_ information in the _Q sub-channel_, and the lack of a short count down to the next track. Various CD-DA ripping programs take various approaches to track _pre-gap_s. Some ripping programs ignore track _pre-gap_s altogether, relying solely on the disc's TOC to determine where tracks begin and end. If a disc is ripped with such a program, then re-burned later, the resulting disc will lack track _pre-gap_s, and thereby lack the playback behavior of counting down to the next track. Other ripping programs detect track _pre-gap_s and record them in the popular cue file format among others. Such ripping programs sometimes allow the user to determine whether track _pre-gap_s will be appended to the prior track or pre-pended to the track to which they "belong". Note that if a ripping program is ignorant of track _pre-gap_s, the track _pre-gap_s will be appended to the prior track, because that is where the disc's TOC puts them. Thus, there are many different ways an application may chose to deal with track _pre-gap_s. Consequently, `libcdio' does not dictate the policy a ripping program should use in dealing with track _pre-gap_s. Hence, `libcdio' provides the `cdio_get_track_pregap_[lba|lsn]()' interfaces to allow the application to deal with track _pre-gap_s as it sees fit. Note that the `cdio_get_track_pregap_[lba|lsn]()' interfaces currently only provide information for CDRDAO TOC, CDRWIN BIN/CUE, and NRG images. Getting the track _pre-gap_s from a CD drive is a more complicated problem because not all CD drives support reading the _Q sub-channel_ _directly_ at _high_ speed, and there is no interface to determine whether or not a drive supports this optional feature, aside from trying to read the _Q sub-channel_, and possibly incurring IO errors. However, all drives _do_ support reading the _Q sub-channel_ _indirectly_ while playing an audio disc by asking the drive for the current position. Unfortunately, this occurs at normal playback speed, and requires a certain settling time after the disc starts playing. Thus, using this _slow_ interface requires a more sophisticated algorithm, such as binary search or some heuristic, like backing up progressively from the end of the prior track to look for the next track's _pre-gap_. Note that CD drives seek _slow_ly, so it is better to simply use a drive that can read the _Q sub-channel_ directly at _high_ speed, and avoid complicated software solutions. (Not to mention that if the user has an older system with an analog audio cable hooked up between their soundboard and their drive, and a ripping program uses the _slow_ interface, the user will hear bits of the audio on the disc!) Consequently, because there is no good universal solution to the problem of reading the _Q sub-channel_ from a drive, `libcdio' currently leaves this problem up to the application, a problem which is readily approachable through either `libcdio''s MMC interface or `libcdio''s cdda interface. For an example of one such application, see `https://gna.org/projects/cued/'. The preceding section on track _pre-gaps_ and CD-DA was contributed by Robert William Fuller ().  File: libcdio.info, Node: How to use, Next: Utility Programs, Prev: CD Units, Up: Top 7 How to use ************ The `libcdio' package comes with a number of small example programs in the directory `example' which demonstrate different aspects of the library and show how to use the library. The source code to all of the examples here are contained on the package. Other sources for examples would be the larger utility programs `cd-drive', `cd-info', `cd-read', `iso-info', and `iso-read' which are all in the `src' directory of the `libcdio' package. See also *Note Utility Programs::. * Menu: * Include problem:: A note about including * Example 1:: list out tracks and LSNs * Example 2:: list drivers available and default CD device * Example 3:: figure out what kind of CD (image) we've got * Example 4:: use libiso9660 to extract a file from an ISO-9660 image * Example 5:: list CD-Text and CD disc mode info * Example 6:: run a MMC INQUIRY command * Example 7:: using the CD Paranoia library for CD-DA reading * All sample programs:: list of all programs in the example directory  File: libcdio.info, Node: Include problem, Next: Example 1, Up: How to use 7.1 A note about including `' ========================================== libcdio installs `'. This file contains all of the C Preprocessor values from `config.h' (created by configure). This header can be used to consult exactly how libcdio was built. Initially I had selected "interesting" values, but this became too hard to maintain. One set of values that libdio needs internally is the whether the CPU that was used to compile libcdio is BigEndian or not; it can get this from libcdio's `config.h' which is not installed and preferred or `cdio/cdio_config.h'. Some of the libcdio programs like the demo programs include `config.h' for the generic reasons that the configuration-created `config.h' file is used: to figure out what headers are available. For example, do we have `'? The file `config.h' is generated by an autotools-generated `configure' script. It doesn't check to see if it has been included previously. Later, the demo programs include `' to get libcdio headers. But because libcdio needs some of the same information like the BigEndian value, this creates a duplicate include. The way I get around this in the demo programs is by defining `__CDIO_CONFIG_H__' after including `config.h' as follows: #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif Applications using libcdio may find it handy to do something like this as well. Defining `__CDIO_CONFIG_H__' will make sure `config_cdio.h' which is internally used, doesn't try to redefine preprocessor symbols. Ok. But now what about the problem that there are common preprocessor symbols in `config_cdio.h' that an application may want to define in a different manner, like `PACKAGE_NAME'? For this, there is yet another header, `'. This file undefines any symbol that `config.h' defines. And now we bounce to the problem that there may be symbols that are normally defined (`HAVE_UNISTD_H') and you want to keep that way, but others that you don't. So here is what I suggest: // for cdio: #include #include # remove *all* symbols libcdio defines // Add back in the ones you want your program #include The solution isn't the most simple or natural, but programming sometimes can be difficult. If someone has a better solution, let me know. Between header files `cdio_config.h' and `cdio_unconfig.h' and all the fact that almost all headers(1) define a symbol to indicate they have been included, I think there is enough mechanism to cover most situations that may arise. ---------- Footnotes ---------- (1) `' is one of the few headers that doesn't set a preprocessor symbol: it does its thing every time it is `#included'  File: libcdio.info, Node: Example 1, Next: Example 2, Prev: Include problem, Up: How to use 7.2 Example 1: list out tracks and LSNs ======================================= Here we will give an annotated example which can be found in the distribution as `example/tracks.c'. 1: #include 2: #include 3: #include 4: int 5: main(int argc, const char *argv[]) 6: { 7: CdIo_t *p_cdio = cdio_open ("/dev/cdrom", DRIVER_DEVICE); 8: track_t first_track_num = cdio_get_first_track_num(p_cdio); 9: track_t i_tracks = cdio_get_num_tracks(p_cdio); 10: int j, i=first_track_num; 11: 12: printf("CD-ROM Track List (%i - %i)\n", first_track_num, i_tracks); 13 14: printf(" #: LSN\n"); 15: 16: for (j = 0; j < i_tracks; i++, j++) { 17: lsn_t lsn = cdio_get_track_lsn(p_cdio, i); 18: if (CDIO_INVALID_LSN != lsn) 19: printf("%3d: %06d\n", (int) i, lsn); 20: } 21: printf("%3X: %06d leadout\n", CDIO_CDROM_LEADOUT_TRACK, 22: cdio_get_track_lsn(p_cdio, CDIO_CDROM_LEADOUT_TRACK)); 23: cdio_destroy(p_cdio); 24: return 0; 25: } Already from the beginning on line 2 we see something odd. The `#include ' is needed because `libcdio' assumes type definitions exist for `uint32_t', `uint16_t' and so on. Alternatively you change line 2 to: #define HAVE_SYS_TYPES_H and `' will insert line 2. If you use GNU autoconf to configure your program, add `sys/types.h' to `AC_HAVE_HEADERS' and _it_ will arrange for `HAVE_SYS_TYPES_H' to get defined. If you don't have `' but have some other include that defines these types, put that instead of line 2. Or you could roll your own typedefs. (Note: In the future, this will probably get "fixed" by requiring glib.h.) Okay after getting over the hurdle of line 2, the next line pretty straightforward: you need to include this to get cdio definitions. One of the types that is defined via line 3 is `CdIo_t' and a pointer that is used pretty much in all operations. Line 6 initializes the variable `cdio' which we will be using in all of the subsequent libcdio calls. It does this via a call to `cdio_open()'. The second parameter of `cdio_open' is DRIVER_UNKNOWN. For any given installation a number of Compact Disc device drivers may be available. In particular it's not uncommon to have several drivers that can read CD disk-image formats as well as a driver that handles some CD-ROM piece of hardware. Using DRIVER_UNKNOWN as that second parameter we let the library select a driver amongst those that are available; generally the first hardware driver that is available is the one selected. If there is no CD in any of the CD-ROM drives or one does not have access to the CD-ROM, it is possible that `libcdio' will find a CD image in the directory you run this program and will pick a suitable CD-image driver. If this is not what you want, but always want some sort of CD-ROM driver (or failure if none), then use DRIVER_DEVICE instead of DRIVER_UNKNOWN. Note that in contrast to what is typically done using ioctls to read a CD, you don't issue any sort of CD-ROM read TOC command--that is all done by the driver. Of course, the information that you get from reading the TOC is often desired: many tracks are on the CD, or what number the first one is called. This is done through calls on lines 8 and 9. For each track, we call a cdio routine to get the logical sector number, `cdio_get_track_lsn()' on line 17 and print the track number and LSN value. Finally we print out the "lead-out track" information and we finally call `cdio_destroy()' in line 23 to indicate we're done with the CD.  File: libcdio.info, Node: Example 2, Next: Example 3, Prev: Example 1, Up: How to use 7.3 Example 2: list drivers available and default CD device =========================================================== One thing that's a bit hockey in Example 1 is hard-coding the name of the device used: `/dev/cdrom'. Although often this is the name of a CD-ROM device on GNU/Linux and possibly some other Unix derivatives, there are many OSs for which use a different device name. In the next example, we'll let the driver give us the name of the CD-ROM device that is right for it. 1: #include 2: #include 3: #include 4: int 5: main(int argc, const char *argv[]) 6: { 7: CdIo_t *p_cdio = cdio_open (NULL, DRIVER_DEVICE); 8: const driver_id_t *driver_id_p; 9: 10: if (NULL != p_cdio) { 11: printf("The driver selected is %s\n", cdio_get_driver_name(p_cdio)); 12: printf("The default device for this driver is %s\n\n", 13: cdio_get_default_device(p_cdio)); 14: cdio_destroy(p_cdio); 15: } else { 16: printf("Problem in trying to find a driver.\n\n"); 17: } 18: 19: for (driver_id_p=cdio_drivers; *driver_id_p!=DRIVER_UNKNOWN; driver_id_p++) 20: if (cdio_have_driver(*driver_id_p)) 21: printf("We have: %s\n", cdio_driver_describe(*driver_id_p)); 22: else 23: printf("We don't have: %s\n", cdio_driver_describe(*driver_id_p)); 24: return 0; 25: }  File: libcdio.info, Node: Example 3, Next: Example 4, Prev: Example 2, Up: How to use 7.4 Example 3: figure out what kind of CD (image) we've got =========================================================== In this example is a somewhat simplified program to show the use of `cdio_guess_cd_type()' to figure out the kind of CD image we've got. This can be found in the distribution as `example/sample3.c'. #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include #include static void print_analysis(cdio_iso_analysis_t cdio_iso_analysis, cdio_fs_anal_t fs, int first_data, unsigned int num_audio, track_t i_tracks, track_t first_track_num, CdIo_t *cdio) { switch(CDIO_FSTYPE(fs)) { case CDIO_FS_AUDIO: break; case CDIO_FS_ISO_9660: printf("CD-ROM with ISO 9660 filesystem"); if (fs & CDIO_FS_ANAL_JOLIET) { printf(" and joliet extension level %d", cdio_iso_analysis.joliet_level); } if (fs & CDIO_FS_ANAL_ROCKRIDGE) printf(" and rockridge extensions"); printf("\n"); break; case CDIO_FS_ISO_9660_INTERACTIVE: printf("CD-ROM with CD-RTOS and ISO 9660 filesystem\n"); break; case CDIO_FS_HIGH_SIERRA: printf("CD-ROM with High Sierra filesystem\n"); break; case CDIO_FS_INTERACTIVE: printf("CD-Interactive%s\n", num_audio > 0 ? "/Ready" : ""); break; case CDIO_FS_HFS: printf("CD-ROM with Macintosh HFS\n"); break; case CDIO_FS_ISO_HFS: printf("CD-ROM with both Macintosh HFS and ISO 9660 filesystem\n"); break; case CDIO_FS_UFS: printf("CD-ROM with Unix UFS\n"); break; case CDIO_FS_EXT2: printf("CD-ROM with Linux second extended filesystem\n"); break; case CDIO_FS_3DO: printf("CD-ROM with Panasonic 3DO filesystem\n"); break; case CDIO_FS_UNKNOWN: printf("CD-ROM with unknown filesystem\n"); break; } switch(CDIO_FSTYPE(fs)) { case CDIO_FS_ISO_9660: case CDIO_FS_ISO_9660_INTERACTIVE: case CDIO_FS_ISO_HFS: printf("ISO 9660: %i blocks, label `%.32s'\n", cdio_iso_analysis.isofs_size, cdio_iso_analysis.iso_label); break; } if (first_data == 1 && num_audio > 0) printf("mixed mode CD "); if (fs & CDIO_FS_ANAL_XA) printf("XA sectors "); if (fs & CDIO_FS_ANAL_MULTISESSION) printf("Multisession"); if (fs & CDIO_FS_ANAL_HIDDEN_TRACK) printf("Hidden Track "); if (fs & CDIO_FS_ANAL_PHOTO_CD) printf("%sPhoto CD ", num_audio > 0 ? " Portfolio " : ""); if (fs & CDIO_FS_ANAL_CDTV) printf("Commodore CDTV "); if (first_data > 1) printf("CD-Plus/Extra "); if (fs & CDIO_FS_ANAL_BOOTABLE) printf("bootable CD "); if (fs & CDIO_FS_ANAL_VIDEOCD && num_audio == 0) { printf("Video CD "); } if (fs & CDIO_FS_ANAL_SVCD) printf("Super Video CD (SVCD) or Chaoji Video CD (CVD)"); if (fs & CDIO_FS_ANAL_CVD) printf("Chaoji Video CD (CVD)"); printf("\n"); } int main(int argc, const char *argv[]) { CdIo_t *p_cdio = cdio_open (NULL, DRIVER_UNKNOWN); cdio_fs_anal_t fs=0; track_t i_tracks; track_t first_track_num; lsn_t start_track; /* first sector of track */ lsn_t data_start =0; /* start of data area */ int first_data = -1; /* # of first data track */ int first_audio = -1; /* # of first audio track */ unsigned int num_data = 0; /* # of data tracks */ unsigned int num_audio = 0; /* # of audio tracks */ unsigned int i; if (NULL == p_cdio) { printf("Problem in trying to find a driver.\n\n"); return 1; } first_track_num = cdio_get_first_track_num(p_cdio); i_tracks = cdio_get_num_tracks(p_cdio); /* Count the number of data and audio tracks. */ for (i = first_track_num; i <= i_tracks; i++) { if (TRACK_FORMAT_AUDIO == cdio_get_track_format(p_cdio, i)) { num_audio++; if (-1 == first_audio) first_audio = i; } else { num_data++; if (-1 == first_data) first_data = i; } } /* try to find out what sort of CD we have */ if (0 == num_data) { printf("Audio CD\n"); } else { /* we have data track(s) */ int j; cdio_iso_analysis_t cdio_iso_analysis; memset(&cdio_iso_analysis, 0, sizeof(cdio_iso_analysis)); for (j = 2, i = first_data; i <= i_tracks; i++) { lsn_t lsn; track_format_t track_format = cdio_get_track_format(p_cdio, i); lsn = cdio_get_track_lsn(p_cdio, i); switch ( track_format ) { case TRACK_FORMAT_AUDIO: case TRACK_FORMAT_ERROR: break; case TRACK_FORMAT_CDI: case TRACK_FORMAT_XA: case TRACK_FORMAT_DATA: case TRACK_FORMAT_PSX: ; } start_track = (i == 1) ? 0 : lsn; /* save the start of the data area */ if (i == first_data) data_start = start_track; /* skip tracks which belong to the current walked session */ if (start_track < data_start + cdio_iso_analysis.isofs_size) continue; fs = cdio_guess_cd_type(p_cdio, start_track, i, &cdio_iso_analysis); print_analysis(cdio_iso_analysis, fs, first_data, num_audio, i_tracks, first_track_num, p_cdio); if ( !(CDIO_FSTYPE(fs) == CDIO_FS_ISO_9660 || CDIO_FSTYPE(fs) == CDIO_FS_ISO_HFS || CDIO_FSTYPE(fs) == CDIO_FS_ISO_9660_INTERACTIVE) ) /* no method for non-ISO9660 multisessions */ break; } } cdio_destroy(p_cdio); return 0; }  File: libcdio.info, Node: Example 4, Next: Example 5, Prev: Example 3, Up: How to use 7.5 Example 4: use libiso9660 to extract a file from an ISO-9660 image ====================================================================== Next a program to show using `libiso9660' to extract a file from an ISO-9660 image. This can be found in the distribution as `example/isofile.c'. A more complete and expanded version of this is `iso-read', part of this distribution. /* This is the ISO 9660 image. */ #define ISO9660_IMAGE_PATH "../" #define ISO9660_IMAGE ISO9660_IMAGE_PATH "test/copying.iso" #define LOCAL_FILENAME "copying" #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #define my_exit(rc) \ fclose (p_outfd); \ free(p_statbuf); \ iso9660_close(p_iso); \ return rc; \ int main(int argc, const char *argv[]) { iso9660_stat_t *p_statbuf; FILE *p_outfd; int i; iso9660_t *p_iso = iso9660_open (ISO9660_IMAGE); if (NULL == p_iso) { fprintf(stderr, "Sorry, couldn't open ISO 9660 image %s\n", ISO9660_IMAGE); return 1; } p_statbuf = iso9660_ifs_stat_translate (p_iso, LOCAL_FILENAME); if (NULL == p_statbuf) { fprintf(stderr, "Could not get ISO-9660 file information for file %s\n", LOCAL_FILENAME); iso9660_close(p_iso); return 2; } if (!(p_outfd = fopen (LOCAL_FILENAME, "wb"))) { perror ("fopen()"); free(p_statbuf); iso9660_close(p_iso); return 3; } /* Copy the blocks from the ISO-9660 filesystem to the local filesystem. */ for (i = 0; i < p_statbuf->size; i += ISO_BLOCKSIZE) { char buf[ISO_BLOCKSIZE]; memset (buf, 0, ISO_BLOCKSIZE); if ( ISO_BLOCKSIZE != iso9660_iso_seek_read (p_iso, buf, p_statbuf->lsn + (i / ISO_BLOCKSIZE), 1) ) { fprintf(stderr, "Error reading ISO 9660 file at lsn %lu\n", (long unsigned int) p_statbuf->lsn + (i / ISO_BLOCKSIZE)); my_exit(4); } fwrite (buf, ISO_BLOCKSIZE, 1, p_outfd); if (ferror (p_outfd)) { perror ("fwrite()"); my_exit(5); } } fflush (p_outfd); /* Make sure the file size has the exact same byte size. Without the truncate below, the file will a multiple of ISO_BLOCKSIZE. */ if (ftruncate (fileno (p_outfd), p_statbuf->size)) perror ("ftruncate()"); my_exit(0); }  File: libcdio.info, Node: Example 5, Next: Example 6, Prev: Example 4, Up: How to use 7.6 Example 5: list CD-Text and disc mode info ============================================== Next a program to show using `libcdio' to list CD-TEXT data. This can be found in the distribution as `example/cdtext.c'. /* Simple program to list CD-Text info of a Compact Disc using libcdio. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include static void print_cdtext_track_info(CdIo_t *p_cdio, track_t i_track, const char *message) { const cdtext_t *cdtext = cdio_get_cdtext(p_cdio, 0); if (NULL != cdtext) { cdtext_field_t i; printf("%s\n", message); for (i=0; i < MAX_CDTEXT_FIELDS; i++) { if (cdtext->field[i]) { printf("\t%s: %s\n", cdtext_field2str(i), cdtext->field[i]); } } } } static void print_disc_info(CdIo_t *p_cdio, track_t i_tracks, track_t i_first_track) { track_t i_last_track = i_first_track+i_tracks; discmode_t cd_discmode = cdio_get_discmode(p_cdio); printf("%s\n", discmode2str[cd_discmode]); print_cdtext_track_info(p_cdio, 0, "\nCD-Text for Disc:"); for ( ; i_first_track < i_last_track; i_first_track++ ) { char psz_msg[50]; sprintf(msg, "CD-Text for Track %d:", i_first_track); print_cdtext_track_info(p_cdio, i_first_track, psz_msg); } } int main(int argc, const char *argv[]) { track_t i_first_track; track_t i_tracks; CdIo_t *p_cdio; cdio = cdio_open (NULL, DRIVER_UNKNOWN); i_first_track = cdio_get_first_track_num(p_cdio); i_tracks = cdio_get_num_tracks(p_cdio); if (NULL == p_cdio) { printf("Couldn't find CD\n"); return 1; } else { print_disc_info(p_cdio, i_tracks, i_first_track); } cdio_destroy(p_cdio); return 0; }  File: libcdio.info, Node: Example 6, Next: Example 7, Prev: Example 5, Up: How to use 7.7 Example 6: Using MMC to run an `INQURY' command =================================================== Now a program to show issuing a simple MMC command (`INQUIRY'). This MMC command retrieves the vendor, model and firmware revision number of a CD drive. For this command to work, usually a CD to be loaded into the drive; odd since the CD itself is not used. This can be found in the distribution as `example/mmc1.c'. #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 /* assumes config.h is libcdio's config.h / #endif #include #include #include #include #include /* Set how long to wait for MMC commands to complete */ #define DEFAULT_TIMEOUT_MS 10000 int main(int argc, const char *argv[]) { CdIo_t *p_cdio; p_cdio = cdio_open (NULL, DRIVER_UNKNOWN); if (NULL == p_cdio) { printf("Couldn't find CD\n"); return 1; } else { int i_status; /* Result of MMC command */ char buf[36] = { 0, }; /* Place to hold returned data */ scsi_mmc_cdb_t cdb = {{0, }}; /* Command Descriptor Buffer */ CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_INQUIRY); cdb.field[4] = sizeof(buf); i_status = scsi_mmc_run_cmd(p_cdio, DEFAULT_TIMEOUT_MS, &cdb, SCSI_MMC_DATA_READ, sizeof(buf), &buf); if (i_status == 0) { char psz_vendor[CDIO_MMC_HW_VENDOR_LEN+1]; char psz_model[CDIO_MMC_HW_MODEL_LEN+1]; char psz_rev[CDIO_MMC_HW_REVISION_LEN+1]; memcpy(psz_vendor, buf + 8, sizeof(psz_vendor)-1); psz_vendor[sizeof(psz_vendor)-1] = '\0'; memcpy(psz_model, buf + 8 + CDIO_MMC_HW_VENDOR_LEN, sizeof(psz_model)-1); psz_model[sizeof(psz_model)-1] = '\0'; memcpy(psz_rev, buf + 8 + CDIO_MMC_HW_VENDOR_LEN +CDIO_MMC_HW_MODEL_LEN, sizeof(psz_rev)-1); psz_rev[sizeof(psz_rev)-1] = '\0'; printf("Vendor: %s\nModel: %s\nRevision: %s\n", psz_vendor, psz_model, psz_rev); } else { printf("Couldn't get INQUIRY data (vendor, model, and revision\n"); } } cdio_destroy(p_cdio); return 0; } Note the include of `#define' of `__CDIO_CONFIG_H__' towards the beginning. This is useful if the prior `#include' of `config.h' refers to libcdio's configuration header. It indicates that libcdio's configuration settings have been used. Without it, you may get messages about C Preprocessor symbols getting redefined in the `#include' of `'.  File: libcdio.info, Node: Example 7, Next: All sample programs, Prev: Example 6, Up: How to use 7.8 Example 7: Using the CD Paranoia library for CD-DA reading ============================================================== The below program reads CD-DA data. For a more complete program to add a WAV header so that the CD can be played from a copy on a hard disk, see the corresponding distribution program. This can be found in the distribution as `example/paranoia.c'. #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 /* assumes config.h is libcdio's config.h / #endif #include #include #include #ifdef HAVE_STDLIB_H #include #endif int main(int argc, const char *argv[]) { cdrom_drive_t *d = NULL; /* Place to store handle given by cd-paranoia. */ char **ppsz_cd_drives; /* List of all drives with a loaded CDDA in it. */ /* See if we can find a device with a loaded CD-DA in it. */ ppsz_cd_drives = cdio_get_devices_with_cap(NULL, CDIO_FS_AUDIO, false); if (ppsz_cd_drives) { /* Found such a CD-ROM with a CD-DA loaded. Use the first drive in the list. */ d=cdio_cddap_identify(*ppsz_cd_drives, 1, NULL); } else { printf("Unable find or access a CD-ROM drive with an audio CD in it.\n"); exit(1); } /* Don't need a list of CD's with CD-DA's any more. */ cdio_free_device_list(ppsz_cd_drives); /* We'll set for verbose paranoia messages. */ cdio_cddap_verbose_set(d, CDDA_MESSAGE_PRINTIT, CDDA_MESSAGE_PRINTIT); if ( 0 != cdio_cddap_open(d) ) { printf("Unable to open disc.\n"); exit(1); } /* Okay now set up to read up to the first 300 frames of the first audio track of the Audio CD. */ { cdrom_paranoia_t *p = cdio_paranoia_init(d); lsn_t i_first_lsn = cdio_cddap_disc_firstsector(d); if ( -1 == i_first_lsn ) { printf("Trouble getting starting LSN\n"); } else { lsn_t i_cursor; track_t i_track = cdio_cddap_sector_gettrack(d, i_first_lsn); lsn_t i_last_lsn = cdio_cddap_track_lastsector(d, i_track); /* For demo purposes we'll read only 300 frames (about 4 seconds). We don't want this to take too long. On the other hand, I suppose it should be something close to a real test. */ if ( i_last_lsn - i_first_lsn > 300) i_last_lsn = i_first_lsn + 299; printf("Reading track %d from LSN %ld to LSN %ld\n", i_track, (long int) i_first_lsn, (long int) i_last_lsn); /* Set reading mode for full paranoia, but allow skipping sectors. */ paranoia_modeset(p, PARANOIA_MODE_FULL^PARANOIA_MODE_NEVERSKIP); paranoia_seek(p, i_first_lsn, SEEK_SET); for ( i_cursor = i_first_lsn; i_cursor <= i_last_lsn; i_cursor ++) { /* read a sector */ int16_t *p_readbuf=cdio_paranoia_read(p, NULL); char *psz_err=cdio_cddap_errors(d); char *psz_mes=cdio_cddap_messages(d); if (psz_mes || psz_err) printf("%s%s\n", psz_mes ? psz_mes: "", psz_err ? psz_err: ""); if (psz_err) free(psz_err); if (psz_mes) free(psz_mes); if( !p_readbuf ) { printf("paranoia read error. Stopping.\n"); break; } } } cdio_paranoia_free(p); } cdio_cdda_close(d); exit(0); } Those who are die-hard cdparanoia programmers will notice that the `libcdio' paranoia names are similar but a little bit different. In particular instead of `paranoia_read' we have above `cdio_paranoia_read' and instead of `cdda_open' we have `cdio_cddap_open'. This was done intentionally so that it is possible for the original paranoia program can co-exist both in source code and linked libraries and not conflict with `libcdio''s paranoia source and libraries. In general in place of any paranoia routine that begins `paranoia_', use `cdio_paranoia_' and in place of any paranoia routine that begins `cdda_', use `cdio_cddap_'. But for a limited time `libcdio' will accept the old paranoia names which may be useful for legacy paranoia code. The way this magic works is by defining the old paranoia name to be the `libcdio' name. In the unusual case where you do want to use both the original paranoia and `libcdio' routines in a single source, the C preprocessor symbol `DO_NOT_WANT_PARANOIA_COMPATIBILITY' can be `define''d and this disables the `#define' substitution done automatically. The may still be a problem with conflicting structure definitions like `cdrom_drive_t'.  File: libcdio.info, Node: All sample programs, Prev: Example 7, Up: How to use 7.9 A list of all sample programs in the `example' directory ============================================================ The `example' directory contains some simple examples of the use of the `libcdio' library. A larger more-complicated example are the `cd-drive', `cd-info', `cd-read', `iso-info' and `iso-info' programs in the `src' directory. Descriptions of the sample are as follows... ``audio.c'' A program to show audio controls. ``cdchange.c'' A program to test if a CD has been changed since the last change test. ``cd-eject.c'' A a stripped-down "eject" command to open or close a CD-ROM tray. ``cdtext.c'' A program to show CD-Text and CD disc mode info. ``drives.c'' A program to show drivers installed and what the default CD-ROM drive is and what CD drives are available. ``eject.c'' A program eject a CD from a CD-ROM drive and then close the door again. ``isofile.c'' A program to show using libiso9660 to extract a file from an ISO-9660 image. ``isofile2.c'' A program to show using libiso9660 to extract a file from a CDRWIN cue/bin CD image. ``C++/isofile2.cpp'' The same program as `isofile2.c' written in C++. ``isofuzzy.c'' A program showing fuzzy ISO-9660 detection/reading. ``isolist.c'' A program to show using `libiso9660' to list files in a directory of an ISO-9660 image. ``C++/isolist.cpp'' The same program as `isolist.c' written in C++. ``C++/isolist.cpp'' The same program as `isolist.c' written in C++. ``isofuzzy.c'' A program showing fuzzy ISO-9660 detection/reading. ``mmc1.c'' A program to show issuing a simple MMC command (`INQUIRY'). ``C++/mmc1.cpp'' The same program as `mmc1.c' written in C++. ``mmc2.c'' A more involved MMC command to list CD and drive features from a SCSI-MMC `GET_CONFIGURATION' command. ``mmc2a.c'' Prints MMC `MODE_SENSE' page 2A parameters. Page 2a are the CD/DVD Capabilities and Mechanical Status. ``C++/mmc2.cpp'' The same program as `mmc2.c' written in C++. ``paranoia.c'' A program to show using libcdio's version of the CD-DA paranoia. ``paranoia2.c'' A program to show using libcdio's version of the CD-DA paranoia library. But in this version, we'll open a cdio object before calling paranoia's open. I imagine in many cases such as media players this may be what will be done since, one may want to get CDDB/CD-Text info beforehand. ``tracks.c'' A simple program to list track numbers and logical sector numbers of a Compact Disc using `libcdio'. ``sample2.c'' A simple program to show drivers installed and what the default CD-ROM drive is. ``sample3.c'' A simple program to show the use of `cdio_guess_cd_type()'. Figures out the kind of CD image we've got. ``sample4.c'' A slightly improved sample3 program: we handle cdio logging and take an optional CD-location. ``udf1.c'' A program to show using libudf to list files in a directory of an UDF image. ``udf2.c'' A program to show using libudf to extract a file from an UDF image.  File: libcdio.info, Node: Utility Programs, Next: CD-ROM Access and Drivers, Prev: How to use, Up: Top 8 Diagnostic programs: `cd-drive', `cd-info', `cd-read', `iso-info', `iso-read' ******************************************************************************* * Menu: * cd-drive:: list out CD-ROM drive information * cd-info:: list out CD or CD-image information * cd-read:: read blocks of a CD or CD image * iso-info:: list out ISO-9600 image information * iso-read:: extract a file from an ISO 9660 image  File: libcdio.info, Node: cd-drive, Next: cd-info, Up: Utility Programs 8.1 `cd-drive' ============== `cd-drive' lists out drive information, what features drive supports, and information about what hardware drivers are available.  File: libcdio.info, Node: cd-info, Next: cd-read, Prev: cd-drive, Up: Utility Programs 8.2 `cd-info' ============= `cd-info' will print out the structure of a CD medium which could either be a Compact Disc in a CD ROM or an CD image. It can try to analyze the medium to give characteristics of the medium, such as how many tracks are in the CD and the format of each track, whether a CD contains a Video CD, CD-DA, PhotoCD, whether a track has an ISO-9660 filesystem.  File: libcdio.info, Node: cd-read, Next: iso-info, Prev: cd-info, Up: Utility Programs 8.3 `cd-read' ============= `cd-info' can be used to read blocks a CD medium which could either be a Compact Disc in a CD ROM or an CD image. You specify the beginning and ending LSN and what mode format to use in the reading.  File: libcdio.info, Node: iso-info, Next: iso-read, Prev: cd-read, Up: Utility Programs 8.4 `iso-info' ============== `iso-info' can be used to print out the structure of an ISO 9660 image.  File: libcdio.info, Node: iso-read, Prev: iso-info, Up: Utility Programs 8.5 `iso-read' ============== `iso-read' can be used to extract a file in an ISO-9660 image.  File: libcdio.info, Node: CD-ROM Access and Drivers, Next: Internal Program Organization, Prev: Utility Programs, Up: Top 9 CD-ROM Access and Drivers *************************** * Menu: * SCSI mess:: SCSI, SCSI commands, and MMC commands * Access Modes:: Access Modes * Accessing Driver Parameters:: Accessing Driver Parameters * GNU/Linux:: GNU/Linux ioctl * Microsoft:: Microsoft Windows ioctl and ASPI * Solaris:: Solaris ATAPI and SCSI * FreeBSD:: FreeBSD ioctl and CAM * OS X:: OSX (non-exclussive access)  File: libcdio.info, Node: SCSI mess, Next: Access Modes, Up: CD-ROM Access and Drivers 9.1 SCSI, SCSI commands, and MMC commands ========================================= Historically, SCSI referred to a class of hardware devices and device controllers, bus technology and the data cables and protocols which attached to such devices. This is now called "Parallel SCSI". A specification standard grew out of the _commands_ that controlled such SCSI devices, but now covers a wider variety of bus technologies including Parallel SCSI, ATA/ATAPI, Serial ATA, Universal Serial Bus (USB versions 1.1 and 2.0), and High Performance Serial Bus (IEEE 1394, 1394A, and 1394B). Another similar class of hardware devices and controllers is called ATA and a command interface to that is called ATAPI (ATA Packetized Interface). ATAPI provides a mechanism for transferring and executing SCSI commands. MMC (Multimedia commands) is a specification which adds special SCSI commands for CD, DVD, Blu-Ray devices. If your optical drive understands MMC commands as most do nowadays, this probably gives the most flexibility in control. SCSI and ATAPI CD-ROM devices generally support a fairly large set of MMC commands. Unfortunately, on most Operating Systems one may need to do some additional setup, such as install drivers or modules, to allow access in this manner. The name "SCSI MMC" is often found in the literature in specifications and on the Internet. The "SCSI" part is probably a little bit misleading because a drive can understand "SCSI MMC" commands but not use a SCSI bus protocol--ATAPI CD-ROMs are one such broad class of examples. In fact there are drivers to "encapsulate" non-SCSI drives to make them act like more like SCSI drives, such as by adding SCSI address naming. For clarity and precision we will use the term "MMC" rather than "SCSI MMC". One of the problems with MMC is that there are so many different "standards". In particular: * MMC -- `ftp://ftp.t10.org/t10/drafts/mmc/', * MMC 2 -- `ftp://ftp.t10.org/t10/drafts/mmc2/' * MMC 3 -- `ftp://ftp.t10.org/t10/drafts/mmc3/' * MMC 4 -- `ftp://ftp.t10.org/t10/drafts/mmc4/' * MMC 5 -- `ftp://ftp.t10.org/t10/drafts/mmc5/' along with the several "drafts" of these. Another problem with the MMC commands related to the variations in standards is the variation in the commands themselves and there are perhaps two or three ways to do many of the basic commands like read a CD frame. There seems to be a fascination with the number of bytes a command takes in the MMC-specification world. (Size matters?) So often the name of an operation will have a suffix with the number of bytes of the command (actually in MMC jargon this is called a "CDB" or command descriptor block). So for example there is a 6-byte "MODE SELECT" often called "MODE SELECT 6" and a 10-byte "MODE SELECT" often called "MODE SELECT 10". Presumably the 6-byte command came first and it was discovered that there was some deficiency causing the longer command. In `libcdio' where there are two formats we add the suffix in the name, e.g. `CDIO_MMC_GPCMD_MODE_SELECT_6' or `CDIO_MMC_GPCMD_MODE_SELECT_10'. If the fascination and emphasis in the MMC specifications of CDB size is a bit odd, equally so is the fact that this too often has bled through at the OS programming API. However in `libcdio', you just give the opcode in `scsi_mmc_run_cmd()' and we'll do the work to figure out how many bytes of the CDB are used. Down the line it is hoped that `libcdio' will have a way to remove a distinction between the various alternative and alternative-size MMC commands. In `cdio/scsi-mmc.h' you will find a little bit of this for example via the routine `scsi_mmc_get_drive_cap()'. However much more work is needed. Finally, in `libcdio' there is a driver access mode (not a driver) called "MMC". It tells the specific drivers to use MMC commands instead of other OS-specific mechanisms.  File: libcdio.info, Node: Access Modes, Next: Accessing Driver Parameters, Prev: SCSI mess, Up: CD-ROM Access and Drivers 9.2 Access Modes ================ There are serveral ways that you can open a CD-ROM drive for subsequent use. Each way is called an _access mode_. Historically libcdio only supported a reading kind of access. Adding the abilty to writing to a drive for "burning" is being added by Thomas Schmitt, and this is accomplished by opening the drive in a read-write mode. Currently writing modes are only supported via the MMC command interface. Under this, one can get exclusive read-write access or non-exclusive read-write access. The names of these two modes are `MMC_RDWR_EXCL' and `MMC_RDWR' respectively. On various OS's often there are two kinds of read modes that are supported, one which uses MMC commands and one which uses some sort of OS-specific native command interface. For example on Unix, there is often a access mode associated with issuing an device-specific `ioctl''s that the OS supports. To specify a particular kind of access mode, use `cdio_open_am' which is like `cdio_open' but it requires one to specify an access mode.  File: libcdio.info, Node: Accessing Driver Parameters, Next: GNU/Linux, Prev: Access Modes, Up: CD-ROM Access and Drivers 9.3 Accessing Driver Parameters -- `cdio_get_arg' ================================================= Once a driver is opened, you can use call `cdio_get_arg' to get information about the driver. Each driver can have specific features that can be queried, but there are features that are common to all drivers. These are listed below: ``access-mode'' This returns a string which is the name of the access mode in use. ``mmc-supported?'' This returns a string "true" or "false" depending whether the driver with this access mode support MMC commands. ``scsi-tuple'' On drivers that support MMC commands, this returns the SCSI name or a faked-up SCSI name that ripping front ends typically use.  File: libcdio.info, Node: GNU/Linux, Next: Microsoft, Prev: Accessing Driver Parameters, Up: CD-ROM Access and Drivers 9.4 GNU/Linux ============= The GNU/Linux uses a hybrid of methods. Somethings are done via ioctl and some things via MMC. GNU/Linux has a rather nice and complete ioctl mechanism. On the other hand, the MMC mechanism is more universal. There are other "access modes" listed which are not really access modes and should probably be redone/rethought. They are just different ways to run the read command. But for completeness These are "READ_CD" and "READ_10". Writing/burning to a drive is supported via access modes `MMC_RDWR_EXCL' or `MMC_RDWR'.  File: libcdio.info, Node: Microsoft, Next: Solaris, Prev: GNU/Linux, Up: CD-ROM Access and Drivers 9.5 Microsoft Windows ioctl and ASPI ==================================== There are two CD drive access methods on Microsoft Windows platforms: ioctl and ASPI. The ASPI interface specification was developed by Adaptec for sending commands to a SCSI host adapter (such as those controlling CD and DVD drives) and used on Window 9x/NT and later. Emulation for ATAPI drives was added so that the same sets of commands worked those even though the drives might not be SCSI nor might there even be a SCSI controller attached. The DLL is not part of Microsoft Windows and has to be downloaded and installed separately. However in Windows NT/2K/XP, Microsoft provides their Win32 ioctl interface, and has taken steps to make using ASPI more inaccessible (e.g. requiring administrative access to use ASPI).  File: libcdio.info, Node: Solaris, Next: FreeBSD, Prev: Microsoft, Up: CD-ROM Access and Drivers 9.6 Solaris ATAPI and SCSI ========================== There is currently only one CD drive access methods in Solaris: SCSI (called "USCSI" or "user SCSI" in Solaris). There used to be an ATAPI method and it could be resurrected if needed. USCSI was preferred since on newer releases of Solaris and Solaris environments one need to have root access for ATAPI.  File: libcdio.info, Node: FreeBSD, Next: OS X, Prev: Solaris, Up: CD-ROM Access and Drivers 9.7 FreeBSD ioctl and CAM ========================= There are two classes of access methods on FreeBSD: ioctl and CAM (common access method). CAM is preferred when possible, especially on newer releases. However CAM is right now sort of a hybrid and includes some ioctl code. Writing/burning to a drive is supported via access modes `MMC_RDWR_EXCL' or `MMC_RDWR' which underneath use CAM access.  File: libcdio.info, Node: OS X, Prev: FreeBSD, Up: CD-ROM Access and Drivers 9.8 OS X (non-exclusive access) =============================== A problem with libcdio on OS/X is that if the OS thinks it understands the drive, it will get exclusive access to the drive and thus prevents a library like this from obtaining non-exclusive access. Currently `libcdio' access the CD-ROM non-exclusively. However in order to be able to issue MMC, the current belief is that exclusive access is needed. Probably in a future `libcdio', there will be some way to specify which kind of access is desired (with the inherent consequences of each). More work on this driver is needed. Volunteers?  File: libcdio.info, Node: Internal Program Organization, Next: ISO-9660 Character Sets, Prev: CD-ROM Access and Drivers, Up: Top 10 Internal Program Organization ******************************** * Menu: * File Organization:: * Library Organization:: * Programming Conventions::  File: libcdio.info, Node: File Organization, Next: Library Organization, Up: Internal Program Organization 10.1 File Organization ====================== Here is a list of `libcdio' directories. * `include/cdio' This contains the headers that are public. One that will probably be used quite a bit is `'. * `lib' Code for installed libraries. See below for further breakout * `lib/driver' Code for various OS-specific CD-ROM drivers, image drivers, and common MMC routines. This code comprises `libcdio.a' (or the shared version of it). * `lib/iso9660' Code for to extract or query ISO-9660 images. This code comprises `libiso9660.a' (or the shared version of it). * `lib/paranoia' This is from cdparanoia. It is the OS- and hardware- dependent code to detect and correct jitter for CD-DA CDs. * `lib/cdda_interface' This is also from cdparanoia. It is the OS- and hardware- independent code to detect and correct jitter for CD-DA CDs. * `doc' A home for fine documentation such as this masterpiece. * `example' Here you will find various small example programs using `libcdio' which are largely for pedagogical purposes. You might be able to find one that is similar to what you want to do that could be extended. In fact some these are contain the kernel ideas behind of some of the larger programs in `src'. * `src' Various stand-alone utility programs. See below. * `src/paranoia' `libcdio''s version of `cdparanoia'. Except for the fact that the back-end CD-reading code has been replaced by `libcdio''s routines the code is pretty much identical. * `test' Regression tests * `test/data' Disk images and image meta-data used in tests * `test/driver' Unit tests centered around the libcdio library (`libcdio', source location `lib/driver'  File: libcdio.info, Node: Library Organization, Next: Programming Conventions, Prev: File Organization, Up: Internal Program Organization 10.2 Library Organization ========================= * Menu: * libcdio:: * libcdio_cdda:: Access to CD-DA via the CD Paranoia library * libcdio_paranoia:: Access to the CD Paranoia library * libiso9660:: Access to ISO 9660 file systems and structures * libudf:: Access to UDF file systems and structures  File: libcdio.info, Node: libcdio, Next: libcdio_cdda, Up: Library Organization 10.2.1 `libcdio' ---------------- `libcdio' exports one opaque type `CdIo_t'. Internally this a structure containing an enumeration for the driver, a structure containing function pointers and a generic "environment" pointer which is passed as a parameter on a function call. See `lib/driver/cdio_private.h'. The initialization routine for each driver sets up the function pointers and allocates memory for the environment. When a particular user-level cdio routine is called (e.g `cdio_get_first_track_num' for lib/driver/track.c), the environment pointer is passed to a device-specific routine which will then cast this pointer into something of the appropriate type. Because function pointers are used, there can be and is quite a bit of sharing of common routines. Some of the common routines are found in the file `lib/driver/_cdio_generic.c'. Another set of routines that one is likely to find shared amongst drivers are the MMC commands. These are located in `lib/driver/scsi_mmc.c'. There is not only an attempt to share functions but we've tried to create a generic CD structure `generic_img_private_t' of file `lib/driver/generic.h'. By putting information into a common structure, we increase the likelihood of being able to have a common routine to perform some sort of function. The generic CD structure would also be useful in a utility to convert one CD-image format to another. Basically the first image format is "parsed" into the common internal format and then from this structure it is not parsed.  File: libcdio.info, Node: libcdio_cdda, Next: libcdio_paranoia, Prev: libcdio, Up: Library Organization 10.2.2 `libcdio_cdda' --------------------- This library is intended to give access CD-DA disks using Monty's cd-paranoia library underneath. To be completed....  File: libcdio.info, Node: libcdio_paranoia, Next: libiso9660, Prev: libcdio_cdda, Up: Library Organization 10.2.3 `libcdio_paranoia' ------------------------- This library is intended to give access Monty's cd-paranoia library. It is the gap detection and jitter correction part without the part dealing with CD-DA reading. To be completed....  File: libcdio.info, Node: libiso9660, Next: libudf, Prev: libcdio_paranoia, Up: Library Organization 10.2.4 `libiso9660' ------------------- This library is intended to give access and manipulate a ISO-9600 file image. One part of it is concerned with the the entire ISO-9660 file system image, and the other part access routines for manipulating data structures and fields that go into such an image. To be completed....  File: libcdio.info, Node: libudf, Prev: libiso9660, Up: Library Organization 10.2.5 `libudf' --------------- This library is intended to give access and manipulate a UDF file image. To be completed....  File: libcdio.info, Node: Programming Conventions, Prev: Library Organization, Up: Internal Program Organization 10.3 Programming Conventions ============================ * Menu: * Coding Conventions:: * Namespace Conventions::  File: libcdio.info, Node: Coding Conventions, Next: Namespace Conventions, Up: Programming Conventions 10.3.1 Coding Conventions ------------------------- In `libcdio' there are a number of conventions used. If you understand some of these conventions it may facilitate understanding the code a little.  File: libcdio.info, Node: Namespace Conventions, Prev: Coding Conventions, Up: Programming Conventions 10.3.2 Namespace Conventions ---------------------------- For the most part, the visible external `libcdio' names follow conventions so as not to be confused with other applications or libraries. If you understand these conventions, there will be little or no chance that the names you use will conflict with `libcdio' and `libiso9660' and vice versa. All of the external `libcdio' C routines start out with `cdio_', e.g. `cdio_open'; as a corollary, the `libcdio' CD-Paranoia routines start `cdio_cddap_', e.g. `cdio_cddap_open'. `libiso9660' routines start `iso9660_', e.g. `iso9660_open'. `libcdio' C-Preprocessor names generally start `CDIO_', for example `CDIO_CD_FRAMESIZE_RAW'; `libiso9660' C-preprocessor names start `ISO9660_', e.g. `ISO9660_FRAMESIZE'. 10.3.2.1 suffixes (type and structure names) ............................................ A few suffixes are used in type and structure names: * `_e' An enumeration tag. Generally though the same name will appear with the `_t' suffix and probably that should be used instead. * `_s' A structure tag. Generally though the same name will appear with the `_t' suffix and probably that should be used instead. * `_t' A type suffix. 10.3.2.2 prefixes (variable names) .................................. A number of prefixes are used in variable names here's what they mean * `i_' An integer type of some sort. A variable of this ilk one might find being iterated over in `for' loops or used as the index of an array for example. * `b_' A Boolean type of some sort. A variable of this ilk one might find being in an `if' condition for example. * `p_' A pointer of some sort. A variable of this ilk, say `p_foo' one is like likely to see `*p_foo' or `p_foo->...'. * `pp_' A pointer to a pointer of some sort. A variable of this ilk, say `pp_foo' one is like likely to see `**p_foo' or `p_foo[x][y]' for example * `psz_' A `char *' pointer of some sort. A variable of this ilk, say `psz_foo' may be used in a string operation. For example `printf(%s\n", psz_foo)' or `strdup(psz_foo)'. * `ppsz_' A pointer to a `char *' pointer of some sort. A variable of this ilk, say `ppsz_foo' is used for example to return a list of CD-ROM device names There are a some other naming conventions. Generally if a routine name starts `cdio_', e.g. `cdio_open', then it is an externally visible routine in `libcdio'. If a name starts `iso9660_', e.g. `iso9660_is_dchar' then it is an externally visible routine in `libiso9660'. If a name starts `scsi_mmc_', e.g. `scsi_mmc_get_discmode', then it is an externally visible MMC routine. (We don't have a separate library for this yet. Names using entirely capital letters and that start `CDIO_' are externally visible `#defines'.  File: libcdio.info, Node: ISO-9660 Character Sets, Next: Glossary, Prev: Internal Program Organization, Up: Top Appendix A ISO-9660 Character Sets ********************************** For a description of where are used see *Note ISO 9660 Level 1::. * Menu: * ISO646 d-Characters:: * ISO646 a-Characters::  File: libcdio.info, Node: ISO646 d-Characters, Next: ISO646 a-Characters, Up: ISO-9660 Character Sets A.1 ISO646 d-Characters ======================= | 0 1 2 3 4 5 6 7 --+----------------- 0 | 0 P 1 | 1 A Q 2 | 2 B R 3 | 3 C S 4 | 4 D T 5 | 5 E U 6 | 6 F V 7 | 7 G W 8 | 8 H X 9 | 9 I Y a | J Z b | K c | L d | M e | N f | O _  File: libcdio.info, Node: ISO646 a-Characters, Prev: ISO646 d-Characters, Up: ISO-9660 Character Sets A.2 ISO646 a-Characters ======================= | 0 1 2 3 4 5 6 7 --+----------------- 0 | 0 P 1 | ! 1 A Q 2 | " 2 B R 3 | 3 C S 4 | 4 D T 5 | % 5 E U 6 | & 6 F V 7 | ' 7 G W 8 | ( 8 H X 9 | ) 9 I Y a | * : J Z b | + ; K c | , < L d | - = M e | . > N f | / ? O _  File: libcdio.info, Node: Glossary, Next: GNU Free Documentation License, Prev: ISO-9660 Character Sets, Up: Top Appendix B Glossary ******************* Thomas Schmitt has made significant contributions to this glossary. See also `http://www.dvdrhelp.com/glossary'. "ASPI" See Win32 ASPI "ATA" Advanced Technology Attachment (ATA). The same thing as IDE. "ATAPI" Advanced Technology Attachment (ATA) Packet Interface. The interface provides a mechanism for transferring and executing SCSI CDBs on IDE CD Drives and DVD Drives. IDE (also called ATA) was originally designed for hard drives only, but with help of ATAPI it is possible to connect other devices, in particular CD-ROMS to the IDE/EIDE connections. The ATAPI CD-ROM drives understand a subset of SCSI commands. In particular multi-initiator commands are neither needed nor defined for ATAPI devices. "BIN/CUE" A CD-image format developed by Jeff Arnold for CDRWIN software on Microsoft Windows. Many other programs subsequently support using this format. The `.CUE' file is a text file which contains CD format and track layout information, while the `.BIN' file holds the actual data of each track. "Blu-ray Disc (BD)" Optical media with capacity of 25 GB as single layer and 50 GB as double layer. See also *note "Media models and profiles": models-profiles. "CD" Compact Disc. Capacity up to 900 MB. See also *note "Media models and profiles": models-profiles. "CD-DA" Compact Disc Digital Audio, described in the "Red Book" or IEC 60908 (formerly IEC 908). This commonly referred to as an audio CD and what most people think of when you play a CD as it was the first to use the CD medium. See `http://en.wikipedia.org/wiki/Red_Book_(audio_CD_standard)' "CD+G" Compact Disc + Graphics. An extension of the CD audio format contains a limited amount of graphics in subcode channels. This disc works in all audio players but the graphics portion is only available in a special CD+G or Karaoke player. "CD-i" Compact Disc Interactive. An extension of the CD format designed around a set-top computer that connects to a TV to provide interactive home entertainment, including digital audio and video, video games, and software applications. Defined by the "Green Book" standard. `http://www.icdia.org/'. CD-i for video and video music has largely (if not totally) been superseded by VCDs. "CD-i Bridge" A standard allowing CD-ROM XA discs to play on CD-i. Kodak PhotoCDs are CD-XA Bridge discs. "CD-ROM" Compact Disc Read Only Memory or "Yellow Book" describe in Standards ISO/IEC 10149. The data stored on it can be either in the form of audio, computer or video files. "CD-ROM Mode 1 and Mode2" The Yellow Book specifies two types of tracks, Mode 1 and Mode 2. Mode 1 is used for computer data and text and has an extra error correction layer. Mode 2 is for audio and video data and has no extra correction layer. CD-ROM/XA An expansion of the CD-ROM Mode 2 format that allows both computer and audio/video to be mixed in the same track. "CD Text" CD Text is a technology developed by Sony Corporation and Philips Electronics in 1996 that allows storing in an audio CD and its tracks information such as artist name, title, songwriter, composer, or arranger. Commercially available audio CDs sometimes contain CD Text information. "CD XA" CD-ROM EXtended Architecture. A modification to the CD-ROM specification that defines two new types of sectors. CD-ROM XA was developed jointly by Sony, Philips, and Microsoft, and announced in August 1988. Its specifications were published in an extension to the Yellow Book. CD-i, Photo CD, Video CD and CD-EXTRA have all subsequently been based on CD-ROM XA. CD-XA defines another way of formatting sectors on a CD-ROM, including headers in the sectors that describe the type (audio, video, data) and some additional info (markers, resolution in case of a video or audio sector, file numbers, etc). The data written on a CD-XA is consistent with and can be in ISO-9660 file system format and therefore be readable by ISO-9660 file system translators. But also a CD-I player can read CD-XA discs even if its own `Green Book' file system only resembles ISO 9660 and isn't fully compatible. "DVD" Digital Versatile Disc. Capacity up to 4.5 GB as single layer and 8.5 GB as double layer media. See also *note "Media models and profiles": models-profiles. "Defect management" A method to compensate small amounts of bad spots on media by replacing them out of a pool of reserve blocks and performing address translation. The necessary checkreading slows down write performance by a factor of 2 or 3. Defect management applies by default to DVD-RAM and BD-RE. Optionally it can be formatted onto CD-RW and DVD+RW, where it has the name "Mount Rainier". Sequential BD-R can be formatted for defect management too. "Command Packet" The data structure that is used to issue an ATAPI command. It contains a SCSI Command Descriptor Block (CDB). "ECMA-119 (ISO-9660)" (`http://www.ecma-international.org/publications/standards/Ecma-119.htm' is a freely available specification which is technically identical to ISO 9660. "ECMA-167 (UDF)" (`http://www.ecma-international.org/publications/standards/Ecma-167.htm' is a freely available specification which is also approved as ISO 13346. It serves as base for UDF. "ECMA-168" (`http://www.ecma-international.org/publications/standards/Ecma-168.htm' is a freely available specification which is also approved as ISO 13490. "FSF" Free Software Foundation, `http://www.fsf.org/' "GNU" GNU is not UNIX, `http://www.gnu.org/' "IDE" Integrated Drive Electronics. This is a commonly used interface for hard disk drives and CD-ROM drives. It is less expensive than SCSI, but offers slightly less in terms of performance. "ISO" International Standards Organization. "ISO 13346" ISO 13346 / ECMA-167 is a filesystem framework for data exchange on overwriteable or pseudo-overwriteable media. It serves as base of UDF. "ISO 13490" ISO 13490 / ECMA-168 is an attempt to replace ISO 9660 by a format that allows finer write granularity and representation of typical disk file properties. It resembles ECMA-167 which led to UDF. "ISO 9660" ISO 9660 / ECMA-119 is an operating-system independent filesystem format originally intended for CD-ROM media. It was standardized in 1988 and replaced the High Sierra standard for the logical format on CD-ROM media (ISO 9660 and High Sierra are identical in content, but the exact format is different). ISO 9660 and ECMA-119 are technically identical meanwhile. There are several specification levels. In Level 1, file names must be in the 8.3 format (no more than eight characters in the name, no more than three characters in the suffix) and in capital letters. Directory names can be no longer than eight characters. There can be no more than eight nested directory levels. Level 2 and 3 specifications allow file names up to 32 characters long. Level 3 allows data file sizes to be 4 GB or larger. File data content is stored in extents, i.e. contiguous sequences of blocks. A single extent can hold only up to 2 exp 32 - 1 bytes. So files of 4 GB or larger need more than one extent to be stored. Older operating systems might have trouble with multi-extent files. "Joliet extensions" This ISO-9660 upward-compatible standard was developed for Windows 95 and Windows NT by Microsoft as an extension of ISO 9600 which allows the use of Unicode characters and supports file names up to 64 characters. See `http://bmrc.berkeley.edu/people/chaffee/jolspec.html' for the Joliet Specification. The name Joliet comes from the city in Illinois (U.S) that the standard was defined. "LBA" Logical Block Addressing. Mapped integer numbers from CD Red Book Addressing MSF. The starting sector is -150 and ending sector is 449849, which correlates directly to MSF: 00:00:00 to 99:59:74. Because an LBA is a single number it is often easier to work with in programming than an MSF. "Lead in" The area of a CD where the Table Of Contents (TOC) and CD Text are stored. I think it is supposed to be around 4500 (1 min) or more sectors in length. On a CDR(W) the lead-in length is variable, because manufacturers have a different starting position indicated by the ATIP start of lead-in position that is recorded in the ATIP groove on the disk. For example: "Ricoh Company Limited" 97:27:00, 97:27:06, 97:27:66 "Mitsubishi Chemical (Verbatim)" 97:34:21 to 97:34:25 "LSN" Logical Sector Number. Mapped integer numbers from CD Red Book Addressing MSF. The starting sector is 0 and ending sector is 449699, which correlates to MSF: 00:00:00 to 99:59:74. Because an LSN is a single number it is often easier to work with in programming than an MSF. Because it starts at 0 rather than -150 as is the case of an LBA it can be represented as an unsigned value. "MCN" Media Catalog Number. A identification number on an audio CD. Also called a UPC. Another identification number is ISRC. "MMC" MMC (Multimedia Commands). MMC are raw commands for communicating with CDROM drives, CD-Rewriters, DVD-Rewriters, etc. The are subset of the larger SCSI command set. See also *note SCSI: SCSI. Many manufacturers have adopted this standard and it also applies to ATAPI versions of their drives. The documents `libcdio' makes use of are described in the Multi-Media Commands standard (MMC). This document generally has a numeric level number appended. For example MMC-5 refers to "Multi-Media Commands - 5. "Media models and profiles" MMC classifies media as models, which describe their logical structure, and as profiles, which describe the capabilities of the drive with the particular media. So both are closely related but not identical. There are three model families: CD, DVD, Blu-ray. CD allows special sector formats like audio as well as data sectors of 2048 bytes. DVD and Blu-ray only record data sectors. "Non-writable media: CD-ROM, DVD-ROM, BD-ROM." "Write-once media: CD-R, DVD-R, DVD+R, BD-R." "Reusable media: CD-RW, DVD-RW, DVD+RW, DVD-RAM, BD-RE." Profiles depend on drive type and media state. They are expressed as numbers. It is unfortunate that formatted CD-RW have the same profile number as unformatted ones. ROM drives often announce all media as ROM profiles. Some writer drives show closed sequential media as ROM profile. "CD-ROM 0x08" "DVD-ROM 0x10" "BD-ROM 0x40" Sequentially recordable profiles allow multisession in most cases. Special burn programs are needed for writing to them. "CD-R 0x09" "CD-RW 0x0a (unformatted)" "DVD-R 0x11" "DVD-RW 0x14 (unformatted)" "DVD-R DL 0x15 (double layer)" "DVD-R DL 0x16 (double layer, jump recording)" "DVD+R 0x1a" "DVD+RW DL 0x2a (double layer)" "DVD+R DL 0x2b (double layer)" "BD-R 0x41 (single or double layer, formatted or not)" "HD DVD-ROM 0x50" "HD DVD-R 0x51" "HD DVD-RAM 0x52" They can assume three states: ""Blank" is not readable but writeable from scratch" ""Appendable" is readable and after the readable part still writeable" ""Closed" is only readable" CD-RW and DVD-RW can be brought back to blank state, or they can be formatted to become overwriteable. Overwriteable profiles allow random read-write access with a granularity of 2 kB or 32 kB. One can hope for having read-write access via the normal POSIX operations lseek(), read(), write() of the operating system. "CD-RW 0x0a (formatted)" "DVD-RAM 0x12" "DVD-RW 0x13 (formatted, 32 kB write granularity)" "DVD+RW 0x1a" "BD-R 0x42 (formatted for pseudo-random recording)" "BD-RE 0x43 (single or double layer)" BD-R profile 0x42 is defined by MMC but not implemented by the consumer priced Blu-ray burners as of year 2010. "Mixed Mode CD" A Mixed Mode is a CD that contains tracks of differing CD-ROM Mode formats. In particular the first track may contain both computer data (Yellow Book) CD ROM data while the remaining tracks are audio or video data. Video CD's can be Mixed Mode CDs. "Multisession" A way of writing to a CD , DVD or Blu-ray Disc that allows more data to be added to readable discs at a later time. The media must not have been closed by the previous write session. This applies originally to unformatted CD-R, CD-RW, DVD-R, DVD-RW, DVD+R, and sequential BD-R which all can record more than one session. They hold a table-of-content with sessions and tracks. Formatted CD-RW, DVD-RAM, DVD+RW, DVD-RW, and BD-RE have only one track. Multisession on these media needs help by the recorded data formats. Multisession can be used to add a changeset to an existing ISO 9660 filesystem. Typically the add-on session contains a whole new filesystem tree with old and new files. It also contains the data blocks of the newly introduced or freshly overwritten files. The convention for mounting multisession ISO 9660 images is to load the superblock from the start of the first track in the last session as listed in the media table-of-content. Formatted media are assumed to have a single track starting at block 0. So ISO 9660 multisession on formatted media has to overwrite the volume descriptors at block 16 ff. with every new session. A chain of recognizable sessions can be achieved by starting the first ISO 9660 image at block 32 so that its descriptors get not overwritten later. "Nero NRG format file" A proprietary CD image file format use by a popular program for Microsoft Windows, Ahead Nero. The specification of this format is not to our knowledge published. "Rock Ridge Extensions" An extension to the ISO-9660 standard which adds POSIX information to files. It allows long file names, owner, group, access permissions `ugo+-rwx', inode numbers, hard-link count, file types other than directory or regular file. Rock Ridge is described by unapproved standard IEEE P1282 / RRIP-1.12 and based on unapproved IEEE P1281 / SUSP-1.10. It has become a de-facto standard on X/Open systems like GNU/Linux, FreeBSD, Solaris, et.\ al. "SCSI" Small Computer System Interface. A set of ANSI standard electronic interfaces (originally developed at Apple Computer) that allow personal computers to communicate with peripheral hardware such as CD-ROM drives, disk drives, printers, etc. Although the original hardware is outdated since years, the SCSI command set nowadays controls most storage devices including all optical disc drives. The contemporary electronic technologies which transport SCSI commands to optical drives are P-ATA, SATA, and USB. A SCSI programming specification made by the SCSI committee T10 organization `http://www.t10.org/'. The documents `libcdio' makes use of are described in SCSI standards documents SCSI Primary Commands (SPC), SCSI Block Commands (SBC), and Multi-Media Commands (MMC). These documents generally have a numeric level number appended. For example SPC-3 refers to "SCSI Primary Commands - 3'. In year 2010 the current versions were SPC-3, SBC-2, MMC-5. "SCSI CDB" SCSI Command Descriptor Block. The data structure that is used to issue a SCSI command. "SCSI Pass Through Interface." Yet another way of issuing MMC commands for accessing a CD-ROM. As with MMC or ASPI, the CD-ROM doesn't necessarily have to be a SCSI-attached drive. See also *note MMC: MMC. and *note ASPI: MMC. "Session" A fully readable complete recording that contains one or more tracks of computer data or audio on a CD. On a DVD or Blu-ray Disc, there are only data sessions. "SVCD" Super VCD An improvement of Video CD 2.0 specification which includes most notably a switch from MPEG-1 (constant bit rate encoding) to MPEG-2 (variable bit rate encoding) for the video stream. Also added was higher video-stream resolution, up to 4 overlay graphics and text ("OGT") sub-channels for user switchable subtitle displaying, closed caption text, and command lists for controlling the SVCD virtual machine. See `http://www.dvdrhelp.com/svcd' "TOC" (Compact Disc) Table of Contents. The TOC contains a list of sessions and their tracks. For sessions, it records the starting track number and the last track number. For tracks it records starting time block address, size, copy protection, linear audio preemphasis, track format (CDDA or data) in that order. Session and track information is also available on sequential DVD and Blu-ray Discs. Several track properties are fixed to equivalents of CD data. "Track" A unit of data of a CD. The size of a track can vary; it can occupy the entire contents of the CD. Most CD standards however require that tracks have a 150 frame (or "2 second") lead-in gap. An abstraction of tracks for CD, DVD and Blu-ray Discs is the Logical Track as of MMC specs. Overwriteable media have a single logical track, sequential media can have one or more logical tracks which they describe in their TOC. "UDF" Universal Disc Format was designed as successor of ISO 9660. It allows to record long file names and advanced file properties. Although intended as format for data exchange its main importance is with DVD video players. Video DVDs have to bear a simple UDF filesystem with a prescribed set of files. "VCD" The Video Compact Disc ("Video CD" or "VCD") is a standardized digital video storage format. It is based on the commonly available Compact Disc technology, which allows for low-cost video authoring. Video CD's can be played in most DVD standalone player, dedicated VCD players and finally, modern Personal Computers with multimedia support. A Video CD is made up of CD-ROM XA sectors, i.e. CD-ROM mode 2 form 1 & 2 sectors. Non-MPEG data is stored in mode 2 form 1 sectors with a user data area of 2048 byte, which have a similar L2 error correction and detection (ECC/EDC) to CD-ROM mode 1 sectors. While real-time MPEG streams is stored in CD-ROM mode 2 form 2 sectors, which by have no L2 ECC, yield a ~14% greater user data area consisting of 2324 bytes(1) `http://www.dvdrhelp.com/vcd' "Win32 ASPI" The ASPI interface specification was developed by Adaptec for sending commands to a SCSI host adapter (such as those controlling CD and DVD drives) and used on Window 9x/NT and later. Emulation for ATAPI drives was added so that the same sets of commands worked those even though the drives might not be SCSI nor might there even be a SCSI controller attached. However in Windows NT/2K/XP, Microsoft provides their Win32 ioctl interface, and has take steps to make using ASPI more inaccessible (e.g. requiring administrative access to use ASPI). See also *note MMC: MMC. "Win32 ioctl driver" Ioctl (Input Output ConTroLs). A Win32 function, implemented in all Microsoft Windows. It is used for sending commands to devices using defined codes and structures. "XA" *Note CD-ROM XA: XA. ---------- Footnotes ---------- (1) actually raw mode 2 sectors have a 2336 byte user data area, but parts of it are used for error codes and headers when using the mode 2 form 1 or form 2 configurations.  File: libcdio.info, Node: GNU Free Documentation License, Next: General Index, Prev: Glossary, Up: Top Appendix C GNU Free Documentation License ***************************************** Version 1.2, November 2002 Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. 0. PREAMBLE The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. 1. APPLICABILITY AND DEFINITIONS This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque". Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition. The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. 2. VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. 3. COPYING IN QUANTITY If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. 4. MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. C. State on the Title page the name of the publisher of the Modified Version, as the publisher. D. Preserve all the copyright notices of the Document. E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. H. Include an unaltered copy of this License. I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. O. Preserve any Warranty Disclaimers. If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. 5. COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements." 6. COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. 7. AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. 8. TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. 9. TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 10. FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See `http://www.gnu.org/copyleft/'. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. ADDENDUM: How to use this License for your documents ==================================================== To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: Copyright (C) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this: with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.  File: libcdio.info, Node: General Index, Prev: GNU Free Documentation License, Up: Top General Index ************* [index] * Menu: * ASPI: Glossary. (line 10) * BIN/CUE, CD Image Format: CDRWIN BIN/CUE Format. (line 6) * Blu-ray Disc (BD): Glossary. (line 36) * CD: Glossary. (line 41) * CD Text <1>: Glossary. (line 84) * CD Text: CD Text. (line 6) * CD XA: Glossary. (line 91) * CD+G <1>: Glossary. (line 53) * CD+G: CD Text. (line 6) * CD-DA <1>: Glossary. (line 45) * CD-DA: Pre-gaps. (line 6) * CD-i: Glossary. (line 59) * CD-i Bridge: Glossary. (line 67) * CD-ROM: Glossary. (line 71) * CDB (Command Descriptor Block): SCSI mess. (line 63) * CDDB: CDDB. (line 6) * Command Packet: Glossary. (line 124) * Defect management: Glossary. (line 115) * DVD: Glossary. (line 110) * ECMA-119: Glossary. (line 128) * ECMA-167: Glossary. (line 133) * ECMA-168: Glossary. (line 138) * FDL, GNU Free Documentation License: GNU Free Documentation License. (line 6) * frames: Sectors. (line 6) * FSF: Glossary. (line 143) * gaps <1>: Pre-gaps. (line 6) * gaps: Tracks. (line 6) * GNU: Glossary. (line 146) * Green Book <1>: White Book. (line 6) * Green Book: Green Book. (line 6) * ISO: Glossary. (line 154) * ISO 13346: Glossary. (line 157) * ISO 13490: Glossary. (line 162) * ISO 9660 <1>: Glossary. (line 167) * ISO 9660: ISO 9660. (line 6) * Joliet extensions <1>: Glossary. (line 187) * Joliet extensions: Joliet Extensions. (line 6) * LBA <1>: Glossary. (line 199) * LBA: Sectors. (line 6) * lead in <1>: Glossary. (line 206) * lead in: Pre-gaps. (line 6) * lead out <1>: Pre-gaps. (line 6) * lead out: Tracks. (line 19) * LSN <1>: Glossary. (line 220) * LSN: Sectors. (line 6) * MCN: Glossary. (line 229) * Media models and profiles: Glossary. (line 248) * Mixed Mode CD: Glossary. (line 329) * MMC (Multimedia Commands): Glossary. (line 233) * Mode 1: Mode 1. (line 6) * Mode 2: Mode 2. (line 6) * MSF: Sectors. (line 6) * Multisession: Glossary. (line 335) * Nero NRG, CD-Image format <1>: Glossary. (line 360) * Nero NRG, CD-Image format: NRG Format. (line 6) * pre-gap: Pre-gaps. (line 6) * Q sub-channel: Pre-gaps. (line 6) * Red Book: Red Book. (line 6) * Rock Ridge extensions <1>: Glossary. (line 365) * Rock Ridge extensions: Rock Ridge Extensions. (line 6) * SCSI: Glossary. (line 374) * SCSI CDB: Glossary. (line 397) * SCSI Pass Through Interface.: Glossary. (line 401) * sectors: Sectors. (line 6) * subchannel: Red Book. (line 29) * Super VCD (SVCD): Glossary. (line 411) * TOC (CD Table of Contents): Glossary. (line 425) * track <1>: Glossary. (line 435) * track: Tracks. (line 6) * UDF: Glossary. (line 445) * Video CD (VCD): Glossary. (line 452) * XA: Glossary. (line 489)  Tag Table: Node: Top832 Node: History2246 Node: Previous Work4279 Ref: Previous Work-Footnote-18416 Ref: Previous Work-Footnote-28539 Node: Purpose8806 Ref: Purpose-Footnote-113215 Node: CD Formats13404 Node: Red Book14196 Node: CD Text15667 Node: CDDB17713 Node: Yellow Book19087 Node: ISO 966019634 Node: ISO 9660 Level 120471 Node: ISO 9660 Level 221089 Node: ISO 9660 Level 321362 Node: Joliet Extensions22136 Node: Rock Ridge Extensions23246 Node: Mode 124184 Node: Mode 225053 Node: Green Book26066 Node: White Book26828 Node: CD Image Formats27761 Node: CDRDAO TOC Format29045 Node: CDRWIN BIN/CUE Format32438 Node: NRG Format34181 Node: CD Units34944 Node: Tracks35203 Node: Sectors36875 Ref: Sectors-Footnote-140124 Node: Pre-gaps40237 Node: How to use47822 Node: Include problem48986 Ref: Include problem-Footnote-151714 Node: Example 151852 Node: Example 255510 Node: Example 356950 Node: Example 462413 Node: Example 565096 Node: Example 666951 Node: Example 769543 Node: All sample programs73978 Node: Utility Programs77227 Node: cd-drive77779 Node: cd-info78018 Node: cd-read78495 Node: iso-info78818 Node: iso-read79017 Node: CD-ROM Access and Drivers79191 Node: SCSI mess79716 Node: Access Modes83670 Node: Accessing Driver Parameters84847 Node: GNU/Linux85697 Node: Microsoft86375 Node: Solaris87284 Node: FreeBSD87749 Node: OS X88247 Node: Internal Program Organization88937 Node: File Organization89225 Node: Library Organization91186 Node: libcdio91638 Node: libcdio_cdda93248 Node: libcdio_paranoia93524 Node: libiso966093878 Node: libudf94310 Node: Programming Conventions94521 Node: Coding Conventions94758 Node: Namespace Conventions95069 Node: ISO-9660 Character Sets98057 Node: ISO646 d-Characters98372 Node: ISO646 a-Characters98819 Node: Glossary99266 Ref: ASPI99542 Ref: XA102846 Ref: MMC109017 Ref: models-profiles109582 Ref: SCSI114496 Ref: Glossary-Footnote-1119675 Node: GNU Free Documentation License119849 Node: General Index142206  End Tag Table libcdio-0.83/config.sub0000755000175000017500000010316711652140255011766 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. timestamp='2009-11-20' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | ubicom32 \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze) basic_machine=microblaze-xilinx ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: libcdio-0.83/compile0000755000175000017500000000727111652140255011360 00000000000000#! /bin/sh # Wrapper for compilers which do not understand `-c -o'. scriptversion=2009-10-06.20; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software # Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand `-c -o'. Remove `-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file `INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; esac ofile= cfile= eat= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as `compile cc -o foo foo.c'. # So we strip `-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no `-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # `.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use `[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: libcdio-0.83/m4/0000755000175000017500000000000011652210413010365 500000000000000libcdio-0.83/m4/lib-ld.m40000644000175000017500000000653111270206100011711 00000000000000# lib-ld.m4 serial 3 (gettext-0.13) dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Subroutines of libtool.m4, dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision dnl with libtool.m4. dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]* | [A-Za-z]:[\\/]*)] [re_direlt='/[^/][^/]*/\.\./'] # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(acl_cv_path_LD, [if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi]) LD="$acl_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) else AC_MSG_RESULT(no) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_LIB_PROG_LD_GNU ]) libcdio-0.83/m4/ltoptions.m40000644000175000017500000002724211652140251012613 00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [0], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) libcdio-0.83/m4/libtool.m40000644000175000017500000077464711652140251012246 00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 56 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl _LT_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Fix-up fallback echo if it was mangled by the above quoting rules. case \$lt_ECHO in *'\\\[$]0 --fallback-echo"')dnl " lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` ;; esac _LT_OUTPUT_LIBTOOL_INIT ]) # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) cat >"$CONFIG_LT" <<_LTEOF #! $SHELL # Generated by $as_me. # Run this file to recreate a libtool stub with the current configuration. lt_cl_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2008 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. if test "$no_create" != yes; then lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) fi ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_XSI_SHELLFNS sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES # -------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(whole_archive_flag_spec, $1)='' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX # ----------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl AC_LINK_IFELSE(AC_LANG_PROGRAM,[ lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. m4_defun([_LT_PROG_ECHO_BACKSLASH], [_LT_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac ECHO=${lt_ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then # Yippee, $ECHO works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat <<_LT_EOF [$]* _LT_EOF exit 0 fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$lt_ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if { echo_test_string=`eval $cmd`; } 2>/dev/null && { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null then break fi done fi if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$ECHO" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. ECHO='print -r' elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. ECHO='printf %s\n' if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL ECHO="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. ECHO=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. lt_ECHO=$ECHO if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(lt_ECHO) ]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that does not interpret backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [AC_CHECK_TOOL(AR, ar, false) test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1]) AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ = "XX$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line __oline__ "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method == "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ const struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC*) # IBM XL 8.0 on PPC _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl*) # IBM XL C 8.0/Fortran 10.1 on PPC _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag= tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE(int foo(void) {}, _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' ) LDFLAGS="$save_LDFLAGS" else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then _LT_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], [[If ld is used when linking, flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [fix_srcfile_path], [1], [Fix the shell variable $srcfile for the compiler]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_PROG_CXX # ------------ # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ # compiler, we have our own version here. m4_defun([_LT_PROG_CXX], [ pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) AC_PROG_CXX if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_CXX dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_CXX], []) # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [AC_REQUIRE([_LT_PROG_CXX])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 will use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; xl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=echo else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ]) dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_PROG_F77 # ------------ # Since AC_PROG_F77 is broken, in that it returns the empty string # if there is no fortran compiler, we have our own version here. m4_defun([_LT_PROG_F77], [ pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) AC_PROG_F77 if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_F77 dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_F77], []) # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_REQUIRE([_LT_PROG_F77])dnl AC_LANG_PUSH(Fortran 77) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC CC=${F77-"f77"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_PROG_FC # ----------- # Since AC_PROG_FC is broken, in that it returns the empty string # if there is no fortran compiler, we have our own version here. m4_defun([_LT_PROG_FC], [ pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) AC_PROG_FC if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_FC dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_FC], []) # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_REQUIRE([_LT_PROG_FC])dnl AC_LANG_PUSH(Fortran) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC CC=${FC-"f95"} compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC="$lt_save_CC" ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC GCC= CC=${RC-"windres"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC="$lt_save_CC" ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_XSI_SHELLFNS # --------------------- # Bourne and XSI compatible variants of some useful shell functions. m4_defun([_LT_PROG_XSI_SHELLFNS], [case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). func_stripname () { # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $[*] )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_basename file func_basename () { func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } dnl func_dirname_and_basename dnl A portable version of this function is already defined in general.m4sh dnl so there is no need for it here. # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[[^=]]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$[@]"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$[1]+=\$[2]" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$[1]=\$$[1]\$[2]" } _LT_EOF ;; esac ]) libcdio-0.83/m4/lib-link.m40000644000175000017500000007205511270206100012253 00000000000000# lib-link.m4 serial 13 (gettext-0.17) dnl Copyright (C) 2001-2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_PREREQ(2.54) dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and dnl augments the CPPFLAGS variable. dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) define([Name],[translit([$1],[./-], [___])]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ AC_LIB_LINKFLAGS_BODY([$1], [$2]) ac_cv_lib[]Name[]_libs="$LIB[]NAME" ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" ac_cv_lib[]Name[]_cppflags="$INC[]NAME" ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" ]) LIB[]NAME="$ac_cv_lib[]Name[]_libs" LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" INC[]NAME="$ac_cv_lib[]Name[]_cppflags" LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) AC_SUBST([LIB]NAME[_PREFIX]) dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the dnl results of this search when this library appears as a dependency. HAVE_LIB[]NAME=yes undefine([Name]) undefine([NAME]) ]) dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) dnl searches for libname and the libraries corresponding to explicit and dnl implicit dependencies, together with the specified include files and dnl the ability to compile and link the specified testcode. If found, it dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) define([Name],[translit([$1],[./-], [___])]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME dnl accordingly. AC_LIB_LINKFLAGS_BODY([$1], [$2]) dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, dnl because if the user has installed lib[]Name and not disabled its use dnl via --without-lib[]Name-prefix, he wants to use it. ac_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ ac_save_LIBS="$LIBS" LIBS="$LIBS $LIB[]NAME" AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) LIBS="$ac_save_LIBS" ]) if test "$ac_cv_lib[]Name" = yes; then HAVE_LIB[]NAME=yes AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) AC_MSG_CHECKING([how to link with lib[]$1]) AC_MSG_RESULT([$LIB[]NAME]) else HAVE_LIB[]NAME=no dnl If $LIB[]NAME didn't lead to a usable library, we don't need dnl $INC[]NAME either. CPPFLAGS="$ac_save_CPPFLAGS" LIB[]NAME= LTLIB[]NAME= LIB[]NAME[]_PREFIX= fi AC_SUBST([HAVE_LIB]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) AC_SUBST([LIB]NAME[_PREFIX]) undefine([Name]) undefine([NAME]) ]) dnl Determine the platform dependent parameters needed to use rpath: dnl acl_libext, dnl acl_shlibext, dnl acl_hardcode_libdir_flag_spec, dnl acl_hardcode_libdir_separator, dnl acl_hardcode_direct, dnl acl_hardcode_minus_L. AC_DEFUN([AC_LIB_RPATH], [ dnl Tell automake >= 1.10 to complain if config.rpath is missing. m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ]) wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" dnl Determine whether the user wants rpath handling at all. AC_ARG_ENABLE(rpath, [ --disable-rpath do not hardcode runtime library paths], :, enable_rpath=yes) ]) dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl Autoconf >= 2.61 supports dots in --with options. define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix], [ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= LTLIB[]NAME= INC[]NAME= LIB[]NAME[]_PREFIX= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='$1 $2' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" else dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined dnl that this library doesn't exist. So just drop it. : fi else dnl Search the library lib$name in $additional_libdir and $LDFLAGS dnl and the already constructed $LIBNAME/$LTLIBNAME. found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" dnl The same code as in the loop below: dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then dnl Found the library. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl Use an explicit option to hardcode DIR into the resulting dnl binary. dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi dnl The hardcoding into $LIBNAME is system dependent. if test "$acl_hardcode_direct" = yes; then dnl Using DIR/libNAME.so during linking hardcodes DIR into the dnl resulting binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode DIR into the resulting dnl binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else dnl Rely on "-L$found_dir". dnl But don't add it if it's already contained in the LDFLAGS dnl or the already constructed $LIBNAME haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH dnl here, because this doesn't fit in flags passed to the dnl compiler. So give up. No hardcoding. This affects only dnl very old systems. dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then dnl Linking with a static library. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" else dnl We shouldn't come here, but anyway it's good to have a dnl fallback. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" fi fi dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` LIB[]NAME[]_PREFIX="$basedir" additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's /usr/local/include and we are using GCC on Linux, dnl 3. if it's already present in $CPPFLAGS or the already dnl constructed $INCNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INC[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $INCNAME. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" fi fi fi fi fi dnl Look for dependencies. if test -n "$found_la"; then dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dnl Handle this in the next round. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) dnl Handle this in the next round. Throw away the .la's dnl directory; it is already contained in a preceding -L dnl option. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) dnl Most likely an immediate library name. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" ;; esac done fi else dnl Didn't find the library; assume it is in the system directories dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then dnl When using libtool, the option that works for both libraries and dnl executables is -R. The -R options are cumulative. for found_dir in $ltrpathdirs; do LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi ]) dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, dnl unless already present in VAR. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes dnl contains two or three consecutive elements that belong together. AC_DEFUN([AC_LIB_APPENDTOVAR], [ for element in [$2]; do haveit= for x in $[$1]; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then [$1]="${[$1]}${[$1]:+ }$element" fi done ]) dnl For those cases where a variable contains several -L and -l options dnl referring to unknown libraries and directories, this macro determines the dnl necessary additional linker options for the runtime path. dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) dnl sets LDADDVAR to linker options needed together with LIBSVALUE. dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, dnl otherwise linking without libtool is assumed. AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], [ AC_REQUIRE([AC_LIB_RPATH]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) $1= if test "$enable_rpath" != no; then if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode directories into the resulting dnl binary. rpathdirs= next= for opt in $2; do if test -n "$next"; then dir="$next" dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem"; then rpathdirs="$rpathdirs $dir" fi next= else case $opt in -L) next=yes ;; -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem"; then rpathdirs="$rpathdirs $dir" fi next= ;; *) next= ;; esac fi done if test "X$rpathdirs" != "X"; then if test -n ""$3""; then dnl libtool is used for linking. Use -R options. for dir in $rpathdirs; do $1="${$1}${$1:+ }-R$dir" done else dnl The linker is used for linking directly. if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user dnl must pass all path elements in one option. alldirs= for dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="$flag" else dnl The -rpath options are cumulative. for dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="${$1}${$1:+ }$flag" done fi fi fi fi fi AC_SUBST([$1]) ]) libcdio-0.83/m4/iconv.m40000644000175000017500000001375311270206100011670 00000000000000# iconv.m4 serial AM6 (gettext-0.17) dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) ]) AC_DEFUN([AM_ICONV_LINK], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use dnl via --without-libiconv-prefix, he wants to use it. The first dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. am_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_func_iconv=yes) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_lib_iconv=yes am_cv_func_iconv=yes) LIBS="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [ dnl This tests against bugs in AIX 5.1 and HP-UX 11.11. am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi AC_TRY_RUN([ #include #include int main () { /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static const char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) return 1; } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) return 1; } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) return 1; return 0; }], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], [case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac]) LIBS="$am_save_LIBS" ]) case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function and it works.]) fi if test "$am_cv_lib_iconv" = yes; then AC_MSG_CHECKING([how to link with libiconv]) AC_MSG_RESULT([$LIBICONV]) else dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV dnl either. CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi AC_SUBST(LIBICONV) AC_SUBST(LTLIBICONV) ]) AC_DEFUN([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL(am_cv_proto_iconv, [ AC_TRY_COMPILE([ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` AC_MSG_RESULT([$]{ac_t:- }[$]am_cv_proto_iconv) AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, [Define as const if the declaration of iconv() needs const.]) fi ]) libcdio-0.83/m4/ltversion.m40000644000175000017500000000127711652140251012605 00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # Generated from ltversion.in. # serial 3017 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.2.6b]) m4_define([LT_PACKAGE_REVISION], [1.3017]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.2.6b' macro_revision='1.3017' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) libcdio-0.83/m4/codeset.m40000644000175000017500000000136611116620252012204 00000000000000# codeset.m4 serial 2 (gettext-0.16) dnl Copyright (C) 2000-2002, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([AM_LANGINFO_CODESET], [ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, [AC_TRY_LINK([#include ], [char* cs = nl_langinfo(CODESET); return !cs;], am_cv_langinfo_codeset=yes, am_cv_langinfo_codeset=no) ]) if test $am_cv_langinfo_codeset = yes; then AC_DEFINE(HAVE_LANGINFO_CODESET, 1, [Define if you have and nl_langinfo(CODESET).]) fi ]) libcdio-0.83/m4/pkg.m40000644000175000017500000001206311116620262011334 00000000000000# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # # Similar to PKG_CHECK_MODULES, make sure that the first instance of # this or PKG_CHECK_MODULES is called, or make sure to call # PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT ])], [AC_MSG_RESULT([no]) $4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES libcdio-0.83/m4/lt~obsolete.m40000644000175000017500000001311311652140251013122 00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 4 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) libcdio-0.83/m4/ltsugar.m40000644000175000017500000001042411652140251012233 00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) libcdio-0.83/m4/lib-prefix.m40000644000175000017500000001503611270206100012607 00000000000000# lib-prefix.m4 serial 5 (gettext-0.15) dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't dnl require excessive bracketing. ifdef([AC_HELP_STRING], [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed dnl with the same --prefix option. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate dnl libraries, but is otherwise very convenient. AC_DEFUN([AC_LIB_PREFIX], [ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib-prefix], [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib --without-lib-prefix don't search for libraries in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) if test $use_additional = yes; then dnl Potentially add $additional_includedir to $CPPFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's already present in $CPPFLAGS, dnl 3. if it's /usr/local/include and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= for x in $CPPFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $CPPFLAGS. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" fi fi fi fi dnl Potentially add $additional_libdir to $LDFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's already present in $LDFLAGS, dnl 3. if it's /usr/local/lib and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= for x in $LDFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LDFLAGS. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" fi fi fi fi fi ]) dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, dnl acl_final_exec_prefix, containing the values to which $prefix and dnl $exec_prefix will expand at the end of the configure script. AC_DEFUN([AC_LIB_PREPARE_PREFIX], [ dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" ]) dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the dnl variables prefix and exec_prefix bound to the values they will have dnl at the end of the configure script. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [ acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" $1 exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" ]) dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing dnl the basename of the libdir, either "lib" or "lib64". AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [ dnl There is no formal standard regarding lib and lib64. The current dnl practice is that on a system supporting 32-bit and 64-bit instruction dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit dnl libraries go under $prefix/lib. We determine the compiler's default dnl mode by looking at the compiler's library search path. If at least dnl of its elements ends in /lib64 or points to a directory whose absolute dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the dnl default, namely "lib". acl_libdirstem=lib searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ]) libcdio-0.83/INSTALL0000644000175000017500000003154411652210401011022 00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== If you are compiling from git sources, see README.develop. Briefly, the shell command: ./configure && make && sudo make install should configure, build, and install this package. "sudo" may not be in situations where "root" access is not needed to install software. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and send patches to https://savannah.gnu.org/patch/?group=libcdio The file `configure.ac' is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' or `remake' (GNU make with better error reporting, tracing and a debugger) to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs listed in README.develop in order to regenerate files that came with the distribution. 7. You can also type `make uninstall' to remove the installed files again. 8. `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. 9. For a list of all targets if you have remake installed, `remake --tasks' will give a list. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. Also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `cddb' (CDDB lookup support) or `vcd-info' (for enabling VCD support). The botom of file `README.libcdio' has a list of `--enable-' and `--with-' options recognized. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. libcdio-0.83/AUTHORS0000644000175000017500000000010511114147141011031 00000000000000Herbert Valerio Riedel Rocky Bernstein libcdio-0.83/NEWS0000644000175000017500000003677311647411701010513 00000000000000version 0.83 (git) - Add retrieval SCSI sense reply from the most-recent MMC command. - Add exclusive read/write access for devices which is used for experimental writing/burning. Currently only on GNU/Linux and FreeBSD. - MMC bug fixes - FreeBSD drive list now shows empty drives. - Add ability to retrieve SCSI tuple for a name and/or fake one up for programs that wanto to cd-record compatible. - Tolerance for OS's without timezone in their struct tm (e.g. Solaris) added iso9660_set_{d,l}time_with_timezone - Add mmc_get_disk_erasable - Update MMC Feature Profile list, DVD Book types - Reduce range of seek in paranoia_seek to be int32_t - Remove some potential flaws found by Coverty's static analysis tool - Add ISRC track info to cd-info output. - Don't wrap-around volume adjustment for cdda-player. - Handle double-byte strings in CD-text - --no-header on cd-info omits copyright and warranty version 0.82 2009-10-27 - Remove all uses of CDIO_MIN_DRIVER, CDIO_MAX_DRIVER, CDIO_MIN_DEVICE_DRIVER or CDIO_MAX_DEVICE_DRIVER. - FreeBSD get_media_changed fixes - MingGW/Msys compilation issues - Add OS/2 driver - Cross compilations fixes and uclinix is like GNU/Linux - Numerous other bug fixes version 0.81 2008-10-27 - license of manual now GFDL 1.2 or later, with no invariant sections. Source is GPL 3. Thanks to Karl Berry. - Nero image handling more complete. CD-Text processing. DAO in read_audio_sectors. ISRC processing. - ISRC query for image files. Thanks to Robert William Fuller on the above two items - Allow reading pregap of a track via get_track_pregap_lsn(). Add Section on "CD-DA pregap" in libcdio manual - Allow cross-compiling to mingw32. Patch from Peter Hartley. - Make iso9660 time setting/getting routines (iso9660_{g,s}et_{d,l}time) reentrant and remove bugs in that code. Courtesy Nicolas Boullis. - OSX fixes - Add NetBSD driver version 0.80 2008-03-15 - Add get_media_changed for FreeBSD - Add option to log summary output in cd-paranoia - More string bounds checking to eliminate known string overflow conditions, e.g. Savannah bug #21910 - add --mode="any" on cd-read which uses a mmc_read_sectors with read-type CDIO_MMC_READ_TYPE_ANY. - add --log-summary option to cd-paranoia. Unused option --output-info (-i) removed - some small packaging bugs fixed Note: this is probably the last GPL v2 release; GPL v3 on the horizon. version 0.79 2007-10-27 - iso-read: Add --ignore -k to ignore errors. - Fix Savannah Bugs #18522, #18563, #18131 #19221 (possibly), #19880, #21147 and other miscelleaneous bugs and memory leaks - cd-info: force CDDB disc id to be 32-bits. Problem reported by Eric Shattow. - cd-paranoia: allow ripping before the first track. Problem reported by Eric Shattow. Fix erroneous #defines when DO_NO_WANT_PARANOIA_COMPATIBILITY is set - reported by David Stockwell. - Support for multisession CD-Extra Discs. Patch from Patrick Guimond - Add iso9660_fs_find_lsn_with_path and iso9660_ifs_find_lsn_with_path to report the full filename path of lsn. - improve eject code for OSX version 0.78.2 2006-10-31 - preprocessor symbol LIBCDIO_VERSION number has to be an integer. (Bug caused by naming version 0.78.1) ^ version 0.78.1 2006-10-27 - Fix bug in libcdio.so version numbering. Also another small bug. Thanks to Janos Farkas version 0.78 2006-10-27 ===================================== - add mmc-tool - add mmc-close-tray - libudf: can now read (extract) file data, at least for ICB strategy type 4. - libcdio is starting to get updated for UTF-8 support. Strings, which are guaranteed to be in UTF-8, are returned as a new type cdio_utf8_t, which is typedef'd to char. - fixes to eject. On GNU/Linux we unmount filesystems first. version 0.77 ===================================== 2006-03-17 - Add an object-oriented C++ wrapper. (libcdio++ and libiso9660++) - replace libpopt with getopt in cd-drive, cd-info, iso-info, iso-read (Peter J. Creath) - Document cd-paranoia (Peter J. Creath) - Add cdio_eject_media_drive(). - Add more generic read_sectors() - Document that NULL also uses default drive in close_tray, cdio_open and cdio_open_am. Document b_mode2 paramenter not used in cdio ISO read. - Some provision for handling Rock-Ridge device numbers. - block read routines return success if asked to read 0 blocks. - Start UDF handling - increase use of enumerations more and decrease use of #defines - OS Support: DragonFly recognized as FreeBSD, MinGW better tolerated, GNU/Linux (and others?) LARGEFILE support OpenBSD tested (no native CD driver though) - Doxygen formatting improvements. - Misc bugs: * fixed bincue driver caused core dump on set_speed and set_blocksize; it also called the wrong routine (from NRG) to get a list of cd-images. * read.h didn't make sure off_t was defined. * fixed bug in is_device() when driver_id = DRIVER_UNKNOWN or DRIVER_DEVICE. * OSX was freeing too much in listing drives. * get_hwinfo was not respecting fixed-length field boundaries in image drivers (strcpy->strncpy). * A number ISO 9660 time conversion routines corrected with respect to various timezone offsets, daylight savings time, and tm capabilities - small cdda-player improvements - shows more CD-TEXT, and fix bug in non-interactive use (Yes, I sometimes use it.) - NRG checking parses file. string tests were invalid on short < 4 character filenames. - Revise and improve example programs - Security: replace all uses of strcat and strcpy with strncat and strncpy version 0.76 ===================================== 2005-09-23 - Better compatibility with C++ - a better eject routine for FreeBSD - Fix bug in not specifying a device name in libcio_cdda - Add S_ISSOCK() or S_ISLNK() macros for Rock-Ridge when environment doesn't have it, e.g. MSYS 1.0.10 with MinGW 3.4.2. - Allow building cd-paranoia if Perl is not installed. - More accurate library dependency tracking in linking and pkg-config - Miscellaneous minor bug fixes. - cdio/cdda.h headers no longer depends on cdio/paranoia.h but vice versa is true. This may require an #include in some applications that used but didn't include it. version 0.75 ===================================== 2005-07-11 - audio volume level fix on Microsoft Windows - fix build when --enable-shared, --disable-static - CD-Text retrieval fix - allow the MMC timeout to be adjusted by the application - cd-paranoia: Add option --mmc-timeout (-m) to set MMC timeout. We now check that integer arguments are integers and are within range. - changes for libcddb 1.1.0 API change - remove gcc 4.0 warnings - miscellaneous small bug fixes, removal of questionable idioms or memory leak fixes version 0.74 ===================================== 2005-05-13 - cd-paranoia fixes - cdda-player fixes - cd-drive shows MMC level - CD Text improvements/fixes - eject of empty CD-ROM drives on GNU/Linux - FreeBSD audio sub-channel time reporting fixed version 0.73 ===================================== 2005-04-15 - Rock Ridge Extension support added - CD audio support (play track/index, pause, set volume, read audio subchannel) - add close tray interface (may need more work on more OSes) - utility cdda-player to (show off audio audio support) added - file time/size attributes fixes - cd-info/iso-info show more ls-like attributes and more often - ISO 9660 more accurate more often - Add ability to look for ISO 9660 filesystem in unknown Disc image formats - Add routine for getting ISO 9660 long date; short date fixes - remove even more memory leaks - Add enumerations and symbols to facilitate debugging - Break out C++ example programs into a separate directory. More C++ programs. - gcc 4 fixes version 0.72 ===================================== 2005-01-31 - cdparanoia included - with regression tests and sample library programs - added setting/getting CD speed, finding the track containing an LSN. - improve cdrdao image reading - iso-info options more like cdrtools isoinfo. - cd-drive/cd-info show more reading capabilities and show that. - cd-info now shows the total disc size. - Filesystem reorganization to better support growth and paranoia inclusion - FreeBSD 6 tolerated, CAM audio read mode works. - improve Win32 driver, e.g. audio read mode works better for ioctl. - mode detection fixes - all read routines check and adjust the LSN so we don't try to access beyond the end of the disc - C++ fixes - Update documentation version 0.71 ===================================== 2005-11-20 - Some Joliet support. - Portability fixes for C++ and older C compilers. - Work towards XBOX support. - TOC for DVD's works more often - Make generic list routines and declarations and byte swapping routines public. Eventually everything will use glib. - list-returning routines like iso9660_fs_readdir and iso9660_ifs_readdir no longer return void * (and require casting) but return the correct type. - Some example programs have been renamed to more give meaningful names. - Add iso9660_ifs_is_xa() a routine to determine if an iso image has XA attributes. - iso-info now shows XA attributes if that is available. - Some bug fixes version 0.70 ===================================== 2004-09-02 - SCSI MMC interface routine (all except Darwin) - CD-Text support (all except Darwin) - Distinguish DVD's from CD's - Code clean-ups and reduced code duplication - Better CUE parsing - Reporting drive capability is more accurate - add constant driver_id for kind of hardware driver in build - new drive scanning routines which pass back driver as well as drive string. Speeds up subsequent opens. version 0.69 ===================================== 2004-06-25 - Add interface returning drive capabilities (cdio_get_drive_cap). - Minimal cdrdao image reading (thanks to Svend S. Sorensen) - Some important (I think) bug fixes - Redo types of LSN and LBA to allow negative values. Should model MMC3 specs. Add max/min values for LSN. - More complete MMC command set - FreeBSD driver ioctl and CAM reading works better (thanks to Heiner) - OSX drive reading works better (thanks to Justin F. Hallett) - cd-read allows dumping bytes to stdout and hexdumps to a file via options --no-hexdump and --hexdump - fewer error exits in drivers. Instead, a failure code is returned. - better NRG reading (thanks to Michael Kukat via extractnrg.pl) - better tracking of allocated variables (cd-read, cd-info, FreeBSD) - iso9660: Add interface to read PVD and pick out some of the fields in that. cd-info now shows more PVD info for ISO 9660 filesystems - cd-info: X-Box CD detection (via xbox team mediacenter) version 0.68 ===================================== 2004-03-23 - More honest about mode1 reading in backends. Remove some of the bogusness. - Fixes and simplifications to Solaris (from Ian MacIntosh): no longer requires root access on Sunray environments - Win32 ioctl works now on win2k and XP (and probably NT and ME) - compiles on cygwin with -mno-cygwin (needed for videolan's vlc) - option --with-versioned-libs now checks for GNU ld. version 0.67 ===================================== 2004-03-01 - portability for ARM - add iso-read program and regression tests - libiso9960: stat routines that match level 1 ISO-9600 filenames translating them into Unix-style names (i.e. lowercase letters, with version numbers dropped.) - expand/improve documentation. - more graceful exits when there is no CD or can't read it. - add --without-versioned-libs - add README.libcdio and note possible problems on different OSs without GNU make version 0.66 ===================================== 2004-02-15 - Add interface for reading an ISO-9660 image - portability fixes (Solaris, cygwin) - Microsoft Windows ASPI/ DeviceIoControl code reorganization - NRG image reading improvements - Remove memory leaks - library symbol versioning (from Nicolas Boullis) - Go over documentation version 0.65 ===================================== 2003-12-13 - tag headers to give doxygen API documentation - cd-info/cd-read now can specify library level of output - sample program using libiso9660 added. version 0.64 ===================================== 2003-11-22 - add routines to return a list of devices or scan a list of devices which satisfy any/all things in a capability mask. Should be useful for plugins that want to find a CD-DA to play or find a plugin that handles a particular device. - cd-read: new program to help diagnose reading problems. - cd-info: now displays date on iso9660 listing and translates filename to normal conventions, gives track "green" info - Add/expose routines to get/set time. time is reported back in entry stat. Routines to create ISO-9660 directories and entries must now supply the time to set on the entry. - Darwin and FreeBSD drivers closer to having native CD support, MinGW fixes (but not complete either) - BSDI fixes - Document more functions. version 0.63 ===================================== - create libiso9660 library and install that. - More sample programs. - add library routine cdio_guess_cd_type to analyze/guess what type of CD or CD image we've got. - cd-info can list the files of a ISO-9660 filesystem via libiso9660 with option --iso9660 version 0.62 ===================================== - Some minimal documentation. More will follow. - Add a simple sample programs. - Add a simple regression test driver. - "Smart" open was scanning devices rather than devices + image drivers. version 0.61 ===================================== - Cygwin/MinGW port. - get-default-device reworked to be smarter about finding devices. - cd-info: add --no-headers. version ID is from package now. Show default device on "--version" output. - API: add routine report if string refers to a device or not - Make use of features in libcddb 0.9.4. version 0.6 ===================================== - Bug: eject wouldn't. - If given .bin find corresponding .cue. If no cue, complain. version 0.5 ===================================== - Add RPM spec file. Thanks to Manfred Tremmel - cdinfo renamed to cd-info to avoid conflicts with other existing programs - bug in ejecting CD's fixed - find cue file if given bin. - cd-info: If libvcdinfo is installed show general Video CD properties version 0.4 ===================================== - More regression tests. - Use pkg-config(1) support - NRG may be closer to being correct. version 0.3 ===================================== - reduced overall size of package. Some regression moved to a separate (large) package. - facilitate inclusion into another project's local source tree (e.g. xine) - version number in include - cdinfo: lists number of CDDB matches, display error message on failure, and can set CDDB port and http proxy - Bug: Narrow drivers to devices when source is a device. - fix some small compile warnings and configure bugs. Require libcddb 0.9.0 or greater. version 0.2 ===================================== - Added Support for reading audio sectors - cdinfo can use libcddb (http://libcddb.sourceforge.net). If installed and we have a CD-DA disk, we dump out CDDB information. - Regression tests added. - Don't need to open device to give get a default device. - Better device driver selection: We test for file/device-ness. - Bugs fixed (default device name on GNU/Linux), version 0.1 ===================================== Routines split off from VCDImager. $Id: NEWS,v 1.124 2008/10/20 01:10:19 rocky Exp $ libcdio-0.83/example/0000755000175000017500000000000011652210416011503 500000000000000libcdio-0.83/example/tracks.c0000644000175000017500000000346111313260160013055 00000000000000/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Simple program to list track numbers and logical sector numbers of a Compact Disc using libcdio. */ #include #ifdef HAVE_SYS_TYPES_H #include #endif #include int main(int argc, const char *argv[]) { CdIo_t *p_cdio = cdio_open (NULL, DRIVER_UNKNOWN); track_t i_first_track; track_t i_tracks; int j, i; if (NULL == p_cdio) { printf("Couldn't find a driver.. leaving.\n"); return 1; } printf("Disc last LSN: %d\n", cdio_get_disc_last_lsn(p_cdio)); i_tracks = cdio_get_num_tracks(p_cdio); i_first_track = i = cdio_get_first_track_num(p_cdio); printf("CD-ROM Track List (%i - %i)\n", i_first_track, i_first_track+i_tracks-1); printf(" #: LSN\n"); for (j = 0; j < i_tracks; i++, j++) { lsn_t lsn = cdio_get_track_lsn(p_cdio, i); if (CDIO_INVALID_LSN != lsn) printf("%3d: %06lu\n", (int) i, (long unsigned int) lsn); } printf("%3X: %06lu leadout\n", CDIO_CDROM_LEADOUT_TRACK, (long unsigned int) cdio_get_track_lsn(p_cdio, CDIO_CDROM_LEADOUT_TRACK)); cdio_destroy(p_cdio); return 0; } libcdio-0.83/example/udf1.c0000644000175000017500000000722511313260160012427 00000000000000/* $Id: udf1.c,v 1.19 2008/03/24 15:30:56 karl Exp $ Copyright (C) 2005, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Simple program to show using libudf to list files in a directory of an UDF image. */ /* This is the UDF image. */ #define UDF_IMAGE_PATH "../" #define UDF_IMAGE "/src2/cd-images/udf/UDF102ISO.iso" #include #include #include #include #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #define udf_PATH_DELIMITERS "/\\" static void print_file_info(const udf_dirent_t *p_udf_dirent, const char* psz_dirname) { time_t mod_time = udf_get_modification_time(p_udf_dirent); char psz_mode[11]="invalid"; const char *psz_fname= psz_dirname ? psz_dirname : udf_get_filename(p_udf_dirent); /* Print directory attributes*/ printf("%s ", udf_mode_string(udf_get_posix_filemode(p_udf_dirent), psz_mode)); printf("%4d ", udf_get_link_count(p_udf_dirent)); printf("%lu ", (long unsigned int) udf_get_file_length(p_udf_dirent)); printf("%s %s", *psz_fname ? psz_fname : "/", ctime(&mod_time)); } static udf_dirent_t * list_files(udf_t *p_udf, udf_dirent_t *p_udf_dirent, const char *psz_path) { if (!p_udf_dirent) return NULL; print_file_info(p_udf_dirent, psz_path); while (udf_readdir(p_udf_dirent)) { if (udf_is_dir(p_udf_dirent)) { udf_dirent_t *p_udf_dirent2 = udf_opendir(p_udf_dirent); if (p_udf_dirent2) { const char *psz_dirname = udf_get_filename(p_udf_dirent); const unsigned int i_newlen=2 + strlen(psz_path) + strlen(psz_dirname); char *psz_newpath = calloc(1, sizeof(char)*i_newlen); snprintf(psz_newpath, i_newlen, "%s%s/", psz_path, psz_dirname); list_files(p_udf, p_udf_dirent2, psz_newpath); free(psz_newpath); } } else { print_file_info(p_udf_dirent, NULL); } } return p_udf_dirent; } int main(int argc, const char *argv[]) { udf_t *p_udf; char const *psz_udf_image; if (argc > 1) psz_udf_image = argv[1]; else psz_udf_image = UDF_IMAGE; p_udf = udf_open (psz_udf_image); if (NULL == p_udf) { fprintf(stderr, "Sorry, couldn't open %s as something using UDF\n", psz_udf_image); return 1; } else { udf_dirent_t *p_udf_root = udf_get_root(p_udf, true, 0); if (NULL == p_udf_root) { fprintf(stderr, "Sorry, couldn't find / in %s\n", psz_udf_image); return 1; } { char vol_id[UDF_VOLID_SIZE] = ""; char volset_id[UDF_VOLSET_ID_SIZE+1] = ""; if (0 < udf_get_volume_id(p_udf, vol_id, sizeof(vol_id)) ) printf("volume id: %s\n", vol_id); if (0 < udf_get_volume_id(p_udf, volset_id, sizeof(volset_id)) ) { volset_id[UDF_VOLSET_ID_SIZE]='\0'; printf("volume set id: %s\n", volset_id); } printf("partition number: %d\n", udf_get_part_number(p_udf)); } list_files(p_udf, p_udf_root, ""); } udf_close(p_udf); return 0; } libcdio-0.83/example/C++/0000755000175000017500000000000011652210416012013 500000000000000libcdio-0.83/example/C++/isolist.cpp0000644000175000017500000000656211313260160014131 00000000000000/* Copyright (C) 2004, 2006, 2008, 2009 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Simple program to show using libiso9660 to list files in a directory of an ISO-9660 image and give some iso9660 information. See the code to iso-info for a more complete example. If a single argument is given, it is used as the ISO 9660 image to use in the listing. Otherwise a compiled-in default ISO 9660 image name (that comes with the libcdio distribution) will be used. This program can be compiled with either a C or C++ compiler. In the distributuion we perfer C++ just to make sure we haven't broken things on the C++ side. */ /* Set up a CD-DA image to test on which is in the libcdio distribution. */ #define ISO9660_IMAGE_PATH "../../" #define ISO9660_IMAGE ISO9660_IMAGE_PATH "test/copying.iso" #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #define print_vd_info(title, fn) \ if (fn(p_iso, &psz_str)) { \ printf(title ": %s\n", psz_str); \ } \ free(psz_str); \ psz_str = NULL; int main(int argc, const char *argv[]) { CdioList_t *p_entlist; CdioListNode_t *p_entnode; char const *psz_fname; iso9660_t *p_iso; const char *psz_path="/"; if (argc > 1) psz_fname = argv[1]; else psz_fname = ISO9660_IMAGE; p_iso = iso9660_open (psz_fname); if (NULL == p_iso) { fprintf(stderr, "Sorry, couldn't open %s as an ISO-9660 image\n", psz_fname); return 1; } /* Show basic CD info from the Primary Volume Descriptor. */ { char *psz_str = NULL; print_vd_info("Application", iso9660_ifs_get_application_id); print_vd_info("Preparer ", iso9660_ifs_get_preparer_id); print_vd_info("Publisher ", iso9660_ifs_get_publisher_id); print_vd_info("System ", iso9660_ifs_get_system_id); print_vd_info("Volume ", iso9660_ifs_get_volume_id); print_vd_info("Volume Set ", iso9660_ifs_get_volumeset_id); } p_entlist = iso9660_ifs_readdir (p_iso, psz_path); /* Iterate over the list of nodes that iso9660_ifs_readdir gives */ if (p_entlist) { _CDIO_LIST_FOREACH (p_entnode, p_entlist) { char filename[4096]; iso9660_stat_t *p_statbuf = (iso9660_stat_t *) _cdio_list_node_data (p_entnode); iso9660_name_translate(p_statbuf->filename, filename); printf ("%s [LSN %6d] %8u %s%s\n", 2 == p_statbuf->type ? "d" : "-", p_statbuf->lsn, p_statbuf->size, psz_path, filename); } _cdio_list_free (p_entlist, true); } iso9660_close(p_iso); return 0; } libcdio-0.83/example/C++/paranoia.cpp0000644000175000017500000001150711313260160014230 00000000000000/* $Id: paranoia.cpp,v 1.3 2008/03/24 15:30:56 karl Exp $ Copyright (C) 2005, 2008, 2009 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Simple program to show using libcdio's version of the CD-DA paranoia. library. */ #include #include #include #include using namespace std; extern "C"{ #include #include #include #ifdef HAVE_STDLIB_H #include #endif } int main(int argc, const char *argv[]) { cdrom_drive_t *d = NULL; /* Place to store handle given by cd-paranoia. */ char **ppsz_cd_drives; /* List of all drives with a loaded CDDA in it. */ /* See if we can find a device with a loaded CD-DA in it. */ ppsz_cd_drives = cdio_get_devices_with_cap(NULL, CDIO_FS_AUDIO, false); if (ppsz_cd_drives) { /* Found such a CD-ROM with a CD-DA loaded. Use the first drive in the list. */ d = cdda_identify(*ppsz_cd_drives, 1, NULL); } else { cerr << "Unable to access to a CD-ROM drive with audio CD in it"; return -1; } /* Don't need a list of CD's with CD-DA's any more. */ cdio_free_device_list(ppsz_cd_drives); if ( !d ) { cerr << "Unable to identify audio CD disc.\n"; return -1; } /* We'll set for verbose paranoia messages. */ cdda_verbose_set(d, CDDA_MESSAGE_PRINTIT, CDDA_MESSAGE_PRINTIT); if ( 0 != cdda_open(d) ) { cerr << "Unable to open disc.\n"; return -1; } /* Okay now set up to read up to the first 300 frames of the first audio track of the Audio CD. */ { cdrom_paranoia_t *p = paranoia_init(d); lsn_t i_first_lsn = cdda_disc_firstsector(d); if ( -1 == i_first_lsn ) { printf("Trouble getting starting LSN\n"); } else { lsn_t i_cursor; track_t i_track = cdda_sector_gettrack(d, i_first_lsn); lsn_t i_last_lsn = cdda_track_lastsector(d, i_track); /* For demo purposes we'll read only 300 frames (about 4 seconds). We don't want this to take too long. On the other hand, I suppose it should be something close to a real test. */ if ( i_last_lsn - i_first_lsn > 300) i_last_lsn = i_first_lsn + 299; printf("Reading track %d from LSN %ld to LSN %ld\n", i_track, (long int) i_first_lsn, (long int) i_last_lsn); /* Set reading mode for full paranoia, but allow skipping sectors. */ paranoia_modeset(p, PARANOIA_MODE_FULL^PARANOIA_MODE_NEVERSKIP); paranoia_seek(p, i_first_lsn, SEEK_SET); //Get the track size in bytes and conver it to string unsigned int byte_count = ( i_last_lsn - i_first_lsn + 1 ) * CDIO_CD_FRAMESIZE_RAW; // Open the output file ofstream outfile ("track01.wav", ofstream::binary | ofstream::app | ofstream::out); // Write format header specification const int waweChunkLength = byte_count + 44 - 8; const int fmtChunkLength = 16; const int compressionCode = 1; const int numberOfChannels = 2; const int sampleRate = 44100; // Hz const int blockAlign = sampleRate*2*2; const int significantBps = 4; const int extraFormatBytes = 16; #define writestr(str) outfile.write(str, sizeof(str)-1) writestr("RIFF"); outfile.write((char*)&waweChunkLength, 4); writestr("WAVEfmt "); outfile.write((char*) &fmtChunkLength, 4); outfile.write((char*) &compressionCode, 2); outfile.write((char*) &numberOfChannels, 2); outfile.write((char*) &sampleRate, 4); outfile.write((char*) &blockAlign, 4); outfile.write((char*) &significantBps, 2); outfile.write((char*) &extraFormatBytes, 2); writestr("data"); outfile.write((char*) &byte_count,4); for ( i_cursor = i_first_lsn; i_cursor <= i_last_lsn; i_cursor ++) { /* read a sector */ int16_t *p_readbuf=paranoia_read(p, NULL); char *psz_err=cdda_errors(d); char *psz_mes=cdda_messages(d); if (psz_mes || psz_err) cerr << psz_err << psz_mes; if (psz_err) free(psz_err); if (psz_mes) free(psz_mes); if( !p_readbuf ) { cerr << "paranoia read error. Stopping.\n"; break; } char *temp= (char*) p_readbuf; outfile.write(temp, CDIO_CD_FRAMESIZE_RAW); } } paranoia_free(p); } cdda_close(d); exit(0); } libcdio-0.83/example/C++/isofile.cpp0000644000175000017500000000730111313260160014065 00000000000000/* Copyright (C) 2004, 2006, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Simple program to show using libiso9660 to extract a file from an ISO-9660 image. If a single argument is given, it is used as the ISO 9660 image to use in the extraction. Otherwise a compiled in default ISO 9660 image name (that comes with the libcdio distribution) will be used. */ /* This is the ISO 9660 image. */ #define ISO9660_IMAGE_PATH "../../" #define ISO9660_IMAGE ISO9660_IMAGE_PATH "test/copying.iso" #define LOCAL_FILENAME "copying" #include #include #include #include "portable.h" #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #define CEILING(x, y) ((x+(y-1))/y) #define my_exit(rc) \ fclose (p_outfd); \ free(p_statbuf); \ iso9660_close(p_iso); \ return rc; \ int main(int argc, const char *argv[]) { iso9660_stat_t *p_statbuf; FILE *p_outfd; unsigned int i; char const *psz_image; char const *psz_fname; iso9660_t *p_iso; if (argc > 3) { printf("usage %s [ISO9660-image.ISO [filename]]\n", argv[0]); printf("Extracts filename from ISO-9660-image.ISO.\n"); return 1; } if (argc > 1) psz_image = argv[1]; else psz_image = ISO9660_IMAGE; if (argc > 2) psz_fname = argv[2]; else psz_fname = LOCAL_FILENAME; p_iso = iso9660_open (psz_image); if (NULL == p_iso) { fprintf(stderr, "Sorry, couldn't open ISO 9660 image %s\n", psz_image); return 1; } p_statbuf = iso9660_ifs_stat_translate (p_iso, psz_fname); if (NULL == p_statbuf) { fprintf(stderr, "Could not get ISO-9660 file information for file %s\n", psz_fname); iso9660_close(p_iso); return 2; } if (!(p_outfd = fopen (psz_fname, "wb"))) { perror ("fopen()"); free(p_statbuf); iso9660_close(p_iso); return 3; } /* Copy the blocks from the ISO-9660 filesystem to the local filesystem. */ { const unsigned int i_blocks = CEILING(p_statbuf->size, ISO_BLOCKSIZE); for (i = 0; i < i_blocks ; i++) { char buf[ISO_BLOCKSIZE]; const lsn_t lsn = p_statbuf->lsn + i; memset (buf, 0, ISO_BLOCKSIZE); if ( ISO_BLOCKSIZE != iso9660_iso_seek_read (p_iso, buf, lsn, 1) ) { fprintf(stderr, "Error reading ISO 9660 file %s at LSN %lu\n", psz_fname, (long unsigned int) lsn); my_exit(4); } fwrite (buf, ISO_BLOCKSIZE, 1, p_outfd); if (ferror (p_outfd)) { perror ("fwrite()"); my_exit(5); } } } fflush (p_outfd); /* Make sure the file size has the exact same byte size. Without the truncate below, the file will a multiple of ISO_BLOCKSIZE. */ if (ftruncate (fileno (p_outfd), p_statbuf->size)) perror ("ftruncate()"); printf("Extraction of file '%s' from %s successful.\n", psz_fname, psz_image); my_exit(0); } libcdio-0.83/example/C++/device.cpp0000644000175000017500000001113311313260160013670 00000000000000/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Simple program to show drivers installed and what the default CD-ROM drive is. See also corresponding C program of a similar name. */ #include #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #define _(x) x /* Prints out drive capabilities */ static void print_drive_capabilities(cdio_drive_read_cap_t i_read_cap, cdio_drive_write_cap_t i_write_cap, cdio_drive_misc_cap_t i_misc_cap) { if (CDIO_DRIVE_CAP_ERROR == i_misc_cap) { printf("Error in getting drive hardware properties\n"); } else { printf(_("Hardware : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_FILE ? "Disk Image" : "CD-ROM or DVD"); printf(_("Can eject : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_EJECT ? "Yes" : "No"); printf(_("Can close tray : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_CLOSE_TRAY ? "Yes" : "No"); printf(_("Can disable manual eject : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_LOCK ? "Yes" : "No"); printf(_("Can select juke-box disc : %s\n\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_SELECT_DISC ? "Yes" : "No"); printf(_("Can set drive speed : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_SELECT_SPEED ? "Yes" : "No"); printf(_("Can detect if CD changed : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_MEDIA_CHANGED ? "Yes" : "No"); printf(_("Can read multiple sessions : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_MULTI_SESSION ? "Yes" : "No"); printf(_("Can hard reset device : %s\n\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_RESET ? "Yes" : "No"); } if (CDIO_DRIVE_CAP_ERROR == i_read_cap) { printf("Error in getting drive reading properties\n"); } else { printf("Reading....\n"); printf(_(" Can play audio : %s\n"), i_read_cap & CDIO_DRIVE_CAP_READ_AUDIO ? "Yes" : "No"); printf(_(" Can read CD-R : %s\n"), i_read_cap & CDIO_DRIVE_CAP_READ_CD_R ? "Yes" : "No"); printf(_(" Can read CD-RW : %s\n"), i_read_cap & CDIO_DRIVE_CAP_READ_CD_RW ? "Yes" : "No"); printf(_(" Can read DVD-ROM : %s\n"), i_read_cap & CDIO_DRIVE_CAP_READ_DVD_ROM ? "Yes" : "No"); } if (CDIO_DRIVE_CAP_ERROR == i_write_cap) { printf("Error in getting drive writing properties\n"); } else { printf("\nWriting....\n"); printf(_(" Can write CD-RW : %s\n"), i_read_cap & CDIO_DRIVE_CAP_READ_CD_RW ? "Yes" : "No"); printf(_(" Can write DVD-R : %s\n"), i_write_cap & CDIO_DRIVE_CAP_READ_DVD_R ? "Yes" : "No"); printf(_(" Can write DVD-RAM : %s\n"), i_write_cap & CDIO_DRIVE_CAP_READ_DVD_RAM ? "Yes" : "No"); } } int main(int argc, const char *argv[]) { CdIo_t *p_cdio = cdio_open (NULL, DRIVER_UNKNOWN); const driver_id_t *driver_id_p; if (NULL != p_cdio) { char *default_device = cdio_get_default_device(p_cdio); cdio_drive_read_cap_t i_read_cap; cdio_drive_write_cap_t i_write_cap; cdio_drive_misc_cap_t i_misc_cap; printf("The driver selected is %s\n", cdio_get_driver_name(p_cdio)); if (default_device) printf("The default device for this driver is %s\n", default_device); cdio_get_drive_cap(p_cdio, &i_read_cap, &i_write_cap, &i_misc_cap); print_drive_capabilities(i_read_cap, i_write_cap, i_misc_cap); free(default_device); cdio_destroy(p_cdio); printf("\n"); } else { printf("Problem in trying to find a driver.\n\n"); } for (driver_id_p=cdio_drivers; *driver_id_p!=DRIVER_UNKNOWN; ++driver_id_p) if (cdio_have_driver(*driver_id_p)) printf("We have: %s\n", cdio_driver_describe(*driver_id_p)); else printf("We don't have: %s\n", cdio_driver_describe(*driver_id_p)); return 0; } libcdio-0.83/example/C++/mmc1.cpp0000644000175000017500000000503211313260160013267 00000000000000/* Copyright (C) 2004, 2005, 2008, 2009 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Sample program to show use of the MMC interface. An optional drive name can be supplied as an argument. This basically the libdio mmc_get_hwinfo() routine. See also corresponding C and OO C++ program. */ #include #include #include #include #include /* Set how long to wait for MMC commands to complete */ #define DEFAULT_TIMEOUT_MS 10000 int main(int argc, const char *argv[]) { CdIo_t *p_cdio; const char *psz_drive = NULL; if (argc > 1) psz_drive = argv[1]; p_cdio = cdio_open (psz_drive, DRIVER_UNKNOWN); if (NULL == p_cdio) { printf("Couldn't find CD\n"); return 1; } else { int i_status; /* Result of MMC command */ char buf[36] = { 0, }; /* Place to hold returned data */ mmc_cdb_t cdb = {{0, }}; /* Command Descriptor Buffer */ CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_INQUIRY); cdb.field[4] = sizeof(buf); i_status = mmc_run_cmd(p_cdio, DEFAULT_TIMEOUT_MS, &cdb, SCSI_MMC_DATA_READ, sizeof(buf), &buf); if (i_status == 0) { char psz_vendor[CDIO_MMC_HW_VENDOR_LEN+1]; char psz_model[CDIO_MMC_HW_MODEL_LEN+1]; char psz_rev[CDIO_MMC_HW_REVISION_LEN+1]; memcpy(psz_vendor, buf + 8, sizeof(psz_vendor)-1); psz_vendor[sizeof(psz_vendor)-1] = '\0'; memcpy(psz_model, buf + 8 + CDIO_MMC_HW_VENDOR_LEN, sizeof(psz_model)-1); psz_model[sizeof(psz_model)-1] = '\0'; memcpy(psz_rev, buf + 8 + CDIO_MMC_HW_VENDOR_LEN +CDIO_MMC_HW_MODEL_LEN, sizeof(psz_rev)-1); psz_rev[sizeof(psz_rev)-1] = '\0'; printf("Vendor: %s\nModel: %s\nRevision: %s\n", psz_vendor, psz_model, psz_rev); } else { printf("Couldn't get INQUIRY data (vendor, model, and revision).\n"); } } cdio_destroy(p_cdio); return 0; } libcdio-0.83/example/C++/Makefile.am0000644000175000017500000000442011313260160013762 00000000000000# Copyright (C) 2005, 2006, 2008, 2009 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ########################################################## # Sample C++ programs using libcdio (without OO wrapper) ######################################################### # SUBDIRS = OO if BUILD_CD_PARANOIA paranoia_progs = paranoia paranoia2 endif if BUILD_EXAMPLES noinst_PROGRAMS = device eject isofile isofile2 isolist \ mmc1 mmc2 $(paranoia_progs) endif INCLUDES = -I$(top_srcdir) $(LIBCDIO_CFLAGS) device_DEPENDENCIES = $(LIBCDIO_DEPS) device_SOURCES = device.cpp device_LDADD = $(LIBCDIO_LIBS) eject_DEPENDENCIES = $(LIBCDIO_DEPS) eject_SOURCES = eject.cpp eject_LDADD = $(LIBCDIO_LIBS) if BUILD_CD_PARANOIA paranoia_SOURCES = paranoia.cpp paranoia_LDADD = $(LIBCDIO_PARANOIA_LIBS) $(LIBCDIO_CDDA_LIBS) \ $(LIBCDIO_LIBS) paranoia2_SOURCES = paranoia.cpp paranoia2_LDADD = $(LIBCDIO_PARANOIA_LIBS) $(LIBCDIO_CDDA_LIBS) \ $(LIBCDIO_LIBS) endif isofile_SOURCES = isofile.cpp isofile_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) isofile2_SOURCES = isofile2.cpp isofile2_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) isolist_SOURCES = isolist.cpp isolist_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) mmc1_SOURCES = mmc1.cpp mmc1_DEPENDENCIES = $(LIBCDIO_DEPS) mmc1_LDADD = $(LIBCDIO_LIBS) mmc2_SOURCES = mmc2.cpp mmc2_DEPENDENCIES = $(LIBCDIO_DEPS) mmc2_LDADD = $(LIBCDIO_LIBS) check_PROGRAMS = $(noinst_PROGRAMS) TESTS = $(check_PROGRAMS) # iso programs create file "copying" MOSTLYCLEANFILES = copying *.wav libcdio-0.83/example/C++/mmc2.cpp0000644000175000017500000001206211313260160013271 00000000000000/* Copyright (C) 2004, 2005, 2008, 2009 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* A program to using the MMC interface to list CD and drive features from the MMC GET_CONFIGURATION command . */ #include #include #include #include #include /* Set how long do wto wait for SCSI-MMC commands to complete */ #define DEFAULT_TIMEOUT_MS 10000 int main(int argc, const char *argv[]) { CdIo_t *p_cdio; p_cdio = cdio_open (NULL, DRIVER_UNKNOWN); if (NULL == p_cdio) { printf("Couldn't find CD\n"); return 1; } else { int i_status; /* Result of MMC command */ uint8_t buf[500] = { 0, }; /* Place to hold returned data */ mmc_cdb_t cdb = {{0, }}; /* Command Descriptor Buffer */ CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_GET_CONFIGURATION); CDIO_MMC_SET_READ_LENGTH8(cdb.field, sizeof(buf)); cdb.field[1] = CDIO_MMC_GET_CONF_ALL_FEATURES; cdb.field[3] = 0x0; i_status = mmc_run_cmd(p_cdio, 0, &cdb, SCSI_MMC_DATA_READ, sizeof(buf), &buf); if (i_status == 0) { uint8_t *p; uint32_t i_data; uint8_t *p_max = buf + 65530; i_data = (unsigned int) CDIO_MMC_GET_LEN32(buf); /* set to first sense feature code, and then walk through the masks */ p = buf + 8; while( (p < &(buf[i_data])) && (p < p_max) ) { uint16_t i_feature; uint8_t i_feature_additional = p[3]; i_feature = CDIO_MMC_GET_LEN16(p); { uint8_t *q; const char *feature_str = mmc_feature2str(i_feature); printf("%s Feature\n", feature_str); switch( i_feature ) { case CDIO_MMC_FEATURE_PROFILE_LIST: for ( q = p+4 ; q < p + i_feature_additional ; q += 4 ) { int i_profile=CDIO_MMC_GET_LEN16(q); const char *feature_profile_str = mmc_feature_profile2str(i_profile); printf( "\t%s", feature_profile_str ); if (q[2] & 1) { printf(" - on"); } printf("\n"); } printf("\n"); break; case CDIO_MMC_FEATURE_CORE: { uint8_t *q = p+4; uint32_t i_interface_standard = CDIO_MMC_GET_LEN32(q); switch(i_interface_standard) { case 0: printf("\tunspecified interface\n"); break; case 1: printf("\tSCSI interface\n"); break; case 2: printf("\tATAPI interface\n"); break; case 3: printf("\tIEEE 1394 interface\n"); break; case 4: printf("\tIEEE 1394A interface\n"); break; case 5: printf("\tFibre Channel interface\n"); } printf("\n"); break; } case CDIO_MMC_FEATURE_REMOVABLE_MEDIUM: switch(p[4] >> 5) { case 0: printf("\tCaddy/Slot type loading mechanism\n"); break; case 1: printf("\tTray type loading mechanism\n"); break; case 2: printf("\tPop-up type loading mechanism\n"); break; case 4: printf("\tEmbedded changer with individually changeable discs\n"); break; case 5: printf("\tEmbedded changer using a magazine mechanism\n"); break; default: printf("\tUnknown changer mechanism\n"); } printf("\tcan%s eject the medium or magazine via the normal " "START/STOP command\n", (p[4] & 8) ? "": "not"); printf("\tcan%s be locked into the Logical Unit\n", (p[4] & 1) ? "": "not"); printf("\n"); break; case CDIO_MMC_FEATURE_CD_READ: printf("CD Read Feature\n"); printf("\tC2 Error pointers are %ssupported\n", (p[4] & 2) ? "": "not "); printf("\tCD-Text is %ssupported\n", (p[4] & 1) ? "": "not "); printf("\n"); break; case CDIO_MMC_FEATURE_CDDA_EXT_PLAY: printf("\tSCAN command is %ssupported\n", (p[4] & 4) ? "": "not "); printf("\taudio channels can %sbe muted separately\n", (p[4] & 2) ? "": "not "); printf("\taudio channels can %shave separate volume levels\n", (p[4] & 1) ? "": "not "); { uint8_t *q = p+6; uint16_t i_vol_levels = CDIO_MMC_GET_LEN16(q); printf("\t%d volume levels can be set\n", i_vol_levels); } printf("\n"); break; case CDIO_MMC_FEATURE_LU_SN: { uint8_t i_serial = *(p+3); char serial[257] = { '\0', }; memcpy(serial, p+4, i_serial); printf("\t%s\n\n", serial); break; } default: printf("\n"); break; } p += i_feature_additional + 4; } } } else { printf("Didn't get all feature codes\n"); } } cdio_destroy(p_cdio); return 0; } libcdio-0.83/example/C++/eject.cpp0000644000175000017500000000524211313260160013527 00000000000000/* Copyright (C) 2005, 2006, 2008, 209 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Simple program to eject a CD-ROM drive door and then close it again. If a single argument is given, it is used as the CD-ROM device to eject/close. Otherwise a CD-ROM drive will be scanned for. */ #include #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif int main(int argc, const char *argv[]) { driver_return_code_t ret; driver_id_t driver_id = DRIVER_DEVICE; char *psz_drive = NULL; if (argc > 1) psz_drive = strdup(argv[1]); if (!psz_drive) { psz_drive = cdio_get_default_device_driver(&driver_id); if (!psz_drive) { printf("Can't find a CD-ROM to eject\n"); exit(1); } } ret = cdio_eject_media_drive(psz_drive); switch(ret) { case DRIVER_OP_UNSUPPORTED: printf("Eject not supported for %s.\n", psz_drive); break; case DRIVER_OP_SUCCESS: printf("CD-ROM drive %s ejected.\n", psz_drive); break; default: printf("Eject of CD-ROM drive %s failed.\n", psz_drive); break; } if (DRIVER_OP_SUCCESS == cdio_close_tray(psz_drive, &driver_id)) { printf("Closed tray of CD-ROM drive %s.\n", psz_drive); } else { printf("Closing tray of CD-ROM drive %s failed.\n", psz_drive); } free(psz_drive); ret = cdio_eject_media_drive(NULL); switch(ret) { case DRIVER_OP_UNSUPPORTED: printf("Eject not supported for default device.\n"); break; case DRIVER_OP_SUCCESS: printf("CD-ROM drive ejected for default device.\n"); break; default: printf("Eject of CD-ROM drive failed for default device.\n"); break; } driver_id = DRIVER_DEVICE; if (DRIVER_OP_SUCCESS == cdio_close_tray(NULL, &driver_id)) { printf("Closed tray of CD-ROM drive for default disc driver:\n\t%s\n", cdio_driver_describe(driver_id)); } else { printf("Closing tray of CD-ROM drive failed for default " "disc driver:\n\t%s\n", cdio_driver_describe(driver_id)); } return 0; } libcdio-0.83/example/C++/isofile2.cpp0000644000175000017500000000730611313260160014154 00000000000000/* Copyright (C) 2004, 2006, 2008, 2009 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Simple program to show using libiso9660 to extract a file from an ISO-9660 image. If a single argument is given, it is used as the ISO 9660 image to use in the extraction. Otherwise a compiled in default ISO 9660 image name (that comes with the libcdio distribution) will be used. */ /* This is the ISO 9660 image. */ #define ISO9660_IMAGE_PATH "../../" #define ISO9660_IMAGE ISO9660_IMAGE_PATH "test/copying.iso" #define LOCAL_FILENAME "copying" #include #include #include #include "portable.h" #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #define CEILING(x, y) ((x+(y-1))/y) #define my_exit(rc) \ fclose (p_outfd); \ free(p_statbuf); \ iso9660_close(p_iso); \ return rc; \ int main(int argc, const char *argv[]) { iso9660_stat_t *p_statbuf; FILE *p_outfd; unsigned int i; char const *psz_image; char const *psz_fname; iso9660_t *p_iso; if (argc > 3) { printf("usage %s [ISO9660-image.ISO [filename]]\n", argv[0]); printf("Extracts filename from ISO-9660-image.ISO.\n"); return 1; } if (argc > 1) psz_image = argv[1]; else psz_image = ISO9660_IMAGE; if (argc > 2) psz_fname = argv[2]; else psz_fname = LOCAL_FILENAME; p_iso = iso9660_open (psz_image); if (NULL == p_iso) { fprintf(stderr, "Sorry, couldn't open ISO 9660 image %s\n", psz_image); return 1; } p_statbuf = iso9660_ifs_stat_translate (p_iso, psz_fname); if (NULL == p_statbuf) { fprintf(stderr, "Could not get ISO-9660 file information for file %s\n", psz_fname); iso9660_close(p_iso); return 2; } if (!(p_outfd = fopen (psz_fname, "wb"))) { perror ("fopen()"); free(p_statbuf); iso9660_close(p_iso); return 3; } /* Copy the blocks from the ISO-9660 filesystem to the local filesystem. */ { const unsigned int i_blocks = CEILING(p_statbuf->size, ISO_BLOCKSIZE); for (i = 0; i < i_blocks ; i++) { char buf[ISO_BLOCKSIZE]; const lsn_t lsn = p_statbuf->lsn + i; memset (buf, 0, ISO_BLOCKSIZE); if ( ISO_BLOCKSIZE != iso9660_iso_seek_read (p_iso, buf, lsn, 1) ) { fprintf(stderr, "Error reading ISO 9660 file %s at LSN %lu\n", psz_fname, (long unsigned int) lsn); my_exit(4); } fwrite (buf, ISO_BLOCKSIZE, 1, p_outfd); if (ferror (p_outfd)) { perror ("fwrite()"); my_exit(5); } } } fflush (p_outfd); /* Make sure the file size has the exact same byte size. Without the truncate below, the file will a multiple of ISO_BLOCKSIZE. */ if (ftruncate (fileno (p_outfd), p_statbuf->size)) perror ("ftruncate()"); printf("Extraction of file '%s' from %s successful.\n", psz_fname, psz_image); my_exit(0); } libcdio-0.83/example/C++/OO/0000755000175000017500000000000011652210416012330 500000000000000libcdio-0.83/example/C++/OO/isolist.cpp0000644000175000017500000000627311313260160014445 00000000000000/* $Id: isolist.cpp,v 1.2 2008/03/24 15:30:57 karl Exp $ Copyright (C) 2006, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Simple program to show using libiso9660 to list files in a directory of an ISO-9660 image and give some iso9660 information. See the code to iso-info for a more complete example. If a single argument is given, it is used as the ISO 9660 image to use in the listing. Otherwise a compiled-in default ISO 9660 image name (that comes with the libcdio distribution) will be used. This program can be compiled with either a C or C++ compiler. In the distributuion we perfer C++ just to make sure we haven't broken things on the C++ side. */ /* Set up a CD-DA image to test on which is in the libcdio distribution. */ #define ISO9660_IMAGE_PATH "../../../" #define ISO9660_IMAGE ISO9660_IMAGE_PATH "test/copying.iso" #include #include #include #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #define print_vd_info(title, fn) \ if (p_iso->fn(psz_str)) { \ printf(title ": %s\n", psz_str); \ } \ free(psz_str); \ psz_str = NULL; int main(int argc, const char *argv[]) { stat_vector_t stat_vector; ISO9660::IFS *p_iso = new ISO9660::IFS; char const *psz_fname; const char *psz_path="/"; if (argc > 1) psz_fname = argv[1]; else psz_fname = ISO9660_IMAGE; if (!p_iso->open(psz_fname)) { fprintf(stderr, "Sorry, couldn't open %s as an ISO-9660 image\n", psz_fname); return 1; } /* Show basic CD info from the Primary Volume Descriptor. */ { char *psz_str = NULL; print_vd_info("Application", get_application_id); print_vd_info("Preparer ", get_preparer_id); print_vd_info("Publisher ", get_publisher_id); print_vd_info("System ", get_system_id); print_vd_info("Volume ", get_volume_id); print_vd_info("Volume Set ", get_volumeset_id); } if (p_iso->readdir (psz_path, stat_vector)) { /* Iterate over the list of files. */ stat_vector_iterator_t i; for(i=stat_vector.begin(); i != stat_vector.end(); ++i) { char filename[4096]; ISO9660::Stat *p_s = *i; iso9660_name_translate(p_s->p_stat->filename, filename); printf ("%s [LSN %6d] %8u %s%s\n", 2 == p_s->p_stat->type ? "d" : "-", p_s->p_stat->lsn, p_s->p_stat->size, psz_path, filename); delete(p_s); } stat_vector.clear(); } delete(p_iso); return 0; } libcdio-0.83/example/C++/OO/isofile.cpp0000644000175000017500000000716711313260160014414 00000000000000/* Copyright (C) 2006, 2008, 2009 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Simple program to show using libiso9660 to extract a file from an ISO-9660 image. If a single argument is given, it is used as the ISO 9660 image to use in the extraction. Otherwise a compiled in default ISO 9660 image name (that comes with the libcdio distribution) will be used. */ /* This is the ISO 9660 image. */ #define ISO9660_IMAGE_PATH "../../../" #define ISO9660_IMAGE ISO9660_IMAGE_PATH "test/copying.iso" #define LOCAL_FILENAME "copying" #include #include #include "portable.h" #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #define CEILING(x, y) ((x+(y-1))/y) #define my_exit(rc) \ fclose (p_outfd); \ delete (p_stat); \ delete (p_iso); \ return rc; \ int main(int argc, const char *argv[]) { ISO9660::Stat *p_stat; FILE *p_outfd; unsigned int i; char const *psz_image; char const *psz_fname; ISO9660::IFS *p_iso = new ISO9660::IFS; if (argc > 3) { printf("usage %s [ISO9660-image.ISO [filename]]\n", argv[0]); printf("Extracts filename from ISO-9660-image.ISO.\n"); return 1; } if (argc > 1) psz_image = argv[1]; else psz_image = ISO9660_IMAGE; if (argc > 2) psz_fname = argv[2]; else psz_fname = LOCAL_FILENAME; if (!p_iso->open(psz_image)) { fprintf(stderr, "Sorry, couldn't open ISO 9660 image %s\n", psz_image); return 1; } p_stat = p_iso->stat(psz_fname, true); if (!p_stat) { fprintf(stderr, "Could not get ISO-9660 file information for file %s\n", psz_fname); delete(p_iso); return 2; } if (!(p_outfd = fopen (psz_fname, "wb"))) { perror ("fopen()"); delete (p_stat); delete (p_iso); return 3; } /* Copy the blocks from the ISO-9660 filesystem to the local filesystem. */ { const unsigned int i_blocks = CEILING(p_stat->p_stat->size, ISO_BLOCKSIZE); for (i = 0; i < i_blocks ; i++) { char buf[ISO_BLOCKSIZE]; const lsn_t lsn = p_stat->p_stat->lsn + i; memset (buf, 0, ISO_BLOCKSIZE); if ( ISO_BLOCKSIZE != p_iso->seek_read (buf, lsn, 1) ) { fprintf(stderr, "Error reading ISO 9660 file %s at LSN %lu\n", psz_fname, (long unsigned int) lsn); my_exit(4); } fwrite (buf, ISO_BLOCKSIZE, 1, p_outfd); if (ferror (p_outfd)) { perror ("fwrite()"); my_exit(5); } } } fflush (p_outfd); /* Make sure the file size has the exact same byte size. Without the truncate below, the file will a multiple of ISO_BLOCKSIZE. */ if (ftruncate (fileno (p_outfd), p_stat->p_stat->size)) perror ("ftruncate()"); printf("Extraction of file '%s' from %s successful.\n", psz_fname, psz_image); my_exit(0); } libcdio-0.83/example/C++/OO/drives.cpp0000644000175000017500000000456511313260160014255 00000000000000/* Copyright (C) 2003, 2004, 2006, 2008, 2009 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Simple program to show drivers installed and what the default CD-ROM drive is and what CD drives are available. */ #include #include #include #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif static void log_handler (cdio_log_level_t level, const char message[]) { switch(level) { case CDIO_LOG_DEBUG: case CDIO_LOG_INFO: return; default: printf("cdio %d message: %s\n", level, message); } } static void print_drive_class(const char *psz_msg, cdio_fs_anal_t bitmask, bool b_any=false) { char **ppsz_cd_drives=NULL, **c; printf("%s...\n", psz_msg); ppsz_cd_drives = getDevices(NULL, bitmask, b_any); if (NULL != ppsz_cd_drives) for( c = ppsz_cd_drives; *c != NULL; c++ ) { printf("Drive %s\n", *c); } freeDeviceList(ppsz_cd_drives); printf("-----\n"); } int main(int argc, const char *argv[]) { char **ppsz_cd_drives=NULL, **c; cdio_log_set_handler (log_handler); /* Print out a list of CD-drives */ printf("All CD-ROM/DVD drives...\n"); ppsz_cd_drives = getDevices(); if (NULL != ppsz_cd_drives) for( c = ppsz_cd_drives; *c != NULL; c++ ) { printf("Drive %s\n", *c); } freeDeviceList(ppsz_cd_drives); print_drive_class("All CD-ROM drives (again)", CDIO_FS_MATCH_ALL); print_drive_class("CD-ROM drives with a CD-DA loaded...", CDIO_FS_AUDIO); print_drive_class("CD-ROM drives with some sort of ISO 9660 filesystem...", CDIO_FS_ANAL_ISO9660_ANY, true); print_drive_class("(S)VCD drives...", CDIO_FS_ANAL_VCD_ANY, true); return 0; } libcdio-0.83/example/C++/OO/device.cpp0000644000175000017500000001107311313260160014210 00000000000000/* $Id: device.cpp,v 1.4 2008/03/24 15:30:57 karl Exp $ Copyright (C) 2005, 2008, 2009 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Simple program to show drivers installed and what the default CD-ROM drive is. See also corresponding C program of a similar name. */ #include #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #define _(x) x /* Prints out drive capabilities */ static void print_drive_capabilities(cdio_drive_read_cap_t i_read_cap, cdio_drive_write_cap_t i_write_cap, cdio_drive_misc_cap_t i_misc_cap) { if (CDIO_DRIVE_CAP_ERROR == i_misc_cap) { printf("Error in getting drive hardware properties\n"); } else { printf(_("Hardware : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_FILE ? "Disk Image" : "CD-ROM or DVD"); printf(_("Can eject : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_EJECT ? "Yes" : "No"); printf(_("Can close tray : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_CLOSE_TRAY ? "Yes" : "No"); printf(_("Can disable manual eject : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_LOCK ? "Yes" : "No"); printf(_("Can select juke-box disc : %s\n\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_SELECT_DISC ? "Yes" : "No"); printf(_("Can set drive speed : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_SELECT_SPEED ? "Yes" : "No"); printf(_("Can detect if CD changed : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_MEDIA_CHANGED ? "Yes" : "No"); printf(_("Can read multiple sessions : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_MULTI_SESSION ? "Yes" : "No"); printf(_("Can hard reset device : %s\n\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_RESET ? "Yes" : "No"); } if (CDIO_DRIVE_CAP_ERROR == i_read_cap) { printf("Error in getting drive reading properties\n"); } else { printf("Reading....\n"); printf(_(" Can play audio : %s\n"), i_read_cap & CDIO_DRIVE_CAP_READ_AUDIO ? "Yes" : "No"); printf(_(" Can read CD-R : %s\n"), i_read_cap & CDIO_DRIVE_CAP_READ_CD_R ? "Yes" : "No"); printf(_(" Can read CD-RW : %s\n"), i_read_cap & CDIO_DRIVE_CAP_READ_CD_RW ? "Yes" : "No"); printf(_(" Can read DVD-ROM : %s\n"), i_read_cap & CDIO_DRIVE_CAP_READ_DVD_ROM ? "Yes" : "No"); } if (CDIO_DRIVE_CAP_ERROR == i_write_cap) { printf("Error in getting drive writing properties\n"); } else { printf("\nWriting....\n"); printf(_(" Can write CD-RW : %s\n"), i_read_cap & CDIO_DRIVE_CAP_READ_CD_RW ? "Yes" : "No"); printf(_(" Can write DVD-R : %s\n"), i_write_cap & CDIO_DRIVE_CAP_READ_DVD_R ? "Yes" : "No"); printf(_(" Can write DVD-RAM : %s\n"), i_write_cap & CDIO_DRIVE_CAP_READ_DVD_RAM ? "Yes" : "No"); } } int main(int argc, const char *argv[]) { CdioDevice device; if (device.open(NULL)) { char *default_device = device.getDevice(); cdio_drive_read_cap_t i_read_cap; cdio_drive_write_cap_t i_write_cap; cdio_drive_misc_cap_t i_misc_cap; printf("The driver selected is %s\n", device.getDriverName()); if (default_device) printf("The default device for this driver is %s\n", default_device); device.getDriveCap(i_read_cap, i_write_cap, i_misc_cap); print_drive_capabilities(i_read_cap, i_write_cap, i_misc_cap); free(default_device); printf("\n"); } else { printf("Problem in trying to find a driver.\n\n"); } { const driver_id_t *driver_id_p; for (driver_id_p=cdio_drivers; *driver_id_p!=DRIVER_UNKNOWN; driver_id_p++) if (cdio_have_driver(*driver_id_p)) printf("We have: %s\n", cdio_driver_describe(*driver_id_p)); else printf("We don't have: %s\n", cdio_driver_describe(*driver_id_p)); } return 0; } libcdio-0.83/example/C++/OO/mmc1.cpp0000644000175000017500000000477211313260160013616 00000000000000/* Copyright (C) 2005, 2008, 2009 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Sample program to show use of the MMC interface. An optional drive name can be supplied as an argument. This basically the libdio mmc_get_hwinfo() routine. See also corresponding C and non OO C++ program. */ #include #include #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_STRING_H #include #endif /* Set how long to wait for MMC commands to complete */ #define DEFAULT_TIMEOUT_MS 10000 int main(int argc, const char *argv[]) { CdioDevice device; const char *psz_drive = NULL; if (argc > 1) psz_drive = argv[1]; if (!device.open(psz_drive)) { printf("Couldn't find CD\n"); return 1; } else { int i_status; /* Result of MMC command */ char buf[36] = { 0, }; /* Place to hold returned data */ mmc_cdb_t cdb = {{0, }}; /* Command Descriptor Buffer */ CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_INQUIRY); cdb.field[4] = sizeof(buf); i_status = device.mmcRunCmd(DEFAULT_TIMEOUT_MS, &cdb, SCSI_MMC_DATA_READ, sizeof(buf), &buf); if (i_status == 0) { char psz_vendor[CDIO_MMC_HW_VENDOR_LEN+1]; char psz_model[CDIO_MMC_HW_MODEL_LEN+1]; char psz_rev[CDIO_MMC_HW_REVISION_LEN+1]; memcpy(psz_vendor, buf + 8, sizeof(psz_vendor)-1); psz_vendor[sizeof(psz_vendor)-1] = '\0'; memcpy(psz_model, buf + 8 + CDIO_MMC_HW_VENDOR_LEN, sizeof(psz_model)-1); psz_model[sizeof(psz_model)-1] = '\0'; memcpy(psz_rev, buf + 8 + CDIO_MMC_HW_VENDOR_LEN +CDIO_MMC_HW_MODEL_LEN, sizeof(psz_rev)-1); psz_rev[sizeof(psz_rev)-1] = '\0'; printf("Vendor: %s\nModel: %s\nRevision: %s\n", psz_vendor, psz_model, psz_rev); } else { printf("Couldn't get INQUIRY data (vendor, model, and revision).\n"); } } return 0; } libcdio-0.83/example/C++/OO/Makefile.am0000644000175000017500000000503711313260160014304 00000000000000# Copyright (C) 2005, 2006, 2008, 2009 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ############################################################ # Sample C++ programs using libcdio++ (with C++ OO wrapper) ############################################################ # noinst_PROGRAMS = cdtext device drives eject \ isofile isofile2 isolist iso4 mmc1 mmc2 tracks INCLUDES = -I$(top_srcdir)/include $(LIBCDIO_CFLAGS) cdtext_SOURCES = cdtext.cpp cdtext_DEPENDENCIES = $(LIBCDIO_DEPS) cdtext_LDADD = $(LIBCDIOPP_LIBS) $(LIBCDIO_LIBS) device_SOURCES = device.cpp device_DEPENDENCIES = $(LIBCDIO_DEPS) device_LDADD = $(LIBCDIOPP_LIBS) $(LIBCDIO_LIBS) drives_SOURCES = drives.cpp drives_DEPENDENCIES = $(LIBCDIO_DEPS) drives_LDADD = $(LIBCDIOPP_LIBS) $(LIBCDIO_LIBS) eject_SOURCES = eject.cpp eject_DEPENDENCIES = $(LIBCDIO_DEPS) eject_LDADD = $(LIBCDIOPP_LIBS) $(LIBCDIO_LIBS) isofile_SOURCES = isofile.cpp isofile_LDADD = $(LIBISO9660PP_LIBS) $(LIBISO9660_LIBS) \ $(LIBCDIOPP_LIBS) $(LTLIBICONV) isofile2_SOURCES = isofile2.cpp isofile2_LDADD = $(LIBISO9660PP_LIBS) $(LIBISO9660_LIBS) \ $(LIBCDIOPP_LIBS) $(LTLIBICONV) isolist_SOURCES = isolist.cpp isolist_LDADD = $(LIBISO9660PP_LIBS) $(LIBISO9660_LIBS) \ $(LIBCDIOPP_LIBS) $(LTLIBICONV) iso4_SOURCES = iso4.cpp iso4_LDADD = $(LIBISO9660PP_LIBS) $(LIBISO9660_LIBS) \ $(LIBCDIOPP_LIBS) $(LTLIBICONV) mmc1_SOURCES = mmc1.cpp mmc1_DEPENDENCIES = $(LIBCDIO_DEPS) mmc1_LDADD = $(LIBCDIOPP_LIBS) $(LIBCDIO_LIBS) mmc2_SOURCES = mmc2.cpp mmc2_DEPENDENCIES = $(LIBCDIO_DEPS) mmc2_LDADD = $(LIBCDIOPP_LIBS) $(LIBCDIO_LIBS) tracks_SOURCES = tracks.cpp tracks_LDADD = $(LIBCDIOPP_LIBS) $(LIBCDIO_LIBS) check_PROGRAMS = $(noinst_PROGRAMS) TESTS = $(check_PROGRAMS) libcdio-0.83/example/C++/OO/mmc2.cpp0000644000175000017500000001221111313260160013602 00000000000000/* Copyright (C) 2005, 2008, 2009 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* A program to using the MMC interface to list CD and drive features from the MMC GET_CONFIGURATION command . */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #ifdef HAVE_SYS_TYPE_H #include #endif #ifdef HAVE_STRING_H #include #endif #include /* Set how long do wto wait for SCSI-MMC commands to complete */ #define DEFAULT_TIMEOUT_MS 10000 int main(int argc, const char *argv[]) { CdioDevice device; const char *psz_drive = NULL; if (argc > 1) psz_drive = argv[1]; if (!device.open(psz_drive)) { printf("Couldn't find CD\n"); return 1; } else { int i_status; /* Result of MMC command */ uint8_t buf[500] = { 0, }; /* Place to hold returned data */ mmc_cdb_t cdb = {{0, }}; /* Command Descriptor Buffer */ CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_GET_CONFIGURATION); CDIO_MMC_SET_READ_LENGTH8(cdb.field, sizeof(buf)); cdb.field[1] = CDIO_MMC_GET_CONF_ALL_FEATURES; cdb.field[3] = 0x0; i_status = device.mmcRunCmd(0, &cdb, SCSI_MMC_DATA_READ, sizeof(buf), &buf); if (i_status == 0) { uint8_t *p; uint32_t i_data; uint8_t *p_max = buf + 65530; i_data = (unsigned int) CDIO_MMC_GET_LEN32(buf); /* set to first sense feature code, and then walk through the masks */ p = buf + 8; while( (p < &(buf[i_data])) && (p < p_max) ) { uint16_t i_feature; uint8_t i_feature_additional = p[3]; i_feature = CDIO_MMC_GET_LEN16(p); { uint8_t *q; const char *feature_str = mmc_feature2str(i_feature); printf("%s Feature\n", feature_str); switch( i_feature ) { case CDIO_MMC_FEATURE_PROFILE_LIST: for ( q = p+4 ; q < p + i_feature_additional ; q += 4 ) { int i_profile=CDIO_MMC_GET_LEN16(q); const char *feature_profile_str = mmc_feature_profile2str(i_profile); printf( "\t%s", feature_profile_str ); if (q[2] & 1) { printf(" - on"); } printf("\n"); } printf("\n"); break; case CDIO_MMC_FEATURE_CORE: { uint8_t *q = p+4; uint32_t i_interface_standard = CDIO_MMC_GET_LEN32(q); switch(i_interface_standard) { case 0: printf("\tunspecified interface\n"); break; case 1: printf("\tSCSI interface\n"); break; case 2: printf("\tATAPI interface\n"); break; case 3: printf("\tIEEE 1394 interface\n"); break; case 4: printf("\tIEEE 1394A interface\n"); break; case 5: printf("\tFibre Channel interface\n"); } printf("\n"); break; } case CDIO_MMC_FEATURE_REMOVABLE_MEDIUM: switch(p[4] >> 5) { case 0: printf("\tCaddy/Slot type loading mechanism\n"); break; case 1: printf("\tTray type loading mechanism\n"); break; case 2: printf("\tPop-up type loading mechanism\n"); break; case 4: printf("\tEmbedded changer with individually changeable discs\n"); break; case 5: printf("\tEmbedded changer using a magazine mechanism\n"); break; default: printf("\tUnknown changer mechanism\n"); } printf("\tcan%s eject the medium or magazine via the normal " "START/STOP command\n", (p[4] & 8) ? "": "not"); printf("\tcan%s be locked into the Logical Unit\n", (p[4] & 1) ? "": "not"); printf("\n"); break; case CDIO_MMC_FEATURE_CD_READ: printf("CD Read Feature\n"); printf("\tC2 Error pointers are %ssupported\n", (p[4] & 2) ? "": "not "); printf("\tCD-Text is %ssupported\n", (p[4] & 1) ? "": "not "); printf("\n"); break; case CDIO_MMC_FEATURE_CDDA_EXT_PLAY: printf("\tSCAN command is %ssupported\n", (p[4] & 4) ? "": "not "); printf("\taudio channels can %sbe muted separately\n", (p[4] & 2) ? "": "not "); printf("\taudio channels can %shave separate volume levels\n", (p[4] & 1) ? "": "not "); { uint8_t *q = p+6; uint16_t i_vol_levels = CDIO_MMC_GET_LEN16(q); printf("\t%d volume levels can be set\n", i_vol_levels); } printf("\n"); break; case CDIO_MMC_FEATURE_LU_SN: { uint8_t i_serial = *(p+3); char serial[257] = { '\0', }; memcpy(serial, p+4, i_serial); printf("\t%s\n\n", serial); break; } default: printf("\n"); break; } p += i_feature_additional + 4; } } } else { printf("Didn't get all feature codes\n"); } } return 0; } libcdio-0.83/example/C++/OO/eject.cpp0000644000175000017500000000416511313260160014047 00000000000000/* $Id: eject.cpp,v 1.7 2008/03/24 15:30:57 karl Exp $ Copyright (C) 2005, 2006, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Simple program to eject a CD-ROM drive door and then close it again. If a single argument is given, it is used as the CD-ROM device to eject/close. Otherwise a CD-ROM drive will be scanned for. See also corresponding C program of a similar name. */ #include #include #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif int main(int argc, const char *argv[]) { driver_id_t driver_id = DRIVER_DEVICE; char *psz_drive = NULL; CdioDevice device; if (argc > 1) psz_drive = strdup(argv[1]); if (!psz_drive) { psz_drive = getDefaultDevice(driver_id); if (!psz_drive) { printf("Can't find a CD-ROM to perform eject operation\n"); exit(1); } } try { ejectMedia(psz_drive); printf("CD in CD-ROM drive %s ejected.\n", psz_drive); } catch ( DriverOpUninit e ) { printf("Can't Eject CD %s from CD-ROM drive: driver is not initialized.\n", psz_drive); } catch ( DriverOpException e ) { printf("Ejecting CD from CD-ROM drive %s operation error:\n\t%s.\n", psz_drive, e.get_msg()); } try { closeTray(psz_drive); printf("Closed CD-ROM %s tray.\n", psz_drive); } catch ( DriverOpException e ) { printf("Closing CD-ROM %s tray operation error error:\n\t%s.\n", psz_drive, e.get_msg()); } free(psz_drive); return 0; } libcdio-0.83/example/C++/OO/iso4.cpp0000644000175000017500000000625111313260160013631 00000000000000/* Copyright (C) 2006, 2008, 2009 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Simple program to show using libiso9660 to list files in a directory of an ISO-9660 image and give some iso9660 information. See the code to iso-info for a more complete example. If a single argument is given, it is used as the ISO 9660 image to use in the listing. Otherwise a compiled-in default ISO 9660 image name (that comes with the libcdio distribution) will be used. This program can be compiled with either a C or C++ compiler. In the distributuion we perfer C++ just to make sure we haven't broken things on the C++ side. */ /* Set up a CD-DA image to test on which is in the libcdio distribution. */ #define ISO9660_IMAGE_PATH "../../../" #define ISO9660_IMAGE ISO9660_IMAGE_PATH "test/isofs-m1.cue" #include #include #include #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #define print_vd_info(title, fn) \ psz_str = p_pvd->fn(); \ if (psz_str) { \ printf(title ": %s\n", psz_str); \ free(psz_str); \ psz_str = NULL; \ } int main(int argc, const char *argv[]) { stat_vector_t stat_vector; ISO9660::FS *p_iso = new ISO9660::FS; char const *psz_fname; const char *psz_path="/"; ISO9660::PVD *p_pvd; if (argc > 1) psz_fname = argv[1]; else psz_fname = ISO9660_IMAGE; if (!p_iso->open(psz_fname, DRIVER_UNKNOWN)) { fprintf(stderr, "Sorry, couldn't open %s as a CD or CD image.\n", psz_fname); return 1; } p_pvd = p_iso->read_pvd(); if (p_pvd) { char *psz_str = NULL; print_vd_info("Application", get_application_id); print_vd_info("Preparer ", get_preparer_id); print_vd_info("Publisher ", get_publisher_id); print_vd_info("System ", get_system_id); print_vd_info("Volume ", get_volume_id); print_vd_info("Volume Set ", get_volumeset_id); } if (p_iso->readdir (psz_path, stat_vector)) { /* Iterate over the list of files. */ stat_vector_iterator_t i; for(i=stat_vector.begin(); i != stat_vector.end(); ++i) { char filename[4096]; ISO9660::Stat *p_s = *i; iso9660_name_translate(p_s->p_stat->filename, filename); printf ("%s [LSN %6d] %8u %s%s\n", 2 == p_s->p_stat->type ? "d" : "-", p_s->p_stat->lsn, p_s->p_stat->size, psz_path, filename); delete(p_s); } stat_vector.clear(); } delete(p_iso); return 0; } libcdio-0.83/example/C++/OO/cdtext.cpp0000644000175000017500000000571611313260160014253 00000000000000/* $Id: cdtext.cpp,v 1.4 2008/03/24 15:30:57 karl Exp $ Copyright (C) 2005, 2008, 2009 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Simple program to list CD-Text info of a Compact Disc using libcdio. An optional drive name can be supplied as an argument. See also corresponding C program of a similar name. */ #include #ifdef HAVE_CONFIG_H # include "config.h" #endif #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif /* Set up a CD-DA image to test on which is in the libcdio distribution. */ #define CDDA_IMAGE_PATH "../../../test/" #define CDDA_IMAGE CDDA_IMAGE_PATH "cdda.cue" static void print_cdtext_track_info(CdioDevice *device, track_t i_track, const char *psz_msg) { cdtext_t *cdtext = device->getCdtext(0); if (NULL != cdtext) { cdtext_field_t i; printf("%s\n", psz_msg); for (i= (cdtext_field_t) MIN_CDTEXT_FIELD; i < MAX_CDTEXT_FIELDS; i++) { if (cdtext->field[i]) { printf("\t%s: %s\n", cdtext_field2str(i), cdtext->field[i]); } } } } static void print_disc_info(CdioDevice *device, track_t i_tracks, track_t i_first_track) { track_t i_last_track = i_first_track+i_tracks; discmode_t cd_discmode = device->getDiscmode(); printf("%s\n", discmode2str[cd_discmode]); print_cdtext_track_info(device, 0, "\nCD-Text for Disc:"); for ( ; i_first_track < i_last_track; i_first_track++ ) { char psz_msg[50]; sprintf(psz_msg, "CD-Text for Track %d:", i_first_track); print_cdtext_track_info(device, i_first_track, psz_msg); } } int main(int argc, const char *argv[]) { track_t i_first_track; track_t i_tracks; CdioDevice *device = new CdioDevice; const char *psz_drive = NULL; if (!device->open(CDDA_IMAGE, DRIVER_BINCUE)) { printf("Couldn't open " CDDA_IMAGE " with BIN/CUE driver.\n"); } else { i_first_track = device->getFirstTrackNum(); i_tracks = device->getNumTracks(); print_disc_info(device, i_tracks, i_first_track); } if (argc > 1) psz_drive = argv[1]; if (!device->open(psz_drive, DRIVER_DEVICE)) { printf("Couldn't find CD\n"); delete(device); return 1; } else { i_first_track = device->getFirstTrackNum(); i_tracks = device->getNumTracks(); print_disc_info(device, i_tracks, i_first_track); } delete(device); return 0; } libcdio-0.83/example/C++/OO/isofile2.cpp0000644000175000017500000001017711313260160014471 00000000000000/* Copyright (C) 2006, 2008, 2009 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Simple program to show using libiso9660 to extract a file from a CUE/BIN CD image. If a single argument is given, it is used as the CUE file of a CD image to use. Otherwise a compiled-in default image name (that comes with the libcdio distribution) will be used. This program can be compiled with either a C or C++ compiler. In the distribution we prefer C++ just to make sure we haven't broken things on the C++ side. */ /* This is the CD-image with an ISO-9660 filesystem */ #define ISO9660_IMAGE_PATH "../../../" #define ISO9660_IMAGE ISO9660_IMAGE_PATH "test/isofs-m1.cue" #define ISO9660_PATH "/" #define ISO9660_FILENAME "COPYING" #define LOCAL_FILENAME "copying" #include #include #include "portable.h" #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #define CEILING(x, y) ((x+(y-1))/y) #define my_exit(rc) \ fclose (p_outfd); \ delete (p_stat); \ delete (p_iso); \ return rc; \ int main(int argc, const char *argv[]) { ISO9660::Stat *p_stat; FILE *p_outfd; unsigned int i; char const *psz_image; char const *psz_fname; char translated_name[256]; char untranslated_name[256] = ISO9660_PATH; ISO9660::FS *p_iso = new ISO9660::FS; if (argc > 3) { printf("usage %s [CD-ROM-or-image [filename]]\n", argv[0]); printf("Extracts filename from CD-ROM-or-image.\n"); return 1; } if (argc > 1) psz_image = argv[1]; else psz_image = ISO9660_IMAGE; if (argc > 2) psz_fname = argv[2]; else psz_fname = ISO9660_FILENAME; strcat(untranslated_name, psz_fname); if (!p_iso->open(psz_image, DRIVER_UNKNOWN)) { fprintf(stderr, "Sorry, couldn't open %s\n", psz_image); return 1; } p_stat = p_iso->stat(psz_fname); if (!p_stat) { fprintf(stderr, "Could not get ISO-9660 file information for file %s\n", untranslated_name); delete(p_iso); return 2; } iso9660_name_translate(psz_fname, translated_name); if (!(p_outfd = fopen (translated_name, "wb"))) { perror ("fopen()"); delete (p_stat); delete (p_iso); return 3; } /* Copy the blocks from the ISO-9660 filesystem to the local filesystem. */ { const unsigned int i_blocks = CEILING(p_stat->p_stat->size, ISO_BLOCKSIZE); for (i = 0; i < i_blocks; i ++) { char buf[ISO_BLOCKSIZE]; const lsn_t lsn = p_stat->p_stat->lsn + i; memset (buf, 0, ISO_BLOCKSIZE); try { p_iso->readDataBlocks(buf, lsn, ISO_BLOCKSIZE); } catch ( DriverOpException e ) { fprintf(stderr, "Error reading ISO 9660 file at lsn %lu:\n\t%s.\n", (long unsigned int) lsn, e.get_msg()); my_exit(4); } fwrite (buf, ISO_BLOCKSIZE, 1, p_outfd); if (ferror (p_outfd)) { perror ("fwrite()"); my_exit(5); } } } fflush (p_outfd); /* Make sure the file size has the exact same byte size. Without the truncate below, the file will a multiple of ISO_BLOCKSIZE. */ if (ftruncate (fileno (p_outfd), p_stat->p_stat->size)) perror ("ftruncate()"); printf("Extraction of file '%s' from '%s' successful.\n", translated_name, untranslated_name); my_exit(0); } libcdio-0.83/example/C++/OO/tracks.cpp0000644000175000017500000000334211313260160014240 00000000000000/* Copyright (C) 2005, 2008, 2009 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Simple program to list track numbers and logical sector numbers of a Compact Disc using libcdio. */ #include #include #ifdef HAVE_SYS_TYPES_H #include #endif int main(int argc, const char *argv[]) { CdioDevice device; track_t i_first_track; track_t i_tracks; int j, i; CdioTrack *track; if (!device.open (NULL)) { printf("Couldn't find a driver.. leaving.\n"); return 1; } i_tracks = device.getNumTracks(); i_first_track = i = device.getFirstTrackNum(); printf("CD-ROM Track List (%i - %i)\n", i_first_track, i_tracks); printf(" #: LSN\n"); for (j = 0; j < i_tracks; i++, j++) { track = device.getTrackFromNum(i); lsn_t lsn = track->getLsn(); if (CDIO_INVALID_LSN != lsn) printf("%3d: %06lu\n", (int) i, (long unsigned int) lsn); delete(track); } track = device.getTrackFromNum(CDIO_CDROM_LEADOUT_TRACK); printf("%3X: %06lu leadout\n", CDIO_CDROM_LEADOUT_TRACK, (long unsigned int) track->getLsn()); delete(track); return 0; } libcdio-0.83/example/C++/OO/Makefile.in0000644000175000017500000006112411652210027014317 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 2005, 2006, 2008, 2009 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = cdtext$(EXEEXT) device$(EXEEXT) drives$(EXEEXT) \ eject$(EXEEXT) isofile$(EXEEXT) isofile2$(EXEEXT) \ isolist$(EXEEXT) iso4$(EXEEXT) mmc1$(EXEEXT) mmc2$(EXEEXT) \ tracks$(EXEEXT) check_PROGRAMS = $(am__EXEEXT_1) subdir = example/C++/OO DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__EXEEXT_1 = cdtext$(EXEEXT) device$(EXEEXT) drives$(EXEEXT) \ eject$(EXEEXT) isofile$(EXEEXT) isofile2$(EXEEXT) \ isolist$(EXEEXT) iso4$(EXEEXT) mmc1$(EXEEXT) mmc2$(EXEEXT) \ tracks$(EXEEXT) PROGRAMS = $(noinst_PROGRAMS) am_cdtext_OBJECTS = cdtext.$(OBJEXT) cdtext_OBJECTS = $(am_cdtext_OBJECTS) am__DEPENDENCIES_1 = am_device_OBJECTS = device.$(OBJEXT) device_OBJECTS = $(am_device_OBJECTS) am_drives_OBJECTS = drives.$(OBJEXT) drives_OBJECTS = $(am_drives_OBJECTS) am_eject_OBJECTS = eject.$(OBJEXT) eject_OBJECTS = $(am_eject_OBJECTS) am_iso4_OBJECTS = iso4.$(OBJEXT) iso4_OBJECTS = $(am_iso4_OBJECTS) iso4_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_isofile_OBJECTS = isofile.$(OBJEXT) isofile_OBJECTS = $(am_isofile_OBJECTS) isofile_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_isofile2_OBJECTS = isofile2.$(OBJEXT) isofile2_OBJECTS = $(am_isofile2_OBJECTS) isofile2_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_isolist_OBJECTS = isolist.$(OBJEXT) isolist_OBJECTS = $(am_isolist_OBJECTS) isolist_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_mmc1_OBJECTS = mmc1.$(OBJEXT) mmc1_OBJECTS = $(am_mmc1_OBJECTS) am_mmc2_OBJECTS = mmc2.$(OBJEXT) mmc2_OBJECTS = $(am_mmc2_OBJECTS) am_tracks_OBJECTS = tracks.$(OBJEXT) tracks_OBJECTS = $(am_tracks_OBJECTS) tracks_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(cdtext_SOURCES) $(device_SOURCES) $(drives_SOURCES) \ $(eject_SOURCES) $(iso4_SOURCES) $(isofile_SOURCES) \ $(isofile2_SOURCES) $(isolist_SOURCES) $(mmc1_SOURCES) \ $(mmc2_SOURCES) $(tracks_SOURCES) DIST_SOURCES = $(cdtext_SOURCES) $(device_SOURCES) $(drives_SOURCES) \ $(eject_SOURCES) $(iso4_SOURCES) $(isofile_SOURCES) \ $(isofile2_SOURCES) $(isolist_SOURCES) $(mmc1_SOURCES) \ $(mmc2_SOURCES) $(tracks_SOURCES) ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDDA_PLAYER_LIBS = @CDDA_PLAYER_LIBS@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CDPARANOIA_NAME = @CDPARANOIA_NAME@ CFLAGS = @CFLAGS@ CMP = @CMP@ COS_LIB = @COS_LIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_PKG_LIB_HACK = @DARWIN_PKG_LIB_HACK@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ DIFF_OPTS = @DIFF_OPTS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GIT2CL = @GIT2CL@ GREP = @GREP@ HAVE_BSDI_CDROM = @HAVE_BSDI_CDROM@ HAVE_DARWIN_CDROM = @HAVE_DARWIN_CDROM@ HAVE_FREEBSD_CDROM = @HAVE_FREEBSD_CDROM@ HAVE_JOLIET = @HAVE_JOLIET@ HAVE_LINUX_CDROM = @HAVE_LINUX_CDROM@ HAVE_OS2_CDROM = @HAVE_OS2_CDROM@ HAVE_ROCK = @HAVE_ROCK@ HAVE_SOLARIS_CDROM = @HAVE_SOLARIS_CDROM@ HAVE_WIN32_CDROM = @HAVE_WIN32_CDROM@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDIOPP_LIBS = @LIBCDIOPP_LIBS@ LIBCDIO_CDDA_LIBS = @LIBCDIO_CDDA_LIBS@ LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ LIBCDIO_DEPS = @LIBCDIO_DEPS@ LIBCDIO_LIBS = @LIBCDIO_LIBS@ LIBCDIO_PARANOIA_LIBS = @LIBCDIO_PARANOIA_LIBS@ LIBCDIO_SOURCE_PATH = @LIBCDIO_SOURCE_PATH@ LIBCDIO_VERSION_NUM = @LIBCDIO_VERSION_NUM@ LIBICONV = @LIBICONV@ LIBISO9660PP_LIBS = @LIBISO9660PP_LIBS@ LIBISO9660_CFLAGS = @LIBISO9660_CFLAGS@ LIBISO9660_LIBS = @LIBISO9660_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBUDF_LIBS = @LIBUDF_LIBS@ LINUX_CDROM_TIMEOUT = @LINUX_CDROM_TIMEOUT@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_NO_UNDEFINED = @LT_NO_UNDEFINED@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OLD_CDPARANOIA = @OLD_CDPARANOIA@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SBPCD_H = @SBPCD_H@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TYPESIZES = @TYPESIZES@ UCDROM_H = @UCDROM_H@ VCDINFO_CFLAGS = @VCDINFO_CFLAGS@ VCDINFO_LIBS = @VCDINFO_LIBS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = -I$(top_srcdir)/include $(LIBCDIO_CFLAGS) cdtext_SOURCES = cdtext.cpp cdtext_DEPENDENCIES = $(LIBCDIO_DEPS) cdtext_LDADD = $(LIBCDIOPP_LIBS) $(LIBCDIO_LIBS) device_SOURCES = device.cpp device_DEPENDENCIES = $(LIBCDIO_DEPS) device_LDADD = $(LIBCDIOPP_LIBS) $(LIBCDIO_LIBS) drives_SOURCES = drives.cpp drives_DEPENDENCIES = $(LIBCDIO_DEPS) drives_LDADD = $(LIBCDIOPP_LIBS) $(LIBCDIO_LIBS) eject_SOURCES = eject.cpp eject_DEPENDENCIES = $(LIBCDIO_DEPS) eject_LDADD = $(LIBCDIOPP_LIBS) $(LIBCDIO_LIBS) isofile_SOURCES = isofile.cpp isofile_LDADD = $(LIBISO9660PP_LIBS) $(LIBISO9660_LIBS) \ $(LIBCDIOPP_LIBS) $(LTLIBICONV) isofile2_SOURCES = isofile2.cpp isofile2_LDADD = $(LIBISO9660PP_LIBS) $(LIBISO9660_LIBS) \ $(LIBCDIOPP_LIBS) $(LTLIBICONV) isolist_SOURCES = isolist.cpp isolist_LDADD = $(LIBISO9660PP_LIBS) $(LIBISO9660_LIBS) \ $(LIBCDIOPP_LIBS) $(LTLIBICONV) iso4_SOURCES = iso4.cpp iso4_LDADD = $(LIBISO9660PP_LIBS) $(LIBISO9660_LIBS) \ $(LIBCDIOPP_LIBS) $(LTLIBICONV) mmc1_SOURCES = mmc1.cpp mmc1_DEPENDENCIES = $(LIBCDIO_DEPS) mmc1_LDADD = $(LIBCDIOPP_LIBS) $(LIBCDIO_LIBS) mmc2_SOURCES = mmc2.cpp mmc2_DEPENDENCIES = $(LIBCDIO_DEPS) mmc2_LDADD = $(LIBCDIOPP_LIBS) $(LIBCDIO_LIBS) tracks_SOURCES = tracks.cpp tracks_LDADD = $(LIBCDIOPP_LIBS) $(LIBCDIO_LIBS) TESTS = $(check_PROGRAMS) all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu example/C++/OO/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu example/C++/OO/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list cdtext$(EXEEXT): $(cdtext_OBJECTS) $(cdtext_DEPENDENCIES) @rm -f cdtext$(EXEEXT) $(CXXLINK) $(cdtext_OBJECTS) $(cdtext_LDADD) $(LIBS) device$(EXEEXT): $(device_OBJECTS) $(device_DEPENDENCIES) @rm -f device$(EXEEXT) $(CXXLINK) $(device_OBJECTS) $(device_LDADD) $(LIBS) drives$(EXEEXT): $(drives_OBJECTS) $(drives_DEPENDENCIES) @rm -f drives$(EXEEXT) $(CXXLINK) $(drives_OBJECTS) $(drives_LDADD) $(LIBS) eject$(EXEEXT): $(eject_OBJECTS) $(eject_DEPENDENCIES) @rm -f eject$(EXEEXT) $(CXXLINK) $(eject_OBJECTS) $(eject_LDADD) $(LIBS) iso4$(EXEEXT): $(iso4_OBJECTS) $(iso4_DEPENDENCIES) @rm -f iso4$(EXEEXT) $(CXXLINK) $(iso4_OBJECTS) $(iso4_LDADD) $(LIBS) isofile$(EXEEXT): $(isofile_OBJECTS) $(isofile_DEPENDENCIES) @rm -f isofile$(EXEEXT) $(CXXLINK) $(isofile_OBJECTS) $(isofile_LDADD) $(LIBS) isofile2$(EXEEXT): $(isofile2_OBJECTS) $(isofile2_DEPENDENCIES) @rm -f isofile2$(EXEEXT) $(CXXLINK) $(isofile2_OBJECTS) $(isofile2_LDADD) $(LIBS) isolist$(EXEEXT): $(isolist_OBJECTS) $(isolist_DEPENDENCIES) @rm -f isolist$(EXEEXT) $(CXXLINK) $(isolist_OBJECTS) $(isolist_LDADD) $(LIBS) mmc1$(EXEEXT): $(mmc1_OBJECTS) $(mmc1_DEPENDENCIES) @rm -f mmc1$(EXEEXT) $(CXXLINK) $(mmc1_OBJECTS) $(mmc1_LDADD) $(LIBS) mmc2$(EXEEXT): $(mmc2_OBJECTS) $(mmc2_DEPENDENCIES) @rm -f mmc2$(EXEEXT) $(CXXLINK) $(mmc2_OBJECTS) $(mmc2_LDADD) $(LIBS) tracks$(EXEEXT): $(tracks_OBJECTS) $(tracks_DEPENDENCIES) @rm -f tracks$(EXEEXT) $(CXXLINK) $(tracks_OBJECTS) $(tracks_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdtext.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/device.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drives.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eject.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iso4.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isofile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isofile2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isolist.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmc1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmc2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tracks.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile $(PROGRAMS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool \ clean-noinstPROGRAMS ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libcdio-0.83/example/C++/README0000644000175000017500000000302011173054115012606 00000000000000$Id: README,v 1.4 2006/04/15 16:22:49 rocky Exp $ This directory contains some simple C++ examples of the use of the libcdio library. Descriptions of the programs in this example directory are as follows... device.cpp: A program to show drivers installed and what the default CD-ROM drive is and what CD drives are available. eject.cpp: A program eject a CD from a CD-ROM drive and then close the door again. isofile.cpp: A program to show using libiso9660 to extract a file from an ISO-9660 image. isofile2.cpp: A program to show using libiso9660 to extract a file from a CDRWIN cue/bin CD image. isolist.cpp: A program to show using libiso9660 to list files in a directory of an ISO-9660 image and give basic iso9660 information. mmc1.cpp: A program to show issuing a simple MMC command (INQUIRY). mmc2.cpp: A more involved MMC command to list features from a MMC GET_CONFIGURATION command. paranoia.cpp: A program to show using CD-DA paranoia (a library for jitter detection and audio-read error correction). This program uses an interface compatible (mostly) with cdparanoia. It looks for a CD-ROM with an audio CD in it and rips up to the first 300 sectors of track 1 to file track1s.wav. paranoia2.cpp: Another program to show using CD-DA paranoia using a more libcdio-oriented initialization. Probably more suited to things that otherwise use libcdio such as media players (e.g. for getting CDDB or CD-Text info) libcdio-0.83/example/C++/Makefile.in0000644000175000017500000007361511652210027014012 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 2005, 2006, 2008, 2009 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @BUILD_EXAMPLES_TRUE@noinst_PROGRAMS = device$(EXEEXT) eject$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ isofile$(EXEEXT) isofile2$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ isolist$(EXEEXT) mmc1$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ mmc2$(EXEEXT) $(am__EXEEXT_1) check_PROGRAMS = $(am__EXEEXT_2) subdir = example/C++ DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @BUILD_CD_PARANOIA_TRUE@am__EXEEXT_1 = paranoia$(EXEEXT) \ @BUILD_CD_PARANOIA_TRUE@ paranoia2$(EXEEXT) @BUILD_EXAMPLES_TRUE@am__EXEEXT_2 = device$(EXEEXT) eject$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ isofile$(EXEEXT) isofile2$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ isolist$(EXEEXT) mmc1$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ mmc2$(EXEEXT) $(am__EXEEXT_1) PROGRAMS = $(noinst_PROGRAMS) am_device_OBJECTS = device.$(OBJEXT) device_OBJECTS = $(am_device_OBJECTS) am__DEPENDENCIES_1 = am_eject_OBJECTS = eject.$(OBJEXT) eject_OBJECTS = $(am_eject_OBJECTS) am_isofile_OBJECTS = isofile.$(OBJEXT) isofile_OBJECTS = $(am_isofile_OBJECTS) isofile_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_isofile2_OBJECTS = isofile2.$(OBJEXT) isofile2_OBJECTS = $(am_isofile2_OBJECTS) isofile2_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_isolist_OBJECTS = isolist.$(OBJEXT) isolist_OBJECTS = $(am_isolist_OBJECTS) isolist_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_mmc1_OBJECTS = mmc1.$(OBJEXT) mmc1_OBJECTS = $(am_mmc1_OBJECTS) am_mmc2_OBJECTS = mmc2.$(OBJEXT) mmc2_OBJECTS = $(am_mmc2_OBJECTS) am__paranoia_SOURCES_DIST = paranoia.cpp @BUILD_CD_PARANOIA_TRUE@am_paranoia_OBJECTS = paranoia.$(OBJEXT) paranoia_OBJECTS = $(am_paranoia_OBJECTS) @BUILD_CD_PARANOIA_TRUE@paranoia_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @BUILD_CD_PARANOIA_TRUE@ $(am__DEPENDENCIES_1) \ @BUILD_CD_PARANOIA_TRUE@ $(am__DEPENDENCIES_1) am__paranoia2_SOURCES_DIST = paranoia.cpp @BUILD_CD_PARANOIA_TRUE@am_paranoia2_OBJECTS = paranoia.$(OBJEXT) paranoia2_OBJECTS = $(am_paranoia2_OBJECTS) @BUILD_CD_PARANOIA_TRUE@paranoia2_DEPENDENCIES = \ @BUILD_CD_PARANOIA_TRUE@ $(am__DEPENDENCIES_1) \ @BUILD_CD_PARANOIA_TRUE@ $(am__DEPENDENCIES_1) \ @BUILD_CD_PARANOIA_TRUE@ $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(device_SOURCES) $(eject_SOURCES) $(isofile_SOURCES) \ $(isofile2_SOURCES) $(isolist_SOURCES) $(mmc1_SOURCES) \ $(mmc2_SOURCES) $(paranoia_SOURCES) $(paranoia2_SOURCES) DIST_SOURCES = $(device_SOURCES) $(eject_SOURCES) $(isofile_SOURCES) \ $(isofile2_SOURCES) $(isolist_SOURCES) $(mmc1_SOURCES) \ $(mmc2_SOURCES) $(am__paranoia_SOURCES_DIST) \ $(am__paranoia2_SOURCES_DIST) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDDA_PLAYER_LIBS = @CDDA_PLAYER_LIBS@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CDPARANOIA_NAME = @CDPARANOIA_NAME@ CFLAGS = @CFLAGS@ CMP = @CMP@ COS_LIB = @COS_LIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_PKG_LIB_HACK = @DARWIN_PKG_LIB_HACK@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ DIFF_OPTS = @DIFF_OPTS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GIT2CL = @GIT2CL@ GREP = @GREP@ HAVE_BSDI_CDROM = @HAVE_BSDI_CDROM@ HAVE_DARWIN_CDROM = @HAVE_DARWIN_CDROM@ HAVE_FREEBSD_CDROM = @HAVE_FREEBSD_CDROM@ HAVE_JOLIET = @HAVE_JOLIET@ HAVE_LINUX_CDROM = @HAVE_LINUX_CDROM@ HAVE_OS2_CDROM = @HAVE_OS2_CDROM@ HAVE_ROCK = @HAVE_ROCK@ HAVE_SOLARIS_CDROM = @HAVE_SOLARIS_CDROM@ HAVE_WIN32_CDROM = @HAVE_WIN32_CDROM@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDIOPP_LIBS = @LIBCDIOPP_LIBS@ LIBCDIO_CDDA_LIBS = @LIBCDIO_CDDA_LIBS@ LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ LIBCDIO_DEPS = @LIBCDIO_DEPS@ LIBCDIO_LIBS = @LIBCDIO_LIBS@ LIBCDIO_PARANOIA_LIBS = @LIBCDIO_PARANOIA_LIBS@ LIBCDIO_SOURCE_PATH = @LIBCDIO_SOURCE_PATH@ LIBCDIO_VERSION_NUM = @LIBCDIO_VERSION_NUM@ LIBICONV = @LIBICONV@ LIBISO9660PP_LIBS = @LIBISO9660PP_LIBS@ LIBISO9660_CFLAGS = @LIBISO9660_CFLAGS@ LIBISO9660_LIBS = @LIBISO9660_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBUDF_LIBS = @LIBUDF_LIBS@ LINUX_CDROM_TIMEOUT = @LINUX_CDROM_TIMEOUT@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_NO_UNDEFINED = @LT_NO_UNDEFINED@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OLD_CDPARANOIA = @OLD_CDPARANOIA@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SBPCD_H = @SBPCD_H@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TYPESIZES = @TYPESIZES@ UCDROM_H = @UCDROM_H@ VCDINFO_CFLAGS = @VCDINFO_CFLAGS@ VCDINFO_LIBS = @VCDINFO_LIBS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ########################################################## # Sample C++ programs using libcdio (without OO wrapper) ######################################################### # SUBDIRS = OO @BUILD_CD_PARANOIA_TRUE@paranoia_progs = paranoia paranoia2 INCLUDES = -I$(top_srcdir) $(LIBCDIO_CFLAGS) device_DEPENDENCIES = $(LIBCDIO_DEPS) device_SOURCES = device.cpp device_LDADD = $(LIBCDIO_LIBS) eject_DEPENDENCIES = $(LIBCDIO_DEPS) eject_SOURCES = eject.cpp eject_LDADD = $(LIBCDIO_LIBS) @BUILD_CD_PARANOIA_TRUE@paranoia_SOURCES = paranoia.cpp @BUILD_CD_PARANOIA_TRUE@paranoia_LDADD = $(LIBCDIO_PARANOIA_LIBS) $(LIBCDIO_CDDA_LIBS) \ @BUILD_CD_PARANOIA_TRUE@ $(LIBCDIO_LIBS) @BUILD_CD_PARANOIA_TRUE@paranoia2_SOURCES = paranoia.cpp @BUILD_CD_PARANOIA_TRUE@paranoia2_LDADD = $(LIBCDIO_PARANOIA_LIBS) $(LIBCDIO_CDDA_LIBS) \ @BUILD_CD_PARANOIA_TRUE@ $(LIBCDIO_LIBS) isofile_SOURCES = isofile.cpp isofile_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) isofile2_SOURCES = isofile2.cpp isofile2_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) isolist_SOURCES = isolist.cpp isolist_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) mmc1_SOURCES = mmc1.cpp mmc1_DEPENDENCIES = $(LIBCDIO_DEPS) mmc1_LDADD = $(LIBCDIO_LIBS) mmc2_SOURCES = mmc2.cpp mmc2_DEPENDENCIES = $(LIBCDIO_DEPS) mmc2_LDADD = $(LIBCDIO_LIBS) TESTS = $(check_PROGRAMS) # iso programs create file "copying" MOSTLYCLEANFILES = copying *.wav all: all-recursive .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu example/C++/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu example/C++/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list device$(EXEEXT): $(device_OBJECTS) $(device_DEPENDENCIES) @rm -f device$(EXEEXT) $(CXXLINK) $(device_OBJECTS) $(device_LDADD) $(LIBS) eject$(EXEEXT): $(eject_OBJECTS) $(eject_DEPENDENCIES) @rm -f eject$(EXEEXT) $(CXXLINK) $(eject_OBJECTS) $(eject_LDADD) $(LIBS) isofile$(EXEEXT): $(isofile_OBJECTS) $(isofile_DEPENDENCIES) @rm -f isofile$(EXEEXT) $(CXXLINK) $(isofile_OBJECTS) $(isofile_LDADD) $(LIBS) isofile2$(EXEEXT): $(isofile2_OBJECTS) $(isofile2_DEPENDENCIES) @rm -f isofile2$(EXEEXT) $(CXXLINK) $(isofile2_OBJECTS) $(isofile2_LDADD) $(LIBS) isolist$(EXEEXT): $(isolist_OBJECTS) $(isolist_DEPENDENCIES) @rm -f isolist$(EXEEXT) $(CXXLINK) $(isolist_OBJECTS) $(isolist_LDADD) $(LIBS) mmc1$(EXEEXT): $(mmc1_OBJECTS) $(mmc1_DEPENDENCIES) @rm -f mmc1$(EXEEXT) $(CXXLINK) $(mmc1_OBJECTS) $(mmc1_LDADD) $(LIBS) mmc2$(EXEEXT): $(mmc2_OBJECTS) $(mmc2_DEPENDENCIES) @rm -f mmc2$(EXEEXT) $(CXXLINK) $(mmc2_OBJECTS) $(mmc2_LDADD) $(LIBS) paranoia$(EXEEXT): $(paranoia_OBJECTS) $(paranoia_DEPENDENCIES) @rm -f paranoia$(EXEEXT) $(CXXLINK) $(paranoia_OBJECTS) $(paranoia_LDADD) $(LIBS) paranoia2$(EXEEXT): $(paranoia2_OBJECTS) $(paranoia2_DEPENDENCIES) @rm -f paranoia2$(EXEEXT) $(CXXLINK) $(paranoia2_OBJECTS) $(paranoia2_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/device.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eject.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isofile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isofile2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isolist.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmc1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmc2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/paranoia.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-recursive all-am: Makefile $(PROGRAMS) installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \ ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool \ clean-noinstPROGRAMS ctags ctags-recursive distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libcdio-0.83/example/cdtext.c0000644000175000017500000000524511544134623013075 00000000000000/* Copyright (C) 2004, 2005, 2006, 2008, 2009, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Simple program to list CD-Text info of a Compact Disc using libcdio. See also corresponding C++ programs of similar names. */ #include #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #include static void print_cdtext_track_info(CdIo_t *p_cdio, track_t i_track, const char *psz_msg) { const cdtext_t *cdtext = cdio_get_cdtext(p_cdio, i_track); if (NULL != cdtext) { cdtext_field_t i; printf("%s\n", psz_msg); for (i=0; i < MAX_CDTEXT_FIELDS; i++) { if (cdtext->field[i]) { printf("\t%s: %s\n", cdtext_field2str(i), cdtext->field[i]); } } } } static void print_disc_info(CdIo_t *p_cdio, track_t i_tracks, track_t i_first_track) { track_t i_last_track = i_first_track+i_tracks; discmode_t cd_discmode = cdio_get_discmode(p_cdio); printf("%s\n", discmode2str[cd_discmode]); print_cdtext_track_info(p_cdio, 0, "\nCD-Text for Disc:"); for ( ; i_first_track < i_last_track; i_first_track++ ) { char psz_msg[50]; snprintf(psz_msg, sizeof(psz_msg), "CD-Text for Track %d:", i_first_track); print_cdtext_track_info(p_cdio, i_first_track, psz_msg); } } int main(int argc, const char *argv[]) { track_t i_first_track; track_t i_tracks; CdIo_t *p_cdio = cdio_open ("../test/cdda.cue", DRIVER_BINCUE); if (NULL == p_cdio) { printf("Couldn't open ../test/cdda.cue with BIN/CUE driver.\n"); } else { i_first_track = cdio_get_first_track_num(p_cdio); i_tracks = cdio_get_num_tracks(p_cdio); print_disc_info(p_cdio, i_tracks, i_first_track); cdio_destroy(p_cdio); } p_cdio = cdio_open (NULL, DRIVER_DEVICE); i_first_track = cdio_get_first_track_num(p_cdio); i_tracks = cdio_get_num_tracks(p_cdio); if (NULL == p_cdio) { printf("Couldn't find CD\n"); return 77; } else { print_disc_info(p_cdio, i_tracks, i_first_track); } cdio_destroy(p_cdio); return 0; } libcdio-0.83/example/isofuzzy.c0000644000175000017500000000456311400616514013501 00000000000000/* Copyright (C) 2005, 2008, 2009 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Program to show using libiso9660 with fuzzy search to get file info. If a single argument is given, it is used as the ISO 9660 image. Otherwise we use a compiled-in default ISO 9660 image name. */ /* This is the BIN we think there is an ISO 9660 image inside of. */ #define ISO9660_IMAGE_PATH "/tmp/" #define ISO9660_IMAGE ISO9660_IMAGE_PATH "vcd_demo.bin" /* portable.h has to come first else _FILE_OFFSET_BITS are redefined in say opensolaris. */ #include "portable.h" #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif int main(int argc, const char *argv[]) { CdioList_t *entlist; CdioListNode_t *entnode; char const *psz_fname; iso9660_t *p_iso; if (argc > 1) psz_fname = argv[1]; else psz_fname = ISO9660_IMAGE; p_iso = iso9660_open_fuzzy (psz_fname, 5); if (NULL == p_iso) { fprintf(stderr, "Sorry, could not find an ISO 9660 image from %s\n", psz_fname); return 1; } entlist = iso9660_ifs_readdir (p_iso, "/"); /* Iterate over the list of nodes that iso9660_ifs_readdir gives */ if (entlist) { _CDIO_LIST_FOREACH (entnode, entlist) { char filename[4096]; iso9660_stat_t *p_statbuf = (iso9660_stat_t *) _cdio_list_node_data (entnode); iso9660_name_translate(p_statbuf->filename, filename); printf ("/%s\n", filename); } _cdio_list_free (entlist, true); } iso9660_close(p_iso); exit(0); } libcdio-0.83/example/eject.c0000644000175000017500000000541311313260160012657 00000000000000/* $Id: eject.c,v 1.5 2008/03/24 15:30:55 karl Exp $ Copyright (C) 2005, 2006, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Simple program to eject a CD-ROM drive door and then close it again. If a single argument is given, it is used as the CD-ROM device to eject/close. Otherwise a CD-ROM drive will be scanned for. See also corresponding C++ program of a similar name. */ #include #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif int main(int argc, const char *argv[]) { driver_return_code_t ret; driver_id_t driver_id = DRIVER_DEVICE; char *psz_drive = NULL; if (argc > 1) psz_drive = strdup(argv[1]); if (!psz_drive) { psz_drive = cdio_get_default_device_driver(&driver_id); if (!psz_drive) { printf("Can't find a CD-ROM to eject\n"); exit(1); } } ret = cdio_eject_media_drive(psz_drive); switch(ret) { case DRIVER_OP_UNSUPPORTED: printf("Eject not supported for %s.\n", psz_drive); break; case DRIVER_OP_SUCCESS: printf("CD-ROM drive %s ejected.\n", psz_drive); break; default: printf("Eject of CD-ROM drive %s failed.\n", psz_drive); break; } if (DRIVER_OP_SUCCESS == cdio_close_tray(psz_drive, &driver_id)) { printf("Closed tray of CD-ROM drive %s.\n", psz_drive); } else { printf("Closing tray of CD-ROM drive %s failed.\n", psz_drive); } free(psz_drive); ret = cdio_eject_media_drive(NULL); switch(ret) { case DRIVER_OP_UNSUPPORTED: printf("Eject not supported for default device.\n"); break; case DRIVER_OP_SUCCESS: printf("CD-ROM drive ejected for default device.\n"); break; default: printf("Eject of CD-ROM drive failed for default device.\n"); break; } driver_id = DRIVER_DEVICE; if (DRIVER_OP_SUCCESS == cdio_close_tray(NULL, &driver_id)) { printf("Closed tray of CD-ROM drive for default disc driver:\n\t%s\n", cdio_driver_describe(driver_id)); } else { printf("Closing tray of CD-ROM drive failed for default " "disc driver:\n\t%s\n", cdio_driver_describe(driver_id)); } return 0; } libcdio-0.83/example/sample3.c0000644000175000017500000001325011647674500013150 00000000000000/* Copyright (C) 2003, 2005, 2008, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* A somewhat simplified program to show the use of cdio_guess_cd_type(). Figure out the kind of CD image we've got. */ #include #include #include #include #include static void print_analysis(cdio_iso_analysis_t cdio_iso_analysis, cdio_fs_anal_t fs, int first_data, unsigned int num_audio) { switch(CDIO_FSTYPE(fs)) { case CDIO_FS_AUDIO: break; case CDIO_FS_ISO_9660: printf("CD-ROM with ISO 9660 filesystem"); if (fs & CDIO_FS_ANAL_JOLIET) { printf(" and joliet extension level %d", cdio_iso_analysis.joliet_level); } if (fs & CDIO_FS_ANAL_ROCKRIDGE) printf(" and rockridge extensions"); printf("\n"); break; case CDIO_FS_ISO_9660_INTERACTIVE: printf("CD-ROM with CD-RTOS and ISO 9660 filesystem\n"); break; case CDIO_FS_HIGH_SIERRA: printf("CD-ROM with High Sierra filesystem\n"); break; case CDIO_FS_INTERACTIVE: printf("CD-Interactive%s\n", num_audio > 0 ? "/Ready" : ""); break; case CDIO_FS_HFS: printf("CD-ROM with Macintosh HFS\n"); break; case CDIO_FS_ISO_HFS: printf("CD-ROM with both Macintosh HFS and ISO 9660 filesystem\n"); break; case CDIO_FS_UFS: printf("CD-ROM with Unix UFS\n"); break; case CDIO_FS_EXT2: printf("CD-ROM with Linux second extended filesystem\n"); break; case CDIO_FS_3DO: printf("CD-ROM with Panasonic 3DO filesystem\n"); break; case CDIO_FS_UNKNOWN: printf("CD-ROM with unknown filesystem\n"); break; } switch(CDIO_FSTYPE(fs)) { case CDIO_FS_ISO_9660: case CDIO_FS_ISO_9660_INTERACTIVE: case CDIO_FS_ISO_HFS: printf("ISO 9660: %i blocks, label `%.32s'\n", cdio_iso_analysis.isofs_size, cdio_iso_analysis.iso_label); break; } if (first_data == 1 && num_audio > 0) printf("mixed mode CD "); if (fs & CDIO_FS_ANAL_XA) printf("XA sectors "); if (fs & CDIO_FS_ANAL_MULTISESSION) printf("Multisession"); if (fs & CDIO_FS_ANAL_HIDDEN_TRACK) printf("Hidden Track "); if (fs & CDIO_FS_ANAL_PHOTO_CD) printf("%sPhoto CD ", num_audio > 0 ? " Portfolio " : ""); if (fs & CDIO_FS_ANAL_CDTV) printf("Commodore CDTV "); if (first_data > 1) printf("CD-Plus/Extra "); if (fs & CDIO_FS_ANAL_BOOTABLE) printf("bootable CD "); if (fs & CDIO_FS_ANAL_VIDEOCD && num_audio == 0) { printf("Video CD "); } if (fs & CDIO_FS_ANAL_SVCD) printf("Super Video CD (SVCD) or Chaoji Video CD (CVD)"); if (fs & CDIO_FS_ANAL_CVD) printf("Chaoji Video CD (CVD)"); printf("\n"); } int main(int argc, const char *argv[]) { CdIo_t *p_cdio = cdio_open (NULL, DRIVER_UNKNOWN); cdio_fs_anal_t fs=0; track_t num_tracks; track_t first_track_num; lsn_t start_track; /* first sector of track */ lsn_t data_start =0; /* start of data area */ int first_data = -1; /* # of first data track */ int first_audio = -1; /* # of first audio track */ unsigned int num_data = 0; /* # of data tracks */ unsigned int num_audio = 0; /* # of audio tracks */ unsigned int i; if (NULL == p_cdio) { printf("Problem in trying to find a driver.\n\n"); return 1; } first_track_num = cdio_get_first_track_num(p_cdio); num_tracks = cdio_get_num_tracks(p_cdio); /* Count the number of data and audio tracks. */ for (i = first_track_num; i <= num_tracks; i++) { if (TRACK_FORMAT_AUDIO == cdio_get_track_format(p_cdio, i)) { num_audio++; if (-1 == first_audio) first_audio = i; } else { num_data++; if (-1 == first_data) first_data = i; } } /* try to find out what sort of CD we have */ if (0 == num_data) { printf("Audio CD\n"); } else { /* we have data track(s) */ int j; cdio_iso_analysis_t cdio_iso_analysis; memset(&cdio_iso_analysis, 0, sizeof(cdio_iso_analysis)); for (j = 2, i = first_data; i <= num_tracks; i++) { lsn_t lsn; track_format_t track_format = cdio_get_track_format(p_cdio, i); lsn = cdio_get_track_lsn(p_cdio, i); switch ( track_format ) { case TRACK_FORMAT_AUDIO: case TRACK_FORMAT_ERROR: break; case TRACK_FORMAT_CDI: case TRACK_FORMAT_XA: case TRACK_FORMAT_DATA: case TRACK_FORMAT_PSX: ; } start_track = (i == 1) ? 0 : lsn; /* save the start of the data area */ if (i == first_data) data_start = start_track; /* skip tracks which belong to the current walked session */ if (start_track < data_start + cdio_iso_analysis.isofs_size) continue; fs = cdio_guess_cd_type(p_cdio, start_track, i, &cdio_iso_analysis); print_analysis(cdio_iso_analysis, fs, first_data, num_audio); if ( !(CDIO_FSTYPE(fs) == CDIO_FS_ISO_9660 || CDIO_FSTYPE(fs) == CDIO_FS_ISO_HFS || CDIO_FSTYPE(fs) == CDIO_FS_ISO_9660_INTERACTIVE) ) /* no method for non-ISO9660 multisessions */ break; } } cdio_destroy(p_cdio); return 0; } libcdio-0.83/example/audio.c0000644000175000017500000002713611570772032012707 00000000000000/* Copyright (C) 2005, 2008, 2009 Rocky Bernstein Adapted from Gerd Knorr's player.c program Copyright (C) 1997, 1998 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* A program to show use of audio controls. For a more expanded CDDA player program using curses display see cdda-player in this distribution. */ #include #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_STRING_H #include #endif #include #include #ifdef HAVE_GETOPT_H #include #endif #ifdef HAVE_ERRNO_H #include #endif #include #include #include static bool play_track(track_t t1, track_t t2); static CdIo_t *p_cdio = NULL; /* libcdio handle */ static driver_id_t driver_id = DRIVER_DEVICE; /* cdrom data */ static track_t i_first_track; static track_t i_last_track; static track_t i_first_audio_track; static track_t i_last_audio_track; static track_t i_tracks; static msf_t toc[CDIO_CDROM_LEADOUT_TRACK+1]; static cdio_subchannel_t sub; /* subchannel last time read */ static int i_data; /* # of data tracks present ? */ static int start_track = 0; static int stop_track = 0; static int one_track = 0; static bool b_cd = false; static bool auto_mode = false; static bool b_verbose = false; static bool debug = false; static bool b_record = false; /* we have a record for the inserted CD */ static char *psz_device=NULL; static char *psz_program; inline static void xperror(const char *psz_msg) { if (b_verbose) { fprintf(stderr, "error: "); perror(psz_msg); } return; } static void oops(const char *psz_msg, int rc) { cdio_destroy (p_cdio); free (psz_device); exit (rc); } /* ---------------------------------------------------------------------- */ /*! Stop playing audio CD */ static bool cd_stop(CdIo_t *p_cdio) { bool b_ok = true; if (b_cd && p_cdio) { i_last_audio_track = CDIO_INVALID_TRACK; b_ok = DRIVER_OP_SUCCESS == cdio_audio_stop(p_cdio); if ( !b_ok ) xperror("stop"); } return b_ok; } /*! Eject CD */ static bool cd_eject(void) { bool b_ok = true; if (p_cdio) { cd_stop(p_cdio); b_ok = DRIVER_OP_SUCCESS == cdio_eject_media(&p_cdio); if (!b_ok) xperror("eject"); b_cd = false; p_cdio = NULL; } return b_ok; } /*! Close CD tray */ static bool cd_close(const char *psz_device) { bool b_ok = true; if (!b_cd) { b_ok = DRIVER_OP_SUCCESS == cdio_close_tray(psz_device, &driver_id); if (!b_ok) xperror("close"); } return b_ok; } /*! Pause playing audio CD */ static bool cd_pause(CdIo_t *p_cdio) { bool b_ok = true; if (sub.audio_status == CDIO_MMC_READ_SUB_ST_PLAY) { b_ok = DRIVER_OP_SUCCESS == cdio_audio_pause(p_cdio); if (!b_ok) xperror("pause"); } return b_ok; } /*! Get status/track/position info of an audio CD */ static bool read_subchannel(CdIo_t *p_cdio) { bool b_ok = true; if (!b_cd) return false; b_ok = DRIVER_OP_SUCCESS == cdio_audio_read_subchannel(p_cdio, &sub); if (!b_ok) { xperror("read subchannel"); b_cd = 0; } if (auto_mode && sub.audio_status == CDIO_MMC_READ_SUB_ST_COMPLETED) cd_eject(); return b_ok; } /*! Read CD TOC and set CD information. */ static void read_toc(CdIo_t *p_cdio) { track_t i; i_first_track = cdio_get_first_track_num(p_cdio); i_last_track = cdio_get_last_track_num(p_cdio); i_tracks = cdio_get_num_tracks(p_cdio); i_first_audio_track = i_first_track; i_last_audio_track = i_last_track; if ( CDIO_INVALID_TRACK == i_first_track || CDIO_INVALID_TRACK == i_last_track ) { xperror("read toc header"); b_cd = false; b_record = false; } else { b_cd = true; i_data = 0; for (i = i_first_track; i <= i_last_track+1; i++) { if ( !cdio_get_track_msf(p_cdio, i, &(toc[i])) ) { xperror("read toc entry"); b_cd = false; return; } if ( TRACK_FORMAT_AUDIO != cdio_get_track_format(p_cdio, i) ) { if ((i != i_last_track+1) ) { i_data++; if (i == i_first_track) { if (i == i_last_track) i_first_audio_track = CDIO_CDROM_LEADOUT_TRACK; else i_first_audio_track++; } } } } b_record = true; read_subchannel(p_cdio); if (auto_mode && sub.audio_status != CDIO_MMC_READ_SUB_ST_PLAY) play_track(1, CDIO_CDROM_LEADOUT_TRACK); } } /*! Play an audio track. */ static bool play_track(track_t i_start_track, track_t i_end_track) { bool b_ok = true; if (!b_cd) { cd_close(psz_device); read_toc(p_cdio); } read_subchannel(p_cdio); if (!b_cd || i_first_track == CDIO_CDROM_LEADOUT_TRACK) return false; if (debug) fprintf(stderr,"play tracks: %d-%d => ", i_start_track, i_end_track); if (i_start_track < i_first_track) i_start_track = i_first_track; if (i_start_track > i_last_audio_track) i_start_track = i_last_audio_track; if (i_end_track < i_first_track) i_end_track = i_first_track; if (i_end_track > i_last_audio_track) i_end_track = i_last_audio_track; if (debug) fprintf(stderr,"%d-%d\n",i_start_track, i_end_track); cd_pause(p_cdio); b_ok = (DRIVER_OP_SUCCESS == cdio_audio_play_msf(p_cdio, &(toc[i_start_track]), &(toc[i_end_track])) ); if (!b_ok) xperror("play"); return b_ok; } static void usage(char *prog) { fprintf(stderr, "%s is a simple interface to issuing CD audio comamnds\n" "\n" "usage: %s [options] [device]\n" "\n" "default for to search for a CD-ROM device with a CD-DA loaded\n" "\n" "These command line options available:\n" " -h print this help\n" " -a start up in auto-mode\n" " -v verbose\n" "\n" " Use only one of these:\n" " -C close CD-ROM tray. If you use this option,\n" " a CD-ROM device name must be specified.\n" " -p play the whole CD\n" " -t n play track >n<\n" " -t a-b play all tracks between a and b (inclusive)\n" " -L set volume level\n" " -s stop playing\n" " -S list audio subchannel information\n" " -e eject cdrom\n" "\n" "That's all. Oh, maybe a few words more about the auto-mode. This\n" "is the 'dont-touch-any-key' feature. You load a CD, player starts\n" "to play it, and when it is done it ejects the CD. Start it that\n" "way on a spare console and forget about it...\n" "\n" "(c) 1997,98 Gerd Knorr \n" "(c) 2005 Rocky Bernstein \n" , prog, prog); } typedef enum { NO_OP=0, PLAY_CD=1, PLAY_TRACK=2, STOP_PLAYING=3, EJECT_CD=4, CLOSE_CD=5, SET_VOLUME=6, LIST_SUBCHANNEL=7, } cd_operation_t; int main(int argc, char *argv[]) { int c, nostop=0; char *h; int i_rc = 0; int i_volume_level = -1; cd_operation_t todo = NO_OP; /* operation to do in non-interactive mode */ psz_program = strrchr(argv[0],'/'); psz_program = psz_program ? psz_program+1 : argv[0]; /* parse options */ while ( 1 ) { if (-1 == (c = getopt(argc, argv, "aCdehkpL:sSt:vx"))) break; switch (c) { case 'v': b_verbose = true; break; case 'd': debug = 1; break; case 'a': auto_mode = 1; break; case 'L': if (NULL != (h = strchr(optarg,'-'))) { i_volume_level = atoi(optarg); todo = SET_VOLUME; } break; case 't': if (NULL != (h = strchr(optarg,'-'))) { *h = 0; start_track = atoi(optarg); stop_track = atoi(h+1)+1; if (0 == start_track) start_track = 1; if (1 == stop_track) stop_track = CDIO_CDROM_LEADOUT_TRACK; } else { start_track = atoi(optarg); stop_track = start_track+1; one_track = 1; } todo = PLAY_TRACK; break; case 'p': todo = PLAY_CD; break; case 'C': todo = CLOSE_CD; break; break; case 's': todo = STOP_PLAYING; break; case 'S': todo = LIST_SUBCHANNEL; break; case 'e': todo = EJECT_CD; break; case 'h': usage(psz_program); exit(1); default: usage(psz_program); exit(1); } } if (argc > optind) { psz_device = strdup(argv[optind]); } else { char **ppsz_cdda_drives=NULL; char **ppsz_all_cd_drives = cdio_get_devices_ret(&driver_id); if (!ppsz_all_cd_drives) { fprintf(stderr, "Can't find a CD-ROM drive\n"); exit(2); } ppsz_cdda_drives = cdio_get_devices_with_cap(ppsz_all_cd_drives, CDIO_FS_AUDIO, false); if (!ppsz_cdda_drives || !ppsz_cdda_drives[0]) { fprintf(stderr, "Can't find a CD-ROM drive with a CD-DA in it\n"); exit(3); } psz_device = strdup(ppsz_cdda_drives[0]); cdio_free_device_list(ppsz_all_cd_drives); cdio_free_device_list(ppsz_cdda_drives); } if (!b_cd && todo != EJECT_CD) { cd_close(psz_device); } /* open device */ if (b_verbose) fprintf(stderr,"open %s... ", psz_device); p_cdio = cdio_open (psz_device, driver_id); if (!p_cdio) { if (b_verbose) fprintf(stderr, "error: %s\n", strerror(errno)); else fprintf(stderr, "open %s: %s\n", psz_device, strerror(errno)); exit(1); } else if (b_verbose) fprintf(stderr,"ok\n"); { nostop=1; if (EJECT_CD == todo) { i_rc = cd_eject() ? 0 : 1; } else { read_toc(p_cdio); if (!b_cd) { cd_close(psz_device); read_toc(p_cdio); } if (b_cd) switch (todo) { case NO_OP: break; case STOP_PLAYING: i_rc = cd_stop(p_cdio) ? 0 : 1; break; case EJECT_CD: /* Should have been handled above. */ cd_eject(); break; case PLAY_TRACK: /* play just this one track */ play_track(start_track, stop_track); break; case PLAY_CD: play_track(1,CDIO_CDROM_LEADOUT_TRACK); break; case CLOSE_CD: i_rc = cdio_close_tray(psz_device, NULL) ? 0 : 1; break; case SET_VOLUME: { cdio_audio_volume_t volume; volume.level[0] = i_volume_level; i_rc = (DRIVER_OP_SUCCESS == cdio_audio_set_volume(p_cdio, &volume)) ? 0 : 1; break; } case LIST_SUBCHANNEL: if (read_subchannel(p_cdio)) { if (sub.audio_status == CDIO_MMC_READ_SUB_ST_PAUSED || sub.audio_status == CDIO_MMC_READ_SUB_ST_PLAY) { { printf("track %2d - %02x:%02x (%02x:%02x abs) ", sub.track, sub.rel_addr.m, sub.rel_addr.s, sub.abs_addr.m, sub.abs_addr.s); } } printf("drive state: %s\n", mmc_audio_state2str(sub.audio_status)); } else { i_rc = 1; } break; } else { fprintf(stderr,"no CD in drive (%s)\n", psz_device); } } } if (!nostop) cd_stop(p_cdio); oops("bye", i_rc); return 0; /* keep compiler happy */ } libcdio-0.83/example/Makefile.am0000644000175000017500000000676311313260160013466 00000000000000# Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 # Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . #################################################### # Sample programs #################################################### # if ENABLE_CPP SUBDIRS = C++ endif if BUILD_CD_PARANOIA paranoia_progs = paranoia paranoia2 endif if BUILD_EXAMPLES noinst_PROGRAMS = audio cdchange cdtext device drives eject \ isofile isofile2 isofuzzy isolist isolsn \ mmc1 mmc2 mmc2a mmc3 $(paranoia_progs) tracks \ sample3 sample4 udf1 udffile cdio-eject endif INCLUDES = -I$(top_srcdir) $(LIBCDIO_CFLAGS) audio_DEPENDENCIES = $(LIBCDIO_DEPS) audio_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) cdchange_DEPENDENCIES = $(LIBCDIO_DEPS) cdchange_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) cdtext_DEPENDENCIES = $(LIBCDIO_DEPS) cdtext_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) device_DEPENDENCIES = $(LIBCDIO_DEPS) device_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) drives_DEPENDENCIES = $(LIBCDIO_DEPS) drives_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) eject_DEPENDENCIES = $(LIBCDIO_DEPS) eject_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) cdio_eject_DEPENDENCIES = $(LIBCDIO_DEPS) cdio_eject_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) if BUILD_CD_PARANOIA paranoia_LDADD = $(LIBCDIO_PARANOIA_LIBS) $(LIBCDIO_CDDA_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) paranoia2_LDADD = $(LIBCDIO_PARANOIA_LIBS) $(LIBCDIO_CDDA_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) endif isofile_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) isofile2_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) isofuzzy_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) isolist_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) isolsn_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) mmc1_DEPENDENCIES = $(LIBCDIO_DEPS) mmc1_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) mmc2_DEPENDENCIES = $(LIBCDIO_DEPS) mmc2_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) mmc2a_DEPENDENCIES = $(LIBCDIO_DEPS) mmc2a_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) mmc3_DEPENDENCIES = $(LIBCDIO_DEPS) mmc3_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) sample3_DEPENDENCIES = $(LIBCDIO_DEPS) sample3_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) sample4_DEPENDENCIES = $(LIBCDIO_DEPS) sample4_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) tracks_DEPENDENCIES = $(LIBCDIO_DEPS) tracks_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) udf1_DEPENDENCIES = $(LIBUDF_LIBS) $(LIBCDIO_DEPS) udf1_LDADD = $(LIBUDF_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) udffile_DEPENDENCIES = $(LIBUDF_LIBS) $(LIBCDIO_DEPS) udffile_LDADD = $(LIBUDF_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) check_PROGRAMS = cdtext device drives \ mmc1 mmc2 mmc2a mmc3 $(paranoia_progs) sample4 TESTS = $(check_PROGRAMS) # iso programs create file "copying" MOSTLYCLEANFILES = copying *.wav libcdio-0.83/example/cdchange.c0000644000175000017500000000473011650126753013337 00000000000000/* Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* config.h has to come first else _FILE_OFFSET_BITS are redefined in say opensolaris. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include /* Test media changed */ #include #ifdef HAVE_LIMITS_H #include #endif #ifdef HAVE_STDLIB_H # include #endif #ifdef HAVE_STRING_H # include #endif #ifdef HAVE_UNISTD_H # include #endif #ifdef HAVE_ERRNO_H # include #endif #ifdef HAVE_WINDOWS_H # include #endif #ifndef HAVE_USLEEP #error usleep() unimplemented #endif int main(int argc, const char *argv[]) { CdIo_t *p_cdio; unsigned long i_sleep_ms = (30 * 1000000); if (argc > 1) { p_cdio = cdio_open (argv[1], DRIVER_DEVICE); if (argc > 2) { errno = 0; i_sleep_ms = strtol(argv[2], (char **)NULL, 10) * 1000000; if ( (LONG_MIN == i_sleep_ms || LONG_MAX == i_sleep_ms) && errno != 0 ) { printf("Invalid sleep parameter %s\n", argv[2]); printf("Error reported back from strtol: %s\n", strerror(errno)); return 2; } } } else { p_cdio = cdio_open (NULL, DRIVER_DEVICE); } if (NULL == p_cdio) { printf("Couldn't find a driver.. leaving.\n"); return 1; } if (cdio_get_media_changed(p_cdio)) printf("Initial media status: changed\n"); else printf("Initial media status: not changed\n"); printf("Giving you %g seconds to change CD if you want to do so.\n", i_sleep_ms / 1000000.0); { int i_ret = usleep(i_sleep_ms); if (0 != i_ret) fprintf(stderr, "Something went wrong with usleep\n"); } if (cdio_get_media_changed(p_cdio)) printf("Media status: changed\n"); else printf("Media status: not changed\n"); cdio_destroy(p_cdio); return 0; } libcdio-0.83/example/paranoia.c0000644000175000017500000001220711650127202013361 00000000000000/* Copyright (C) 2005, 2006, 2008, 2009, 2010, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Simple program to show using libcdio's version of the CD-DA paranoia. library. */ /* config.h has to come first else _FILE_OFFSET_BITS are redefined in say opensolaris. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #include #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_SYS_STAT_H #include #endif #include static void put_num(long int num, int f, int bytes) { unsigned int i; unsigned char c; for (i=0; bytes--; i++) { c = (num >> (i<<3)) & 0xff; if (write(f, &c, 1)==-1) { perror("Could not write to output."); exit(1); } } } #define writestr(fd, s) \ write(fd, s, sizeof(s)-1) /* Subtract 1 for trailing '\0'. */ /* Write a the header for a WAV file. */ static void write_WAV_header(int fd, int32_t i_bytecount){ ssize_t bytes_ret; /* quick and dirty */ bytes_ret = writestr(fd, "RIFF"); /* 0-3 */ put_num(i_bytecount+44-8, fd, 4); /* 4-7 */ bytes_ret = writestr(fd, "WAVEfmt "); /* 8-15 */ put_num(16, fd, 4); /* 16-19 */ put_num(1, fd, 2); /* 20-21 */ put_num(2, fd, 2); /* 22-23 */ put_num(44100, fd, 4); /* 24-27 */ put_num(44100*2*2, fd, 4); /* 28-31 */ put_num(4, fd, 2); /* 32-33 */ put_num(16, fd, 2); /* 34-35 */ bytes_ret = writestr(fd, "data"); /* 36-39 */ put_num(i_bytecount, fd, 4); /* 40-43 */ } int main(int argc, const char *argv[]) { cdrom_drive_t *d = NULL; /* Place to store handle given by cd-paranoia. */ char **ppsz_cd_drives; /* List of all drives with a loaded CDDA in it. */ /* See if we can find a device with a loaded CD-DA in it. */ ppsz_cd_drives = cdio_get_devices_with_cap(NULL, CDIO_FS_AUDIO, false); if (ppsz_cd_drives) { /* Found such a CD-ROM with a CD-DA loaded. Use the first drive in the list. */ d=cdda_identify(*ppsz_cd_drives, 1, NULL); } else { printf("Unable find or access a CD-ROM drive with an audio CD in it.\n"); exit(77); } /* Don't need a list of CD's with CD-DA's any more. */ cdio_free_device_list(ppsz_cd_drives); if ( !d ) { printf("Unable to identify audio CD disc.\n"); exit(77); } /* We'll set for verbose paranoia messages. */ cdda_verbose_set(d, CDDA_MESSAGE_PRINTIT, CDDA_MESSAGE_PRINTIT); if ( 0 != cdda_open(d) ) { printf("Unable to open disc.\n"); exit(77); } /* Okay now set up to read up to the first 300 frames of the first audio track of the Audio CD. */ { cdrom_paranoia_t *p = paranoia_init(d); lsn_t i_first_lsn = cdda_disc_firstsector(d); if ( -1 == i_first_lsn ) { printf("Trouble getting starting LSN\n"); } else { lsn_t i_cursor; ssize_t bytes_ret; track_t i_track = cdda_sector_gettrack(d, i_first_lsn); lsn_t i_last_lsn = cdda_track_lastsector(d, i_track); int fd = creat("track1s.wav", 0644); if (-1 == fd) { printf("Unable to create track1s.wav\n"); exit(1); } /* For demo purposes we'll read only 300 frames (about 4 seconds). We don't want this to take too long. On the other hand, I suppose it should be something close to a real test. */ if ( i_last_lsn - i_first_lsn > 300) i_last_lsn = i_first_lsn + 299; printf("Reading track %d from LSN %ld to LSN %ld\n", i_track, (long int) i_first_lsn, (long int) i_last_lsn); /* Set reading mode for full paranoia, but allow skipping sectors. */ paranoia_modeset(p, PARANOIA_MODE_FULL^PARANOIA_MODE_NEVERSKIP); paranoia_seek(p, i_first_lsn, SEEK_SET); write_WAV_header(fd, (i_last_lsn-i_first_lsn+1) * CDIO_CD_FRAMESIZE_RAW); for ( i_cursor = i_first_lsn; i_cursor <= i_last_lsn; i_cursor ++) { /* read a sector */ int16_t *p_readbuf=paranoia_read(p, NULL); char *psz_err=cdda_errors(d); char *psz_mes=cdda_messages(d); if (psz_mes || psz_err) printf("%s%s\n", psz_mes ? psz_mes: "", psz_err ? psz_err: ""); free(psz_err); free(psz_mes); if( !p_readbuf ) { printf("paranoia read error. Stopping.\n"); break; } bytes_ret = write(fd, p_readbuf, CDIO_CD_FRAMESIZE_RAW); } close(fd); } paranoia_free(p); } cdda_close(d); exit(0); } libcdio-0.83/example/isolsn.c0000644000175000017500000000471411650127041013103 00000000000000/* Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Simple program to show using libiso9660 to get a file path for a given LSN of an ISO-9660 image. If a single argument is given, it is used as the LSN to search for. Otherwise we use a built-in default value. If a second argument is given, it is ISO 9660 image to use in the listing. Otherwise a compiled-in default ISO 9660 image name (that comes with the libcdio distribution) will be used. */ /* Set up a CD-DA image to test on which is in the libcdio distribution. */ #define ISO9660_IMAGE_PATH "../test/" #define ISO9660_IMAGE ISO9660_IMAGE_PATH "copying.iso" #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #include #include #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #define print_vd_info(title, fn) \ if (fn(p_iso, &psz_str)) { \ printf(title ": %s\n", psz_str); \ } \ free(psz_str); \ psz_str = NULL; int main(int argc, const char *argv[]) { char const *psz_fname; iso9660_t *p_iso; lsn_t lsn = 24; char *psz_path = NULL; if (argc > 1) lsn = strtol(argv[1], (char **)NULL, 10); if (argc > 2) psz_fname = argv[2]; else psz_fname = ISO9660_IMAGE; p_iso = iso9660_open (psz_fname); if (NULL == p_iso) { fprintf(stderr, "Sorry, couldn't open %s as an ISO-9660 image\n", psz_fname); return 1; } iso9660_ifs_find_lsn_with_path (p_iso, lsn, &psz_path); if (psz_path != NULL) { printf("File at LSN %u is %s\n", lsn, psz_path); free(psz_path); } iso9660_close(p_iso); return 0; } libcdio-0.83/example/cdio-eject.c0000644000175000017500000000330711313260160013573 00000000000000/* Copyright (C) 2007, 2008, 2009 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include #include #include static void usage(char * progname) { fprintf(stderr, "Usage: %s [-t] \n", progname); } int main(int argc, char ** argv) { driver_return_code_t err; int close_tray = 0; const char * device = NULL; if(argc < 2 || argc > 3) { usage(argv[0]); return -1; } if((argc == 3) && strcmp(argv[1], "-t")) { usage(argv[0]); return -1; } if(argc == 2) device = argv[1]; else if(argc == 3) { close_tray = 1; device = argv[2]; } if(close_tray) { err = cdio_close_tray(device, NULL); if(err) { fprintf(stderr, "Closing tray failed for device %s: %s\n", device, cdio_driver_errmsg(err)); return -1; } } else { err = cdio_eject_media_drive(device); if(err) { fprintf(stderr, "Ejecting failed for device %s: %s\n", device, cdio_driver_errmsg(err)); return -1; } } return 0; } libcdio-0.83/example/mmc2.c0000644000175000017500000001254711650127114012436 00000000000000/* Copyright (C) 2004, 2005, 2008, 2009 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* A program to using the MMC interface to list CD and drive features from the MMC GET_CONFIGURATION command . */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_STRING_H #include #endif #include #include int main(int argc, const char *argv[]) { CdIo_t *p_cdio; const char *psz_drive = NULL; if (argc > 1) psz_drive = argv[1]; p_cdio = cdio_open (psz_drive, DRIVER_DEVICE); if (NULL == p_cdio) { printf("Couldn't find CD\n"); return 77; } else { int i_status; /* Result of MMC command */ uint8_t buf[500] = { 0, }; /* Place to hold returned data */ mmc_cdb_t cdb = {{0, }}; /* Command Descriptor Buffer */ CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_GET_CONFIGURATION); CDIO_MMC_SET_READ_LENGTH8(cdb.field, sizeof(buf)); cdb.field[1] = CDIO_MMC_GET_CONF_ALL_FEATURES; cdb.field[3] = 0x0; i_status = mmc_run_cmd(p_cdio, 0, &cdb, SCSI_MMC_DATA_READ, sizeof(buf), &buf); if (i_status == 0) { uint8_t *p; uint32_t i_data; uint8_t *p_max = buf + 65530; i_data = (unsigned int) CDIO_MMC_GET_LEN32(buf); /* set to first sense feature code, and then walk through the masks */ p = buf + 8; while( (p < &(buf[i_data])) && (p < p_max) ) { uint16_t i_feature; uint8_t i_feature_additional = p[3]; i_feature = CDIO_MMC_GET_LEN16(p); { uint8_t *q; const char *feature_str = mmc_feature2str(i_feature); printf("%s Feature\n", feature_str); switch( i_feature ) { case CDIO_MMC_FEATURE_PROFILE_LIST: for ( q = p+4 ; q < p + i_feature_additional ; q += 4 ) { int i_profile=CDIO_MMC_GET_LEN16(q); const char *feature_profile_str = mmc_feature_profile2str(i_profile); printf( "\t%s", feature_profile_str ); if (q[2] & 1) { printf(" - on"); } printf("\n"); } printf("\n"); break; case CDIO_MMC_FEATURE_CORE: { uint8_t *q = p+4; uint32_t i_interface_standard = CDIO_MMC_GET_LEN32(q); switch(i_interface_standard) { case 0: printf("\tunspecified interface.\n"); break; case 1: printf("\tSCSI interface.\n"); break; case 2: printf("\tATAPI interface.\n"); break; case 3: printf("\tIEEE 1394 interface.\n"); break; case 4: printf("\tIEEE 1394A interface.\n"); break; case 5: printf("\tFibre Channel interface.\n"); } printf("\n"); break; } case CDIO_MMC_FEATURE_REMOVABLE_MEDIUM: switch(p[4] >> 5) { case 0: printf("\tCaddy/Slot type loading mechanism,\n"); break; case 1: printf("\tTray type loading mechanism,\n"); break; case 2: printf("\tPop-up type loading mechanism,\n"); break; case 4: printf("\tEmbedded changer with individually changeable discs,\n"); break; case 5: printf("\tEmbedded changer using a magazine mechanism,\n"); break; default: printf("\tUnknown changer mechanism,\n"); } printf("\tcan%s eject the medium or magazine via the normal " "START/STOP command,\n", (p[4] & 8) ? "": "not"); printf("\tcan%s be locked into the Logical Unit.\n", (p[4] & 1) ? "": "not"); printf("\n"); break; case CDIO_MMC_FEATURE_CD_READ: printf("CD Read Feature\n"); printf("\tC2 Error pointers are %ssupported,\n", (p[4] & 2) ? "": "not "); printf("\tCD-Text is %ssupported.\n", (p[4] & 1) ? "": "not "); printf("\n"); break; case CDIO_MMC_FEATURE_CDDA_EXT_PLAY: printf("\tSCAN command is %ssupported,\n", (p[4] & 4) ? "": "not "); printf("\taudio channels can %sbe muted separately,\n", (p[4] & 2) ? "": "not "); printf("\taudio channels can %shave separate volume levels.\n", (p[4] & 1) ? "": "not "); { uint8_t *q = p+6; uint16_t i_vol_levels = CDIO_MMC_GET_LEN16(q); printf("\t%d volume levels can be set\n", i_vol_levels); } printf("\n"); break; case CDIO_MMC_FEATURE_LU_SN: { uint8_t i_serial = *(p+3); char serial[257] = { '\0', }; memcpy(serial, p+4, i_serial); printf("\t%s\n\n", serial); break; } default: printf("\n"); break; } p += i_feature_additional + 4; } } } else { printf("Didn't get all feature codes.\n"); } } if (mmc_have_interface(p_cdio, CDIO_MMC_FEATURE_INTERFACE_ATAPI)) printf("CD-ROM is an ATAPI interface.\n"); else printf("CD-ROM is not an ATAPI interface.\n"); cdio_destroy(p_cdio); return 0; } libcdio-0.83/example/isolist.c0000644000175000017500000000645111650127002013257 00000000000000/* Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Simple program to show using libiso9660 to list files in a directory of an ISO-9660 image and give some iso9660 information. See the code to iso-info for a more complete example. If a single argument is given, it is used as the ISO 9660 image to use in the listing. Otherwise a compiled-in default ISO 9660 image name (that comes with the libcdio distribution) will be used. */ /* Set up a CD-DA image to test on which is in the libcdio distribution. */ #define ISO9660_IMAGE_PATH "../test/" #define ISO9660_IMAGE ISO9660_IMAGE_PATH "copying.iso" #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #include #include #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #define print_vd_info(title, fn) \ if (fn(p_iso, &psz_str)) { \ printf(title ": %s\n", psz_str); \ } \ free(psz_str); \ psz_str = NULL; int main(int argc, const char *argv[]) { CdioList_t *p_entlist; CdioListNode_t *p_entnode; char const *psz_fname; iso9660_t *p_iso; const char *psz_path="/"; if (argc > 1) psz_fname = argv[1]; else psz_fname = ISO9660_IMAGE; p_iso = iso9660_open (psz_fname); if (NULL == p_iso) { fprintf(stderr, "Sorry, couldn't open %s as an ISO-9660 image\n", psz_fname); return 1; } /* Show basic CD info from the Primary Volume Descriptor. */ { char *psz_str = NULL; print_vd_info("Application", iso9660_ifs_get_application_id); print_vd_info("Preparer ", iso9660_ifs_get_preparer_id); print_vd_info("Publisher ", iso9660_ifs_get_publisher_id); print_vd_info("System ", iso9660_ifs_get_system_id); print_vd_info("Volume ", iso9660_ifs_get_volume_id); print_vd_info("Volume Set ", iso9660_ifs_get_volumeset_id); } p_entlist = iso9660_ifs_readdir (p_iso, psz_path); /* Iterate over the list of nodes that iso9660_ifs_readdir gives */ if (p_entlist) { _CDIO_LIST_FOREACH (p_entnode, p_entlist) { char filename[4096]; iso9660_stat_t *p_statbuf = (iso9660_stat_t *) _cdio_list_node_data (p_entnode); iso9660_name_translate(p_statbuf->filename, filename); printf ("%s [LSN %6d] %8u %s%s\n", _STAT_DIR == p_statbuf->type ? "d" : "-", p_statbuf->lsn, p_statbuf->size, psz_path, filename); } _cdio_list_free (p_entlist, true); } iso9660_close(p_iso); return 0; } libcdio-0.83/example/sample4.c0000644000175000017500000001403311647674070013153 00000000000000/* Copyright (C) 2003, 2004, 2008, 2009 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* A slightly improved sample3 program: we handle cdio logging and take an optional CD-location. */ #include #include #include #include #include #include static void log_handler (cdio_log_level_t level, const char message[]) { switch(level) { case CDIO_LOG_DEBUG: case CDIO_LOG_INFO: return; default: printf("cdio %d message: %s\n", level, message); } } static void print_analysis(cdio_iso_analysis_t cdio_iso_analysis, cdio_fs_anal_t fs, int first_data, unsigned int num_audio) { switch(CDIO_FSTYPE(fs)) { case CDIO_FS_AUDIO: break; case CDIO_FS_ISO_9660: printf("CD-ROM with ISO 9660 filesystem"); if (fs & CDIO_FS_ANAL_JOLIET) { printf(" and joliet extension level %d", cdio_iso_analysis.joliet_level); } if (fs & CDIO_FS_ANAL_ROCKRIDGE) printf(" and rockridge extensions"); printf("\n"); break; case CDIO_FS_ISO_9660_INTERACTIVE: printf("CD-ROM with CD-RTOS and ISO 9660 filesystem\n"); break; case CDIO_FS_HIGH_SIERRA: printf("CD-ROM with High Sierra filesystem\n"); break; case CDIO_FS_INTERACTIVE: printf("CD-Interactive%s\n", num_audio > 0 ? "/Ready" : ""); break; case CDIO_FS_HFS: printf("CD-ROM with Macintosh HFS\n"); break; case CDIO_FS_ISO_HFS: printf("CD-ROM with both Macintosh HFS and ISO 9660 filesystem\n"); break; case CDIO_FS_UFS: printf("CD-ROM with Unix UFS\n"); break; case CDIO_FS_EXT2: printf("CD-ROM with Linux second extended filesystem\n"); break; case CDIO_FS_3DO: printf("CD-ROM with Panasonic 3DO filesystem\n"); break; case CDIO_FS_UNKNOWN: printf("CD-ROM with unknown filesystem\n"); break; } switch(CDIO_FSTYPE(fs)) { case CDIO_FS_ISO_9660: case CDIO_FS_ISO_9660_INTERACTIVE: case CDIO_FS_ISO_HFS: printf("ISO 9660: %i blocks, label `%.32s'\n", cdio_iso_analysis.isofs_size, cdio_iso_analysis.iso_label); break; } if (first_data == 1 && num_audio > 0) printf("mixed mode CD "); if (fs & CDIO_FS_ANAL_XA) printf("XA sectors "); if (fs & CDIO_FS_ANAL_MULTISESSION) printf("Multisession"); if (fs & CDIO_FS_ANAL_HIDDEN_TRACK) printf("Hidden Track "); if (fs & CDIO_FS_ANAL_PHOTO_CD) printf("%sPhoto CD ", num_audio > 0 ? " Portfolio " : ""); if (fs & CDIO_FS_ANAL_CDTV) printf("Commodore CDTV "); if (first_data > 1) printf("CD-Plus/Extra "); if (fs & CDIO_FS_ANAL_BOOTABLE) printf("bootable CD "); if (fs & CDIO_FS_ANAL_VIDEOCD && num_audio == 0) { printf("Video CD "); } if (fs & CDIO_FS_ANAL_SVCD) printf("Super Video CD (SVCD) or Chaoji Video CD (CVD)"); if (fs & CDIO_FS_ANAL_CVD) printf("Chaoji Video CD (CVD)"); printf("\n"); } int main(int argc, const char *argv[]) { CdIo_t *p_cdio; cdio_fs_anal_t fs=0; track_t num_tracks; track_t first_track_num; lsn_t start_track; /* first sector of track */ lsn_t data_start =0; /* start of data area */ int first_data = -1; /* # of first data track */ int first_audio = -1; /* # of first audio track */ unsigned int num_data = 0; /* # of data tracks */ unsigned int num_audio = 0; /* # of audio tracks */ unsigned int i; char *cd_image_name = NULL; if (argc > 1) cd_image_name = strdup(argv[1]); cdio_log_set_handler (log_handler); p_cdio = cdio_open (cd_image_name, DRIVER_UNKNOWN); if (NULL == p_cdio) { printf("Problem in trying to find a driver.\n\n"); return 77; } first_track_num = cdio_get_first_track_num(p_cdio); num_tracks = cdio_get_num_tracks(p_cdio); /* Count the number of data and audio tracks. */ for (i = first_track_num; i <= num_tracks; i++) { if (TRACK_FORMAT_AUDIO == cdio_get_track_format(p_cdio, i)) { num_audio++; if (-1 == first_audio) first_audio = i; } else { num_data++; if (-1 == first_data) first_data = i; } } /* try to find out what sort of CD we have */ if (0 == num_data) { printf("Audio CD\n"); } else { /* we have data track(s) */ int j; cdio_iso_analysis_t cdio_iso_analysis; memset(&cdio_iso_analysis, 0, sizeof(cdio_iso_analysis)); for (j = 2, i = first_data; i <= num_tracks; i++) { lsn_t lsn; track_format_t track_format = cdio_get_track_format(p_cdio, i); lsn = cdio_get_track_lsn(p_cdio, i); switch ( track_format ) { case TRACK_FORMAT_AUDIO: case TRACK_FORMAT_ERROR: break; case TRACK_FORMAT_CDI: case TRACK_FORMAT_XA: case TRACK_FORMAT_DATA: case TRACK_FORMAT_PSX: ; } start_track = (i == 1) ? 0 : lsn; /* save the start of the data area */ if (i == first_data) data_start = start_track; /* skip tracks which belong to the current walked session */ if (start_track < data_start + cdio_iso_analysis.isofs_size) continue; fs = cdio_guess_cd_type(p_cdio, start_track, i, &cdio_iso_analysis); print_analysis(cdio_iso_analysis, fs, first_data, num_audio); if ( !(CDIO_FSTYPE(fs) == CDIO_FS_ISO_9660 || CDIO_FSTYPE(fs) == CDIO_FS_ISO_HFS || CDIO_FSTYPE(fs) == CDIO_FS_ISO_9660_INTERACTIVE) ) /* no method for non-ISO9660 multisessions */ break; } } cdio_destroy(p_cdio); return 0; } libcdio-0.83/example/udffile.c0000644000175000017500000000741011650127231013207 00000000000000/* Copyright (C) 2005, 2006, 2008, 2009, 2010, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Simple program to show using libudf to extract a file. This program can be compiled with either a C or C++ compiler. In the distribution we prefer C++ just to make sure we haven't broken things on the C++ side. */ /* config.h has to come first else _FILE_OFFSET_BITS are redefined in say opensolaris. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif /* This is the UDF image. */ #define UDF_IMAGE_PATH "../" #define UDF_IMAGE "../test/udf102.iso" #define UDF_FILENAME "/COPYING" #define LOCAL_FILENAME "copying" #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #define CEILING(x, y) ((x+(y-1))/y) #define udf_PATH_DELIMITERS "/\\" int main(int argc, const char *argv[]) { udf_t *p_udf; FILE *p_outfd; char const *psz_udf_image; char const *psz_udf_fname; char const *psz_local_fname; if (argc > 1) psz_udf_image = argv[1]; else psz_udf_image = UDF_IMAGE; if (argc > 2) psz_udf_fname = argv[2]; else psz_udf_fname = UDF_FILENAME; if (argc > 3) psz_local_fname = argv[3]; else psz_local_fname = LOCAL_FILENAME; p_udf = udf_open (psz_udf_image); if (NULL == p_udf) { fprintf(stderr, "Sorry, couldn't open %s as something using UDF\n", psz_udf_image); return 1; } else { udf_dirent_t *p_udf_root = udf_get_root(p_udf, true, 0); udf_dirent_t *p_udf_file = NULL; if (NULL == p_udf_root) { fprintf(stderr, "Sorry, couldn't find / in %s\n", psz_udf_image); return 1; } p_udf_file = udf_fopen(p_udf_root, psz_udf_fname); if (!p_udf_file) { fprintf(stderr, "Sorry, couldn't find %s in %s\n", psz_udf_fname, psz_udf_image); return 2; } if (!(p_outfd = fopen (psz_local_fname, "wb"))) { perror ("fopen()"); return 3; } { long unsigned int i_file_length = udf_get_file_length(p_udf_file); const unsigned int i_blocks = CEILING(i_file_length, UDF_BLOCKSIZE); unsigned int i; for (i = 0; i < i_blocks ; i++) { char buf[UDF_BLOCKSIZE] = {'\0',}; ssize_t i_read = udf_read_block(p_udf_file, buf, 1); if ( i_read < 0 ) { fprintf(stderr, "Error reading UDF file %s at block %u\n", psz_local_fname, i); return 4; } fwrite (buf, i_read, 1, p_outfd); if (ferror (p_outfd)) { perror ("fwrite()"); return 5; } } fflush (p_outfd); udf_dirent_free(p_udf_root); udf_close(p_udf); /* Make sure the file size has the exact same byte size. Without the truncate below, the file will a multiple of UDF_BLOCKSIZE. */ if (ftruncate (fileno (p_outfd), i_file_length)) perror ("ftruncate()"); printf("Extraction of file '%s' from %s successful.\n", psz_local_fname, psz_udf_image); return 0; } } } libcdio-0.83/example/mmc3.c0000644000175000017500000000652211650127154012437 00000000000000/* Copyright (C) 2006, 2008, 2009, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Simple program to show use of SCSI MMC interface. Is basically the the libdio scsi_mmc_get_hwinfo() routine. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #ifdef HAVE_STDLIB_H #include #endif #include #include #include /* Set how long to wait for MMC commands to complete */ #define DEFAULT_TIMEOUT_MS 10000 int main(int argc, const char *argv[]) { CdIo_t *p_cdio; driver_return_code_t ret; driver_id_t driver_id = DRIVER_DEVICE; char *psz_drive = NULL; bool do_eject = false; bool do_close = false; if (argc > 1) psz_drive = strdup(argv[1]); if (!psz_drive) { psz_drive = cdio_get_default_device_driver(&driver_id); if (!psz_drive) { printf("Can't find a CD-ROM\n"); exit(77); } } p_cdio = cdio_open (psz_drive, driver_id); if (!p_cdio) { printf("Can't open %s\n", psz_drive); exit(77); } ret = mmc_get_tray_status(p_cdio); switch((int) ret) { case 0: printf("CD-ROM drive %s is closed.\n", psz_drive); do_eject = true; do_close = true; break; case 1: printf("CD-ROM drive %s is open.\n", psz_drive); break; default: printf("Error status for drive %s: %s.\n", psz_drive, cdio_driver_errmsg(ret)); return 77; } ret = mmc_get_media_changed(p_cdio); switch((int) ret) { case 0: printf("CD-ROM drive %s media not changed since last test.\n", psz_drive); break; case 1: printf("CD-ROM drive %s media changed since last test.\n", psz_drive); break; default: printf("Error status for drive %s: %s.\n", psz_drive, cdio_driver_errmsg(ret)); return 77; } if (do_eject && argc > 2) ret = cdio_eject_media_drive(psz_drive); else ret = cdio_close_tray(psz_drive, &driver_id); ret = mmc_get_tray_status(p_cdio); switch((int) ret) { case 0: printf("CD-ROM drive %s is closed.\n", psz_drive); break; case 1: printf("CD-ROM drive %s is open.\n", psz_drive); break; default: printf("Error status for drive %s: %s.\n", psz_drive, cdio_driver_errmsg(ret)); return 77; } ret = mmc_get_media_changed(p_cdio); switch((int) ret) { case 0: printf("CD-ROM drive %s media not changed since last test.\n", psz_drive); break; case 1: printf("CD-ROM drive %s media changed since last test.\n", psz_drive); break; default: printf("Error status for drive %s: %s.\n", psz_drive, cdio_driver_errmsg(ret)); return 77; } if (do_close) cdio_close_tray(psz_drive, &driver_id); free(psz_drive); cdio_destroy(p_cdio); return 0; } libcdio-0.83/example/isofile.c0000644000175000017500000000743711650235274013243 00000000000000/* Copyright (C) 2004, 2005, 2006, 2008, 2009 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Simple program to show using libiso9660 to extract a file from an ISO-9660 image. If a single argument is given, it is used as the ISO 9660 image to use in the extraction. Otherwise a compiled in default ISO 9660 image name (that comes with the libcdio distribution) will be used. */ /* This is the ISO 9660 image. */ #define ISO9660_IMAGE_PATH "../" #define ISO9660_IMAGE ISO9660_IMAGE_PATH "test/copying.iso" #define LOCAL_FILENAME "copying" /* portable.h has to come first else _FILE_OFFSET_BITS are redefined in say opensolaris. */ #include "portable.h" #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #define CEILING(x, y) ((x+(y-1))/y) #define my_exit(rc) \ fclose (p_outfd); \ free(p_statbuf); \ iso9660_close(p_iso); \ return rc; \ int main(int argc, const char *argv[]) { iso9660_stat_t *p_statbuf; FILE *p_outfd; int i; char const *psz_image; char const *psz_fname; iso9660_t *p_iso; if (argc > 3) { printf("usage %s [ISO9660-image.ISO [filename]]\n", argv[0]); printf("Extracts filename from ISO-9660-image.ISO\n"); return 1; } if (argc > 1) psz_image = argv[1]; else psz_image = ISO9660_IMAGE; if (argc > 2) psz_fname = argv[2]; else psz_fname = LOCAL_FILENAME; p_iso = iso9660_open (psz_image); if (NULL == p_iso) { fprintf(stderr, "Sorry, couldn't open ISO 9660 image %s\n", psz_image); return 1; } p_statbuf = iso9660_ifs_stat_translate (p_iso, psz_fname); if (NULL == p_statbuf) { fprintf(stderr, "Could not get ISO-9660 file information for file %s\n", psz_fname); iso9660_close(p_iso); return 2; } if (!(p_outfd = fopen (psz_fname, "wb"))) { perror ("fopen()"); free(p_statbuf); iso9660_close(p_iso); return 3; } /* Copy the blocks from the ISO-9660 filesystem to the local filesystem. */ { const unsigned int i_blocks = CEILING(p_statbuf->size, ISO_BLOCKSIZE); for (i = 0; i < i_blocks ; i++) { char buf[ISO_BLOCKSIZE]; const lsn_t lsn = p_statbuf->lsn + i; memset (buf, 0, ISO_BLOCKSIZE); if ( ISO_BLOCKSIZE != iso9660_iso_seek_read (p_iso, buf, lsn, 1) ) { fprintf(stderr, "Error reading ISO 9660 file %s at LSN %lu\n", psz_fname, (long unsigned int) lsn); my_exit(4); } fwrite (buf, ISO_BLOCKSIZE, 1, p_outfd); if (ferror (p_outfd)) { perror ("fwrite()"); my_exit(5); } } } fflush (p_outfd); /* Make sure the file size has the exact same byte size. Without the truncate below, the file will a multiple of ISO_BLOCKSIZE. */ if (ftruncate (fileno (p_outfd), p_statbuf->size)) perror ("ftruncate()"); printf("Extraction of file '%s' from %s successful.\n", psz_fname, psz_image); my_exit(0); } libcdio-0.83/example/mmc1.c0000644000175000017500000000623311650127070012431 00000000000000/* Copyright (C) 2004, 2005, 2008, 2009, 2010, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Sample program to show use of the MMC interface. An optional drive name can be supplied as an argument. This basically the libdio mmc_get_hwinfo() routine. See also corresponding C++ programs. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_STRING_H #include #endif #include #include #include /* Set how long to wait for MMC commands to complete */ #define DEFAULT_TIMEOUT_MS 10000 int main(int argc, const char *argv[]) { CdIo_t *p_cdio; const char *psz_drive = NULL; if (argc > 1) psz_drive = argv[1]; p_cdio = cdio_open (psz_drive, DRIVER_UNKNOWN); if (!p_cdio) { printf("Couldn't find CD\n"); return 77; } else { int i_status; /* Result of MMC command */ mmc_cdb_t cdb = {{0, }}; /* Command Descriptor Buffer */ char buf[36] = { 0, }; /* Place to hold returned data */ CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_INQUIRY); cdb.field[4] = sizeof(buf); i_status = mmc_run_cmd(p_cdio, DEFAULT_TIMEOUT_MS, &cdb, SCSI_MMC_DATA_READ, sizeof(buf), &buf); if (i_status == 0) { char psz_vendor[CDIO_MMC_HW_VENDOR_LEN+1]; char psz_model[CDIO_MMC_HW_MODEL_LEN+1]; char psz_rev[CDIO_MMC_HW_REVISION_LEN+1]; memcpy(psz_vendor, buf + 8, sizeof(psz_vendor)-1); psz_vendor[sizeof(psz_vendor)-1] = '\0'; memcpy(psz_model, buf + 8 + CDIO_MMC_HW_VENDOR_LEN, sizeof(psz_model)-1); psz_model[sizeof(psz_model)-1] = '\0'; memcpy(psz_rev, buf + 8 + CDIO_MMC_HW_VENDOR_LEN +CDIO_MMC_HW_MODEL_LEN, sizeof(psz_rev)-1); psz_rev[sizeof(psz_rev)-1] = '\0'; printf("Vendor: %s\nModel: %s\nRevision: %s\n", psz_vendor, psz_model, psz_rev); } else { printf("Couldn't get INQUIRY data (vendor, model, and revision).\n"); } { driver_return_code_t i_status; bool b_erasable; i_status = mmc_get_disc_erasable(p_cdio, &b_erasable); cdio_mmc_feature_profile_t disctype; if (DRIVER_OP_SUCCESS == i_status) printf("Disc is %serasable.\n", b_erasable ? "" : "not "); else printf("Can't determine if disc is erasable.\n"); i_status = mmc_get_disctype(p_cdio, 0, &disctype); if (DRIVER_OP_SUCCESS == i_status) { printf("disc type: profile is %s (0x%X)\n", mmc_feature_profile2str(disctype), disctype); } } } cdio_destroy(p_cdio); return 0; } libcdio-0.83/example/device.c0000644000175000017500000001113411313260160013021 00000000000000/* Copyright (C) 2003, 2004, 2005, 2008, 2009 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Simple program to show drivers installed and what the default CD-ROM drive is. See also corresponding C++ programs of similar names .*/ #include #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #define _(x) x /* Prints out drive capabilities */ static void print_drive_capabilities(cdio_drive_read_cap_t i_read_cap, cdio_drive_write_cap_t i_write_cap, cdio_drive_misc_cap_t i_misc_cap) { if (CDIO_DRIVE_CAP_ERROR == i_misc_cap) { printf("Error in getting drive hardware properties\n"); } else { printf(_("Hardware : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_FILE ? "Disk Image" : "CD-ROM or DVD"); printf(_("Can eject : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_EJECT ? "Yes" : "No"); printf(_("Can close tray : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_CLOSE_TRAY ? "Yes" : "No"); printf(_("Can disable manual eject : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_LOCK ? "Yes" : "No"); printf(_("Can select juke-box disc : %s\n\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_SELECT_DISC ? "Yes" : "No"); printf(_("Can set drive speed : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_SELECT_SPEED ? "Yes" : "No"); printf(_("Can detect if CD changed : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_MEDIA_CHANGED ? "Yes" : "No"); printf(_("Can read multiple sessions : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_MULTI_SESSION ? "Yes" : "No"); printf(_("Can hard reset device : %s\n\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_RESET ? "Yes" : "No"); } if (CDIO_DRIVE_CAP_ERROR == i_read_cap) { printf("Error in getting drive reading properties\n"); } else { printf("Reading....\n"); printf(_(" Can play audio : %s\n"), i_read_cap & CDIO_DRIVE_CAP_READ_AUDIO ? "Yes" : "No"); printf(_(" Can read CD-R : %s\n"), i_read_cap & CDIO_DRIVE_CAP_READ_CD_R ? "Yes" : "No"); printf(_(" Can read CD-RW : %s\n"), i_read_cap & CDIO_DRIVE_CAP_READ_CD_RW ? "Yes" : "No"); printf(_(" Can read DVD-ROM : %s\n"), i_read_cap & CDIO_DRIVE_CAP_READ_DVD_ROM ? "Yes" : "No"); } if (CDIO_DRIVE_CAP_ERROR == i_write_cap) { printf("Error in getting drive writing properties\n"); } else { printf("\nWriting....\n"); printf(_(" Can write CD-RW : %s\n"), i_read_cap & CDIO_DRIVE_CAP_READ_CD_RW ? "Yes" : "No"); printf(_(" Can write DVD-R : %s\n"), i_write_cap & CDIO_DRIVE_CAP_READ_DVD_R ? "Yes" : "No"); printf(_(" Can write DVD-RAM : %s\n"), i_write_cap & CDIO_DRIVE_CAP_READ_DVD_RAM ? "Yes" : "No"); } } int main(int argc, const char *argv[]) { CdIo_t *p_cdio = cdio_open (NULL, DRIVER_UNKNOWN); if (NULL != p_cdio) { char *default_device = cdio_get_default_device(p_cdio); cdio_drive_read_cap_t i_read_cap; cdio_drive_write_cap_t i_write_cap; cdio_drive_misc_cap_t i_misc_cap; printf("The driver selected is %s\n", cdio_get_driver_name(p_cdio)); if (default_device) printf("The default device for this driver is %s\n", default_device); cdio_get_drive_cap(p_cdio, &i_read_cap, &i_write_cap, &i_misc_cap); print_drive_capabilities(i_read_cap, i_write_cap, i_misc_cap); free(default_device); cdio_destroy(p_cdio); printf("\n"); } else { printf("Problem in trying to find a driver.\n\n"); } { const driver_id_t *driver_id_p; for (driver_id_p=cdio_drivers; *driver_id_p!=DRIVER_UNKNOWN; driver_id_p++) if (cdio_have_driver(*driver_id_p)) printf("We have: %s\n", cdio_driver_describe(*driver_id_p)); else printf("We don't have: %s\n", cdio_driver_describe(*driver_id_p)); } return 0; } libcdio-0.83/example/drives.c0000644000175000017500000000474711313260160013072 00000000000000/* Copyright (C) 2003, 2004, 2006, 2008, 2009 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Simple program to show drivers installed and what the default CD-ROM drive is and what CD drives are available. */ #include #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #include #include static void log_handler (cdio_log_level_t level, const char message[]) { switch(level) { case CDIO_LOG_DEBUG: case CDIO_LOG_INFO: return; default: printf("cdio %d message: %s\n", level, message); } } static void print_drive_class(const char *psz_msg, cdio_fs_anal_t bitmask, bool b_any) { char **ppsz_cd_drives=NULL, **c; printf("%s...\n", psz_msg); ppsz_cd_drives = cdio_get_devices_with_cap(NULL, bitmask, b_any); if (NULL != ppsz_cd_drives) for( c = ppsz_cd_drives; *c != NULL; c++ ) { printf("Drive %s\n", *c); } cdio_free_device_list(ppsz_cd_drives); printf("-----\n"); } int main(int argc, const char *argv[]) { char **ppsz_cd_drives=NULL, **c; cdio_log_set_handler (log_handler); /* Print out a list of CD-drives */ ppsz_cd_drives = cdio_get_devices(DRIVER_DEVICE); if (NULL != ppsz_cd_drives) for( c = ppsz_cd_drives; *c != NULL; c++ ) { printf("Drive %s\n", *c); } cdio_free_device_list(ppsz_cd_drives); ppsz_cd_drives = NULL; printf("-----\n"); /* Print out a list of CD-drives the harder way. */ print_drive_class("All CD-ROM drives (again)", CDIO_FS_MATCH_ALL, false); print_drive_class("CD-ROM drives with a CD-DA loaded...", CDIO_FS_AUDIO, false); print_drive_class("CD-ROM drives with some sort of ISO 9660 filesystem...", CDIO_FS_ANAL_ISO9660_ANY, true); print_drive_class("(S)VCD drives...", CDIO_FS_ANAL_VCD_ANY, true); return 0; } libcdio-0.83/example/paranoia2.c0000644000175000017500000000560711315436420013454 00000000000000/* Copyright (C) 2005, 2006, 2008, 2009 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Simple program to show using libcdio's version of the CD-DA paranoia library. But in this version, we'll open a cdio object before calling paranoia's open. I imagine in many cases such as media players this may be what will be done since, one may want to get CDDB/CD-Text info beforehand. */ #include #include #include #ifdef HAVE_STDLIB_H #include #endif int main(int argc, const char *argv[]) { cdrom_drive_t *d = NULL; /* Place to store handle given by cd-paranoia. */ char **ppsz_cd_drives; /* List of all drives with a loaded CDDA in it. */ CdIo_t *p_cdio = NULL; /* See if we can find a device with a loaded CD-DA in it. */ ppsz_cd_drives = cdio_get_devices_with_cap(NULL, CDIO_FS_AUDIO, false); if (ppsz_cd_drives) { /* Found such a CD-ROM with a CD-DA loaded. Use the first drive in the list. */ p_cdio = cdio_open(*ppsz_cd_drives, DRIVER_UNKNOWN); d=cdio_cddap_identify_cdio(p_cdio, 1, NULL); } else { printf("Unable find or access a CD-ROM drive with an audio CD in it.\n"); exit(77); } /* Don't need a list of CD's with CD-DA's any more. */ cdio_free_device_list(ppsz_cd_drives); if ( !d ) { printf("Unable to identify audio CD disc.\n"); exit(77); } /* We'll set for verbose paranoia messages. */ cdio_cddap_verbose_set(d, CDDA_MESSAGE_PRINTIT, CDDA_MESSAGE_PRINTIT); if ( 0 != cdio_cddap_open(d) ) { printf("Unable to open disc.\n"); exit(77); } /* In the paranoia example was a reading. Here we are going to do something trivial (but I think neat any way - get the Endian-ness of the drive. */ { const int i_endian = data_bigendianp(d); switch (i_endian) { case 0: printf("Drive returns audio data Little Endian." " Your drive is like most.\n"); break; case 1: printf("Drive returns audio data Big Endian.\n"); break; case -1: printf("Don't know whether drive is Big or Little Endian.\n"); break; default: printf("Whoah - got a return result I'm not expecting %d.\n", i_endian); break; } } cdio_cddap_close_no_free_cdio(d); cdio_destroy( p_cdio ); exit(0); } libcdio-0.83/example/isofile2.c0000644000175000017500000001052211400616514013303 00000000000000/* Copyright (C) 2003, 2004, 2005, 2006, 2009 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Simple program to show using libiso9660 to extract a file from a CUE/BIN CD image. If a single argument is given, it is used as the CUE file of a CD image to use. Otherwise a compiled-in default image name (that comes with the libcdio distribution) will be used. This program can be compiled with either a C or C++ compiler. In the distribution we prefer C++ just to make sure we haven't broken things on the C++ side. */ /* This is the CD-image with an ISO-9660 filesystem */ #define ISO9660_IMAGE_PATH "../" #define ISO9660_IMAGE ISO9660_IMAGE_PATH "test/isofs-m1.cue" #define ISO9660_PATH "/" #define ISO9660_FILENAME "COPYING" #define LOCAL_FILENAME "copying" /* portable.h has to come first else _FILE_OFFSET_BITS are redefined in say opensolaris. */ #include "portable.h" #include #include #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #define CEILING(x, y) ((x+(y-1))/y) #define my_exit(rc) \ fclose (p_outfd); \ free(p_statbuf); \ cdio_destroy(p_cdio); \ return rc; \ int main(int argc, const char *argv[]) { iso9660_stat_t *p_statbuf; FILE *p_outfd; int i; char const *psz_image; char const *psz_fname; char translated_name[256]; char untranslated_name[256] = ISO9660_PATH; CdIo_t *p_cdio; unsigned int i_fname=sizeof(ISO9660_FILENAME); if (argc > 3) { printf("usage %s [CD-ROM-or-image [filename]]\n", argv[0]); printf("Extracts filename from CD-ROM-or-image.\n"); return 1; } if (argc > 1) psz_image = argv[1]; else psz_image = ISO9660_IMAGE; if (argc > 2) { psz_fname = argv[2]; i_fname = strlen(psz_fname)+1; } else psz_fname = ISO9660_FILENAME; strncat(untranslated_name, psz_fname, i_fname); p_cdio = cdio_open (psz_image, DRIVER_UNKNOWN); if (!p_cdio) { fprintf(stderr, "Sorry, couldn't open %s\n", psz_image); return 1; } p_statbuf = iso9660_fs_stat (p_cdio, untranslated_name); if (NULL == p_statbuf) { fprintf(stderr, "Could not get ISO-9660 file information for file %s\n", untranslated_name); cdio_destroy(p_cdio); return 2; } iso9660_name_translate(psz_fname, translated_name); if (!(p_outfd = fopen (translated_name, "wb"))) { perror ("fopen()"); cdio_destroy(p_cdio); free(p_statbuf); return 3; } /* Copy the blocks from the ISO-9660 filesystem to the local filesystem. */ { const unsigned int i_blocks = CEILING(p_statbuf->size, ISO_BLOCKSIZE); for (i = 0; i < i_blocks; i ++) { char buf[ISO_BLOCKSIZE]; const lsn_t lsn = p_statbuf->lsn + i; memset (buf, 0, ISO_BLOCKSIZE); if ( 0 != cdio_read_data_sectors (p_cdio, buf, lsn, ISO_BLOCKSIZE, 1) ) { fprintf(stderr, "Error reading ISO 9660 file at lsn %lu\n", (long unsigned int) p_statbuf->lsn); my_exit(4); } fwrite (buf, ISO_BLOCKSIZE, 1, p_outfd); if (ferror (p_outfd)) { perror ("fwrite()"); my_exit(5); } } } fflush (p_outfd); /* Make sure the file size has the exact same byte size. Without the truncate below, the file will a multiple of ISO_BLOCKSIZE. */ if (ftruncate (fileno (p_outfd), p_statbuf->size)) perror ("ftruncate()"); printf("Extraction of file '%s' from '%s' successful.\n", translated_name, untranslated_name); my_exit(0); } libcdio-0.83/example/mmc2a.c0000644000175000017500000001465711650127445012612 00000000000000/* Copyright (C) 2006, 2008, 2009, 2010, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Sample program to show use of the MMC interface. An optional drive name can be supplied as an argument. This basically calls to the libdio mmc_mode_sense_10() and mmc_mode_sense_6 routines. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #include #include #include static void print_mode_sense (const char *psz_drive, const char *six_or_ten, const uint8_t buf[30]) { printf("Mode sense %s information for %s:\n", six_or_ten, psz_drive); if (buf[2] & 0x01) { printf("\tReads CD-R media.\n"); } if (buf[2] & 0x02) { printf("\tReads CD-RW media.\n"); } if (buf[2] & 0x04) { printf("\tReads fixed-packet tracks when Addressing type is method 2.\n"); } if (buf[2] & 0x08) { printf("\tReads DVD ROM media.\n"); } if (buf[2] & 0x10) { printf("\tReads DVD-R media.\n"); } if (buf[2] & 0x20) { printf("\tReads DVD-RAM media.\n"); } if (buf[2] & 0x40) { printf("\tReads DVD-RAM media.\n"); } if (buf[3] & 0x01) { printf("\tWrites CD-R media.\n"); } if (buf[3] & 0x02) { printf("\tWrites CD-RW media.\n"); } if (buf[3] & 0x04) { printf("\tSupports emulation write.\n"); } if (buf[3] & 0x10) { printf("\tWrites DVD-R media.\n"); } if (buf[3] & 0x20) { printf("\tWrites DVD-RAM media.\n"); } if (buf[4] & 0x01) { printf("\tCan play audio.\n"); } if (buf[4] & 0x02) { printf("\tDelivers composition A/V stream.\n"); } if (buf[4] & 0x04) { printf("\tSupports digital output on port 2.\n"); } if (buf[4] & 0x08) { printf("\tSupports digital output on port 1.\n"); } if (buf[4] & 0x10) { printf("\tReads Mode-2 form 1 (e.g. XA) media.\n"); } if (buf[4] & 0x20) { printf("\tReads Mode-2 form 2 media.\n"); } if (buf[4] & 0x40) { printf("\tReads multi-session CD media.\n"); } if (buf[4] & 0x80) { printf("\tSupports Buffer under-run free recording on CD-R/RW media.\n"); } if (buf[4] & 0x01) { printf("\tCan read audio data with READ CD.\n"); } if (buf[4] & 0x02) { printf("\tREAD CD data stream is accurate.\n"); } if (buf[5] & 0x04) { printf("\tReads R-W subchannel information.\n"); } if (buf[5] & 0x08) { printf("\tReads de-interleaved R-W subchannel.\n"); } if (buf[5] & 0x10) { printf("\tSupports C2 error pointers.\n"); } if (buf[5] & 0x20) { printf("\tReads ISRC information.\n"); } if (buf[5] & 0x40) { printf("\tReads ISRC informaton.\n"); } if (buf[5] & 0x40) { printf("\tReads media catalog number (MCN also known as UPC).\n"); } if (buf[5] & 0x80) { printf("\tReads bar codes.\n"); } if (buf[6] & 0x01) { printf("\tPREVENT/ALLOW may lock media.\n"); } printf("\tLock state is %slocked.\n", (buf[6] & 0x02) ? "" : "un"); printf("\tPREVENT/ALLOW jumper is %spresent.\n", (buf[6] & 0x04) ? "": "not "); if (buf[6] & 0x08) { printf("\tEjects media with START STOP UNIT.\n"); } { const unsigned int i_load_type = (buf[6]>>5 & 0x07); printf("\tLoading mechanism type is %d: ", i_load_type); switch (buf[6]>>5 & 0x07) { case 0: printf("caddy type loading mechanism.\n"); break; case 1: printf("tray type loading mechanism.\n"); break; case 2: printf("popup type loading mechanism.\n"); break; case 3: printf("reserved\n"); break; case 4: printf("changer with individually changeable discs.\n"); break; case 5: printf("changer using Magazine mechanism.\n"); break; case 6: printf("changer using Magazine mechanism.\n"); break; default: printf("Invalid.\n"); break; } } if (buf[7] & 0x01) { printf("\tVolume controls each channel separately.\n"); } if (buf[7] & 0x02) { printf("\tHas a changer that supports disc present reporting.\n"); } if (buf[7] & 0x04) { printf("\tCan load empty slot in changer.\n"); } if (buf[7] & 0x08) { printf("\tSide change capable.\n"); } if (buf[7] & 0x10) { printf("\tReads raw R-W subchannel information from lead in.\n"); } { const unsigned int i_speed_Kbs = CDIO_MMC_GETPOS_LEN16(buf, 8); printf("\tMaximum read speed is %d K bytes/sec (about %dX)\n", i_speed_Kbs, i_speed_Kbs / 176) ; } printf("\tNumber of Volume levels is %d\n", CDIO_MMC_GETPOS_LEN16(buf, 10)); printf("\tBuffers size for data is %d KB\n", CDIO_MMC_GETPOS_LEN16(buf, 12)); printf("\tCurrent read speed is %d KB\n", CDIO_MMC_GETPOS_LEN16(buf, 14)); printf("\tMaximum write speed is %d KB\n", CDIO_MMC_GETPOS_LEN16(buf, 18)); printf("\tCurrent write speed is %d KB\n", CDIO_MMC_GETPOS_LEN16(buf, 28)); } int main(int argc, const char *argv[]) { CdIo_t *p_cdio; const char *psz_drive = NULL; if (argc > 1) psz_drive = argv[1]; p_cdio = cdio_open (psz_drive, DRIVER_UNKNOWN); if (!p_cdio) { printf("Couldn't find CD\n"); return 77; } else { uint8_t buf[30] = { 0, }; /* Place to hold returned data */ char *psz_cd = cdio_get_default_device(p_cdio); if (DRIVER_OP_SUCCESS == mmc_mode_sense_6(p_cdio, buf, sizeof(buf), CDIO_MMC_CAPABILITIES_PAGE) ) { print_mode_sense(psz_cd, "6", buf); } else { printf("Couldn't get MODE_SENSE 6 data.\n"); } if (DRIVER_OP_SUCCESS == mmc_mode_sense_10(p_cdio, buf, sizeof(buf), CDIO_MMC_CAPABILITIES_PAGE) ) { print_mode_sense(psz_cd, "10", buf); } else { printf("Couldn't get MODE_SENSE 10 data.\n"); } free(psz_cd); } cdio_destroy(p_cdio); return 0; } libcdio-0.83/example/README0000644000175000017500000000664511647777411012337 00000000000000This directory contains some simple examples of the use of the libcdio library. One might also possibly find useful C code among the regression tests (directory test), e.g. testbincue.c, testdefault.c, testiso9660.c, testparanoia.c, or testtoc.c Larger more-complicated examples are the cd-drive, cd-info, cd-read, cdda-player, iso-info and iso-read programs in the src directory. And going further there's the cd-paranoia program (in src/cd-paranoia), and "real-world' code in the xine VCD plugin, or the vlc CD-DA plugin which are part of those distributions. In some cases you may have to make small changes to compile these programs. For example, compiling using Solaris's C compiler with largefile support on a 64-bit system, may require changing C headers. Descriptions of the programs in this example directory are as follows... audio.c: Sample program to show audio controls. cdchange.c: A program to test if a CD has been changed since the last change test. cdio-eject.c: a stripped-down "eject" command to open or close a CDROM tray cdtext.c: A program to show CD-Text and CD disc mode info. drives.c: A program to show drivers installed and what the default CD-ROM drive is and what CD drives are available. eject.c: A program eject a CD from a CD-ROM drive and then close the door again. isofile.c: A program to show using libiso9660 to extract a file from an ISO-9660 image. isofile2.c: A program to show using libiso9660 to extract a file from a CDRWIN cue/bin CD image. isofuzzy.c : A program showing fuzzy ISO-9660 detection/reading. isolist.c: A program to show using libiso9660 to list files in a directory of an ISO-9660 image and give basic iso9660 information. isolsn.c: A program to show using libiso9660 to get the file path for a given LSN. mmc1.c: A program to show issuing a simple MMC command (INQUIRY). mmc2.c: A more involved MMC command to list features from a MMC GET_CONFIGURATION command. mmc2a.c: Show MODE_SENSE page 2A paramaters: CD/DVD Capabilities and Mechanical Status Page paranoia: A program to show using CD-DA paranoia (a library for jitter detection and audio-read error correction). This program uses an interface compatible (mostly) with cdparanoia. It looks for a CD-ROM with an audio CD in it and rips up to the first 300 sectors of track 1 to file track01s.wav. paranoia2: Another program to show using CD-DA paranoia using a more libcdio-oriented initialization. Probably more suited to things that otherwise use libcdio such as media players (e.g. for getting CDDB or CD-Text info) sample2.c: A simple program to show drivers installed and what the default CD-ROM drive is. sample3.c: A simple program to show the use of cdio_guess_cd_type(). Figure out the kind of CD image we've got. sample4.c: A slightly improved sample3 program: we handle cdio logging and take an optional CD-location. tracks.c: A program to list track numbers and logical sector numbers of a Compact Disc using libcdio. udf1.c: A program to show using libudf to list files in a directory of an UDF image. udf2.c: A program to show using libudf to extract a file from an UDF image. Many of the above programs can be compiled in C++. See that directory for C++ examples which include some of the above. libcdio-0.83/example/Makefile.in0000644000175000017500000010540411652210027013472 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 # Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @BUILD_EXAMPLES_TRUE@noinst_PROGRAMS = audio$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ cdchange$(EXEEXT) cdtext$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ device$(EXEEXT) drives$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ eject$(EXEEXT) isofile$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ isofile2$(EXEEXT) isofuzzy$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ isolist$(EXEEXT) isolsn$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ mmc1$(EXEEXT) mmc2$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ mmc2a$(EXEEXT) mmc3$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ $(am__EXEEXT_1) tracks$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ sample3$(EXEEXT) sample4$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ udf1$(EXEEXT) udffile$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ cdio-eject$(EXEEXT) check_PROGRAMS = cdtext$(EXEEXT) device$(EXEEXT) drives$(EXEEXT) \ mmc1$(EXEEXT) mmc2$(EXEEXT) mmc2a$(EXEEXT) mmc3$(EXEEXT) \ $(am__EXEEXT_1) sample4$(EXEEXT) subdir = example DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @BUILD_CD_PARANOIA_TRUE@am__EXEEXT_1 = paranoia$(EXEEXT) \ @BUILD_CD_PARANOIA_TRUE@ paranoia2$(EXEEXT) PROGRAMS = $(noinst_PROGRAMS) audio_SOURCES = audio.c audio_OBJECTS = audio.$(OBJEXT) am__DEPENDENCIES_1 = cdchange_SOURCES = cdchange.c cdchange_OBJECTS = cdchange.$(OBJEXT) cdio_eject_SOURCES = cdio-eject.c cdio_eject_OBJECTS = cdio-eject.$(OBJEXT) cdtext_SOURCES = cdtext.c cdtext_OBJECTS = cdtext.$(OBJEXT) device_SOURCES = device.c device_OBJECTS = device.$(OBJEXT) drives_SOURCES = drives.c drives_OBJECTS = drives.$(OBJEXT) eject_SOURCES = eject.c eject_OBJECTS = eject.$(OBJEXT) isofile_SOURCES = isofile.c isofile_OBJECTS = isofile.$(OBJEXT) isofile_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) isofile2_SOURCES = isofile2.c isofile2_OBJECTS = isofile2.$(OBJEXT) isofile2_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) isofuzzy_SOURCES = isofuzzy.c isofuzzy_OBJECTS = isofuzzy.$(OBJEXT) isofuzzy_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) isolist_SOURCES = isolist.c isolist_OBJECTS = isolist.$(OBJEXT) isolist_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) isolsn_SOURCES = isolsn.c isolsn_OBJECTS = isolsn.$(OBJEXT) isolsn_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) mmc1_SOURCES = mmc1.c mmc1_OBJECTS = mmc1.$(OBJEXT) mmc2_SOURCES = mmc2.c mmc2_OBJECTS = mmc2.$(OBJEXT) mmc2a_SOURCES = mmc2a.c mmc2a_OBJECTS = mmc2a.$(OBJEXT) mmc3_SOURCES = mmc3.c mmc3_OBJECTS = mmc3.$(OBJEXT) paranoia_SOURCES = paranoia.c paranoia_OBJECTS = paranoia.$(OBJEXT) @BUILD_CD_PARANOIA_TRUE@paranoia_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @BUILD_CD_PARANOIA_TRUE@ $(am__DEPENDENCIES_1) \ @BUILD_CD_PARANOIA_TRUE@ $(am__DEPENDENCIES_1) \ @BUILD_CD_PARANOIA_TRUE@ $(am__DEPENDENCIES_1) paranoia2_SOURCES = paranoia2.c paranoia2_OBJECTS = paranoia2.$(OBJEXT) @BUILD_CD_PARANOIA_TRUE@paranoia2_DEPENDENCIES = \ @BUILD_CD_PARANOIA_TRUE@ $(am__DEPENDENCIES_1) \ @BUILD_CD_PARANOIA_TRUE@ $(am__DEPENDENCIES_1) \ @BUILD_CD_PARANOIA_TRUE@ $(am__DEPENDENCIES_1) \ @BUILD_CD_PARANOIA_TRUE@ $(am__DEPENDENCIES_1) sample3_SOURCES = sample3.c sample3_OBJECTS = sample3.$(OBJEXT) sample4_SOURCES = sample4.c sample4_OBJECTS = sample4.$(OBJEXT) tracks_SOURCES = tracks.c tracks_OBJECTS = tracks.$(OBJEXT) udf1_SOURCES = udf1.c udf1_OBJECTS = udf1.$(OBJEXT) udffile_SOURCES = udffile.c udffile_OBJECTS = udffile.$(OBJEXT) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = audio.c cdchange.c cdio-eject.c cdtext.c device.c drives.c \ eject.c isofile.c isofile2.c isofuzzy.c isolist.c isolsn.c \ mmc1.c mmc2.c mmc2a.c mmc3.c paranoia.c paranoia2.c sample3.c \ sample4.c tracks.c udf1.c udffile.c DIST_SOURCES = audio.c cdchange.c cdio-eject.c cdtext.c device.c \ drives.c eject.c isofile.c isofile2.c isofuzzy.c isolist.c \ isolsn.c mmc1.c mmc2.c mmc2a.c mmc3.c paranoia.c paranoia2.c \ sample3.c sample4.c tracks.c udf1.c udffile.c RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DIST_SUBDIRS = C++ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDDA_PLAYER_LIBS = @CDDA_PLAYER_LIBS@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CDPARANOIA_NAME = @CDPARANOIA_NAME@ CFLAGS = @CFLAGS@ CMP = @CMP@ COS_LIB = @COS_LIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_PKG_LIB_HACK = @DARWIN_PKG_LIB_HACK@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ DIFF_OPTS = @DIFF_OPTS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GIT2CL = @GIT2CL@ GREP = @GREP@ HAVE_BSDI_CDROM = @HAVE_BSDI_CDROM@ HAVE_DARWIN_CDROM = @HAVE_DARWIN_CDROM@ HAVE_FREEBSD_CDROM = @HAVE_FREEBSD_CDROM@ HAVE_JOLIET = @HAVE_JOLIET@ HAVE_LINUX_CDROM = @HAVE_LINUX_CDROM@ HAVE_OS2_CDROM = @HAVE_OS2_CDROM@ HAVE_ROCK = @HAVE_ROCK@ HAVE_SOLARIS_CDROM = @HAVE_SOLARIS_CDROM@ HAVE_WIN32_CDROM = @HAVE_WIN32_CDROM@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDIOPP_LIBS = @LIBCDIOPP_LIBS@ LIBCDIO_CDDA_LIBS = @LIBCDIO_CDDA_LIBS@ LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ LIBCDIO_DEPS = @LIBCDIO_DEPS@ LIBCDIO_LIBS = @LIBCDIO_LIBS@ LIBCDIO_PARANOIA_LIBS = @LIBCDIO_PARANOIA_LIBS@ LIBCDIO_SOURCE_PATH = @LIBCDIO_SOURCE_PATH@ LIBCDIO_VERSION_NUM = @LIBCDIO_VERSION_NUM@ LIBICONV = @LIBICONV@ LIBISO9660PP_LIBS = @LIBISO9660PP_LIBS@ LIBISO9660_CFLAGS = @LIBISO9660_CFLAGS@ LIBISO9660_LIBS = @LIBISO9660_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBUDF_LIBS = @LIBUDF_LIBS@ LINUX_CDROM_TIMEOUT = @LINUX_CDROM_TIMEOUT@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_NO_UNDEFINED = @LT_NO_UNDEFINED@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OLD_CDPARANOIA = @OLD_CDPARANOIA@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SBPCD_H = @SBPCD_H@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TYPESIZES = @TYPESIZES@ UCDROM_H = @UCDROM_H@ VCDINFO_CFLAGS = @VCDINFO_CFLAGS@ VCDINFO_LIBS = @VCDINFO_LIBS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ #################################################### # Sample programs #################################################### # @ENABLE_CPP_TRUE@SUBDIRS = C++ @BUILD_CD_PARANOIA_TRUE@paranoia_progs = paranoia paranoia2 INCLUDES = -I$(top_srcdir) $(LIBCDIO_CFLAGS) audio_DEPENDENCIES = $(LIBCDIO_DEPS) audio_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) cdchange_DEPENDENCIES = $(LIBCDIO_DEPS) cdchange_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) cdtext_DEPENDENCIES = $(LIBCDIO_DEPS) cdtext_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) device_DEPENDENCIES = $(LIBCDIO_DEPS) device_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) drives_DEPENDENCIES = $(LIBCDIO_DEPS) drives_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) eject_DEPENDENCIES = $(LIBCDIO_DEPS) eject_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) cdio_eject_DEPENDENCIES = $(LIBCDIO_DEPS) cdio_eject_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) @BUILD_CD_PARANOIA_TRUE@paranoia_LDADD = $(LIBCDIO_PARANOIA_LIBS) $(LIBCDIO_CDDA_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) @BUILD_CD_PARANOIA_TRUE@paranoia2_LDADD = $(LIBCDIO_PARANOIA_LIBS) $(LIBCDIO_CDDA_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) isofile_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) isofile2_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) isofuzzy_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) isolist_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) isolsn_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) mmc1_DEPENDENCIES = $(LIBCDIO_DEPS) mmc1_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) mmc2_DEPENDENCIES = $(LIBCDIO_DEPS) mmc2_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) mmc2a_DEPENDENCIES = $(LIBCDIO_DEPS) mmc2a_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) mmc3_DEPENDENCIES = $(LIBCDIO_DEPS) mmc3_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) sample3_DEPENDENCIES = $(LIBCDIO_DEPS) sample3_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) sample4_DEPENDENCIES = $(LIBCDIO_DEPS) sample4_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) tracks_DEPENDENCIES = $(LIBCDIO_DEPS) tracks_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) udf1_DEPENDENCIES = $(LIBUDF_LIBS) $(LIBCDIO_DEPS) udf1_LDADD = $(LIBUDF_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) udffile_DEPENDENCIES = $(LIBUDF_LIBS) $(LIBCDIO_DEPS) udffile_LDADD = $(LIBUDF_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) TESTS = $(check_PROGRAMS) # iso programs create file "copying" MOSTLYCLEANFILES = copying *.wav all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu example/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu example/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list audio$(EXEEXT): $(audio_OBJECTS) $(audio_DEPENDENCIES) @rm -f audio$(EXEEXT) $(LINK) $(audio_OBJECTS) $(audio_LDADD) $(LIBS) cdchange$(EXEEXT): $(cdchange_OBJECTS) $(cdchange_DEPENDENCIES) @rm -f cdchange$(EXEEXT) $(LINK) $(cdchange_OBJECTS) $(cdchange_LDADD) $(LIBS) cdio-eject$(EXEEXT): $(cdio_eject_OBJECTS) $(cdio_eject_DEPENDENCIES) @rm -f cdio-eject$(EXEEXT) $(LINK) $(cdio_eject_OBJECTS) $(cdio_eject_LDADD) $(LIBS) cdtext$(EXEEXT): $(cdtext_OBJECTS) $(cdtext_DEPENDENCIES) @rm -f cdtext$(EXEEXT) $(LINK) $(cdtext_OBJECTS) $(cdtext_LDADD) $(LIBS) device$(EXEEXT): $(device_OBJECTS) $(device_DEPENDENCIES) @rm -f device$(EXEEXT) $(LINK) $(device_OBJECTS) $(device_LDADD) $(LIBS) drives$(EXEEXT): $(drives_OBJECTS) $(drives_DEPENDENCIES) @rm -f drives$(EXEEXT) $(LINK) $(drives_OBJECTS) $(drives_LDADD) $(LIBS) eject$(EXEEXT): $(eject_OBJECTS) $(eject_DEPENDENCIES) @rm -f eject$(EXEEXT) $(LINK) $(eject_OBJECTS) $(eject_LDADD) $(LIBS) isofile$(EXEEXT): $(isofile_OBJECTS) $(isofile_DEPENDENCIES) @rm -f isofile$(EXEEXT) $(LINK) $(isofile_OBJECTS) $(isofile_LDADD) $(LIBS) isofile2$(EXEEXT): $(isofile2_OBJECTS) $(isofile2_DEPENDENCIES) @rm -f isofile2$(EXEEXT) $(LINK) $(isofile2_OBJECTS) $(isofile2_LDADD) $(LIBS) isofuzzy$(EXEEXT): $(isofuzzy_OBJECTS) $(isofuzzy_DEPENDENCIES) @rm -f isofuzzy$(EXEEXT) $(LINK) $(isofuzzy_OBJECTS) $(isofuzzy_LDADD) $(LIBS) isolist$(EXEEXT): $(isolist_OBJECTS) $(isolist_DEPENDENCIES) @rm -f isolist$(EXEEXT) $(LINK) $(isolist_OBJECTS) $(isolist_LDADD) $(LIBS) isolsn$(EXEEXT): $(isolsn_OBJECTS) $(isolsn_DEPENDENCIES) @rm -f isolsn$(EXEEXT) $(LINK) $(isolsn_OBJECTS) $(isolsn_LDADD) $(LIBS) mmc1$(EXEEXT): $(mmc1_OBJECTS) $(mmc1_DEPENDENCIES) @rm -f mmc1$(EXEEXT) $(LINK) $(mmc1_OBJECTS) $(mmc1_LDADD) $(LIBS) mmc2$(EXEEXT): $(mmc2_OBJECTS) $(mmc2_DEPENDENCIES) @rm -f mmc2$(EXEEXT) $(LINK) $(mmc2_OBJECTS) $(mmc2_LDADD) $(LIBS) mmc2a$(EXEEXT): $(mmc2a_OBJECTS) $(mmc2a_DEPENDENCIES) @rm -f mmc2a$(EXEEXT) $(LINK) $(mmc2a_OBJECTS) $(mmc2a_LDADD) $(LIBS) mmc3$(EXEEXT): $(mmc3_OBJECTS) $(mmc3_DEPENDENCIES) @rm -f mmc3$(EXEEXT) $(LINK) $(mmc3_OBJECTS) $(mmc3_LDADD) $(LIBS) paranoia$(EXEEXT): $(paranoia_OBJECTS) $(paranoia_DEPENDENCIES) @rm -f paranoia$(EXEEXT) $(LINK) $(paranoia_OBJECTS) $(paranoia_LDADD) $(LIBS) paranoia2$(EXEEXT): $(paranoia2_OBJECTS) $(paranoia2_DEPENDENCIES) @rm -f paranoia2$(EXEEXT) $(LINK) $(paranoia2_OBJECTS) $(paranoia2_LDADD) $(LIBS) sample3$(EXEEXT): $(sample3_OBJECTS) $(sample3_DEPENDENCIES) @rm -f sample3$(EXEEXT) $(LINK) $(sample3_OBJECTS) $(sample3_LDADD) $(LIBS) sample4$(EXEEXT): $(sample4_OBJECTS) $(sample4_DEPENDENCIES) @rm -f sample4$(EXEEXT) $(LINK) $(sample4_OBJECTS) $(sample4_LDADD) $(LIBS) tracks$(EXEEXT): $(tracks_OBJECTS) $(tracks_DEPENDENCIES) @rm -f tracks$(EXEEXT) $(LINK) $(tracks_OBJECTS) $(tracks_LDADD) $(LIBS) udf1$(EXEEXT): $(udf1_OBJECTS) $(udf1_DEPENDENCIES) @rm -f udf1$(EXEEXT) $(LINK) $(udf1_OBJECTS) $(udf1_LDADD) $(LIBS) udffile$(EXEEXT): $(udffile_OBJECTS) $(udffile_DEPENDENCIES) @rm -f udffile$(EXEEXT) $(LINK) $(udffile_OBJECTS) $(udffile_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audio.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdchange.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdio-eject.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdtext.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/device.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drives.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eject.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isofile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isofile2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isofuzzy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isolist.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isolsn.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmc1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmc2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmc2a.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmc3.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/paranoia.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/paranoia2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sample3.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sample4.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tracks.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/udf1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/udffile.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-recursive all-am: Makefile $(PROGRAMS) installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \ ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool \ clean-noinstPROGRAMS ctags ctags-recursive distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libcdio-0.83/libcdio.pc.in0000644000175000017500000000043411126441340012325 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: @PACKAGE_NAME@ Description: Portable CD-ROM I/O library Version: @PACKAGE_VERSION@ #Requires: glib-2.0 Libs: -L${libdir} -lcdio @LIBS@ @LTLIBICONV@ @DARWIN_PKG_LIB_HACK@ Cflags: -I${includedir} libcdio-0.83/ChangeLog0000644000175000017500000157234011652210413011553 000000000000002011-10-26 R. Bernstein * doc/how-to-make-a-release.txt: Administrivia. 2011-10-26 R. Bernstein * include/cdio/mmc.h, include/cdio/mmc_hl_cmds.h, include/cdio/mmc_ll_cmds.h: Reduce doxygen warnings regarding documenting some parameters. 2011-10-26 R. Bernstein * configure.ac: Get ready for 0.83 release 2011-10-21 rocky * INSTALL: INSTALL got clobbered 2011-10-21 R. Bernstein * INSTALL, configure.ac, lib/cdda_interface/Makefile.am, lib/driver/Makefile.am, lib/iso9660/Makefile.am, lib/paranoia/Makefile.am, lib/udf/Makefile.am: Makefile.am: Increase shared library "current" numbers, zeroing "revision" and "age ". configure.ac: require autoconf at least 2.67 2011-10-21 rocky * test/Makefile.am: Forgot to add check_legal.regex 2011-10-21 rocky * README.develop: Add version numbers for autoconf and automake. 2011-10-21 rocky Merge branch 'master' of git.sv.gnu.org:/srv/git/libcdio 2011-10-21 R. Bernstein * README.libcdio, doc/libcdio.texi, example/isofile.c: libcdio.texi: add information about the cdio/cdio_config.h and cdio_unconfig.hs header mess. README.libcdio: revise for FreeBSD and other BSDs. 2011-10-20 R. Bernstein * README: Note there is limited support for writing via MMC as noted by Thomash Schmitt. 2011-10-20 R. Bernstein * include/cdio/Makefile.am, src/cd-paranoia/Makefile.am: src/cd-paranoia.h and include/cdio/cdio_config.h are derived files, so don't include them in the distribution. 2011-10-20 R. Bernstein * include/cdio/Makefile.am, include/cdio/cdio_unconfig.h, test/.gitignore, test/Makefile.am, test/testunconfig.c: Add an include to remove any C Preprocessor symbol libcdio's config.h creates. Programs using libcdio can do this: // for cdio: // for your program 2011-10-20 R. Bernstein * example/cdchange.c, example/isolist.c, example/isolsn.c, example/mmc1.c, example/mmc2.c, example/mmc2a.c, example/mmc3.c, example/paranoia.c, example/udffile.c, include/cdio/Makefile.am, lib/cdda_interface/common_interface.c, lib/cdda_interface/common_interface.h, lib/cdda_interface/drive_exceptions.c, lib/cdda_interface/toc.c, lib/cdda_interface/utils.c, lib/cdio++/devices.cpp, lib/cdio++/iso9660.cpp, lib/driver/FreeBSD/freebsd.c, lib/driver/MSWindows/aspi32.c, lib/driver/MSWindows/win32.c, lib/driver/_cdio_generic.c, lib/driver/_cdio_stdio.c, lib/driver/_cdio_stream.c, lib/driver/aix.c, lib/driver/audio.c, lib/driver/bsdi.c, lib/driver/cd_types.c, lib/driver/cdio.c, lib/driver/cdio_assert.h, lib/driver/cdtext.c, lib/driver/device.c, lib/driver/disc.c, lib/driver/ds.c, lib/driver/gnu_linux.c, lib/driver/image.h, lib/driver/image/bincue.c, lib/driver/image/nrg.c, lib/driver/image_common.c, lib/driver/logging.c, lib/driver/mmc/mmc.c, lib/driver/mmc/mmc_hl_cmds.c, lib/driver/mmc/mmc_ll_cmds.c, lib/driver/mmc/mmc_util.c, lib/driver/netbsd.c, lib/driver/os2.c, lib/driver/osx.c, lib/driver/portable.h, lib/driver/read.c, lib/driver/realpath.c, lib/driver/sector.c, lib/driver/solaris.c, lib/driver/track.c, lib/driver/utf8.c, lib/driver/util.c, lib/iso9660/iso9660_fs.c, lib/iso9660/iso9660_private.h, lib/iso9660/xa.c, lib/paranoia/gap.c, lib/paranoia/isort.c, lib/paranoia/overlap.c, lib/paranoia/p_block.c, lib/paranoia/paranoia.c, lib/udf/filemode.c, lib/udf/udf_fs.c, lib/udf/udf_private.h, lib/udf/udf_time.c, src/cd-paranoia/cd-paranoia.c, src/cd-paranoia/report.c, src/cdda-player.c, src/cddb.c, src/mmc-tool.c, src/util.h, test/check_sizeof.c, test/driver/bincue.c.in, test/driver/cdrdao.c.in, test/driver/freebsd.c, test/driver/gnu_linux.c, test/driver/helper.c, test/driver/mmc_read.c, test/driver/mmc_write.c, test/driver/nrg.c.in, test/driver/osx.c, test/driver/realpath.c, test/driver/solaris.c, test/driver/win32.c, test/test_lib_driver_util.c, test/testassert.c, test/testdefault.c, test/testgetdevices.c.in, test/testischar.c, test/testiso9660.c, test/testisocd.c, test/testparanoia.c, test/testpregap.c.in: Make sure config.h or the copy of that gets included only once to reduce duplicate include warnings. 2011-10-20 R. Bernstein * configure.ac, include/cdio/Makefile.am, lib/driver/cdtext.c, lib/driver/utf8.c, src/cd-info.c: Correct test for enable_cdda to accept either curses.h *or* ncurses.h Add in more places that use bzero. Checks suggested by Blake Jones. Add preprocessor symbol CDIO_CONFIG_H to 2011-10-20 rocky * THANKS: Add Dagobert Michelson to the growing list. 2011-10-20 R. Bernstein * example/README: Note that some adjustments might be needed to compile example programs 2011-10-20 R. Bernstein * Makefile.am, doc/Makefile.am, src/cd-paranoia/Makefile.am: Add remake --task documentation 2011-10-19 R. Bernstein * src/util.h: Add to pick up definition of bzero. 2011-10-19 R. Bernstein * README.develop, example/sample3.c, include/cdio++/iso9660.hpp, src/cd-drive.c, src/cd-paranoia/Makefile.am, test/check_legal.regex: Remove CVS $Id$ line which is no longer automatically updated. ios9660.hpp under FS because of Solaris macro conflict as suggested by Thomas Schmitt. cd-drive.c: add some casts to remove gcc warnings src/cd-paranoia/Makefile.am: remove a GNU make idiom. README.develop: note needing GNU make or remake 2011-10-19 R. Bernstein * example/mmc3.c, example/sample3.c, example/sample4.c: Remove some warnings 2011-10-19 R. Bernstein * lib/driver/gnu_linux.c: sprintf -> snprintf 2011-10-20 rocky * lib/driver/solaris.c: solaris.c: sprintf->snprintf as implicitly suggested by Thomas Schmitt 2011-10-20 rocky * lib/iso9660/rock.c, test/check_common_fn.in: rock.c: small C-Preprocessor bug noticed on Solaris 10 sparc. check_common_fn.in: avoid == for older /bin/sh as Solaris has 2011-10-18 R. Bernstein Merge branch 'master' of git.sv.gnu.org:/srv/git/libcdio 2011-10-18 R. Bernstein * lib/driver/solaris.c: Solaris patch from Thomas Schmitt to make the Solaris driver capable of detecting drives without vold, and how to implement access mode MMC_RDWR. 2011-10-18 rocky * NEWS: Update NEWS for pending 0.83 release. 2011-10-04 R. Bernstein * src/util.c, test/cdda-mcn.right, test/cdda-read.right, test/cdda.right, test/check_common_fn.in, test/check_opts.sh, test/check_opts0.right, test/check_opts1.right, test/check_opts2.right, test/check_opts3.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right, test/copying-rr.right, test/copying.right, test/fsf.right, test/isofs-m1-no-rr.right, test/isofs-m1-read.right, test/isofs-m1.right, test/joliet-nojoliet.right, test/joliet.right, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/vcd_demo.right, test/vcd_demo_vcdinfo.right, test/vcd_demo_vcdinfo_toc.right, test/videocd.right: --no-header omits warranty. Patch from Martin von Gagem. Savannah #29307. 2011-09-12 R. Bernstein * src/cd-info.c: Give CDDB info if *any* tracks are found to be audio tracks. 2011-08-25 rocky * lib/driver/MSWindows/win32_ioctl.c: Fix a couple of sizeof syntax errors in converting sprintf to snprintf. See bug #34125. 2011-07-08 rocky * configure.ac, include/cdio/Makefile.am: Use "make" to create include/cdio/cdio_config.h rather than do it in the configure script. 2011-07-08 rocky * include/cdio/paranoia.h, lib/paranoia/paranoia.c: Reduce range of seek in paranoia_seek to be int32_t. CDDA's definitely live within this range. off_t is influenced by _FILE_OFFSET_BITS and can cause problems on a 32-bit system where _FILE_OFFSET_BITS is set to 64. See Bastiaan Timmer's posting to libcdio-help on July 7, 2011. 2011-07-07 rocky * configure.ac: Copy all of config.h in order to get _FILE_OFFSET_BITS. 2011-05-31 R. Bernstein * lib/iso9660/iso9660_fs.c, src/iso-info.c: Two more Coverty static analysis issues addressed by Honza Horak. 2011-05-30 rocky * example/audio.c, example/mmc2a.c, example/paranoia.c, lib/cdda_interface/cddap_interface.c, lib/cdda_interface/common_interface.c, lib/cdda_interface/scan_devices.c, lib/driver/device.c, lib/driver/gnu_linux.c, lib/driver/image/cdrdao.c, lib/driver/image/nrg.c, lib/driver/mmc/mmc.c, lib/driver/read.c, lib/iso9660/iso9660_fs.c, lib/paranoia/paranoia.c, lib/udf/udf_file.c, lib/udf/udf_fs.c, src/cd-info.c, src/cd-paranoia/cd-paranoia.c, src/cd-read.c, src/iso-info.c: patch from Honza Horak using Coverity's static analysis tool. 2011-05-27 R. Bernstein * lib/driver/MSWindows/win32_ioctl.c, lib/driver/solaris.c, src/cdda-player.c: Change a number of sprintf's to snprintf. 2011-05-20 R. Bernstein * README.libcdio, configure.ac: configure.ac: remove no AC_LANG_SOURCE call detected. (From Christopher Yeleighton) 2011-05-19 R. Bernstein * INSTALL: Typo 2011-05-19 R. Bernstein * .gitignore, INSTALL: More specific install instructions 2011-05-19 R. Bernstein * INSTALL.git: INSTALL.git information is in README.develop 2011-05-19 R. Bernstein * README.develop, README.libcdio: Update development install instructions and libcdio-specific "configure" options. 2011-05-19 R. Bernstein * test/cdda.right: Adjust test output - track now has width for two digits. 2011-05-19 R. Bernstein * INSTALL.git, Makefile.am, README, doc/Makefile.am, doc/doxygen/html/.cvsignore, example/audio.c, include/cdio++/enum.hpp, include/cdio++/read.hpp, include/cdio/rock.h, include/cdio/scsi_mmc.h, lib/driver/portable.h, lib/driver/sector.c, lib/iso9660/xa.c, package/libcdio.spec.in, parse/toc.y, src/Makefile.am, src/cd-drive.help2man, src/cd-info.help2man, src/cd-paranoia/doc/en/cd-paranoia.1.in, src/cd-paranoia/header.c, src/cd-read.help2man, src/cdda-player.c, src/cdinfo-linux.c, src/iso-info.help2man, src/iso-read.help2man, src/util.c, src/util.h: Add git install instructions. Simplify and customize INSTALL. Add dependency to cause version.texi to get created. Update my email address. 2011-05-18 rocky * THANKS, include/cdio/audio.h, include/cdio/types.h, include/cdio/udf_file.h, lib/driver/mmc/mmc.c, src/cd-info.c: Add ISRC track info to cd-info output. Code from Scot C. Bontrager. 2011-05-18 R. Bernstein * src/cdda-player.c: Correct wording in cdda-player comments. For Christopher Yeleighton, among others. 2011-05-18 R. Bernstein * src/cdda-player.c: Don't wrap-around volume adjustment for cdda-player. The rationale is that folks might not look at the volume indicator or know what the max or min values are. See issue #33333 by Christopher Yeleighton. 2011-05-17 rocky * lib/driver/libcdio.sym: Make sure mmc_isrc_track_read_subchannel is a global symbol 2011-05-17 rocky * THANKS, include/cdio/mmc.h, lib/driver/mmc/mmc.c: Add mmc routine to get the ISRC information on a CD that is in the q subchannel but not showing up in the CDTEXT. Contributed by Scot C. Bontrager. 2011-04-23 R. Bernstein * example/cdtext.c, lib/driver/cdtext.c, lib/driver/cdtext_private.h: From Leon Merten Lohse https://savannah.gnu.org/patch/?7532: * discid field extraction * genre field extraction (experimental) * blocksize field extraction * read charcode from blocksize field * some unneeded comments removed * unneeded local variables removed * typos 2011-03-28 R. Bernstein Merge branch 'master' of git.sv.gnu.org:/srv/git/libcdio 2011-03-28 R. Bernstein * lib/iso9660/iso9660.c: Don't think NULL is valid as a parameter any more. 2011-03-28 R. Bernstein * lib/driver/cdtext.c: CD-text patches from Leon Merten Lohse to handle double-byte strings. See https://savannah.gnu.org/patch/?7516 2011-02-24 rocky * src/cd-read.c: Correct erroneous error message. Thanks to Bas Timmer via libcdio-help. 2010-11-30 R. Bernstein * lib/iso9660/rock.c, src/util.c: Guard against not having S_ISLNK and S_ISSOCK. 2010-11-10 R. Bernstein * lib/cdda_interface/scan_devices.c: Memoery leak reported in paranoia-dev. Fix from billy.donahue. 2010-10-26 R. Bernstein * Makefile.am, lib/udf/udf_file.c: Makefile.am: Variable was misspelled 2010-10-22 R. Bernstein Merge branch 'master' of git.sv.gnu.org:/srv/git/libcdio 2010-10-22 R. Bernstein * include/cdio/udf.h, lib/udf/libudf.sym, lib/udf/udf_file.c, lib/udf/udf_private.h: udf.h, libudf.sym, udf_private.h: expose struct udf_dirent_s and udf_get_lba() udf_file.c: udf_read_block() Raise level of severity on warning when requested blocks exceed the number in the extent. 2010-08-27 rocky Merge branch 'master' of git.sv.gnu.org:/srv/git/libcdio 2010-08-27 rocky * include/cdio/udf.h: Typo in doxygen comment 2010-05-30 R. Bernstein * example/cdchange.c, example/isofile.c, example/isofile2.c, example/isofuzzy.c, example/paranoia.c, example/udffile.c: config.h has to come first else _FILE_OFFSET_BITS are redefined in say opensolaris. Part 2 of patch from Thomas Schmitt 2010-05-30 R. Bernstein Merge branch 'master' of git.sv.gnu.org:/srv/git/libcdio 2010-05-30 R. Bernstein * lib/cdda_interface/common_interface.c, lib/cdda_interface/common_interface.h, lib/udf/udf.c, lib/udf/udf_file.c, src/cd-paranoia/Makefile.am, src/cd-paranoia/report.c: Some of the patches from Thomash Schmitt on http://lists.gnu.org/archive/html/libcdio-devel/2010-05/msg00005.html. More later when I get back to the states. 2010-05-11 R. Bernstein * include/cdio/dvd.h: uint8_t -> unsigned int. http://en.wikipedia.org/wiki/C_syntax#Bit_fields via Thomas Schmitt 2010-05-11 R. Bernstein * src/cdda-player.c: Silence another GCC warning. Thanks to Thomas Schmitt for this. 2010-05-11 R. Bernstein * include/cdio/mmc.h: Typo found by Thomas Schmitt. 2010-05-07 rocky * lib/driver/FreeBSD/freebsd_cam.c: From Thomas Schmitt: in order to preserve the current behavior over the CAM changes. 2010-03-23 R. Bernstein * lib/iso9660/iso9660.c: Compile error when Rock Ridge support is disabled. Savannah bug #29308. 2010-03-23 R. Bernstein * configure.ac: Savannah Patch #7129 from Mike Frysinger: specifies user-visible e-mail address in AC_INIT - uses AC_HELP_STRING() for enable/with options - uses AC_MSG_* instead of `echo` for user notices - removes redundant test checks for enable/with options - fixes 3rd arg handling with AC_ARG_ENABLE and --enable-rock and --enable-cddb and --enable-vcd-info - properly quotes enable/with variables in case someone passes a value with spaces as the enable/with value 2010-03-23 R. Bernstein * lib/driver/disc.c: Track discmode_t (include/disc.h) enumeration changes 2010-02-22 R. Bernstein * include/cdio/Makefile.am, include/cdio/device.h, include/cdio/mmc.h, include/cdio/mmc_util.h, lib/driver/Makefile.am, lib/driver/mmc/mmc.c, lib/driver/mmc/mmc_util.c, test/driver/.gitignore: mmc_util.{c,h} Break simpler non-dependent mmc helper or utility routines from mmc.{c,h} 2010-02-11 R. Bernstein * configure.ac, example/cdchange.c: Start to remove sleep in favor of usleep. Bug #28543. 2010-02-11 R. Bernstein * lib/driver/mmc/mmc_hl_cmds.c: Small change 2010-02-11 R. Bernstein * include/cdio/mmc.h, include/cdio/mmc_hl_cmds.h, lib/driver/mmc/mmc.c, lib/driver/mmc/mmc_hl_cmds.c, test/driver/mmc_read.c: Move another routine from mmc.c into mmc_hl_cmds.c 2010-02-11 R. Bernstein * test/driver/mmc_read.c: Fix Minor test bug 2010-02-11 R. Bernstein * test/driver/mmc_read.c, test/driver/mmc_write.c: Go over for coding and code style. 2010-02-10 R. Bernstein * test/driver/mmc_write.c: Small changes 2010-02-10 R. Bernstein * include/cdio/mmc_ll_cmds.h, lib/driver/mmc/mmc_ll_cmds.c, test/driver/Makefile.am, test/driver/mmc.c, test/driver/mmc_read.c, test/driver/mmc_write.c: Split off MMC tests which don't involve exclusive access from those that do. 2010-02-09 R. Bernstein * example/mmc1.c, include/cdio/Makefile.am, include/cdio/mmc.h, include/cdio/mmc_cmds.h, include/cdio/mmc_hl_cmds.h, include/cdio/mmc_ll_cmds.h, lib/driver/libcdio.sym, lib/driver/mmc/mmc.c, lib/driver/mmc/mmc_hl_cmds.c, lib/driver/mmc/mmc_ll_cmds.c, test/driver/mmc.c: Add mmc_read_disc_information. Change get_disctype to use it and thus it moves from mmc.c into mmc_hl_cmds.c. Status is now the return type, not erasable. Split mmc_cmds.h into mmc_ll_cmds.h and mmc_hl_cmds.h. test/driver/mmc.c for invalid page check we get the right sense key, asc, and ascq. 2010-02-09 R. Bernstein * lib/driver/MSWindows/win32_ioctl.c: Clear sense request valid flag. 2010-02-09 R. Bernstein * test/driver/mmc.c: Test sense key, sense code and additional sense code on invalid page. 2010-02-09 R. Bernstein * include/cdio/mmc.h: Add CDIO_MMC_GPCMD_READ_TRACK_INFORMATION 2010-02-09 R. Bernstein * lib/driver/libcdio.sym, test/driver/mmc.c: sort libcdio.sym. Remove duplicated tests. 2010-02-09 R. Bernstein * lib/driver/libcdio.sym, test/driver/Makefile.am: Missing some more externals and a file which needs to go into the distribution tarball. 2010-02-09 R. Bernstein * configure.ac, lib/driver/libcdio.sym: Drop version number on automake. Add missing externals to libcdio.sym 2010-02-08 R. Bernstein * include/cdio/mmc.h: Comment spelling typos 2010-02-08 R. Bernstein * example/mmc1.c, test/driver/mmc.c: Use mmc_get_disctype in mmc example. 2010-02-08 R. Bernstein * include/cdio/mmc.h, include/cdio/mmc_cmds.h, lib/driver/mmc/mmc.c, lib/driver/mmc/mmc_hl_cmds.c, test/driver/mmc.c: Remove duplicate cdio_mmc_disctype_t. 2010-02-08 R. Bernstein * lib/driver/mmc/mmc_cmd_helper.h, lib/driver/mmc/mmc_hl_cmds.c, lib/driver/mmc/mmc_ll_cmds.c, test/driver/mmc.c: Fix all fo the bugs I introduced "improving" the code of others. mmc_ll_cmds.c: mmc_mode_select and mmc_get_configuration now work. mmc_hl_cmds.c: bug introduced by turning a var into a pointer to that variable. 2010-02-08 R. Bernstein * doc/glossary.texi, test/driver/mmc.c: glossary.texi: disctype additions/corrections mmc.c: start test of get_disctype, stylisting convention changes. Warning: mmc_get_configuration and mmc_get_mode_select are broken. 2010-02-07 R. Bernstein * doc/glossary.texi: See above. 2010-02-07 R. Bernstein * doc/glossary.texi: Add DVD-R DL, HD DVD-R and HD DVD-RAM. 2010-02-07 R. Bernstein * include/cdio++/mmc.hpp, include/cdio/mmc.h, include/cdio/mmc_cmds.h, lib/driver/MSWindows/win32_ioctl.c, lib/driver/gnu_linux.c, lib/driver/libcdio.sym, lib/driver/mmc/mmc.c, lib/driver/mmc/mmc_hl_cmds.c, lib/driver/mmc/mmc_ll_cmds.c, src/mmc-tool.c, test/driver/mmc.c: Add SCSI-MMC GET CONFIGURATION. Add Frank Endres' disc type determination via MMC. Be more careful to suffix with CDIO_MMC which I hope will reduce possible name conflicts. 2010-02-07 R. Bernstein * include/cdio/mmc.h, include/cdio/mmc_cmds.h, lib/driver/gnu_linux.c, lib/driver/mmc/mmc.c, lib/driver/mmc/mmc_hl_cmds.c, lib/driver/mmc/mmc_ll_cmds.c: Start populating mmc/mmc_hl_cmds.c. Create mmc directory in preparation for making it a library. mmc.h: CDIO_MMC_GPCMD_ALLOW_MEDIUM_REMOVAL -> CDIO_MMC_GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL mmc.c: Move mm_eject_media and mmc_set_drive_speed to mmc/mmc_hl_cmds.c mmc_ll_cmds.c: add mmc_prevent_allow_medium_removal, move mmc_mode_sense to mmc/mmc_hl_cmds.c 2010-02-07 R. Bernstein * include/cdio++/mmc.hpp, include/cdio/mmc_cmds.h, lib/driver/Makefile.am, lib/driver/cdio_private.h, lib/driver/mmc.c, lib/driver/mmc/.gitignore, lib/driver/mmc/Makefile, lib/driver/mmc/mmc.c, lib/driver/mmc/mmc_cmd_helper.h, lib/driver/mmc/mmc_hl_cmds.c, lib/driver/mmc/mmc_ll_cmds.c, lib/driver/mmc/mmc_private.h, lib/driver/mmc_cmds.c, lib/driver/mmc_private.h, src/mmc-tool.c, test/driver/mmc.c: Move more towards making MMC a library. Start to reorganize more to break out 1-1 SCSI-MMC commands (in mmc_ll_cmds.c) from higher-level commands which use the lower-level ones. 2010-02-07 R. Bernstein * include/cdio/mmc.h, include/cdio/mmc_cmds.h, lib/driver/mmc_cmds.c, test/driver/mmc.c: Add mcc_test_unit_ready and mmc_mode_select (buggy). Allow for timeouts on mmc commands - more work needed here too. 2010-02-06 R. Bernstein * include/cdio/mmc.h, include/cdio/mmc_cmds.h, lib/driver/mmc.c, lib/driver/mmc_cmds.c: Small cleanups 2010-02-06 R. Bernstein * include/cdio++/mmc.hpp, include/cdio/mmc.h, include/cdio/mmc_cmds.h, lib/driver/mmc.c, lib/driver/mmc_cmds.c, src/mmc-tool.c, test/driver/mmc.c: lib/driver/mmc.c - DRY code. Warning - might have introduced breakage here *mmc*: mmc_start_stop_media -> mmc_start_stop_unit, CDIO_MMC_GPCMD_START_STOP -> CDIO_MMC_GPCMD_START_STOP_UNIT cdio++/mmc.hpp: Regularize Doxygen comment format. 2010-02-06 R. Bernstein * example/mmc2a.c, include/cdio++/cdio.hpp, include/cdio/Makefile.am, include/cdio/mmc.h, include/cdio/mmc_cmds.h, lib/driver/Makefile.am, lib/driver/device.c, lib/driver/mmc.c, lib/driver/mmc_cmds.c, src/mmc-tool.c, test/driver/mmc.c: Start to split off specific mmc commands from the lower-level internals. 2010-02-06 R. Bernstein * include/cdio/disc.h, include/cdio/dvd.h, lib/driver/_cdio_generic.c: Add CDIO_DISC_MODEs to correspond to updated DVD Book types. 2010-02-06 R. Bernstein * include/cdio/dvd.h: See above 2010-02-06 R. Bernstein * NEWS, include/cdio/dvd.h, lib/driver/disc.c: dvd.h: Update DVD book types disc.c: Add CDIO_DISC_MODE_DVD_OTHER Thanks to Frank Endes and Thomas Schmitt for observing the problem and suggesting the fixes. 2010-02-06 R. Bernstein * lib/driver/disc.c: Had erroneously omitted CDIO_DISC_MODE_DVD_OTHER. Omission pointed out by Frank Endres. 2010-02-05 R. Bernstein * doc/glossary.texi, include/cdio/mmc.h, lib/driver/mmc.c, test/driver/mmc.c: glossary.texi, mmc.h: note acronyms SPC-3, MMC-5, SBC-2. glossary.texi: start using texinfo cross references test/driver/mmc.c: use provided routine for start/stop unit. Warning: might have broken things here. 2010-02-05 R. Bernstein * include/cdio/mmc.h, lib/driver/mmc.c, test/driver/mmc.c: Revise with info from dpANS SCSI Primary Commands-3 (SPC-3). Use sense data structure in mmc_last_cmd_sense. 2010-02-05 R. Bernstein * include/cdio/mmc.h, lib/driver/mmc.c: Add SCSI sense key values. 2010-02-04 R. Bernstein * include/cdio/mmc.h, lib/driver/mmc.c, test/driver/mmc.c: mmc.h: Big endian bytes is not the same as big_endian bitfield mmc.c: more pervasive use of cdio's mmc definitions. 2010-02-03 R. Bernstein * include/cdio/device.h, include/cdio/mmc.h, lib/driver/MSWindows/win32_ioctl.c, test/driver/mmc.c: mmc.h: TEST_UNIT_READY MMC command opcode device.h: Add DRIVER_OP_MMC_SENSE to driver_return_code_t. win32_ioctl.c: work around MS bug where buffer sizes are 0 or 1. Set return code status if sense data passed back. Translate bad parameter MS Windows error into a driver_return_code_t error. test/driver/mmc.c: Reinstate old logic now that the MS Windows driver has been made to work more like other drivers and copes with some of the MS Windows causing failure here. 2010-02-03 R. Bernstein * lib/driver/gnu_linux.c: Fix in changing data types. 2010-02-03 R. Bernstein * include/cdio/mmc.h, lib/driver/MSWindows/win32_ioctl.c, lib/driver/gnu_linux.c: Add more doxygen comments as to sense request information means and add a typedef for mmc_sense_request. Use this in win32_ioctl.c. 2010-02-03 R. Bernstein * include/cdio/mmc.h, include/cdio/types.h, lib/driver/gnu_linux.c: Add type definition for SCSI sense data. 2010-02-02 R. Bernstein * test/driver/mmc.c: Comment out some MMC tests which are failing on GNU/Linux where we are *not* getting sense data back but we are getting failures from ioctl(.. CDROM_SEND_PACKET) 2010-02-02 R. Bernstein Merge branch 'master' of git.sv.gnu.org:/srv/git/libcdio 2010-02-02 R. Bernstein * lib/driver/MSWindows/win32_ioctl.c, test/driver/mmc.c: MS Windows iocontrol SCSI Passthrough fixes. Change test/driver/mmc.c - we can't that when we get sense data, that we also gegt status back that pass through fails. On MS Windows it doesn't seem to work that way. 2010-02-01 R. Bernstein * lib/driver/osx.c: Handle SCSI_MMC_DATA_NONE and copy sense data. Not working since SCSI Pass is still broken. Presumably after that's solved there will be less catch-up work. 2010-01-31 R. Bernstein * lib/driver/MSWindows/win32_ioctl.c: Format windows error messages better. 2010-01-31 R. Bernstein Merge branch 'master' of git.sv.gnu.org:/srv/git/libcdio 2010-01-31 R. Bernstein * lib/driver/MSWindows/win32_ioctl.c, test/driver/mmc.c: MS Windows driver hacking hopefully to get closer to passing back sense data. For now it seems that some pass-through direct doesn't work while the less-good passthrough does. Sigh. 2010-01-31 R. Bernstein * include/cdio/mmc.h, lib/driver/mmc.c, test/driver/mmc.c: Allow a status parameter in mmc_get_disc_eraseable to be NULL. Suggested by Frank Endres on libcdio-devel mailing list. 2010-01-30 R. Bernstein * example/mmc1.c: Update date 2010-01-30 R. Bernstein * example/mmc1.c, test/driver/mmc.c: Linguistic purity. 2010-01-30 R. Bernstein * example/mmc1.c: Show off drive_erasable() in MMC example. 2010-01-29 R. Bernstein * lib/driver/MSWindows/win32.c, lib/driver/MSWindows/win32_ioctl.c, test/driver/gnu_linux.c, test/driver/win32.c: Add cdio_get_arg("scsi-tuple") for Win32 ioctl. 2010-01-29 R. Bernstein * NEWS, include/cdio/mmc.h, lib/driver/mmc.c: Update MMC Feature Profile list 2010-01-29 R. Bernstein * include/cdio/mmc.h, lib/driver/mmc.c, test/driver/mmc.c: Add a driver return code parameter to mmc_get_get_disc_erasable. 2010-01-28 R. Bernstein * NEWS, THANKS, include/cdio/mmc.h, lib/driver/mmc.c, lib/driver/mmc_private.h, test/driver/mmc.c: Add mmc_get_disc_erasable courtesy of Frank Endres. 2010-01-28 R. Bernstein * include/cdio/mmc.h, lib/driver/mmc.c: Fill out parameter descriptions to remove doxygen warnings. 2010-01-28 R. Bernstein * include/cdio/mmc.h, lib/driver/mmc.c, test/driver/bincue.c.in: Regularis some of the mmc Doxygen comments. 2010-01-27 R. Bernstein * src/cd-paranoia/getopt.h: Assume nowadays Standard C is Standard C 2010-01-24 R. Bernstein * test/driver/.gitignore, test/driver/Makefile.am, test/driver/bincue.c.in, test/driver/cdrdao.c.in, test/driver/gnu_linux.c, test/driver/helper.c, test/driver/helper.h, test/driver/nrg.c.in: Start to DRY driver unit tests. 2010-01-23 R. Bernstein * test/driver/bincue.c.in, test/driver/cdrdao.c.in: Reduce verbosity of test programs. For additional verbosity pass a param to the test program. 2010-01-23 R. Bernstein * configure.ac, doc/.gitignore, test/Makefile.am, test/driver/.gitignore, test/driver/Makefile.am, test/driver/cdrdao.c.in, test/testtoc.c: testtoc -> driver/cdrdao.c.in 2010-01-23 R. Bernstein * lib/driver/MSWindows/aspi32.c, lib/driver/MSWindows/win32.c, src/cd-paranoia/.gitignore, test/driver/.gitignore: Better diagnostic messages for MS Window driver. 2010-01-22 R. Bernstein * doc/glossary.texi, doc/libcdio.texi: libcdio.texi: More sectioning with respect to the libraries glossary.texi: Add Thomas Schmitt's DVD Blu-Ray and media information. 2010-01-22 R. Bernstein * doc/libcdio.texi: Input and Control -> Input, Output, and Control thanks to Thomas Schmitt 2010-01-22 R. Bernstein * doc/libcdio.texi, test/driver/.gitignore: Revise section regarding "SCSI, SCSI commands, and MMC commands" 2010-01-21 R. Bernstein * doc/glossary.texi: Thomas Schmitt's corrections and additions. 2010-01-21 R. Bernstein * doc/libcdio.texi: Document corrections courtesy of Thomas Schmitt. 2010-01-21 R. Bernstein * test/driver/.gitignore, test/driver/bincue.c: Document corrections courtesy of Thomas Schmitt. 2010-01-21 R. Bernstein * configure.ac: Allow automake 1.10 2010-01-21 R. Bernstein * test/.gitignore, test/cdda.bin, test/isofs-m1.bin: Remove derived files. 2010-01-21 R. Bernstein * test/Makefile.am, test/cdda.bin, test/driver/bincue.c, test/driver/mmc.c, test/isofs-m1.bin: cygwin fixes. 2010-01-21 R. Bernstein * configure.ac, example/paranoia.c, lib/cdda_interface/utils.c, src/cd-read.c, test/Makefile.am, test/driver/Makefile.am, test/driver/bincue.c, test/driver/bincue.c.in, test/driver/nrg.c.in, test/testnrg.c.in: Remove more warnings. test/testnrg.c.in -> test/driver/nrg.c.in 2010-01-20 R. Bernstein * test/driver/bincue.c, test/driver/bincue.c.in, test/driver/gnu_linux.c: Fold more tests into bi/ncue driver. 2010-01-20 R. Bernstein * test/Makefile.am, test/data/isofs-m1.bin, test/data/isofs-m1.cue, test/driver/.gitignore, test/driver/Makefile.am, test/driver/bincue.c: Make "make dist" package everything again. 2010-01-20 R. Bernstein * configure.ac, doc/.gitignore, doc/doxygen/.gitignore, test/Makefile.am, test/bad-cat1.cue, test/bad-cat1.toc, test/bad-cat2.cue, test/bad-cat2.toc, test/bad-cat3.cue, test/bad-cat3.toc, test/bad-file.toc, test/bad-mode1.cue, test/bad-mode1.toc, test/bad-msf-1.cue, test/bad-msf-1.toc, test/bad-msf-2.cue, test/bad-msf-2.toc, test/bad-msf-3.cue, test/bad-msf-3.toc, test/cdda.bin, test/cdda.cue, test/cdda.toc, test/cdtext.toc, test/check_cd_read.sh, test/check_cue.sh.in, test/check_fuzzyiso.sh, test/check_iso.sh.in, test/check_nrg.sh.in, test/check_opts.sh, test/check_paranoia.sh.in, test/copying-rr.iso, test/copying.iso, test/data/.gitignore, test/data/Makefile.am, test/data/bad-cat1.cue, test/data/bad-cat1.toc, test/data/bad-cat2.cue, test/data/bad-cat2.toc, test/data/bad-cat3.cue, test/data/bad-cat3.toc, test/data/bad-file.toc, test/data/bad-mode1.cue, test/data/bad-mode1.toc, test/data/bad-msf-1.cue, test/data/bad-msf-1.toc, test/data/bad-msf-2.cue, test/data/bad-msf-2.toc, test/data/bad-msf-3.cue, test/data/bad-msf-3.toc, test/data/cdda.bin, test/data/cdda.cue, test/data/cdda.toc, test/data/cdtext.toc, test/data/copying-rr.iso, test/data/copying.iso, test/data/data1.toc, test/data/data2.toc, test/data/data5.toc, test/data/data6.toc, test/data/data7.toc, test/data/isofs-m1.toc, test/data/joliet.iso, test/data/p1.bin, test/data/p1.cue, test/data/p1.nrg, test/data/t1.toc, test/data/t2.toc, test/data/t3.toc, test/data/t4.toc, test/data/t5.toc, test/data/t6.toc, test/data/t7.toc, test/data/t8.toc, test/data/t9.toc, test/data/vcd2.toc, test/data/vcd_demo.toc, test/data/videocd.nrg, test/data1.toc, test/data2.toc, test/data5.toc, test/data6.toc, test/data7.toc, test/driver/.gitignore, test/driver/Makefile.am, test/driver/bincue.c.in, test/isofs-m1.bin, test/isofs-m1.cue, test/isofs-m1.toc, test/joliet.iso, test/p1.bin, test/p1.cue, test/p1.nrg, test/t1.toc, test/t2.toc, test/t3.toc, test/t4.toc, test/t5.toc, test/t6.toc, test/t7.toc, test/t8.toc, test/t9.toc, test/testbincue.c.in, test/testgetdevices.c.in, test/testisocd2.c.in, test/testnrg.c.in, test/testpregap.c.in, test/testtoc.c, test/vcd2.toc, test/vcd_demo.toc, test/videocd.nrg: Reorganize test data for future growth. 2010-01-18 R. Bernstein * doc/libcdio.texi, example/cdchange.c, lib/driver/aix.c, lib/driver/gnu_linux.c: More information around access modes for specific drivers. 2010-01-18 R. Bernstein * lib/driver/MSWindows/aspi32.c, lib/driver/MSWindows/win32.c, test/driver/win32.c: Extend win32 test to check get_arg("mmc-supported?"). Turn ASPI load failer into an info message 2010-01-18 R. Bernstein * lib/driver/MSWindows/win32.c, test/driver/realpath.c: Bug fixes in test/driver programs 2010-01-17 R. Bernstein * doc/libcdio.texi: Start a section on access modes and cdio_get_args. 2010-01-17 R. Bernstein * example/cdchange.c, example/paranoia.c, lib/driver/aix.c, lib/driver/image_common.c, lib/driver/netbsd.c, test/driver/gnu_linux.c: driver/*.c: Add response for get_arg("mmc-supported?") example/*.c: remove compiler wranings. 2010-01-17 R. Bernstein Merge branch 'master' of rocky@git.sv.gnu.org:/srv/git/libcdio 2010-01-17 R. Bernstein * example/udffile.c, lib/driver/libcdio.sym, test/driver/gnu_linux.c: lib/driver/libcdio.sym: cdio_realpath is extern now. udffile.c: remove warning test/driver/gnu_linux.c: don't have scsi-tuple-linux any more. 2010-01-17 R. Bernstein * test/driver/realpath.c: Test was erroneously failing when temp directory had a symbolic link in it (as it does on OSX). 2010-01-16 R. Bernstein * lib/cdda_interface/scan_devices.c: realpath -> cdio_realpath which pretends to be more portable. 2010-01-16 R. Bernstein * lib/driver/gnu_linux.c: Add way to determine if MMC commands are available: get_arg("mmc-supported?") 2010-01-16 R. Bernstein * NEWS, lib/driver/FreeBSD/freebsd.c, lib/driver/FreeBSD/freebsd.h, lib/driver/FreeBSD/freebsd_cam.c, lib/driver/FreeBSD/freebsd_ioctl.c, lib/driver/gnu_linux.c, test/driver/mmc.c: FreeBSD read/write and most-recent scsi sense access courtesy of Thomas Schmitt. 2010-01-16 R. Bernstein * configure.ac, include/cdio/util.h, lib/driver/Makefile.am, lib/driver/_cdio_generic.c, lib/driver/follow_symlink.c, lib/driver/gnu_linux.c, lib/driver/realpath.c, lib/iso9660/iso9660_fs.c, test/driver/Makefile.am, test/driver/follow_symlink.c, test/driver/realpath.c: cdio_follow_symlink -> cdio_realpath which is really POSIX realpath. (Suggestion via Thomas Schmitt.) gnu_linux.c: report errors when they occur. 2010-01-15 R. Bernstein * test/driver/follow_symlink.c: Add doxyen comment for follow_symlink. Add another follow_symlink test. 2010-01-14 R. Bernstein * test/driver/follow_symlink.c: CLean up better by remove temporary symbolic link file. 2010-01-14 R. Bernstein * test/driver/.gitignore, test/driver/Makefile.am, test/driver/follow_symlink.c: include/cdio/util.h: document cdio_follow_symlink. lib/is9660/iso966O_fs.c: Remove a gcc warning test/driver/follow_symlink.c First test of cdio_follow_symlink. Doc 2010-01-13 R. Bernstein * lib/driver/.gitignore, lib/driver/Makefile.am, lib/driver/follow_symlink.c, lib/driver/util.c: Add Thomas Schmitt's bug fixes and standalone code. 2010-01-07 R. Bernstein * lib/driver/FreeBSD/freebsd.c, lib/driver/FreeBSD/freebsd.h: Start to add read-write access mode for FreeBSD. Not working yet. 2010-01-06 R. Bernstein * lib/driver/FreeBSD/freebsd.c, test/driver/freebsd.c: Correct cdio_get_devices for FreeBSD. 2010-01-06 R. Bernstein * test/driver/freebsd.c: First functional (if minimal) FreeBSD test program. 2010-01-06 R. Bernstein * lib/driver/FreeBSD/freebsd_cam.c, test/.gitignore, test/driver/.gitignore, test/driver/Makefile.am, test/driver/freebsd.c: Start FreeBSD driver test. Not currently working though. freebsd.cam: check for error in ioctl. 2010-01-03 R. Bernstein * configure.ac: Let's try FreeBSD driver on FreeBSD 8.x 2010-01-01 R. Bernstein * lib/driver/MSWindows/win32_ioctl.c, lib/driver/gnu_linux.c: Start to request sense data in DeviceIOControl of MS Windows. gnu_linux.c: small changes. 2009-12-31 R. Bernstein * lib/driver/MSWindows/win32.c, lib/driver/MSWindows/win32.h: Closer to having RW access working 2009-12-31 R. Bernstein * test/driver/mmc.c: mmc.c: use OS driver open, not the specific GNU/Linux one 2009-12-31 WIndows XP * lib/driver/MSWindows/win32.c, lib/driver/gnu_linux.c: Last change to gnu_linux.c broke things on non GNU/Linux 2009-12-31 R. Bernstein * NEWS: Update NEWS with scsi-tuple* 2009-12-31 R. Bernstein * lib/driver/_cdio_generic.c, lib/driver/generic.h, lib/driver/gnu_linux.c, test/driver/gnu_linux.c: Add ability to retrieve SCSI tuple for a name and/or fake one up. This helps programs that want to be cd-record compatible. In particular to parameters were added to cdio_get_arg, "scsi-tuple", and "scsi-tuple-linux". Code from Thomas Schmitt. 2009-12-31 R. Bernstein * lib/driver/mmc.c, test/driver/Makefile.am, test/driver/mmc.c: lib/driver/mmc.c: remove bug in dereferencing NULL pointer. (Found in testing ;-) test/driver/mmc.c: MMC command testing code from Thomas Schmitt. 2009-12-26 R. Bernstein * test/driver/Makefile.am, test/driver/osx.c: Start OSX driver test 2009-12-26 R. Bernstein * example/mmc3.c: Don't eject a CDROM drive door in testing. 2009-12-26 WIndows XP * test/driver/Makefile.am, test/driver/win32.c: Start unit test for lib/driver/MSWindows/win32.c 2009-12-26 rocky * example/cdtext.c, example/mmc1.c, example/mmc2.c, example/mmc2a.c, example/mmc3.c, example/paranoia.c, example/paranoia2.c, example/sample4.c, test/testiso9660.c: example/* change failures so the record as skipped tests when running 'make check'. 2009-12-26 R. Bernstein * configure.ac, include/cdio/version.h.in, test/Makefile.am, test/driver/.gitignore, test/driver/Makefile.am, test/driver/gnu_linux.c, test/driver/solaris.c, test/testlinux.c, test/testsolaris.c: Move driver tests into a separate directory. 2009-12-26 WIndows XP * test/testlinux.c, test/testsolaris.c: Small changes 2009-12-26 rocky Merge branch 'master' of rocky@git.sv.gnu.org:/srv/git/libcdio 2009-12-26 rocky * lib/iso9660/iso9660.c: Fix bug in our rewrite of gmtime. 2009-12-25 R. Bernstein Merge branch 'master' of rocky@git.sv.gnu.org:/srv/git/libcdio 2009-12-25 R. Bernstein * include/cdio/version.h.in: Change comment describing LIBCDIO_VERSION_NUM, libcdio_version_num, CDIO_VERSION. 2009-12-25 WIndows XP * lib/driver/MSWindows/aspi32.c, lib/driver/gnu_linux.c: First attempt to add sense retrieval in Windows driver. Clean up return code in run_mmc_cmd_aspi. 2009-12-25 R. Bernstein * configure.ac: Show whether we are building C++ programs in configure output. 2009-12-25 R. Bernstein * include/cdio/version.h.in, lib/driver/libcdio.sym, lib/driver/util.c, test/.gitignore, test/Makefile.am, test/test_lib_driver_util.c: Add run-time variables for libcdio version number/string. 2009-12-25 R. Bernstein * NEWS, THANKS, lib/driver/gnu_linux.c, lib/driver/solaris.c: Recording and retrieval of SCSI sense reply for GNU/Linux. 2009-12-25 R. Bernstein * NEWS, THANKS, include/cdio/mmc.h, lib/driver/generic.h, lib/driver/gnu_linux.c, lib/driver/libcdio.sym, lib/driver/mmc.c, lib/iso9660/iso9660.c: Add interface for retrieval of last SCSI sense command. 2009-12-24 R. Bernstein * lib/driver/gnu_linux.c: Keep indentions the same as the others. 2009-12-24 R. Bernstein * configure.ac: cddb configure patch #6904 for gentoo bug #272788. 2009-12-24 R. Bernstein * lib/driver/gnu_linux.c, lib/driver/solaris.c: On ioctl's, a negative number is considered an unspecified error while a positive number is not. Replace tabs in lines with blanks. 2009-12-23 R. Bernstein * lib/driver/gnu_linux.c, test/testiso9660.c: gnu_linux.c: run_mmc_cmd_linux: be sure to set return return code. testiso9660.c: broke things working when on hacking on Solaris 2009-12-24 rocky * lib/driver/solaris.c, lib/iso9660/iso9660.c, test/.gitignore, test/Makefile.am, test/testsolaris.c: Start Solaris driver test. Driver MMC sets cdio return codes better. 2009-12-24 rocky * lib/iso9660/iso9660.c, test/testiso9660.c: Real test of testiso9660 on Solaris which does not have HAVE_GMTOFF 2009-12-23 R. Bernstein * test/testiso9660.c: Add small test for iso9660_set_dtime_with_timezone and iso9660_get_dtime which is especially useful on systems that don't have the gmtoff. 2009-12-23 R. Bernstein * include/cdio/iso9660.h, lib/iso9660/iso9660.c, lib/iso9660/libiso9660.sym: Start set/get time routines that tolerate no timezone structure in struct tm. Solaris is like that. (I think cygwin too.) 2009-12-20 R. Bernstein * lib/driver/gnu_linux.c: NONBLOCK inadvertently removed. 2009-12-20 R. Bernstein * lib/driver/gnu_linux.c: Writing opens drive exclusive, not nonblock. 2009-12-20 R. Bernstein * .gitignore, lib/driver/gnu_linux.c, test/.gitignore, test/Makefile.am, test/testlinux.c: Add MMC_RDWR access mode - open drive R/W only with this access. Start GNU/Linux test driver. 2009-12-20 Rocky Bernstein (VCDImager Developer) Merge branch 'master' of rocky@git.sv.gnu.org:/srv/git/libcdio 2009-12-20 Rocky Bernstein (VCDImager Developer) * test/testiso9660.c: Disable some iso9660 tests when TM_GMTOFF is not available 2009-12-19 R. Bernstein Merge branch 'master' of rocky@git.sv.gnu.org:/srv/git/libcdio 2009-12-19 R. Bernstein * include/cdio/mmc.h, lib/driver/gnu_linux.c: Thomas Schmitt's first patches towards supporting writing from libcdio. Somewhat experimental and for now just the GNU/Linux driver. 2009-11-26 R. Bernstein * example/Makefile.am: Remove one more example program from distcheck 2009-11-26 R. Bernstein * example/Makefile.am: Remove some example program from make check to make "make distcheck" work easier. I would Rather remove programs than coddle automake. 2009-11-26 R. Bernstein * example/C++/Makefile.am, example/C++/OO/Makefile.am, example/C++/OO/cdtext.cpp, example/C++/OO/device.cpp, example/C++/OO/drives.cpp, example/C++/OO/eject.cpp, example/C++/OO/iso4.cpp, example/C++/OO/isofile.cpp, example/C++/OO/isofile2.cpp, example/C++/OO/isolist.cpp, example/C++/OO/mmc1.cpp, example/C++/OO/mmc2.cpp, example/C++/OO/tracks.cpp, example/C++/device.cpp, example/C++/eject.cpp, example/C++/isofile.cpp, example/C++/isofile2.cpp, example/C++/isolist.cpp, example/C++/mmc1.cpp, example/C++/mmc2.cpp, example/C++/paranoia.cpp, example/C++/paranoia2.cpp, example/Makefile.am, example/audio.c, example/cdchange.c, example/cdio-eject.c, example/cdtext.c, example/device.c, example/drives.c, example/eject.c, example/isofile.c, example/isofile2.c, example/isofuzzy.c, example/paranoia.c, example/paranoia2.c, example/sample3.c, example/sample4.c, example/tracks.c, example/udf1.c, example/udf2.c, example/udffile.c, include/cdio/cdio.h: Possibly make compiling example programs easier from the outside - don't assume HAVE_CONFIG_H is defined but pick up values from the runtime version of that file. We also now run example programs as tests if they are built. 2009-10-29 R. Bernstein * configure.ac: Change tests for S_ISLNK and S_ISSOCK macros from AC_COMPILE_IFELSE to AC_LINK_IFELSE. On Mingw 4.4.0 these macros succeed when they should fail. Patch by carlo.bramix to libcdio-devel 2009-10-27 R. Bernstein * lib/driver/image/bincue.c: Revert one cppcheck style change since gcc complains about it. 2009-10-27 R. Bernstein * example/paranoia.c, lib/cdda_interface/common_interface.c, lib/cdda_interface/smallft.c, lib/cdda_interface/test_interface.c, lib/driver/gnu_linux.c, lib/driver/image/bincue.c, lib/driver/image/nrg.c, test/testparanoia.c: Remove some cppcheck style warnings 2009-10-27 R. Bernstein * lib/cdda_interface/scsi_interface.c, lib/driver/device.c: A couple more memory leaks from cppcheck 2009-10-27 R. Bernstein * configure.ac, doc/doxygen/.gitignore, doc/how-to-make-a-release.txt, example/C++/OO/cdtext.cpp, lib/driver/FreeBSD/freebsd.c, lib/driver/device.c, lib/driver/netbsd.c, lib/iso9660/iso9660_fs.c, src/cd-info.c, src/iso-info.c, test/.gitignore: In 0.83git now. Fix minor leaks in libcdio 0.82 detected by cppcheck via Eric Sesterhenn. 2009-10-27 R. Bernstein * configure.ac, doc/how-to-make-a-release.txt, include/cdio/iso9660.h: Make doxygen clean. Get ready for 0.82 release. 2009-10-22 R. Bernstein * THANKS: Thanks Geoff Bailey. 2009-10-22 R. Bernstein * config.rpath, lib/driver/FreeBSD/freebsd.c: Perhaps adding a real config.rpath will help some of the iconv problems. Remove a compiler warning when not compling in FreeBSD. 2009-10-22 R. Bernstein * lib/driver/FreeBSD/freebsd.c, lib/driver/FreeBSD/freebsd.h: Remove dupicated code caused by mixup with existing get-media-changed code. 2009-10-21 R. Bernstein * example/.gitignore, src/.gitignore, test/.gitignore: Ignore windows executables and stack dumps. 2009-10-21 R. Bernstein * NEWS, lib/driver/FreeBSD/freebsd.c, lib/driver/FreeBSD/freebsd.h, lib/driver/FreeBSD/freebsd_ioctl.c, lib/driver/Makefile.am: NEWS: update what's up lib/driver/Makefile.am: increment library number lib/driver/FreeBSD/*: FreeBSD get_media_changed fixes for ioctl. 2009-07-12 Nicolas Boullis * include/cdio/device.h: Update the documentation in include/cdio/device.h as well. 2009-07-12 Nicolas Boullis * doc/libcdio.texi, example/C++/OO/device.cpp, example/C++/device.cpp, example/device.c, src/cd-drive.c, src/util.c: Remove all remaining uses of CDIO_MIN_DRIVER, CDIO_MAX_DRIVER, CDIO_MIN_DEVICE_DRIVER or CDIO_MAX_DEVICE_DRIVER. 2009-07-12 Nicolas Boullis * lib/driver/libcdio.sym: Export the cdio_drivers and cdio_device_drivers arrays. 2009-07-12 Nicolas Boullis * lib/driver/cdio_private.h, lib/driver/device.c: Remove all other uses of CDIO_MIN_DRIVER, CDIO_MAX_DRIVER, CDIO_MIN_DEVICE_DRIVER or CDIO_MAX_DEVICE_DRIVER within the libcdio library. 2009-07-12 Nicolas Boullis * lib/driver/device.c: Change scan_for_driver to use cdio_drivers and cdio_device_drivers. 2009-07-12 Nicolas Boullis * include/cdio/device.h, lib/driver/device.c: Add new cdio_drivers and cdio_device_drivers arrays. 2009-07-11 R. Bernstein * src/cd-paranoia/cd-paranoia.c: Removed cd-paranoia.c by accident. 2009-07-03 R. Bernstein * src/Makefile.am: MOSTLYCLEANFILES subsumes MAINTAINERCLEANFILES. As Nicolas Boulis points out, want only the latter. 2009-07-02 R. Bernstein Merge branch 'master' of rocky@git.sv.gnu.org:/srv/git/libcdio 2009-07-02 R. Bernstein * configure.ac, example/C++/.gitignore, example/C++/OO/.gitignore, lib/cdda_interface/scan_devices.c, lib/driver/.gitignore, lib/driver/_cdio_generic.c, lib/driver/gnu_linux.c, lib/driver/image/nrg.c, lib/driver/util.c, src/.gitignore, src/Makefile.am, src/cd-paranoia/.gitignore, src/cd-paranoia/cd-paranoia.c, test/Makefile.am, test/testgetdevices.c, test/testgetdevices.c.in: Adapted from patches by Nicolas Boullis on Debian: * alignment issues on sparc * "make check" failure when stderr is not a tty * wrong program name in manpages in tarball * build failure with hurd * "make check" failure on machines with no disc drive * make distclean fixes 2009-06-15 R. Bernstein Merge branch 'master' of rocky@git.sv.gnu.org:/srv/git/libcdio 2009-06-15 R. Bernstein * src/cddb.c, src/cddb.h: Savannah bug #26808 - Multiple definitions of cddb_opts. Helps MinGW/MSys compilation. Patch courtesy of lrn. 2009-05-16 R. Bernstein Merge branch 'master' of rocky@git.sv.gnu.org:/srv/git/libcdio 2009-05-16 rocky * README.develop, src/cd-paranoia/cd-paranoia.c, src/cd-paranoia/usage-copy.h, src/cd-paranoia/usage.txt.in: README.develop: add help2man. Rest - cosmetic changes 2009-05-14 R. Bernstein * lib/driver/cdtext.c: Guard against dereferncing a null cdtext pointer. 2009-04-23 rocky * lib/driver/FreeBSD/freebsd_cam.c: Patch from John Wehle: A side effect of opening the cdrom device on FreeBSD is it locks the drive. This makes cdio_get_media_changed less useful and prevents you from being able to switch disks when using things such as the audacious media player. This patch simply unlocks the drive right after it's opened prior to opening the cam passthrough device. 2009-04-20 rocky * example/C++/README, example/README: Revise for new paranoia descriptions. 2009-04-20 rocky * example/C++/Makefile.am, example/C++/README, example/C++/paranoia.cpp, example/Makefile.am, example/README, example/paranoia.c: paranoia.cpp: write WAV file of up to the first 300 sectors of the first track */Makefile.am remove any created WAV files. README: update paranoia descriptions parananoia.c: track-01.wav -> track01s.wav 2009-04-20 rocky * example/C++/.gitignore, example/C++/OO/.gitignore, example/C++/OO/eject.cpp, example/C++/OO/isofile.cpp, example/C++/isofile.cpp, example/C++/isofile2.cpp, example/paranoia.c: paranoia.c: slight code touch-up. *.cpp remove lint warnings, e.g. int -> unsigned int 2009-04-19 rocky * example/.gitignore: Administrivia 2009-04-19 rocky * doc/libcdio.texi, example/README, example/paranoia.c: Extend paranoia program to write a file with a WAV header 2009-04-19 rocky * .gitignore, example/C++/.gitignore, example/C++/OO/.gitignore: Administrivia 2009-04-05 rocky * README.develop, README.libcdio: Revise installation instructions and add what you need to do if you want to develop libcdio 2009-02-20 R. Bernstein * doc/libcdio.texi: Display copying in texinfo. Patch thanks to Jesse Weinstein. 2009-02-08 R. Bernstein * THANKS, configure.ac, include/cdio/device.h, lib/cdda_interface/common_interface.h, lib/driver/Makefile.am, lib/driver/cdio_private.h, lib/driver/device.c, lib/driver/generic.h, lib/driver/os2.c, src/cd-paranoia/cd-paranoia.c, src/cd-paranoia/report.c, src/cdda-player.c, src/util.c: Add OS/2 driver courtesy of KO Myung-Hun. Security: Add "%s" to cdparanoia's fprintfs 2008-12-30 R. Bernstein * lib/driver/gnu_linux.c: Endless loop when no CD-rom drives. Patch thanks to Adrian Reber 2008-12-28 R. Bernstein * src/Makefile.am: Fix manpage generation on platforms with non-empty EXEEXT, and fix the VPATH build as well. 2008-12-28 R. Bernstein * configure.ac, include/cdio/paranoia.h, include/cdio/sector.h, lib/cdio++/Makefile.am, lib/iso9660/Makefile.am, libcdio.pc.in, libiso9660++.pc.in, libiso9660.pc.in: Use LTLIBICONV instead of LIBICONV. Bug #25201 from Yaakov Selkowitz 2008-12-28 R. Bernstein * Makefile.am: The installation of libcdio++.pc and libiso9660++.pc should be dependent on ENABLE_CXX_BINDINGS, not ENABLE_CPP. Bug #25202 from Yaakov Selkowitz 2008-12-28 R. Bernstein * lib/driver/device.c: Fix Solaris and Win32 conditionals bug #25201 from Yaakov Selkowitz 2008-12-13 R. Bernstein * doc/libcdio.texi: Some small typos. 2008-12-07 R. Bernstein * .gitignore, INSTALL: INSTALL isn't really ours - yet 2008-12-07 R. Bernstein * test/testgetdevices.c: Remove trailing spaces on some lines 2008-12-07 R. Bernstein * test/testgetdevices.c: More verbose about driver installed 2008-12-07 R. Bernstein * INSTALL, test/testgetdevices.c: Correct name for OSX in uname 2008-12-07 R. Bernstein * test/testgetdevices.c: Add more tests for drivers in more OS's. 2008-12-07 R. Bernstein * configure.ac, include/cdio/.gitignore, test/testgetdevices.c: Add check against GNU/Linux driver. More info in include/cdio/config. 2008-12-06 R. Bernstein * example/.gitignore, lib/driver/.gitignore, test/.gitignore: Resolve conflicted files. 2008-12-06 R. Bernstein I hate conflicted merges 2008-12-06 R. Bernstein * include/cdio/device.h, lib/driver/device.c: Fix bug in 0.81 release in adding NetBSD driver. Make device enumerations match internal structures. (Also corrected the name for the non-existent AIX driver.) 2008-12-06 R. Bernstein * example/.gitignore, lib/driver/.gitignore, lib/driver/device.c, test/.gitignore, test/Makefile.am, test/testdefault.c, test/testgetdevices.c: Wasn't checking the range of the device id in cdio_have_driver. Add regression test for checking this too. More git administrivia. 2008-12-06 R. Bernstein * .cvsignore, .gitignore, Makefile.am, NEWS, configure.ac, cvs2cl_header, cvs2cl_usermap, doc/.gitignore, doc/doxygen/.gitignore, example/.cvsignore, example/.gitignore, example/C++/.gitignore, example/C++/OO/.gitignore, include/.gitignore, include/cdio++/.gitignore, include/cdio/.gitignore, lib/.cvsignore, lib/.gitignore, lib/cdda_interface/.gitignore, lib/cdio++/.gitignore, lib/driver/.gitignore, lib/iso9660/.gitignore, lib/paranoia/.gitignore, lib/udf/.gitignore, parse/.cvsignore, parse/.gitignore, src/.gitignore, src/cd-paranoia/.cvsignore, src/cd-paranoia/.gitignore, src/cd-paranoia/doc/.cvsignore, src/cd-paranoia/doc/.gitignore, src/cd-paranoia/doc/en/.cvsignore, src/cd-paranoia/doc/en/.gitignore, src/cd-paranoia/doc/ja/.cvsignore, src/cd-paranoia/doc/ja/.gitignore, test/.cvsignore, test/.gitignore: Makefile.am: Redo target for ChangeLog to use git2cl. NEWS: Note NetBSD driver added. Reset: git administrivia. 2008-11-29 R. Bernstein * test/p1.nrg: More conversion weirdnesses 2008-11-29 R. Bernstein * .gitignore: Administrivia 2008-11-29 R. Bernstein . 2008-11-29 R. Bernstein * example/.gitignore, lib/cdda_interface/.gitignore, lib/cdio++/.gitignore, lib/driver/.gitignore, lib/iso9660/.gitignore, lib/paranoia/.gitignore, lib/udf/.gitignore, src/.gitignore, src/cd-paranoia/.gitignore, test/.gitignore: More administrivia. 2008-11-29 R. Bernstein * .gitignore, INSTALL, MSVC/README, MSVC/cd-info.vcproj, MSVC/config.h, MSVC/libcdio.sln, MSVC/libcdio.vcproj, Makefile.am, README, README.libcdio, THANKS, TODO, autogen.sh, configure.ac, cvs2cl_header, cvs2cl_usermap, doc/.gitignore, doc/Makefile.am, doc/doxygen/.gitignore, doc/doxygen/Doxyfile.in, doc/doxygen/run_doxygen, doc/fdl.texi, doc/glossary.texi, doc/libcdio.texi, example/.gitignore, example/C++/.cvsignore, example/C++/.gitignore, example/C++/Makefile.am, example/C++/OO/.cvsignore, example/C++/OO/.gitignore, example/C++/OO/Makefile.am, example/C++/OO/cdtext.cpp, example/C++/OO/device.cpp, example/C++/OO/drives.cpp, example/C++/OO/eject.cpp, example/C++/OO/iso4.cpp, example/C++/OO/isofile.cpp, example/C++/OO/isofile2.cpp, example/C++/OO/isolist.cpp, example/C++/OO/mmc1.cpp, example/C++/OO/mmc2.cpp, example/C++/OO/tracks.cpp, example/C++/README, example/C++/device.cpp, example/C++/eject.cpp, example/C++/isofile.cpp, example/C++/isofile2.cpp, example/C++/isolist.cpp, example/C++/mmc1.cpp, example/C++/mmc2.cpp, example/C++/paranoia.cpp, example/C++/paranoia2.cpp, example/Makefile.am, example/README, example/audio.c, example/cdchange.c, example/cdio-eject.c, example/cdtext.c, example/device.c, example/drives.c, example/eject.c, example/isofile.c, example/isofile2.c, example/isofuzzy.c, example/isolist.c, example/isolsn.c, example/mmc1.c, example/mmc2.c, example/mmc2a.c, example/mmc3.c, example/paranoia.c, example/paranoia2.c, example/sample3.c, example/sample4.c, example/tracks.c, example/udf1.c, example/udf2.c, example/udffile.c, include/.gitignore, include/Makefile.am, include/cdio++/.cvsignore, include/cdio++/.gitignore, include/cdio++/Makefile.am, include/cdio++/cdio.hpp, include/cdio++/cdtext.hpp, include/cdio++/device.hpp, include/cdio++/devices.hpp, include/cdio++/disc.hpp, include/cdio++/enum.hpp, include/cdio++/iso9660.hpp, include/cdio++/mmc.hpp, include/cdio++/read.hpp, include/cdio++/track.hpp, include/cdio/.cvsignore, include/cdio/.gitignore, include/cdio/Makefile.am, include/cdio/audio.h, include/cdio/bytesex.h, include/cdio/bytesex_asm.h, include/cdio/cd_types.h, include/cdio/cdda.h, include/cdio/cdio.h, include/cdio/cdtext.h, include/cdio/device.h, include/cdio/disc.h, include/cdio/ds.h, include/cdio/dvd.h, include/cdio/ecma_167.h, include/cdio/iso9660.h, include/cdio/logging.h, include/cdio/mmc.h, include/cdio/paranoia.h, include/cdio/posix.h, include/cdio/read.h, include/cdio/rock.h, include/cdio/scsi_mmc.h, include/cdio/sector.h, include/cdio/track.h, include/cdio/types.h, include/cdio/udf.h, include/cdio/udf_file.h, include/cdio/udf_time.h, include/cdio/utf8.h, include/cdio/util.h, include/cdio/version.h.in, include/cdio/xa.h, lib/.gitignore, lib/Makefile.am, lib/cdda_interface/.cvsignore, lib/cdda_interface/.gitignore, lib/cdda_interface/Makefile.am, lib/cdda_interface/cddap_interface.c, lib/cdda_interface/common_interface.c, lib/cdda_interface/common_interface.h, lib/cdda_interface/drive_exceptions.c, lib/cdda_interface/drive_exceptions.h, lib/cdda_interface/interface.c, lib/cdda_interface/libcdio_cdda.sym, lib/cdda_interface/low_interface.h, lib/cdda_interface/scan_devices.c, lib/cdda_interface/scsi_interface.c, lib/cdda_interface/smallft.c, lib/cdda_interface/smallft.h, lib/cdda_interface/test_interface.c, lib/cdda_interface/toc.c, lib/cdda_interface/utils.c, lib/cdda_interface/utils.h, lib/cdio++/.gitignore, lib/cdio++/Makefile.am, lib/cdio++/cdio.cpp, lib/cdio++/devices.cpp, lib/cdio++/iso9660.cpp, lib/driver/.gitignore, lib/driver/FreeBSD/Makefile, lib/driver/FreeBSD/freebsd.c, lib/driver/FreeBSD/freebsd.h, lib/driver/FreeBSD/freebsd_cam.c, lib/driver/FreeBSD/freebsd_ioctl.c, lib/driver/MSWindows/Makefile, lib/driver/MSWindows/aspi32.c, lib/driver/MSWindows/aspi32.h, lib/driver/MSWindows/win32.c, lib/driver/MSWindows/win32.h, lib/driver/MSWindows/win32_ioctl.c, lib/driver/Makefile.am, lib/driver/_cdio_generic.c, lib/driver/_cdio_stdio.c, lib/driver/_cdio_stdio.h, lib/driver/_cdio_stream.c, lib/driver/_cdio_stream.h, lib/driver/aix.c, lib/driver/audio.c, lib/driver/bsdi.c, lib/driver/cd_types.c, lib/driver/cdio.c, lib/driver/cdio_assert.h, lib/driver/cdio_private.h, lib/driver/cdtext.c, lib/driver/cdtext_private.h, lib/driver/device.c, lib/driver/disc.c, lib/driver/ds.c, lib/driver/generic.h, lib/driver/gnu_linux.c, lib/driver/image.h, lib/driver/image/Makefile, lib/driver/image/bincue.c, lib/driver/image/cdrdao.c, lib/driver/image/nrg.c, lib/driver/image/nrg.h, lib/driver/image_common.c, lib/driver/image_common.h, lib/driver/libcdio.sym, lib/driver/logging.c, lib/driver/mmc.c, lib/driver/mmc_private.h, lib/driver/netbsd.c, lib/driver/osx.c, lib/driver/portable.h, lib/driver/read.c, lib/driver/sector.c, lib/driver/solaris.c, lib/driver/track.c, lib/driver/utf8.c, lib/driver/util.c, lib/iso9660/.cvsignore, lib/iso9660/.gitignore, lib/iso9660/Makefile.am, lib/iso9660/iso9660.c, lib/iso9660/iso9660_fs.c, lib/iso9660/iso9660_private.h, lib/iso9660/libiso9660.sym, lib/iso9660/rock.c, lib/iso9660/xa.c, lib/paranoia/.cvsignore, lib/paranoia/.gitignore, lib/paranoia/Makefile.am, lib/paranoia/gap.c, lib/paranoia/gap.h, lib/paranoia/isort.c, lib/paranoia/isort.h, lib/paranoia/libcdio_paranoia.sym, lib/paranoia/overlap.c, lib/paranoia/overlap.h, lib/paranoia/p_block.c, lib/paranoia/p_block.h, lib/paranoia/paranoia.c, lib/udf/.cvsignore, lib/udf/.gitignore, lib/udf/Makefile.am, lib/udf/filemode.c, lib/udf/libudf.sym, lib/udf/udf.c, lib/udf/udf_file.c, lib/udf/udf_fs.c, lib/udf/udf_fs.h, lib/udf/udf_private.h, lib/udf/udf_time.c, libcdio++.pc.in, libcdio.pc.in, libcdio_cdda.pc.in, libcdio_paranoia.pc.in, libiso9660++.pc.in, libiso9660.pc.in, libudf.pc.in, m4/codeset.m4, m4/iconv.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4, m4/pkg.m4, misc/libcdio.ebuild, package/.gitignore, package/libcdio.spec.in, parse/Makefile, parse/cue.L, parse/cue.y, parse/test/runall, parse/test/t1.cue, parse/test/t2.cue, parse/test/t3.cue, parse/toc.L, parse/toc.y, parse/toclexer.c, parse/toclexer.h, src/.gitignore, src/Makefile.am, src/cd-drive.c, src/cd-drive.help2man, src/cd-info.c, src/cd-info.help2man, src/cd-paranoia/.cvsignore, src/cd-paranoia/.gitignore, src/cd-paranoia/Makefile.am, src/cd-paranoia/buffering_write.c, src/cd-paranoia/buffering_write.h, src/cd-paranoia/cd-paranoia.c, src/cd-paranoia/doc/.cvsignore, src/cd-paranoia/doc/.gitignore, src/cd-paranoia/doc/FAQ.txt, src/cd-paranoia/doc/Makefile.am, src/cd-paranoia/doc/en/.cvsignore, src/cd-paranoia/doc/en/.gitignore, src/cd-paranoia/doc/en/Makefile.am, src/cd-paranoia/doc/en/cd-paranoia.1.in, src/cd-paranoia/doc/ja/.cvsignore, src/cd-paranoia/doc/ja/.gitignore, src/cd-paranoia/doc/ja/Makefile.am, src/cd-paranoia/doc/ja/cd-paranoia.1.in, src/cd-paranoia/doc/overlapdef.txt, src/cd-paranoia/getopt.c, src/cd-paranoia/getopt.h, src/cd-paranoia/getopt1.c, src/cd-paranoia/header.c, src/cd-paranoia/header.h, src/cd-paranoia/pod2c.pl, src/cd-paranoia/report.c, src/cd-paranoia/report.h, src/cd-paranoia/usage-copy.h, src/cd-paranoia/usage.txt.in, src/cd-paranoia/utils.h, src/cd-paranoia/version.h, src/cd-read.c, src/cd-read.help2man, src/cdda-player.c, src/cddb.c, src/cddb.h, src/cdinfo-linux.c, src/getopt.c, src/getopt.h, src/getopt1.c, src/iso-info.c, src/iso-info.help2man, src/iso-read.c, src/iso-read.help2man, src/mmc-tool.c, src/util.c, src/util.h, test/.gitignore, test/Makefile.am, test/bad-cat1.cue, test/bad-cat1.toc, test/bad-cat2.cue, test/bad-cat2.toc, test/bad-cat3.cue, test/bad-cat3.toc, test/bad-file.toc, test/bad-mode1.cue, test/bad-mode1.toc, test/bad-msf-1.cue, test/bad-msf-1.toc, test/bad-msf-2.cue, test/bad-msf-2.toc, test/bad-msf-3.cue, test/bad-msf-3.toc, test/cd-paranoia-log.right, test/cdda-mcn.right, test/cdda-read.right, test/cdda.right, test/cdtext.toc, test/check_cd_read.sh, test/check_common_fn.in, test/check_cue.sh.in, test/check_fuzzyiso.sh, test/check_iso.sh.in, test/check_nrg.sh.in, test/check_opts.sh, test/check_opts0.right, test/check_opts1.right, test/check_opts2.right, test/check_opts3.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right, test/check_paranoia.sh.in, test/check_sizeof.c, test/copying-rr.gpl, test/copying-rr.iso, test/copying-rr.right, test/copying.gpl, test/copying.iso, test/copying.right, test/data1.toc, test/data2.toc, test/data5.toc, test/data6.toc, test/data7.toc, test/fsf.right, test/isofs-m1-no-rr.right, test/isofs-m1-read.right, test/isofs-m1.bin, test/isofs-m1.cue, test/isofs-m1.right, test/isofs-m1.toc, test/joliet-nojoliet.right, test/joliet.iso, test/joliet.right, test/monvoisin.right, test/p1.bin, test/p1.cue, test/p1.nrg, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/t1.toc, test/t2.toc, test/t3.toc, test/t4.toc, test/t5.toc, test/t6.toc, test/t7.toc, test/t8.toc, test/t9.toc, test/testassert.c, test/testbincue.c.in, test/testdefault.c, test/testischar.c, test/testiso9660.c, test/testisocd.c, test/testisocd2.c.in, test/testnrg.c.in, test/testparanoia.c, test/testpregap.c.in, test/testtoc.c, test/udf102.iso, test/vcd2.toc, test/vcd_demo.cue, test/vcd_demo.right, test/vcd_demo.toc, test/vcd_demo_vcdinfo.right, test/vcd_demo_vcdinfo_toc.right, test/videocd.nrg, test/videocd.right: First commit after CVS conversion. Should be just administrative changes. 2008-11-28 R. Bernstein * .gitignore, AUTHORS, MANIFEST.in, Makefile, NEWS, README.txt, cdio.py, data/copying.iso, data/isofs-m1.bin, data/isofs-m1.cue, example/README, example/audio.py, example/cd-read.py, example/cdchange.py, example/device.py, example/drives.py, example/eject.py, example/iso1.py, example/iso2.py, example/iso3.py, example/tracks.py, iso9660.py, pycdio.py, pyiso9660.py, setup.cfg, setup.py, swig/.gitignore, swig/audio.swg, swig/compat.swg, swig/device.swg, swig/device_const.swg, swig/disc.swg, swig/pycdio.i, swig/pyiso9660.i, swig/read.swg, swig/track.swg, swig/types.swg, test/.gitignore, test/cdda.toc, test/test-cdio.py, test/test-iso.py, test/test-isocopy.py: Initial commit after git-cvsimport (import from CVS). 2008-11-28 R. Bernstein * Makefile, example/audio.py, example/cd-read.py, example/cdchange.py, example/device.py, example/drives.py, example/eject.py, example/iso1.py, example/iso2.py, example/iso3.py, example/tracks.py: Remove import path hard-coding. Will have to deal with in a Pythonic way and some package somewhere. 2008-11-28 R. Bernstein * .gitignore, setup.py: Tighter module creation code, and a module name typo from cut and paste. 2008-11-28 R. Bernstein * .gitignore, AUTHORS, Makefile, NEWS, setup.cfg, setup.py, swig/.gitignore, test/.gitignore: Get link arguments from pkg-config. Add more files. 2008-11-28 R. Bernstein * setup.py, swig/.gitignore, test/test-cdio.py, test/test-iso.py, test/test-isocopy.py: Include libcdio libraries as appropriate when making pycdio libraries. 2008-11-27 R. Bernstein * .gitignore, setup.py, swig/pycdio.i, swig/pycdio.swg, swig/pyiso9660.i, swig/pyiso9660.swg, test/test-cdio.py, test/test-iso.py, test/test-isocopy.py: swig compilation and invoking unixcompiler now works. Closer to having setup.py bdist working. Still need to figure out how add libcdio libraries and how to get the test import working. 2008-11-27 rocky * configure.ac: Patch by Mike Frysinger to facilitate cross-compilation. sr #106338 2008-11-25 rocky * configure.ac: Erroneous initialization. See sr #106271 2008-11-25 rocky * configure.ac: Treat uclinux like GNU/Linux. sr #106336 from Mike Frysinger. 2008-11-25 rocky * INSTALL, configure.ac: Remove bit-ordering test in configure.ac since we don't seem to use this at compile time and it fouls up cross compilation. cd-paranoia has tests at run-time. libcdio inherited this from vcdimager which needs it in writing images. It is possible that when libcdio does writing this may come back. Untill then, simplify. 2008-11-23 R. Bernstein * .gitignore, example/README: Add more of the files we need 2008-11-23 R. Bernstein * .gitignore, MANIFEST.in, README.txt, cdio.py, data/copying.iso, data/isofs-m1.bin, data/isofs-m1.cue, example/audio.py, example/cd-read.py, example/cdchange.py, example/device.py, example/drives.py, example/eject.py, example/iso1.py, example/iso2.py, example/iso3.py, example/tracks.py, iso9660.py, pycdio.py, pyiso9660.py, setup.py, swig/audio.swg, swig/compat.swg, swig/device.swg, swig/device_const.swg, swig/disc.swg, swig/pycdio.swg, swig/pyiso9660.swg, swig/read.swg, swig/track.swg, swig/types.swg, test/cdda.bin, test/cdda.cue, test/cdda.toc, test/test-cdio.py, test/test-iso.py, test/test-isocopy.py: First semblance of distutils setuptools. Not complete yet though. 2008-10-29 rocky * configure.ac: Typo in comment 2008-10-29 rocky * configure.ac, lib/cdio++/Makefile.am: Bug fix to allow linker flags --as-needed and --no-undefined. Thanks to Gtz Waschk 2008-10-25 rocky * .cvsignore: One more. 2008-10-25 rocky * Makefile.am: Create a tar.bz2 dist as well as tar.gz. 2008-10-20 rocky * lib/cdda_interface/Makefile.am, lib/cdio++/Makefile.am, lib/driver/Makefile.am, lib/iso9660/Makefile.am, lib/paranoia/Makefile.am: Increment library numbers 2008-10-20 rocky * NEWS: What's up 2008-10-17 rocky * lib/driver/osx.c: patch #6548: fix osx handling. See that for more information 2008-10-17 rocky * test/check_common_fn.in, test/check_iso.sh.in, test/check_paranoia.sh.in: Allow for more cygwin tests to pass 2008-09-29 flameeyes * configure.ac: Don't use echo -n, use subshells instead. echo -n is not working on all shells, in particular it does not seem to work on Sun /bin/sh shell; instead use subshells to have the same output everywhere. 2008-09-22 rocky * doc/libcdio.texi: Typo 2008-09-09 rocky * src/cd-info.c: Nuke cddb disc ID if --no-cddb option is given. 2008-09-09 rocky * test/cdda-mcn.right, test/cdda.right: Output changed when --no-cddb option added. 2008-09-08 rocky * INSTALL, src/cd-info.c: Allow compiling cd-info without cddb. Patch thanks to Fabrice Ménard. 2008-08-31 rocky * lib/driver/Makefile.am: Remove stray @ character in Makefile.am. Thanks yet again to Steve Schultz for finding/fixing. 2008-08-31 flameeyes * example/C++/Makefile.am, example/C++/OO/Makefile.am, example/Makefile.am, lib/driver/Makefile.am, src/Makefile.am, src/cd-paranoia/Makefile.am, test/Makefile.am: Use the LTLIBICONV variable rather than LIBICONV. With this change, instead of using the fully qualified path to the shared object (or the one that the configure think is the fully qualified path), the path where the library is found will be added to the search path and just a generic -liconv will be used. The old variable would be fooled up when /usr/lib/libiconv.so is an LD script that redirects to /lib/libiconv.so, causing failures with some linkers. Also, replace @LIBICONV@ for libcdio itself also with $(LTLIBICONV) or it will fail to link against on uClibc. 2008-08-30 rocky * lib/driver/osx.c: Free memory when recovering from errors. 2008-07-27 rocky * INSTALL, autogen.sh: Pass additional autogen.sh options to configure. 2008-07-27 pjcreath * autogen.sh, config.rpath: Replaced old, messy autogen.sh with a call to autoreconf. (empty config.rpath added for automake 1.10 compatibility) 2008-07-16 rocky * include/cdio/iso9660.h: Another small tweak - make sure macro is undefine'd first. 2008-07-15 rocky * config.rpath, include/cdio/iso9660.h: Undefine ISODCL and note where this comes from. 2008-07-15 rocky * include/cdio/iso9660.h: Remove cdrtools GPL "v2 only" pollution. iso9660.h is from Eric Youngdale's 1993 GPL v2 or later header from mkisofs 2008-06-25 rocky * THANKS, configure.ac, example/cdchange.c, lib/cdda_interface/Makefile.am, lib/cdda_interface/scsi_interface.c, lib/cdio++/Makefile.am, lib/iso9660/Makefile.am, lib/iso9660/iso9660.c, lib/paranoia/Makefile.am, lib/udf/Makefile.am, src/cddb.c, src/cddb.h: Fixes for Mingw+MSYS and DLL support from Carlo Bramini * configure.ac: Added AC_LIBTOOL_WIN32_DLL for enabling the creation of shared libraries. * configure.ac: Added -I$(top_srcdir)/include to LIBCDIO_CFLAGS, it allows to build outside the source tree. * configure.ac: Added LT_NO_UNDEFINED for adding '-no-undefined' switch to libtool when building win32 shared libraries. * configure.ac: Check for Windows.h presence if under Mingw (included for using Sleep() function). * configure.ac: Check for more missing functions: setenv(), unsetenv(), sleep(), gmtime_r(), localtime_r(). * example/cdchange.c: If sleep() function does not exist, it tries to emulate it with a similar code (require inclusion of Windows.h) * src/cddb.c: * lib/cdda_interface/scsi_interface.c: Compilation fails because u_int32_t is undefined. It has been changed to uint32_t to be compliant to all other parts of the libraries. * lib/cdda_interface/Makefile.am: * lib/iso9660/Makefile.am: * lib/cdio++/Makefile.am: * lib/paranoia/Makefile.am: * lib/udf/Makefile.am: * lib/driver/Makefile.am: added LT_NO_UNDEFINED to libtool flags. * lib/iso9660/iso9660.c: Added replacements for setenv(), unsetenv(), gmtime_r\ (), localtime_r(). 2008-06-25 rocky * lib/driver/Makefile.am, lib/driver/gnu_linux.c: Was accessing outside of check2list causing wild looping. Turn all sprintf's to snprintf's and check the return. Turn check1list and check2list looping into a fixed constant number of iterations rather than rely on a sentinal. 2008-06-19 flameeyes * example/audio.c, src/cd-drive.c, src/cd-info.c, src/cd-paranoia/buffering_write.c, src/cd-paranoia/buffering_write.h, src/cd-paranoia/cd-paranoia.c, src/cd-paranoia/pod2c.pl, src/cd-read.c, src/cdda-player.c, src/iso-info.c, src/iso-read.c, src/mmc-tool.c, test/testparanoia.c: Mark variables and constant as static in source tools, examples and tests. Also replace some char pointers with char arrays. 2008-06-19 flameeyes * configure.ac: Fix AC_ARG_WITH and AC_ARG_ENABLE call to use the un-translated option name (that is, using dash rather than underscore). 2008-06-16 flameeyes * lib/driver/cdtext.c: Make cdtext_keywords a static array of arrays. 2008-06-16 flameeyes * .cvsignore: Ignore a few more scripts created by autoreconf -i. 2008-06-16 flameeyes * m4/.cvsignore: Ignore the m4 macro files created by libtool 2.2. 2008-06-16 flameeyes * Makefile.am, configure.ac: Put all macros in the m4 directory, this avoids cluttering the main directory with libtool 2.2 (that split the macros in multiple files). 2008-06-16 flameeyes * lib/cdda_interface/scan_devices.c: Replace character pointers with character arrays, mark constants as static as they are not used outside this translation unit (and some not at all). 2008-06-16 flameeyes * lib/driver/cd_types.c: Replace character pointers in signature_t with properly-sized character arrays. The size of sigs has increased a bit but now the sigs array can stay entirely in .rodata section, with no runtime relocations. Having 128 bytes sized elements also allows for direct random access on the array without multiplications. 2008-06-14 rocky * configure.ac, test/.cvsignore: --disable-example-progs help text wording change Ignore test/testpregap.c since that's now derived testpregap.c.in 2008-06-14 flameeyes * lib/cdda_interface/drive_exceptions.c: Check in the missing file. 2008-06-14 flameeyes * test/Makefile.am: Make testdefault an extra program, so that it's only built explicitly and not during make all. 2008-06-13 flameeyes * lib/driver/gnu_linux.c: Make checklists fit entirely in .rodata sections, by marking them constant and using an array of characters rather than a pointer to character. 2008-06-13 flameeyes * lib/cdda_interface/Makefile.am, lib/cdda_interface/cddap_interface.c, lib/cdda_interface/drive_exceptions.h, lib/cdda_interface/scsi_interface.c, lib/cdda_interface/test_interface.c: Make drive exceptions non-static objects that are shared between multiple units. Also replace the three Dummy functions wth dummy_exception (also common). Bump the revision. This reduces the memory footprint of libcdda_interface of about 200 bytes. 2008-06-13 flameeyes * include/cdio++/iso9660.hpp: Cleanup includes, don't include twice, and include rather than . 2008-06-13 flameeyes * Makefile.am: Remove trailing backslash. 2008-06-13 flameeyes * Makefile.am: Only install libcdio++ and libiso9660++ pkg-config files if C++ bindings are being built and installed. 2008-06-10 pjcreath * config.rpath, m4/libtool.m4: Fix for automake 1.10 and removal of unnecessary m4. 2008-06-10 pjcreath * lib/driver/image/nrg.h, test/testpregap.c.in: Fixed pregap regression failure on non-Intel architectures, removed warnings 2008-06-09 rocky * autogen.sh, m4/.cvsignore, m4/codeset.m4, m4/iconv.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4, m4/libtool.m4, m4/pkg.m4: Copies of distribution m4 macros included to avoid extra installation on OSX. Patch from Peter Creath. 2008-06-03 rocky * NEWS, lib/iso9660/iso9660.c, test/testiso9660.c: More time setting/getting patches - the last of the patches from N. Boullis. Make testiso9660 more stringent now that bugs have been removed. 2008-05-31 rocky * configure.ac, lib/iso9660/iso9660.c: Replace last vestige of non-reentrant gmtime with timegm. Problem determination and fix again from Nicolas Boullis. 2008-05-31 rocky * lib/iso9660/iso9660.c: iso9660_get_ltime: the TZ environment variable was set using a local buffer that disappears when the function terminates. This might lead to segmentation faults. Reset to the old TZ value (if any) or unset the variable if it was previously not set. Problem noted and fixed by Nicolas Boullis. 2008-05-29 rocky * doc/libcdio.texi, lib/iso9660/iso9660.c: iso9660.c: On some architectures (like my powerpc), char is unsigned. So when libcdio tries to adjust "converted ISO9660 timezones" in iso9660_set_ltime on such architectures, it would replace legitimate negative values with 52. Cast &_pv_date[16] to "iso712_t *" and then dereference. Patch from Nicolas Boullis: doc: small spelling typos. 2008-05-28 rocky * include/cdio/iso9660.h, lib/iso9660/iso9660.c, test/testiso9660.c: iso9660.h: parameter name change to match implementation. iso9660.c: use reentrant version of localtime and gettime (most of the time) Patch from Nicolas Boullis. testiso9660.c: Change a memcmp for a test_compare which gives more detailed information on failure. 2008-05-11 rocky * lib/driver/FreeBSD/freebsd.h: Fix prototype mismatch. Savannah Bug #23228 2008-05-09 edsdead * lib/driver/mmc.c: don't shift read_sector_type into reserved field of read cd cdb (resulting in every call being treated as CDIO_MMC_READ_TYPE_ANY) 2008-05-09 edsdead * lib/driver/mmc.c: fix incorrect behavior and potential buffer overrun in mmc_read_cd when i_blocks exceeds MAX_CD_READ_BLOCKS 2008-05-09 edsdead * include/cdio/mmc.h: fix up return type of mmc_run_cmd and mmc_run_cmd_len 2008-05-05 rocky * configure.ac, test/Makefile.am, test/testpregap.c, test/testpregap.c.in: Changes to testpregap.c to allow to build outside of the source tree. 2008-04-26 rocky * src/Makefile.am: restore tab which got lost in cut-and-past. -- A pox on "make". Thanks to Steve Schultz again for keeping us (more) honest. 2008-04-24 rocky * NEWS, THANKS, configure.ac, lib/driver/gnu_linux.c, lib/iso9660/xa.c, lib/udf/udf.c, lib/udf/udf_time.c, src/Makefile.am: Patch from Peter Hartley to allow Cross-compiling to mingw32: - MinGW doesn't have struct timespec, so udf_time.c doesn't compile (changes lib/udf/udf_time.c, configure.ac, config.h.in) - The configure test for bitfield ordering uses AC_TRY_RUN and thus doesn't work when cross-compiling; use sneakiness to try and determine it at compile time, falling back to the existing runtime check if the sneakiness doesn't work (changes configure.ac; tested on x86_64-linux-gnu and i586-mingw32 which are bf_lsbf=1, plus sparc64-linux-gnu which is bf_lsbf=0) - The configure test for "extern long timezone" needlessly uses AC_TRY_RUN when in fact AC_LINK_IFELSE is all we need to know, and that latter works when cross-compiling (changes configure.ac) - MinGW sys/stat.h doesn't have the *GRP or *OTH macros, nor S_IFLNK or S_IFSOCK, nor S_ISUID etc (changes lib/udf/udf.c and lib/iso9660/xa.c) - MinGW doesn't have , so even the header-inclusion bit of the Linux driver doesn't compile unless it's moved inside the "ifdef HAVE_LINUX_CDROM" (changes lib/driver/gnu_linux.c) - Because the man pages cd-info.1 etc depend on the binaries themselves (for help2man reasons), the configure options --without-cd-info etc don't actually stop them being compiled. Fixed by only depending on man pages for programs that are actually built, which also stops the installation of man pages of programs which aren't themselves installed (changes src/Makefile.am) 2008-04-22 karl * lib/driver/_cdio_generic.c, lib/driver/_cdio_stdio.c, lib/driver/_cdio_stdio.h, lib/driver/_cdio_stream.c, lib/driver/_cdio_stream.h, lib/driver/aix.c, lib/driver/audio.c, lib/driver/bsdi.c, lib/driver/cd_types.c, lib/driver/cdio.c, lib/driver/cdio_assert.h, lib/driver/cdio_private.h, lib/driver/cdtext.c, lib/driver/cdtext_private.h, lib/driver/device.c, lib/driver/disc.c, lib/driver/ds.c, lib/driver/generic.h, lib/driver/gnu_linux.c, lib/driver/image.h, lib/driver/image_common.c, lib/driver/image_common.h, lib/driver/logging.c, lib/driver/mmc.c, lib/driver/mmc_private.h, lib/driver/netbsd.c, lib/driver/osx.c, lib/driver/portable.h, lib/driver/read.c, lib/driver/solaris.c, lib/driver/track.c, lib/driver/utf8.c, lib/driver/util.c: gplv3+ 2008-04-21 karl * lib/driver/FreeBSD/Makefile, lib/driver/FreeBSD/freebsd.c, lib/driver/FreeBSD/freebsd.h, lib/driver/FreeBSD/freebsd_cam.c, lib/driver/FreeBSD/freebsd_ioctl.c, lib/driver/MSWindows/Makefile, lib/driver/MSWindows/aspi32.c, lib/driver/MSWindows/aspi32.h, lib/driver/MSWindows/win32.c, lib/driver/MSWindows/win32.h, lib/driver/MSWindows/win32_ioctl.c, lib/driver/image/Makefile, lib/driver/image/bincue.c, lib/driver/image/cdrdao.c, lib/driver/image/nrg.c, lib/driver/image/nrg.h: gplv3+ 2008-04-20 karl * lib/cdio++/cdio.cpp, lib/cdio++/devices.cpp, lib/cdio++/iso9660.cpp: gplv3+ 2008-04-18 karl * lib/iso9660/iso9660.c, lib/iso9660/iso9660_fs.c, lib/iso9660/iso9660_private.h, lib/iso9660/rock.c, lib/iso9660/xa.c, lib/udf/filemode.c, lib/udf/udf.c, lib/udf/udf_file.c, lib/udf/udf_fs.c, lib/udf/udf_fs.h, lib/udf/udf_private.h, lib/udf/udf_time.c: gplv3+ 2008-04-17 karl * doc/Makefile.am, lib/cdda_interface/scsi_interface.c, lib/paranoia/gap.c, lib/paranoia/gap.h, lib/paranoia/isort.c, lib/paranoia/isort.h, lib/paranoia/overlap.c, lib/paranoia/overlap.h, lib/paranoia/p_block.c, lib/paranoia/p_block.h, lib/paranoia/paranoia.c, src/cd-paranoia/doc/Makefile.am, src/cd-paranoia/doc/en/Makefile.am, src/cd-paranoia/doc/ja/Makefile.am: gplv3+ 2008-04-16 karl * lib/cdda_interface/cddap_interface.c, lib/cdda_interface/common_interface.c, lib/cdda_interface/common_interface.h, lib/cdda_interface/drive_exceptions.h, lib/cdda_interface/interface.c, lib/cdda_interface/low_interface.h, lib/cdda_interface/scan_devices.c, lib/cdda_interface/smallft.c, lib/cdda_interface/smallft.h, lib/cdda_interface/test_interface.c, lib/cdda_interface/toc.c, lib/cdda_interface/utils.c, lib/cdda_interface/utils.h: gplv3+ 2008-04-15 rocky * Makefile.am: Install libcdio_paranoia.pc and libcdio_cdda.pc when cdparnaoia is enabled. Thanks to Geotz Waschk for catching this. 2008-04-14 karl * src/cd-drive.c, src/cd-info.c, src/cd-paranoia/pod2c.pl, src/cd-read.c, src/cdda-player.c, src/cddb.c, src/cddb.h, src/cdinfo-linux.c, src/iso-info.c, src/iso-read.c, src/mmc-tool.c, src/util.c, src/util.h: gplv3+ 2008-04-11 karl * src/cd-paranoia/buffering_write.c, src/cd-paranoia/buffering_write.h, src/cd-paranoia/cd-paranoia.c, src/cd-paranoia/header.c, src/cd-paranoia/header.h, src/cd-paranoia/report.c, src/cd-paranoia/report.h, src/cd-paranoia/usage-copy.h, src/cd-paranoia/utils.h, src/cd-paranoia/version.h: gplv3+ 2008-03-28 rocky * lib/driver/gnu_linux.c, lib/driver/netbsd.c: netbsd.c: add more ops. Doc functions, bring more in line with other drivers. 2008-03-28 rocky * include/cdio/device.h, lib/driver/cdio_private.h, lib/driver/netbsd.c, test/Makefile.am: cdio_have_xxx is now private. Add p1.bin to distribution. 2008-03-27 rocky * configure.ac, include/cdio/device.h, lib/driver/Makefile.am, lib/driver/cdio_private.h, lib/driver/device.c, lib/driver/libcdio.sym, lib/driver/netbsd.c, test/Makefile.am: Start NetBSD driver 2008-03-27 edsdead * NEWS: add ISRC updates to NEWS 2008-03-25 karl * include/cdio++/cdio.hpp, include/cdio++/cdtext.hpp, include/cdio++/device.hpp, include/cdio++/devices.hpp, include/cdio++/disc.hpp, include/cdio++/enum.hpp, include/cdio++/iso9660.hpp, include/cdio++/mmc.hpp, include/cdio++/read.hpp, include/cdio++/track.hpp, include/cdio/audio.h, include/cdio/bytesex.h, include/cdio/bytesex_asm.h, include/cdio/cd_types.h, include/cdio/cdda.h, include/cdio/cdio.h, include/cdio/cdtext.h, include/cdio/device.h, include/cdio/disc.h, include/cdio/ds.h, include/cdio/dvd.h, include/cdio/ecma_167.h, include/cdio/iso9660.h, include/cdio/logging.h, include/cdio/mmc.h, include/cdio/paranoia.h, include/cdio/posix.h, include/cdio/read.h, include/cdio/rock.h, include/cdio/scsi_mmc.h, include/cdio/sector.h, include/cdio/track.h, include/cdio/types.h, include/cdio/udf.h, include/cdio/udf_file.h, include/cdio/udf_time.h, include/cdio/utf8.h, include/cdio/util.h, include/cdio/xa.h: gplv3 2008-03-24 karl * example/C++/OO/cdtext.cpp, example/C++/OO/device.cpp, example/C++/OO/drives.cpp, example/C++/OO/eject.cpp, example/C++/OO/iso4.cpp, example/C++/OO/isofile.cpp, example/C++/OO/isofile2.cpp, example/C++/OO/isolist.cpp, example/C++/OO/mmc1.cpp, example/C++/OO/mmc2.cpp, example/C++/OO/tracks.cpp, example/C++/device.cpp, example/C++/eject.cpp, example/C++/isofile.cpp, example/C++/isofile2.cpp, example/C++/isolist.cpp, example/C++/mmc1.cpp, example/C++/mmc2.cpp, example/C++/paranoia.cpp, example/C++/paranoia2.cpp, example/audio.c, example/cdchange.c, example/cdio-eject.c, example/cdtext.c, example/device.c, example/drives.c, example/eject.c, example/isofile.c, example/isofile2.c, example/isofuzzy.c, example/isolist.c, example/isolsn.c, example/mmc1.c, example/mmc2.c, example/mmc2a.c, example/mmc3.c, example/paranoia.c, example/paranoia2.c, example/sample3.c, example/sample4.c, example/tracks.c, example/udf1.c, example/udf2.c, example/udffile.c: gplv3 2008-03-23 karl * parse/Makefile, parse/cue.L, parse/cue.y, parse/toc.L, parse/toc.y, parse/toclexer.c, parse/toclexer.h: gplv3 2008-03-22 rocky * README.libcdio: NetBSD *can* be included in libcdio. Thanks to Karl Berry for pointing out. 2008-03-22 rocky * configure.ac, test/.cvsignore, test/Makefile.am, test/testnrg.c.in: Start a nrg image reading test. 2008-03-22 karl * test/check_cd_read.sh, test/check_common_fn.in, test/check_sizeof.c, test/testassert.c, test/testbincue.c.in, test/testdefault.c, test/testischar.c, test/testiso9660.c, test/testisocd.c, test/testisocd2.c.in, test/testparanoia.c, test/testpregap.c, test/testtoc.c: gplv3 2008-03-21 rocky * NEWS: More Housekeeping 2008-03-21 rocky * test/.cvsignore: Bookkeeping 2008-03-21 rocky * doc/Makefile.am: We no longer use gpl.texi. 2008-03-21 rocky * NEWS, cvs2cl_usermap, lib/driver/cdio_private.h, lib/driver/image/nrg.c: cdio_private.h: Remove type mismatch warning on get_track_pregap_lba when compiling image drivers. nrg.c: initialize previously uninitialzied field. Bug found by Robert William Fuller. cvs2cl_usermap: add esdead and karl NEWS: try to track what's been happening. 2008-03-21 edsdead * lib/driver/image/nrg.c: support cd-text 2008-03-20 karl * INSTALL, Makefile.am, doc/gpl.texi, example/C++/Makefile.am, example/C++/OO/Makefile.am, example/Makefile.am, include/Makefile.am, include/cdio++/Makefile.am, include/cdio/Makefile.am, lib/Makefile.am, lib/cdda_interface/Makefile.am, lib/cdio++/Makefile.am, lib/driver/Makefile.am, lib/iso9660/Makefile.am, lib/paranoia/Makefile.am, lib/udf/Makefile.am, src/Makefile.am, src/cd-paranoia/Makefile.am, test/Makefile.am: update Makefiles to GPLv3+ 2008-03-20 rocky * doc/libcdio.texi: Change some ALL CAPS emphasis to @emph emphasis 2008-03-20 edsdead * lib/driver/image/nrg.c: minor correction to prior commit 2008-03-20 edsdead * lib/driver/image/nrg.c: handle DAO in nrg_read_audio_sectors 2008-03-20 edsdead * test/check_fuzzyiso.sh: expect failure on p1.bin and p1.nrg b/c they are not iso9660 images 2008-03-20 edsdead * include/cdio/track.h, lib/driver/cdio_private.h, lib/driver/image/bincue.c, lib/driver/image/cdrdao.c, lib/driver/image/nrg.c, lib/driver/image/nrg.h, lib/driver/image_common.c, lib/driver/image_common.h, lib/driver/libcdio.sym, lib/driver/track.c: get isrc from nrg files AND new API char * cdio_get_track_isrc(CdIo_t *,track_t); 2008-03-20 edsdead * test/check_paranoia.sh.in: don't need # of blocks without offset 2008-03-19 edsdead * lib/driver/image/bincue.c, lib/driver/image/cdrdao.c, test/cdda-read.right, test/check_paranoia.sh.in: remove 272 byte offset that emulated 68 sample read offset in author's drive 2008-03-19 edsdead * doc/libcdio.texi: added authorship to section on track pre-gaps and cd-da 2008-03-18 edsdead * test/p1.bin, test/p1.cue, test/p1.nrg, test/testpregap.c: tests for pregap api 2008-03-18 edsdead * test/Makefile.am: add testpregap 2008-03-18 karl * NEWS, doc/fdl.texi, doc/libcdio.texi: switch manual to GFDL1.2+ and no invariant sections; systematize front matter; etc. 2008-03-16 rocky * THANKS, configure.ac, doc/libcdio.texi, include/cdio/track.h, lib/driver/Makefile.am, lib/driver/cdio_private.h, lib/driver/image.h, lib/driver/image/bincue.c, lib/driver/image/cdrdao.c, lib/driver/image/nrg.c, lib/driver/image/nrg.h, lib/driver/image_common.c, lib/driver/image_common.h, lib/driver/libcdio.sym, lib/driver/track.c: get_track_pregap_lba, get_track_pregap_lsn. Section on "CD-DA pregap" in libcdio manual. All changes from Robert William Fuller. 2008-03-15 rocky * doc/doxygen/Doxyfile.in: Update for doxygen 1.5.3 2008-03-15 rocky * configure.ac: Assume darwin9 is like darwin8. 2008-03-15 rocky * example/Makefile.am, src/cd-paranoia/Makefile.am, test/Makefile.am: More libiconv escallation. Sigh. 2008-03-15 rocky * test/Makefile.am: libiconv needed in test programs probably as part of the subversive iconv escallation that's been going on. 2008-03-15 rocky * NEWS: Revise before release. 2008-03-15 rocky * Makefile.am, src/Makefile.am: Install pkgconfig files libudf.pc, libcdio++.pc and libiso9660++.pc. Distribute manual pages for standalone utilities. Suggestions thanks to Nicolas Boullis. 2008-03-09 rocky * autogen.sh: Try to undo the damage gettextize does on configure.ac and Makefile.am 2008-03-09 rocky * autogen.sh: fix syntax error 2008-03-09 rocky * Makefile.am, autogen.sh, configure.ac: . 2008-03-09 rocky * Makefile.am: gettext stuff pulled in by gettextize 2008-03-08 rocky * src/cd-paranoia/version.h, test/cd-paranoia-log.right, test/check_paranoia.sh.in: test/check_paranoia.sh.in: need to ignore variance in status. 2008-03-08 rocky * include/cdio/Makefile.am, test/check_paranoia.sh.in: Things needed to make "make distcheck" work. Makefile.am: forgot paranoia.h header. check_paranoia.sh.in: need to compare with "right" file $srcdir not "." 2008-03-08 rocky * autogen.sh: Looks like we need to run gettextize first now 2008-03-06 rocky * test/Makefile.am, test/cd-paranoia-log.right, test/check_paranoia.sh.in: Add a test of new -l option on cd-paranoia. 2008-03-06 rocky * NEWS, src/cd-read.c, src/util.c, src/util.h, test/check_cd_read.sh: cd-read add --mode='any' which is basically a mmc_read_cd with CDIO_MMC_READ_TYPE_ANY. 2008-03-04 rocky * lib/driver/mmc.c: Comment typo 2008-03-03 rocky * src/cd-paranoia/cd-paranoia.c: Remove what looks like a spurious --output-info (-i) option. 2008-02-29 rocky * NEWS, THANKS, src/cd-paranoia/cd-paranoia.c, src/cd-paranoia/doc/en/cd-paranoia.1.in, src/cd-paranoia/usage-copy.h, src/cd-paranoia/usage.txt.in, test/check_paranoia.sh.in: Add option to cd-paranoia to log summary output to a file. Patch from and thanks to Daniel Schwarz. 2008-02-08 rocky * lib/driver/utf8.c, lib/iso9660/iso9660_fs.c: Add checks for memory allocation failures. Patch from Mandriva folks by Gustavo De Nardin via Vincent Danen. Originally for libcdio 0.78.2 See also https://savannah.gnu.org/patch/?6413 2008-01-19 rocky * src/cd-paranoia/cd-paranoia.c: Cast to integer because function it seems really might not be paranoia_mode_t but seems augmented by to additional values below 0. Ugh. 2008-01-18 rocky * AUTHORS: email address change. 2008-01-09 rocky * example/udf1.c: Was accessing out of array bounds. Caught by Stanislav Brabec. 2008-01-09 rocky * include/cdio++/iso9660.hpp, src/cd-info.c, src/iso-info.c, src/mmc-tool.c: cd-info.c iso-info.c More error-tolerant patch from Stanislav Brabec at SuSE. iso9660.hpp: patch to compile libcdio with gcc 4.3 from Cristian Rodriguez via Stanislav Brabec. Add return statement in function returning non-void. mmc-tool.c: remove out-of-bound array access. 2008-01-05 rocky * NEWS, include/cdio/iso9660.h, lib/iso9660/iso9660_fs.c: Note that iso9660_dir_to_name can return NULL if memory allocation fails. 2008-01-05 rocky * lib/iso9660/iso9660_fs.c: Another case of potentially accessing outside of array bounds. Bug caught by Nico Golde. 2008-01-03 rocky * src/cd-info.c, src/iso-info.c: Improper +1 on alloc. 2008-01-01 flameeyes * configure.ac, example/C++/Makefile.am, example/Makefile.am: Add a configure option to disable examples building (useful for distributions, as adding them to noinst will still build them during make all wasting build time. 2007-12-30 rocky * lib/driver/FreeBSD/freebsd.c: get_media_changed is static and shouldn't be compiled unless we are on FreeBSD. 2007-12-30 rocky * src/cd-info.c, src/iso-info.c: Remove possible buffer overrun when long joliet names are used. Savannah Bug #21910. 2007-12-28 rocky * NEWS, configure.ac, test/check_cd_read.sh, test/check_cue.sh.in, test/check_iso.sh.in, test/check_nrg.sh.in, test/check_opts.sh: Build outside of source fixes for TEST. We're in 0.80 land now. 2007-12-28 rocky * lib/driver/FreeBSD/freebsd.c, lib/driver/FreeBSD/freebsd.h: Add get_media_changed method on FreeBSD for drives accessed via CAM (SCSI or ATAPICAM). Patch thanks to Andriy Gapon. 2007-12-15 rocky * configure.ac, doc/how-to-make-a-release.txt, lib/driver/FreeBSD/freebsd.h: Apply kfreebsd patch from Debian. 2007-12-10 rocky * doc/libcdio.texi: Another reference to IEC 60908. Update copyright and email 2007-12-10 rocky * doc/glossary.texi: Add mention of IEC 60908 2007-12-10 rocky * doc/glossary.texi, doc/libcdio.texi: Add wiki reference to the Philips Red Book. 2007-11-21 rocky * include/cdio/mmc.h, lib/driver/libcdio.sym, lib/driver/mmc.c: Run a Multimedia command (MMC) specifying the CDB length. The motivation here is for example ot use in is an undocumented debug command for LG drives (namely E7), whose length is being miscalculated by mmc_get_cmd_len(); it doesn't follow the usual code number to length conventions. Patch supplied by SukkoPera. 2007-11-19 flameeyes * include/cdio++/iso9660.hpp: Add missing include (for GCC 4.3). Patch by Ryan Hill (dirtyepic at gentoo). Patch #6271 at Savannah. 2007-11-17 flameeyes * src/cd-paranoia/Makefile.am: Don't try to use a generic rule for building usage.h or it will fail make distcheck when builddir != srcdir 2007-11-16 flameeyes * lib/iso9660/iso9660.c: Fix logic. 2007-11-16 flameeyes * test/testiso9660.c: Fix name of function. 2007-11-16 flameeyes * lib/iso9660/iso9660.c: Fix typo. 2007-11-16 flameeyes * test/Makefile.am: Don't compile the test programs during make all, make check will take care of that. 2007-11-16 flameeyes * Makefile.am: Fix make dist when run on $builddir != $srcdir. 2007-11-16 flameeyes * test/check_cd_read.sh, test/check_cue.sh.in, test/check_iso.sh.in, test/check_nrg.sh.in, test/check_opts.sh: check_common_fn is in the current dir (build dir), not in $srcdir. 2007-11-16 flameeyes * include/cdio/Makefile.am: Don't install the cdparanoia headers when cd-paranoia is not built nor installed. 2007-11-16 flameeyes * Makefile.am: Do not install the libcdio_paranoia.pc and libcdio_cdda.pc files if cd-paranoia is not built. If we do, the pkg-config based checks will report the presence of libraries that are not present in the system. 2007-11-16 flameeyes * lib/iso9660/iso9660.c: Do not assume that sizeof(int) == sizeof(long), the assumption is wrong on 64-bit arches. Reduce the size of strtol range when filling a struct tm variable. 2007-11-16 flameeyes * lib/driver/utf8.c: Include config.h before checking for HAVE_JOLIET or it will never build the function. 2007-11-16 flameeyes * configure.ac: Unbreak --enable/--disable joliet support. Use AS_HELP_STRING to pretty-print the help message. 2007-11-09 rocky * src/cd-paranoia/pod2c.pl: Apparently cygwin's perl sometimes puts in \r's for linefeeds. Patch from Gary Parks. 2007-10-27 rocky * INSTALL, NEWS, configure.ac: Final 0.79 release 2007-10-21 rocky * src/util.c: Update copyright. 2007-10-17 rocky * src/cd-paranoia/doc/jp/.cvsignore, src/cd-paranoia/doc/jp/Makefile.am, src/cd-paranoia/doc/jp/cd-paranoia.1.in: jp -> ja 2007-10-16 rocky * configure.ac, lib/cdda_interface/cddap_interface.c: libcdio cdparanoia doing the wrong thing on a single-sector read. Savannah patch #5999. 2007-10-15 rocky * NEWS, configure.ac, lib/cdda_interface/Makefile.am, lib/cdio++/Makefile.am, lib/driver/Makefile.am, lib/iso9660/Makefile.am, lib/paranoia/Makefile.am, lib/udf/Makefile.am, src/Makefile.am, src/cd-paranoia/Makefile.am: Remove := in Makefiles for portability. autoconf 1.10 complains about adding AM_PROC_CC_C_O - pander to it. 2007-10-13 rocky * NEWS, lib/cdda_interface/Makefile.am, lib/cdio++/Makefile.am, lib/driver/Makefile.am, lib/iso9660/Makefile.am: Go over shared library revision numbers and NEWS in advance of a Oct 27 0.79 release. 2007-09-28 rocky * lib/paranoia/p_block.c: Ooops - typedef typo 2007-09-28 rocky * include/cdio/paranoia.h, lib/cdda_interface/common_interface.c, lib/paranoia/p_block.c: paranoia.h, p_block.c: Add paranoia_set_range and correct #define in paranoia.h common_interface.c: try to give credit where it is due. 2007-09-28 rocky * THANKS: Add Patrick Guimond 2007-09-28 rocky * lib/cdda_interface/common_interface.c: Not just lead-out gap, but lead-out + pregap 2007-09-28 rocky * lib/cdda_interface/common_interface.c, lib/cdda_interface/toc.c, test/testiso9660.c: Support for multisession CD Extra Discs courtesy of Patrick Guimond. testiso9660.c: remove ltime comparison check. :-( 2007-09-26 rocky * lib/iso9660/iso9660_fs.c: iso9660_open_ext_private(): close image filecupon error. Leds to an open file descriptor making it impossible of e.g. unmounting a CDROM containing the file. Savannah bug #21147. 2007-09-05 rocky * lib/iso9660/iso9660.c, lib/iso9660/iso9660_fs.c, test/check_common_fn.in: iso9660.c: off-by-one bug which was causing dates to come out wrong. Thanks to Nicolas Boullis for finding and fixing. iso9660_fs.c: remove bugs merging code from the last round of changes/enhancements check_common_fn.in: show full iso_read command when it fails. 2007-08-12 rocky * example/.cvsignore: Yet another program, yet another ignore 2007-08-12 rocky * configure.ac, lib/iso9660/iso9660_fs.c, test/.cvsignore, test/Makefile.am, test/testisocd.c, test/testisocd2.c.in: iso9660_fs.c: remove some (but not all) of the redundancy testisocd2.c.in: a test of working with an ISO 9660 image. 2007-08-12 rocky * example/Makefile.am, example/README, example/isolist.c, example/isolsn.c, lib/iso9660/iso9660_fs.c: iso9660_fs.c: remove some bugs in freeing here. isolsn.c: Add a sample program for showing the path for given LSN. 2007-08-11 rocky * include/cdio/iso9660.h, lib/iso9660/Makefile.am, lib/iso9660/iso9660_fs.c, lib/iso9660/libiso9660.sym, test/testisocd.c: Add iso9660_fs_find_lsn_with_path and iso9660_ifs_find_lsn_with_path to report the full filename path of lsn. 2007-08-11 flameeyes * lib/driver/osx.c: Workaround a missing callback, failures are called immediately, sucesses are queued and might not be called properly. 2007-08-09 flameeyes * example/.cvsignore: Ignore udffile too. 2007-08-09 flameeyes * configure.ac, lib/driver/osx.c: Borrow the eject code for OSX from xine-lib-1.2-macos branch, as contributed by Matt Messier. This allows to eject disks on Mac OS X without having to call an external utility. Incidentally this fixes libcdio eject function on Mac OS X 10.4 and later, as hditool was moved from /usr/sbin to /usr/bin. 2007-08-09 flameeyes * example/cdio-eject.c: Include config.h, or the build will fail on at least Mac OS X. 2007-08-09 flameeyes * autogen.sh: Let autogen.sh work on OSX: test for glibtool presence (GNU libtool versus Apple libtool). 2007-08-09 flameeyes * autogen.sh: Accept automake 1.10 as a version greater than1.6. 2007-08-04 rocky * lib/driver/_cdio_generic.c: Small changes 2007-08-04 rocky * lib/iso9660/iso9660.c: Add note about funny strtol test and correct test. Thanks to Nicolas Boullis for finding this. 2007-07-19 rocky * test/testiso9660.c: Check for error status of iso9660_get_dtime and iso9660_get_ltime 2007-06-18 rocky * NEWS: Note last two bugs reported by Eric Shattow. 2007-06-18 rocky * src/cd-paranoia/cd-paranoia.c: Don't expect TOC reading to report audio mode if we are trying to rip prior to the very first track. And don't give an error here either. 2007-06-16 rocky * src/cd-info.c, src/cddb.c, src/cddb.h: CDDB disc id is an unsigned 32-bit integer, not long which could be 64-bits. 2007-05-27 rocky * NEWS: Bugs, bugs, bugs! 2007-05-27 rocky * lib/cdda_interface/scan_devices.c: Remove possible access of uninitialized cdio_hwinfo structure. 2007-05-27 rocky * lib/driver/_cdio_generic.c: Update copyright and email address. 2007-05-27 rocky * lib/driver/_cdio_generic.c: Fix bug in trying to free cd-text when it hasn't been initialized. 2007-05-16 rocky * configure.ac, src/cd-paranoia/doc/Makefile.am, src/cd-paranoia/doc/ja/.cvsignore, src/cd-paranoia/doc/ja/Makefile.am, src/cd-paranoia/doc/ja/cd-paranoia.1.in: Rename Japan locale to ja. Bug #19880. 2007-04-15 rocky * example/cdchange.c: cdchange doesn't use off_t, ssize or any fancy types so it shouldn't #include SYS_TYPES. Furthermore if cdio needs it, it should #include it on its own. 2007-04-15 rocky * example/cdchange.c: Take gcc's suggestion regarding adding parenthesis 2007-04-15 rocky * configure.ac: Was chopping off HAVE_SYS_TYPES declaration. 2007-04-15 rocky * example/cdio-eject.c, include/cdio/read.h: read.h: include sys/types.h since some OS's need it. cdio-eject.c: no real changes. Add copyright. 2007-03-16 rocky * include/cdio/audio.h, include/cdio/read.h: audio.h: doxygenation Address, Copyright change. 2007-03-10 rocky * lib/cdio++/devices.cpp, lib/cdio++/iso9660.cpp: Patches from sms to deal with off_t not getting defined. 2007-03-09 rocky * src/cd-paranoia/doc/en/cd-paranoia.1.in: More potential cdparanoia -> cd-paranoia changes. Note how this differes from cdparanoia (i.e. not much). 2007-03-09 rocky * src/cd-drive.c: Use "getopt.h" , not 2007-03-07 rocky * example/cdchange.c, lib/driver/gnu_linux.c: lib/driver/gnu_linux.c: bug #19221 (possibly): memory Leak opening an inaccessible device. cdchange.c: a stray character got added to the file 2007-03-05 rocky * configure.ac, example/cdchange.c, lib/driver/image/cdrdao.c, lib/iso9660/iso9660.c, src/cd-paranoia/cd-paranoia.c: Better strtol fix based on SMS's remark. 2007-03-05 rocky * example/cdchange.c, lib/driver/image/cdrdao.c, lib/iso9660/iso9660.c, src/cd-paranoia/cd-paranoia.c: Set errno=0 before calling strtol(). bug #18131 2007-02-25 rocky * include/cdio/read.h, lib/driver/read.c: Update cdio_read documentation. 2006-12-20 rocky * lib/iso9660/iso9660_fs.c: Symlinks were sharing stat_buf so freeing one made the pointer to the other invalid. Allocate a separate entry for each symlink. Bug report and patch provided by Antti Perl. Savannah bug #18563 2006-12-14 rocky * lib/driver/utf8.c: Patch by Gergely Szsz to respect --disable-joliet. (Things may change when UDF is more in use though.) Bug report #18522 2006-12-14 rocky * configure.ac: Typo in configure.ac reported by Gergely Szsz, bug report #18522. 2006-12-04 rocky * src/iso-read.c: Had one too many field in structure. 2006-11-30 rocky * configure.ac: Disable libvcdinfo - 2nd try. 2006-11-30 rocky * configure.ac: Disable vcdinfo in cd-info by default. It causes too much of a hassle for too many people. 2006-11-28 gmerlin * lib/driver/util.c: * Fixed potential security issues 2006-11-27 gmerlin * configure.ac, include/cdio/util.h, lib/driver/_cdio_generic.c, lib/driver/gnu_linux.c, lib/driver/util.c: * Better drive detection for Linux * cdio_add_device_list() now adds devices with symlinks only once 2006-11-16 rocky * test/Makefile.am, test/check_iso.sh.in, test/copying-rr.gpl: Add --ignore to iso-read and add a iso-read copying-rr extraction test. 2006-11-16 rocky * NEWS, configure.ac: We really are in 0.79cvs now. 2006-11-16 rocky * src/iso-read.c: Add --ignore (-k). Thanks to Justin F. Hallett for suggesting and testing 2006-11-13 rocky * rbcdio/AUTHORS, rbcdio/Makefile.am, rbcdio/NEWS, rbcdio/README, rbcdio/autogen.sh, rbcdio/configure.ac, rbcdio/example/device.rb, rbcdio/example/eject.rb, rbcdio/example/tracks.rb, rbcdio/lib/cdio.rb, rbcdio/lib/extconf.rb, rbcdio/rubycdio.m4, rbcdio/swig/Makefile, rbcdio/swig/audio.swg, rbcdio/swig/compat.swg, rbcdio/swig/device.swg, rbcdio/swig/device_const.swg, rbcdio/swig/disc.swg, rbcdio/swig/rubycdio.swg, rbcdio/swig/track.swg, rbcdio/swig/types.swg: Remove files checked into the wrong place 2006-11-13 rocky * rbcdio/AUTHORS, rbcdio/Makefile.am, rbcdio/NEWS, rbcdio/README, rbcdio/autogen.sh, rbcdio/configure.ac, rbcdio/example/device.rb, rbcdio/example/eject.rb, rbcdio/example/tracks.rb, rbcdio/lib/cdio.rb, rbcdio/lib/extconf.rb, rbcdio/rubycdio.m4, rbcdio/swig/Makefile, rbcdio/swig/audio.swg, rbcdio/swig/compat.swg, rbcdio/swig/device.swg, rbcdio/swig/device_const.swg, rbcdio/swig/disc.swg, rbcdio/swig/rubycdio.swg, rbcdio/swig/track.swg, rbcdio/swig/types.swg: Initial revision 2006-11-01 rocky * NEWS: Get ready for release. Note preprocessor symbol LIBCDIO_VERSION number has to be an integer. (Bug caused by naming version 0.78.1) 2006-10-30 rocky * configure.ac: A stray quote got inserted into the "cut". This time, for sure! 2006-10-30 rocky * configure.ac: Get reeady for 0.78.2 release? 2006-10-30 flameeyes * configure.ac: Use cut rather than sed for removing the micro version. 2006-10-29 rocky * configure.ac: This time, for sure! (See previous.) 2006-10-29 rocky * configure.ac: Remove .1 in LIBCDIO_VERSION_NUM 2006-10-28 rocky * NEWS: What's changed. 2006-10-28 rocky * configure.ac, doc/how-to-make-a-release.txt, lib/driver/Makefile.am: Prepare a release that doesn't have the .so problem. 2006-10-27 rocky * example/.cvsignore: Add cdio-eject 2006-10-27 rocky * configure.ac: Make iconv more necessary. 2006-10-27 rocky * include/cdio/cdda.h, include/cdio/iso9660.h, include/cdio/mmc.h, include/cdio/paranoia.h: Remove doxygen warnings. 2006-10-27 rocky * configure.ac: Get ready for release. 2006-10-27 rocky * NEWS: Revies NEWS version/date for release. 2006-10-21 rocky * NEWS, example/README, lib/driver/gnu_linux.c: gnu_linux.c: Fix bug reported by Burkhard in eject_media_linux() where we were closing an open tray. NEWS/README: note current changes 2006-10-21 gmerlin * example/Makefile.am, example/cdio-eject.c, lib/driver/gnu_linux.c: * Umount before ejecting * Ultra simple eject command 2006-10-11 rocky * example/.cvsignore, example/Makefile.am, example/mmc3.c, include/cdio/mmc.h, lib/driver/Makefile.am, lib/driver/libcdio.sym, lib/driver/mmc.c, lib/driver/mmc_private.h, lib/iso9660/Makefile.am: Add routine to get tray status (open/closed) and sample program. Seems broken at least on SuSE 10.1 if not other GNU/Linux's though. 2006-09-26 flameeyes * lib/iso9660/iso9660_fs.c: Check for the pointers before dereference them. Found by Coverity Scan on xine-lib. 2006-09-26 flameeyes * lib/driver/MSWindows/win32.c: Check for the validity of the pointer before using strlen on it. Found by Coverity Scan on xine-lib. 2006-09-26 flameeyes * lib/iso9660/iso9660.c: Fix a possible off-by-one in strip_trail() identified by Coverity Scan on xine sources. 2006-08-20 rocky * lib/driver/Makefile.am, libcdio.pc.in: Patches from Steve Schultz to handle libiconv inclusion on BSDI (and possibly other BSD's) 2006-08-02 rocky * lib/driver/gnu_linux.c: Yet another guess at what happened to the CDROMREADTOCENTRY ioctl call. I haven't been able to find anything that documents in any detail how to use this ioctl let alone the weird behavior where CDROMREADTOC header beforehand turns and "invalid parameter" into a valid one. It's not the way other 'nix's work. 2006-07-30 rocky * test/testiso9660.c: Take out some checks until daylight savings time thing is resolved. 2006-07-30 rocky * NEWS, example/tracks.c, lib/driver/gnu_linux.c: gnu_linux: get_disc_last_lsn: cdte_format seems to want to be CDROM_MSF example/tracks.c: add a call to cdio_get_disc_last_lsn() NEWS - note UDF limitation. correct spelling typo. 2006-06-12 gmerlin * NEWS: * Updated NEWS 2006-06-03 gmerlin * include/cdio/utf8.h, lib/driver/utf8.c: * UTF-8 support 2006-06-03 rocky * lib/udf/udf_file.c: C lint. 2006-06-03 rocky * test/Makefile.am, test/check_iso.sh.in, test/copying.gpl: Add our own version of copying.gpl rather than rely on FSF's to be unchanging. 2006-06-02 gmerlin * include/cdio/Makefile.am, include/cdio/iso9660.h, include/cdio/types.h, lib/driver/Makefile.am, lib/driver/libcdio.sym, lib/iso9660/iso9660_fs.c: * UTF-8 support patch 2006-05-06 rocky * include/cdio/iso9660.h, lib/iso9660/iso9660.c: Add missing field in SVD structure. Document correspondencies with ECMA 119 better. 2006-05-03 rocky * include/cdio/cdda.h: Note what nsectors does. 2006-04-28 rocky * lib/udf/udf_fs.c: gcc 2.9 fix remove ;; - thanks to sms 2006-04-17 rocky * doc/2006-summer-of-code.txt: Remove API overhaul. 2006-04-17 rocky * example/udffile.c, test/Makefile.am, test/udf102.iso: Add UDF 1.02 image and use that in the default file-extraction test. 2006-04-17 rocky * example/Makefile.am, example/udffile.c: udf2.c becomes the more general udffile.c 2006-04-17 rocky * include/cdio/ecma_167.h, lib/udf/udf.c, lib/udf/udf_file.c, lib/udf/udf_fs.c, lib/udf/udf_fs.h, lib/udf/udf_private.h: UDF file reading works for strategy 4. What a pain in the ass. 2006-04-16 rocky * doc/libcdio.texi, example/Makefile.am, include/cdio/ecma_167.h, include/cdio/udf.h, lib/udf/udf.c, lib/udf/udf_file.c, lib/udf/udf_private.h: Remove some bugs in udf_file.c Others remain. 2006-04-15 rocky * example/C++/Makefile.am, example/C++/OO/Makefile.am, example/C++/README, example/Makefile.am, example/README: . 2006-04-15 rocky * example/C++/Makefile.am, example/C++/isofile.cpp: iso3.cpp->isofile.cpp 2006-04-15 rocky * example/C++/isolist.cpp: iso1.cpp->isolist.cpp 2006-04-15 rocky * example/C++/OO/iso1.cpp, example/C++/OO/iso2.cpp, example/C++/OO/iso3.cpp, example/C++/OO/isofile.cpp, example/C++/OO/isofile2.cpp, example/C++/OO/isolist.cpp, example/C++/iso1.cpp, example/C++/iso2.cpp, example/C++/iso3.cpp, example/C++/isofile2.cpp: iso1->isolist iso2->isofile2 iso3->isofile 2006-04-15 rocky * example/.cvsignore, example/C++/.cvsignore, example/C++/OO/.cvsignore, example/C++/README: iso1->isolist iso2->isofile2 iso3->isofile 2006-04-15 rocky * example/C++/Makefile.am, example/C++/OO/Makefile.am, example/Makefile.am, example/README, example/iso1.c, example/iso2.c, example/iso3.c, example/isofile.c, example/isofile2.c, example/isolist.c: iso1.c->isolist.c iso2.c -> isofile2.c iso3.c -> isofile.c 2006-04-15 rocky * doc/2006-summer-of-code.txt: Proposed 2006 Summer of Code tasks 2006-04-15 rocky * include/cdio/udf_file.h, lib/driver/_cdio_stream.c, lib/driver/_cdio_stream.h, lib/driver/libcdio.sym, lib/udf/udf_file.c, lib/udf/udf_fs.c, lib/udf/udf_private.h: stream: add getpos routine udf: save last read position. 2006-04-14 rocky * lib/driver/libcdio.sym, src/cdda-player.c, src/mmc-tool.c: libcdio.sym: add mmc_close_tray cdda-player.c, mmc-tool.c: remove possibility of uninitialized return code variables 2006-04-14 rocky * include/cdio/udf_file.h: Fix prototype mismatch. Thanks yet again to the every vigilant Steve Schultz. 2006-04-12 rocky * src/mmc-tool.c: doc fix 2006-04-12 rocky * src/mmc-tool.c: Add access to GPCMD_INQUIRY 2006-04-12 rocky * doc/libcdio.texi, example/README: Note newer example programs like udf1.c udf2.c libcdio.texi also has some other small typo corrections. 2006-04-12 rocky * NEWS, configure.ac, example/mmc2a.c: configure.ac: in 0.78cvs now mmc2a.c: small changes from and synch with mmc-tool. 2006-04-12 rocky * example/mmc2a.c, include/cdio/cd_types.h, include/cdio/device.h, include/cdio/ecma_167.h, include/cdio/mmc.h, include/cdio/udf_file.h, lib/driver/mmc.c, src/mmc-tool.c: mmc: add mmc_close_tray(). mmc-tool: add option for close tray and to get mode-sense 2A data. 2006-04-12 rocky * src/mmc-tool.c: Allow multiple sequence of operations. 2006-04-11 rocky * example/udf2.c, lib/udf/udf_fs.c: udf_fs.c: was freeing freed memory when searching for a file that doesn't exist. udf2.c: print error when looking for a non-existent file. 2006-04-11 rocky * include/cdio/udf_file.h, lib/udf/Makefile.am, lib/udf/udf_file.c, lib/udf/udf_fs.c, lib/udf/udf_fs.h, lib/udf/udf_private.h: Make udf_read_block more like 2 read. Implementation is closer to the description (although it needs more work.) udf_fs.h: break out udf_check_tag() *.h: /*! -> /** - is more like Javadoc. 2006-04-11 rocky * lib/udf/udf_file.c: Handle error condition better. 2006-04-11 rocky * example/udf2.c: Print out entire file. (File must fit in memory though.) 2006-04-11 rocky * include/cdio/ecma_167.h, lib/udf/udf.c, lib/udf/udf_file.c, lib/udf/udf_fs.c, lib/udf/udf_private.h: UDF fixes. 2006-04-07 rocky * src/cdda-player.c, src/mmc-tool.c: Wrapping fixes 2006-04-07 rocky * src/cdda-player.c: If a driver doesn't have cdio_get_audio_volume, increase/decrease volume arbitrarily start off with 50 (midway in range) and we've arranged that cdda-player will do it's own bookkeeping to figure out what the current volume level is. 2006-04-05 rocky * src/cdda-player.c: Add ability to interactively set volume levels. Keys +/- 2006-04-05 rocky * src/cdda-player.c: Tidy up a little. 2006-04-05 rocky * lib/driver/.cvsignore: . 2006-04-05 rocky * src/.cvsignore: [no log message] 2006-04-05 rocky * src/cdda-player.c: Figure out last line from screen paramaters. (I'm embarrassed it this wasn't put in earlier.) Play *only* if we weren't previously paused or playing. 2006-04-05 rocky * src/cdda-player.c: Start off playing all tracks. Set status to show playing all tracks. 2006-04-05 rocky * lib/driver/mmc.c, lib/driver/mmc_private.h: Make so we can call from driver. Some comment changes too. 2006-04-04 rocky * src/mmc-tool.c: typo 2006-04-04 rocky * include/cdio/device.h, include/cdio/mmc.h, lib/driver/MSWindows/win32.c, lib/driver/device.c, lib/driver/gnu_linux.c, lib/driver/libcdio.sym, lib/driver/mmc.c, src/mmc-tool.c: Clarify the difference betweeen speed as it is defined in the MMC spec and drive unit speeds. Add a new mmc routine for the latter. 2006-04-04 rocky * src/mmc-tool.c: mmc-tool: tool do issue libcdio mmc commands. 2006-04-04 rocky * src/Makefile.am: Add get/set blocksize and MCN commands. 2006-04-03 rocky * example/mmc2a.c: typos 2006-04-03 rocky * example/.cvsignore: .cvsignore 2006-04-03 rocky * lib/driver/gnu_linux.c, lib/driver/mmc.c: gnu_linux: Use internal routine to set the speed. mmc.c: add more debug_ variables for new enums and extern vars in mmc.h set speed is in the write direction not read 2006-04-03 rocky * include/cdio/mmc.h: More #defines become enums. Add CDIO_MMC_GETPOS_LEN16. Is like CDIO_MMC_GETPOS_LEN16 with extra position parameter. 2006-04-03 rocky * example/Makefile.am, example/README, example/mmc2a.c: Add example program to show MODE_SENSE page 2A: CD/DVD Capabilities and Mechanical Status Page. 2006-03-30 flameeyes * configure.ac, include/Makefile.am, lib/Makefile.am: Add a --disable-cxx configure parameter so that the C++ bindings can be skipped. 2006-03-28 rocky * README: README 2006-03-28 rocky * README, package/libcdio.spec.in: README 2006-03-28 rocky * lib/driver/MSWindows/win32.c: For read_data_sectors, try first MMC commands and then cooked I/O. 2006-03-28 rocky * example/C++/OO/drives.cpp, example/drives.c, include/cdio/cd_types.h, include/cdio/device.h, lib/driver/cd_types.c, lib/driver/device.c, test/testisocd.c: Yet another attempt to get "get_drives_with_cap" working in a rational fashion. 2006-03-27 rocky * example/C++/OO/drives.cpp, example/drives.c, include/cdio/device.h, lib/driver/device.c: One more time, go over logic of get_drives_with_cap. 2006-03-26 rocky * include/cdio/cd_types.h, lib/driver/device.c, test/testisocd.c: Bug in get_drive_types_with_cap: Had wrong boolean logic. 2006-03-26 rocky * test/.cvsignore: . 2006-03-26 rocky * test/testisocd, test/testisocd.c: Add ISO 9660 CD reading test. 2006-03-26 rocky * include/cdio/iso9660.h, test/testisocd: A more stringent ISO 9660 CD reading test. 2006-03-26 rocky * test/Makefile.am, test/testisocd: Add test of reading an ISO 9660 CD. 2006-03-26 rocky * lib/driver/_cdio_generic.c: Untabify 2006-03-26 rocky * lib/driver/_cdio_generic.c, lib/driver/osx.c: Add/correct comments. osx.c: remove tabs. 2006-03-25 rocky * configure.ac: We'll accept FreeBSD 7. 2006-03-25 rocky * include/cdio/iso9660.h: Document iso9660_iso_seek_read better. Well, the old doc at least had me confused. 2006-03-25 rocky * lib/cdda_interface/scan_devices.c: Store passed in messagedest in initializing drive object. 2006-03-18 rocky * include/cdio/cdda.h, include/cdio/paranoia.h, lib/cdda_interface/cddap_interface.c, lib/paranoia/paranoia.c: documentation additions, mostly doxygen. More #defines become enumerations. 2006-03-18 rocky * NEWS: Forgot to update release date. 2006-03-18 rocky * test/testiso9660.c: sourceforge openpower is now giving problems in changing timezone. Will it ever end? 2006-03-18 rocky * Makefile.am, test/testiso9660.c: Makefile.am: failed bad attempt to get Sun 9's make work. But this is probably more correct anyway. testiso9660.c: I give up on getting localtime working. 2006-03-18 rocky * NEWS, configure.ac, doc/how-to-make-a-release.txt, include/cdio/iso9660.h, lib/iso9660/iso9660.c: iso9660.h: remove doxygen formatting warning. configure.ac, NEWS: get ready for 0.77 release 2006-03-18 rocky * lib/driver/FreeBSD/freebsd.h: typo 2006-03-18 rocky * example/cdtext.c, example/iso2.c, example/paranoia.c, example/paranoia2.c, src/cd-paranoia/cd-paranoia.c: More strcat, sprintf, and strcpy replacements. 2006-03-18 rocky * README, README.libcdio: Update instructions 2006-03-18 rocky * test/testiso9660.c: The latest wrinkle in the maze of twisty timezones all different. 2006-03-18 rocky * NEWS, include/cdio/util.h, lib/cdda_interface/utils.c, lib/driver/gnu_linux.c, lib/driver/util.c, lib/udf/udf_fs.c: Security: replace all uses of strcat and strcpy with strncat and strncpy 2006-03-17 rocky * src/cd-read.c, test/cdda-read.right, test/check_cd_read.sh: Add --just-hex option to cd-read. Not all OS's agree on what's printable. 2006-03-17 rocky * lib/iso9660/iso9660.c, lib/iso9660/iso9660_fs.c, lib/iso9660/rock.c: Replace strcat and strcpy with strncat, strncpy. 2006-03-17 rocky * configure.ac, src/Makefile.am, src/cd-info.c, src/cd-paranoia/Makefile.am, src/cd-paranoia/cd-paranoia.c, src/cd-paranoia/getopt.c, src/cd-paranoia/getopt.h, src/cd-paranoia/getopt1.c, src/cd-read.c, src/cdda-player.c, src/getopt.c, src/getopt.h, src/getopt1.c, src/iso-info.c, src/iso-read.c: Put back in getopt.h, getopt.c, getopt1.c. Solaris doesn't always have it and it's really too much of a hassle to do all that configuration code to figure out where it is and what has to be done to get it to work. 2006-03-17 rocky * lib/driver/aix.c, lib/driver/solaris.c: mmc_direction_t -> cdio_mmc_direction_t 2006-03-17 rocky * src/cd-drive.c: It's now mmc.h, not scsi_mmc.h 2006-03-17 rocky * test/testiso9660.c: Address one more glitch - NULL tm_zone's 2006-03-17 rocky * test/testiso9660.c: Even more dancing around the different tm mktime variations on different OS's. I think we have GNU/Linux, cygwin, and BSDI now. 2006-03-17 rocky * NEWS: NEWS 2006-03-17 rocky * test/testiso9660.c: Need more sophisticated way to compare times. 2006-03-17 rocky * lib/iso9660/iso9660.c, test/testiso9660.c: More time corrections in the presense of timezones, daylight savings time, and HAVE_TM_GMTOFF 2006-03-17 rocky * lib/iso9660/iso9660.c: use tzset to try to get GMT read. 2006-03-17 rocky * lib/driver/MSWindows/aspi32.c, lib/driver/MSWindows/aspi32.h, lib/driver/MSWindows/win32.c, lib/driver/MSWindows/win32.h, lib/driver/MSWindows/win32_ioctl.c: mmc_direction_t -> cdio_mmc_direction_t 2006-03-17 rocky * NEWS, lib/iso9660/iso9660.c, test/testiso9660.c: iso9660_get_{l,d}time() anot accounting for the timezone properly. Some other small bugs removed. 2006-03-14 rocky * cvs2cl_usermap: Remove email addresses -- spammers are winning 2006-03-14 rocky * cvs2cl_usermap: Add flameeyes 2006-03-14 rocky * NEWS, lib/cdda_interface/Makefile.am, lib/driver/Makefile.am, lib/iso9660/Makefile.am, lib/paranoia/Makefile.am: Update library version numbers for possible release. FSF address change. 2006-03-14 rocky * include/cdio/iso9660.h, lib/iso9660/iso9660_fs.c, src/cdda-player.c: iso9660.h: note b_mode2 parameter is not used any more cdda-player.c FSF address change. 2006-03-13 rocky * lib/paranoia/paranoia.c: comment change - 0x2->FLAGS_UNREAD 2006-03-11 rocky * include/cdio++/cdio.hpp: Try p_cdio as protected. 2006-03-07 rocky * include/cdio/disc.h: Put back cdio_stat_size tolerance. 2006-03-07 rocky * .cvsignore, example/C++/OO/.cvsignore: . 2006-03-07 rocky * include/cdio++/iso9660.hpp, lib/cdio++/iso9660.cpp: Go back to inlining various functions because older STL's can't handle not having the bodies. (I think this is what's going on, but I'm not completely sure. Deals with failure on older BSDI and gcc 2.95 server) 2006-03-07 rocky * lib/cdio++/devices.cpp: Code for Cdio::Devices Class 2006-03-07 rocky * .cvsignore: .cvsignore 2006-03-07 rocky * example/C++/OO/Makefile.am, example/C++/OO/iso1.cpp, example/C++/OO/iso4.cpp, include/cdio++/iso9660.hpp, lib/cdio++/iso9660.cpp: Change list of files from a list to a vector. read_pvd() for ISO9660::FS works. iso4.cpp: show ISO 9660 info for CD-images (like iso1 for ISO images). 2006-03-07 rocky * test/.cvsignore: [no log message] 2006-03-07 rocky * lib/cdda_interface/Makefile.am, lib/driver/Makefile.am, lib/iso9660/Makefile.am, lib/paranoia/Makefile.am: Don't do library versioning if there no object files to look at. This removes spurious "nm: no a.out" messages when --disable-shared is in effect. 2006-03-07 rocky * configure.ac, example/C++/OO/Makefile.am, include/cdio++/cdio.hpp, include/cdio++/devices.hpp, include/cdio++/iso9660.hpp, lib/cdio++/Makefile.am, lib/cdio++/cdio.cpp, lib/cdio++/cdio_stub.cpp, lib/cdio++/iso9660.cpp, lib/cdio++/iso9660_stub.cpp: Move code from devices.hpp and iso9660.hpp headers into external files - cdio.cpp, device.cpp, iso9660.cpp configure.ac, C++/OO/Makefile.am: Found some bugs libraries acces in doing the above move. 2006-03-07 rocky * configure.ac, test/Makefile.am, test/testbincue.c, test/testbincue.c.in: testbincue.c.in: set @srcdir@. Make gcc 2.95 compatible. 2006-03-07 rocky * include/cdio/iso9660.h, lib/iso9660/libiso9660.sym, test/testbincue.c: Have to have iso9660_find_fs_lsn linker symbol around. (At least for now.) 2006-03-06 rocky * Makefile.am, configure.ac, include/cdio++/Makefile.am, libcdio++.pc.in, libiso9660++.pc.in: Distribute pkg-config files. Add iso9600.hpp to distribution. 2006-03-06 rocky * NEWS, example/C++/OO/Makefile.am: Cosmetic changes. 2006-03-06 rocky * example/C++/OO/Makefile.am, example/C++/OO/iso2.cpp, include/cdio++/cdio.hpp, include/cdio++/iso9660.hpp, include/cdio/iso9660.h, lib/iso9660/iso9660_fs.c, lib/iso9660/libiso9660.sym: Add ISO9660::FS - the cdio portion of ISO9660 reading. iso9600.h: another function rename to be more consistent. 2006-03-06 rocky * doc/libcdio.texi, example/C++/OO/iso1.cpp, include/cdio++/iso9660.hpp, include/cdio/iso9660.h, lib/iso9660/iso9660.c, lib/iso9660/libiso9660.sym, test/testischar.c, test/testiso9660.c: iso9660.hpp, iso1.cpp get list iterators working. rest: add _ to isachar and isadchar 2006-03-06 rocky * example/C++/OO/Makefile.am, example/C++/OO/iso1.cpp, example/C++/OO/iso3.cpp, example/C++/iso1.cpp, include/cdio++/iso9660.hpp, lib/cdio++/Makefile.am: Start OO iso1.cpp. iso3.cpp: valgrind lint. iso1.cpp: tidy more. 2006-03-06 rocky * configure.ac, example/C++/OO/.cvsignore, example/C++/OO/Makefile.am, example/C++/OO/iso3.cpp, include/cdio++/iso9660.hpp, lib/cdio++/Makefile.am: Get first libiso9660++ OO program (iso3) working. 2006-03-05 rocky * include/cdio++/iso9660.hpp, include/cdio/iso9660.h: Add more C++ ISO 9660 methods and some classes (for C structs). 2006-03-05 rocky * example/C++/device.cpp, include/cdio++/cdio.hpp, include/cdio++/device.hpp, include/cdio++/iso9660.hpp, include/cdio/iso9660.h, lib/cdio++/Makefile.am, lib/cdio++/cdio_stub.cpp, lib/cdio++/iso9660_stub.cpp, lib/cdio++/stub.cpp: lib/cdio++/Makeifle.am iso9660.hpp iso9660_stub.cpp: start C++ libiso9660 library iso9660.h: documentation changes. device.hpp: reduce number of methods stub.cpp->cdio_stub.cpp 2006-03-03 flameeyes * example/.cvsignore: Add cdchange to ignored files. 2006-03-03 flameeyes * lib/driver/FreeBSD/freebsd.c, lib/driver/FreeBSD/freebsd.h, lib/driver/FreeBSD/freebsd_cam.c: scsi_mmc_cdb_t -> mmc_cdb_t; scsi_mmc_direction_t -> cdio_mmc_direction_t; make FreeBSD driver build again. 2006-03-02 flameeyes * lib/driver/FreeBSD/freebsd.c: Add missing include in freebsd driver (fix implicit declaration of htonl). 2006-03-02 rocky * include/cdio/iso9660.h, lib/iso9660/iso9660.c: Mostly doc changes. However there was a field-name misspelling in iso9660.h 2006-03-02 rocky * example/C++/README, example/C++/iso1.cpp, example/README, example/iso1.c: iso1.c{,pp} Show PVD info as well. README: revise for the programs we've got. 2006-03-02 rocky * example/C++/iso2.cpp, example/C++/iso3.cpp, example/iso2.c, example/iso3.c: Simplify code. Add usage. 2006-03-02 rocky * example/C++/iso1.cpp, example/iso1.c, example/iso3.c: Some small changes inspired by correspoinding Perl programs. 2006-03-01 rocky * lib/iso9660/iso9660.c: Date changed 2006-03-01 rocky * include/cdio/iso9660.h, lib/iso9660/iso9660.c: Document iso9660_name_translate{,_ext} more accurately. 2006-03-01 rocky * example/iso1.c: Remove duplicate free 2006-03-01 rocky * include/cdio/iso9660.h: Improve some comments. 2006-03-01 rocky * example/C++/iso1.cpp, example/iso1.c: iso1.c, iso1.cpp: add p_ prefix to some pointers iso1.cpp: add iso1.c improvements: allow for an optional ISO name. 2006-02-27 flameeyes * lib/driver/_cdio_stdio.c, lib/driver/cd_types.c, lib/driver/device.c: Use complete struct initialization to avoid spurious pointers. 2006-02-27 flameeyes * example/audio.c: Fix keywords ordering. 2006-02-27 flameeyes * lib/driver/image/cdrdao.c: Don't put two strcmp() calls in bodyless if costructs when building the release version. Use -DTODO in CFLAGS to get the warning again. 2006-02-27 flameeyes * lib/driver/image/nrg.c: Don't check for an unsigned value to be >= 0. 2006-02-27 flameeyes * include/cdio/Makefile.am: Remove cdio_include.h at distclean rather than in clean, as it's done for config.h. Doesn't require to re-run ./configure at make clean. 2006-02-27 flameeyes * lib/driver/portable.h: Use preprocessor's #error instead of adding invalid code, makes the error more verbose and waste less time (as it stops during preprocessing instead of compiling). 2006-02-25 rocky * test/testiso9660.c: Small comment changes 2006-02-25 rocky * test/testiso9660.c: Revise test to be more informative 2006-02-25 rocky * test/testiso9660.c: Revise test to be more informative 2006-02-18 rocky * lib/driver/osx.c: Was accessing outside of legal range. Addresses bug #15787 Thanks to demo-n. 2006-02-18 rocky * .cvsignore: .cvsignore 2006-02-18 rocky * lib/driver/osx.c: Comment change. 2006-02-18 rocky * lib/driver/bsdi.c, lib/driver/device.c, lib/driver/osx.c: scsi_mmc_direction_t -> cdio_mmc_direction_t 2006-02-16 rocky * NEWS, doc/libcdio.texi: NEWS: Note strncpy problem libcdio.texi: Update copyright date. 2006-02-16 rocky * include/cdio/Makefile.am, include/cdio/cdda.h, include/cdio/disc.h, include/cdio/mmc.h, include/cdio/util.h: Remove some deprecated things. 2006-02-13 rocky * lib/driver/image/bincue.c, lib/driver/image/cdrdao.c, lib/driver/image/nrg.c, lib/driver/mmc.c: image/* Wrong sizeof. mmc: remove some deprecated things. 2006-02-13 rocky * include/cdio/cd_types.h, lib/driver/cd_types.c: Replace yet another set of #defines with an enum. 2006-02-13 rocky * example/.cvsignore, lib/udf/udf_time.c, src/.cvsignore: udf_time.c: make sure offset is initialzed (Darwin doesn'thave TIMEZONE var). .cvsignore: add .gdb_history 2006-02-13 rocky * NEWS: What's up. 2006-02-13 rocky * lib/driver/image/bincue.c, lib/driver/image/cdrdao.c, lib/driver/image/nrg.c: Use strncopy rather than strcpy in get_hwinfo. Make sure all strings have null byte at the end. 2006-02-12 rocky * lib/driver/image/nrg.c: Put in a much more stringent NRG image test. This means that for now we won't require the .NRG extension. 2006-02-12 rocky * test/testbincue.c: Add at least an attempt to call get_default_devices(). 2006-02-12 rocky * lib/driver/image/nrg.c: Fix bugs on accessing outside of string. Patch thanks to Diego 'Flameeyes' Petten. And he cleaned up and shortened the code too! 2006-02-12 rocky * configure.ac: Allow DragonFly which so far is exactly like FreeBSD. Guidance suggested and provided by Diego 'Flameeyes' Petten. 2006-02-10 rocky * include/cdio/cd_types.h: Change another set of #defines to an enum. 2006-02-10 rocky * lib/driver/cd_types.c, lib/driver/image/bincue.c: bincue.c: was using NRG default devices! cd_types.c: declare variable so we pick up debug info. 2006-02-09 rocky * example/C++/OO/drives.cpp, example/drives.c: Clean up code a little. 2006-02-02 rocky * src/cdda-player.c: Fix another bug in cdda-player? I think b_cd was there only for interactive use. 2006-02-02 rocky * example/udf2.c, include/cdio++/cdio.hpp, include/cdio/device.h, lib/driver/device.c, lib/driver/libcdio.sym: cdio_driver_return_code_to_str -> cdio_driver_errmsg 2006-02-01 rocky * NEWS: Go over. 2006-02-01 rocky * lib/driver/device.c, test/testparanoia.c: Fix bug in is_device when driver_id = DRIVER_UNKNOWN or DRIVER_DEVICE 2006-01-26 rocky * lib/udf/udf_file.c, lib/udf/udf_fs.c, lib/udf/udf_private.h: Commit some of the temporary UDF stuff. It will either be completed or disabled later. 2006-01-25 rocky * src/cdda-player.c: Install a CDDB log handler. 2006-01-25 rocky * example/README: Add cdchange. 2006-01-25 rocky * example/C++/OO/device.cpp, example/C++/OO/drives.cpp, example/C++/OO/eject.cpp, include/cdio++/cdio.hpp, include/cdio++/device.hpp, include/cdio++/devices.hpp: Move the device routines which don't refer to an object private info (e.g. closign a tray) out of the Device class. 2006-01-25 rocky * include/cdio++/cdio.hpp, include/cdio++/devices.hpp: devices.hpp: Add default values on some parameters. cdio.hpp: Remove bogus class. 2006-01-25 rocky * example/C++/OO/.cvsignore, example/C++/OO/Makefile.am, example/C++/OO/drives.cpp: Add routine to show drives attached. Not really OO, but it is a little nicer than the corresponding C program. 2006-01-24 rocky * example/Makefile.am, example/README: Add cdchange program. 2006-01-24 rocky * example/cdchange.c: Allow parameter to specify seconds to wait. 2006-01-24 rocky * example/cdchange.c: Example to show media changed routine. 2006-01-23 rocky * doc/.cvsignore, doc/doxygen/html/.cvsignore: more lint. 2006-01-23 rocky * lib/driver/cdio_private.h, lib/driver/generic.h: Now check to see if we have config.h *AND* it hasn't been included before. 2006-01-23 rocky * include/cdio/read.h, include/cdio/types.h: LIBCDIO_CONFIG_H -> EXTERNAL_LIBCDIO_CONFIG_H so we don't get conflicting includes with the local config.h. 2006-01-23 rocky * include/cdio/read.h: Some small corrections to comments. 2006-01-23 rocky * lib/driver/cdio_private.h, lib/udf/udf_private.h: config.h now seems to get included. 2006-01-23 rocky * include/cdio/track.h: Move some more #defines into an enumeration. 2006-01-23 rocky * configure.ac: Probably this is the right way (or a better way?) to ensure derived scripts in test are made executable. 2006-01-22 rocky * example/tracks.c: We were assuming first_track is 1. It isn't always. 2006-01-21 rocky * NEWS, configure.ac, include/cdio/device.h, include/cdio/read.h, include/cdio/types.h: read.h needs Add it into cdio_config.h and include only once. Fixed based on observation and suggestion of Steve Schultz. 2006-01-21 rocky * lib/cdda_interface/test_interface.c: Note that this is not used and probably hasn't been in a while. 2006-01-21 rocky * test/testbincue.c: Add test of set blocksize and set speed. 2006-01-21 rocky * lib/driver/image/bincue.c: Had uninitialized set_speed and set_blocksize opts caused core dumps if called. 2006-01-18 rocky * include/cdio++/mmc.hpp, include/cdio++/read.hpp: Use exception handling. Set some default parameters like number of blocks=1. 2006-01-18 rocky * include/cdio++/device.hpp: Add a default value for drive paramater of CloseTray(). 2006-01-18 rocky * example/C++/OO/eject.cpp: Add close status message. Remove uneeded driver_id parameter. Fix a grammatical mistake. 2006-01-17 rocky * include/cdio/disc.h: Some typos. 2006-01-17 rocky * example/C++/OO/eject.cpp, include/cdio++/cdio.hpp, include/cdio++/device.hpp: Went the subclassed exception route (at the expense of lots of extra code and possibly extra maintenance). It will match the Python interface and it's I guess what Stroustrup recommends. 2006-01-15 rocky * example/C++/OO/eject.cpp, include/cdio++/cdio.hpp, include/cdio++/device.hpp: Convert routines in device.hpp into raising an exception rather than giving a return code. Sort of a test. More may follow. 2006-01-15 rocky * include/cdio/device.h, lib/driver/device.c, lib/driver/libcdio.sym: Add cdio_driver_return_code_to_str() to give a string interpretation of a driver return code. 2006-01-14 rocky * example/C++/eject.cpp, example/eject.c: Forgot to change (C) on that last change. 2006-01-14 rocky * example/C++/eject.cpp, example/eject.c: Add tests of opening/closing without specifying a drive. 2006-01-14 rocky * NEWS: What's up. 2006-01-14 rocky * lib/driver/device.c: Document behavior of cdio_open* and media_eject when no device given. 2006-01-14 rocky * include/cdio/device.h: Document behavior of eject and cdio_open* when no device is given. 2006-01-14 rocky * lib/iso9660/xa.c: Fix compiler error introduced by last enum change. 2006-01-14 rocky * lib/driver/device.c, lib/driver/image/nrg.c, lib/driver/image/nrg.h: More enumerations. *.c: add "debugger" enumeration variables. 2006-01-14 rocky * include/cdio/cdda.h, include/cdio/device.h, include/cdio/ecma_167.h, include/cdio/iso9660.h, include/cdio/read.h, include/cdio/rock.h, include/cdio/sector.h, include/cdio/track.h, include/cdio/udf.h, include/cdio/xa.h: Doxygen lint to change #define to \#define in comments. Add more enumerations. 2006-01-14 rocky * doc/doxygen/Doxyfile.in: Use ABBREVIATE_BRIEF setting used in another of my projects. 2006-01-14 rocky * lib/driver/image/nrg.h: Remove GCC 4 warning about ignored "packed". 2006-01-08 rocky * Makefile.am, largefile.m4: Go back to using standard autoconf-suppled AC_SYS_LARGEFILE 2006-01-06 rocky * doc/libcdio.texi: Smutz seems to get into file at the beginning. 2006-01-05 rocky * doc/how-to-make-a-release.txt: More explicit about directory location. 2006-01-05 rocky * lib/cdio++/stub.cpp: In C++ read.h needs . Don't know if this should be fixed here (where we could concievably check for HAVE_SYS_TYPES_H or in read.h (where it would be inde via cdio_config.h, but for now we'll do it this way. 2006-01-05 rocky * lib/paranoia/p_block.c: Using inline seems to cause a linking problem. Don't know exactly under what conditions or why, but "inline" isn't all that vital. 2006-01-05 rocky * configure.ac, largefile.m4: Add largefile support. For example ISO images over 2G. Problem and suggestion of where to look for a solution from Colossus. 2006-01-05 rocky * test/copying.iso, test/copying.right: Looks like FSF has changed their address. 2005-12-22 rocky * doc/libcdio.texi: Small typo iso-info->iso-read 2005-12-22 rocky * doc/glossary.texi: texi2html seems to have problems with @table @acronym so use @table @dfn. 2005-12-17 rocky * src/cd-paranoia/Makefile.am: We no longer use variable $(getopt_sources) 2005-11-29 rocky * include/cdio/device.h: #define mistake -- caught by SWIG, believe it or not. 2005-11-29 rocky * include/cdio++/Makefile.am: Forgot to include mmc.hpp 2005-11-14 rocky * example/C++/OO/mmc2.cpp: Add corresponding mmc2 OO C++ program. 2005-11-14 rocky * example/C++/OO/Makefile.am, example/C++/OO/cdtext.cpp, example/C++/OO/mmc1.cpp, example/C++/mmc1.cpp, example/mmc1.c, example/mmc2.c, include/cdio++/cdio.hpp, include/cdio++/mmc.hpp: Add C++ wrapper routines for MMC commands inside CdioDevice class. Some comments/code in sample programs gone over and new onse added for libcdio++. 2005-11-12 rocky * example/Makefile.am: Typo causing compilation failure on OSX. Thanks to Steve Schultz. 2005-11-11 rocky * src/cd-read.c: Use new read_sector routine. 2005-11-11 rocky * example/C++/OO/cdtext.cpp, example/C++/OO/device.cpp, example/C++/OO/eject.cpp, example/cdtext.c, example/device.c, example/eject.c, include/cdio++/Makefile.am, include/cdio++/cdio.hpp, include/cdio++/enum.hpp, include/cdio/cdtext.h, include/cdio/device.h: include/cdio++ Add pre- and post- increment/decrement operators for libcdio enums that it makes sense to iterate over. example/C++/OO/*: use these example/*: match up C and C++ programs better. 2005-11-10 rocky * example/.cvsignore, include/cdio++/.cvsignore, lib/udf/.cvsignore, test/.cvsignore: [no log message] 2005-11-10 rocky * example/C++/iso2.cpp, example/C++/iso3.cpp: Remove a couple of signed/unsigned comparisons. 2005-11-10 rocky * example/C++/OO/Makefile.am: automake Makefile for new C++ OO programs. 2005-11-10 rocky * configure.ac, example/C++/Makefile.am, example/C++/OO/.cvsignore, example/C++/OO/cdtext.cpp, example/C++/OO/device.cpp, example/C++/OO/eject.cpp, example/C++/OO/tracks.cpp, include/Makefile.am, include/cdio++/Makefile.am, include/cdio++/cdio.hpp, include/cdio++/cdtext.hpp, include/cdio++/device.hpp, include/cdio++/devices.hpp, include/cdio++/disc.hpp, include/cdio++/read.hpp, include/cdio++/track.hpp, lib/Makefile.am, lib/cdio++/.cvsignore, lib/cdio++/Makefile.am, lib/cdio++/stub.cpp: First cut at a C++ wrapper for libcdio libcdio++. What's not done are audio and MMC commands. No doubt it may be a little rough and I expect further changes. 2005-11-10 rocky * example/Makefile.am: Note more LIBCDIO dependencies for more programs. Pity automake doesn't handle this more automatically. 2005-11-10 rocky * example/Makefile.am: Add eject example program and the LIBCDIO_DEPS dependencies. 2005-11-10 rocky * example/tracks.c: Add C Preprocessor HAVE_SYS_TYPES_H test. 2005-11-10 rocky * example/iso1.c: Small comment change. 2005-11-10 rocky * include/cdio/cdtext.h, include/cdio/read.h, lib/driver/libcdio.sym, lib/driver/read.c: add read_sector{s} cdtext.h: Small typo. 2005-11-08 pjcreath * lib/paranoia/gap.c, lib/paranoia/paranoia.c: Documented silence matching 2005-11-07 pjcreath * lib/paranoia/gap.c, lib/paranoia/overlap.c, lib/paranoia/paranoia.c: Commented stage 2 extensively. 2005-11-07 pjcreath * lib/cdda_interface/cddap_interface.c, lib/paranoia/paranoia.c: Cleaned up TRACE_PARANOIA and added some messages for the skip case. 2005-11-07 rocky * example/.cvsignore, example/C++/.cvsignore: Add eject 2005-11-07 rocky * lib/driver/libcdio.sym: Add cdio_eject_media_drive. 2005-11-07 rocky * example/C++/Makefile.am, example/C++/eject.cpp: C eject works as C++ too. Makefile.am: Add some of the dependency tracking. 2005-11-07 rocky * example/README: Update to list various programs. I'm having trouble keeping track of all them. 2005-11-07 rocky * example/README: Add eject.c. 2005-11-07 rocky * example/C++/iso2.cpp, example/eject.c, example/iso1.c, example/iso2.c, example/iso3.c, example/isofuzzy.c, include/cdio/cdio.h, include/cdio/device.h, lib/driver/device.c: Add interface to eject CD-ROM by device name. eject.c: new routine to test/show this. example/*.c iso2.cpp: Note in comment allowance of an optional argument. 2005-11-07 rocky * lib/driver/gnu_linux.c: Was giving a failure status on eject when it succeeded. The failure was because ioctl(fd, BLKRRPART) didn't succeed. Turn this into a cdio_info warning instead. 2005-11-06 rocky * include/cdio/device.h: Small typos. 2005-11-06 rocky * include/cdio/rock.h, lib/iso9660/rock.c: More separation between posix_mode_t and mode_t. 2005-11-06 rocky * include/cdio/udf.h: posix_mode_t -> mode_t 2005-11-06 rocky * include/cdio/iso9660.h, lib/iso9660/iso9660.c: Return type of iso9660_get_posix_mode should be mode_t (the OS-specific version), not posix_mode_t (cdio's internally consistent version. 2005-11-06 rocky * include/cdio/udf_file.h: I think mode_t (not posix_mode_t) is correct here. The goal is to use in normal OS file operations. 2005-11-06 rocky * lib/udf/filemode.c: Need #include 2005-11-06 rocky * include/cdio/Makefile.am, include/cdio/ecma_167.h, include/cdio/iso9660.h, include/cdio/posix.h, include/cdio/rock.h, include/cdio/types.h, include/cdio/udf.h, include/cdio/udf_file.h, include/cdio/xa.h, lib/iso9660/iso9660.c, lib/iso9660/iso9660_fs.c, lib/iso9660/iso9660_private.h, lib/iso9660/libiso9660.sym, lib/iso9660/rock.c, lib/iso9660/xa.c: Break out POSIX-like definitions to posix.h Add ISO9660 routines to convert to mode_t Record whether XA or not in iso9660_stat_t. And other definition shifting around. 2005-11-04 rocky * src/cd-paranoia/Makefile.am: Patch from Steve Schultz @LIBGETOPT_LIB@ may have -l in it. 2005-11-04 rocky * example/udf2.c: Don't have udf_read_block yet... 2005-11-04 rocky * example/udf2.c: New test program for reading files. (Doesn't work yet.) 2005-11-02 rocky * include/cdio/udf_file.h, lib/udf/udf_file.c: A couple of corrections on udf_get_file_length(). 2005-11-02 rocky * example/udf1.c, include/cdio/udf_file.h, lib/udf/libudf.sym, lib/udf/udf_file.c, lib/udf/udf_fs.c: Add routine to get file length. Fix bug in retrieving dirent for root. Reduce overhead in udf_get_link_count() 2005-11-01 rocky * example/Makefile.am, example/udf1.c, include/cdio/udf.h, lib/udf/udf_file.c, lib/udf/udf_fs.c: udf_find_file -> udf_fopen and made closer to fopen(). It also simplifies things a little bit. Start testing. 2005-11-01 rocky * example/udf1.c, include/cdio/udf_file.h, lib/udf/udf_fs.c: Remove extraneous parameter on udf_opendir(). 2005-11-01 rocky * example/udf1.c, include/cdio/udf.h, include/cdio/udf_file.h, include/cdio/udf_time.h, lib/udf/libudf.sym, lib/udf/udf.c, lib/udf/udf_file.c, lib/udf/udf_fs.c, lib/udf/udf_private.h, lib/udf/udf_time.c: Rename some functions to be more like POSIX file reading, i.e. add udf_opendir() and udf_readdir(). udf_file_entry_t -> udf_dirent_t. 2005-10-30 rocky * src/iso-info.c: Remove small valgrind memory leak. 2005-10-30 rocky * example/udf1.c: Fix small valgrind leak. 2005-10-30 rocky * example/udf1.c, src/iso-info.c: udf1.c: Do better about dealing with recursive directories. iso-info.c: small variable name change 2005-10-30 rocky * example/iso2.c: Minor misspelling in comment. 2005-10-30 rocky * example/C++/iso2.cpp: Minor typographical misspellings in comment 2005-10-30 rocky * include/cdio/udf_time.h, lib/udf/udf_time.c: udf_times_to_stamp -> udf_timespec_to_stamp 2005-10-30 rocky * include/cdio/udf_file.h: Break off udf_file routines from udf.h 2005-10-30 rocky * example/udf1.c, include/cdio/Makefile.am, include/cdio/udf.h, lib/udf/Makefile.am, lib/udf/filemode.c, lib/udf/libudf.sym, lib/udf/udf.c, lib/udf/udf_file.c: Break of file routines into udf_file.{c,h} udf1: Add link count 2005-10-30 rocky * lib/udf/udf_time.c: Replace some numbers with enum "constants". 2005-10-30 rocky * example/udf1.c, include/cdio/ecma_167.h, include/cdio/udf.h, lib/udf/Makefile.am, lib/udf/filemode.c, lib/udf/libudf.sym, lib/udf/udf.c: Fill out file modes better and clean up interface more by trying to funnel into POSIX file mode_t. FIXME: something needs to be done to merge ISO9660 interfaces and UDF and probably the right thing is to make it look like POSIX. Would be nice if there were a library e.g. from GNU fileutils I could use to help. 2005-10-29 rocky * example/udf1.c, lib/udf/udf.c: Fill out posix attributes a little. Add directory listing to output. 2005-10-29 rocky * include/cdio/udf.h, lib/udf/libudf.sym, lib/udf/udf.c: Add more access functions. 2005-10-29 rocky * include/cdio/ecma_167.h: OS/X's linker does not permit common symbols in shared libs. 2005-10-28 rocky * lib/driver/MSWindows/win32.c: Use MMC routine for reading data blocks. At leat on XP home it seems to work better than generic read which is a cooked read. 2005-10-27 rocky * parse/toc.L: Lex/Flex cdrdao TOC scanner 2005-10-27 rocky * include/cdio/ecma_167.h, include/cdio/udf.h, include/cdio/udf_time.h, lib/udf/libudf.sym, lib/udf/udf.c, lib/udf/udf_fs.c, lib/udf/udf_time.c: More documentation of ecma 167. Some fields changed names. More #defines removed/replaced by enum type and variables. 2005-10-27 rocky * configure.ac: Need to move long timezone test lower for Cygwin 2005-10-27 rocky * configure.ac, lib/udf/udf_time.c: Attempt to deal with OS's (like BSDI) that don't have an extern long timezone. 2005-10-27 rocky * configure.ac, lib/udf/udf_private.h, lib/udf/udf_time.c: Changes to make work on Cygwin. However probably need a more general test for timezone being extern long. 2005-10-27 rocky * example/udf1.c, include/cdio/udf.h, lib/udf/libudf.sym, lib/udf/udf.c, lib/udf/udf_fs.c: File entry update fixed on udf_get_next(). More access functions added to return a UDF file entry and to interpret a permission string. 2005-10-26 rocky * include/cdio/track.h: Typo. 2005-10-26 rocky * example/udf1.c, include/cdio/Makefile.am, include/cdio/udf.h, include/cdio/udf_time.h, lib/udf/Makefile.am, lib/udf/libudf.sym, lib/udf/udf_fs.c, lib/udf/udf_private.h, lib/udf/udf_time.c: Add some UDF time routines and time-conversion routines. Note: udf_get_next() needs to advance file entry info 2005-10-25 pjcreath * configure.ac, example/Makefile.am, src/cd-paranoia/Makefile.am: Fixed Darwin builds broken by dependency tracking. 2005-10-25 rocky * example/udf1.c: libiso9660 -> libudf 2005-10-25 rocky * example/udf1.c, include/cdio/udf.h, lib/udf/udf_fs.c: Add routine to get volumeset id 2005-10-25 rocky * README.libcdio: Much needed revision. 2005-10-25 rocky * README: We *are* now adding UDF support. 2005-10-25 rocky * example/udf1.c, include/cdio/ecma_167.h, include/cdio/udf.h, lib/udf/libudf.sym, lib/udf/udf_fs.c: Add silly volume identifier. More #defines removed in favor of enums. 2005-10-25 rocky * example/udf1.c, lib/udf/udf_fs.c: Remove memory leak and invalid write references thanks to valgrind. Now lists all files correctly - at least in the absense of directories under /. 2005-10-24 pjcreath * lib/paranoia/p_block.c, lib/paranoia/paranoia.c, src/cd-paranoia/cd-paranoia.c: Added TRACE_PARANOIA, which differs from cdparanoia's NOISY compile-time flag in that it's designed to help someone understand how cdparanoia works, rather than troubleshoot. Setting TRACE_PARANOIA to 1 traces stage 1, 2 trace stage 2, and 3 traces both (and is extremely verbose). Additionally, committed a tentative bugfix to paranoia itself, which was causing the libcdio test case to break. If it introduces unexpected behavior, it should be backed out. So far it seems to fix all test cases. 2005-10-24 rocky * example/udf1.c, include/cdio/udf.h, lib/udf/Makefile.am, lib/udf/libudf.sym, lib/udf/udf.c, lib/udf/udf_fs.c, lib/udf/udf_private.h: UDF file is now opaque. Access routines then added. Note: there are valgrind and free() errors that need going over. 2005-10-24 rocky * lib/udf/libudf.sym: List more of the external routines (udf_get_next, udf_get_sub) 2005-10-24 rocky * lib/udf/.cvsignore: Ignore the usual. 2005-10-24 rocky * .cvsignore: Now have a libudf.pc 2005-10-24 rocky * lib/udf/Makefile.am: Makefile.am for libudf 2005-10-24 rocky * configure.ac, example/.cvsignore, example/Makefile.am, example/udf1.c, include/cdio/ecma_167.h, include/cdio/udf.h, lib/Makefile.am, lib/udf/udf_fs.c: First inkling of code for UDF support. 2005-10-24 rocky * src/cd-paranoia/cd-paranoia.c: MinGW tolerance. Patches based on those by Eric Lunchpail 2005-10-24 rocky * src/cd-info.c: Follow 0.76 (and below) behaviour: we don't require a device to explicitly be given. 2005-10-23 rocky * configure.ac: Add tests for gettimeofday(), {sete,get}{u,g}id() More of the UDF library code mechanism put in. 2005-10-23 rocky * lib/paranoia/paranoia.c: Remove a #define we don't need. 2005-10-23 rocky * lib/cdda_interface/low_interface.h: Rmove references to external (SCSI) routines that don't in fact exist. 2005-10-23 rocky * lib/cdda_interface/cddap_interface.c: Patch by Erik Lunchpail to accomodate systems (e.g. MinGW) that don't have drand48 but have rand. 2005-10-21 rocky * lib/udf/libudf.sym: Start list of external symbols for Nicholas. 2005-10-21 rocky * include/cdio/ecma_167.h, include/cdio/udf.h: udf.h: Mostly add a couple more routines and more fields in udf_file_t ecma_167.h: more udf_ prefixes, add extern debugger symbols. 2005-10-21 rocky * lib/udf/udf_fs.c: Start some UDF routines. Very preliminary. 2005-10-21 rocky * include/cdio/iso9660.h: Minor comment change. 2005-10-21 rocky * include/cdio/iso9660.h: Remove some #defines covered by enums. 2005-10-21 rocky * include/cdio/mmc.h, lib/driver/libcdio.sym, lib/driver/mmc.c: Turn one more set of #define into an enum 2005-10-21 rocky * include/cdio/mmc.h, lib/driver/gnu_linux.c, lib/driver/libcdio.sym, lib/driver/mmc.c, lib/driver/mmc_private.h: Try to regularize naming better. More mmc_ -> cdio_mmc_ Add more debug variables to be able to get at enum values in a debugger. 2005-10-20 rocky * autogen.sh: Add --include-deps based on a suggestion by Burkhard Plaum. 2005-10-19 rocky * include/cdio/udf.h: Redo UDF_BLOCKSIZE so we can use symbol in debugging. 2005-10-19 rocky * include/cdio/ecma_167.h, include/cdio/udf.h: More changes based on use. 2005-10-19 rocky * include/cdio/ecma_167.h: Add udf_fileid_desc_t: were getting closer to being able to deal with files now. Add remaining udf_ prefixes extent_ad_{s,t} and lb_addr_{s,t} 2005-10-19 rocky * include/cdio/udf.h: Add udf_close(). udf_seek_read() renamed to udf_read_sectors(). First (lame) attempt to define UDF file entry structure. 2005-10-18 rocky * include/cdio/ecma_167.h: Typo. 2005-10-18 rocky * include/cdio/ecma_167.h: Add udf_ to another type (udf_icbtag) 2005-10-18 rocky * include/cdio/ecma_167.h: More changes based on use. 2005-10-18 rocky * src/cd-paranoia/Makefile.am: Not sure if this commit is correct and/or why it should be needed (if it is correct). We note a dependencies between cd-paranoia and its libraries. Section 7.4 "Program and Library Variables" of the automake 1.9.5 manual says: If `_DEPENDENCIES' is not supplied, it is computed by Automake. The automatically-assigned value is the contents of `_LDADD' or `_LIBADD', with most configure substitutions, `-l', `-L', `-dlopen' and `-dlpreopen' options removed. The configure substitutions that are left in are only `$(LIBOBJS)' and `$(ALLOCA)'; these are left because it is known that they will not cause an invalid value for `_DEPENDENCIES' to be generated. 2005-10-17 rocky * lib/iso9660/libiso9660.sym: Allow folks to refer to and use ISO_STANDARD_ID 2005-10-17 pjcreath * lib/paranoia/isort.h: Added comments to the sort_info_t macros, including the scary pointer arithmetic that makes ipos() tick. 2005-10-17 pjcreath * lib/paranoia/paranoia.c: Extensively commented cdparanoia's stage 1 matching. No code changes apart from added white space for improved readability. Comments containing "???" suggest areas for further study and documentation. 2005-10-17 pjcreath * test/check_paranoia.sh.in: Changed the underrun+jitter test to use small jitter, since medium jitter is now broken. The test should be returned to its former rigor (if not better) once we squash the medium jitter bug. 2005-10-17 rocky * include/cdio/ecma_167.h: Add a couple more udf_ prefixes to some types. 2005-10-17 rocky * include/cdio/ecma_167.h: Add constants for some string #defines. 2005-10-17 rocky * libudf.pc.in: Standard dance for pkg-config and libudf. 2005-10-17 rocky * NEWS: What's shaken. 2005-10-17 rocky * include/cdio/ecma_167.h: Shortten some field names, add udf_ prefixes to aid with namespace problem; turn logical volume descriptor content use into something more useable. 2005-10-17 rocky * src/cdda-player.c: artist field was clobbering author field in list. Uninitialized title/artist data cause core dumps. 2005-10-16 rocky * src/Makefile.am: One more libgetopt for BSD from Steve Schultz. 2005-10-16 rocky * include/cdio/ecma_167.h: Datatypes closer to matching terms used in ECMA 167 spec. Combine/remove duplicate tag identifer definitions. 2005-10-16 rocky * configure.ac, src/Makefile.am, src/cd-paranoia/Makefile.am: BSDI needs to test for libgnugetopt. Patch from Steven Schultz 2005-10-15 rocky * lib/paranoia/isort.c, lib/paranoia/isort.h: Analysis and comments courtesy of Peter J. Creath, again. (I believe this will be the last commit I'll make on his behalf.) 2005-10-14 rocky * include/cdio/paranoia.h, lib/paranoia/paranoia.c: Minor formatting changes. 2005-10-14 rocky * lib/paranoia/paranoia.c: Many informative comments courtesy of Peter J. Creath. External accessible routines renamed to their libcdio name. 2005-10-14 rocky * include/cdio/paranoia.h: Revise as per analysis of Peter J. Creath. 2005-10-13 rocky * include/cdio/ecma_167.h, include/cdio/udf.h: ecma_167.h: doxygen description changes a little. udf.h: First external function added. 2005-10-13 rocky * include/cdio/Makefile.am, include/cdio/ecma_167.h: ecma_167.h: shorten some tags based on use Makefile.am: add udf.h - Oops that file will be added in the next commit. 2005-10-13 rocky * include/cdio/ecma_167.h: Already 1st slight improvement: move #include after test if we've been included before. 2005-10-13 rocky * include/cdio/ecma_167.h: The top-level interface header for libudf: the UDF library; applications include this. First file checked in towards UDF support! (Admittedly not very exciting.) 2005-10-12 rocky * include/cdio/cdda.h, include/cdio/iso9660.h: Fix some typos. 2005-10-12 rocky * lib/iso9660/iso9660_fs.c: pathname ->psz_name 2005-10-08 rocky * lib/paranoia/isort.c, lib/paranoia/isort.h, lib/paranoia/paranoia.c, libpopt.m4: libpopt no longer use sort_link -> sort_link_t. 2005-10-07 rocky * src/cd-paranoia/cd-paranoia.c: Let compiler figure out size of dispcache. 2005-10-07 rocky * lib/driver/read.c: All multiple-block reading routines now return success when asked to read 0 blocks and the lsn's are valid. Idea suggested by Peter J. Creath. 2005-10-07 rocky * lib/driver/read.c: Two patches from Peter J. Creath Fix bug in handling arithmetic with unsigned numbers Return success if reading 0 audio blocks. 2005-10-06 rocky * src/cd-read.help2man: Fill in manual page more. 2005-10-06 rocky * src/Makefile.am, src/cd-drive.help2man, src/cd-info.help2man, src/iso-info.help2man, src/iso-read.help2man: Add AUTHOR field to help2man's 2005-10-06 rocky * src/cd-read.c, src/iso-read.c: More stdout->stderr and exit(EXIT_INFO) on help. 2005-10-06 rocky * src/Makefile.am, src/cd-drive.c, src/cd-drive.help2man, src/cd-info.c, src/cd-info.help2man, src/iso-info.c, src/iso-info.help2man, src/util.c, src/util.h: Improve manual pages. * help output needs to be to stdout not stderr for help2man (*.c,*.h) * Add EXIT_INFO return code. (*.c,*.h) * Start filling out man pages, e.g. add SEE ALSO. *.help2man * Remove non-existent reference to Info pages Makefile.am 2005-10-06 rocky * example/C++/Makefile.am: Was building paranoia programs when --without-cd-paranoia was given. 2005-10-05 rocky * NEWS: What's just gone on. 2005-10-05 rocky * MSVC/cd-info.vcproj, Makefile.am, THANKS, configure.ac, lib/driver/osx.c, src/Makefile.am, src/cd-drive.c, src/cd-info.c, src/cd-paranoia/Makefile.am, src/cd-paranoia/cd-paranoia.c, src/cd-paranoia/getopt.c, src/cd-paranoia/getopt.h, src/cd-paranoia/getopt1.c, src/cd-read.c, src/iso-info.c, src/iso-read.c, src/util.h: Remove libpopt. cd-drive, cd-info: some source option bug fixes osx.c: bug in duplicate free in add-device Patches and bug fixes courtesy Peter J. Creath 2005-10-05 rocky * lib/paranoia/paranoia.c: Just a little more clear about the enum/#define thing. 2005-10-05 rocky * lib/paranoia/paranoia.c: Use #defines (and enums for debugging) for paranoia read flags. Patch from Peter J. Creath. 2005-10-04 rocky * include/cdio/rock.h, lib/iso9660/rock.c: Some provision for handling Rock-Ridge device numbers. 2005-10-04 rocky * lib/cdda_interface/interface.c, lib/paranoia/paranoia.c: Remove the comments about the bug that was just addressed. Thanks again to Peter J. Creath 2005-10-03 rocky * lib/cdda_interface/cddap_interface.c, lib/paranoia/paranoia.c: Bug fix in overallocated analyzed and fixed courtesy of Peter J. Creath 2005-09-30 rocky * configure.ac: Add doxygen file identification to cdio/cdio_config.h. 2005-09-30 rocky * configure.ac: Add darwin8* to list - thanks to Peter J. Creath; Oh, and we are iIn version 0.77cvs now 2005-09-30 rocky * lib/driver/osx.c: Remove double free of str_bsd_path. Thanks to Peter J. Creath for finding/fixing. 2005-09-24 rocky * doc/how-to-make-a-release.txt: Wrong directory - ouch. 2005-09-23 rocky * NEWS, configure.ac: Final preparation for 0.76 release. 2005-09-22 rocky * NEWS: Release date. 2005-09-22 rocky * libcdio_cdda.pc.in: Reinstate -lm in libcdio_cdda.pc 2005-09-22 rocky * libiso9660.pc.in: Needs libcdio library. 2005-09-22 rocky * libcdio_cdda.pc.in, libcdio_paranoia.pc.in: libcdio_paranoia and libcdio_cdda need to include libcdio 2005-09-22 rocky * libcdio_cdda.pc.in: Remove potential -lm as it should be linked in to the library now. 2005-09-21 nboullis * lib/cdda_interface/Makefile.am: Link libcdio_cdda with libm as needed for cos and sin. 2005-09-21 rocky * example/C++/paranoia.cpp, example/paranoia.c, include/cdio/cdda.h, include/cdio/paranoia.h, test/testparanoia.c: Move lower-level cdrom_drive_t from paranoia.h into cdda.h This may cause some incompatibilty in applications that did #include without #include As of now it's okay to just #include or include both, but #includ'ing only will be a problem. 2005-09-21 rocky * NEWS, configure.ac, libcdio_cdda.pc.in: Add -lm in libcdio_cdda where it's needed. 2005-09-20 nboullis * lib/paranoia/Makefile.am: Fix the version of symbols in the libcdio_paranoia library. 2005-09-20 rocky * lib/cdda_interface/Makefile.am: Wrong name. 2005-09-20 rocky * lib/paranoia/Makefile.am: Wrong name. 2005-09-20 rocky * NEWS, example/.cvsignore, example/C++/.cvsignore, lib/cdda_interface/Makefile.am, lib/cdda_interface/libcdio_cdda.sym, lib/iso9660/Makefile.am, lib/iso9660/iso9660.c, lib/paranoia/Makefile.am, lib/paranoia/libcdio_paranoia.sym, lib/paranoia/p_block.c, lib/paranoia/p_block.h: Add --with-versioned-libs for libcdio_paranioa and libcdio_cdda Remove use of "new" even in private C parts. Changes and patch from Nicholas Boullis. 2005-09-18 rocky * NEWS: [no log message] 2005-09-18 rocky * src/cd-info.c, src/cd-read.c: The type of (option) opt needs to be int not char and this is noticable on ppc where char is unsigned by default. Furthermore, poptGetNextOpt() returns an int, not a char. Bug noticed and patch all thanks to Nicolas Boullis. 2005-09-18 rocky * configure.ac: Change needed for building cdda-player: -lcdrom needs to come after -ldvd Problem determination and patch all from Steve Schultz. Thanks! 2005-09-17 rocky * NEWS, include/cdio/types.h, lib/cdda_interface/Makefile.am, lib/driver/Makefile.am, lib/iso9660/Makefile.am: include only if not C++. 2005-09-17 rocky * configure.ac: disable cdda_player if lib curses test fails. Previous position of test was faulty. 2005-09-17 rocky * NEWS: Allow building cd-paranoia if Perl is not installed. 2005-09-17 rocky * configure.ac: Change of heart. Stay with CVS until right up until release. 2005-09-17 rocky * configure.ac, src/cd-paranoia/Makefile.am, src/cd-paranoia/usage-copy.h: Allow building cd-paranoia even if Perl isn't installed. (Sad in this day and age one still can't assume Perl.) 2005-09-16 rocky * configure.ac, example/C++/Makefile.am, example/Makefile.am: configure.ac: make it explicit that --without-cd-paranoia also means without the library If --without-cd-paranoia don't try to build paranoia programs in example and example/C++. Thanks to Elio Blanca for reporting the problems. 2005-09-15 rocky * NEWS: [no log message] 2005-09-15 rocky * configure.ac, example/Makefile.am, include/cdio/rock.h, lib/iso9660/Makefile.am, lib/iso9660/iso9660_fs.c, src/cd-info.c, src/cdda-player.c, src/cddb.c, src/util.c, test/check_cue.sh.in, test/check_iso.sh.in: Add option to disable Rock-Ridge support --disable-rock Add IS_ISSOCK() or S_ISLNK() macros for Rock-Ridge when environment doesn't have it, e.g. MSYS 1.0.10 with MinGW 3.4.2. Go over --enable settings. --disable-cpp-progs now works. Require libcddb 1.0.1 or better 2005-09-09 rocky * NEWS: What's new in 0.76 2005-09-09 rocky * THANKS: Add Diego 'Flameeyes' Petten 2005-08-28 rocky * lib/driver/MSWindows/aspi32.c: Remove warning: "use of cast expressions as lvalues is deprecated" Reports have it that gcc 4 doesn't tolerate this. 2005-08-27 rocky * example/paranoia.c, example/paranoia2.c: cosmetic: remove extraneous space at end of file. 2005-08-27 rocky * example/C++/Makefile.am, example/C++/paranoia.cpp, example/C++/paranoia2.cpp: Add C++ versions of paranoia.c and paranioa2.c 2005-08-27 rocky * lib/cdda_interface/scan_devices.c: Get device name if none supplied in cdio_cddap_indentify. Check for more error conditions and update doc to reflect that the error return is NULL. 2005-08-27 rocky * include/cdio/cdda.h, include/cdio/rock.h, include/cdio/xa.h: Make C++ compatible. 2005-07-23 rocky * lib/driver/FreeBSD/freebsd.h, lib/driver/FreeBSD/freebsd_cam.c, lib/driver/FreeBSD/freebsd_ioctl.c: Some small type and variable name changes. 2005-07-23 rocky * lib/driver/gnu_linux.c: Ooops -- syntax error. 2005-07-23 rocky * lib/driver/FreeBSD/freebsd_ioctl.c, lib/driver/gnu_linux.c: Doc changes. 2005-07-23 rocky * lib/driver/FreeBSD/freebsd_ioctl.c: Patch from Diego 'Flameeyes' Petten to eject_media_freebsd_ioctl(): Allegedly this works better than the CAM mode eject; CAM gets the error "Device not ready" when trying to eject an empty CD-ROM drive. We make use of an already open file descriptor to the CD-ROM instead of opening a new one (else we have two file descriptor open, so when it launch the ioctl() to eject the device it results busy because of the other fd). Also corrects the documentation comment about the return value. 2005-07-15 rocky * configure.ac: Open season for changes. Now in 0.76cvs land 2005-07-15 rocky * example/C++/.cvsignore: [no log message] 2005-07-15 rocky * example/C++/Makefile.am, example/C++/device.cpp: "Port" device.c into C++. 2005-07-11 rocky * NEWS: Add release date for 0.75 2005-07-11 rocky * configure.ac: Get ready for 0.75 release. 2005-07-11 rocky * TODO: Reorder and revise 2005-07-11 rocky * doc/libcdio.texi: Note libcdio_paranoia and libcdio_cdda. 2005-07-10 rocky * README: Small typos. 2005-07-10 rocky * README: Note existance and libcdio use in gmerlin and mplayerxp. 2005-07-09 rocky * NEWS: Add libcddb and cd-paranoia changes. 2005-07-09 rocky * src/cdda-player.c, src/cddb.c: Changes for libcddb 1.1.0 API change. Thanks to Chris Clayton for the patch. 2005-07-09 rocky * src/cd-paranoia/cd-paranoia.c, src/cd-paranoia/usage.txt.in: Now check that integer arguments are integers and are within range. Fixes to --mmc-timeout (-m) option. Put optstring in alphabetic order. 2005-07-07 rocky * example/tracks.c: Correct uninitialized variable caught by gcc 4 2005-07-07 rocky * lib/driver/Makefile.am: Conservative setting for library. 2005-07-07 rocky * lib/driver/gnu_linux.c: Remove gcc 4 warning 2005-07-07 rocky * NEWS: remove gcc 4.0 warnings 2005-07-07 rocky * lib/driver/image/nrg.c: Correct test caught by gcc 4.0 2005-07-07 rocky * lib/paranoia/paranoia.c: Remove gcc 4 warnings 2005-07-03 rocky * src/cd-info.c: Make compilation without CDDB work. 2005-07-02 rocky * NEWS: Note mmc and cd-paranoia timeout changes 2005-06-28 rocky * src/cd-info.c: CDDB errors should not terminate cd-info. 2005-06-26 rocky * src/cd-paranoia/cd-paranoia.c, src/cd-paranoia/usage.txt.in: cd-paranoia: Add option --mmc-timeout (-m) to set MMC timeout. 2005-06-26 rocky * NEWS, include/cdio/mmc.h, lib/driver/libcdio.sym, lib/driver/mmc.c: Allow the MMC timeout to be adjusted by the application. 2005-06-25 rocky * lib/driver/Makefile.am: Patch to make --disable-shared and --enable-static work with --with-versioned-libs 2005-06-25 rocky * NEWS: update 2005-06-11 rocky * lib/driver/MSWindows/win32.c, lib/driver/MSWindows/win32.h, lib/driver/MSWindows/win32_ioctl.c: Attempt getting audio port volume levels. 2005-06-08 rocky * src/cd-info.c, test/testdefault.c: Remove more valgrind-caught erroneous free()'s. 2005-06-08 rocky * lib/driver/image/cdrdao.c, lib/driver/image/nrg.c: Remove a couple more valgrind-caught memory leaks 2005-06-08 rocky * lib/driver/image/nrg.c: Remove valgrind-caught invalid memory reference. 2005-06-07 rocky * lib/driver/gnu_linux.c: Remove a valgrind-caught memory leak. 2005-06-07 rocky * lib/iso9660/iso9660_fs.c: A couple of flawfinder errors. Use sizeof instead of strlen. Fold strncat into preceding snprintf. 2005-05-16 rocky * configure.ac: Now in 0.75cvs land. 2005-05-16 rocky * lib/driver/_cdio_generic.c: Bug in getting CD-Text make sure TOC is read before trying to get CD-Text info. Problem reported by Christian Moser. 2005-05-13 rocky * example/audio.c: Remove warning that this may be uninitialized. 2005-05-13 rocky * NEWS: It's Friday the 13th! 2005-05-13 rocky * configure.ac: Get ready for 0.74 Release. 2005-05-09 rocky * lib/driver/FreeBSD/freebsd.c: Heiner reports that FreeBSD's passopen() and xptopen() don't allow nonblocking access so O_NONBLOCK might do harm. But it's just a guess pending what others discover/report. 2005-05-09 rocky * lib/driver/bsdi.c: Add O_NONBLOCK on sms's recommendation 2005-05-08 rocky * lib/driver/FreeBSD/freebsd_cam.c: Hopefully a better error message on a transport failed. 2005-05-08 rocky * lib/driver/FreeBSD/freebsd.c: cdio_generic_init interface parameter added. Noticed by Heiner. 2005-05-08 rocky * THANKS: Add Burkhard Plaum 2005-05-08 rocky * NEWS: What's up with 0.74 Add dates of releases and CVS ID line. 2005-05-07 rocky * lib/driver/FreeBSD/freebsd.c: Was converting in the wrong direction. 2005-04-30 rocky * src/cd-drive.c: One more small change. 2005-04-30 rocky * src/cd-drive.c: Try again. 2005-04-30 rocky * src/cd-drive.c: Show MMC level for single drive queries too. 2005-04-30 rocky * example/Makefile.am, include/cdio/mmc.h, lib/driver/libcdio.sym, lib/driver/mmc.c, src/cd-drive.c: Add routine to report MMC capabilities of a drive. Add that to the cd-drive program. 2005-04-30 rocky * include/cdio/cdda.h, lib/cdda_interface/interface.c, lib/cdda_interface/scan_devices.c: Simplify endian determination - thanks to suggestions of Steve Schultz Remove recently added field is_scsi which isn't in cdparanoia 2005-04-30 rocky * example/Makefile.am, test/Makefile.am: Comment typo. 2005-04-28 rocky * configure.ac: We really should be in 0.74cvs by now. 2005-04-28 rocky * include/cdio/cdda.h, lib/cdda_interface/interface.c, lib/cdda_interface/scan_devices.c: An ATAPI drive (_NEC , DVD_RW ND-3520A, 1.04, SCSI CD-ROM) was getting set as big endian although it appeared not to, possibly because of SCSI emulation. We now test for SCSIness in addition to ATAPIness as both can occur. Added field in cdrom_device structure for SCSIness and that's tested before unconditionally setting drive bigendian-ness. 2005-04-27 rocky * doc/glossary.texi, include/cdio/util.h: glossary.texi: CDTEXT -> CD Text util.h: allow getting larger sector count sizes. CD's new 900MB could exceed 16-bits. 2005-04-25 rocky * include/cdio/cdtext.h, lib/driver/cdtext.c, lib/driver/libcdio.sym: From Burkhard Plaum: 1. Fix a crash, which happened when cdtext_get() was called for an emtp= y (i.e. NULL) field. 2. Add another function cdtext_get_const(), which returns a const point= er and avoids too much strcpying (apps may want only to TEST if a field is present or have their own string management routines). 2005-04-23 rocky * lib/driver/_cdio_generic.c, lib/driver/generic.h, lib/driver/gnu_linux.c, lib/driver/osx.c, lib/driver/solaris.c: Patch from Burkhard Plaum: 1. In the function is_cdrom_linux(...) in the file lib/driver/gnu_linux.c, the CDROMREADTOCHDR ioctl gets called, which fails when the drive is empty. The CDROM_GET_CAPABILITY ioctl always succeeds for CDrom drives and fails for hard disks etc. 2. For some reason, at least my (GNU/Linux 2.6.10) Kernel fails to open empty drives, when only O_RDONLY is used. Changing the open flag to O_RDONLY|O_NONBLOCK, the call succeeds also for emtpy drives. By the way, the cdrom header file in the kernel says explicitely, that O_RDONLY|O_NONBLOCK should used whenever a cdrom is touched. rocky: also made a change to eject to continue even if we can't get the drive status -- which we can't with an empty CD-ROM drive. 2005-04-22 rocky * configure.ac: Another autoconf bug. I hate autoconf. 2005-04-22 rocky * configure.ac: Testing wrong variable in showing whether paranoia is set to be built. 2005-04-22 rocky * configure.ac: Order of ncurses/curses headers should match order of ncurses/curses library? 2005-04-22 rocky * configure.ac, src/cdda-player.c: Add test to see if curses has keypad(). May break on Solaris - we'll see. Fix from discussion with Steve Schultz 2005-04-21 rocky * src/cd-paranoia/cd-paranoia.c: Ooops. Remove duplicate free 2005-04-18 rocky * doc/libcdio.texi: Remove free() that is no longer needed. Also correct/add C++ names of example programs. 2005-04-17 rocky * src/cdda-player.c: Wasn't allowing last track to get played. 2005-04-16 rocky * src/.cvsignore: Add cdda-player binary 2005-04-15 rocky * NEWS: Get ready for 0.73 release. 2005-04-15 rocky * lib/iso9660/iso9660_fs.c: Fix bug if we don't have Joliet around. 2005-04-14 rocky * lib/driver/FreeBSD/freebsd.c: Remove unused variable. 2005-04-14 rocky * lib/driver/FreeBSD/freebsd.c: gcc 2.95 compatibility - decls before statements. 2005-04-14 rocky * configure.ac: Get ready for 0.73 release. 2005-04-11 rocky * test/Makefile.am: Seems to force executable shell better. 2005-04-11 rocky * test/check_cue.sh.in, test/check_fuzzyiso.sh, test/check_nrg.sh.in, test/check_paranoia.sh.in: Changes to make Solaris /bin/sh regression test work. 2005-04-11 rocky * example/audio.c, example/drives.c, example/paranoia.c, example/paranoia2.c, src/cd-drive.c, src/cdda-player.c: Misc memory issues 2005-04-11 rocky * NEWS, lib/driver/device.c, test/testparanoia.c: testparanoia.c: free() moved inside library where it belongs. others: trivial changes. 2005-04-11 rocky * src/cd-info.c: Small output format change. 2005-04-11 rocky * src/cd-info.c: Free libcddb regexp memory. 2005-04-11 rocky * lib/driver/device.c: trivial format change. 2005-04-11 rocky * lib/driver/device.c: More memory management stuff. 2005-04-10 rocky * src/cdda-player.c: Another valgrind-caught leak. 2005-04-10 rocky * lib/driver/device.c: Correct FreeBSD table initialization. Chalk another up for valgrind. Fix memory leak in cdio_free_device_list(). 2005-04-09 rocky * lib/driver/image/cdrdao.c: Small valgrind-caught memory leak. 2005-04-05 rocky * lib/driver/FreeBSD/freebsd.c, lib/driver/FreeBSD/freebsd_cam.c, lib/driver/device.c: FreeBSD audio control patches from Heiner. 2005-03-31 rocky * src/cdda-player.c: Impliment -l (list tracks). 2005-03-29 rocky * lib/driver/FreeBSD/freebsd.c, lib/driver/gnu_linux.c: freebsd.c: forgot initialization. correct one of the doxygen comments. 2005-03-29 rocky * lib/driver/Makefile.am, lib/iso9660/Makefile.am: Set libraries for revision before release. Interfaces in libcdio and iso9660 have been added so bump, current (and set revision and age 0). 2005-03-23 rocky * src/cdda-player.c: Don't know why cd_close was in play_track(). 2005-03-23 rocky * src/cdda-player.c: Remove compiler warning about uninitialized variable. 2005-03-23 rocky * lib/driver/bsdi.c, lib/driver/cdio_private.h: Remove internal "close_tray" function as this is external only. Now that close_tray is done right the prototype can be like the others. 2005-03-23 rocky * lib/driver/cdtext.c, lib/driver/cdtext_private.h, lib/driver/mmc.c: loop over cdtext using length reported back by MMC TOC command. Test sequence number only for valid blocks. cdtext_private.h: add enumeration to facilitate debugging cdtext.c: On Windows CD-Text was off by 4. Hack for this. 2005-03-22 rocky * src/cdda-player.c: Make expression more explicit. Warning on gcc 2.95 looks like a miscompile. 2005-03-22 rocky * src/cdda-player.c: Fix up return code status in close tray. 2005-03-22 rocky * lib/driver/bsdi.c: Pass back return code on command. 2005-03-22 rocky * lib/driver/bsdi.c, lib/driver/device.c: Fix up BSDI code for closing tray. All the hard work really due to Steve Schultz. 2005-03-22 rocky * src/cdda-player.c: Ability to toggle list display mode. 2005-03-21 rocky * include/cdio/types.h: Note BCDness of msf_t 2005-03-21 rocky * doc/glossary.texi, doc/libcdio.texi: Add info on: cdda-player, Rock Ridge Extensions. Note our MSF structure peculiarity. Remove remark that we don't support audio controls - we now do. Other miscellaneous revisions too. 2005-03-21 rocky * include/cdio/audio.h, include/cdio/device.h, include/cdio/mmc.h, include/cdio/read.h: Doxygen lint corrections. 2005-03-21 rocky * src/cdda-player.c: Some small changes to update list when track changes. Probably a lot more could be done in terms of having multiple disc views. 2005-03-21 rocky * lib/driver/MSWindows/win32_ioctl.c: Not sure why we set the loglevel to debug before a DVD STRUCT PHYSICAL. Remove it. 2005-03-21 rocky * lib/driver/bsdi.c: Keep up to date with recent changes in audio subchannel msf. 2005-03-21 rocky * lib/driver/FreeBSD/freebsd.c: Typo in field name. Thanks again to Steve Schultz. 2005-03-19 rocky * src/cdda-player.c: Small change to make currently playing track stand out more. 2005-03-19 rocky * src/cdda-player.c: Make sure reading non-interactive subchannel doesn't interfere with playing. 2005-03-19 rocky * lib/driver/solaris.c: Revise subchannel so solaris subchannel is libcdio msf. 2005-03-19 rocky * example/audio.c, lib/driver/MSWindows/win32_ioctl.c, lib/driver/bsdi.c, lib/driver/gnu_linux.c, lib/driver/mmc.c, src/cdda-player.c: Revise so audio subchannel msf is msf_t (BCD encoded). 2005-03-19 rocky * configure.ac: Horrible hack until I can figure out how to generate cdio/cdio_config.h correctly. 2005-03-19 rocky * lib/driver/bsdi.c, lib/driver/device.c: Remove gcc 2.95 warnings on BSDI 2005-03-19 rocky * configure.ac, example/audio.c, include/cdio/.cvsignore, include/cdio/Makefile.am, include/cdio/audio.h, include/cdio/types.h, lib/driver/FreeBSD/freebsd.c, lib/driver/MSWindows/win32_ioctl.c, lib/driver/bsdi.c, lib/driver/mmc.c, src/cd-info.c, src/cdda-player.c: Revise audio subchannel structure to remove lba uniion since we don't support returning LBA's inside the structure. include/types.h: use cdio_config.h if none was supplied. 2005-03-18 rocky * lib/driver/bsdi.c: audio absolute relative frame on BSDI addressed. 2005-03-18 rocky * lib/driver/bsdi.c, lib/driver/cdio_private.h: BSDI eject works, more audio stuff working. 2005-03-18 rocky * src/cdda-player.c: Initialize volume_level to squelch compiler warning 2005-03-18 rocky * NEWS: [no log message] 2005-03-18 rocky * lib/driver/_cdio_stream.c, lib/driver/read.c, src/cd-drive.c, src/cd-info.c, src/iso-info.c: src/* gl_default_log_handler defined only once. lib/dirver/*.c: looks to me like a cosmetic change but supposedly it helps on Fedora Core 4 test1 Bug # 12363: See: http://savannah.gnu.org/bugs/?func=detailitem&item_id=12363 2005-03-18 rocky * include/cdio/types.h: Apparently some are depending on sizeof(bool) to be 1 byte. I don't see this in libcdio, but I suppose it's a possibility. In gcc3 enums are 4 bytes. This patch from Tim Potter forces sizeof(bool) to be 1 byte. 2005-03-17 rocky * lib/driver/MSWindows/win32_ioctl.c: Reduce verbosity on disc mode detection 2005-03-17 rocky * lib/driver/FreeBSD/freebsd.c: missing declaration 2005-03-17 rocky * src/util.c: Don't really detect Burn-proof yet. 2005-03-17 rocky * lib/driver/device.c: remove non-const warning. 2005-03-17 rocky * lib/driver/bsdi.c, src/cdda-player.c: BSDI: add audio controls. cdda-player.c: gcc > 3.0 change. 2005-03-17 rocky * src/cdda-player.c: C-Preprocessor syntax errors when using ncurses.h 2005-03-17 rocky * configure.ac, src/cdda-player.c: Check for ncurses.h header (in addition to curses.h). Had a problem (on Solaris) where both libcurses and libncurses were around but the curses.h header (from libcurses) was installed. 2005-03-16 rocky * example/audio.c, src/cdda-player.c: Add setting volume and showing the subchannel when in non-interactive mode. 2005-03-15 rocky * src/cdda-player.c: Add status on play_tracks 2005-03-15 rocky * example/audio.c, src/cdda-player.c: *.c: return status of operations. Exit code is set on operation failure. cdda-player.c: debug and verbose change libcdio loglevel verbosity. 2005-03-15 rocky * lib/driver/gnu_linux.c: Remove duplicate open on CD. Some warnings turned into info messages. Remove unnecessary \n's. 2005-03-15 rocky * example/README: Add audio.c 2005-03-15 rocky * example/audio.c: Sample program to show audio controls. 2005-03-15 rocky * example/Makefile.am, src/cd-info.c, src/cdda-player.c: example: add sample audio program. cd-info.c cdda-player.c: read_subchannel sets format MSF. So caller no longer has to. 2005-03-15 rocky * lib/driver/gnu_linux.c, lib/driver/solaris.c: read_subchannel sets format MSF. So caller no longer has to. 2005-03-15 rocky * lib/driver/MSWindows/win32_ioctl.c: Get read_subchannel working - was thrown off by Microsoft's lousy poor documentation of IOCTL_READ_Q_SUBCHANNEL 2005-03-14 rocky * src/cdda-player.c: Show volume in display status output. 2005-03-14 rocky * include/cdio/audio.h, include/cdio/device.h, lib/driver/audio.c, lib/driver/device.c: Allow returned parameters to be NULL. 2005-03-13 rocky * lib/driver/cdio_private.h, lib/driver/osx.c: A hacky OSX close drive routine. It doesn't handle the actual drive paramater because we don't really know how to pass that to druti. 2005-03-13 rocky * src/cdda-player.c: Remove warnings from mvprintw (as seen on OSX). 2005-03-13 rocky * src/cdda-player.c: Use CD-Text for disc info too. 2005-03-12 rocky * src/cdda-player.c: Show CD-Text info. 2005-03-12 rocky * src/cdda-player.c: Off by one on track duration. 2005-03-12 rocky * src/cdda-player.c: Curses improvements. Can now show key/help and list of tracks. 2005-03-12 rocky * src/cd-info.c, src/cdda-player.c, src/cddb.c, src/cddb.h: Put move libcddb init routine out of cdda-player.c and cd-info.c and into cddb.{c,h} 2005-03-11 rocky * src/cd-info.c, src/cdda-player.c, src/cddb.h: Towards making a common init_cddb routine. 2005-03-11 rocky * lib/driver/FreeBSD/freebsd.c: Forgot close of file descriptor. 2005-03-11 rocky * lib/driver/FreeBSD/freebsd.c, lib/driver/cdio_private.h: Possible filling out of FreeBSD audio control routines. 2005-03-10 rocky * configure.ac, src/Makefile.am: Check for libncurses as well as libcurses and add whatever is found to cdda-player libraries. 2005-03-09 rocky * lib/driver/libcdio.sym: Correct export name. 2005-03-09 rocky * lib/driver/MSWindows/win32.c: Compilation fix for non MS OS's. 2005-03-09 rocky * example/mmc1.c, example/mmc2.c: mmc1.c: use DEVICE_DRIVER rather than DEVICE_UNKNOWN. mmc2.c: show use of "mmc_have_interface" 2005-03-09 rocky * include/cdio/mmc.h, lib/driver/libcdio.sym, lib/driver/mmc.c: Add MMC START STOP interface. 2005-03-09 rocky * configure.ac: Add --without-cdda-player. Dependency on curses now works. 2005-03-09 rocky * lib/driver/MSWindows/win32.c: Use mci command for close for now. 2005-03-09 rocky * lib/driver/MSWindows/win32.c, lib/driver/device.c, src/cdda-player.c: win32.c: get eject working. device.c: an additional test for a NULL pointer to be on the safe side. cdda-player: better handling of eject. 2005-03-08 rocky * lib/driver/MSWindows/win32_ioctl.c: Test for invalid file handle on close_tray. 2005-03-08 rocky * lib/driver/cdio_private.h, lib/driver/device.c, lib/driver/gnu_linux.c, lib/driver/solaris.c: Possibly Solaris close tray fixes. 2005-03-08 rocky * lib/driver/MSWindows/win32.c: Need to make close_tray_win32 external even when not on Windows. 2005-03-08 rocky * lib/driver/MSWindows/win32.c, lib/driver/MSWindows/win32.h, lib/driver/MSWindows/win32_ioctl.c, lib/driver/cdio_private.h, lib/driver/device.c, src/cdda-player.c: lib/driver/device.c: bug in close routine looping. lib/*: Modify close routine for Win32 ioctl. src/cdda-player: add option for close cd tray and minor things 2005-03-07 rocky * configure.ac, src/Makefile.am, src/cdda-player.c: Add Gerd Knorr's cdda-player as an example program using the libcdio Audio controls. 2005-03-07 rocky * include/cdio/device.h, lib/driver/cdio_private.h, lib/driver/device.c, lib/driver/gnu_linux.c, lib/driver/libcdio.sym: Start of a working close_tray routine. Add another routines which returns driver id to help reduce driver scans. Reduce unneeded driver scanning my skipping DRIVER_UNKNOWN. 2005-03-07 rocky * lib/driver/MSWindows/win32.c, lib/driver/MSWindows/win32.h, lib/driver/MSWindows/win32_ioctl.c: windows audio control improvements: add stop and do a little better about getting subchannel info (still needs work). Attempt close tray routine which is still broken across the board pending reworking. 2005-03-06 rocky * lib/driver/solaris.c: Initial op.funcs. NULL. Try using close tray via CDROMSTART. 2005-03-06 rocky * lib/driver/gnu_linux.c, lib/driver/solaris.c: solaris: add audio stop gnu_linux.c: correct comment. 2005-03-06 rocky * test/vcd_demo_vcdinfo.right: Revised ISO9660 and multi-session output. 2005-03-06 rocky * lib/driver/audio.c: fix prototype mismatch. 2005-03-06 rocky * include/cdio/device.h, lib/driver/device.c: Was destroying device list when getting capabilities. This should be an in parameter only. 2005-03-06 rocky * src/cddb.c: Use cdio_audio_get_msf_seconds 2005-03-06 rocky * include/cdio/audio.h, lib/driver/audio.c, lib/driver/libcdio.sym: Add cdio_audio_get_msf_seconds 2005-03-06 rocky * src/Makefile.am: Split out cddb stuff for inclusion in a cdda player. 2005-03-06 rocky * include/cdio/audio.h, include/cdio/device.h, include/cdio/sector.h, lib/driver/FreeBSD/freebsd.c, lib/driver/MSWindows/win32_ioctl.c, lib/driver/audio.c, lib/driver/cdio_private.h, lib/driver/device.c, lib/driver/gnu_linux.c, lib/driver/libcdio.sym, lib/driver/solaris.c, src/cd-info.c, src/cddb.c, src/cddb.h: More audio control corrections. 2005-03-06 rocky * lib/driver/libcdio.sym: Forgot to add mmc_audio_state2str to list of exported symbols. 2005-03-06 rocky * include/cdio/mmc.h, lib/driver/mmc.c, src/cd-info.c: Add routine to turn audio status into a string. 2005-03-06 rocky * lib/driver/solaris.c: Don't rely on mmc backward compatability. 2005-03-06 rocky * lib/driver/MSWindows/aspi32.c, lib/driver/MSWindows/aspi32.h, lib/driver/MSWindows/win32.c, lib/driver/MSWindows/win32.h, lib/driver/MSWindows/win32_ioctl.c: Don't rely on MMC backward compatibility. 2005-03-06 rocky * example/C++/iso1.cpp, example/C++/mmc1.cpp, example/C++/mmc2.cpp, example/mmc1.c, example/mmc2.c, include/cdio/ds.h, lib/driver/gnu_linux.c, lib/driver/mmc.c, lib/driver/mmc_private.h, src/util.c: Don't rely on compatability with 0.72. Use new type names. 2005-03-05 rocky * test/Makefile.am, test/check_iso.sh.in, test/copying-rr.right: Add Rock-Ridge regression test. 2005-03-05 rocky * lib/driver/FreeBSD/freebsd.c: FreeBSD audio control fixes. 2005-03-05 rocky * lib/driver/bsdi.c: BSDI audio control fixes. 2005-03-05 rocky * lib/driver/MSWindows/win32_ioctl.c: Correct getting audio subchannel info. 2005-03-05 rocky * lib/driver/MSWindows/win32.c, src/cd-info.c: win32.c: closer to getting audio controls working. cd-info.c: was not testing MULTI_SESSION capability correctly. 2005-03-05 rocky * test/Makefile.am: Add test Rock-Ridge ISO-9660 image 2005-03-05 rocky * src/cd-info.c: Correct type mismatch: unsigned int -> lsn_t 2005-03-05 rocky * test/copying-rr.iso: Rock-Ridge test ISO 9660. 2005-03-05 rocky * src/cd-info.c, test/cdda-mcn.right, test/cdda.right, test/check_opts0.right, test/check_opts1.right, test/check_opts2.right, test/check_opts3.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right, test/isofs-m1-no-rr.right, test/isofs-m1.right, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/vcd_demo.right, test/videocd.right: Change multi-session output - cd-info reports LSN's, not session number. 2005-03-05 rocky * include/cdio/device.h, lib/driver/cdio_private.h, lib/driver/device.c, lib/driver/gnu_linux.c, lib/driver/solaris.c: get_last_session returns lsn_t not session number. Add get_track_last_session for Solaris. Correct it's play_msf. 2005-03-05 rocky * include/cdio/device.h, lib/driver/cdio_private.h, lib/driver/device.c, lib/driver/gnu_linux.c, lib/driver/libcdio.sym, src/cd-info.c, test/cdda-mcn.right, test/cdda.right, test/check_opts0.right, test/check_opts1.right, test/check_opts2.right, test/check_opts3.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right, test/isofs-m1-no-rr.right, test/isofs-m1.right, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/vcd_demo.right, test/videocd.right: Add API routine to get last session number. 2005-03-05 rocky * include/cdio/audio.h, lib/driver/Makefile.am, lib/driver/_cdio_aix.c, lib/driver/_cdio_bsdi.c, lib/driver/_cdio_linux.c, lib/driver/_cdio_osx.c, lib/driver/_cdio_sunos.c, lib/driver/aix.c, lib/driver/audio.c, lib/driver/bsdi.c, lib/driver/cdio_private.h, lib/driver/gnu_linux.c, lib/driver/osx.c, lib/driver/solaris.c: Revise play_audio_msf for start/end as it should be. _cdio_*driver*.c -> *driver*.c 2005-03-05 rocky * include/cdio/audio.h, lib/driver/MSWindows/win32.h, lib/driver/MSWindows/win32_ioctl.c, lib/driver/_cdio_linux.c, lib/driver/audio.c, lib/driver/cdio_private.h: 1st attempt to fill in some audio controls for Windows ioctl. 2005-03-03 rocky * lib/driver/FreeBSD/freebsd.c: Towards audio controls working on FreeBSD. 2005-03-03 rocky * lib/iso9660/iso9660_fs.c: Fix syntax error if Joliet. 2005-03-03 rocky * NEWS: Update. 2005-03-03 rocky * configure.ac: Now use cdrom.h for BSDI libcdio library. 2005-03-03 rocky * test/testiso9660.c: Better failure output messages. 2005-03-03 rocky * lib/driver/_cdio_bsdi.c: Add some of the audio routines to BSDI driver. 2005-03-03 rocky * lib/iso9660/iso9660.c: Respect localtime parameter in iso9660_get_dtime 2005-03-03 rocky * lib/driver/_cdio_sunos.c: sunos -> solaris. lsn -> i_lsn 2005-03-03 rocky * test/check_fuzzyiso.sh: Change to make "make distcheck" (build outside of src directory) work. 2005-03-02 rocky * test/check_paranoia.sh.in: Change to make build out of srcdir work. 2005-03-02 rocky * configure.ac, src/cd-paranoia/Makefile.am, test/check_cue.sh.in, test/check_fuzzyiso.sh, test/check_nrg.sh.in, test/check_paranoia.sh.in: Enable building out of srcdir. Patches outside of test/* from Mike Castle 2005-03-02 rocky * include/cdio/audio.h, include/cdio/mmc.h, lib/driver/_cdio_linux.c, lib/driver/mmc.c, src/cd-info.c: audio.h: redo audio volume levels a little. mmc.{c,h}: attempt to get audio ports/selections via MMC. cd-info.c: show volume output levels in a cleaner fashion. 2005-03-02 rocky * src/util.c: Slightly more detailed capability reporting: VCD is MODE2 FORM 1/2; PhotoCD is ability to read multisessions. 2005-03-01 rocky * src/cd-info.c, test/cdda-mcn.right, test/cdda.right: Deal with unimplemented audio status (such as on image drivers) 2005-03-01 rocky * src/cd-info.c: Slight output change. 2005-03-01 rocky * lib/driver/_cdio_linux.c: Put back use of read_audio_subchannel_linux() 2005-03-01 rocky * include/cdio/audio.h, include/cdio/mmc.h, lib/driver/_cdio_bsdi.c, lib/driver/_cdio_linux.c, lib/driver/_cdio_osx.c, lib/driver/_cdio_sunos.c, lib/driver/mmc.c, src/cd-info.c, src/cdinfo-linux.c: mmc.c: fix up read_audio_subchannel_mmc audio.h: more direct field names mmc.h: add mmc_subchannel_t; scsi_mmc -> mmc cdio-linux.c: remove deprecated from_bcd8 2005-03-01 rocky * include/cdio/device.h, include/cdio/mmc.h, include/cdio/types.h, lib/driver/MSWindows/win32.c, lib/driver/_cdio_linux.c, lib/driver/_cdio_sunos.c, lib/driver/libcdio.sym, lib/driver/mmc.c, lib/driver/mmc_private.h, src/util.c: Report ability to read MCN. Add MMC routine to read audio subchannel. 2005-03-01 rocky * lib/driver/_cdio_linux.c, lib/driver/_cdio_sunos.c: _cdio_sunos.c: add audio routines. _cdio_linux.c: small formatting changes. 2005-03-01 rocky * src/cd-info.c: Don't do CD analysis if we are currently playing a CD. 2005-03-01 rocky * lib/driver/libcdio.sym: Add new audio routines. 2005-03-01 rocky * lib/driver/_cdio_linux.c, lib/driver/audio.c, src/cd-info.c: Corrections to audio. First glimpse at working (on GNU/Linux) audio controls. 2005-03-01 rocky * lib/driver/MSWindows/win32.c: read_data_sectors via (cooked) generic read. 2005-03-01 rocky * lib/driver/_cdio_sunos.c: Fix up read_data_sectors by using generic cooked routine. 2005-03-01 rocky * lib/driver/audio.c: Audio (via line output) related routines. 2005-03-01 rocky * include/cdio/Makefile.am, include/cdio/audio.h, include/cdio/mmc.h, include/cdio/types.h, lib/driver/Makefile.am, lib/driver/_cdio_linux.c, lib/driver/cdio_private.h: Add audio lineout controls (play, pause, volume control) 2005-03-01 rocky * lib/driver/_cdio_generic.c, lib/driver/generic.h: Add read_data_blocks via cooked mode. Seems to work better than read_cd. 2005-02-28 rocky * lib/driver/_cdio_linux.c: Failed attempt to make read_data_sectors work. 2005-02-28 rocky * TODO: One down one added. Not sure overall we're making progress. 2005-02-28 rocky * lib/iso9660/iso9660_fs.c: Report error when read_data_block fails. 2005-02-28 rocky * lib/driver/mmc.c: Don't try to read too many blocks on MMC readcd. 2005-02-28 rocky * include/cdio/util.h: Tighter declarations of variables. 2005-02-28 rocky * include/cdio/device.h, lib/driver/_cdio_linux.c: More device error return codes. More detailed errors when CDROM_SEND_PACKET fails. 2005-02-27 rocky * lib/driver/MSWindows/win32.c, lib/iso9660/iso9660.c, src/iso-info.c: win32.c: fill in read_data_blocks (use mmc routine) iso-info.c: lint cast on output iso9660.c: deal with struct tm's that don't have gmt_off. 2005-02-26 rocky * src/util.c, test/copying.right, test/isofs-m1-no-rr.right, test/isofs-m1.right, test/joliet-nojoliet.right, test/joliet.right, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/vcd_demo.right, test/videocd.right: Show seconds in ISO9660 listing. 2005-02-26 rocky * lib/iso9660/rock.c: Copy last changes to parse_rock_ridge_stat_internal(). 2005-02-26 rocky * lib/iso9660/rock.c: Fix bugs in getting full symbolic link name (when multiple directories). Remove unnecessary malloc in realloc_symlink(). 2005-02-26 rocky * src/util.c, test/isofs-m1.right, test/joliet-nojoliet.right, test/joliet.right: Show modification time, not create time as seems to be the common case for ls. 2005-02-26 rocky * test/isofs-m1-no-rr.right, test/isofs-m1.right, test/monvoisin.right: Time's on iso9660 have changed. 2005-02-26 rocky * lib/iso9660/iso9660.c: Change to iso9660_get_dtime to make dates on Rock-Ridge CD's match what the OS reports when mounting. A bit was done by trial and error although it doesn't seem *inconsistent* with standards definitions. 2005-02-25 rocky * lib/driver/_cdio_sunos.c: Bug in setting blocksize - wasn't using passed parameter. 2005-02-25 rocky * include/cdio/track.h: Remove duplicate #define's 2005-02-25 rocky * lib/driver/_cdio_generic.c, lib/driver/_cdio_osx.c: _cdio_generic.c: OSX does return CDIO_CDROM_CDI_TRACK. _cdio_osx.c: fixup read_data_blocks. May have to complicate more if we need to make a distinction between Form 1 and Form 2. Revise for current name/variable conventions. 2005-02-25 rocky * lib/iso9660/iso9660_fs.c: Erroneous parameter passed. 2005-02-24 rocky * lib/driver/cdtext.c: Guard against deferencing NULL pointer. 2005-02-24 rocky * lib/driver/_cdio_osx.c: Use TR_ values from cdio/cdda.h. 2005-02-24 rocky * lib/driver/_cdio_osx.c: Add read_data_blocks; revise according to current conventions. 2005-02-23 rocky * lib/iso9660/iso9660.c: Don't assume all OS's have tm_gmtoff 2005-02-22 rocky * NEWS, README, include/cdio/iso9660.h, include/cdio/rock.h, lib/iso9660/iso9660.c, lib/iso9660/libiso9660.sym, lib/iso9660/rock.c: NEWS: all that's gone on so far in 0.73cvs README: Note paranoia and samba vfs module *.{h,c}: more debugger symbols. Use _s convention more. 2005-02-22 rocky * lib/iso9660/iso9660.c, test/isofs-m1.right, test/monvoisin.right: iso9660_get_dtime hack: we've seen it happen that everything except gmtoff is zero and the expected date is the beginning of the epoch. So we accept 6 numbers being zero. I'm also not sure if using the of the Epoch is also the right thing to do either. 2005-02-22 rocky * lib/iso9660/libiso9660.sym: Missing new symbol. Thanks again to Steve Schultz 2005-02-22 rocky * include/cdio/iso9660.h, include/cdio/rock.h, lib/iso9660/iso9660.c: More time corrections as hopefully move towards Nirvana. 2005-02-22 rocky * include/cdio/iso9660.h, lib/iso9660/iso9660.c, lib/iso9660/rock.c, src/cd-info.c, src/util.c: Add routine for extracing ISO 9660 long time format and probably correct the short-time format a little. Handle Rock-Ridge time and be able to display it. This pretty much completes the bulk of handling Rock-Ridge extensions. 2005-02-21 rocky * include/cdio/iso9660.h, include/cdio/rock.h, lib/iso9660/iso9660_fs.c, lib/iso9660/rock.c, src/cd-info.c, src/iso-info.c, src/util.c, src/util.h: Process Rock-Ridge time fields. Not tested or shown yet. Break out Rock Ridge fields of our ISO9660 stat. 2005-02-21 rocky * include/cdio/iso9660.h, include/cdio/rock.h, lib/iso9660/iso9660_fs.c, lib/iso9660/rock.c, src/cd-info.c, src/iso-info.c, src/util.c: Process symbolic links. Remove some memory leaks. 2005-02-20 rocky * example/C++/.cvsignore: [no log message] 2005-02-20 rocky * lib/iso9660/iso9660.c, lib/iso9660/iso9660_fs.c, lib/iso9660/rock.c: Fix some memory leaks caught by valgrind. Also replace a relloc - not sure why valgrind was having problems with that. 2005-02-20 rocky * include/cdio/rock.h, lib/iso9660/rock.c, src/cd-info.c, src/iso-info.c, src/util.c, test/Makefile.am, test/check_cue.sh.in, test/isofs-m1-no-rr.right, test/isofs-m1.right, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/vcd_demo.right, test/videocd.right: Correct Rock-Ridge directory/link listing. {cd,iso}-info --no-rock-ridge works (and with rock-ridge too) test/*.right: output is now what I guess it's should be 2005-02-20 rocky * test/joliet-nojoliet.right, test/joliet.right: Add LSNs more places. 2005-02-20 rocky * test/copying.right: Add LSN's 2005-02-20 rocky * src/util.c, test/isofs-m1.right: Put in LSN's and sizes more often. 2005-02-20 rocky * src/util.c: "printf (" -> "report (stdout," 2005-02-20 rocky * include/cdio/iso9660.h, include/cdio/rock.h, include/cdio/xa.h, lib/iso9660/iso9660_fs.c, lib/iso9660/libiso9660.sym, lib/iso9660/rock.c, lib/iso9660/xa.c, src/Makefile.am, src/cd-info.c, src/iso-info.c, src/util.c, src/util.h, test/copying.right, test/isofs-m1.right, test/joliet-nojoliet.right, test/joliet.right, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/vcd_demo.right, test/videocd.right: all: Add iso9660_get_rock_attr_str to get an ls-like mode string for rock ridge. {cd,iso}-info.c util.{c,h}: put common printing routine in util.c rock.h: add enum for NM flags iso9660.h: move mode_t typedef so it can be used in rock.h xa.{c,h}: small typos. test/*: in most cases better output. On VCD's however there there is a slight regression on displaying the filename someitmes. Will be addressed later. 2005-02-20 rocky * lib/iso9660/iso9660_fs.c, test/check_iso.sh.in, test/joliet-nojoliet.right: [no log message] 2005-02-20 rocky * example/C++/iso2.cpp, example/iso2.c: Another small change/generalization: don't limit driver to a BIN/CUE image. 2005-02-20 rocky * example/C++/iso2.cpp, example/iso2.c: Revise these for current state-of-the-art use and show off libiso9660 library with more compitency. We now allow one to specify the CUE file as well as file to extract. 2005-02-20 rocky * example/README: Revise now that we have a separate C++ directory. 2005-02-19 rocky * test/check_iso.sh.in: Add --no-header as all regression tests probably should do (so we don't get copyright info.) 2005-02-19 rocky * include/cdio/iso9660.h: Add debugging enumeration for ISO EXTENSION masks. 2005-02-19 rocky * configure.ac: Add C++ Makefile. 2005-02-19 rocky * include/cdio/mmc.h: Allow C++ programs to issue mmc commands. 2005-02-19 rocky * example/Makefile.am: Ooops. MMC4 wasn't supposed to get in there. 2005-02-19 rocky * src/cd-info.c, src/cd-read.c, src/iso-info.c, src/iso-read.c: cd-info.c: tolerate CDDB options even when we don't support CDDB. Better error reporting of bad options. 2005-02-19 rocky * example/C++/.cvsignore, example/C++/Makefile.am, example/C++/README, example/C++/iso1.cpp, example/C++/iso2.cpp, example/C++/iso3.cpp, example/C++/mmc1.cpp, example/C++/mmc2.cpp, example/Makefile.am, example/iso1cpp.cpp, example/iso2cpp.cpp, example/iso3.c, example/iso3cpp.cpp: Move C++ files to C++ directory. Add mmc{1,2} checking to list of C++ programs compiled. 2005-02-19 rocky * lib/driver/_cdio_sunos.c: Add read_data_sectors 2005-02-18 rocky * configure.ac, test/check_iso.sh.in, test/copying.right, test/joliet-nojoliet.right, test/joliet.right: Wasn't running ISO9660 regression tests. Output now includes file sizes. 2005-02-18 rocky * src/iso-info.c: Add filesystem size --iso9660 output. 2005-02-18 rocky * test/isofs-m1.right: Think this is more correct. 2005-02-18 rocky * src/iso-info.c: Use translated name in directory reporting. 2005-02-18 rocky * lib/iso9660/iso9660_fs.c: Remove bug in Joliet-handling when adding Rock Ridge is not there. 2005-02-18 rocky * lib/driver/mmc.c: Mode sense changes. Not sure about this though. 2005-02-18 rocky * lib/iso9660/iso9660_fs.c, lib/iso9660/rock.c, src/cd-info.c: iso9660_fs.c: reallocate filename when Rock-Ridge name is bigger. rock.c: variable name changes cd-info.c: don't translate file name when there are Rock-Ridge Extensions. 2005-02-17 rocky * lib/driver/_cdio_bsdi.c, lib/driver/libcdio.sym: Add read_data_sectors to exported symbols and to BSDI. 2005-02-17 rocky * lib/driver/cd_types.c, lib/iso9660/iso9660_fs.c, src/cd-info.c: Remove more of the no longer needed distinction (that we sometimes got wrong) of Mode 1 vs Mode 2 data reading. 2005-02-17 rocky * include/cdio/mmc.h, include/cdio/read.h, lib/driver/_cdio_linux.c, lib/driver/cdio_private.h, lib/driver/image/bincue.c, lib/driver/image/cdrdao.c, lib/driver/image/nrg.c, lib/driver/image_common.c, lib/driver/image_common.h, lib/driver/libcdio.sym, lib/driver/mmc.c, lib/driver/mmc_private.h, lib/driver/read.c, lib/iso9660/iso9660_fs.c: Move forward in getting better ISO-9660 reading by eliminating "Mode 1/2" specification in API. 2005-02-17 rocky * test/check_nrg.sh.in: Ooops: added a bug in trying give more info. Fixed now. 2005-02-17 rocky * include/cdio/mmc.h, include/cdio/read.h, lib/driver/FreeBSD/freebsd.c, lib/driver/_cdio_generic.c, lib/driver/_cdio_linux.c, lib/driver/cdio_private.h, lib/driver/generic.h, lib/driver/image.h, lib/driver/image/bincue.c, lib/driver/image/cdrdao.c, lib/driver/image/nrg.c, lib/driver/image_common.c, lib/driver/image_common.h, lib/driver/libcdio.sym, lib/driver/mmc.c, lib/driver/mmc_private.h, lib/driver/read.c, lib/iso9660/iso9660_fs.c: Add routine for reading data independent of or mode1 and mode2 format. Should help with ISO 9660 reading. Add generic MMC READ_CD routine. Warning - even more breakage in some situations. (But there's promise of an overall brighter future.) 2005-02-17 rocky * test/check_nrg.sh.in: Show failing invocation. 2005-02-14 rocky * include/cdio/iso9660.h, lib/iso9660/iso9660_fs.c, lib/iso9660/rock.c, src/iso-info.c, test/isofs-m1.right: First semblance of being able to handle Rock Ridge names. 2005-02-14 rocky * include/cdio/iso9660.h, lib/iso9660/rock.c: Remove assumption that OS has POSIX file definitions (mode_t, nlink_t, gid_t, uid_t, time_t, etc.) 2005-02-14 rocky * lib/driver/mmc.c: gcc < 3.0 compilation fix 2005-02-13 rocky * include/cdio/iso9660.h, include/cdio/rock.h, lib/iso9660/Makefile.am, lib/iso9660/iso9660_fs.c, lib/iso9660/rock.c: Merge in more Rock Ridge code. Not working yet. Hopefully not much breakage. (But there may be some especially on less-POSIX OS's.) 2005-02-13 rocky * doc/libcdio.texi: Small correction - note cd-drive better. 2005-02-13 rocky * include/cdio/Makefile.am, include/cdio/iso9660.h, include/cdio/rock.h, include/cdio/xa.h: Add header for Rock-Ridge extensions. 2005-02-12 rocky * include/cdio/iso9660.h, include/cdio/xa.h, lib/iso9660/iso9660.c, lib/iso9660/xa.c: iso9660.h, iso9660.c, xa.c, xa.h: Add const char's for debugging use. iso9660.h: go over yet again for more info from the ECMA 119 spec. 2005-02-12 rocky * include/cdio/iso9660.h: Add type definitions for achar, dchar and ISO 9660 7.1.1 - ISO 7.3.3 types and use them. This frees up space for better comments about he feild names of a PVD or SVD. 2005-02-12 rocky * include/cdio/device.h, include/cdio/mmc.h: Remove doxygen references to get_speed() routines. They don't exist and seem to confuse people. 2005-02-12 rocky * include/cdio/iso9660.h, lib/iso9660/iso9660.c, lib/iso9660/iso9660_fs.c, lib/iso9660/iso9660_private.h, test/check_sizeof.c: All structure tags now end in _s and we have typedefs for all of them (ending in _t). iso9660.h: abc -> a.b.c for ISO fields. 2005-02-12 rocky * doc/libcdio.texi: Document _e, _s, and _t suffixes 2005-02-12 rocky * include/cdio/xa.h: signature is probably better typed as a char rather than a uint8_t. We now define structures with the _s suffix. 2005-02-12 rocky * include/cdio/bytesex.h: Doxygen document ISO 9660 conversion routines a tad better. 2005-02-12 rocky * include/cdio/mmc.h: Correct CDB acronym. 2005-02-12 rocky * doc/glossary.texi, doc/libcdio.texi: Add IDE, Command Packet and SCSI CDB. Revise ATAPI definition. Correct acronym for CDB. 2005-02-11 rocky * lib/driver/MSWindows/win32_ioctl.c, lib/driver/mmc.c: mmc.c: mmc_mode_sense can't use cdio_have_atapi (without further check) or else we may get an infinite recursion. win32_ioctl.c: deal with an error message that can't be converted to a string. 2005-02-11 rocky * lib/driver/MSWindows/win32.c: Stylistic changes. 2005-02-11 rocky * lib/driver/MSWindows/win32.c, lib/driver/image/bincue.c, lib/driver/image/cdrdao.c, lib/driver/image/nrg.c, lib/driver/image_common.c, lib/driver/mmc.c, test/check_paranoia.sh.in: Bug fix for mmc_have_interface. checK_paranoia.sh.in: fix bug in returning success on a core dump win32.c: some small changes - more later. image/*.c: set run_mmc_cmd NULL explicitly. 2005-02-10 rocky * include/cdio/mmc.h, lib/driver/_cdio_sunos.c, lib/driver/mmc.c: Use solaris ioctl for blocksize set/get. Prototype corrections. 2005-02-10 rocky * lib/driver/mmc.c: Think I have how to get MMC media changed worked out. 2005-02-10 rocky * include/cdio/cdio.h, include/cdio/device.h, include/cdio/mmc.h, include/cdio/types.h, lib/cdda_interface/interface.c, lib/driver/device.c, lib/driver/libcdio.sym, lib/driver/mmc.c, lib/iso9660/iso9660_fs.c: Add generic mode_sense(), add cdio_have_atapi() and use these. API number bumped Add bool_3way_t (yes, nope, dunno) 2005-02-09 rocky * lib/driver/image/nrg.c: Turn a number of the info messages into debug messages. 2005-02-09 rocky * example/.cvsignore, example/Makefile.am, example/README, example/iso4.c, example/isofuzzy.c, include/cdio/mmc.h, lib/driver/mmc.c, lib/driver/mmc_private.h, test/check_fuzzyiso.sh: Add mode_sense6() and mode_sense10() MMC commands. Use them to hopefully clean up code a little. Remove some unused MMC "private" commands. iso4 -> isofuzzy 2005-02-09 rocky * src/util.c: small formatting change 2005-02-09 rocky * lib/driver/mmc.c: Add "Rigid Restricted Overwrite" string. 2005-02-08 rocky * test/Makefile.am, test/check_fuzzyiso.sh: Add regression test for fuzzy ISO detection. Probably will rename iso4 to something else. 2005-02-08 rocky * example/mmc2.c, include/cdio/mmc.h, lib/driver/libcdio.sym, lib/driver/mmc.c, src/util.c: Add enum for feature profiles. Add feature to string conversion routines. 2005-02-07 rocky * include/cdio/mmc.h: Probably "interface" is reserved in some Windows contexts 2005-02-07 rocky * src/util.c: Small formatting changes. 2005-02-07 rocky * include/cdio/mmc.h, src/util.c: Add more MMC features and profiles such as ones used by the Plextor DVDR PX-716A 2005-02-07 rocky * example/.cvsignore: [no log message] 2005-02-07 rocky * lib/driver/MSWindows/win32_ioctl.c, lib/driver/_cdio_linux.c: Break out DVD detection. More verbose comments about the issues here. 2005-02-07 rocky * TODO: Revise. 2005-02-07 rocky * example/mmc1.c, example/mmc2.c, include/cdio/Makefile.am, include/cdio/mmc.h, include/cdio/scsi_mmc.h, lib/cdda_interface/interface.c, lib/cdda_interface/scan_devices.c, lib/driver/FreeBSD/freebsd_cam.c, lib/driver/MSWindows/aspi32.c, lib/driver/MSWindows/win32.c, lib/driver/MSWindows/win32_ioctl.c, lib/driver/_cdio_aix.c, lib/driver/_cdio_linux.c, lib/driver/_cdio_sunos.c, lib/driver/libcdio.sym, lib/driver/mmc.c, lib/driver/mmc_private.h: lib/drivermmc.{c,h}: Add mmc_have_interface() to see if we've got SCSI or ATAPI or whatever. cdda_interface: Use mmc_have_inteface() we don't have anything for this except in GNU/Linux. May reduce the unnecessary data_bigendianp() calls which cause lots of disc reading. Turn #defines for MMC Profiles into enumeration. Add enumeration for "core" interface types #include -> #include 2005-02-06 rocky * lib/driver/MSWindows/aspi32.c, lib/driver/MSWindows/aspi32.h, lib/driver/MSWindows/win32.c, lib/driver/MSWindows/win32.h, lib/driver/MSWindows/win32_ioctl.c: Windows fixes. Read TOC via MMC only when media is not DVD. 2005-02-06 rocky * configure.ac, example/Makefile.am, example/README, example/device.c, example/sample2.c, lib/driver/_cdio_linux.c, lib/driver/libcdio.sym, lib/driver/portable.h, lib/paranoia/overlap.c, lib/paranoia/p_block.c, lib/paranoia/p_block.h, lib/paranoia/paranoia.c: Various portability fixes mosty for MSVC which doesn't have drand and doesn't allow dynamic local arrays. v_fragment -> v_fragment_t libcdio.sym: more external symbols defined /lib/_cdio_linux.c: harmless type mismatch example/sample2.c -> example/device.c 2005-02-06 rocky * autogen.sh: Try another approach to getting version.texi made. 2005-02-06 rocky * doc/.cvsignore, doc/version.texi: Get rid of version.tex again. Bogus check ins keep appearing and conflicts in CVS updates. I hate automake. 2005-02-06 rocky * lib/driver/libcdio.sym: scsi_mmc -> mmc name change. 2005-02-06 rocky * lib/driver/FreeBSD/freebsd.c, lib/driver/FreeBSD/freebsd.h, lib/driver/FreeBSD/freebsd_cam.c: FreeBSD fixes. 2005-02-06 rocky * lib/driver/_cdio_osx.c: OSX fixes. 2005-02-06 rocky * lib/driver/_cdio_bsdi.c: BSDI fixes for get_media_changed. Fix mostly harmless type mismatch from before media_changed work. 2005-02-06 rocky * doc/version.texi, lib/driver/_cdio_sunos.c, lib/driver/cdio_private.h, lib/driver/image_common.c, lib/driver/image_common.h, lib/iso9660/iso9660_fs.c: iso9660_fs.c: wrong order of initialization. correct types on get_media_changed_mmc Solaris fixes. 2005-02-06 rocky * example/mmc1.c, example/mmc2.c, example/scsi-mmc1.c, example/scsi-mmc2.c, include/cdio/device.h, include/cdio/scsi_mmc.h, lib/driver/FreeBSD/freebsd.c, lib/driver/FreeBSD/freebsd_cam.c, lib/driver/MSWindows/win32_ioctl.c, lib/driver/_cdio_aix.c, lib/driver/_cdio_bsdi.c, lib/driver/_cdio_generic.c, lib/driver/_cdio_linux.c, lib/driver/_cdio_osx.c, lib/driver/_cdio_sunos.c, lib/driver/cdio_private.h, lib/driver/device.c, lib/driver/image/bincue.c, lib/driver/image/cdrdao.c, lib/driver/image/nrg.c, lib/driver/image_common.c, lib/driver/image_common.h, lib/driver/mmc.c, lib/driver/mmc_private.h: Start to implement ability to a detect media change. scsi_mmc -> mmc. Warning: some breakage may occur. 2005-02-06 rocky * include/cdio/device.h, include/cdio/sector.h, include/cdio/track.h, lib/driver/sector.c, lib/driver/track.c: Move track things out off sector.h 2005-02-05 rocky * include/cdio/cdda.h, lib/cdda_interface/scan_devices.c: Another typo 2005-02-05 rocky * include/cdio/cdda.h, lib/cdda_interface/scan_devices.c: Typo. 2005-02-05 rocky * include/cdio/cdda.h, lib/cdda_interface/scan_devices.c: Another "cooked" name bites the dust. Soem doxygen cleanup too. 2005-02-05 rocky * Makefile.am, configure.ac, doc/version.texi, lib/cdda_interface/common_interface.h, lib/cdda_interface/scan_devices.c: Deal with OS's that don't have a stat'able filesystem. More SuSe spec removal. More SuSE spec removal 2005-02-05 rocky * example/iso4.c, lib/iso9660/iso9660_fs.c: Check in Mode 1 or Mode 2 on fuzzy searching. 2005-02-05 rocky * lib/iso9660/iso9660_fs.c: Check header for PVD MSF. Get XA mode more often. 2005-02-05 rocky * include/cdio/xa.h, lib/iso9660/iso9660_fs.c, lib/iso9660/xa.c: xa.h: add enumeration for debugging rest: better understanding of when there might be XA and when there might not be. Don't give a warnings about missing XA attributes when the format isn't supposed to have it. 2005-02-05 rocky * lib/cdda_interface/Makefile.am, lib/cdda_interface/cddap_interface.c, lib/cdda_interface/cooked_interface.c, lib/cdda_interface/interface.c, lib/cdda_interface/low_interface.h: cooked -> cddap. It has been observed that the use of "cooked" causes confusion and derision among the small-minded; and the code doesn't use cooked reading anyway. 2005-02-05 rocky * include/cdio/cdio.h, include/cdio/disc.h, include/cdio/scsi_mmc.h, include/cdio/sector.h, lib/driver/disc.c, lib/driver/sector.c, src/cd-info.c: Move discmode things out of sector and over to disc.h and disc.c. 2005-02-05 rocky * Makefile.am, package/.cvsignore, package/libcdio-suse.spec.in: Remove SuSE spec - it is not likely to be very general purpose. It is also not the real one which needs to be modified for each version and vcdimager/libcdio/libcddb collection and undergoes Language translation outside of the spec file. 2005-02-05 rocky * lib/driver/MSWindows/aspi32.c, lib/driver/MSWindows/win32_ioctl.c: scsi_mmc -> mmc 2005-02-05 rocky * lib/driver/Makefile.am, lib/driver/_cdio_generic.c, lib/driver/cdio_private.h, lib/driver/mmc.c, lib/driver/mmc_private.h, lib/driver/scsi_mmc.c, lib/driver/scsi_mmc_private.h: scsi_mmc -> mmc 2005-02-05 rocky * include/cdio/cdda.h, include/cdio/iso9660.h, include/cdio/sector.h, lib/cdda_interface/common_interface.c, lib/driver/sector.c, lib/iso9660/iso9660.c: Make debugger-helping enums extern'd and define onces elsewhere. 2005-02-05 rocky * doc/libcdio.texi, lib/driver/_cdio_stdio.c, lib/driver/_cdio_stream.c, lib/driver/_cdio_stream.h, lib/driver/read.c, lib/driver/sector.c, lib/iso9660/iso9660_fs.c, lib/iso9660/iso9660_private.h, lib/iso9660/libiso9660.sym, src/util.c: First attempt at smart iso9660 reading in CD images. _cdio_stream.*: return is now cdio_driver_return_t 2005-02-05 rocky * lib/cdda_interface/interface.c, lib/cdda_interface/scan_devices.c: Remove d->interface. 2005-02-05 rocky * include/cdio/cdda.h, include/cdio/device.h, include/cdio/iso9660.h, include/cdio/sector.h: all: Add various enums to allow debugging using #define names. cdda: remove interface field (COOKED, SCSI). It's not going to be used. iso9660.h: add fuzzy iso9660 search. 2005-02-04 rocky * example/README: SCSI-MMC -> MMC. 2005-02-04 rocky * example/.cvsignore, example/Makefile.am, example/iso4.c, example/mmc1.c, example/mmc2.c: scsi-mmc{1,2} -> mmc{1,2} iso4.c: fuzzy ISO 9660 searching 2005-02-04 rocky * lib/driver/MSWindows/win32.h, lib/driver/MSWindows/win32_ioctl.c: const removal to match proper run_scsi_cmd prototype. Bug in reporting TOC lsn's. Thanks to Bobbin007. 2005-02-04 rocky * lib/iso9660/iso9660_fs.c: remove cdio_malloc() and replace with calloc() 2005-02-03 rocky * configure.ac, lib/cdda_interface/scan_devices.c: Test and workaround another Unixism - pwd.h, getuid/getpwuid. 2005-02-03 rocky * configure.ac, lib/cdda_interface/scan_devices.c: Test for presense of lstat (optionally used in scan_devices of cdda_interface). 2005-02-03 rocky * include/cdio/util.h: Remove cdio_malloc(). Please use calloc instead. 2005-02-03 rocky * lib/driver/FreeBSD/freebsd.c, lib/driver/MSWindows/win32.c, lib/driver/_cdio_aix.c, lib/driver/_cdio_bsdi.c, lib/driver/_cdio_linux.c, lib/driver/_cdio_osx.c, lib/driver/_cdio_stdio.c, lib/driver/_cdio_stream.c, lib/driver/_cdio_sunos.c, lib/driver/cdio.c, lib/driver/ds.c, lib/driver/image/bincue.c, lib/driver/image/cdrdao.c, lib/driver/image/nrg.c, lib/driver/util.c: remove cdio_malloc and replace with calloc which does functionally exactly the same thing (but is standard). In some drivers _data -> p_data. 2005-02-03 rocky * example/iso1.c, example/iso2.c: Allow one to specify an input file on input. iso1.c: guard better against an error in reading the directory. 2005-02-03 rocky * configure.ac: Okay, we're really in 0.73cvs now. 2005-02-03 rocky * lib/cdda_interface/low_interface.h: Remove a number of GNU/Linux and/or Unix #includes that probably don't belong. #ifdef some of the others, although I think they'll likely be there. 2005-02-03 rocky * doc/.cvsignore, doc/version.texi: Even though this file is automatically generated, CVS for the automake project seems to have this checked into CVS presumably to handle the problem of a missing version.texi for on initial checkout/bootstrap. Seems odd, but I'm assuming automake developers know what they are doing. (On the other hand, given the quantity of hassles using automake, I could be very very wrong.) 2005-02-01 rocky * include/cdio/xa.h: Typo. 2005-02-01 rocky * doc/libcdio.texi: cdrdao Grammar missing MSF for START and END. 2005-02-01 rocky * parse/toc.y: grammar missing optional msf for START and END. 2005-02-01 rocky * doc/libcdio.texi: More typos. 2005-02-01 rocky * configure.ac: Require automake 1.8. Kudos to Steve Schultz; raspberries to automake. 2005-01-31 rocky * configure.ac: Add substitution for mkdir -p Get ready for 0.72 2005-01-31 rocky * parse/.cvsignore, parse/Makefile, parse/toc.y, parse/toclexer.c, parse/toclexer.h: First attempt at Bison TOC parser. 2005-01-31 rocky * doc/glossary.texi, doc/libcdio.texi: Improve cdrdao grammar. More on SVCD. Minor index and other corrections. Probably the last lookover before the 0.72 release. 2005-01-30 rocky * lib/driver/image/bincue.c: More variable renamings. 2005-01-30 rocky * lib/driver/image/bincue.c: env -> p_env user_data -> p_user_data 2005-01-30 rocky * README.libcdio: grammatical improvement 2005-01-30 rocky * libcdio_paranoia.pc.in: Picking up wrong library: need libcdio_cdda, not cdda_interface 2005-01-30 rocky * libcdio_cdda.pc.in, libcdio_paranoia.pc.in, libiso9660.pc.in: libcdio_*: names probably need to be something other that libcdio which is already in use. libsio9660: minor title change 2005-01-29 rocky * lib/driver/libcdio.sym: Missing cdio_error. 2005-01-29 rocky * configure.ac: Hopefully last release candidate. 2005-01-29 rocky * doc/libcdio.texi, example/scsi-mmc1.c, example/scsi-mmc2.c, include/cdio/bytesex.h, include/cdio/bytesex_asm.h, include/cdio/cdda.h, include/cdio/cdio.h, include/cdio/cdtext.h, include/cdio/device.h, include/cdio/iso9660.h, include/cdio/paranoia.h, include/cdio/scsi_mmc.h, include/cdio/track.h, include/cdio/version.h.in, lib/driver/scsi_mmc.c, test/check_cd_read.sh: Doxygen changes. 2005-01-29 rocky * doc/libcdio.texi: More small corrections. 2005-01-29 rocky * test/check_common_fn.in, test/check_cue.sh.in, test/check_iso.sh.in, test/check_opts.sh: Slightly more descriptive and accurate error messages when regression tests fail. Also if no Joliet support, one test is skipped. 2005-01-29 rocky * doc/glossary.texi, doc/libcdio.texi, example/paranoia.c, example/scsi-mmc1.c, example/scsi-mmc2.c: Add section on SCSI mmc. Go over and spell check. example/*.c some trivial typos 2005-01-29 rocky * src/cd-paranoia/doc/Makefile.am, src/cd-paranoia/doc/en/Makefile.am, src/cd-paranoia/doc/jp/Makefile.am: Forgot to install default manpages. 2005-01-29 rocky * configure.ac, doc/.cvsignore, doc/doxygen/.cvsignore, src/cd-paranoia/Makefile.am, src/cd-paranoia/doc/.cvsignore, src/cd-paranoia/doc/Makefile.am, src/cd-paranoia/doc/cd-paranoia.1.in, src/cd-paranoia/doc/cd-paranoia.1.jp.in, src/cd-paranoia/doc/en/.cvsignore, src/cd-paranoia/doc/en/Makefile.am, src/cd-paranoia/doc/en/cd-paranoia.1.in, src/cd-paranoia/doc/jp/.cvsignore, src/cd-paranoia/doc/jp/Makefile.am, src/cd-paranoia/doc/jp/cd-paranoia.1.in: Put Japanese man page in man/jp. 2005-01-28 rocky * doc/glossary.texi, doc/libcdio.texi: Go over documentation yet again. In particular: Move section on image formats out of Appendix and expand. Add a chapter on program internals glossary: add item to concept index and regularize index names. 2005-01-28 rocky * lib/driver/image/bincue.c: [no log message] 2005-01-27 rocky * lib/driver/_cdio_osx.c: fix harmless prototype mismatches. 2005-01-27 rocky * lib/driver/MSWindows/aspi32.c, lib/driver/MSWindows/aspi32.h, lib/driver/MSWindows/win32.c, lib/driver/MSWindows/win32.h, lib/driver/MSWindows/win32_ioctl.c, lib/driver/scsi_mmc.c, lib/driver/scsi_mmc_private.h: cygwin fixes mostly. 2005-01-27 rocky * configure.ac, lib/driver/FreeBSD/freebsd.c: Add check for to and use in freebsd.c to stop warning. 2005-01-27 rocky * lib/driver/FreeBSD/freebsd.c, lib/driver/FreeBSD/freebsd.h, lib/driver/FreeBSD/freebsd_cam.c, lib/driver/FreeBSD/freebsd_ioctl.c: Some FreeBSD fixes. 2005-01-27 rocky * Makefile.am, lib/driver/Makefile.am, lib/iso9660/Makefile.am: Attempt to get library version numbers correct for release. 2005-01-27 rocky * configure.ac: Okay, we'll call this rc1. 2005-01-27 rocky * configure.ac, include/cdio/cd_types.h, include/cdio/cdda.h, include/cdio/cdtext.h, include/cdio/paranoia.h, include/cdio/track.h, lib/cdda_interface/common_interface.c, lib/cdda_interface/interface.c, lib/cdda_interface/scan_devices.c, lib/driver/_cdio_generic.c, lib/driver/cdio.c, lib/driver/cdio_private.h, lib/driver/cdtext.c, lib/driver/generic.h, src/cd-info.c: cdparanoia: add ability to disable byte swapping configure.ac: remove AIX driver for now - it doesn't really work remove some (but not all) of the valgrind errors in cd-text Some stylistic things, doxygen comment improvements typos, etc. 2005-01-26 rocky * include/cdio/cdda.h, include/cdio/paranoia.h: Add an easy way to turn off paranoia compatibility. 2005-01-26 rocky * example/paranoia2.c, include/cdio/cdda.h, lib/cdda_interface/interface.c, lib/driver/_cdio_generic.c, lib/driver/device.c: Add a cdda_close that doesn't free the p_cdio pointer for those cases where an application may want to keep that pointer open. All routines now are distinct from parnaoia routines with suitable #defines for compatibility. 2005-01-25 rocky * configure.ac, example/paranoia2.c, include/cdio/cdda.h, include/cdio/paranoia.h, lib/cdda_interface/cooked_interface.c, lib/cdda_interface/interface.c, lib/cdda_interface/scan_devices.c, libcdio_cdda.pc.in, test/testparanoia.c: libcdio_cdda.pc.in: had wrong cdda_interface library Rename paranoia routines to cdio-specific names so both libraries can coexist. And I think it makes debugging a little easier if not clearer. 2005-01-25 rocky * .cvsignore, libcdio.pc.in, libcdio_cdda.pc.in, libcdio_paranoia.pc.in, libiso9660.pc.in: Move pc files back into root of source tree. 2005-01-25 rocky * package/.cvsignore, package/libcdio.pc.in, package/libcdio_cdda.pc.in, package/libcdio_paranoia.pc.in, package/libiso9660.pc.in: Move package config files back to root of source tree. 2005-01-25 rocky * Makefile.am, package/.cvsignore, package/libcdio-suse.spec.in: SuSE spec file from Stanislav Brabec 2005-01-25 rocky * libcdio.pc.in, libcdio.spec.in, libcdio_cdda.pc.in, libcdio_paranoia.pc.in, libiso9660.pc.in: Now located in package. 2005-01-25 rocky * .cvsignore, configure.ac, example/paranoia2.c, package/libcdio.pc.in, package/libcdio.spec.in, package/libcdio_cdda.pc.in, package/libcdio_paranoia.pc.in, package/libiso9660.pc.in: Add package directory for various package files. paranoia2.c: comment typo 2005-01-24 rocky * lib/driver/_cdio_aix.c: Compilation fixes 2005-01-24 rocky * doc/libcdio.texi: Add cdrdao grammar, cd paranoia example program and lots of little documentation updates. More later... 2005-01-24 rocky * doc/libcdio.texi: Add CD Text, CDDB, and CD+G information. CdIo->CdIo_t 2005-01-24 rocky * lib/driver/MSWindows/win32.c: Wrong return type. 2005-01-24 rocky * lib/driver/_cdio_osx.c: Synatx error. 2005-01-24 rocky * lib/driver/_cdio_bsdi.c: syntax error. 2005-01-24 rocky * lib/driver/_cdio_sunos.c: Wrong return type. 2005-01-24 rocky * NEWS, include/cdio/disc.h, include/cdio/scsi_mmc.h, lib/driver/FreeBSD/freebsd.c, lib/driver/FreeBSD/freebsd_cam.c, lib/driver/FreeBSD/freebsd_ioctl.c, lib/driver/MSWindows/win32.c, lib/driver/_cdio_aix.c, lib/driver/_cdio_bsdi.c, lib/driver/_cdio_linux.c, lib/driver/_cdio_osx.c, lib/driver/_cdio_sunos.c, lib/driver/cdio_private.h, lib/driver/disc.c, lib/driver/image/bincue.c, lib/driver/image/cdrdao.c, lib/driver/image/nrg.c, lib/driver/libcdio.sym, lib/driver/scsi_mmc.c, lib/driver/scsi_mmc_private.h: stat_size -> get_disc_last_lsn. Now returns lsn_t and CDIO_INVALID_LSN on error. Add MMC version of get_disc_last_lsn. More regularization of driver_return_code_t and get_disc_last_lsn There's probably some small driver breakage which will be fixed soon. 2005-01-23 rocky * include/cdio/cdio.h, include/cdio/device.h, include/cdio/read.h, lib/driver/FreeBSD/freebsd.c, lib/driver/_cdio_aix.c, lib/driver/_cdio_bsdi.c, lib/driver/_cdio_generic.c, lib/driver/_cdio_linux.c, lib/driver/_cdio_sunos.c, lib/driver/image/bincue.c, lib/driver/image/cdrdao.c, lib/driver/image/nrg.c, lib/driver/read.c, lib/driver/scsi_mmc.c, lib/driver/scsi_mmc_private.h: Change read routines so the use the driver_return_code_t enumeration. It's a little cleaner and may make things clearer in debugging. 2005-01-23 rocky * lib/driver/MSWindows/win32.c: Use SCSI-MMC routine for reading audio sectors. ioctl READRAW doesn't always word and is slow. 2005-01-23 rocky * lib/cdda_interface/interface.c, lib/paranoia/paranoia.c: Work around problem where we were accessing outside of an allocate range when the drive endian was different than the CD-ROM endianness. We do this by always allocating an extra block, but it would be better to understand whether this is correct or whether some logic needs to be fixed. 2005-01-23 rocky * test/testparanoia.c: Remove access of uninitialized memory. 2005-01-23 rocky * test/testdefault.c: Remove memory leak. Not used in regression testing though. 2005-01-23 rocky * lib/cdda_interface/scan_devices.c, lib/driver/FreeBSD/freebsd.c, lib/driver/MSWindows/win32.c, lib/driver/_cdio_bsdi.c, lib/driver/_cdio_linux.c, lib/driver/image_common.c, lib/paranoia/isort.c, lib/paranoia/p_block.c, lib/paranoia/paranoia.c, test/testparanoia.c: Remove some valgrind-caught memory leaks or use of uninitialized regions. 2005-01-23 rocky * lib/driver/_cdio_sunos.c: Valgrind-caught memory leak. 2005-01-23 rocky * test/Makefile.am, test/bad-file.toc, test/data5.toc, test/data6.toc, test/data7.toc, test/testtoc.c: Since we have better TOC checking we now have to give real filenames. Adjust for this. Also added a regression test with a bad file name. 2005-01-23 rocky * lib/cdda_interface/common_interface.c, lib/cdda_interface/utils.h: Nope. Didn't get it right this time either with the byteswapping. However we've at least reduced the customness. 2005-01-23 rocky * lib/cdda_interface/common_interface.c, lib/cdda_interface/utils.h: Use common byte-swapping routines and remove cdparanoia-specific ones. (This time, for sure!) 2005-01-23 rocky * NEWS: [no log message] 2005-01-22 rocky * lib/driver/image.h, lib/driver/image/cdrdao.c, test/Makefile.am, test/check_cue.sh.in, test/vcd_demo.toc, test/vcd_demo_toc.right: Improve cdrdao to handle MSF-length. Remove vcd_demo_toc.right since the cd-info output is now the same as vcd_demo.right vcd_demo.toc adjusted accordingly. 2005-01-22 rocky * src/cd-drive.c, src/cd-info.c, src/iso-info.c, src/iso-read.c: Version information now includes build. 2005-01-22 rocky * include/cdio/version.h.in, src/cd-paranoia/version.h, test/check_paranoia.sh.in: check_paranoia.sh.in: Add a more agressive paranoia test. *version.h*: Include build name in version listings. 2005-01-22 rocky * test/check_paranoia.sh.in: Was missing move of jitter output. 2005-01-22 rocky * example/README: More about where to look for examples. 2005-01-22 rocky * example/README: Programs have been added and renamed. 2005-01-22 rocky * example/.cvsignore, test/.cvsignore: [no log message] 2005-01-22 rocky * include/cdio/cdda.h, lib/cdda_interface/cooked_interface.c, src/cd-paranoia/cd-paranoia.c, test/check_paranoia.sh.in: Add jitter simulation and jitter-correction testing. 2005-01-22 rocky * lib/driver/FreeBSD/freebsd.c: Add a CAM read audio now that CDIOREADAUDIO deosn't work on newer FreeBSDs. Deal with recent generic->mmc name changes. 2005-01-22 rocky * lib/driver/_cdio_stream.c: Don't attempt to see before the beginning of a file. 2005-01-22 rocky * lib/cdda_interface/common_interface.c, lib/cdda_interface/common_interface.h, lib/cdda_interface/scan_devices.c: Add routines which allow cdio object to be opened before cdda_open. common_interface.h: data_bigendianp() is now public (in cdio/cdda.h) 2005-01-22 rocky * include/cdio/cdda.h: Add interfaces which allow opening a cdio object before running paranoia. data_bigendianp is too neat to keep it private. 2005-01-22 rocky * example/Makefile.am, example/paranoia.c, example/paranoia2.c: Add an example which opens the cdio object first. Also show off data_bigendianp(). 2005-01-22 rocky * cvs2cl_usermap: Add Justin's info. 2005-01-21 rocky * lib/driver/_cdio_osx.c: Use strerror in all ioctl to give additional info. 2005-01-21 rocky * lib/driver/_cdio_aix.c, lib/driver/_cdio_bsdi.c, lib/driver/_cdio_linux.c, lib/driver/_cdio_osx.c, lib/driver/_cdio_sunos.c, lib/driver/scsi_mmc.c, lib/driver/scsi_mmc_private.h: Remove a number of const's since Darwin's run_scsi_mmc doesn't work that way :-( 2005-01-21 rocky * lib/driver/MSWindows/win32.c: routine name change. 2005-01-21 rocky * NEWS, lib/driver/_cdio_stream.c, lib/driver/image.h, lib/driver/image/cdrdao.c, test/vcd_demo_toc.right: _cdio_stream.c: replace assert's with failures. Make cdrdao be able to handle the kind of images vcdimager produces. There was a slight regression (perhaps so vcd_demo_toc.right may in fact not be right. Deal with some other time. 2005-01-21 rocky * lib/driver/_cdio_osx.c: Remove get_scsi for now. 2005-01-21 rocky * lib/driver/FreeBSD/freebsd.c, lib/driver/MSWindows/win32.c, lib/driver/_cdio_aix.c, lib/driver/_cdio_bsdi.c, lib/driver/_cdio_generic.c, lib/driver/_cdio_linux.c, lib/driver/_cdio_sunos.c, lib/driver/cdio_private.h, lib/driver/generic.h, lib/driver/scsi_mmc.c, lib/driver/scsi_mmc_private.h: Move some of the "generic" routines using MMC into SCSI-MMC. Think is a little bit clearer and cleaner. 2005-01-21 rocky * lib/driver/read.c: Remove probably some serious lapses: Now check all reads for exceeding end of disc and info messages can be logged. We were also returning 0 on error reads. Regularize by using a couple of macros. 2005-01-20 rocky * lib/driver/FreeBSD/freebsd.c: Missed a couple of env -> p_env's 2005-01-20 rocky * lib/driver/_cdio_osx.c: Add Scott Wood's code for issuing SCSI-MMC command. It doesn't work though. 2005-01-20 rocky * lib/driver/FreeBSD/freebsd.c, lib/driver/FreeBSD/freebsd_cam.c, lib/driver/_cdio_generic.c, lib/driver/_cdio_linux.c, lib/driver/_cdio_sunos.c, lib/driver/cdio_private.h, lib/driver/generic.h: Add get_blocksize. There may be some breakage as I haven't tested all of the various drivers yet. 2005-01-20 rocky * include/cdio/device.h, include/cdio/iso9660.h, include/cdio/paranoia.h, include/cdio/read.h: Various doxygen improvements. 2005-01-20 rocky * include/cdio/scsi_mmc.h: Turn a bunch of defines into an enumeration. Makes debugging a bit nicer. 2005-01-20 rocky * lib/driver/FreeBSD/freebsd.c, lib/driver/MSWindows/win32.c, lib/driver/_cdio_generic.c, lib/driver/_cdio_linux.c, lib/driver/_cdio_stdio.c, lib/driver/_cdio_stdio.h, lib/driver/_cdio_stream.c, lib/driver/_cdio_stream.h, lib/driver/_cdio_sunos.c, lib/driver/cdio_private.h, lib/driver/generic.h, lib/driver/image.h, lib/iso9660/iso9660_fs.c: Move a set_speed and set_blocksize (via MMC)from driver-specific places to generic. Add _t to yet another type. 2005-01-20 rocky * include/cdio/device.h, lib/driver/_cdio_linux.c, lib/driver/_cdio_sunos.c, lib/driver/cdio.c, lib/driver/device.c, lib/driver/scsi_mmc.c: Add DRIVER_OP_UNINIT and change appropriate DRIVER_OP_ERROR's to DRIVER_OP_UNINIT. 2005-01-19 rocky * lib/driver/MSWindows/win32_ioctl.c: Type cast that might make this more robust. 'Dunno. 2005-01-19 rocky * lib/cdda_interface/scan_devices.c: Even though this may not be nstrictly the way the original cdda_interface does things, add a spaces between the vendor, model, and revison number. 2005-01-19 rocky * src/cd-paranoia/cd-paranoia.c: Accomodate Windows that sometimes gives an argc that seems one greater than what's not NULL in argv. And it is probably a good idea anyway to test for null strings before calling strdup() 2005-01-19 rocky * lib/driver/_cdio_bsdi.c: Change to use driver_return_t 2005-01-19 rocky * lib/driver/_cdio_linux.c, lib/driver/_cdio_sunos.c, lib/driver/image_common.c: Change to use driver_return_t. 2005-01-19 rocky * include/cdio/cdio.h, include/cdio/device.h, lib/driver/_cdio_generic.c, lib/driver/_cdio_linux.c, lib/driver/cdio.c, lib/driver/device.c, lib/driver/generic.h, lib/driver/image_common.c, lib/driver/scsi_mmc.c: Try to regularize driver operation return codes via a new enumeation return type. (I may regret this later as we return ioctl's int value in some cases). cdio.h: get/set_arg moved to device. 2005-01-18 rocky * lib/cdda_interface/interface.c: Do not try to process if we got errors. More needs to be done, but this is a start. 2005-01-18 rocky * src/cd-paranoia/doc/cd-paranoia.1.in: Note change in -g option and that we scan for a CD-DA (rather than merely a CD-ROM). 2005-01-18 rocky * lib/driver/device.c: Got test backwards. 2005-01-18 rocky * src/cd-paranoia/cd-paranoia.c, src/cd-paranoia/usage.txt.in: --force-generic-device -g is an alias for --force-cdrom-device -d 2005-01-18 rocky * src/cd-paranoia/doc/.cvsignore: The usual. 2005-01-18 rocky * include/cdio/scsi_mmc.h, lib/driver/MSWindows/win32.c, lib/driver/scsi_mmc.c: Attempt SCSI-MMC speed setting (e.g. for M$). 2005-01-18 rocky * lib/driver/FreeBSD/freebsd.c: Add FreeBSD set speed routine. 2005-01-18 rocky * NEWS, test/Makefile.am: test/Makefile.am: forgot to add vcd2.toc NEWS: what's up. 2005-01-18 rocky * test/testparanoia.c: gcc < 3.0 compilation fix. 2005-01-18 rocky * lib/cdda_interface/scan_devices.c: Bug in accessing via snprintf a NULL string. 2005-01-18 rocky * example/Makefile.am, lib/driver/_cdio_osx.c: Add set_speed for OSX. 2005-01-18 rocky * lib/driver/_cdio_linux.c, lib/driver/_cdio_sunos.c: Add set_speed for Solaris via ioctl and set_blocksize via SCSI-MMC. Update comments in GNU/Linux driver. 2005-01-18 rocky * include/cdio/device.h, include/cdio/scsi_mmc.h, lib/cdda_interface/cooked_interface.c, lib/driver/_cdio_generic.c, lib/driver/_cdio_linux.c, lib/driver/cdio_private.h, lib/driver/device.c, lib/driver/generic.h, lib/driver/image/cdrdao.c, lib/driver/image_common.c, lib/driver/image_common.h, lib/driver/libcdio.sym, lib/driver/scsi_mmc.c, src/cd-paranoia/cd-paranoia.c: Add interface for setting speed and blocksize. Reinstated it in cd-paranoia libraries and command. Some more variable convention regularizations. 2005-01-17 rocky * lib/driver/FreeBSD/freebsd.c, lib/driver/MSWindows/win32.c, lib/driver/_cdio_aix.c, lib/driver/_cdio_bsdi.c, lib/driver/_cdio_linux.c, lib/driver/_cdio_osx.c, lib/driver/_cdio_sunos.c, lib/driver/cdio.c, lib/driver/cdio_private.h, lib/driver/device.c, lib/driver/image/bincue.c, lib/driver/image/cdrdao.c, lib/driver/image/nrg.c: add _t to another time. driver_id inside p_cdio wasn't initialized. 2005-01-17 rocky * example/paranoia.c: We don't need driver_id, so simplify this code a little bit. 2005-01-16 rocky * configure.ac, src/cd-paranoia/Makefile.am, src/cd-paranoia/cd-paranoia.c, src/cd-paranoia/doc/cd-paranoia.1, src/cd-paranoia/doc/cd-paranoia.1.in, src/cd-paranoia/doc/cd-paranoia.1.jp, src/cd-paranoia/doc/cd-paranoia.1.jp.in, src/cd-paranoia/usage.txt.in: Work on documentation. cd-paranoia name is now properly substituted. Offset option described better. 2005-01-16 rocky * src/cd-paranoia/Makefile.am, src/cd-paranoia/cd-paranoia.1, src/cd-paranoia/cd-paranoia.1.jp, src/cd-paranoia/doc/cd-paranoia.1, src/cd-paranoia/doc/cd-paranoia.1.jp: Move cd-paranoia documentation into its own directory. 2005-01-16 rocky * test/testtoc.c: Add another VCD toc test. We can't actually handle this fully, but at least we can parse it correctly (I think). 2005-01-16 rocky * test/vcd2.toc: Add another TOC test. This one taken from one modified from Steve Schultz's VCD collection. 2005-01-16 rocky * lib/driver/image/cdrdao.c: At least parse DATAFILE lines more fully. Things are better but we're still having problems reading the ISO-9660 of sms VCD's. 2005-01-16 rocky * lib/driver/image.h: It appears for cdrdao datastart needs to be larger. Could possibly be unsigned too. 2005-01-16 rocky * include/cdio/cdda.h: Redo bit masks for test flags. Should accomodate what is in (even if not working) in cdparanoia. 2005-01-16 rocky * test/.cvsignore, test/Makefile.am: Remove testparanoia .raw output on clean Also ignore these for CVS if they are around. 2005-01-15 rocky * include/cdio/cdda.h, src/cd-paranoia/cd-paranoia.c: Remove a couple of unused SCSI fields. 2005-01-15 rocky * include/cdio/cdda.h, lib/cdda_interface/Makefile.am, lib/cdda_interface/cooked_interface.c, lib/cdda_interface/interface.c, lib/cdda_interface/scan_devices.c, src/cd-paranoia/cd-paranoia.c, test/check_paranoia.sh.in: Add regression-test mechanism. Right now we only have underrun testing. Perhaps more later... cd-paranoia: -x option added to specify what to test. 2005-01-15 rocky * src/cd-paranoia/cd-paranoia.c: Replace some paranoia-specific copystring's with strdups. 2005-01-15 rocky * test/Makefile.am, test/check_paranoia.sh.in: Start another cd-paranoia test. This one uses image reading so it doesn't require a CD-DA loaded. 2005-01-15 rocky * lib/cdda_interface/scan_devices.c: Redo in a way simpler way that and in a way that valgrind doesn't think there's a memory leak. 2005-01-15 rocky * lib/cdda_interface/cooked_interface.c, src/cd-paranoia/cd-paranoia.c: cooked_interface.c: check for TOC-read error. cd-paranoia.c: check that list of drives isn't just NULL list. 2005-01-14 rocky * lib/driver/_cdio_osx.c: Small error. Used the wrong variable for extracting the revision. 2005-01-14 rocky * lib/driver/MSWindows/win32.c: More changes to deal with error conditions. 2005-01-14 rocky * test/Makefile.am: Need to put in libcdio libs for testparanoia. 2005-01-14 rocky * lib/driver/MSWindows/win32.c, lib/driver/device.c, test/testparanoia.c: win32.c: was not indicating a failure when reading the TOC failed. testparanoia.c: better check that there are drives. device.c: I think better checking on drive capability. At least we now check for the TOC failure case and not add a drive there. 2005-01-14 rocky * test/testparanoia.c: Use a more statistical approach to determining if cd-paranoia worked. We still are really testing the error correction part which may be the most interesting (and useful). 2005-01-14 rocky * lib/cdda_interface/interface.c, test/testparanoia.c: Looked at WAV spec format. Probably (but I'm not certain) the thing that was wrong was the test program which needs to byte swap. What confuses me now is how the media players sort this out. 2005-01-14 rocky * lib/cdda_interface/interface.c, lib/cdda_interface/scan_devices.c: The sense I'm getting is that while the bigendianp detection is clever, it isn't complete. It may be that we need to use this along in conjunctin with the endianness of the OS. That is instead of big/little endian, what's needed is same/not same endian. For now, the simplest thing is to just disable all of this and wait to discover a CD-ROM drive where we have a problem. 2005-01-14 rocky * test/testparanoia.c: Spelling mistake. 2005-01-14 rocky * src/cd-paranoia/Makefile.am: I think I've finally got things worked out so that usage.h gets created before it is needed. 2005-01-14 rocky * lib/paranoia/paranoia.c: Fix a couple memory leaks by freeing resources. 2005-01-14 rocky * lib/cdda_interface/common_interface.c, lib/cdda_interface/utils.c, lib/cdda_interface/utils.h: Reinstate more of the libcdio routines. 2005-01-13 rocky * lib/cdda_interface/common_interface.c, lib/cdda_interface/utils.h: Put back original cdparanoia byte-swapping routines until we smoke out what's going wrong on cygwin. 2005-01-13 rocky * src/cd-drive.c: . 2005-01-13 rocky * lib/driver/MSWindows/win32_ioctl.c: Fix syntax error of last commit 2005-01-13 rocky * lib/driver/MSWindows/win32_ioctl.c: Remove warning and make sure variable is initialized 2005-01-13 rocky * src/cd-drive.c: Just list the drivers that are available. 2005-01-13 rocky * include/cdio/paranoia.h, lib/paranoia/paranoia.c: Add array to convert paranoia_mode_cb into a string. 2005-01-13 rocky * test/Makefile.am, test/testparanoia.c: Start of a paranoia regression test program. 2005-01-12 rocky * lib/driver/FreeBSD/freebsd.c: Save track flags for FreeBSD (preemphasis, # number of audio channels and copy permit) 2005-01-12 rocky * example/iso1.c, include/cdio/bytesex.h, include/cdio/ds.h, include/cdio/iso9660.h, lib/driver/ds.c, lib/driver/image/nrg.c, lib/driver/image_common.h, lib/iso9660/iso9660_fs.c, src/cd-info.c, src/iso-info.c, test/vcd_demo_toc.right: Non-functional changes: Small coding style changes: add _t to some types, p_/psz_ to some variables Update/add doxygen comments add missing regression test output 2005-01-12 rocky * example/.cvsignore: [no log message] 2005-01-12 rocky * example/Makefile.am, example/paranoia.c: Add an example of using paranoia with libcdio. 2005-01-12 rocky * src/cd-paranoia/Makefile.am: I really don't understand how Makefile's. Put in an explict dependency between usage.h and usage.txt since the generic one isn't sufficient. 2005-01-11 rocky * src/cd-paranoia/Makefile.am: Install program and manpage according to name specificed in --with-cdparnoia-name 2005-01-11 rocky * src/cd-paranoia/Makefile.am: 2nd try at getting tarball built right. This time, ... 2005-01-11 rocky * src/cd-paranoia/Makefile.am: Missing two headers. 2005-01-11 rocky * configure.ac, include/cdio/paranoia.h, src/cd-paranoia/.cvsignore, src/cd-paranoia/Makefile.am, src/cd-paranoia/cd-paranoia.c, src/cd-paranoia/doc/FAQ.txt, src/cd-paranoia/doc/overlapdef.txt, src/cd-paranoia/pod2c.pl, src/cd-paranoia/usage.txt.in: doc: add some paranoia documentation. src: Cleaner way to get usage and allow it to be customized to a particular name configure.ac: add --with-cd-paranoia-name to allow customization of the cd-paranoia name. More work is needed to get the binary renamed. 2005-01-11 rocky * lib/driver/Makefile.am, lib/iso9660/Makefile.am, lib/iso9660/libiso9660.sym: lib/{driver,iso9660}/Makefile.am: new improved script for handling the case where there are no local symbols (or global symbols). libsio9660.sym: The last remaining local symbol really should be global. Change made on behalf of Nicolas Boullis. 2005-01-10 rocky * lib/cdda_interface/interface.c: Had commented out bigendiap avoidance. Use - things go much faster. 2005-01-10 rocky * include/cdio/cdda.h, lib/cdda_interface/toc.c, lib/paranoia/p_block.c: toc.c: don't assume first sector is 1. cdda.h: document TOC better. p_block.c: revise getting paranoia first/last sector 2005-01-09 rocky * src/cd-drive.c: Another slight error message change. 2005-01-09 rocky * src/cd-paranoia/cd-paranoia.c: Let people customize what program name to call this. More accurate error message when auto-detecting drive fails. 2005-01-09 rocky * src/util.c: Some OS's (e.g. BSDI) have limitations on var_arg routines. Accommodate this. 2005-01-09 rocky * lib/driver/scsi_mmc.c, test/vcd_demo.right: scsi_mmc.c: style differences. Need to do something about checking to make sure we don't exceed the disc though. vcd_demo.right: output has changed yet again. 2005-01-09 rocky * include/cdio/Makefile.am, include/cdio/cdio.h, include/cdio/device.h, include/cdio/disc.h, include/cdio/read.h, lib/cdda_interface/interface.c, lib/driver/Makefile.am, lib/driver/cdio.c, lib/driver/device.c, lib/driver/disc.c, lib/driver/read.c, lib/driver/track.c: cdio.{c,h}: moved various reading and device/driver routines out into the below read.{c,h}: separate include for the reading routines. disc.{c,h}: more moved here from corresponding cdio. device.c: a place for device/driver related routines. interface.c: break up line to make debugging easier. 2005-01-09 rocky * src/cd-paranoia/cd-paranoia.c: Better error message when CD audio scanning failed. 2005-01-09 rocky * lib/cdda_interface/common_interface.c, lib/cdda_interface/common_interface.h: Got BE and LE conversion backwards. Caused cdda-endianess determination to fail. 2005-01-09 rocky * lib/cdda_interface/cooked_interface.c, lib/cdda_interface/drive_exceptions.h, lib/cdda_interface/scan_devices.c, lib/driver/_cdio_sunos.c: Fix my recent breakage in adding back GNU/Linux endian determination. Need to seet nsectors if not GNU/Linux. Some lint things for non-GNU/Linux. 2005-01-09 rocky * lib/cdda_interface/cooked_interface.c, lib/driver/_cdio_sunos.c: Fix a bad bug where we were requesting potentially a huge number of blocks (-1 unsigned). Fix both the driver to disallow such a nonsensical thing as well as just don't make the request. 2005-01-09 rocky * lib/driver/cdio.c: Handle the case were we want to open only real CD-ROM devices versus those where we're willing to open CD-images and real CDs. Don't know why I never fixed this earlier. 2005-01-09 rocky * src/cd-drive.c, src/cd-info.c, src/cd-read.c, src/util.c, src/util.h, test/cdda-read.right, test/check_common_fn.in, test/isofs-m1-read.right: Create open_input() for common input open routines. Input error messages have been gone over. cd-read is a little more like the rest. Regression output now has NO-WARRANTY. 2005-01-08 rocky * lib/cdda_interface/scan_devices.c: Compilation fix for non-GNU/linux 2005-01-08 rocky * configure.ac, include/cdio/cdda.h, lib/cdda_interface/cooked_interface.c, lib/cdda_interface/drive_exceptions.h, lib/cdda_interface/interface.c, lib/cdda_interface/scan_devices.c: Put back some of the GNU/Linux-ism for detecting drive endian-ness. The data-driven endian correction isn't working correctly. Ultimately though this code should move down into libcdio (and get removed from here.) 2005-01-08 rocky * lib/cdda_interface/scan_devices.c: Better about handling non-Unix devices. 2005-01-07 rocky * configure.ac, lib/cdda_interface/low_interface.h, src/cd-paranoia/cd-paranoia.c: Remove a GNU/Linux includes that isn't used any more. Move other GNU/Linux tests to the linux-specific part of configure. 2005-01-07 rocky * lib/paranoia/isort.c, lib/paranoia/isort.h, lib/paranoia/overlap.c, lib/paranoia/p_block.c, lib/paranoia/p_block.h, lib/paranoia/paranoia.c: Small convention changes. 2005-01-07 rocky * lib/cdda_interface/common_interface.c: Initialize buff in case read doesn't do it. (But I'm no sure why the read isn't doing this properly.) 2005-01-06 rocky * include/cdio/cdda.h: Doxygen documentatoin on more routines. Remove some things that aren't useable any more. 2005-01-06 rocky * lib/cdda_interface/toc.c: Add doxygen doc for exxternal routines. 2005-01-06 rocky * src/cd-paranoia/cd-paranoia.c: When verbose, show cdio info messages. 2005-01-06 rocky * lib/cdda_interface/scan_devices.c, lib/driver/MSWindows/win32_ioctl.c: Remove some Unixisms in checking drive. Rely on libcdio to do the checking - it's platform independent. win32_ioctl.c: more detailed info message. 2005-01-06 rocky * src/cd-paranoia/cd-paranoia.1: Revise for libcdio's name (cd-paranoia). 2005-01-06 rocky * src/Makefile.am: Various small bugs in setting variables to disable utility programs. 2005-01-06 rocky * configure.ac, src/cd-paranoia/Makefile.am, src/cd-paranoia/cd-paranoia.c, src/cd-paranoia/getopt.c, src/cd-paranoia/getopt.h, src/cd-paranoia/getopt1.c: Test for GNU getopt_long() and add to cd-paranoia sources. Compile a local copy if not available. 2005-01-06 rocky * src/Makefile.am: Fix bug in disabling building of utility programs: cd-info, cd-read. Bug noticed by Steve Schultz. 2005-01-06 rocky * lib/driver/_cdio_osx.c: Include code to save audio pre-emphasis, # of tracks and copy-permit bit. I think cd-paranoia may do something now on Darwin. 2005-01-06 rocky * lib/cdda_interface/common_interface.h, lib/cdda_interface/cooked_interface.c, lib/cdda_interface/interface.c, lib/cdda_interface/scan_devices.c, lib/cdda_interface/toc.c: More portability fixes. I think this now does something on BSDI. 2005-01-06 rocky * configure.ac, lib/cdda_interface/common_interface.c, lib/cdda_interface/cooked_interface.c, lib/cdda_interface/interface.c, lib/cdda_interface/low_interface.h, src/cd-paranoia/cd-paranoia.c, src/cd-paranoia/version.h: Lots of portability fixes to make non GNU/Linux-specific. Now runs on Solaris! 2005-01-06 rocky * lib/cdda_interface/cooked_interface.c, lib/cdda_interface/interface.c, lib/driver/cdio.c, lib/paranoia/paranoia.c, src/cd-paranoia/cd-paranoia.c, src/cd-paranoia/report.c, src/cd-paranoia/utils.h, src/cd-paranoia/version.h: First working all-libcdio cd-paranoia (modulo various omissions and memory leaks). 2005-01-05 rocky * lib/cdda_interface/low_interface.h: Conditional code for non-linux 2005-01-05 rocky * configure.ac: Another header for Linux and cdparanoia. 2005-01-05 rocky * include/cdio/Makefile.am, include/cdio/cdda.h, include/cdio/cdda_interface.h, include/cdio/cdio.h, include/cdio/device.h, include/cdio/scsi_mmc.h, lib/cdda_interface/Makefile.am, lib/cdda_interface/common_interface.c, lib/cdda_interface/cooked_interface.c, lib/cdda_interface/drive_exceptions.h, lib/cdda_interface/interface.c, lib/cdda_interface/low_interface.h, lib/cdda_interface/scan_devices.c, lib/cdda_interface/toc.c, lib/driver/track.c, lib/paranoia/p_block.c, lib/paranoia/p_block.h, lib/paranoia/paranoia.c: The first all libcdio cdda_interface. There are some gaps could be filled. cdda_inteface.h renamed to cdda.h cdio_destroy moved from cdio.h to device.h 2005-01-04 rocky * include/cdio/Makefile.am, include/cdio/cdio.h, include/cdio/device.h, include/cdio/disc.h, include/cdio/track.h, lib/driver/disc.c: Add device for drive(r)/device things. Reorganize more to pull things out of cdio and into their respective units. 2005-01-04 rocky * src/util.c: CdIo -> CdIo_t 2005-01-04 rocky * example/cdtext.c, example/iso2.c, example/sample2.c, example/sample3.c, example/sample4.c, example/tracks.c: Revise for current conventions. 2005-01-04 rocky * include/cdio/Makefile.am, include/cdio/cdio.h, include/cdio/disc.h, include/cdio/sector.h, include/cdio/track.h, include/cdio/types.h, lib/driver/Makefile.am, lib/driver/cdio.c, lib/driver/cdio_private.h, lib/driver/disc.c, lib/driver/generic.h, lib/driver/image.h, lib/driver/image/bincue.c, lib/driver/image/cdrdao.c, lib/driver/image/nrg.c, lib/driver/image_common.c, lib/driver/image_common.h, lib/driver/libcdio.sym, lib/driver/track.c: Break out track and disc routines. (Disc needs more work) Add more convenience track routines. Set access-mode for image routines to be the image drivers - for uniformity. Some name regularization. And we're in 2005 now. 2005-01-02 rocky * src/cd-drive.c, src/cd-info.c: CdIo -> CdIo_t 2005-01-02 rocky * include/cdio/cdio.h, include/cdio/track.h, lib/driver/_cdio_aix.c, lib/driver/_cdio_bsdi.c, lib/driver/_cdio_generic.c, lib/driver/_cdio_linux.c, lib/driver/cd_types.c, lib/driver/cdio.c, lib/driver/scsi_mmc.c, lib/iso9660/iso9660_fs.c: Add Cdio_t, move some more stuff into track.h 2005-01-01 rocky * test/cdda-mcn.right, test/cdda.right, test/check_opts2.right, test/check_opts3.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right, test/isofs-m1.right, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/vcd_demo_vcdinfo.right, test/vcd_demo_vcdinfo_toc.right, test/videocd.right: Regression output changed again. 2005-01-01 rocky * lib/driver/MSWindows/aspi32.c, lib/driver/MSWindows/win32_ioctl.c, lib/driver/_cdio_generic.c, lib/driver/_cdio_linux.c, lib/driver/_cdio_sunos.c, lib/driver/generic.h, lib/driver/image_common.c: Add common routine for setting track flags. 2005-01-01 rocky * lib/driver/image/nrg.c: Typo. 2005-01-01 rocky * src/cd-info.c: Show raw and formatted sizes. 2005-01-01 rocky * lib/driver/_cdio_linux.c, lib/driver/image/nrg.c: NRG: get track flags working. linux: small clanup in track flags. more to come. 2005-01-01 rocky * include/cdio/sector.h: Typo in CDIO_FRAMSIZE_RAW0 definition. 2005-01-01 rocky * lib/driver/MSWindows/aspi32.c, lib/driver/MSWindows/win32.c, lib/driver/MSWindows/win32_ioctl.c: Add track control info for Doze. 2004-12-31 rocky * lib/driver/_cdio_linux.c, lib/driver/_cdio_sunos.c, test/check_cue.sh.in, test/vcd_demo.right: Add track flags for solaris. Regression test without vcdinfo corrected. 2004-12-31 rocky * lib/driver/Makefile.am, lib/driver/image/bincue.c, lib/driver/image/cdrdao.c, lib/driver/image/nrg.c, lib/driver/image_common.c, lib/driver/image_common.h, src/cd-info.c, test/Makefile.am, test/cdda-mcn.right, test/cdda.cue, test/cdda.right, test/cdda.toc, test/check_cue.sh.in, test/check_opts2.right, test/check_opts3.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right, test/isofs-m1.right, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/vcd_demo_vcdinfo.right, test/vcd_demo_vcdinfo_toc.right, test/videocd.right: Add image driver track flag reporting. Reorganize code for image drivers a little better (via image_common.c). Update regression tests for more expanded cd-info output. 2004-12-31 rocky * include/cdio/track.h: Track-related calls go here. 2004-12-31 rocky * include/cdio/Makefile.am, include/cdio/cdio.h, lib/driver/_cdio_generic.c, lib/driver/_cdio_linux.c, lib/driver/cdio.c, lib/driver/cdio_private.h, lib/driver/generic.h, lib/driver/image/bincue.c, lib/driver/image/cdrdao.c, lib/driver/image_common.h, lib/driver/libcdio.sym, src/cd-info.c: Start to fill in cdio_get_preemphasis, cdio_get_copy_permit, and cdio_get_channels. Internals reworked a little for this. 2004-12-30 rocky * include/cdio/cdda_interface.h, include/cdio/cdio.h, lib/driver/_cdio_generic.c, lib/driver/cdio.c, lib/driver/cdio_private.h, lib/driver/generic.h: Add cd-paranoia's track flag routines: copy-permitted, pre-emphasis, channels. Updates to drivers to set this properly is still needed. 2004-12-27 rocky * lib/iso9660/libiso9660.sym: Perhaps this is okay. 2004-12-27 rocky * lib/iso9660/libiso9660.sym: Remove some semicolons at the end of lines. 2004-12-24 rocky * Makefile.am: Typo causing "make install" to fail. Problem found by Steve Schultz. 2004-12-23 rocky * test/vcd_demo.right: We now list the CD size on the leadout line. 2004-12-23 rocky * src/cd-paranoia/Makefile.am: Correct bin_PROGRAMS name. cd-paranoia/.deps/cd-paranoia$(EXEEXT).Po was getting created when when it should be cd-paranoia/.deps/cd-paranoia.Po Problem reported by C.Y.M. 2004-12-22 rocky * test/check_opts0.right, test/check_opts1.right, test/check_opts2.right, test/check_opts3.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right: Regress last regression test output change. 2004-12-22 rocky * test/.cvsignore: Add derived paranoia regession test. 2004-12-22 rocky * lib/Makefile.am, lib/iso9660/Makefile.am, src/Makefile.am: Until we put in more fine-grain control, don't make libcdio_paranoia and libcdda_interface libraries if we aren't making cd-paranoia. src/Makefile.am: correct way to disable cd-paranoia. 2004-12-22 rocky * test/check_opts0.right, test/check_opts1.right, test/check_opts2.right, test/check_opts3.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right: discmode output changed its Data Mode2 not Data Form1. 2004-12-22 rocky * lib/paranoia/isort.c, lib/paranoia/overlap.c, lib/paranoia/p_block.c, lib/paranoia/paranoia.c: Read in configuration settings from config.h. paranoia was GNU/Linux based so the #includes had been set specific to that. 2004-12-22 rocky * lib/driver/_cdio_osx.c: CDIO_DRIVE_CAP_{MCN,ISRC} are now CDIO_DRIVE_CAP_READ_{MCN,ISRC} respectively. Thanks yet again to Steve Schultz. 2004-12-19 rocky * NEWS: Much has been going on. Note it. 2004-12-19 rocky * include/cdio/cdda_interface.h, lib/cdda_interface/common_interface.c, lib/cdda_interface/common_interface.h, lib/cdda_interface/cooked_interface.c, lib/cdda_interface/interface.c, lib/cdda_interface/scan_devices.c, lib/cdda_interface/scsi_interface.c, lib/cdda_interface/utils.h, src/cd-paranoia/buffering_write.c, src/cd-paranoia/buffering_write.h, src/cd-paranoia/cd-paranoia.c, src/cd-paranoia/utils.h, test/Makefile.am: More integration/cleanup. Now uses cdio bytesex.h's BE/LE routines. copystring -> strdup. Some int's changed to track_t. But I need to be careful *not* to change cdda_interface.h. 2004-12-19 rocky * configure.ac, lib/cdda_interface/interface.c, lib/cdda_interface/utils.h, src/cd-paranoia/cd-paranoia.c, src/cd-paranoia/utils.h, test/Makefile.am, test/check_paranoia.sh.in: test/*, configure.ac: First paranoia regression test. It's run automatically as it assumes that you have a *flawless* CD-DA in a drive. *.{c,h}: more integration toward libcdio routines. In particular remove swap16 and swap32. 2004-12-18 rocky * configure.ac, src/Makefile.am, src/cd-info.c, src/cd-paranoia/Makefile.am, src/iso-info.c, test/cdda-mcn.right, test/cdda.right, test/check_opts2.right, test/check_opts3.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right, test/isofs-m1.right, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/vcd_demo_vcdinfo.right, test/videocd.right: cd-info now shows size of CD. iso-info takes options -l and -f to be a little more like isoinfo configure.ac now allows for disabling cd-paranoia, iso-read, iso-drive, cd-drive. Regression tests adjusted to new output and more drive reading capabilities. 2004-12-18 rocky * .cvsignore, Makefile.am, configure.ac, include/cdio/Makefile.am, include/cdio/cdda_interface.h, include/cdio/cdio.h, include/cdio/paranoia.h, include/cdio/scsi_mmc.h, include/cdio/types.h, lib/.cvsignore, lib/FreeBSD/Makefile, lib/FreeBSD/freebsd.c, lib/FreeBSD/freebsd.h, lib/FreeBSD/freebsd_cam.c, lib/FreeBSD/freebsd_ioctl.c, lib/MSWindows/Makefile, lib/MSWindows/aspi32.c, lib/MSWindows/aspi32.h, lib/MSWindows/win32.c, lib/MSWindows/win32.h, lib/MSWindows/win32_ioctl.c, lib/Makefile.am, lib/_cdio_aix.c, lib/_cdio_bsdi.c, lib/_cdio_generic.c, lib/_cdio_linux.c, lib/_cdio_osx.c, lib/_cdio_stdio.c, lib/_cdio_stdio.h, lib/_cdio_stream.c, lib/_cdio_stream.h, lib/_cdio_sunos.c, lib/cd_types.c, lib/cdda_interface/.cvsignore, lib/cdda_interface/Makefile.am, lib/cdda_interface/common_interface.c, lib/cdda_interface/common_interface.h, lib/cdda_interface/cooked_interface.c, lib/cdda_interface/drive_exceptions.h, lib/cdda_interface/interface.c, lib/cdda_interface/low_interface.h, lib/cdda_interface/scan_devices.c, lib/cdda_interface/scsi_interface.c, lib/cdda_interface/smallft.c, lib/cdda_interface/smallft.h, lib/cdda_interface/test_interface.c, lib/cdda_interface/toc.c, lib/cdda_interface/utils.c, lib/cdda_interface/utils.h, lib/cdio.c, lib/cdio_assert.h, lib/cdio_private.h, lib/cdtext.c, lib/cdtext_private.h, lib/driver/.cvsignore, lib/driver/FreeBSD/Makefile, lib/driver/FreeBSD/freebsd.c, lib/driver/FreeBSD/freebsd.h, lib/driver/FreeBSD/freebsd_cam.c, lib/driver/FreeBSD/freebsd_ioctl.c, lib/driver/MSWindows/Makefile, lib/driver/MSWindows/aspi32.c, lib/driver/MSWindows/aspi32.h, lib/driver/MSWindows/win32.c, lib/driver/MSWindows/win32.h, lib/driver/MSWindows/win32_ioctl.c, lib/driver/Makefile.am, lib/driver/_cdio_aix.c, lib/driver/_cdio_bsdi.c, lib/driver/_cdio_generic.c, lib/driver/_cdio_linux.c, lib/driver/_cdio_osx.c, lib/driver/_cdio_stdio.c, lib/driver/_cdio_stdio.h, lib/driver/_cdio_stream.c, lib/driver/_cdio_stream.h, lib/driver/_cdio_sunos.c, lib/driver/cd_types.c, lib/driver/cdio.c, lib/driver/cdio_assert.h, lib/driver/cdio_private.h, lib/driver/cdtext.c, lib/driver/cdtext_private.h, lib/driver/ds.c, lib/driver/generic.h, lib/driver/image.h, lib/driver/image/Makefile, lib/driver/image/bincue.c, lib/driver/image/cdrdao.c, lib/driver/image/nrg.c, lib/driver/image/nrg.h, lib/driver/image_common.h, lib/driver/libcdio.sym, lib/driver/logging.c, lib/driver/portable.h, lib/driver/scsi_mmc.c, lib/driver/scsi_mmc_private.h, lib/driver/sector.c, lib/driver/util.c, lib/ds.c, lib/generic.h, lib/image.h, lib/image/Makefile, lib/image/bincue.c, lib/image/cdrdao.c, lib/image/nrg.c, lib/image/nrg.h, lib/image_common.h, lib/iso9660.c, lib/iso9660/.cvsignore, lib/iso9660/Makefile.am, lib/iso9660/iso9660.c, lib/iso9660/iso9660_fs.c, lib/iso9660/iso9660_private.h, lib/iso9660/libiso9660.sym, lib/iso9660/xa.c, lib/iso9660_fs.c, lib/iso9660_private.h, lib/libcdio.sym, lib/libiso9660.sym, lib/logging.c, lib/paranoia/.cvsignore, lib/paranoia/Makefile.am, lib/paranoia/gap.c, lib/paranoia/gap.h, lib/paranoia/isort.c, lib/paranoia/isort.h, lib/paranoia/overlap.c, lib/paranoia/overlap.h, lib/paranoia/p_block.c, lib/paranoia/p_block.h, lib/paranoia/paranoia.c, lib/portable.h, lib/scsi_mmc.c, lib/scsi_mmc_private.h, lib/sector.c, lib/util.c, lib/xa.c, libcdio_cdda.pc.in, libcdio_paranoia.pc.in, src/Makefile.am, src/cd-info.c, src/cd-paranoia/.cvsignore, src/cd-paranoia/Makefile.am, src/cd-paranoia/buffering_write.c, src/cd-paranoia/buffering_write.h, src/cd-paranoia/cd-paranoia.1, src/cd-paranoia/cd-paranoia.1.jp, src/cd-paranoia/cd-paranoia.c, src/cd-paranoia/header.c, src/cd-paranoia/header.h, src/cd-paranoia/report.c, src/cd-paranoia/report.h, src/cd-paranoia/utils.h, src/cd-paranoia/version.h, src/util.c, test/Makefile.am: BIG REORGANIZATION. Reorganize directory structure for inclusion of cd-paranoia. Works for GNU/Linux. Other OS's may be broken. Regression test output needs to be adjusted too. Move: lib/driver (split off of lib) lib/iso9660 (split off of lib) Add from paranoia: lib/cdda_interface lib/paranoia src/paranoia Also made some small changes to capability indentification to show more reading capabilties and show that. cd-info now shows the total disc size. 2004-12-17 rocky * lib/image/nrg.c: Classified one more disc mode perhaps. Variable name change and probably clarification. 2004-12-17 rocky * lib/cdio.c: Change wording of discmode2str. 2004-12-17 rocky * test/check_opts0.right, test/check_opts1.right, test/check_opts2.right, test/check_opts3.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right, test/monvoisin.right, test/svcdgs.right, test/videocd.right: cd-info output changed. Stupid me: I keep getting mode/form confusted. Discs are Mode 1, 2, CDDA or mixed. (Not form 1 and 2). 2004-12-15 rocky * configure.ac, include/cdio/cdio.h, lib/Makefile.am, lib/_cdio_aix.c, lib/cdio.c: Towards getting an AIX driver working. 2004-12-09 rocky * configure.ac: As per Tilman Linneweh FreeBSD 6 is like FreeBSD 5. 2004-12-06 rocky * lib/_cdio_sunos.c: Add better discmode detection via FULLTOC that we use on GNU/Linux. 2004-12-06 rocky * lib/scsi_mmc.c: scsi_mmc_get_discmode: As per Justin B Ruggles, SCSI, MMC-5 may require setting db.field[1] = CDIO_CDROM_MSF. 2004-12-04 rocky * include/cdio/scsi_mmc.h: Small typo. 2004-12-04 rocky * THANKS: Add Justin B. Ruggles. 2004-12-04 rocky * include/cdio/scsi_mmc.h, include/cdio/sector.h, lib/_cdio_linux.c, lib/cdio.c, lib/scsi_mmc.c: Move scsi mmc discmode determination to scsi-mmc. Add discmode for CD-i. 2004-12-04 rocky * src/cd-info.c: Add cast to remove compiler warning. 2004-12-04 rocky * lib/_cdio_linux.c: Justin B Ruggles reports: GNU/Linux ioctl(.., CDROM_DISC_STATUS does not return "CD DATA Form 2" for SVCD's when I know they are form 2, so we read a FULL TOC in an attempt to make it more accurate. Most of the info was obtained the SCSI MMC draft spec revision 10a from http://www.t10.org/ftp/t10/drafts/mmc/mmc-r10a.pdf Pages 56 to 62 give more details. Libcdio does not have CD-i as a discmode, so I just have it treat CD-i as if it is CD-XA. This doesn't work for the SVCD I tried but it is probably a step in the right direction. And when things settle down, it should be done on other OS drivers as well. 2004-12-04 rocky * lib/Makefile.am: Small typo. 2004-12-01 rocky * TODO: Small update. 2004-11-29 rocky * autogen.sh: Make sure we have automake version 1.6 or greater. Problem reported by C.Y.M 2004-11-22 rocky * lib/Makefile.am: make -j4 was failing because the Makefile variable libcdio_la_dependencies was not getting set. I don't know why this happens, but I've worked around the problem by removing this variable and adding the value of it (libcdio.la) in the places libcdio_la_dependencies is used. Problem reported by Goetz Waschk. 2004-11-22 rocky * example/.cvsignore: Add C++ binaries. 2004-11-22 rocky * example/iso3cpp.cpp: C++ version of iso3.c 2004-11-22 rocky * example/README: Add C++ programs. 2004-11-22 rocky * configure.ac, example/Makefile.am, example/iso1cpp.cpp, example/iso2.c, example/iso2cpp.cpp, example/iso3.c, include/cdio/ds.h: Fix up ability to use in C++ programs. Add some C++ example programs to make sure those compile. 2004-11-21 rocky * NEWS, configure.ac, include/cdio/iso9660.h, lib/iso9660.c: configure.ac: in 72cvs now. iso9660.{c,h}: "new" is a reserved word in C++. Don't use it as a parameter name 2004-11-21 rocky * example/iso1.c: Add cast to make this possible to compile via g++ 2004-11-21 rocky * doc/libcdio.texi: Update OS section and note ISO 9660 library in the history part. 2004-11-21 rocky * doc/glossary.texi, doc/libcdio.texi: Go over. Add section on Joliet. Add iso-info sample output. Break out info nodes for tracks and sectors. Some small improvements. 2004-11-21 rocky * test/Makefile.am: Solaris creates core files not, core.$pid. Change to make "make distcheck" work. 2004-11-20 rocky * lib/_cdio_bsdi.c: Make sure we initialize get_hwinfo expliscitly. 2004-11-20 rocky * lib/_cdio_linux.c: Make sure get_hwinfo is initialized. Add cdio_ in front of to/from_bcd8 2004-11-19 rocky * src/cd-info.c: Add cdio_ in front of to_bcd8 and from_bcd8. 2004-11-19 rocky * lib/_cdio_bsdi.c: Add cdio_ in front of to_bcd8 and from_bcd8. 2004-11-19 rocky * src/cd-info.c: Add "toc-file" option for cdrdao images. 2004-11-18 rocky * lib/_cdio_sunos.c, lib/sector.c: _cdio_sunos.c: fix bug in audio mode reading. *.c: replcate {from,to}_bcd8 with corresponding cdio_ names. 2004-11-16 nboullis * lib/Makefile.am: When a list of exported symbols is modified, the corresponding library should be rebuilt. 2004-11-16 nboullis * lib/libcdio.sym: libcdio's ABI should provide all the symbols required by the API. 2004-11-16 nboullis * configure.ac: If ld is not GNU ld, --without-versioned-libs is assumed, so it is useless to fail if make is also not GNU make. 2004-11-16 nboullis * Makefile.am: Lots of files referenced in EXTRA_DIST were not actually available; remove them from EXTRA_DIST. 2004-11-15 nboullis * lib/Makefile.am: Access libcdio.sym and libiso9660.sym through $(srcdir) to enable building outside the source directory. (Used by "make distcheck".) 2004-11-15 nboullis * lib/libcdio.sym: There is no _cdio_list_preappend symbol, but _cdio_list_prepend instead. 2004-11-15 rocky * Makefile.am: Don't need config.rpath and don't recall why it was needed. 2004-11-15 nboullis * include/cdio/util.h: "static inline __attribute__((deprecated))" functions are not available in standard C; only use them with GCC 3 and above, and replace them with simple #defines for other compilers. 2004-11-15 rocky * lib/libcdio.sym: Add symbols that VCDimager uses. 2004-11-15 rocky * include/cdio/util.h, lib/Makefile.am, lib/libcdio.sym, lib/util.c: rename to_bcd8 and from_bcd8 to cdio_to_bcd8 and cdio_from_bcd8. (N. Boullis) lib/Makefile.am: avoid non-GNU ld options when --without-versioned-libs is in effect. 2004-11-14 rocky * lib/libiso9660.sym: Move local files to global. 2004-11-14 rocky * Makefile.am: Remove more unused .m4 files. Probably a hold over from requiring gettext. (So we may yet add these back in sometime in the future.) 2004-11-14 rocky * Makefile.am, configure.ac, lib/Makefile.am: lib/Makefile.am: make sure we include .sys files in distribution. configure.ac: get ready for 0.71 Makefile.am: one of those m4's doesn't exist here. 2004-11-14 nboullis * lib/Makefile.am, lib/libiso9660.sym: Only export the required symbols of libiso9660. 2004-11-14 nboullis * lib/Makefile.am, lib/libcdio.sym: Only export the required symbols of libcdio. 2004-11-14 rocky * src/cd-drive.c: Opens cd driver a little less and checks for NULL. Helps things especially on AIX. 2004-11-13 rocky * lib/_cdio_sunos.c: Add explicit NULL for get_hwinfo. 2004-11-13 rocky * lib/_cdio_sunos.c: env -> p_env 2004-11-13 rocky * example/scsi-mmc1.c: Small typo. 2004-11-12 rocky * lib/Makefile.am: Guidence from Nicolas Boullis on how to library versioning works or should work. 2004-11-08 rocky * lib/cdtext.c: cdtext.c: was not converting arranger string properly. 2004-11-07 rocky * NEWS, lib/image/bincue.c, lib/image/cdrdao.c, lib/portable.h: Hoist common "portable" definitions into portable.h NEWS - rearrange. 2004-11-07 rocky * configure.ac: fixes to make run on AIX 2004-11-07 rocky * lib/MSWindows/aspi32.c: Revert last changes. 2004-11-07 rocky * lib/MSWindows/aspi32.c: Compilation fix. 2004-11-07 rocky * lib/MSWindows/aspi32.c, lib/MSWindows/win32_ioctl.c: win32_ioctl.c: minor comment or function name changes. aspi32.c: use length definitions better. 2004-11-07 rocky * lib/MSWindows/win32_ioctl.c: Read TOC buf fixes. Now tries MMC FULLTOC and then falls back to Windows' DeviceIoCtl READ_TOC. 2004-11-06 rocky * lib/iso9660_fs.c: Small warning change when we don't have nl_langinfo(CODESET). 2004-11-06 rocky * test/testtoc.c: Remove erroneous free()'s. This now give a valgrind error that looks to me bogus. 2004-11-06 rocky * configure.ac: Clean up headers - remove "obsolete" names. Some OS's weren't testing some, and some OS-specific we were testing for. 2004-11-06 rocky * Makefile.am, configure.ac, lib/Makefile.am: Automake woes. Think I have PACKAGE and VERSION set right now. lib/Makefile.am: we'll say libcdio has new interfaces 2004-11-06 rocky * lib/Makefile.am: Change library numbers. 2004-11-06 rocky * Makefile.am: Typo. 2004-11-06 rocky * NEWS, src/util.c, src/util.h: src/util.{c,h}: use report more often. NEWS - what's up 2004-11-06 rocky * src/util.c, test/cdda.right: src/util.c: remove extra white space test/cdda.right: adjust for recently found bug. 2004-11-06 rocky * src/cd-info.c: Bug in showing cdtext for individual tracks. 2004-11-04 rocky * MSVC/stdint.h, configure.ac, src/cd-drive.c, src/cd-info.c, src/cd-read.c, src/iso-info.c, src/iso-read.c, src/util.c, src/util.h: Common output routine in utility programs as a concession to environments which may no have or prefer stdout/stderr such as XBOX. 2004-11-04 rocky * libiso9660.pc.in: Wrong Version substitution. Thanks again to Steve Schultz. 2004-11-04 rocky * libcdio.pc.in: Wrong substitution name. Thanks to Steve Schultz for finding this problem. 2004-11-01 rocky * lib/MSWindows/win32_ioctl.c: Compilation fix. Add line/file/fn info on XBOX. 2004-11-01 rocky * lib/MSWindows/win32_ioctl.c: Add common FORMAT_ERROR. XBOX/MSVC deficiencies shouldn't be so in your face. 2004-11-01 rocky * MSVC/config.h, MSVC/stdint.h, Makefile.am, lib/_cdio_generic.c, lib/portable.h: Merging in MSVC/XBOX from John Oseman 2004-11-01 rocky * configure.ac: Set some package strings. 2004-11-01 rocky * configure.ac: Typo. 2004-10-31 rocky * lib/MSWindows/win32.c: Compilation fixes. 2004-10-31 rocky * lib/MSWindows/win32.c, lib/scsi_mmc.c: scsi_mmc.c: get CD-Text length before reading CD-Text. win32.c: make sure we can't set ASPI when XBOX. Other small changes for XBOX compatibility. 2004-10-31 rocky * lib/logging.c, lib/portable.h: portable.h: remove rcsid. logging.c: include portable.h 2004-10-31 rocky * NEWS, configure.ac, example/iso2.c, example/iso3.c, lib/Makefile.am, lib/_cdio_generic.c, lib/iso9660_fs.c, lib/portable.h, src/iso-read.c: configure.ac, lib/*, example/*.c, src/iso-read.c: start to separate compiler/OS deficiencies into "portable.h" configure.ac, lib/iso9660_fs.c: use AM_LANGINFO_CODESET rather than code in our ouwn langinfo.h and CODESET tests. 2004-10-31 rocky * include/cdio/logging.h, include/cdio/util.h, lib/image/bincue.c, lib/image/cdrdao.c, lib/image/nrg.c: Mostly portability issues from or inspired by mog's changes for XBOX. image/*.c: initialize func structure to 0 (NULL). include/cdio/*.h: add "extern C" for C++ compilations where appropriate. 2004-10-31 rocky * lib/MSWindows/win32.c: Change to make compatible for MSVC 6 and older C compilers. 2004-10-31 rocky * lib/iso9660_fs.c: Fixes when no Joliet support. 2004-10-31 rocky * configure.ac: Fix up Joliet detection or lack thereof. 2004-10-30 rocky * lib/scsi_mmc.c: Add include of stdlib.h (From mog for XBOX) 2004-10-30 rocky * MSVC/README, MSVC/cd-info.vcproj, MSVC/libcdio.sln, MSVC/libcdio.vcproj: Files for compiling with MSVC. Courtesy of John Oseman (mog). 2004-10-30 rocky * lib/MSWindows/win32_ioctl.c: Fixes while trying to merge some of the XBOX changes. 2004-10-30 rocky * lib/iso9660_fs.c: NLS fixups. Wrong preprocessor symbol used. 2004-10-30 rocky * configure.ac, lib/iso9660.c, lib/iso9660_fs.c, src/iso-info.c: configure.ac, iso9660.c: test for tzname variable. configure.ac, iso9660_fs.c: test for nls_langinfo() and #include iso-info.c: some OS's need 2 args for multi-arg defines. 2004-10-30 rocky * libiso9660.pc.in: libiso9660 needs iconv. Also, we're not libvcdino. 2004-10-30 rocky * configure.ac, lib/iso9660.c: *: test for daylight and timezone configure.ac: test for stdbool.h 2004-10-29 rocky * lib/iso9660_fs.c, src/cd-info.c, src/iso-info.c: Conditional compilation of Joliet support. 2004-10-28 rocky * test/Makefile.am: Add joliet regression test files. 2004-10-28 rocky * configure.ac, lib/MSWindows/win32_ioctl.c, lib/iso9660_fs.c, test/Makefile.am, test/check_common_fn.in, test/check_iso.sh.in, test/joliet-nojoliet.right, test/joliet.iso, test/joliet.right: configure.ac: Add --disable-joliet and disable joliet if iconv is not around iso9660_fs.c: Setting string length on of UCBE wrong? test/*: add joliet regression test. 2004-10-28 rocky * include/cdio/Makefile.am: cdio.h accidently got removed. 2004-10-28 rocky * lib/cdtext_private.h: Add more fields from the MMC-3 spec. 2004-10-28 rocky * lib/Makefile.am: bytesex files have moved from private to public. Forgot to remove them for "make dist" 2004-10-28 rocky * include/cdio/iso9660.h: A small change which caused a hard-to-find bug in using Joliet filenames. 2004-10-27 rocky * lib/MSWindows/aspi32.c, lib/MSWindows/win32.c: Cygwin fixes. 2004-10-26 rocky * lib/iso9660_fs.c: iconv manpages sys the return is size_t not int 2004-10-26 rocky * lib/iso9660_fs.c: Reinstate -1 test. 2004-10-26 rocky * lib/iso9660_fs.c: Respect --no-joliet better. 2004-10-26 rocky * configure.ac: Remove some gettext fascism. 2004-10-26 rocky * configure.ac, example/Makefile.am, src/Makefile.am, test/Makefile.am, test/vcd_demo.right: Solaris fixes test/vcd_demo.right: fix when vcd-info is not installed. 2004-10-26 rocky * src/cd-info.c: Add --no-joliet option 2004-10-26 rocky * lib/FreeBSD/freebsd.c, lib/MSWindows/win32.c, lib/_cdio_linux.c, lib/_cdio_osx.c, lib/_cdio_sunos.c, src/cd-info.c: Various valgrind-detected memory leaks and unitialized variable errors. 2004-10-26 rocky * configure.ac, lib/iso9660.c: Test for presence of tzset(). 2004-10-26 rocky * lib/cdio.c, lib/image/bincue.c, lib/iso9660.c, lib/iso9660_fs.c, src/cd-info.c, test/Makefile.am, test/isofs-m1.right, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/testbincue.c, test/testiso9660.c, test/vcd_demo_vcdinfo.right, test/videocd.right: Joliet filename detection for CD images is now done. Various valgrind-caught errors fixed Output changed: we no longer print root block number. (It is still shown when XA attributes are printed.) 2004-10-25 rocky * lib/iso9660.c: root_directory accounting is now a little different since we don't count the filename as part of the root_directory record. 2004-10-24 rocky * example/iso2.c, include/cdio/cdio.h, include/cdio/iso9660.h, lib/_cdio_generic.c, lib/_cdio_stream.c, lib/cdio.c, lib/generic.h, lib/image/bincue.c, lib/iso9660.c, lib/iso9660_fs.c, src/cd-info.c: First attempt to extent Joliet to CD reading portion. 2004-10-24 rocky * .cvsignore, Makefile.am, configure.ac: Makefile.am: "make test" now means the same thing as "make check" configure.ac: make sure we test for iconv. gettext isn't all that important right now. 2004-10-24 rocky * lib/iso9660_fs.c: Was looking at wrong place for joliet/non-joliet. 2004-10-24 rocky * example/Makefile.am, lib/iso9660_fs.c, src/Makefile.am, test/Makefile.am: Add libiconv libraries where needed. 2004-10-24 rocky * configure.ac: Try to reduce duplicate header tests. 2004-10-24 rocky * .cvsignore, doc/doxygen/.cvsignore: Add more derived files from recent changes. 2004-10-24 rocky * Makefile.am, configure.ac, doc/Makefile.am, doc/doxygen/Doxyfile, doc/doxygen/Doxyfile.in, src/iso-info.c: configure.ac: test for intl and iconv needed for Joliet support iso-info.c: add --no-joliet option Doxyfile*, configure.ac: Automatically update some ofthe Doxyfile information 2004-10-24 rocky * include/cdio/iso9660.h, lib/iso9660_fs.c: Various portability fixes when libiconv isn't available or is broken. 2004-10-23 rocky * TODO: [no log message] 2004-10-23 rocky * TODO: [no log message] 2004-10-23 rocky * TODO: Revise. Note iso-tar. 2004-10-23 rocky * NEWS, configure.ac, doc/glossary.texi, include/cdio/iso9660.h, lib/iso9660.c, lib/iso9660_fs.c, src/iso-info.c, test/testbincue.c: First cut at Joliet support for ISO 9660 images. More work is needed to integrate this into CD reading. 2004-10-22 rocky * src/iso-info.c: Slightly better error messages. 2004-10-22 rocky * doc/glossary.texi: Update definition of ISO 9660 2004-10-22 rocky * NEWS: What's up. 2004-10-22 rocky * include/cdio/Makefile.am, include/cdio/bytesex.h, include/cdio/bytesex_asm.h, include/cdio/iso9660.h, lib/Makefile.am, lib/bytesex.h, lib/bytesex_asm.h, lib/image/nrg.c, lib/iso9660.c, lib/iso9660_fs.c, lib/xa.c, src/cd-info.c, src/iso-info.c: iso9660.h, iso9660_fs.c: Add iso9660_ifs_is_xa() a routine to determine if an iso image has XA attributes. bytesex.h and bytesex_asm.h are now public. (Down the line should use glib though.) Package has been revised to the move. iso-info.c: shows XA attributes what that it is available. 2004-10-12 rocky * THANKS: Add Ian MacIntosh. 2004-10-10 rocky * include/cdio/iso9660.h: small formatting change. 2004-10-10 rocky * NEWS: What's changed. 2004-10-10 rocky * doc/libcdio.texi, example/.cvsignore, example/Makefile.am, example/README, example/cdtext.c, example/drives.c, example/iso1.c, example/iso2.c, example/iso3.c, example/sample1.c, example/sample10.c, example/sample5.c, example/sample6.c, example/sample7.c, example/sample8.c, example/sample9.c, example/scsi-mmc1.c, example/scsi-mmc2.c, example/tracks.c: Rename many of the "sample" programs to something more descriptive. libcdio.texi: add a SCSI-MMC example program. 2004-10-09 rocky * include/cdio/iso9660.h, lib/iso9660_fs.c: Change some void * return types to what they really are. The void * was helping to propagate the mistake of not exporting CdioList in ds.h. CVS: ---------------------------------------------------------------------- include/cdio/iso9660.h lib/iso9660_fs.c CVS: ---------------------------------------------------------------------- 2004-10-09 rocky * example/Makefile.am, include/cdio/Makefile.am, include/cdio/ds.h, include/cdio/iso9660.h, lib/Makefile.am, lib/ds.c, lib/ds.h, lib/image/nrg.c, lib/image_common.h, lib/iso9660_fs.c, src/cd-info.c, src/iso-info.c: Make ds.h public. It should have been that way since it *is* public. Eventually though we'll redo things using glib and then ds.h will get removed. 2004-09-11 rocky * src/Makefile.am: Apply Patch #3043 Thanks to mccarthy from U of Alberta: Building libcdio with libcddb in a non-standard directory --prefix causes make to fail. 2004-09-06 rocky * TODO: Update wish-list. 2004-09-05 rocky * include/cdio/cdtext.h, test/Makefile.am, test/testbincue.c, test/testtoc.c: cdtext.h: minor doxygen improvemtn others: make "make distcheck" work again. 2004-09-04 rocky * doc/doxygen/Doxyfile, include/cdio/cdio.h, include/cdio/cdtext.h, include/cdio/dvd.h, include/cdio/iso9660.h, include/cdio/logging.h, include/cdio/scsi_mmc.h: Changes to make doxygen doc better. 2004-09-04 rocky * lib/image/bincue.c, lib/image/cdrdao.c, lib/image/nrg.c, test/cdda-mcn.right, test/cdda.right, test/check_cue.sh.in, test/check_nrg.sh.in, test/check_opts.sh, test/check_opts0.right, test/check_opts1.right, test/check_opts2.right, test/check_opts3.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right, test/isofs-m1.right, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/vcd_demo_vcdinfo.right, test/videocd.right: Add get_hwinfo functions in image drivers. 2004-09-03 rocky * configure.ac, include/cdio/types.h, lib/_cdio_bsdi.c, lib/_cdio_generic.c, lib/_cdio_linux.c, lib/_cdio_osx.c, lib/_cdio_sunos.c, lib/cdio.c, lib/cdio_private.h, lib/cdtext.c, lib/cdtext_private.h, lib/image/bincue.c, lib/image/cdrdao.c, lib/image/nrg.c, lib/scsi_mmc.c, lib/sector.c, lib/util.c: configure.ac: now in 0.71cvs *.c: lint-like changes. Tested on Sun's SUNPRO cc compiler. Removed feild initialization lingo (even if it is C99). 2004-09-02 rocky * lib/_cdio_osx.c: Fix bugs in discmode determination. And actually in general due to moving i_first_track to generic structure. 2004-09-02 rocky * lib/_cdio_osx.c: Remove include which is not needed. 2004-09-02 rocky * src/cd-info.c: Possibly some C compilers need at least 2 arguments. Noticed on old FreeBSD box. 2004-09-02 rocky * lib/Makefile.am: Update for release. I think I have it right this time. (Well, at least Nicolas Boullis doesn't strongly *disagree*). 2004-09-01 rocky * configure.ac: Update for release. 2004-08-30 rocky * THANKS: How could I have forgotten... 2004-08-30 rocky * lib/cdtext.c: Put in later after tested. 2004-08-30 rocky * src/cd-info.c: Error messages was slightly incorrect. And add another one of that ilk. 2004-08-30 rocky * lib/_cdio_osx.c: Use generic routines for getting first track and number of tracks. 2004-08-30 rocky * lib/_cdio_osx.c, src/cd-info.c: _cdio_osx.c: wasnt' returning CDIO_INVALID_TRACK on TOC read error. cd-info.c: abort sooner if we can't read the TOC. 2004-08-30 rocky * include/cdio/sector.h, src/cd-info.c: cd-info.c: bug in DVD test. sector.h: redo the way the dvd and cd tests work. Isn't strictl necessary, but this is has fewer implicit dependencies. 2004-08-30 rocky * include/cdio/sector.h, lib/cdtext.c, lib/cdtext_private.h, src/cd-info.c: sector.h: add routines for determining if discmode is DVD or CD. cdtext*: adjust for bigendian or not. Check for double-byte characters. cd-info.c: new option --dvd. Don't attempt to understand DVD unless this is given. 2004-08-29 rocky * lib/Makefile.am: Incremented the wrong thing. 2004-08-29 rocky * lib/Makefile.am: Increment before release. 2004-08-29 rocky * lib/_cdio_osx.c, lib/cdio.c: cdio.c: missing string for discmode enumeration. _cdio_osx.c: fix a couple of bus faults. Detects DVD-RW properly now. Better error message for failing to read TOC. 2004-08-29 rocky * lib/_cdio_osx.c: CD-ROM media type does not indicate whether a CD is CD-DA or CD-DATA 2004-08-29 rocky * lib/MSWindows/win32_ioctl.c: Better error reporting when TOC reading fails. Well at least we try to do better. env -> p_env some places. 2004-08-28 rocky * NEWS: Note CD-text addition. 2004-08-28 rocky * lib/_cdio_osx.c: Some cleanups, possibly bug fixes. Hack in optimistic guess for drive properties. 2004-08-28 rocky * lib/_cdio_generic.c, lib/_cdio_osx.c, lib/cdio.c, lib/cdio_private.h, lib/generic.h: _cdio_osx.c: add getting hw info. Get some read/write capabilities and disc info. *generic*: split off CD discmode classification so it can be used by OSX cdio: env -> p_env 2004-08-27 rocky * example/sample9.c, include/cdio/cdio.h, lib/_cdio_linux.c, lib/scsi_mmc.c, src/cd-drive.c, src/cd-info.c: add psz_ to hwinfo type. _cdio_linux.c: go back to using SCSI MMC drive cap routine. 2004-08-27 rocky * example/sample7.c: Add p_ where appropriate. 2004-08-27 rocky * example/sample6.c: add p_ where appropriate. 2004-08-27 rocky * example/sample5.c: cd_drives -> ppsz_cd_drives 2004-08-27 rocky * example/.cvsignore: [no log message] 2004-08-27 rocky * doc/doxygen/.cvignore, doc/doxygen/.cvsignore: filename typo: .cvignore -> .cvsignore 2004-08-27 rocky * include/cdio/cdio.h, lib/cdio.c: Add constant variable to indicate which OS driver we've got in build. 2004-08-27 rocky * NEWS: What's up. 2004-08-27 rocky * include/cdio/cdio.h, lib/cdio.c, src/cd-drive.c, src/cd-info.c: Add a couple of routines to pass back the driver used in getting a drive. Speeds up a little the task of opening the drive. Is now used in cd-drive and cd-info. 2004-08-27 rocky * lib/MSWindows/aspi32.c, lib/MSWindows/aspi32.h, lib/MSWindows/win32.c, lib/MSWindows/win32_ioctl.c: Use generic SCSI MMC code for getting drive capabilities. 2004-08-27 rocky * lib/_cdio_osx.c: Wrong access for setting drive capabilites to unknown. 2004-08-27 rocky * include/cdio/cdio.h, include/cdio/scsi_mmc.h, lib/cdio.c, lib/cdio_private.h, lib/scsi_mmc.c, src/cd-drive.c, src/cd-info.c: Expose hwinfo call as a cdio command. It was SCSI-MMC. This may help on OSX. 2004-08-27 rocky * lib/_cdio_linux.c, lib/scsi_mmc.c: scsi_mmc.c: more aggressive about getting drive capabilites. Try to get length first. Also try CAPABILITIES_PAGEs as well as ALL_PAGEs. 2004-08-27 rocky * lib/_cdio_osx.c: Devices list fixed, compilation error and give up on drive capabilities for now 2004-08-27 rocky * src/util.c: Show status unknown when it is unknown 2004-08-26 rocky * lib/_cdio_linux.c: Small variable name changes 2004-08-26 rocky * lib/_cdio_osx.c: Small formatting changes 2004-08-22 rocky * lib/_cdio_osx.c: Save more IOkit information in private structure and separate this from reading TOC. Many small changes that I hope will eventually get us closer to getting more drive and CD information although for now it doesn't help all that much. 2004-08-19 rocky * lib/_cdio_osx.c: Partial OSX improvements -- more work is needed. 2004-08-19 rocky * configure.ac: Another attempt at a pkgconfig bug workaround 2004-08-19 rocky * configure.ac, libcdio.pc.in: Fixes for making libcdio work with pkg-config on Darwin when linking vcdimager and when linking just libcdio. From Steven M. Schultz: I blew a couple minutes tinkering with libcdio.pc and found that manually adding a quote character (not even a matched set of quotes!) around the second -framework was enough. What works for now is manually editing libcdio.pc after it's been installed: Libs: -L${libdir} -lcdio -lm -Wl,-framework -Wl,CoreFoundation -Wl,-framework -Wl,IOKit to: Libs: -L${libdir} -lcdio -lm -Wl,-framework -Wl,CoreFoundation "-Wl,-framework" -Wl,IOKit is enough to get vcdimager compiled and linked. Appears that the thing to do is somehow get the quotes into libcdio.pc but not into $LIBS - or something like that at any rate. 2004-08-18 rocky * lib/_cdio_osx.c: Make sure pp_scsiTaskDeviceInterface is initialized. The code should probably be reorganized better for this. For now this probably works. 2004-08-16 rocky * lib/image/bincue.c, lib/image/cdrdao.c, lib/image/nrg.c: Set toc_init even on image drivers. Never know when the could will start needing this, but may as well do now. 2004-08-16 rocky * lib/FreeBSD/freebsd.c, lib/_cdio_bsdi.c, lib/_cdio_linux.c, lib/_cdio_osx.c, lib/_cdio_sunos.c: Initialize gen.toc_init 2004-08-16 rocky * lib/_cdio_osx.c: Forgot to init CD-Text variables. 2004-08-16 rocky * lib/_cdio_linux.c, lib/_cdio_osx.c, lib/_cdio_sunos.c: _cdio_osx.c: first attempt at issuing general SCSI-MMC passthrough command. others: small changes. 2004-08-15 rocky * lib/_cdio_osx.c: First attempt at getting drive capabilities. 2004-08-15 rocky * lib/_cdio_osx.c: Compilation fix. 2004-08-13 rocky * lib/_cdio_generic.c, lib/image/bincue.c, lib/image/cdrdao.c, lib/image/nrg.c, lib/image_common.h: Merge common cdtext code into image drivers. 2004-08-13 rocky * lib/_cdio_osx.c: Compilaton fixes. 2004-08-12 rocky * README.libcdio: Add instructions for CVS. 2004-08-10 rocky * lib/FreeBSD/freebsd.c: Now that all of the generic cdtext code is in place, it is trivial to add CD-Text support to FreeBSD. 2004-08-10 rocky * lib/MSWindows/win32.c: typo. 2004-08-10 rocky * example/sample10.c, lib/MSWindows/win32.c, lib/Makefile.am, lib/_cdio_bsdi.c, lib/_cdio_generic.c, lib/_cdio_linux.c, lib/_cdio_sunos.c, lib/cdio_private.h, lib/generic.h, src/util.c: lib/*.c: create and use get_cdtext_generic. lib/generic.h: prototypes for _cdio_generic.c (move out of _cdio_private.h) example/sample10.c, src/util.c: small print format improvement 2004-08-10 rocky * src/util.c: Ooops. Debug info creapt in. 2004-08-10 rocky * lib/MSWindows/win32.c, lib/MSWindows/win32.h, src/util.c: Compilation fixes for Win32 and cd-text breakage. 2004-08-10 rocky * example/.cvsignore: We now have 10 samples so it's sample?? as well as sample? 2004-08-10 rocky * lib/_cdio_bsdi.c: Compilation fixes from cd-text breakage. Also make style more like the others. 2004-08-10 rocky * lib/_cdio_sunos.c: compilation fix 2004-08-10 rocky * test/vcd_demo.right: More correct output and add additional capability lines 2004-08-10 rocky * lib/MSWindows/aspi32.c, lib/MSWindows/win32.c, lib/MSWindows/win32.h, lib/MSWindows/win32_ioctl.c, lib/_cdio_bsdi.c, lib/_cdio_generic.c, lib/_cdio_linux.c, lib/_cdio_sunos.c, lib/cdio_private.h: 1st attempt to reduce duplicate CD-Text code. (It works on GNU/Linux)... 2004-08-10 rocky * example/sample10.c, include/cdio/scsi_mmc.h, lib/FreeBSD/freebsd_ioctl.c, src/util.c: Add a couple of "features". freebsd_ioctl.c: hopefully less-erroneous MCN extraction. 2004-08-08 rocky * lib/Makefile.am: Pedantic alphabetization. 2004-08-08 rocky * example/sample10.c, src/util.c: Print hardware serial number if given by feature. 2004-08-08 rocky * src/util.c: Add more feature info. 2004-08-08 rocky * lib/MSWindows/win32.c: Compilation fixes. 2004-08-07 rocky * lib/_cdio_bsdi.c: Make like the others. 2004-08-07 rocky * lib/FreeBSD/freebsd.c, lib/MSWindows/win32.c, lib/MSWindows/win32.h, lib/_cdio_bsdi.c, lib/_cdio_generic.c, lib/_cdio_linux.c, lib/_cdio_sunos.c, lib/cdio_private.h, lib/scsi_mmc.c: Add b_cdtext_init and b_cdtext_error to generic structure. If we can't read cdtext once, mark as an error and don't try to read again. 2004-08-07 rocky * doc/libcdio.texi: Add section to Give complete list of example programs. A few small updates, spelling corrections, typo is other places. 2004-08-07 rocky * src/cd-drive.c: Bug: listing wrong drive capabilities. Was using wrong source_name. 2004-08-07 rocky * example/sample1.c, example/sample2.c, example/sample3.c, example/sample4.c: cdio->p_cdio 2004-08-07 rocky * example/README: [no log message] 2004-08-07 rocky * lib/FreeBSD/freebsd.c: Attempt getting disc mode. 2004-08-07 rocky * example/sample10.c, lib/FreeBSD/freebsd_cam.c, lib/scsi_mmc.c, src/util.c: FreeBSD and gcc < 3.0 fixes Some variable name changes to match style. 2004-08-07 rocky * lib/FreeBSD/freebsd.c: Compilation bug: need the conversion assignment. 2004-08-07 rocky * example/sample10.c, src/util.c: Add power management feature display. 2004-08-07 rocky * include/cdio/scsi_mmc.h: Add more feature codes. 2004-08-07 rocky * example/sample10.c, src/util.c: Add more feature descriptions. 2004-08-07 rocky * example/sample10.c, include/cdio/scsi_mmc.h, src/cd-drive.c, src/util.c, src/util.h: util.*, cd-drive: Add feature listing to cd-drives. sample10.c: More feature information printed scsi_mmc.h: more doxygen comments about features. 2004-08-06 rocky * include/cdio/scsi_mmc.h, lib/scsi_mmc.c: small changes. 2004-08-06 rocky * include/cdio/scsi_mmc.h: Add more feature definitions. 2004-08-06 rocky * example/README: Update. 2004-08-06 rocky * example/Makefile.am, example/sample10.c: SCSI MMC example to show feature list of a drive. 2004-08-06 rocky * lib/MSWindows/win32.c, src/util.c: win32.c: initialize capabilities before setting them. util.c: typo was using read parameter for determining CD-RW writing. 2004-08-06 rocky * include/cdio/scsi_mmc.h: Fill out GET_CONFIGURATION - add some feature info and return types. 2004-08-06 rocky * test/cdda-mcn.right, test/cdda.right, test/check_opts0.right, test/check_opts1.right, test/check_opts2.right, test/check_opts3.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right, test/isofs-m1.right, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/vcd_demo_vcdinfo.right, test/videocd.right: Output had been erroneously showing CD-RW write capability. We also now show DVD-RW and DVD+RW capabilities. 2004-08-06 rocky * include/cdio/types.h: Comment corrections. 2004-08-06 rocky * src/cd-info.c, src/util.c: cd-info.c: should not try to print out MCN for DVD's - they don't have any such thing. util.c: wasn't reading right/write parms when showing write capabilities. now also show DVD+RW and DVD-RW capabilities. 2004-08-05 rocky * NEWS: What's up. 2004-08-05 rocky * lib/FreeBSD/freebsd.c: Don't need to call initialization of TOC here. Was done to mask a bug somewhere else that has since (I think) been fixed. 2004-08-05 rocky * lib/_cdio_linux.c: As with Win32 was passing the wrong pointer (p_cdio instead of p_env). CD-TEXT now sometimes works on GNU/Linux! 2004-08-05 rocky * lib/scsi_mmc.c: Up the timeout. Seems to work a little better. Probably also need either to retry or try a timeout of 0. 2004-08-05 rocky * lib/MSWindows/aspi32.c, lib/MSWindows/win32_ioctl.c, lib/scsi_mmc.c: Was passing in the wrong pointer (p_cdio instead of p_env) 2004-08-03 rocky * lib/FreeBSD/freebsd.c, lib/MSWindows/win32.c: Initialization bugs. 2004-08-03 imacintosh * lib/_cdio_sunos.c: Now uses DKIOCGMEDIAINFO to get discmode and handles Soalris media 2004-08-01 rocky * lib/FreeBSD/freebsd_cam.c: Compilation fix. 2004-08-01 rocky * lib/FreeBSD/freebsd_cam.c: Initialize ccb. Could this be the problem? 2004-08-01 rocky * include/cdio/scsi_mmc.h: Add GET_CONFIGURATION. 2004-08-01 rocky * lib/FreeBSD/freebsd.c, lib/FreeBSD/freebsd_cam.c, lib/scsi_mmc.c: scsi_mmc.c: doc change FreeBSD: use generic routines more often. Initialize TOC before getting drive capabilities (seems to be desired, not completely sure or sure why this would be so.) 2004-07-31 rocky * lib/FreeBSD/freebsd.c, lib/FreeBSD/freebsd.h, lib/FreeBSD/freebsd_cam.c: More in line with rest of MMC stuff. 2004-07-31 rocky * lib/FreeBSD/freebsd.h: source_name is now in gen. 2004-07-31 rocky * lib/FreeBSD/freebsd.c: Compilation fix. 2004-07-31 rocky * include/cdio/scsi_mmc.h, lib/_cdio_linux.c, lib/scsi_mmc.c, lib/scsi_mmc_private.h, src/cd-drive.c, src/cd-info.c, src/cd-read.c, src/util.h: Add scsi_mmc_get_hwinfo. 2004-07-29 rocky * example/sample8.c: message->psz_msg 2004-07-29 rocky * doc/libcdio.texi: Small changes. 2004-07-29 rocky * include/cdio/scsi_mmc.h: Add lengths of hardware vendor, model, and revision. 2004-07-29 rocky * example/Makefile.am, example/README, example/sample8.c, example/sample9.c: sample9: A program to show issuing a SCSI-MMC command. sample8: cdio->p_cdio; update copyright 2004-07-29 rocky * lib/scsi_mmc.c: Bug: passing wrong object. 2004-07-29 rocky * lib/MSWindows/aspi32.c, lib/MSWindows/win32.c, lib/MSWindows/win32.h, lib/MSWindows/win32_ioctl.c: Use more common routines. ioctl - not tested. ASPI has bug probably in running scsi command. 2004-07-29 rocky * lib/_cdio_bsdi.c: Convert to use generic routines for first track, num tracks and getting discmode. 2004-07-29 rocky * lib/_cdio_sunos.c: compilation fix. 2004-07-29 rocky * include/cdio/scsi_mmc.h, lib/_cdio_generic.c, lib/_cdio_linux.c, lib/_cdio_sunos.c, lib/cdio_private.h, lib/image/bincue.c, lib/image/cdrdao.c, lib/image/nrg.c, lib/image_common.h, test/cdda-mcn.right, test/cdda.right, test/check_opts0.right, test/check_opts1.right, test/check_opts2.right, test/check_opts3.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right, test/monvoisin.right, test/svcdgs.right, test/videocd.right: Tighten code by putting more generic routines in cdio_generic: to get first track number and number of tracks to get discmode everybody now has gen.i_tracks and gen.i_first_track. test/* format of output changed yet again. 2004-07-28 rocky * example/sample8.c, include/cdio/cdio.h, lib/cdio.c, src/cd-info.c: Add discmode to string array. Simplifies some code a bit. 2004-07-28 rocky * doc/libcdio.texi: Add CD-TEXT example. Note existence of MMC interface. 2004-07-28 rocky * lib/MSWindows/win32_ioctl.c: Bug in generic run_scsi_cmd_win32ioctl: wasn't copying CDB in and wasn't setting length. 2004-07-28 rocky * include/cdio/scsi_mmc.h, lib/FreeBSD/freebsd.c, lib/FreeBSD/freebsd.h, lib/FreeBSD/freebsd_cam.c, lib/FreeBSD/freebsd_ioctl.c, lib/MSWindows/aspi32.c, lib/MSWindows/win32_ioctl.c, lib/_cdio_linux.c, lib/scsi_mmc.c: Make setting read lengths more precise (and correct). 2004-07-28 rocky * lib/MSWindows/aspi32.c, lib/MSWindows/aspi32.h, lib/MSWindows/win32.c, lib/MSWindows/win32.h, lib/MSWindows/win32_ioctl.c: compilation fixes 2004-07-28 rocky * lib/MSWindows/aspi32.c, lib/MSWindows/win32.c, lib/MSWindows/win32_ioctl.c: msecs 2 secs cleanup 2004-07-28 rocky * lib/scsi_mmc_private.h: Typo in fn name. 2004-07-28 rocky * include/cdio/dvd.h, include/cdio/scsi_mmc.h, lib/FreeBSD/freebsd_cam.c, lib/MSWindows/aspi32.c, lib/MSWindows/win32_ioctl.c, lib/_cdio_bsdi.c, lib/_cdio_linux.c, lib/_cdio_sunos.c, lib/scsi_mmc.c, lib/scsi_mmc_private.h: Make sure milliseconds get converted to seconds if needed. Some function renaming, and a typo in a DVD book type. 2004-07-27 rocky * lib/scsi_mmc.c, lib/util.c: fixes for DVD handling 2004-07-27 rocky * lib/_cdio_bsdi.c: Add CD-TEXT 2004-07-27 rocky * lib/_cdio_bsdi.c: Add disc mode and small bug fixes 2004-07-27 rocky * lib/_cdio_bsdi.c: Best guess of how to do scsi_mmc_run_cmd. Thanks to Steven M. Schultz 2004-07-27 rocky * lib/_cdio_bsdi.c: compilation fixes 2004-07-27 rocky * include/cdio/scsi_mmc.h, lib/_cdio_sunos.c, lib/scsi_mmc.c, lib/scsi_mmc_private.h: Yet more alternate "_generic" to simplify CD-ROM drivers (like all of them except Windows) were there is in fact only one MMC passthrough command. 2004-07-27 rocky * lib/MSWindows/win32.c, lib/MSWindows/win32_ioctl.c: Misc consolidation fixes. Some mode2 reading seems broken still. 2004-07-27 rocky * lib/_cdio_sunos.c, test/vcd_demo.right: Compilation fixes. Added get_discmode. 2004-07-27 rocky * lib/MSWindows/aspi32.c: compilation typo 2004-07-27 rocky * include/cdio/scsi_mmc.h, lib/MSWindows/aspi32.c, lib/MSWindows/win32.c, lib/MSWindows/win32.h, lib/MSWindows/win32_ioctl.c, lib/_cdio_bsdi.c, lib/_cdio_linux.c, lib/_cdio_sunos.c, lib/cdio_private.h, lib/scsi_mmc.c, lib/scsi_mmc_private.h: More consolidation of code by adding routines to scsi_mmc. 2004-07-26 rocky * lib/MSWindows/win32_ioctl.c: Don't use the cdtext_set_field macro any more. 2004-07-26 rocky * lib/MSWindows/aspi32.c, lib/scsi_mmc.c, lib/scsi_mmc_private.h: get_dvd_physical common routine now works. 2004-07-26 rocky * include/cdio/scsi_mmc.h, lib/MSWindows/aspi32.c, lib/MSWindows/win32_ioctl.c, lib/_cdio_linux.c, lib/scsi_mmc.c, lib/scsi_mmc_private.h: Try to make get_dvd_physical a common routine. (Haven't tested yet.) 2004-07-26 rocky * lib/MSWindows/win32.c, lib/scsi_mmc.c, lib/scsi_mmc_private.h: Start to break out routines into a device-callable routine as well as a publically callable routine. The device-callable routine will be able to change the passthrough routine as M$ has two distinct routines for aspi and ioctl. 2004-07-26 rocky * include/cdio/scsi_mmc.h, lib/Makefile.am, lib/_cdio_linux.c, lib/cdio.c, lib/cdio_private.h, lib/image/bincue.c, lib/image/cdrdao.c, lib/image/nrg.c, lib/scsi_mmc.c, lib/scsi_mmc_private.h: Big change! We now are starting to have universal MMC routines. To do this we need to have function pointers to the OS-specific MMC send/run command. Expect some breakage. Down the line though this will increase code reuse, reliabilty, and make the library more user-customizable. 2004-07-25 rocky * lib/MSWindows/win32.c: Got test backwards. 2004-07-25 rocky * lib/MSWindows/aspi32.c, lib/MSWindows/win32.c, lib/MSWindows/win32.h, lib/MSWindows/win32_ioctl.c: Add ioctl disc mode detection. - Not fully tested yet. 2004-07-25 rocky * lib/MSWindows/aspi32.c: Disc mode detection done for aspi. 2004-07-25 rocky * example/sample8.c: Enumeration has changed. 2004-07-25 rocky * include/cdio/sector.h, lib/_cdio_linux.c, lib/image/bincue.c, lib/image/cdrdao.c, lib/image/nrg.c, lib/sector.c, src/cd-info.c, test/check_opts0.right, test/check_opts1.right, test/check_opts2.right, test/check_opts3.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right, test/monvoisin.right, test/svcdgs.right, test/videocd.right: Reduce overall number of CD disc modes. I thing the main purpose that will be used is to separate CD Audio from CD Data, XA and DVD's. On GNU/Linux it seems that the implementation is a bit artificial. 2004-07-25 rocky * lib/_cdio_linux.c: Pedantic ordering. 2004-07-25 rocky * lib/MSWindows/aspi32.c, lib/MSWindows/aspi32.h, lib/MSWindows/win32.c, src/cd-info.c: MSWindows: add DVD type determination. cd-info.c: poor disc-mode error message string 2004-07-25 rocky * include/cdio/scsi_mmc.h: Typo 2004-07-25 rocky * include/cdio/Makefile.am: Add dvd.h to list of includes. 2004-07-25 rocky * lib/FreeBSD/freebsd.h: We use p_env now. 2004-07-25 rocky * lib/_cdio_linux.c: Typo and small formatting changes. 2004-07-25 rocky * include/cdio/dvd.h: Typo 2004-07-25 rocky * lib/FreeBSD/freebsd.c: Remove duplicate toc_init field and use gen.toc_init like other drivers use. 2004-07-25 rocky * lib/_cdio_linux.c: Better testing to see if TOC is initialized by read_toc_linux before using info based on that. Order of routines alphabetized a little bit better. 2004-07-25 rocky * src/cd-info.c: Some weird problem when --no-cddb and libcddb was not around. I'd rather switch than fight it. 2004-07-25 rocky * include/cdio/dvd.h: Definitions for DVD access. 2004-07-25 rocky * lib/FreeBSD/freebsd.c: Set initialization of TOC when that's done. Test for TOC initialization success in routines that depend on that. 2004-07-25 rocky * lib/MSWindows/aspi32.c: Compilation fix: run_scsi_cmd is no longer static. 2004-07-25 rocky * test/cdda.cue, test/cdda.right, test/cdda.toc, test/check_opts0.right, test/check_opts1.right, test/check_opts2.right, test/check_opts3.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right, test/isofs-m1.cue, test/isofs-m1.right, test/isofs-m1.toc: Not sure if we can have a MCN on a CD-DATA filesystem, but I know we can have one on a CD-DA. So remove it from the ISO and add it to the CD-DA. Also isofs-m1 is now reports that it is a CD-DATA CD since that's what it is. 2004-07-25 rocky * lib/FreeBSD/freebsd_cam.c: Add some checks for failed initialization and NULL pointers. Thanks to Steve Schultz. 2004-07-25 rocky * example/sample8.c, include/cdio/scsi_mmc.h, include/cdio/sector.h: Changes to facilitate DVD detection. 2004-07-25 rocky * include/cdio/sector.h, lib/_cdio_linux.c, src/cd-info.c: sector.h: add more DVD types. _cdio_linux.c: Add ability in GNU/Linux to determine if a drive has a DVD in it. cd-info: show the drive type. 2004-07-24 rocky * lib/image/bincue.c, lib/image/cdrdao.c, lib/image/nrg.c, lib/image_common.h, src/cd-info.c, test/cdda-mcn.right, test/cdda.right, test/check_cue.sh.in, test/check_opts0.right, test/check_opts1.right, test/check_opts2.right, test/check_opts3.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right, test/isofs-m1.right, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/vcd_demo_vcdinfo.right, test/videocd.right: Add get_disc_mode to image readers. Add it in cd-info display. Update regression tests. I'm not sure disc_mode is all that helpful or correct. 2004-07-24 rocky * lib/FreeBSD/freebsd.c, lib/FreeBSD/freebsd.h, lib/FreeBSD/freebsd_cam.c: FreeBSD compilation fixes. 2004-07-24 rocky * example/README, example/sample8.c: sample8 program shows CD-TEXT and Disc mode info. 2004-07-24 rocky * lib/FreeBSD/freebsd.c: Allow scsi mmc commands to get invoked from outside (for CAM access). 2004-07-24 rocky * lib/FreeBSD/freebsd.c, lib/FreeBSD/freebsd.h: Add get_drive_cap and generic get_mcn routines. 2004-07-24 rocky * include/cdio/sector.h, lib/FreeBSD/freebsd.h, lib/FreeBSD/freebsd_cam.c, lib/MSWindows/aspi32.c, lib/_cdio_linux.c: freebsd: add scsi_mmc_cmd_run and use it. Others: small changes. 2004-07-23 rocky * lib/FreeBSD/freebsd.c: Typo. 2004-07-23 rocky * lib/MSWindows/aspi32.h, lib/MSWindows/win32.c, lib/MSWindows/win32.h, lib/MSWindows/win32_ioctl.c: Allow scsi_mmc_run_cmd to get called from outside. 2004-07-23 rocky * lib/MSWindows/win32_ioctl.c: Add scsi_mmc_run_cmd_win32ioctl and use it. 2004-07-23 rocky * include/cdio/scsi_mmc.h, include/cdio/sector.h: Formatting and small name change. 2004-07-23 rocky * lib/MSWindows/aspi32.c: Create uniform scsi_mmc_run_cmd routine and use this more pervasively. 2004-07-23 rocky * lib/FreeBSD/freebsd.c: Reinstate MCN guess. 2004-07-23 rocky * lib/_cdio_sunos.c: Oops mande MCN buffer too short. More intelligible and tighter code. 2004-07-23 rocky * lib/_cdio_sunos.c: More small changes. 2004-07-23 rocky * lib/_cdio_sunos.c: Small changes - perhaps not really in the category of bugfixes. 2004-07-23 rocky * lib/_cdio_sunos.c: Use common SCSI MMC routine where possible. 2004-07-22 rocky * lib/_cdio_linux.c, lib/cdio_private.h: Wasn't allowing call of new scsi_mmc_run_cmd. 2004-07-22 rocky * lib/_cdio_linux.c: Fell into the a common C pitfall 2004-07-22 rocky * include/cdio/scsi_mmc.h, include/cdio/sector.h, lib/FreeBSD/freebsd_cam.c, lib/MSWindows/aspi32.c, lib/MSWindows/win32_ioctl.c, lib/_cdio_linux.c, lib/_cdio_sunos.c, lib/cdio_private.h, lib/scsi_mmc.c: Work on SCSI MMC layer. Some things may be broken. 2004-07-21 rocky * lib/cdio.c: Turn an assertion into a return failure. 2004-07-21 rocky * include/cdio/scsi_mmc.h: Add more SCSI MMC-3 commands 2004-07-21 rocky * example/sample8.c: Correct for get_disctype to get_discmode change. 2004-07-21 rocky * include/cdio/sector.h: Correct discmode comments. 2004-07-21 rocky * example/sample8.c, include/cdio/cdio.h, include/cdio/scsi_mmc.h, include/cdio/sector.h, lib/_cdio_linux.c, lib/cdio.c, lib/cdio_private.h: Add get_discmode to return what kind of CD or DVD we've got. This is no where near finished. In fact I just started it on GNU/Linux. CD-TEXT on GNU/Linux: turn "warning" into "info". Reduce the chance of error (although we still don't get the CD-TEXT.) 2004-07-19 rocky * lib/MSWindows/win32.c: A little less convoluted 2004-07-19 rocky * lib/FreeBSD/freebsd_cam.c, lib/_cdio_sunos.c: Initialize/null out drive capabilities before setting them. 2004-07-19 rocky * include/cdio/scsi_mmc.h, include/cdio/types.h, lib/FreeBSD/freebsd_cam.c, lib/MSWindows/aspi32.c, lib/MSWindows/win32_ioctl.c, lib/_cdio_linux.c, lib/_cdio_sunos.c, lib/scsi_mmc.c: Add READTOC format defines. 2004-07-19 rocky * doc/glossary.texi: Add CD+G. 2004-07-18 rocky * lib/FreeBSD/freebsd.h: Compilation fix from Steven M. Schultz. 2004-07-18 rocky * lib/MSWindows/aspi32.c, lib/MSWindows/aspi32.h, lib/MSWindows/win32.c, lib/MSWindows/win32.h, lib/MSWindows/win32_ioctl.c: Modified for expanded CD-TEXT handling. 2004-07-18 rocky * lib/cdio.c: gcc 2.95 vs 3.0 fix. Thanks yet again to Steven Schultz. 2004-07-18 rocky * test/cdda-mcn.right, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/vcd_demo_vcdinfo.right: Output has changed again. "eject" seems to be more commonly used than "open tray." 2004-07-18 rocky * lib/FreeBSD/freebsd_cam.c: Some compilation fixes from Steven M. Schultz. Thanks! get_drive_cap_freebsd_cam updated to expanded API. 2004-07-18 rocky * example/sample2.c, include/cdio/types.h, lib/_cdio_linux.c, lib/_cdio_sunos.c, lib/scsi_mmc.c, src/util.c, test/cdda.right, test/check_opts0.right, test/check_opts1.right, test/check_opts2.right, test/check_opts3.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right, test/isofs-m1.right, test/vcd_demo.right, test/videocd.right: MMC mode page capabilities gone over. Some more were added. 2004-07-17 rocky * example/sample2.c, include/cdio/cdio.h, include/cdio/scsi_mmc.h, include/cdio/types.h, lib/_cdio_linux.c, lib/_cdio_sunos.c, lib/cdio.c, lib/cdio_private.h, lib/image/bincue.c, lib/image/cdrdao.c, lib/image/nrg.c, lib/image_common.h, lib/scsi_mmc.c, src/cd-drive.c, src/cd-info.c, src/util.c, src/util.h, test/cdda-mcn.right, test/cdda.right, test/check_opts0.right, test/check_opts1.right, test/check_opts2.right, test/check_opts3.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right, test/isofs-m1.right, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/vcd_demo_vcdinfo.right, test/videocd.right: Expand getting drive capabilities. We now have 3 masks where we had only one before. 2004-07-17 rocky * src/iso-read.c: Check that mandatory options are mandatory and note in help where they are. Error messages gone over a little. Closes bug #9675 http://savannah.gnu.org/bugs/?func=detailitem&item_id=9675 2004-07-17 rocky * lib/_cdio_sunos.c: Make use of more CDIO_CDROM_LBA and CDIO_CDROM_MSF #defines. 2004-07-17 rocky * include/cdio/sector.h, lib/FreeBSD/freebsd_cam.c, lib/FreeBSD/freebsd_ioctl.c, lib/MSWindows/aspi32.c, lib/MSWindows/win32_ioctl.c, lib/_cdio_sunos.c: Add common defines for some subchannel commands, and use them. 2004-07-17 rocky * lib/MSWindows/aspi32.c, lib/MSWindows/win32.c, lib/MSWindows/win32.h, lib/MSWindows/win32_ioctl.c: Hoist common CD-TEXT routines. 2004-07-17 rocky * lib/_cdio_sunos.c: Fix for Sunos and new CD-TEXT API. 2004-07-17 rocky * lib/cdtext_private.h: Fix for Win32. 2004-07-17 rocky * lib/MSWindows/aspi32.c, lib/MSWindows/aspi32.h, lib/MSWindows/win32.c, lib/MSWindows/win32.h, lib/MSWindows/win32_ioctl.c: Win32 fixes for new CD-TEXT interface. 2004-07-17 rocky * lib/_cdio_linux.c, lib/cdtext.c, lib/cdtext_private.h: Add common routine to extract cdtext data. 2004-07-17 rocky * lib/MSWindows/aspi32.c, lib/MSWindows/win32.c, lib/_cdio_linux.c, lib/_cdio_sunos.c: Corrections for new cdtext interface. Some more precise track handling when the first track is not 1. Some of this needs to be tested. 2004-07-17 rocky * example/sample8.c, include/cdio/cdio.h, include/cdio/cdtext.h, lib/_cdio_linux.c, lib/cdio.c, lib/cdio_private.h, lib/image/bincue.c, lib/image_common.h, src/cd-info.c, test/cdda-mcn.right, test/cdda.right: Expand get_cdtext to include a track number. 0 = disc info. 2004-07-16 rocky * include/cdio/cdtext.h, lib/cdtext.c, src/cd-info.c, src/cd-read.c, test/cdda-mcn.right, test/cdda.right, test/cdda.toc: Add cdtext display to cd-info and adjust regression tests accordingly. cd-read.c: don't try to print null strings. 2004-07-16 rocky * lib/MSWindows/win32.c: Wasn't calling CD-TEXT win32 ioctl routine. CD-TEXT now works on win32 ioctl. 2004-07-16 rocky * lib/_cdio_sunos.c: insignificant changes 2004-07-16 rocky * lib/MSWindows/win32_ioctl.c: CDB for READ_CD has only 12 bytes. 2004-07-16 rocky * lib/MSWindows/win32_ioctl.c: Misplaced #endif 2004-07-16 rocky * lib/MSWindows/win32.h, lib/MSWindows/win32_ioctl.c: Add CD-TEXT handling 2004-07-16 rocky * lib/MSWindows/aspi32.c: routine name change. 2004-07-16 rocky * lib/MSWindows/win32_ioctl.c: Use more universal C style 2004-07-16 rocky * lib/MSWindows/aspi32.c, lib/MSWindows/aspi32.h, lib/MSWindows/win32.c: Finish get_MCN for aspi. Use conventions to make look more like other SCSI passthrough routines. 2004-07-15 rocky * lib/_cdio_sunos.c: Get MCN now works. Retrieving CD TEXT no longer causes core dump. (It still doesn't give useful info back though.) Code cleanups. 2004-07-15 rocky * lib/_cdio_linux.c: cmd -> cdb to match MMC terminology and Solaris naming. 2004-07-15 rocky * lib/_cdio_sunos.c: Closer to getting CDTEXT working. 2004-07-15 rocky * lib/MSWindows/aspi32.c, lib/MSWindows/win32.h, lib/_cdio_linux.c, lib/cdio.c: MSWindows: comment corrections _cdio_linux.c: perhaps closer to getting CD TEXT correct. 2004-07-14 rocky * lib/MSWindows/aspi32.c: small cleanup changes. 2004-07-14 rocky * lib/MSWindows/aspi32.c: Start to consolidate SCSI MMC passthrough code. 2004-07-13 rocky * example/sample2.c, lib/MSWindows/aspi32.c, lib/MSWindows/win32_ioctl.c: MSWindows lint. 2004-07-13 rocky * lib/MSWindows/aspi32.c, lib/MSWindows/aspi32.h, lib/_cdio_linux.c, lib/image_common.h: Yet more code cleanups. 2004-07-13 rocky * lib/MSWindows/aspi32.c, lib/MSWindows/win32.c: Some code cleanups - more may follow. 2004-07-13 rocky * example/sample8.c, lib/MSWindows/aspi32.c, lib/MSWindows/aspi32.h, lib/MSWindows/win32.c, lib/MSWindows/win32.h, lib/MSWindows/win32_ioctl.c, lib/cdio_private.h, lib/image_common.h: Add CD-TEXT to MS-Windows ASPI driver. (The first real CD driver!) In the process we've had to remove "const" from get_aspi. 2004-07-12 rocky * test/bad-cat1.cue: Bad catalog cue test 1. 2004-07-12 rocky * test/bad-msf-3.cue: Bad MSF cue test 3. 2004-07-12 rocky * test/bad-msf-1.cue: MSF cue test 1 2004-07-12 rocky * include/cdio/sector.h, lib/MSWindows/aspi32.c, lib/MSWindows/win32_ioctl.c: MS Windows compilation fixes. 2004-07-11 rocky * example/sample8.c, include/cdio/cdio.h, include/cdio/cdtext.h, lib/cdio.c, lib/cdio_private.h, lib/cdtext.c, lib/image.h, lib/image/bincue.c, lib/image/cdrdao.c, lib/image/nrg.c, lib/image_common.h, test/cdda.cue: Redo CD-TEXT handling. First minimally working version for CD bin/cue and cdrdao images. 2004-07-11 rocky * test/Makefile.am, test/cdtext.toc, test/testtoc.c: Add cdtext regression test. 2004-07-11 rocky * lib/image/bincue.c, lib/image/cdrdao.c, lib/image/nrg.c: Initialize cdtext to NULL and other add some initializations that should have been done. 2004-07-11 rocky * lib/cdtext.c: Correct some string initalization bugs in cdtext_keywords. We switched from binary search to linear search for now. 2004-07-10 rocky * lib/image/nrg.c: Save modes types now that we have that in the disc structure. Information for this comes courtesy extractnrg.pl 2004-07-10 rocky * lib/image.h, lib/image/bincue.c, lib/image/cdrdao.c, lib/image/nrg.c, lib/image_common.h: Hoist some more common image routines and make image drivers look more common. In particular we now have a "cue", "source", and "access-mode" parameters defined even when "cue" and "source" are the same as in NRG. The _img_private_t's for the image drivers are now more similar if not the same. Some memory leaks when there are error conditions in opening image drivers have been fixed. 2004-07-10 rocky * include/cdio/sector.h, lib/Makefile.am, lib/image.h, lib/image/bincue.c, lib/image/cdrdao.c, lib/image/nrg.c, lib/image_common.h: Hoist common track mode, disk format and disk flags into sector.h Hoist track information into image.h 2004-07-10 rocky * include/cdio/sector.h, lib/MSWindows/win32_ioctl.c, lib/image/bincue.c, lib/image/cdrdao.c, lib/sector.c: Pull out mmssff_to_lba routine and fix bug when in error reporting when frame >= 100. Add msf3_to_lba and use that where possible (win32_ioctl.c for example). 2004-07-10 rocky * test/.cvsignore, test/Makefile.am, test/bad-cat3.cue, test/bad-mode1.cue, test/bad-msf-2.cue, test/bad-msf-3.toc, test/testbincue.c, test/testtoc.c: More cue tests. Add another bad msf toc test. If argc > 1 in testtoc, testbincue, then we give debug output. 2004-07-09 rocky * lib/image/bincue.c, lib/image/cdrdao.c: bincue: check catalog string for validity. cdrdao: slightly more precise error messages for CATALOG. 2004-07-09 rocky * test/Makefile.am, test/bad-cat2.cue, test/bad-cat2.toc, test/bad-cat3.cue, test/testbincue.c: Add some bincue regression tests. 2004-07-09 rocky * NEWS: Buzz, buzz, buzz. Tell me what's a happenin'. 2004-07-09 rocky * lib/image/cdrdao.c: Forgot to close file descriptor. Some variable name changes to make more consistent with variable-name conventions. 2004-07-09 rocky * lib/image/bincue.c: Now uses cuetools-based cue parsing. A more complete job is now done. Cue files are completely parsed for validity in cdio_is_cuefile. Remove sector 2336 (PSX) hack. It's now gotta be in the cue file. Get a c(l)ue. If you don't have one, we're no longer going to try to fake one up (which we did poorly anyway.) 2004-07-09 rocky * include/cdio/cdio.h: API version change. If it's not already it will be with planned CDTEXT changes, capability return changes and get_default drive returning the driver used. 2004-07-09 rocky * THANKS: Note that Svend also supplied CUE parsing code. 2004-07-09 rocky * lib/cdtext.c, lib/image/bincue.c, lib/image/cdrdao.c, lib/image/nrg.c, lib/image/nrg.h, lib/image_common.h: mcn -> psz_mcn and other psz variables. bincue.c: a little closer to getting cuetools parse_cuefile useable. 2004-07-09 rocky * include/cdio/cdtext.h: Small changes. 2004-07-09 rocky * lib/image/bincue.c: Fill in a tad more. In particular the mmssff_to_lba routine. 2004-07-09 rocky * example/sample8.c, include/cdio/cdtext.h, lib/Makefile.am, lib/_cdio_linux.c, lib/cdio.c, lib/cdio_private.h, lib/cdtext.c, lib/cdtext_private.h, lib/image/bincue.c, lib/image/cdrdao.c: Start to merge in cue parsing from cuetools. Also moves forward CDTEXT from a different direction. 2004-07-08 rocky * lib/_cdio_sunos.c: Small changes. 2004-07-08 rocky * include/cdio/scsi_mmc.h, lib/MSWindows/aspi32.c, lib/MSWindows/aspi32.h, lib/_cdio_sunos.c: Sun drive capabilities improved. Sun and Windows ASPI use common MODE_SENSE defines defines now. 2004-07-08 rocky * lib/FreeBSD/freebsd_cam.c, lib/_cdio_sunos.c: #define changed name. Fix compilation error. 2004-07-08 rocky * example/Makefile.am, include/cdio/Makefile.am, include/cdio/cdtext.h, include/cdio/scsi_mmc.h, lib/FreeBSD/freebsd_cam.c, lib/MSWindows/aspi32.c, lib/_cdio_linux.c, lib/cdio.c, lib/cdio_private.h: Regularize MMC commands more. Add ALLOW_PREVENT_MEDIUM. Start CDTEXT. _cdio_linux.c: better at reporting errors. 2004-07-01 rocky * libcdio.spec.in: All files in cdinfo should be owned by root and the root group. Change from Manfred Tremmel in response to a problem reported by Gabriel L. Somlo. 2004-07-01 rocky * test/vcd_demo.right: Update for more capabilities in vcd-info -enabled cd-info. 2004-07-01 rocky * lib/image/nrg.c, lib/image/nrg.h: Note the existence of CD-TEXT even if we don't know how to parse it yet. 2004-06-30 rocky * README.libcdio: Spelling mistake. 2004-06-29 rocky * include/cdio/iso9660.h: Preparation for handling Joliet (and RockRidge?) extensions. 2004-06-28 rocky * lib/MSWindows/win32_ioctl.c: Use common MODE SENSE routines in scsi-mmc.c 2004-06-28 rocky * lib/scsi_mmc.c: Compilation fix. 2004-06-28 rocky * lib/scsi_mmc.c: Add multisession test. 2004-06-28 rocky * lib/MSWindows/aspi32.c, lib/MSWindows/aspi32.h: Correct compilation problems. Fill out more ASPI defines. 2004-06-27 rocky * include/cdio/scsi_mmc.h, lib/FreeBSD/freebsd_cam.c, lib/MSWindows/aspi32.c, lib/Makefile.am: Add common SCSI MMC routine for getting drive capabilities. 2004-06-27 rocky * lib/scsi_mmc.c: Add common routine for SCSI MMC. 2004-06-27 rocky * lib/_cdio_sunos.c: Compilation fix. Remove magic number 100. Use common mmc routine for drive capabilites. 2004-06-27 rocky * test/cdda-mcn.right, test/cdda.right, test/check_opts0.right, test/check_opts1.right, test/check_opts2.right, test/check_opts3.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right, test/isofs-m1.right, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/vcd_demo_vcdinfo.right, test/videocd.right: Changed drive capability output. 2004-06-27 rocky * src/util.c: Print out more of the capabilities. 2004-06-27 rocky * lib/_cdio_linux.c: Revert last change. Need to return char * for MCN. Also replace that magic number 100 with MAX_TRACKS+1. 2004-06-27 rocky * configure.ac: Don't know how $target_os got in there, but it's not defined. $host_os will work although there probably is something better for cross-compiling. 2004-06-27 rocky * configure.ac, doc/glossary.texi, include/cdio/cdio.h, include/cdio/sector.h, include/cdio/types.h, lib/FreeBSD/freebsd.h, lib/MSWindows/aspi32.c, lib/_cdio_linux.c, lib/_cdio_osx.c, lib/image/bincue.c, lib/image/cdrdao.c, lib/image/nrg.c: Add type for holding MCN and ISRC. Add type for session Replace magic constant 100 with CDIO_MAX_TRACK+1 where appropriate. _cdio_osx: save session number and presumably some tighter coding. nrg.c: make sure we add zero byte to end of MCN. 2004-06-26 rocky * configure.ac: thesin says the double -Wl,-framework is necessary when building vcdimager. 2004-06-26 rocky * README: Update to mention/include cdrdao, iso-info, iso-read and kiso. 2004-06-26 rocky * lib/_cdio_osx.c: Use .adr rather than session number to determine if we've got a valid track. 2004-06-26 rocky * configure.ac, include/cdio/scsi_mmc.h: configure.ac: we're now in 0.70cvs scsi_mmc.h: add doxygen comment. 2004-06-26 rocky * include/cdio/xa.h: Typo. 2004-06-26 rocky * lib/FreeBSD/freebsd_ioctl.c, lib/_cdio_bsdi.c, lib/_cdio_generic.c, lib/_cdio_linux.c, lib/_cdio_sunos.c, lib/cdio_private.h: Reduce cut and paste - add common routine, to _cdio_generic.c: cdio_read_mode1_sector. 2004-06-25 rocky * configure.ac: Get ready for real 0.69 release. 2004-06-25 rocky * NEWS, lib/_cdio_bsdi.c, lib/_cdio_generic.c, lib/_cdio_linux.c, lib/_cdio_sunos.c: fewer error exits in drivers. Instead, a failure code is returned. 2004-06-25 rocky * lib/FreeBSD/freebsd.c, lib/FreeBSD/freebsd_cam.c: Don't terminate on error but just return a failure and let the caller decide to exit or not. 2004-06-25 rocky * lib/FreeBSD/freebsd_ioctl.c: mode1 reading fixed up. Some cdio_error's turned into cdio_warn's as we really shouldn't abort in the driver if there is an error discovered but instead just return failure. 2004-06-25 rocky * lib/MSWindows/aspi32.c, lib/MSWindows/win32.h: Fill in LUN's on requests. Add common routine for checking/initializing ASPI availability. 2004-06-25 rocky * doc/glossary.texi: Add SPTI and ASPI. 2004-06-24 rocky * lib/_cdio_osx.c: Non-critical cdio_error's changed to cdio_warn's or cdio_info as more appropriate. 2004-06-23 rocky * THANKS: Credit where it is due. 2004-06-23 rocky * include/cdio/cd_types.h, lib/cd_types.c, src/cd-info.c: Add getting UDF label and major/minor version numbers. cd_types.c: also replace unsafe use of sprintf with strncpy. 2004-06-23 rocky * lib/Makefile.am: Update library numbers as per libtool documentation instructions. libiso9660: added read_pvd routines. libcdio: added cdio_get_drive_cap 2004-06-23 rocky * include/cdio/cd_types.h, lib/cd_types.c, src/cd-info.c: More (but not all) UDF stuff from the Xbox project. 2004-06-23 rocky * NEWS: What's new. 2004-06-23 rocky * lib/_cdio_osx.c: Clarification of 0xA0, 0xA2 and 0xAA. 2004-06-22 thesin * lib/_cdio_osx.c: Changed a few warns to debugs for release version 2004-06-22 thesin * lib/_cdio_osx.c: Remove noisy debug code, or at least hide it for now 2004-06-22 thesin * lib/_cdio_osx.c: OSX support works...now to get into the eject and drive caps next 2004-06-22 rocky * lib/_cdio_osx.c: correct some of the many bugs (I hope) 2004-06-21 rocky * lib/iso9660_fs.c: Don't abort if we can't read the PVD. 2004-06-21 rocky * lib/MSWindows/win32_ioctl.c: Give string error message descriptions now. 2004-06-21 rocky * lib/MSWindows/aspi32.c, lib/MSWindows/aspi32.h, lib/MSWindows/win32.h: Can now get drive capabilities in ASPI driver ASPI headers from win32.h moved to aspi32.h some more cleanups. 2004-06-20 rocky * lib/FreeBSD/Makefile, lib/MSWindows/Makefile, lib/Makefile.am, lib/image/Makefile: Add boilerplate Makefiles for convenience 2004-06-20 rocky * lib/MSWindows/aspi32.c, lib/MSWindows/win32.c, lib/MSWindows/win32.h, lib/MSWindows/win32_ioctl.c: Add mode1 reading Lint changes, routine renaming to be like others. More const's, fewer void *. Attempt drive detection. There are still many bugs. The code is just a little less bogus. 2004-06-19 rocky * include/cdio/cd_types.h, lib/_cdio_generic.c, lib/_cdio_stdio.c, lib/cd_types.c, lib/cdio.c, lib/image/bincue.c, lib/util.c, src/cd-info.c, src/iso-info.c, src/util.c: Lint-like things. Add X-BOX detection courtesy of the xmbc project. 2004-06-19 rocky * lib/FreeBSD/freebsd.c, lib/FreeBSD/freebsd.h, lib/FreeBSD/freebsd_cam.c, lib/FreeBSD/freebsd_ioctl.c: Put the right suffix on ATAPI devices. More const's, fewer void *'s. 2004-06-19 rocky * configure.ac: libvcdinfo is used by cd-info not cd-read. 2004-06-19 rocky * lib/FreeBSD/freebsd.c, lib/FreeBSD/freebsd.h: Add "c" at end of drive specification if not FreeBSD 5.x. Handle not getting default drive more gracefully. As always changes based on suggestions from Heiner. 2004-06-19 rocky * include/cdio/cdio.h: Note that getting default drive and listing all drives may change depending on OS/driver and whether media is installed. 2004-06-19 rocky * src/cd-info.c, src/iso-info.c: More information about ISO 9660 images is printed. 2004-06-19 rocky * test/check_opts0.right, test/check_opts1.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right, test/isofs-m1.right, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/vcd_demo_vcdinfo.right, test/videocd.right: Changes as a result of printing more ISO 9660 information in cd-info. 2004-06-19 rocky * NEWS, include/cdio/iso9660.h, lib/iso9660_fs.c: Add const's where possible. Add cdio mode2 read routine. 2004-06-19 rocky * include/cdio/iso9660.h, lib/iso9660_fs.c, src/iso-info.c: iso9660_iso_... -> iso9660_ifs_... 2004-06-19 rocky * include/cdio/iso9660.h, lib/iso9660_fs.c, src/iso-info.c: iso9660*.{c,h}: Add PVD read for ISO 9660 images. iso-info now shows this info. 2004-06-18 rocky * include/cdio/iso9660.h, lib/iso9660.c: Add some trivial routines to get volumeid, volumeset id, application id and system id. Moved over from vcdimager. Thanks to Stephan (mephisto..@...) for the suggestion. 2004-06-18 rocky * lib/image/nrg.c: Fix bugs in merging with extractnrg.pl. 2004-06-17 rocky * lib/_cdio_osx.c: Ignore info where session is 0. At least for now. 2004-06-17 rocky * lib/_cdio_osx.c: Make sure we get TOC info for a single session. For new we can really only deal with a single-session CD. 2004-06-17 rocky * lib/_cdio_osx.c: Note OSX LBA is cdio LSN. 2004-06-17 rocky * lib/_cdio_osx.c: Don't need to set i_leadout twice. 2004-06-17 rocky * lib/_cdio_osx.c: getFirstrack_osx and getNumberOfTracks_osx do duplicate scanning that could be done when looking for the leadout track. Revised code to removes these routines, consolidating the searching in one loop. To be *very* conservative, a first loop finds the positions of the leadout, first track and last track. This code then doesn't assume that the track numbers are in order. They could be given track 3, 2, and then 1 or 2, 3, and then 1. Another loop then maps first_track..last_track 0..number_of_tracks - 1 2004-06-16 thesin * lib/_cdio_osx.c: Works with all burnt media, bought media is different some how. Still better then it was since it didn't work at all. 2004-06-14 rocky * lib/image/nrg.c: Add more info from extractnrg.pl 2004-06-14 rocky * lib/_cdio_osx.c: Wait a minute - the 0xa2 *is* larger than CDIO_CD_MAX_TRACKS. But I guess we still should consider ptrackDescriptors[i_descriptors]. 2004-06-13 rocky * lib/_cdio_osx.c: Probably more correct. 2004-06-13 rocky * lib/_cdio_sunos.c: Move include of glob.h inside conditional Solaris include since that's only where it is needed. configure on cygwin erroneously sets HAVE_GLOB_H and although that too should be fixed, there's no reason to have that failure cause one here. 2004-06-12 rocky * lib/FreeBSD/freebsd.c: Compilation lint 2004-06-12 rocky * lib/FreeBSD/freebsd.c, lib/FreeBSD/freebsd.h: Some of the needed changes for FreeBSD 5.x. More may be needed. From Heiner - thanks! 2004-06-12 rocky * configure.ac: Allow FreeBSD 5.X: Heiner says it sort of works. 2004-06-12 rocky * lib/sector.c: Use %2.2x rather than %.2x. Is there a difference? 2004-06-12 rocky * src/cd-info.c, test/cdda-mcn.right, test/cdda.right, test/check_opts2.right, test/check_opts3.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right, test/isofs-m1.right, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/vcd_demo.right, test/vcd_demo_vcdinfo.right, test/videocd.right: Go back to 8-place MM:SS:FF. 2004-06-11 rocky * configure.ac: It is a tad nicer to switch off --without-versioned-libs when GNU ld isn't around rather than give and error and halt. 2004-06-09 rocky * NEWS: Duplicate entry. 2004-06-09 rocky * lib/FreeBSD/freebsd_cam.c: Change a couple of places to use scsi_mmc.h more. 2004-06-07 rocky * README.libcdio: It's cd-info, not cd-read. Note other alternatives to the elusive "circular" dependency. 2004-06-07 rocky * lib/cdio.c: Bug: wasn't adding drives with detected capability, but the first drive on the list of drives. Don't know how this went undetected this long. 2004-06-06 rocky * doc/libcdio.texi: Refer to libcdio constants more. Note OSX and FreeBSD drivers. Note there is a maximum LSN/LBA/MSF value. 2004-06-06 rocky * include/cdio/cdio.h: Ooops spelling typo. 2004-06-06 rocky * include/cdio/cdio.h: Doc fixes and some paramater name renamings. 2004-06-06 rocky * lib/_cdio_linux.c, lib/_cdio_sunos.c: Comment fixes. 2004-06-06 rocky * lib/_cdio_linux.c: Doc fix. 2004-06-06 rocky * lib/_cdio_sunos.c: Remove another first track is 1 assumption. 2004-06-06 rocky * lib/_cdio_linux.c: Remove another first_track = 1 assumption. 2004-06-06 rocky * lib/_cdio_linux.c, lib/_cdio_osx.c: Back off of testing for unread TOC. Probably a good idea to do lazy TOC reading. 2004-06-06 rocky * lib/_cdio_sunos.c: Compilation fixes. 2004-06-06 rocky * lib/_cdio_linux.c, lib/_cdio_osx.c, lib/_cdio_sunos.c: More work on removing assumption that first_track is 1. 2004-06-05 rocky * THANKS: Put in alphabetical order (by first name). 2004-06-05 rocky * THANKS: Add Heiner. Note cuetools. 2004-06-05 rocky * TODO: Current estimation of what's needed. 2004-06-05 rocky * lib/sector.c, test/cdda-mcn.right, test/cdda.right, test/check_opts2.right, test/check_opts3.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right, test/isofs-m1.right, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/vcd_demo.right, test/vcd_demo_vcdinfo.right, test/videocd.right: Go back to two-digit format for minutes in MSF. CD's really can't have more than 99 minutes in them. So we shouldn't give the illusion they can. 2004-06-05 rocky * lib/FreeBSD/freebsd.c, lib/FreeBSD/freebsd.h, lib/FreeBSD/freebsd_cam.c, lib/FreeBSD/freebsd_ioctl.c: CAM mode2 form1 and form2 reading fixes. Default device lists default to CAM device name. Simplify, correct and make more complete CAM support. With the above we can finally use libcdio for cd-read, vcdimager and probably vlc and xine. Many thanks to Heiner. 2004-06-03 rocky * lib/_cdio_bsdi.c: Compilation fixes. 2004-06-03 rocky * lib/_cdio_bsdi.c: Fix all those *env = env after renaming; It should be *env = user_data. 2004-06-03 rocky * lib/_cdio_linux.c: Minor coding changes. 2004-06-02 thesin * lib/Makefile.am: Fix the -I-I here instead, sorry about that 2004-06-02 rocky * configure.ac: Revert last change which is at least wrong for me. 2004-06-02 rocky * lib/iso9660_private.h: #include "config.h" got deleted. 2004-06-02 rocky * lib/_cdio_osx.c: # include vs #include a problem? 2004-06-02 thesin * configure.ac, lib/_cdio_osx.c: Few fixed for the big rename and fixed a long standing mmmm thing that bothered me, -I-I../lib ;) 2004-06-02 thesin * NEWS: Fixed my name in NEWS 2004-06-02 rocky * lib/_cdio_osx.c: Compilation fixes. 2004-06-02 rocky * include/cdio/sector.h, lib/FreeBSD/freebsd.c, lib/Makefile.am, lib/_cdio_bsdi.c, lib/_cdio_linux.c, lib/_cdio_osx.c, lib/_cdio_sunos.c, lib/image_common.h: Remove some of the bogus assume 1 is first track. Renamings: env -> user_data _obj -> env 2004-06-02 rocky * lib/iso9660_private.h: Some compilers can't hack "# include" 2004-06-02 rocky * lib/image/nrg.c: Typo. 2004-06-01 thesin * lib/_cdio_osx.c: Now knows XA and CD-i tracks, thought I'm not sure it's working 100%, reads the correct amount of tracks, still need to fix the MCN code. 2004-06-01 rocky * lib/image/bincue.c: Avoid subtraction of unsigned numbers. 2004-06-01 rocky * lib/image/bincue.c: Bug in conversion logic. 2004-06-01 rocky * lib/image/bincue.c, lib/image/cdrdao.c, lib/image/nrg.c: Some variable renaming. Also less pervasive assumption that the first track is 1. 2004-06-01 rocky * lib/image/nrg.c, lib/image/nrg.h: Break out file NRG format structures into a header. 2004-06-01 rocky * lib/image/nrg.c: Make use of return code from parse_nrg() A mode1/2 fixup. Some small code reorganization. Closer to being able to parse without opening. 2004-06-01 thesin * lib/_cdio_osx.c: Now knows the difference between DATA and Audio tracks on OSX, also temp change to eject command till I find the right way to implement it in code. 2004-05-31 rocky * NEWS: What's up. 2004-05-31 rocky * THANKS: Acknowledge debt to Micheal Kukat 2004-05-31 thesin * configure.ac, lib/_cdio_osx.c: Fix compile on OS X 10.3, should work on 10.2 and 10.3, still testing for 10.1, OS X Drivers still incomplete this is just to fix compiling. 2004-05-31 rocky * lib/FreeBSD/freebsd.c, lib/FreeBSD/freebsd.h: Some variable renaming. env is the environment, user_data is what is passed in. 2004-05-31 rocky * src/cd-read.c: Make sure source_name a malloc'd, so we can uniformly free it when not needed. 2004-05-31 rocky * lib/image/nrg.c: Merge more information in from extractnrg.pl 2004-05-31 rocky * test/check_nrg.sh.in, test/svcdgs.right: check_nrg.sh.in: add NRG 5.5 cdda MCN test. svcdgs.right: we now have a MCN. 2004-05-31 rocky * lib/_cdio_generic.c, lib/_cdio_linux.c, lib/_cdio_sunos.c: Hopefully improve names. "user_data" comes from user. "env" an environment is really what this is. "obj" is just to vague. 2004-05-31 rocky * src/cd-info.c: Handle error reporting with null source correctly. 2004-05-31 rocky * lib/FreeBSD/freebsd_cam.c: Duplicate free bug fix from tracked down by Heiner. 2004-05-31 rocky * test/vcd_demo.right: Added another 0 to MSF output. (Having 2nd thoughts though since the maximum msf minute value is two places.) 2004-05-31 rocky * test/cdda-mcn.right: NRG MCN CDDA test. 2004-05-31 rocky * src/cd-info.c: Strive to make source_name always a malloc'd variable (so it can always be free'd). 2004-05-31 rocky * lib/image/nrg.c: Better DAOI and DAOX information based on extractnrg.pl. 2004-05-27 rocky * lib/FreeBSD/freebsd.c: Remove the bogus assumption that the first track is always 1. May help down the line with multi-session CDs. 2004-05-27 rocky * lib/_cdio_linux.c: Remove some of the bogosity in assuming the first track starts at 1. (Probably will be useful on multi-session CD's). 2004-05-27 rocky * lib/_cdio_osx.c: We shouldn't terminate if we can't get an MCN. 2004-05-27 rocky * src/Makefile.am: Put LIBPOPT_CFLAGS after local include in case LIBPOPT has headers common to those in LIBCDIO_CFLAGS. 2004-05-27 rocky * lib/cdio_private.h: Fix prototype mismatch. 2004-05-27 rocky * lib/cdio.c: Correct mismatched prototypes. 2004-05-26 rocky * include/cdio/scsi_mmc.h, include/cdio/types.h: scsi_mmc.h: add definition for SET_SPEED types.h: add size of MCN. 2004-05-26 rocky * lib/image/nrg.c: Improve slightly (or possibly break slightly) based on information from extractools.pl. 2004-05-26 rocky * NEWS: [no log message] 2004-05-26 rocky * src/cd-read.c: Add --hexdump and --no-hexdump options. We now can hexdump to a file and dump bytes stdout (which may be useful in a pipe). 2004-05-24 rocky * lib/FreeBSD/freebsd.h: Make default CAM since that works best. It might help the single FreeBSD user of libcdio. 2004-05-24 rocky * src/cd-info.c: Test variable is not already free before freeing. 2004-05-19 rocky * include/cdio/cdio.h, lib/FreeBSD/freebsd.c, lib/FreeBSD/freebsd.h, lib/cdio.c, lib/sector.c: Add cdio_open_am_cd. Use network order for FreeBSD lsn/lba's and other small FreeBSD patches. Thanks again to Heiner. 2004-05-16 rocky * lib/FreeBSD/freebsd.c, lib/MSWindows/aspi32.c, lib/MSWindows/win32.c, lib/image/cdrdao.c, src/cd-info.c: MSWindows/*: get access mode working better. ASPI support is faulty though freebsd.c: it's "ioctl" not "IOCTL"; cdrdao: it's cdrdao, not "toc" cd-info: slightly better error message? 2004-05-13 rocky * lib/FreeBSD/freebsd.c, lib/FreeBSD/freebsd.h, lib/FreeBSD/freebsd_ioctl.c, lib/_cdio_linux.c: Go over FreeBSD code based on output from Heiner. Hopefully 3 bugs are fixed: - we get the leadout track now, no core dumps - MSF reporting is corrected - track format and mode _cdio_linux.c: use cdio #define rather than GNU/Linux one. 2004-05-13 rocky * include/cdio/cdio.h, lib/FreeBSD/freebsd.c, lib/FreeBSD/freebsd.h, lib/_cdio_generic.c, lib/cdio.c, lib/image/bincue.c, lib/image/cdrdao.c, lib/image/nrg.c, src/cd-info.c: Allow more freedom in specifying access mode. Image drivers now have an "image" access mode. 2004-05-13 rocky * lib/MSWindows/win32.c: Allow more flexibility in specifying access mode. "IOCTL" -> "ioctl". 2004-05-12 rocky * lib/FreeBSD/freebsd_ioctl.c: Correct size. Thanks to Heiner. 2004-05-11 rocky * include/cdio/cdio.h, lib/sector.c: cdio.h: update doxygen documentation sector.c: remove erroneous fix. 2004-05-11 rocky * NEWS, include/cdio/scsi_mmc.h, include/cdio/sector.h, include/cdio/types.h, lib/image/bincue.c, lib/image/cdrdao.c, lib/image/nrg.c, lib/sector.c: - Redo types of lsn and lba to allow negative values. Should model MMC3 specs. Add max/min values for lsn. - More complete MMC command set 2004-05-10 rocky * include/cdio/Makefile.am, include/cdio/scsi_mmc.h, include/cdio/sector.h, lib/FreeBSD/freebsd_cam.c, lib/MSWindows/aspi32.c, lib/MSWindows/win32.c, lib/MSWindows/win32_ioctl.c, lib/Makefile.am, lib/_cdio_linux.c, lib/_cdio_sunos.c, lib/scsi_mmc.h: Make scsi_mmc.h public. 2004-05-10 rocky * include/cdio/sector.h: Minor format change. 2004-05-09 rocky * test/Makefile.am: Add bad catalog tests. 2004-05-09 rocky * lib/cdio.c: Check for invalid LSNs. Turn some asserts into just returning failed status. 2004-05-09 rocky * include/cdio/cdio.h: Small typo. 2004-05-09 rocky * src/cd-info.c, test/cdda.right, test/check_opts2.right, test/check_opts3.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right, test/data7.toc, test/isofs-m1.right, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/vcd_demo_vcdinfo.right, test/videocd.right: Ouptut of LSN has one more place just to be sure. cd-info.c: use new msf_to_str routine. 2004-05-09 rocky * configure.ac: It's now AC_HEADER_STDC rather than AC_STDC_HEADERS. Woopie doo. 2004-05-09 rocky * include/cdio/sector.h: Add cdio_msf_to_str - convert MSF to string representation of MSF. 2004-05-09 rocky * include/cdio/cdio.h: Add cdio_is_nrg to check if name is Nero NRG image. 2004-05-09 rocky * lib/sector.c: Even more checking on conversion routines. Add cdio_msf_to_str. 2004-05-09 rocky * lib/image/nrg.c: Check some validity of NRG image. More will come later.... 2004-05-08 rocky * lib/image/cdrdao.c: More error message fixups. 2004-05-08 rocky * test/Makefile.am: That's data7.toc, not doc. 2004-05-08 rocky * NEWS, lib/FreeBSD/freebsd_ioctl.c, lib/image/cdrdao.c, test/Makefile.am, test/bad-cat1.toc, test/bad-cat2.toc, test/bad-cat3.toc, test/data1.toc, test/data2.toc, test/data5.toc, test/data6.toc, test/testtoc.c: freebsd_ioctl.c: Erroneous data size. Thanks again to Heiner. toc: better error messages and more tests. 2004-05-08 rocky * lib/FreeBSD/freebsd_cam.c: wild guesses at get_drive_mcn and get_drive_cap. 2004-05-08 rocky * lib/FreeBSD/freebsd_cam.c: Compilation fix. 2004-05-08 rocky * lib/MSWindows/win32.c: A better guess when we don't know for sure. 2004-05-08 rocky * lib/FreeBSD/freebsd_cam.c: Don't open gen.fd more than once. Thanks to Heiner for pointing this out. 2004-05-08 rocky * include/cdio/types.h: Doc change on what CDIO_DRIVE_CAP_CD_R means. 2004-05-08 rocky * lib/cdio.c: Be more optimistic about CD drive capabilities. 2004-05-08 rocky * configure.ac: Make sure entire warning is printed. 2004-05-07 rocky * lib/FreeBSD/freebsd.c: Test was backwards. Thanks to Heiner for directing my attention to this. 2004-05-07 rocky * configure.ac: Warn when cd-drive, cd-info, cd-read, iso-info and iso-read don't get built. 2004-05-07 rocky * lib/sector.c: Don't try to convert bad LBA's/LSN's. I wonder how many cascaded problems this has caused in the past. 2004-05-07 rocky * lib/image/cdrdao.c: Better error reporting. 2004-05-07 rocky * test/.cvsignore, test/Makefile.am, test/bad-mode1.toc, test/bad-msf-1.toc, test/bad-msf-2.toc, test/t1.toc, test/t2.toc, test/t3.toc, test/t4.toc, test/t5.toc, test/t6.toc, test/t7.toc, test/t8.toc, test/t9.toc, test/testdefault.c, test/testtoc.c: cdrdo TOC parsing regression tests. testdefault.c: more verbose about what's going on. 2004-05-07 rocky * lib/_cdio_osx.c: deal with disc-image device properly. 2004-05-07 rocky * lib/_cdio_osx.c: Typo. 2004-05-07 rocky * lib/FreeBSD/freebsd.c: Do the right cam initialization (when it is ultimately handled.) 2004-05-07 rocky * test/check_cd_read.sh, test/check_iso.sh.in, test/check_opts.sh: Error reporting improved to make debugging easier. 2004-05-06 rocky * src/.cvsignore: Add cd-drive. 2004-05-06 rocky * test/check_common_fn.in, test/check_cue.sh.in: Log command used when there's an error. Redo error message to make cut and paste of command line easier. 2004-05-06 rocky * test/vcd_demo.cue: CUE sheet for VCD demo program. 2004-05-06 rocky * test/check_cue.sh.in: Cater to old shells 2004-05-06 rocky * lib/MSWindows/win32.c, lib/MSWindows/win32_ioctl.c: Bring in line with other drivers. 2004-05-06 rocky * lib/_cdio_bsdi.c: Detect disc-image and don't open this device driver for that. 2004-05-06 rocky * test/check_cue.sh.in: Test for presence of vcd_demo.bin, not vcd_demo.cue to see if we can run this regression test. 2004-05-06 rocky * lib/_cdio_freebsd.c, lib/_cdio_linux.c: _cdio_freebsd.c: is now in FreeBSD (with some cam code) _cdio_linux.c - minor name changes. 2004-05-06 rocky * lib/_cdio_sunos.c: Detect disc-image and don't open this device driver for that. 2004-05-06 rocky * lib/FreeBSD/freebsd.c: open driver shouldn't return true if we do not have a device but an disc-image file. 2004-05-05 rocky * lib/_cdio_generic.c, lib/image/cdrdao.c: memory freeing issues. 2004-05-05 rocky * include/cdio/logging.h, lib/FreeBSD/freebsd.h, lib/FreeBSD/freebsd_cam.c, lib/_cdio_linux.c: Small fixes. 2004-05-05 rocky * lib/FreeBSD/freebsd_cam.c: Compilation fixes. 2004-05-05 rocky * include/cdio/logging.h: A doc elaboration for cdio_error. 2004-05-04 rocky * configure.ac: CDRDAO->cdrdao. 2004-05-04 rocky * test/Makefile.am: typo. 2004-05-04 rocky * lib/FreeBSD/freebsd.c: deal with device properly. 2004-05-04 rocky * lib/FreeBSD/freebsd.c: compilation fix. 2004-05-04 rocky * test/cdda.toc: CDDA test TOC. 2004-05-04 rocky * THANKS, include/cdio/cdio.h, include/cdio/types.h, lib/Makefile.am, lib/cdio.c, lib/image/cdrdao.c, src/cd-info.c, src/cd-read.c, src/util.h, test/Makefile.am, test/check_cue.sh.in, test/isofs-m1.toc, test/vcd_demo.toc: Add some cdrdao image reading support from Svend S. Sorensen's cuetools cdio.c: remove some complicated and extraneous code for auto-driver detection. 2004-05-04 rocky * lib/_cdio_linux.c: Don't give "source not a device message" for uniformity with other drivers. 2004-05-04 rocky * include/cdio/iso9660.h: Don't use "new" as a parameter names. C++ barfs on it. Closes bug #8786. 2004-05-03 rocky * configure.ac, lib/FreeBSD/freebsd.c: Another patch from Heiner Eichmann. 2004-05-02 rocky * lib/FreeBSD/freebsd.c: Another correction from Heiner Eichmann. 2004-05-02 rocky * lib/FreeBSD/freebsd.c: Compilation fixes from Heiner Eichmann - Thanks! 2004-05-01 rocky * lib/_cdio_osx.c: Compilation fix. 2004-04-30 rocky * lib/MSWindows/aspi32.c, lib/MSWindows/win32.c, lib/_cdio_sunos.c: Compilation fixes after adjustments. 2004-04-30 rocky * lib/FreeBSD/freebsd.c, lib/FreeBSD/freebsd.h, lib/FreeBSD/freebsd_cam.c, lib/FreeBSD/freebsd_ioctl.c, lib/MSWindows/aspi32.c, lib/MSWindows/win32.c, lib/_cdio_linux.c, lib/scsi_mmc.h: Compilation fixes and modulization improvements. 2004-04-30 rocky * lib/FreeBSD/freebsd.c, lib/FreeBSD/freebsd.h, lib/FreeBSD/freebsd_cam.c, lib/FreeBSD/freebsd_ioctl.c, lib/Makefile.am: Attempt to add FreeBSD CAM access method. Hope I havent' broken FreeBSD otherwise. 2004-04-30 rocky * lib/MSWindows/ioctl.c, lib/MSWindows/win32_ioctl.c: ioctl.c -> win32_ioctl.c 2004-04-30 rocky * lib/MSWindows/ioctl.c, lib/MSWindows/win32.c, lib/MSWindows/win32.h: compilation fixes. 2004-04-30 rocky * lib/_cdio_sunos.c: Compilation fixes. 2004-04-30 rocky * doc/libcdio.texi, include/cdio/cdio.h, lib/MSWindows/aspi32.c, lib/MSWindows/ioctl.c, lib/MSWindows/win32.c, lib/MSWindows/win32.h, lib/_cdio_bsdi.c, lib/_cdio_freebsd.c, lib/_cdio_linux.c, lib/_cdio_osx.c, lib/_cdio_sunos.c, lib/cdio.c, lib/cdio_private.h, lib/image/bincue.c, lib/image/nrg.c: Add cdio_open_am to allow specifying an access method use for reading/controlling CD. 2004-04-27 rocky * lib/scsi_mmc.h: Add READ_TOC 2004-04-26 rocky * lib/_cdio_freebsd.c, lib/_cdio_linux.c, lib/scsi_mmc.h: More procedure canonicalization, some #defines added and used. 2004-04-26 rocky * lib/_cdio_freebsd.c: Remove unused _read_mode2. 2004-04-25 rocky * doc/libcdio.texi: More on the libcdio plight. 2004-04-25 rocky * lib/_cdio_bsdi.c, lib/_cdio_freebsd.c, lib/_cdio_osx.c: Add const on get_mcn prototype and initialization of get_drive_cap in func structure 2004-04-25 rocky * include/cdio/cdio.h, lib/_cdio_freebsd.c, lib/_cdio_osx.c: Missing a couple of const's in get_mcn when prototype changed. cdio.h: doc fix. 2004-04-25 rocky * lib/_cdio_freebsd.c, lib/_cdio_linux.c, lib/_cdio_osx.c: More regularization of names. Warning: untested on freebsd and osx. 2004-04-25 rocky * lib/image/bincue.c, lib/image/nrg.c, lib/image_common.h: Regularize and I hope simplify names a bit more. image/*.c: (bogus) eject media now frees resources bincue.c: missing default_devices routine in function initialization table. 2004-04-25 rocky * example/sample2.c, include/cdio/types.h, lib/MSWindows/ioctl.c, lib/_cdio_linux.c, lib/_cdio_sunos.c, lib/cdio.c, lib/image/bincue.c, lib/image/nrg.c, src/util.c: CDIO_DRIVE -> CDIO_DRIVE_CAP 2004-04-25 rocky * lib/_cdio_linux.c, lib/_cdio_sunos.c, lib/cdio_private.h, lib/image_common.h, lib/scsi_mmc.h, src/cd-drive.c, src/util.c: get_mcn paramater is const. solaris: failed attempt to get mcn and drive capabilities. Some boilerplate routines used. scsi_mmc: more defines. src/cd-drive.c: bugfix when cdio is null src/util.c: small enhancement. 2004-04-25 rocky * lib/_cdio_linux.c, lib/image/bincue.c, lib/image/nrg.c: Regularize naming convention of static routines a little bit. 2004-04-25 rocky * include/cdio/cdio.h, include/cdio/types.h, lib/MSWindows/ioctl.c, lib/cdio.c, lib/image/bincue.c, lib/image/nrg.c, lib/image_common.h, src/Makefile.am, src/cd-drive.c, src/cd-info.c, src/util.c, src/util.h, test/cdda.right, test/check_opts0.right, test/check_opts1.right, test/check_opts2.right, test/check_opts3.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right, test/isofs-m1.right, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/vcd_demo.right, test/vcd_demo_vcdinfo.right, test/videocd.right: lib/*c, include/cdio/*.h: Add more drive capability info util.{c,h}: common routine for printing capbilities cd-info.c: use above. *.right: update for capability display of above cd-drive.c: new program to show drive capabilities 2004-04-24 rocky * lib/scsi_mmc.h: Small doxygen comment. 2004-04-24 rocky * src/cd-info.c: Slightly better drive capability display. Will probably get moved to a separate program. 2004-04-24 rocky * lib/MSWindows/ioctl.c: Fix bugs in getting drive capabilities; 2004-04-24 rocky * lib/MSWindows/win32.c: Fix a simple bug: get_mcn wasn't. 2004-04-24 rocky * include/cdio/cdio.h, lib/MSWindows/ioctl.c, lib/MSWindows/win32.c, lib/scsi_mmc.h, src/cd-info.c: More drive capability fixups. (Not sure about win32 fixes yet though.) 2004-04-24 rocky * include/cdio/cdio.h: Composite definitions for reader or writer. (More work needed.) 2004-04-24 rocky * src/cd-info.c: Better formating of drive capabilities. 2004-04-24 rocky * lib/MSWindows/ioctl.c, lib/MSWindows/win32.c, lib/MSWindows/win32.h: A little better about detecting drive type via SCSI-3 passthrough. Still has some problems though. 2004-04-23 rocky * NEWS, example/sample2.c, include/cdio/cdio.h, lib/MSWindows/ioctl.c, lib/cdio.c, src/cd-info.c: cdio.{c,h}: get_drive_cap -> get_drive_cap_dev and add get_drive_cap. cd-info.c, sample2.c: use it. 2004-04-23 rocky * lib/Makefile.am, lib/image/bincue.c, lib/image/common.c, lib/image/nrg.c, lib/image_common.h, test/vcd_demo_vcdinfo.right: image/common.h -> image_common.h. I'd rather switch than fight. I still hate automake. 2004-04-23 rocky * example/sample2.c, lib/Makefile.am, lib/_cdio_linux.c, lib/image/bincue.c, lib/image/common.c, lib/image/nrg.c, src/cd-info.c, test/cdda.right, test/check_opts0.right, test/check_opts1.right, test/check_opts2.right, test/check_opts3.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right, test/isofs-m1.right, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/vcd_demo.right, test/videocd.right: image/common.c, Makefile.am: common image routines. src/cd-info.c, *.right: Now show file images under "drive capability" bincue.c/nrg.c: report file image "drive capability" 2004-04-22 rocky * README.libcdio, configure.ac, example/sample2.c, include/cdio/cdio.h, include/cdio/types.h, lib/_cdio_linux.c, lib/cdio.c, lib/cdio_private.h: *.{c,h}: add cdio_get_drive_cap to determine what kind of CDROM device we've got. README.libcdio: suggest stonger making a separate package for cd-info configure.ac: we are in 0.69cvs now 2004-04-21 rocky * README, libcdio.spec.in: Spelling typo. 2004-04-21 rocky * src/cd-info.c: Remove duplicate short option on --no-cddb. On CDDB error give a better error message. 2004-04-03 rocky * doc/glossary.texi: Small addition. 2004-04-03 rocky * doc/libcdio.texi: Add section on Green Book. Revise sample programs to explicitly free resources on exit. 2004-04-03 rocky * example/sample7.c: Remove unused code. 2004-03-24 rocky * test/svcdgs.right, test/vcd_demo_vcdinfo.right: Output changes due to %e -> %d change in strftime 2004-03-24 rocky * src/cd-info.c, test/vcd_demo.right: Change for -mno-cygwin to which doesn't support %e in strftime. 2004-03-24 rocky * configure.ac: 0.68 release. 2004-03-23 rocky * NEWS: [no log message] 2004-03-22 rocky * lib/image/bincue.c: Compilation fix: declarations need to come before statements for gcc < 3.0. 2004-03-21 rocky * lib/cdio.c: Yet another valgrind-found memory leak. 2004-03-21 rocky * example/sample5.c: Cosmetic changes. 2004-03-21 rocky * example/sample6.c, example/sample7.c: memory leaks found by valgrind 2004-03-21 rocky * lib/iso9660_fs.c: Allocation of buffer too short caught by valgrind. 2004-03-20 rocky * lib/Makefile.am: Revision number got bumped - but reconsidered changing interface. So back to the old one. 2004-03-20 rocky * example/sample5.c, include/cdio/cdio.h, lib/Makefile.am, lib/_cdio_generic.c, lib/cdio.c, lib/image/bincue.c, lib/image/nrg.c, src/cd-info.c, test/testdefault.c: Remove more memory leaks caught by valgrind. 2004-03-20 rocky * example/sample6.c: Remove memory leaks found by valgrind. 2004-03-20 rocky * lib/image/bincue.c: Remove memory leaks found by valgrind. 2004-03-20 rocky * example/sample3.c, example/sample4.c: Fix memory leak caught by valgrind. 2004-03-20 rocky * example/sample2.c: Remove memory leak (detected by valgrind). 2004-03-20 rocky * include/cdio/version.h.in: Improve doxygen doc. 2004-03-20 rocky * configure.ac, include/cdio/version.h.in: Add C-Preprocessor define CDIO_VERSION so this can easily be tested in C/C++ applications. 2004-03-20 rocky * lib/_cdio_osx.c: Fix compilation bug. 2004-03-20 rocky * lib/Makefile.am: Bump revision of libcdio before release. 2004-03-20 rocky * lib/_cdio_bsdi.c: Add mode1 reading in a hacky way. 2004-03-20 rocky * configure.ac: Check for GNU ld if --with-versioned-libs. 2004-03-20 rocky * NEWS: [no log message] 2004-03-16 rocky * NEWS: What's shaken. 2004-03-16 rocky * lib/_cdio_sunos.c: From Ian MacIntosh: Modifications that it doesn't use the uscsi commands anymore and so all IDE and SCSI drives go through the same code path - a major simplification. This works with all the CD drives that work with Solaris (IDE or SCSI) as the ioctl's for CDROMCDXA in Solaris just end up doing uscsi calls anyway, but directly from the kernel. The added advantage of not using uscsi is that the user doesn't need to be root - which is important in Sunray environments. 2004-03-13 rocky * include/cdio/types.h: MINGW seems now to define ssize_t. 2004-03-13 rocky * src/iso-info.c: Cater to implimentations that don't impliment Single Unix strftime. Like mingw. 2004-03-11 rocky * example/sample6.c, example/sample7.c: make cygwin -mno-cygwin work. 2004-03-11 rocky * src/iso-read.c: Make work under cygwin with -mno-cygwin. 2004-03-10 rocky * configure.ac, lib/image/bincue.c, lib/logging.c: Changes to make -mno-cygwin (no POSIX emulation on M$) work. In the process, in configure.ac might have broken cygwin when -mno-cygwin isn't used. We'll see. 2004-03-10 rocky * lib/MSWindows/ioctl.c, lib/cdio.c: ioctl: printf lint for cygwin (and perhaps others) cdio.c: define SEEK_SET for cygwin -mno-cygwin (and perhaps others) 2004-03-09 rocky * lib/_cdio_osx.c: Best guess right now at what might work for mode1/mode2. 2004-03-07 rocky * libcdio.pc.in: Add OS-specific libs. For cygwin -lwinmm is needed, not sure about -mcygwin. Also not sure if @LIBS@ is the right thing to add. 2004-03-07 rocky * lib/_cdio_linux.c: mode{1,2}_form2 -> b_form2 2004-03-07 rocky * lib/MSWindows/win32.c: Bug in read_mode2 sectors fixed. With this, vcd-info, vcdxrip, vlc and xine shoudl be able to read okay on win2k! 2004-03-07 rocky * lib/_cdio_linux.c: Not sure why we had *exclusive* access just to see if a CD-ROM is around. Was causing failure to discover CD-ROM drives. 2004-03-06 rocky * include/cdio/cdio.h, lib/MSWindows/win32.c, lib/cdio.c: regular *mode2 variable name. 2004-03-06 rocky * lib/_cdio_sunos.c, lib/image/bincue.c, lib/image/nrg.c: regularize variable names mode{1,2}_form2 -> b_form2 2004-03-06 rocky * lib/MSWindows/ioctl.c, lib/MSWindows/win32.c: win32.c: wasn't passing along mode2 form1 when requested. 2004-03-06 rocky * lib/MSWindows/ioctl.c: update #include file name. 2004-03-06 rocky * lib/_cdio_sunos.c: Bogosity fixup for Solaris. Could be better. 2004-03-06 rocky * lib/_cdio_linux.c: GNU/Linux mode1 sector bogosity reduction. (Could be greatly improved.) 2004-03-06 rocky * test/check_common_fn.in: Typo. 2004-03-06 rocky * configure.ac: We're 0.68cvs now. 2004-03-06 rocky * lib/win32ioctl.c: Moved to MSWindows. 2004-03-06 rocky * lib/MSWindows/ioctl.c: Moved from parent directory into MSWindows directory. 2004-03-06 rocky * lib/image/nrg.c: Fix up mode1 sector reading. 2004-03-06 rocky * lib/image/bincue.c: Small changes. 2004-03-06 rocky * lib/image/bincue.c: See previous log entry. 2004-03-06 rocky * lib/image/bincue.c: The logic in _cdio_read_mode2_sector seems a bit wrong and convoluted to me, but passes the regression tests. (Perhaps it is why we get valgrind errors in vcdxrip). Leave it the way it was for now. Review this sector 2336 stuff later. 2004-03-05 rocky * lib/MSWindows/aspi32.c, lib/MSWindows/aspi32.h, lib/MSWindows/win32.c, lib/MSWindows/win32.h, lib/Makefile.am, lib/_cdio_bincue.c, lib/_cdio_nrg.c, lib/_cdio_win32.c, lib/_cdio_win32.h, lib/image/bincue.c, lib/image/nrg.c, lib/wnaspi32.c, lib/wnaspi32.h: *: Create OS-specific directories. bincue.c: remove more bogus behavior in mode1/mode2 sector reading. 2004-03-05 rocky * lib/_cdio_bincue.c, lib/_cdio_win32.c, lib/_cdio_win32.h, lib/cdio.c, lib/cdio_private.h, lib/win32ioctl.c: Work on mode1 reading. Remove some of the bogusity in cdio.c and bincue.c win2, now works! 2004-03-05 rocky * doc/doxygen/.cvignore, doc/doxygen/html/.cvsignore: CVS lint. 2004-03-04 rocky * doc/libcdio.texi: Some typos. 2004-03-04 rocky * include/cdio/xa.h: Doxygen addition 2004-03-04 rocky * lib/win32ioctl.c: mode2 reading works on win2k via ioctl (so probaby on WINNT and xp as well. 2004-03-03 rocky * lib/_cdio_win32.c, lib/win32ioctl.c: Long needed start to improve WIN2k native support. 2004-03-02 rocky * configure.ac: Get ready for 0.67 release. 2004-03-01 rocky * lib/Makefile.am: shared library numbers - this time, for sure! 2004-03-01 rocky * NEWS: [no log message] 2004-03-01 rocky * README.libcdio: And note Solaris problems too. 2004-03-01 rocky * README.libcdio: Note that you need to use GNU make. 2004-03-01 rocky * configure.ac: FreeBSD/NetBSD too gets versioned library variables. 2004-03-01 rocky * lib/Makefile.am: Change AGE not CURRENT on libiso9660. 2004-02-29 rocky * test/check_common_fn.in: diff program and opts somehow sneaked in here. 2004-02-29 rocky * src/iso-read.c: Make older C compilers happy. 2004-02-29 rocky * Makefile.am, test/check_common_fn.in, test/check_iso.sh.in: Add iso-read regression test. 2004-02-29 rocky * test/Makefile.am: Need to include copying.iso for ISO 9660 regression image test(s). 2004-02-29 rocky * README.libcdio: Note something about --without-versioned-libs. 2004-02-29 rocky * test/Makefile.am: Comparison file for check_iso.sh 2004-02-29 rocky * configure.ac, test/.cvsignore, test/Makefile.am, test/check_iso.sh.in, test/copying.right: Add test of iso-info program (which means, of course, another test of libiso9660). 2004-02-29 rocky * doc/glossary.texi, doc/libcdio.texi: glossary.texi: add most of the terms used in the doc. libcdio.texi: Add a section for OS drivers. 2004-02-28 rocky * doc/glossary.texi: typo. 2004-02-28 rocky * doc/glossary.texi: More terms. 2004-02-28 rocky * doc/libcdio.texi: Add some info (however meager) regarding cd-info, cd-read, iso-info and iso-read. 2004-02-28 rocky * lib/Makefile.am: libiso9660 has changed - the fs_stat_translate routines added and that packed attribut on XA. Thus we've got to update "current" in libiso9660. 2004-02-28 rocky * src/Makefile.am: Add iso-read to list of binaries in package. 2004-02-28 rocky * configure.ac: If GNU make isn't found, then we should have --without-versioned-libs FreeBSD/NetBSD (but now BSDI) don't use versioned libs. 2004-02-27 rocky * configure.ac: Bug in setting enable_versioned_libs. 2004-02-27 rocky * NEWS: [no log message] 2004-02-27 rocky * NEWS: [no log message] 2004-02-27 rocky * doc/.cvsignore: The documentation has advanced to such a stage that We are now in the realm of more than one info file. 2004-02-27 rocky * README, configure.ac, doc/libcdio.texi, lib/Makefile.am: configure.ac, Makefile.am: don't do library symbol version on BSDis variants libcdio.texi: minor example improvements. 2004-02-26 rocky * doc/libcdio.texi: New section on the purpose which mentions cd-read, iso-read, iso-info. A couple more examples included Nodes for the examples. 2004-02-26 rocky * doc/libcdio.texi: Looked up how to enter an umlaut correctly. 2004-02-26 rocky * lib/_cdio_bincue.c, lib/_cdio_nrg.c: Need to make failure less severe. Especially in light of the ability to scan for devices. 2004-02-26 rocky * lib/_cdio_nrg.c: Bug fix: don't try to free NRG track mapping DS if it wasn't allocated. 2004-02-26 rocky * lib/iso9660_fs.c: Remove a couple of compiler sprintf warnings. 2004-02-26 rocky * NEWS, example/sample7.c, include/cdio/iso9660.h, lib/iso9660_fs.c, src/iso-read.c: libiso9660 stat routines that match level 1 ISO-9600 filenames translating them into Unix-style names (i.e. lowercased letter with version numbers dropped.) 2004-02-25 rocky * Makefile.am: Add hvr's auto-changelog target. 2004-02-25 rocky * src/.cvsignore, src/Makefile.am: Add iso-read program. 2004-02-25 rocky * src/iso-read.c: Add program for extracting files from an ISO-9660 image. (Until we change the iso9660_ifs_stat interface, names of files extracted have to have version numbers, e.g. ;1 after them. 2004-02-25 rocky * README: Update. The iso-read part isn't true yet, but will be (one way or another) by the next release. 2004-02-25 rocky * include/cdio/xa.h: Herbert Valerio Riedel has determined that the alignment problem seen on ARM noticed by Nicolas Boullis will be fixed if this change in order is done. Since it doesn't make things any worse, let's try it. 2004-02-25 rocky * Makefile.am: Include README.libcdio 2004-02-25 rocky * doc/libcdio.texi: Small modifications. 2004-02-25 rocky * doc/glossary.texi: Small additions. 2004-02-25 rocky * configure.ac: Better wording of what happens when libvcdinfo is not around. 2004-02-25 rocky * libpopt.m4: Check for libpopt 1.7 or greater. 2004-02-22 rocky * doc/libcdio.texi: Note SCSI library. 2004-02-22 rocky * README.libcdio: libcdio-specific installation. 2004-02-22 rocky * configure.ac: Give URLs for vcdimager and libcddb when packages are not found or are new enough. 2004-02-21 rocky * configure.ac: We're in 0.67 CVS now. 2004-02-21 rocky * src/iso-info.c: Valgrind lint. Not sure if I'd classify this truly as memory leaks rather than explicit deallocations before terminating. 2004-02-21 rocky * lib/_cdio_stdio.c: Reduce severity of not being able to open a stdio from "error" (unrecoverable) to "warn". 2004-02-21 rocky * lib/_cdio_linux.c: More memory leaks found by valgrind. 2004-02-21 rocky * src/.cvsignore: [no log message] 2004-02-21 rocky * autogen.sh: Create ChangeLog if it doesn't first exist (which it won't the first time around). Change from corresponding vcdimager autogen.sh. 2004-02-21 rocky * .cvsignore, doc/.cvsignore, src/.cvsignore: [no log message] 2004-02-21 rocky * doc/Makefile.am, doc/libcdio.texi: Makefile.am: fix to build from CVS libcdio.texi: title change, add automatically generated date to manual, internal texinfo code cleanup. 2004-02-21 rocky * doc/glossary.texi: Glossary of terms. Some of this culled from vcdimager. 2004-02-21 rocky * cvs2cl_header: Add header for ChangeLog file. 2004-02-21 rocky * cvs2cl_usermap: account to email mapping file for cvs2cl. 2004-02-21 rocky * ChangeLog: ChangeLog is derived from cvs2cl and is now in Makefile.am 2004-02-21 rocky * NEWS: typo. 2004-02-21 rocky * include/cdio/cdio.h: spelling. 2004-02-21 rocky * src/cd-info.c: Add option to list all drives. 2004-02-15 rocky * libcdio.spec.in: Correctons from Manfred Tremmel who I am yet again indebted. 2004-02-14 rocky * libcdio.spec.in: This time, I think it builds. 2004-02-14 rocky * libcdio.spec.in: Wrong abbreviation for September. 2004-02-14 rocky * libcdio.spec.in: Regularize email address. 2004-02-14 rocky * doc/libcdio.texi: Small compile errors. 2004-02-14 rocky * ChangeLog, NEWS: What's shaking. 2004-02-14 rocky * THANKS: Acknowlege what is only right. 2004-02-14 rocky * libcdio.spec.in: Require 0.7.20 of vcdimager. 2004-02-14 rocky * doc/Makefile.am, doc/fdl.texi, doc/gpl.texi: Add GPL info. 2004-02-14 rocky * doc/libcdio.texi: Go over. Add CD-image format, ISO 9660 characters and glossary from vcdimager documentation. Numberous small corrections. 2004-02-13 rocky * NEWS: Note library symbol versioning (from Nicolas Boullis). 2004-02-12 rocky * lib/Makefile.am: code reorganization from Nicolas Boullis. 2004-02-11 rocky * lib/Makefile.am: lib/Makefile.am (Nicolas Boullis): Mostly some cleanup... First, this tries to keep the versioning separated from the rest of the Makefile. I used the "foo := $(foo) bar" syntax rather than "foo += bar" as I think the += is not available on all versions of make. Moreover, I replaced "$(LIBCDIO_LIBS)" with "libcdio.la" as "$(LIBCDIO_LIBS)" is "../lib/libcdio.la". That make a difference if you try to build libiso9660.la while libcdio.la is not available. Make knows how to make libcdio.la but not ../lib/libcdio.la. 2004-02-11 rocky * lib/.cvsignore: Igore library version file. 2004-02-10 rocky * lib/Makefile.am: Versioned library symbols from Nicolas Boullis. Much appreciated. 2004-02-09 rocky * THANKS, lib/Makefile.am: Clean up library versioning. Use LIBADD since as best as I can tell, that's what supposed to be used. Many thanks to Nicolas Boullis. 2004-02-08 rocky * lib/_cdio_win32.c: Pick up prototype for cdio_is_device_win32. 2004-02-08 rocky * configure.ac: Get ready for another release. 2004-02-08 rocky * lib/Makefile.am: libiso9660 needs to have libcdio listed in its load flags for Solaris. 2004-02-08 rocky * lib/Makefile.am, lib/_cdio_bincue.c, src/iso-info.c: Makefile.am: bump release number. iso-info.c: mem leak _cdio_bincue.c: minor formatting change. 2004-02-08 rocky * NEWS: What's new. 2004-02-08 rocky * lib/_cdio_nrg.c: More memory leaks found with valgrind. 2004-02-08 rocky * lib/_cdio_bincue.c: Memory leak found by valgrind. 2004-02-07 rocky * lib/_cdio_bincue.c, lib/_cdio_generic.c, lib/_cdio_nrg.c, lib/_cdio_stdio.c, lib/_cdio_stdio.h, lib/_cdio_stream.c, lib/_cdio_stream.h, lib/cdio_private.h, lib/iso9660_fs.c: More valgrind-found memory leaks. (More to come...) 2004-02-07 rocky * ChangeLog, lib/_cdio_linux.c, lib/cdio.c, src/cd-info.c, src/cd-read.c, src/iso-info.c, src/util.c, src/util.h: Fix some of the memory leaks and uninitialized variables which valgrind notices. 2004-02-07 rocky * lib/wnaspi32.c: Microsoft Windows ASPI code for libcdio. 2004-02-07 rocky * lib/Makefile.am, lib/_cdio_win32.c, lib/wnaspi32.h: Split out much of the ASPI code into wnaspi32.c. 2004-02-05 rocky * lib/_cdio_win32.c, lib/_cdio_win32.h, lib/win32ioctl.c: Move more of IoControl out of _win_32 and into win32ioctl. 2004-02-04 rocky * lib/_cdio_win32.c, lib/_cdio_win32.h, lib/win32ioctl.c: More cleanup. Still sucks. 2004-02-04 rocky * lib/Makefile.am, lib/_cdio_win32.c, lib/_cdio_win32.h, lib/win32ioctl.c: Add better DeviceIocontrol support. It still sucks, but sucks less. 2004-02-04 rocky * example/sample6.c: printf lint for Doz. 2004-02-02 rocky * NEWS: What's up. 2004-02-02 rocky * configure.ac: 0.65's been released. We're now into 0.66 CVS. 2004-02-02 rocky * lib/Makefile.am, lib/wnaspi32.h: Move APSI stuff into a separate file. 2004-02-02 rocky * lib/_cdio_win32.c: Small changes. Bigger changes should follow later. 2004-02-01 rocky * example/sample7.c: More printf lint. 2004-02-01 rocky * example/Makefile.am: libiso9660 depends on libcdio. Cygwin (and perhaps others) then require that libiso9660 be listed in the link order before things that it depends on. 2004-02-01 rocky * src/iso-info.c: ISO Info - prints various information about a ISO 9660 image. 2004-02-01 rocky * lib/_cdio_nrg.c: 2nd try at getting lint messages removed across all architectures. 2004-02-01 rocky * lib/_cdio_nrg.c: remove debug output lint warnings 2004-01-29 rocky * doc/libcdio.texi: Typo. 2004-01-29 rocky * example/README, example/sample6.c, example/sample7.c: Update text commentary for sample6 & sample7. 2004-01-18 rocky * example/.cvsignore: Added yet another sample program. 2004-01-18 rocky * include/cdio/iso9660.h: Don't pack our own iso9660_t. 2004-01-18 rocky * include/cdio/iso9660.h: Move tm struct around so the alignment will be on a word boundary. Do we need GNUC_PACKED here? 2004-01-15 hvr * libpopt.m4: fixed underquoted definition warning 2004-01-10 rocky * test/copying.iso: Sample ISO 9660 image. 2004-01-10 rocky * include/cdio/iso9660.h, lib/iso9660_fs.c, src/util.c: iso-info now does something useful now that readdir routine fixed up for iso images. 2004-01-10 rocky * example/Makefile.am, example/sample6.c, example/sample7.c, include/cdio/iso9660.h, lib/_cdio_stdio.c, lib/_cdio_stdio.h, lib/_cdio_stream.c, lib/_cdio_stream.h, lib/iso9660_fs.c, src/Makefile.am: Add routines to open an ISO-9660 image independent of being part of a CD. 2004-01-09 rocky * lib/_cdio_bincue.c: Remove duplicate assignment 2004-01-03 rocky * lib/_cdio_nrg.c: More guesses as to NRG format. Guess blocksizes, handle some mixed-mode CDs. 2003-12-31 rocky * lib/_cdio_nrg.c: Some code consolidation. 2003-12-31 rocky * lib/_cdio_nrg.c: More Disk-at-once corrections. 2003-12-30 rocky * lib/_cdio_nrg.c: Slightly better disk-at-once and track-at-once parsing. Am able to read a tao mode1 form1 now. 2003-12-28 uid67423 * lib/_cdio_nrg.c: Attempt getting various non-mode2/form2 track modes correct. 2003-12-24 uid67423 * example/sample6.c: add ISO9660 sample program 2003-12-24 uid67423 * example/.cvsignore: [no log message] 2003-12-24 uid67423 * NEWS, example/Makefile.am, example/README: Add ISO9660 sample program. 2003-12-24 uid67423 * configure.ac: Require vcdimager 0.7.20 or greater. Bump libcdio version for last release. 2003-12-24 uid67423 * include/cdio/iso9660.h: Documention in comment bug. 2003-12-03 rocky * configure.ac: Remove extraneous cygwin LIB set. 2003-11-18 rocky * include/cdio/cd_types.h, include/cdio/iso9660.h, include/cdio/types.h, include/cdio/util.h, src/Makefile.am: More documentation changes. Makefile.am: Don't build man pages if not in MAINTAINER mode. 2003-11-17 rocky * doc/Makefile.am, include/cdio/cd_types.h, include/cdio/cdio.h, include/cdio/iso9660.h, include/cdio/logging.h, include/cdio/sector.h, include/cdio/types.h, include/cdio/xa.h: Related to doxygen documentation. 2003-11-17 rocky * include/cdio/version.h.in: Add doxygen comment and CVS Id line. 2003-11-16 rocky * doc/Makefile.am, include/cdio/iso9660.h, lib/iso9660_fs.c, src/cd-info.c: iso9600_stat now has filename inside it. iso9660_fs_readdir now returns a list of iso9660_stat_t's rather than filenames. This should reduce by a small amount the number of CD reads since we store more information in the iso9660_fs_readdir return. However all of this is in preparation for greatly reducing the number of CD reads when picking out segment lsn information. 2003-11-11 rocky * doc/libcdio.texi: libcdio.info was missing a @dircategory and @direntry section. See http://savannah.nongnu.org/bugs/?func=detailbug&bug_id=6470&group_id=3845 Thanks to dweimer for pointing this out and providing a patch. 2003-11-10 rocky * include/cdio/iso9660.h, lib/iso9660_fs.c: Smallish cosmetic changes. Bigger ones to iso9660_fs_readdir will probably occur later... 2003-11-10 rocky * NEWS: [no log message] 2003-11-10 rocky * src/cd-read.c: Allow setting debug level in library for default log handler. 2003-11-09 rocky * src/cd-info.c: Was filling out source_name for a device even when it wasn't. 2003-11-09 rocky * lib/_cdio_nrg.c: Revise info on MTYP - more debugging here too. 2003-11-09 rocky * doc/doxygen/.cvignore: The usual. 2003-11-09 rocky * doc/doxygen/run_doxygen: Program to run doxygen. 2003-11-09 rocky * lib/logging.c, src/cd-info.c: Be able to set/disable default log handler logging. 2003-11-09 rocky * Makefile.am: Add doxygen target. 2003-11-09 rocky * doc/doxygen/Doxyfile: Slightly customized configuration setting for running doxygen. 2003-11-09 rocky * include/cdio/iso9660.h: doxygen changes. 2003-11-05 rocky * include/cdio/cdio.h, include/cdio/iso9660.h, include/cdio/sector.h: update/add More doxygen tagging 2003-11-05 rocky * example/sample3.c, example/sample4.c, include/cdio/cd_types.h, lib/cd_types.c, lib/cdio.c, src/cd-info.c: cdio_analysis -> cdio_iso_analysis 2003-11-04 rocky * include/cdio/cd_types.h, include/cdio/cdio.h, include/cdio/logging.h: doxygen changes. 2003-11-04 rocky * include/cdio/cd_types.h, include/cdio/iso9660.h, include/cdio/logging.h, lib/logging.c: Start to document using doxygen. 2003-11-04 rocky * lib/_cdio_bincue.c: Got return value on _cdio_audio_sectors backwards. 2003-10-28 rocky * configure.ac, doc/libcdio.texi, include/cdio/iso9660.h, src/util.c: configure.ac: changes suggested by Karl Berry (karl@freefriends.org) which may make work for autoconf 1.7.8 libcdio.texi: remove colophon and correct copyright notice iso9660.h: trivial comment addition util.c: Correct copyright line. 2003-10-20 rocky * lib/_cdio_win32.c: Retry YellowMode2 if XA fails - but I think we need a better overall method. 2003-10-20 rocky * src/cd-read.c: Don't print blocks if read failed. 2003-10-19 rocky * configure.ac: Life goes on. Bump version number. 2003-10-18 rocky * lib/_cdio_win32.c: More WIN32 fixes. 2003-10-18 rocky * lib/_cdio_win32.c: More fixes on non ASPI side. 2003-10-17 rocky * lib/_cdio_win32.c: Track format's if no ASPI are probably close. Reading probably closer to correct. 2003-10-16 rocky * src/cd-read.c: Typo. 2003-10-15 rocky * NEWS: [no log message] 2003-10-15 rocky * lib/_cdio_win32.c: Some of the many necessary fixes needed to make Win32 handling more complete. Some bugs remain (and will so until after the release). 2003-10-15 rocky * src/cd-read.c: [no log message] 2003-10-15 rocky * src/cd-info.c, src/cd-read.c, test/cdda.right, test/check_opts2.right, test/check_opts3.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right, test/isofs-m1.right, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/vcd_demo.right, test/vcd_demo_vcdinfo.right, test/videocd.right: Show green status for each track. cd-info.c: above + fewer assertions cd-read.c: direction we'll go when after release. 2003-10-14 rocky * lib/_cdio_sunos.c: Back off some of the modularization until we figure out what's gone wrong. 2003-10-13 rocky * lib/_cdio_osx.c: Compilation bugs. 2003-10-13 rocky * configure.ac: The real release. 2003-10-13 rocky * ChangeLog: [no log message] 2003-10-08 rocky * include/cdio/sector.h, lib/_cdio_osx.c: OSX fixups and #define bugs from thedj. 2003-10-07 rocky * lib/_cdio_nrg.c: Detect Audio CDs (probably). 2003-10-06 rocky * lib/cd_types.c, src/cd-info.c, test/check_cue.sh.in, test/check_nrg.sh.in, test/check_opts.sh: cd_types: sector 0 rarely needs to be read, and when it doesn't, it's not an error if it can't be read cd-info: give more info by default - source location and driver. test/*: as a result of cd-info changes need now to pass option --quiet. 2003-10-05 rocky * lib/_cdio_osx.c: Get Media Catalog Number - courtesy of thedj! 2003-10-05 rocky * configure.ac: Accept more freebsd versions. 2003-10-05 rocky * include/cdio/logging.h, lib/_cdio_osx.c, lib/logging.c: Default logger now allows level to be set and we use a reasonable setting, e.g. no DEBUG 2003-10-04 rocky * include/cdio/cdio.h, lib/cdio.c: Add OSX device scanning. 2003-10-04 rocky * lib/cdio.c: Clean up comment. 2003-10-04 rocky * lib/cdio.c: A better fix by Gildas Bazin. 2003-10-04 rocky * lib/cdio.c: Check on open that we didn't hit an error. 2003-10-04 rocky * lib/_cdio_osx.c: Wrong define. Thanks thedj! 2003-10-04 rocky * configure.ac: Back to 2.52 for our OSX users. 2003-10-04 rocky * configure.ac: Force vcdimager 0.7.19 to be used because that uses iso9660 and an earlier one will cause our use of iso9660 to fail. Is there a better way to do this? 2003-10-03 rocky * libcdio.spec.in: Update Spec file. 2003-10-03 rocky * lib/_cdio_bsdi_old.c: This shouldn't have been in CVS. 2003-10-03 rocky * lib/_cdio_bsdi.c: Small BSDI fix from Steve Schultz 2003-10-03 rocky * NEWS: [no log message] 2003-10-03 rocky * example/sample1.c, example/sample3.c: Practice more defensive programming. 2003-10-03 rocky * lib/_cdio_nrg.c, lib/_cdio_stream.c: Abort less often - just report an error. 2003-10-03 rocky * configure.ac, include/cdio/cdio.h, lib/_cdio_bincue.c, lib/_cdio_freebsd.c: FreeBSD fixes mostlyh. 2003-10-03 rocky * lib/_cdio_freebsd.c: Closer.... 2003-10-03 rocky * lib/_cdio_bsdi.c, lib/_cdio_freebsd.c: OS fixes. 2003-10-03 rocky * lib/_cdio_bsdi.c: [no log message] 2003-10-03 rocky * lib/_cdio_bsdi.c: Cosmetic changes to Make it look more like the others. 2003-10-03 rocky * lib/_cdio_sunos.c: Need to provide get_devices when not compiling for Solaris too. 2003-10-03 rocky * test/.cvsignore: [no log message] 2003-10-03 rocky * NEWS, include/cdio/cdio.h, lib/_cdio_bincue.c, lib/cdio.c: cdio.{c,h}: update initializations for get_devices. 2003-10-03 rocky * lib/_cdio_sunos.c: Add Solaris get_devices. 2003-10-03 rocky * lib/_cdio_bsdi.c: BSDI fixes. 2003-10-03 rocky * example/sample4.c: Lint found by BSDI. 2003-10-03 rocky * src/cd-read.c, test/testdefault.c: Lint that BSDI caught. 2003-10-03 rocky * lib/_cdio_linux.c: Use bool where appropriate. 2003-10-03 rocky * include/cdio/cdio.h, lib/_cdio_win32.c: Add get_devices. 2003-10-03 rocky * test/Makefile.am: Remove testdefault until I can figure out how to make work via make distcheck. 2003-10-03 rocky * example/sample1.c: More platform independent and no less complex. 2003-10-02 rocky * example/sample5.c, include/cdio/cd_types.h, include/cdio/cdio.h, lib/_cdio_bincue.c, lib/_cdio_bsdi.c, lib/cdio.c, src/cd-read.c, test/testdefault.c: BSDI Fixes. 2003-10-01 rocky * test/testdefault.c: Regression test for cdio_get_devices, cdio_get_devices_with_cap(), and cdio_free_device_list(). 2003-09-30 rocky * include/cdio/cdio.h, lib/_cdio_bincue.c, lib/_cdio_linux.c, lib/_cdio_nrg.c, lib/cdio.c, lib/cdio_private.h, test/check_cue.sh.in, test/check_nrg.sh.in: Fill out autoscan devices/images to image drivers. API is probably closer to more complete. 2003-09-29 rocky * example/.cvsignore: [no log message] 2003-09-29 rocky * configure.ac, example/.cvsignore, example/sample5.c, include/cdio/cdio.h, lib/_cdio_linux.c, lib/_cdio_nrg.c, lib/cdio.c, lib/cdio_private.h, test/Makefile.am, test/check_cue.sh.in, test/vcd_demo_vcdinfo.right: Closer to autoscan working better. globbing for *.nrg in NRG. Will probably do likewise in bin/cue when NRG is working. 2003-09-28 rocky * example/Makefile, test/Makefile.am: Misc lint. 2003-09-28 rocky * Makefile.am, configure.ac, example/.cvsignore, example/Makefile, example/Makefile.am, example/sample1.c, example/sample2.c, example/sample3.c, example/sample4.c, example/sample5.c: Use automake to build sample programs. 2003-09-28 rocky * example/README: typo. 2003-09-28 rocky * NEWS: [no log message] 2003-09-28 rocky * NEWS: [no log message] 2003-09-28 rocky * example/Makefile, example/sample5.c, include/cdio/cd_types.h, include/cdio/cdio.h, include/cdio/types.h, lib/_cdio_generic.c, lib/_cdio_linux.c, lib/cd_types.c, lib/cdio.c, lib/cdio_private.h, src/cd-info.c: First-cut to auto-scan for device capabilities 2003-09-28 rocky * src/cd-info.c: Wasn't respecting --no-vcd, Or vcd-info when SVCD or CVD. 2003-09-28 rocky * test/monvoisin.right, test/vcd_demo.right: Wasn't respecting --no-vcd 2003-09-28 rocky * test/cdda.cue, test/cdda.right, test/check_opts0.right, test/check_opts1.right, test/check_opts2.right, test/check_opts3.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right, test/isofs-m1.cue, test/isofs-m1.right: Not sure if MCN can be on a CD-DA so move it to iso 9660 image. 2003-09-28 rocky * include/cdio/cdio.h, lib/_cdio_bincue.c, test/cdda.cue, test/cdda.right: Impliment MCN for bincue. 2003-09-27 rocky * configure.ac, include/cdio/cdio.h, lib/_cdio_bincue.c, lib/_cdio_linux.c, lib/_cdio_sunos.c, src/cd-info.c, src/cd-read.c, test/cdda.right, test/check_opts0.right, test/check_opts1.right, test/check_opts2.right, test/check_opts3.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right, test/isofs-m1.right, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/vcd_demo.right, test/videocd.right: Replace techno-wizard message "Get MCN" with more layman "Media Catalog Number" 2003-09-26 rocky * lib/_cdio_sunos.c: read_audio_sectors done better. 2003-09-25 rocky * src/cdinfo-linux.c: Fix up so this works again. 2003-09-25 rocky * include/cdio/cdio.h, lib/_cdio_bincue.c, lib/_cdio_bsdi.c, lib/_cdio_freebsd.c, lib/_cdio_linux.c, lib/_cdio_nrg.c, lib/_cdio_osx.c, lib/_cdio_win32.c, lib/cdio.c, lib/cdio_private.h, src/cd-info.c, test/cdda.right, test/check_opts0.right, test/check_opts1.right, test/check_opts2.right, test/check_opts3.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right, test/isofs-m1.right, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/vcd_demo.right, test/videocd.right: Add get_mcn, although it really only works on GNU/Linux right now. 2003-09-22 rocky * configure.ac: Add manpage generation. 2003-09-22 rocky * src/.cvsignore: [no log message] 2003-09-22 rocky * src/Makefile.am, src/cd-read.c: More flexibility: allow any two of start, end, count. If only one or none are given, we'll supply default values. 2003-09-21 rocky * src/cd-read.c, test/check_cd_read.sh, test/isofs-m1-read.right: Make cd-read more user-friendly and do more things: Add start/end/count options for cd-read, Input argument doesn't need a specifier (-i or --cue-file) now. block sizes for various formats have been set correctly now. 2003-09-21 rocky * configure.ac, lib/iso9660.c: Test for presence of gmtoff for braindead cygwin 2003-09-21 rocky * lib/_cdio_win32.c: Compilation problems. 2003-09-21 rocky * src/cd-info.c: More tidy. 2003-09-21 rocky * src/Makefile.am, src/cd-info.c, src/cd-read.c, src/util.c, src/util.h: Break out common standalone routines from cd-info and cd-read. 2003-09-21 rocky * NEWS, src/cd-info.c, src/cd-read.c, test/check_cd_read.sh, test/isofs-m1-read.right: Add options processing to cd-read. Had not very useful output on mode1 format1 test. 2003-09-21 rocky * include/cdio/iso9660.h: [no log message] 2003-09-21 rocky * include/cdio/iso9660.h, include/cdio/xa.h, lib/iso9660.c, lib/iso9660_fs.c, lib/xa.c, test/monvoisin.right, test/svcdgs.right, test/testiso9660.c: More ISO 9660 date cleanup. Hopefully cleaner structure definitions and more function documentation. 2003-09-20 rocky * lib/iso9660.c: Bug in iso9660_set_ltime. Probably snprintf putting in \0 at the end of each string messed up internal format (which doesn't have the \0's. 2003-09-20 rocky * include/cdio/cdio.h, lib/_cdio_bincue.c, lib/_cdio_bsdi.c, lib/_cdio_linux.c, lib/_cdio_nrg.c, lib/_cdio_osx.c, lib/_cdio_sunos.c, lib/_cdio_win32.c, lib/cdio.c, lib/cdio_private.h, lib/scsi_mmc.h: Change interface for read_audio_sectors. 2003-09-20 rocky * include/cdio/iso9660.h, lib/iso9660.c: Add "long" date setting routine and more precise definitions there as well. 2003-09-20 rocky * include/cdio/iso9660.h, lib/iso9660.c, lib/iso9660_fs.c: More precise ISO9660 date definition 2003-09-20 rocky * test/Makefile.am, test/check_cd_read.sh, test/check_cue.sh.in, test/check_nrg.sh.in, test/check_opts.sh: incorrect usage of cd test/ if ! test -> if test ! 2003-09-19 rocky * configure.ac: {v,}cdinfo -> {v,}cd-info. Configure for cd-read. Test for memset and bzero. 2003-09-19 rocky * Makefile.am: Hack to make sure check_nrg.sh and check_cue.sh are executable. 2003-09-19 rocky * lib/_cdio_linux.c: Clean up mmc code a bit 2003-09-19 rocky * lib/scsi_mmc.h: Add some of the read types and macro to set it 2003-09-19 rocky * src/cd-read.c: Adjust block length for mode1 read 2003-09-19 rocky * test/check_cd_read.sh, test/isofs-m1-read.right: add mode1 test 2003-09-19 rocky * src/cd-read.c: Silence cdio output 2003-09-19 rocky * test/Makefile.am, test/cdda-read.right, test/check_cd_read.sh, test/check_common_fn.in, test/check_cue.sh.in: Add CD-DA reading test via cd-read; Add GPL 2003-09-18 rocky * lib/_cdio_bincue.c: Use macro definition of bzero 2003-09-18 rocky * lib/_cdio_bincue.c: Tidy up #includes a bit 2003-09-18 rocky * lib/cdio_assert.h, lib/cdio_private.h: Check and include config.h so includer's don't. 2003-09-18 rocky * lib/_cdio_bincue.c: Adjustment for reading audio cd. Also break out MMC stuff a little bit better. 2003-09-18 rocky * lib/_cdio_linux.c, lib/scsi_mmc.h: Put more into scsi_mmc.h 2003-09-17 rocky * src/.cvsignore: [no log message] 2003-09-17 rocky * lib/_cdio_linux.c: Don't turn a LSN into an LBA when reading audio. 2003-09-17 rocky * example/Makefile, example/dbg_read.c: Moved into src/cd-read. 2003-09-17 rocky * src/Makefile.am, src/cd-read.c: Add cd-read.c for debugging CD reading problems. 2003-09-17 rocky * example/dbg_read.c: Do it! 2003-09-17 rocky * test/Makefile.am: Use a bigger hammer to get automess to what really should be a simple simple thing - specify mode and permissions of the files it creates. 2003-09-15 rocky * configure.ac: Test for OSX presense of IOKit and CoreFoundation and add to list of libraries. Change format of drivers reported. 2003-09-15 rocky * lib/_cdio_osx.c: More lba, lsn confusion. 2003-09-14 rocky * configure.ac, lib/_cdio_osx.c: Changes from Derk-Jan Hartman for OSX support. 2003-09-14 rocky * lib/_cdio_osx.c: Loop went the wrong way. 2003-09-14 rocky * lib/_cdio_osx.c: Go back to 0xa2 for "leadout" 2003-09-14 rocky * lib/cdio.c: Bug if we had a get_track_lba but no get_track_msf. Guard against that. 2003-09-14 rocky * lib/scsi_mmc.h: A place right now for common SCSI MMC (multimedia command). 2003-09-14 rocky * lib/Makefile.am, lib/_cdio_linux.c, lib/_cdio_sunos.c, lib/_cdio_win32.c, src/cd-info.c, test/Makefile.am: Use new common scsi_mmc.h. 2003-09-14 rocky * configure.ac, test/Makefile.am: Finally get regression testing to work with expected failure and on cygwin. 2003-09-14 rocky * lib/_cdio_nrg.c, lib/cd_types.c: More I/O format lint. 2003-09-14 rocky * lib/iso9660_fs.c: More I/O format lint. 2003-09-14 rocky * lib/_cdio_bincue.c: I/O lint. 2003-09-14 rocky * test/Makefile.am: Reuse noinst_PROGRAMS variable. 2003-09-14 rocky * test/check_cue.sh.in: The program is now called cd-info. 2003-09-14 rocky * lib/_cdio_osx.c: Change default device, use normal leadout track, fix doc typo(s). 2003-09-13 rocky * configure.ac, include/cdio/cdio.h, include/cdio/sector.h, lib/Makefile.am, lib/_cdio_osx.c, lib/cdio.c: Rudimentary beginnings for Darwin OS X CD support. 2003-09-11 rocky * lib/sector.c: _vcd_lba_to_msf_str -> cdio_lba_to_msf_str; 2003-09-10 rocky * include/cdio/iso9660.h, lib/iso9660.c: Documentation update 2003-09-10 rocky * include/cdio/iso9660.h: Allow C++ to call. 2003-09-10 rocky * libcdio.spec.in: small fixes really from Frantisek Dvorak 2003-09-07 rocky * include/cdio/iso9660.h, lib/iso9660.c, lib/iso9660_fs.c: add parameters to set times on directory entries, pvd's. 2003-09-07 rocky * test/cdda.right, test/check_cue.sh.in, test/isofs-m1.right, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/vcd_demo.right, test/videocd.right: Output time format change in cd-info. Hopefully the last one. 2003-09-07 rocky * ChangeLog, NEWS: [no log message] 2003-09-07 rocky * src/cd-info.c: Yet another time format output change on listing. Hopefully the last one 2003-09-07 rocky * configure.ac: Change version to note another CVS version 2003-09-07 rocky * test/check_common_fn.in: Make sure to set TZ and LC_TIME so we get predictable results 2003-09-06 rocky * test/isofs-m1.right, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/vcd_demo.right, test/videocd.right: Update for normal filenames from the ISO-9660 names. 2003-09-06 rocky * include/cdio/iso9660.h, lib/iso9660.c, lib/iso9660_fs.c, lib/iso9660_private.h, src/cd-info.c: Add iso9660_name_translate() to remove ISO-name cruft. Document iso9660_fs_stat(). 2003-09-06 rocky * include/cdio/types.h: Small comment change. 2003-09-05 rocky * include/cdio/cdio.h, include/cdio/iso9660.h, lib/cdio.c, lib/iso9660_fs.c: Move ISO-9660 lsn-finding routine from vcdimager here. More prototypes are "const CdIo *". 2003-09-01 rocky * lib/_cdio_bincue.c: Test for NULL binfile - as odd as this sounds, it could cause core dump if no CD loaded. 2003-09-01 rocky * configure.ac: Remove -Wsign-promo which is not relevant for C programs. 2003-09-01 rocky * src/cd-info.c: Always have no-vcdinfo option. 2003-09-01 rocky * libcdio.spec.in: Translation kindly and graceously provided by Manfred Tremmel 2003-09-01 rocky * include/cdio/iso9660.h: Did packing incorrectly on pvd_t. 2003-09-01 rocky * lib/_cdio_bsdi.c, lib/_cdio_freebsd.c, lib/_cdio_linux.c, lib/_cdio_sunos.c: Note TOC's initialized so we don't reread. Add some int's to unsigned. 2003-09-01 rocky * include/cdio/iso9660.h, lib/iso9660.c: Start to document library routines. An "int" was changed to the more correct "bool". 2003-09-01 rocky * test/.cvsignore: [no log message] 2003-09-01 rocky * test/Makefile.am, test/testiso9660.c: Add minimal test of new iso9660 library. 2003-09-01 rocky * include/cdio/iso9660.h, include/cdio/xa.h, lib/iso9660_private.h: Merge in and tidy up with mkisofs's iso9660.h. If that is correct (and it probably is), there were erroneous field definitions. 2003-09-01 rocky * configure.ac: Wrong AC_SUBST variable for CDDB. 2003-09-01 rocky * libcdio.spec.in: Add commentary about cd-info. Update dependencies to latest versions of packages which is really needed. 2003-09-01 rocky * src/cd-info.c: Have to rely more on other XA test since track indicator seems faulty. Missing "break;" in switch caused us to not print iso9660 filesystems. 2003-09-01 rocky * test/check_cue.sh.in, test/check_nrg.sh.in: Was setting options all wrong and using wrong CDDB subtitution variable. As Bullwinkle says, "This time, for sure!" 2003-09-01 rocky * lib/_cdio_linux.c: Wasn't noting that we read TOC so we were re-reading it every time. 2003-08-31 rocky * src/cd-info.c: Deal with gcc warning. Think it was spurious, but just in case. 2003-08-31 rocky * ChangeLog, Makefile.am, THANKS, libcdio.spec.in: Fixes from Frantisek Dvorak 2003-08-31 rocky * NEWS: [no log message] 2003-08-31 rocky * lib/iso9660_fs.c, src/cd-info.c, test/check_cue.sh.in, test/isofs-m1.right: Make mode1 format filesystem print work. 2003-08-31 rocky * include/cdio/cdio.h, include/cdio/iso9660.h, include/cdio/sector.h, lib/_cdio_bincue.c, lib/cd_types.c, lib/cdio.c, lib/iso9660_fs.c, src/cd-info.c: Straighten out mode1 vs mode2 mess. 2003-08-31 rocky * include/cdio/iso9660.h: Define EMPTY_ARRAY_SIZE if it is not defined previously. 2003-08-31 rocky * include/cdio/iso9660.h, include/cdio/xa.h, lib/iso9660_fs.c, lib/xa.c: Final tidy up. 2003-08-31 rocky * lib/iso9660_fs.h: Most of this is public now. 2003-08-31 rocky * lib/xa.c, test/check_sizeof.c: [no log message] 2003-08-31 rocky * include/cdio/iso9660.h, include/cdio/xa.h, lib/Makefile.am, lib/iso9660_fs.c, lib/xa.c, lib/xa.h, src/cd-info.c, test/cdda.right, test/check_cue.sh.in, test/check_nrg.sh.in, test/monvoisin.right, test/vcd_demo.right: I think I have the XA encapsulation down so that it will work in vcdimager (and others). 2003-08-31 rocky * configure.ac: Rely more on PKG_INFO and remove header checks which didn't test for --enable-xxx. 2003-08-31 rocky * include/cdio/Makefile.am, include/cdio/iso9660.h, include/cdio/xa.h: Separate and make XA information public. 2003-08-31 rocky * include/cdio/iso9660.h, lib/Makefile.am, lib/iso9660_fs.c, lib/iso9660_fs.h, lib/xa.h, src/Makefile.am, src/cd-info.c, test/check_cue.sh.in, test/check_nrg.sh.in, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/vcd_demo.right, test/videocd.right: Move over reading ISO-9660 filesytems from vcdimager. Handling of XA attributes also moved over. 2003-08-31 rocky * include/cdio/iso9660.h, lib/iso9660.c, lib/iso9660_private.h, test/check_sizeof.c: Expose primary volume descriptor (pvd) and directory structures since they *are* part of the spec. and be done with it. 2003-08-31 rocky * src/cd-info.c: A tad closer to being able to print ISO-9660 filesystems 2003-08-31 rocky * include/cdio/iso9660.h, lib/cd_types.c, lib/iso9660_private.h: cd_types: tighter use of ISO #defines. Make some of the private ones public to reduce "private" use in vcdimager. 2003-08-31 rocky * include/cdio/iso9660.h, lib/iso9660.c, src/cd-info.c: iso_directory_record_t -> iso9660_dir_t 2003-08-31 rocky * include/cdio/iso9660.h, lib/iso9660.c: pvd_t -> iso9660_pvd_t 2003-08-31 rocky * include/cdio/iso9660.h, lib/iso9660.c: two routines are buggy. Back out until they've been fixed. 2003-08-31 rocky * configure.ac, include/cdio/iso9660.h, include/cdio/types.h, lib/iso9660.c: Opaque type declaration for iso9660 moved into well iso9660.h (from cdio/types.h). Opaque type for iso_directory_record defined and access routines added to libiso9660. 2003-08-31 rocky * autogen.sh: Minor changes. 2003-08-30 rocky * NEWS: [no log message] 2003-08-29 rocky * test/check_cue.sh.in, test/check_nrg.sh.in, test/check_opts.sh: Invalid substituiton variable. Allow cd-info tests to be skipped. 2003-08-29 rocky * src/cd-info.c: Declarations have to all be together for gcc < 3.0 2003-08-29 rocky * lib/iso9660_private.h: Wrong include. We've moved from vcdimager to cdio. 2003-08-29 rocky * Makefile.am: Add sample3 & 4 2003-08-29 rocky * ChangeLog, NEWS: [no log message] 2003-08-17 rocky * NEWS, example/.cvsignore, example/sample3.c: [no log message] 2003-08-17 rocky * example/Makefile, example/sample4.c: Yet another example. 2003-08-17 rocky * test/.cvsignore, test/Makefile.am, test/check_sizeof.c: Makefile.am: add check_sizeof and testischar 2003-08-17 rocky * libiso9660.pc.in: Remove dependence on vcd. We also don't use glib just yet. 2003-08-17 rocky * .cvsignore, Makefile.am, configure.ac, include/cdio/Makefile.am, include/cdio/iso9660.h, include/cdio/types.h, lib/Makefile.am, lib/cd_types.c, lib/iso9660.c, lib/iso9660_private.h, libiso9660.pc.in, test/.cvsignore, test/Makefile.am, test/testassert.c, test/testischar.c: Add iso9660 library and regression test. Will be deleted from vcdimager-cdio branch. cd_types.c: forgot to add previously. 2003-08-16 rocky * example/sample3.c: Typo in comment. 2003-08-16 rocky * configure.ac: Make sure we have the latest vcdinfo 2003-08-16 rocky * example/Makefile, example/sample3.c, src/cd-info.c: Add simple program to show CD-type and filesystem determination. cd-info.c: minor code cleanups. 2003-08-16 rocky * example/.cvsignore: Add sample3 2003-08-16 rocky * test/check_cue.sh: Is derived from check_cue.sh.in 2003-08-16 rocky * include/cdio/Makefile.am, include/cdio/cd_types.h, lib/Makefile.am, src/Makefile.am, src/analyze.c, src/analyze.h, src/cd-info.c, test/check_cue.sh: Move routine to analyze/guess what type of CD image we have got into the library. 2003-08-16 rocky * src/Makefile.am: Oooops--test version of Makefile.am got checked in. Revert it. 2003-08-16 rocky * src/Makefile.am, src/analyze.c, src/analyze.h, src/cd-info.c, test/check_cue.sh, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/vcd_demo.right, test/videocd.right: Fix bug in storing iso_9660 volume sector count. cd-info.c reduce global variables. Regression tests output was incorrect with this long-standing bug. 2003-08-14 rocky * src/Makefile.am, src/analyze.c, src/analyze.h, src/cd-info.c: First cut at separating disc analysis part from standalone source. More modularity is needed. 2003-08-13 rocky * src/cd-info.c: Messed up on SVCD test. 2003-08-13 rocky * src/cd-info.c: Set VCD log handler. 2003-08-11 rocky * lib/_cdio_win32.c: A simple stupid mistake. Not sure why it wasn't caught before. 2003-08-10 rocky * test/check_cue.sh: VCD tests when available. 2003-08-10 rocky * doc/.cvsignore, example/.cvsignore: lint. 2003-08-10 rocky * configure.ac, src/Makefile.am, src/cd-info.c: Changes brought about by recent vcdimager-cdio changes. - We use vcdinfo_t ** on vcdinfo_open. - Now make use of pkg-config for vcdimager in configure. - Remove reference to info_private.h. 2003-08-09 rocky * ChangeLog: [no log message] 2003-08-09 rocky * ChangeLog, Makefile.am, doc/Makefile.am, example/sample1.c, example/sample2.c: *Makefile/am Get sample documentation is in distribution. example/*.c: remove trailing blanks at end of file. 2003-08-09 rocky * NEWS: [no log message] 2003-08-06 rocky * libcdio.spec.in: - fixes really Manfred Tremmel at http://www.iiv.de/schwinde/buerger/tremmel/ 2003-08-03 rocky * doc/libcdio.texi: Fill out how to use: add example programs 1 and 2. 2003-08-03 rocky * example/sample2.c: Sample program to - show what driver is automatically selected - what device will be used for that - list all the drivers that exist showing whether they are available or not 2003-08-02 rocky * NEWS: [no log message] 2003-08-02 rocky * Makefile.am: Remove that directory in EXTRA_DIST! 2003-08-02 rocky * example/README, example/sample1.c: Add a sample program. More will follow later... 2003-08-02 rocky * doc/libcdio.texi: typo. 2003-07-30 rocky * doc/libcdio.texi: More verbiage. Alas not on how to use *this* package, but we are getting there if by virtue of not being able to postpone it too much more. 2003-07-28 rocky * doc/libcdio.texi: Small additions and edits. 2003-07-28 rocky * doc/.cvsignore: [no log message] 2003-07-28 rocky * Makefile.am, configure.ac, doc/Makefile.am, doc/libcdio.texi: First feeble attempt at documentation. 2003-07-27 rocky * include/cdio/cdio.h, lib/_cdio_bincue.c, lib/_cdio_linux.c, lib/_cdio_nrg.c, lib/_cdio_sunos.c: Small comment change. 2003-07-12 rocky * parse/Makefile, parse/test/runall: Add simple regression testing driver. 2003-06-22 rocky * ChangeLog, include/cdio/cdio.h, lib/cdio.c, lib/cdio_private.h, src/cd-info.c: MIN_DRIVER, MIN_DEVICE_DRIVER, MAX_DEVICE_DRIVER -> CDIO_... Add CDIO_MAX_DRIVER (distinct from CDIO_MAX_DEVICE_DRIVER cdio.c (cdio_open): was only scanning devices. Change to scan disk image files as well. 2003-06-16 rocky * NEWS: [no log message] 2003-06-13 rocky * configure.ac: Order of libraries is important in cygwin (and perhaps others): -lvcdinfo comes before -lvcd. 2003-06-13 rocky * src/cd-info.c: Now use cdio enum rather than vcd enum for unknown driver type. 2003-06-12 rocky * lib/_cdio_generic.c, lib/_cdio_linux.c, lib/cdio_private.h, src/cd-info.c: Make GNU/Linux smarter about finding a default device -- code sort of from SDL. Better error checking all around. 2003-06-12 rocky * lib/_cdio_win32.c: Pedantic change: subroutine name is probably better. 2003-06-11 rocky * test/.cvsignore: [no log message] 2003-06-11 rocky * include/cdio/cdio.h, lib/cdio.c, src/Makefile.am: Enumeration had grew but hadn't changed string array accordingly. 2003-06-11 rocky * lib/_cdio_win32.c: Bug fixes for NT-derived systems 2003-06-10 rocky * configure.ac: It's '=' not '==' 2003-06-08 rocky * configure.ac, test/check_common_fn.in: Better way to deal with diff vs. cmp and diff options. 2003-06-08 rocky * configure.ac, test/check_common_fn, test/check_common_fn.in: Use diff rather than cmp if possible. Also if possible do a unified diff and for M$DOG strip whitespace for the \r\n vs \n differences. 2003-06-07 rocky * src/cd-info.c: Reverting change (for now). 2003-06-07 rocky * src/cd-info.c: Is this right? 2003-06-07 rocky * lib/_cdio_win32.c: More bugs. By far not the last of them though.... 2003-06-07 rocky * include/cdio/cdio.h, lib/_cdio_win32.c, lib/cdio.c: With M$ we can no longer assume we can open a fd ant it will read properly. Add yellow-mode reads interface. There's lots of cleanup to do... 2003-06-07 rocky * test/cdda.right, test/check_common_fn, test/check_opts0.right, test/check_opts1.right, test/check_opts2.right, test/check_opts3.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right, test/isofs-m1.right, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/vcd_demo.right, test/videocd.right: Remvoe headers. Run with --no-header now. 2003-06-07 rocky * src/cd-info.c: Add option to nuke header for regression tests. With M$ can no longer assume file descriptors do the right thing. Have pay more attention to track formats. 2003-06-07 rocky * include/cdio/cdio.h, lib/_cdio_win32.c, lib/cdio.c: More MinGW things. Need generic routine for determining if a string is a device 2003-06-07 rocky * lib/_cdio_generic.c: Add generic routine to determine if a string refers to a device or not. 2003-06-07 rocky * lib/cdio_private.h: Add customized routines for determining if whether a string refers to a device or not. 2003-06-07 rocky * lib/_cdio_win32.c: First inkling of this actually working. 2003-06-07 rocky * include/cdio/types.h, lib/_cdio_win32.c: More MinGW fixes. 2003-06-07 rocky * src/cd-info.c: Show default device on version command. Don't put /dev in front of device name if win32. 2003-06-07 rocky * configure.ac, lib/_cdio_win32.c, src/cd-info.c: More MinGW fixes. 2003-06-07 rocky * configure.ac, src/cd-info.c: cygwin/mingw improvements cd-info: list drivers and exit when --version requested. 2003-06-07 rocky * include/cdio/cdio.h, lib/cdio.c: Add access routine to return driver string 2003-06-01 rocky * configure.ac, src/Makefile.am, src/cd-info.c: Require libcddb 0.9.4 or nothing at all. We now allow: - setting cache directory - disabling caching altogther - setting timeout on CDDB network operations - setting email address reported to CDDB server - setting name of CDDB server - printing/suppressing messages from CDDB 2003-05-30 rocky * test/check_common_fn: report name of cd-info program more accurately and precisely 2003-05-30 rocky * lib/_cdio_generic.c: Not everyone has sys/ioctl.h. 2003-05-27 rocky * lib/_cdio_freebsd.c: Another holdover from constants that were renamed. 2003-05-27 rocky * configure.ac, include/cdio/cdio.h, include/cdio/types.h, lib/Makefile.am, lib/_cdio_win32.c, lib/cdio.c, parse/.cvsignore: Closer to having WIN32 CD-ROM support 2003-05-27 rocky * lib/_cdio_freebsd.c: Miscellaneous constant changes and typos 2003-05-26 rocky * include/cdio/sector.h: more pedantic types (which in fact match the implimentation). 2003-05-25 rocky * lib/_cdio_freebsd.c: Another small comment correction 2003-05-25 rocky * lib/_cdio_freebsd.c: small eject comment correction 2003-05-24 rocky * src/cd-info.c: Revert version number change since I'm not prepared to change the regression test numbers. 2003-05-24 rocky * lib/cdio_private.h: Add field for and save driver id used. 2003-05-24 rocky * src/cd-info.c: Print out driver selected. 2003-05-24 rocky * lib/cdio.c: Add cdio_get_driver_name: routine to list name of driver selected. 2003-05-24 rocky * include/cdio/cdio.h: Add cdio_get_driver_name: routine to return driver selected. 2003-05-20 rocky * ChangeLog: [no log message] 2003-05-20 rocky * test/videocd.nrg: Test NRG file. 2003-05-20 rocky * configure.ac: Solaris needs -lnsl and -lgethostbyname for libcddb 2003-05-20 rocky * lib/_cdio_bincue.c: Wrong name: was testing uninit variable. 2003-05-20 rocky * configure.ac: Get ready for version 0.6 2003-05-20 rocky * NEWS: [no log message] 2003-05-18 rocky * ChangeLog, NEWS: [no log message] 2003-05-18 rocky * test/check_cue.sh.in: Add a test using --bin 2003-05-18 rocky * lib/_cdio_bincue.c: Wasn't handling bin correctly. 2003-05-18 rocky * TODO: [no log message] 2003-05-18 rocky * include/cdio/cdio.h, lib/_cdio_bincue.c, lib/cdio.c: Add routine to open check for bin file (cdio_is_binfile). Code simplified a little. 2003-05-17 rocky * ChangeLog, NEWS: [no log message] 2003-05-17 rocky * libcdio.pc.in: We don't really use glib-2.0 for now. BSDI test box doesn't have. 2003-05-16 rocky * test/check_nrg.sh.in: BSDI doesn't handle skipped tests (exit 77) properly. I'd rather switch than fight. 2003-05-16 rocky * lib/cdio.c: Wasn't nulling correctly. Eject test faulty too. 2003-05-16 rocky * include/cdio/cdio.h, lib/_cdio_bsdi.c, lib/_cdio_freebsd.c, lib/_cdio_linux.c, lib/_cdio_sunos.c, lib/cdio.c, parse/Makefile: Bug in eject: need to close internal file descriptor before ejecting. eject interface now nulls cdio pointer after a sucessful eject. 2003-05-11 rocky * ChangeLog, parse/.cvsignore, parse/Makefile, parse/cue.L, parse/cue.y, parse/test/t1.cue, parse/test/t2.cue, parse/test/t3.cue: Towards CUE parser via flex/bison. 2003-04-29 rocky * misc/libcdio.ebuild: Gentoo ebuild file courtesy of Kris Verbeeck * THANKS: More appreciation. 2003-04-28 rocky * test/.cvsignore: Do I trust Savannah? 2003-04-28 rocky * NEWS: [no log message] 2003-04-28 rocky * test/Makefile.am, test/check_nrg.sh, test/check_nrg.sh.in: check_nrg.sh is now derived since we may or may not have Video CD info displayed. 2003-04-26 rocky * configure.ac, src/Makefile.am, src/cd-info.c, test/cdda.right, test/check_cue.sh.in, test/check_nrg.sh, test/check_opts0.right, test/check_opts1.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right, test/isofs-m1.right, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/vcd_demo.right, test/videocd.right: cd-info: Use libvcdinfo if it is around to list out general Video CD properties (format version, album description, preparer id, volume number and count). cd-info output changed slightly. 2003-04-25 rocky * .cvsignore, src/.cvsignore: [no log message] 2003-04-25 rocky * ChangeLog, Makefile.am, src/Makefile.am, src/cd-info.c, src/cdinfo.c, test/check_common_fn, test/check_opts.sh: rename cdinfo to cd-info to accomodate previously existing cdinfo programs. Thanks to Manfred Tremmel for reporting the problem. 2003-04-25 rocky * configure.ac: Make RPM spec file. 2003-04-25 rocky * THANKS: Add Manfred Tremmel 2003-04-25 rocky * libcdio.spec.in: First RPM spec thanks to Manfred Tremmel . 2003-04-24 rocky * test/Makefile.am, test/check_nrg.sh, test/videocd.right: Add a single NRG test. 2003-04-24 rocky * NEWS: [no log message] 2003-04-23 rocky * lib/_cdio_nrg.c, test/svcdgs.right: More blind guesses to CUES format. Still wrong, but works better on the one sample I have to go on: svcdgs.nrg. 2003-04-22 rocky * configure.ac, include/cdio/Makefile.am: Wasn't installing version.h. This time, for sure! 2003-04-22 rocky * test/isofs-m1.bin, test/isofs-m1.cue: ISO 9660 filesystem Mode1 regression test. 2003-04-22 rocky * test/cdda.bin: Sample CD-DA bin/cue image. 2003-04-22 rocky * test/cdda.cue: Regression test cue. 2003-04-22 rocky * include/cdio/version.h.in: [no log message] 2003-04-22 rocky * include/cdio/.cvsignore: config.h now is no longer derived while version.h now is. 2003-04-22 rocky * Makefile.am, configure.ac, include/cdio/Makefile.am, include/cdio/cdio.h, include/cdio/cdio.h.in, lib/_cdio_bincue.c, lib/_cdio_bsdi.c, lib/_cdio_freebsd.c, lib/_cdio_generic.c, lib/_cdio_linux.c, lib/_cdio_nrg.c, lib/_cdio_stdio.c, lib/_cdio_stream.c, lib/_cdio_stream.h, lib/_cdio_sunos.c, lib/bytesex.h, lib/bytesex_asm.h, lib/cdio.c, lib/cdio_assert.h, lib/cdio_private.h, lib/ds.c, lib/ds.h, lib/logging.c, lib/sector.c, lib/util.c, src/cdinfo.c, test/.cvsignore, test/Makefile.am, test/cdda.right, test/check_common_fn, test/check_cue.sh.in, test/check_nrg.sh, test/check_opts.sh, test/check_opts0.right, test/check_opts1.right, test/check_opts2.right, test/check_opts3.right, test/check_opts4.right, test/check_opts5.right, test/check_opts6.right, test/check_opts7.right, test/fsf.right, test/isofs-m1.right, test/monvoisin.right, test/svcd_ogt_test_ntsc.right, test/svcdgs.right, test/vcd_demo.right, tests/.cvsignore, tests/Makefile.am, tests/cdda.bin, tests/cdda.cue, tests/cdda.right, tests/check_common_fn, tests/check_cue.sh.in, tests/check_nrg.sh, tests/check_opts.sh, tests/check_opts0.right, tests/check_opts1.right, tests/check_opts2.right, tests/check_opts3.right, tests/check_opts4.right, tests/check_opts5.right, tests/check_opts6.right, tests/check_opts7.right, tests/fsf.right, tests/isofs-m1.bin, tests/isofs-m1.cue, tests/isofs-m1.right, tests/monvoisin.right, tests/svcd_ogt_test_ntsc.right, tests/svcdgs.right, tests/vcd_demo.bin, tests/vcd_demo.right: tests -> test All public includes are included via #include rather than #include "....h" (removed -I $top_srcdir/include/cdio) 2003-04-22 rocky * lib/_cdio_freebsd.c: Probably closer. 2003-04-22 rocky * Makefile.am: Update regression version. 2003-04-22 rocky * tests/check_nrg.sh: Add another Nero test. 2003-04-22 rocky * tests/svcdgs.right: Yet another Nero test. 2003-04-21 rocky * tests/.cvsignore: [no log message] 2003-04-21 rocky * TODO: Where we might be going... 2003-04-21 rocky * .cvsignore: Now that we're using pkg-config. 2003-04-21 rocky * include/cdio/cdio.h.in: Simple typo. 2003-04-21 rocky * lib/_cdio_nrg.c: Probably much closer to being able to handle Nero CUES format. Seems to have 2336 sector size; 2 second pregap seems to be included at the beginning of the image. 2003-04-21 rocky * src/cdinfo.c: Add tests for CVD. A lot of this probably should be redone. For example, should get basic Video CD info from libvcdinfo if that is around. 2003-04-21 hvr * include/cdio/Makefile.am, include/cdio/logging.h, include/cdio/sector.h, tests/check_cue.sh: public headers must nuse unique #includes! 2003-04-21 hvr * Makefile.am, configure.ac, include/cdio/cdio.h.in, libcdio.pc.in: added pkg-config(1) support 2003-04-20 rocky * ChangeLog, include/cdio/.cvsignore, tests/.cvsignore, tests/check_cue.sh, tests/isofs-m1.right: CVS maintenance 2003-04-20 rocky * NEWS: [no log message] 2003-04-20 rocky * tests/check_cue.sh, tests/check_cue.sh.in: May need --no-cddb option. 2003-04-20 rocky * configure.ac, include/cdio/cdio.h, include/cdio/cdio.h.in, src/cdinfo.c, tests/Makefile.am, tests/check_cue.sh, tests/check_opts.sh, tests/check_opts.sh.in, tests/check_opts0.right, tests/check_opts1.right, tests/check_opts2.right, tests/check_opts3.right, tests/check_opts4.right, tests/check_opts5.right, tests/check_opts6.right, tests/check_opts7.right, tests/fsf-tompox.bin, tests/fsf-tompox.right, tests/isofs-m1.bin, tests/isofs-m1.cue: Reduce overall size yet again by replaing isofs-m1 for fsf-tompox. cdinfo: Add options for CDDB port and CDDB http enable fix bug if no CD in cdrom drive. 2003-04-20 rocky * include/cdio/cdio.h: add min/max device driver 2003-04-20 rocky * Makefile.am, configure.ac, lib/cdio.c, tests/Makefile.am, tests/cdda.bin, tests/cdda.cue, tests/cdda.right, tests/check_cue.sh: Add small cdda test. cdio.c: cdio_open was opening image drivers. 2003-04-20 rocky * ChangeLog, configure.ac, lib/Makefile.am, src/cdinfo.c: Put back in libcddb 0.9.0 checking and use cddb_http_disable(). 2003-04-19 rocky * lib/_cdio_freebsd.c: Add _cdio_read_audio_sector. Try to sync up with other drivers. 2003-04-19 rocky * Makefile.am, NEWS, configure.ac, tests/Makefile.am, tests/check_common_fn, tests/check_cue.sh, tests/check_nrg.sh, tests/check_opts.sh.in, tests/check_opts0.right, tests/check_opts1.right, tests/check_opts2.right, tests/check_opts3.right, tests/check_opts4.right, tests/check_opts5.right, tests/check_opts6.right, tests/check_opts7.right: Break most of the larger regression tests into a separate package. 2003-04-19 rocky * include/cdio/Makefile.am, include/cdio/cdio.h, include/cdio/cdio.h.in: Add package version 2003-04-19 rocky * include/cdio/cdio.h: Add an API version number. 2003-04-19 rocky * ChangeLog, Makefile.am, configure.ac, include/.cvsignore, include/Makefile.am, include/cdio/.cvsignore, include/cdio/Makefile.am, include/cdio/cdio.h, include/cdio/logging.h, include/cdio/sector.h, include/cdio/types.h, include/cdio/util.h, lib/Makefile.am, lib/cdio.h, lib/logging.h, lib/sector.h, lib/types.h, lib/util.h, src/cdinfo.c, tests/.cvsignore: Move public includes to include/cdio. This should facilitate having this source installed locally since it allows #include in the source tree. 2003-04-19 rocky * src/cdinfo.c: Revise to to handle libcddb 0.90. 2003-04-19 rocky * lib/cdio.h: Remove a compile warning noticed by Kris Verbeeck. 2003-04-19 rocky * configure.ac: do chmod +x for test/check_opts.sh Test to see if we have new enough libcddb. 2003-04-19 rocky * README: Update to include CDDB information and note this is ued by CD-DA plugin. 2003-04-15 rocky * lib/_cdio_linux.c: Remove compile warning on non-GNU/Linux servers. 2003-04-14 rocky * THANKS: Need to start *somewhere*. 2003-04-14 rocky * NEWS: Wha's happenin' 2003-04-14 rocky * lib/_cdio_bincue.c: Bug-causing typo. 2003-04-14 rocky * configure.ac, tests/Makefile.am, tests/check_opts.sh, tests/check_opts.sh.in: Need to conditionally add --no-cddb so we added check_opts.sh.in. Rewrite for loop in lower-level Bourne-shell style. 2003-04-14 rocky * src/cdinfo.c: One cddb reference not conditionally included. 2003-04-14 rocky * tests/Makefile.am: Add check files to distribution. 2003-04-14 rocky * tests/Makefile.am, tests/check_cue.sh, tests/check_opts.sh, tests/check_opts0.right, tests/check_opts1.right, tests/check_opts2.right, tests/check_opts3.right, tests/check_opts4.right, tests/check_opts5.right, tests/check_opts6.right, tests/check_opts7.right: Add regression test to check cdinfo options processing. 2003-04-14 rocky * src/cdinfo.c: libpopt options need to be integers. Change order of include to accomodate libcddb. Make distcheck now works. 2003-04-14 rocky * src/Makefile.am: Add CDDB_LIB for cdinfo. 2003-04-14 rocky * configure.ac: Check for libcddb and use that if it's there. 2003-04-14 rocky * tests/check_cue.sh: Don't give CDDB info for audio test since it's not valid and we can't assume we're connected to the Internet. 2003-04-14 rocky * lib/_cdio_bincue.c: If we don't think this is a cue file, we now report that rather than give the cryptic message about a null source. 2003-04-14 rocky * src/cdinfo.c: CDDB lookup for audio CD via libcddb. 2003-04-14 rocky * lib/cdio.c: Bad linux default_device initialization. 2003-04-12 rocky * lib/_cdio_bincue.c, lib/_cdio_bsdi.h, lib/cdio.c, lib/cdio.h: Add routine cdio_is_bincue to test if file is a cue file. cdio_open does a better job in automatically determining the type of file. 2003-04-11 rocky * lib/sector.c, lib/sector.h: 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) 2003-04-11 rocky * lib/_cdio_sunos.c: Move used #include outside of conditional compilation since strdup's used to get default device. 2003-04-11 rocky * lib/_cdio_bincue.c, lib/_cdio_nrg.c: Forgot to add recently added read_audio_sector to op structure. 2003-04-10 rocky * configure.ac, lib/_cdio_bincue.c, lib/_cdio_nrg.c: configure.ac: bump version bincue/nrg: add cdio_read_audio_sector 2003-04-10 rocky * lib/_cdio_sunos.c: read_mode_audio_sector now works. 2003-04-10 rocky * lib/_cdio_bincue.c, lib/_cdio_bsdi.c, lib/_cdio_freebsd.c, lib/_cdio_generic.c, lib/_cdio_nrg.c, lib/_cdio_sunos.c, lib/cdio.c, lib/cdio.h, lib/cdio_private.h: get_default_device with NULL will get device *without* trying to open cd. Add read_audio call. 2003-04-10 rocky * lib/_cdio_linux.c: Add ability to read audio (CD-DA) sector. 2003-04-10 rocky * lib/types.h: Add CDIO_INVALID_LSN definition 2003-04-09 rocky * lib/sector.h: CD_MAX_TRACKS -> CDIO_CD_MAX_TRACKS 2003-04-08 rocky * ChangeLog: [no log message] 2003-04-08 rocky * lib/_cdio_linux.c: Small name changes. 2003-04-08 rocky * lib/_cdio_bsdi.c: Changes brought about by sector.h #define changes. 2003-04-08 rocky * lib/_cdio_sunos.c: Revise for changed sector.h 2003-04-07 rocky * lib/cdio_private.h: Add opaque CdIoDataSource type and generic free routine for stream-based drivers (nrg, bincue, network). 2003-04-07 rocky * lib/types.h: Indention formatting that Emacs prefers. 2003-04-07 rocky * lib/_cdio_nrg.c: Sync up with _cdio_bincue a little. free routine replaced with a generic routine. 2003-04-07 rocky * lib/_cdio_bincue.c: Move free routine into a generic routine. Some numbers replaced by #define constants. 2003-04-07 rocky * lib/_cdio_generic.c: Add generic_stream_free and remove out of disk-image routines. 2003-04-07 rocky * lib/_cdio_stream.h: Opaque type CdioDataSource is now in cdio_private.h. This forces us to use that. (And this might not be the best, but I can't think of anything else that is as simple.) 2003-04-07 rocky * lib/_cdio_stream.c: Grammar typo. 2003-04-07 rocky * lib/_cdio_bincue.c: Another case of not checking the status of operations and returning on error (rather than continuing). Not serious this time... 2003-04-07 rocky * lib/_cdio_bincue.c: Propagate error results from seeks and reads. 2003-04-06 rocky * lib/_cdio_stdio.c, lib/_cdio_stream.c, lib/_cdio_stream.h: Document some of the interfaces. 2003-04-06 rocky * lib/_cdio_bincue.c: Back off a little with the #define thing a little for now. I made a mistake somewhere. (And don't want to track it down further.) 2003-04-06 rocky * lib/sector.h: This time for sure? 2003-04-06 rocky * lib/_cdio_generic.c, lib/_cdio_linux.c, lib/_cdio_nrg.c, lib/sector.h, src/cdinfo.c: More #define reductions/fixes. 2003-04-06 rocky * lib/_cdio_bincue.c, lib/_cdio_bsdi.c, lib/_cdio_bsdi_old.c, lib/_cdio_linux.c, lib/_cdio_nrg.c, lib/_cdio_stream.c, lib/_cdio_sunos.c, lib/sector.h, src/cdinfo.c: Change sector.h constants, yet again. This time for Herbert Valiero Riedel. 2003-04-06 rocky * tests/svcd_ogt_test_ntsc.bin: This file seems to get changed when checking in. 2003-04-06 rocky * tests/Makefile.am, tests/svcd_ogt_test_ntsc.bin: svcd_ogt_test_ntsc.bin corrupted. Makefile: add other bin/cue/nrg's 2003-04-06 rocky * tests/Makefile.am, tests/check_cue.sh, tests/fsf-tompox.bin, tests/fsf-tompox.right, tests/fsf.right, tests/svcd_ogt_test_ntsc.bin, tests/vcd_demo.bin: Add a CD audio test and an ISO 9660 joliet extension tst. Add in the Video CD images I've been using. 2003-04-06 rocky * src/cdinfo.c: Use new sector.h constants. 2003-04-06 rocky * lib/_cdio_linux.c, lib/_cdio_nrg.c, lib/_cdio_sunos.c, lib/cdio.h: Use new sector.h constants. More changes will no doubt follow. 2003-04-06 rocky * lib/_cdio_bincue.c: More complete. Fill out seek code. 2003-04-06 rocky * lib/sector.h: Go with Linux definitions rather than invent our own. More changes will no doubt follow. 2003-04-04 rocky * lib/_cdio_bincue.c, lib/cdio_private.h: Close go getting simple read working. Not completely correct, but close. 2003-04-04 rocky * lib/cdio.c, lib/cdio.h: Documentation improvment: Note that get_default_device returns NULL on error. 2003-04-03 rocky * lib/Makefile.am, lib/_cdio_stream.h, lib/bytesex.h, lib/bytesex_asm.h, lib/cdio.h, lib/cdio_assert.h, lib/cdio_types.h, lib/ds.c, lib/ds.h, lib/logging.h, lib/sector.h, lib/types.h: cdio_types.h -> types.h 2003-04-02 rocky * lib/cdio.c: Note that device is uninit when destroying, 'cause it is! 2003-03-30 rocky * lib/_cdio_bincue.c, lib/_cdio_bsdi.c, lib/_cdio_generic.c, lib/_cdio_linux.c, lib/_cdio_nrg.c, lib/_cdio_sunos.c, lib/cdio.c, lib/cdio.h, lib/cdio_private.h: More common routiens and structures moved to cdio_generic.c or cdio_private.h respectively. 2003-03-30 rocky * configure.ac: BSDI now requires Steve Schultz's libdvd.a and dvd.h package. 2003-03-30 rocky * configure.ac: Having trouble getting aclocal include libpopt.m4 (and presumably other *.m4's) 2003-03-30 rocky * autogen.sh, configure.ac, src/Makefile.am: Rest: add libpopt autoconfiguration. 2003-03-30 rocky * lib/_cdio_bsdi.c: Extend to larger interface using generic routines. 2003-03-30 rocky * lib/_cdio_freebsd.c: Yet another typo. 2003-03-30 rocky * lib/_cdio_freebsd.c: Change default drive and fix typographical mistake. 2003-03-29 rocky * lib/_cdio_bincue.c, lib/_cdio_generic.c, lib/_cdio_nrg.c, lib/_cdio_sunos.c: Small lint-like errors. Solaris now works again with new read/lseek functions. 2003-03-29 rocky * lib/_cdio_freebsd.c, lib/_cdio_sunos.c: Probably closer towards compiling on those architectures. 2003-03-29 rocky * configure.ac, lib/Makefile.am, lib/_cdio_bincue.c, lib/_cdio_bsdi.c, lib/_cdio_bsdi_old.c, lib/_cdio_freebsd.c, lib/_cdio_generic.c, lib/_cdio_linux.c, lib/_cdio_nrg.c, lib/_cdio_stdio.c, lib/_cdio_stream.c, lib/_cdio_stream.h, lib/_cdio_sunos.c, lib/cdio.c, lib/cdio.h, lib/cdio_private.h, lib/cdio_types.h, lib/sector.h, src/Makefile.am, src/cdinfo.c, tests/monvoisin.right: Add simple (non-mode2) read/seek. _cdio_generic.c: place to save common driver routines add cdio_get_track_sec_count. 2003-03-25 rocky * src/cdinfo.c: gcc < 3.0 compatibility. 2003-03-25 rocky * lib/_cdio_freebsd.c: A stab at FreeBSD support. Not finished. More later... 2003-03-24 rocky * lib/Makefile.am, lib/_cdio_bsdi.c, lib/_cdio_linux.c, lib/cdio.c, lib/cdio.h: _cdio_linux.c: eject routines does it's own open and close. cdio.h, Makefile.am, cdio.c: Add FreeBSD routine (not complete yet). 2003-03-24 rocky * src/cdinfo.c: Small clarity change 2003-03-24 rocky * Initial revision libcdio-0.83/missing0000755000175000017500000002623311652140255011400 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: libcdio-0.83/COPYING0000644000175000017500000010451311114146526011032 00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . libcdio-0.83/install-sh0000755000175000017500000003253711652140255012011 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: libcdio-0.83/Makefile.am0000644000175000017500000001020711652207751012034 00000000000000# Copyright (C) 2003, 2004, 2006, 2008, 2011 # Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # ## Process this file with automake to produce Makefile.in ## which configure then turns into a Makefile ... ## which make can then use to produce stuff. Isn't configuration simple? AUTOMAKE_OPTIONS = dist-bzip2 EXTRA_DIST = \ MSVC/README MSVC/cd-info.vcproj \ MSVC/config.h \ MSVC/libcdio.sln \ MSVC/libcdio.vcproj \ README.libcdio \ THANKS \ example/README \ libcdio.pc.in \ libcdio++.pc.in \ libcdio_cdda.pc.in \ libiso9660.pc.in \ libiso9660++.pc.in \ libudf.pc.in \ package/libcdio.spec.in SUBDIRS = doc include lib src test example if BUILD_CD_PARANOIA paranoiapcs = libcdio_paranoia.pc libcdio_cdda.pc endif # pkg-config(1) related rules pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libcdio.pc \ libiso9660.pc \ libudf.pc \ $(paranoiapcs) if ENABLE_CXX_BINDINGS pkgconfig_DATA += \ libcdio++.pc \ libiso9660++.pc endif $(pkgconfig_DATA): config.status # List of additional files for expanded regression tests DISTFILES_REGRESSION = tests/monvoisin.nrg tests/monvoisin.right \ tests/svcdgs.nrg tests/svcdgs.nrg \ tests/svcd_ogt_test_ntsc.bin \ tests/svcd_ogt_test_ntsc.cue \ tests/svcd_ogt_test_ntsc.right \ tests/vcd_demo.bin tests/vcd_demo.cue \ tests/vcd_demo.right REGRESSION_VERSION = 1.1 distdir_regression = ../$(PACKAGE)-$(REGRESSION_VERSION)-tests #: run regression tests test: check #: Make documentation via Doxygen http://www.stack.nl/~dimitri/doxygen/ doxygen: -( cd ${top_srcdir}/doc/doxygen && /bin/sh ${srcdir}/run_doxygen ) dist-regression: distdir-regression cd $(distdir) && $(AMTAR) chof - tests | GZIP=$(GZIP_ENV) gzip -c >$(distdir_regression).tar.gz $(am__remove_distdir) distdir-regression: $(DISTFILES_REGRESSION) $(am__remove_distdir) mkdir $(distdir) @list='$(DISTFILES_REGRESSION)'; for file in $$list; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir_regression)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -755 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) check_nrg.sh: $(top_builddir)/config.status check_nrg.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ chmod +x config_nrg.sh check_cue.sh: $(top_builddir)/config.status check_cue.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ chmod +x config_cue.sh check_iso.sh: $(top_builddir)/config.status check_iso.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ chmod +x config_iso.sh # cvs2cl MAINTAINERCLEANFILES = ChangeLog *.rej *.orig if MAINTAINER_MODE .PHONY: ChangeLog #: Create ChangeLog from version control ChangeLog: git log --pretty --numstat --summary | $(GIT2CL) >$@ ACLOCAL_AMFLAGS=-I m4 endif libcdio-0.83/config.rpath0000755000175000017500000004364711270206076012321 00000000000000#! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2007 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld # should be set by the caller. # # The set of defined variables is at the end of this script. # Known limitations: # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer # than 256 bytes, otherwise the compiler driver will dump core. The only # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Code taken from libtool.m4's _LT_CC_BASENAME. for cc_temp in $CC""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` # Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; darwin*) case $cc_basename in xlc*) wl='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; newsos6) ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) wl='-Wl,' ;; pgcc | pgf77 | pgf90) wl='-Wl,' ;; ccc*) wl='-Wl,' ;; como) wl='-lopt=' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) wl='-Wl,' ;; esac ;; esac ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; rdos*) ;; solaris*) wl='-Wl,' ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3*) wl='-Wl,' ;; sysv4*MP*) ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) wl='-Wl,' ;; unicos*) wl='-Wl,' ;; uts4*) ;; esac fi # Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no case "$host_os" in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. # Unlike libtool, we use -rpath here, not --rpath, since the documented # option of GNU ld is called -rpath, not --rpath. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' case "$host_os" in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we cannot use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then : else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; netbsd*) ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' else ld_shlibs=no fi ;; esac ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then hardcode_libdir_flag_spec= fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac fi hardcode_direct=yes hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. echo 'int main () { return 0; }' > conftest.c ${CC} ${LDFLAGS} conftest.c -o conftest aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` fi if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib" fi rm -f conftest.c conftest # End _LT_AC_SYS_LIBPATH_AIX. if test "$aix_use_runtimelinking" = yes; then hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" fi fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' libext=lib ;; darwin* | rhapsody*) hardcode_direct=no if test "$GCC" = yes ; then : else case $cc_basename in xlc*) ;; *) ld_shlibs=no ;; esac fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd1*) ld_shlibs=no ;; freebsd2.2*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; freebsd2*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd* | dragonfly*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; hpux10*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no ;; *) hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) case $host_vendor in sni) hardcode_direct=yes # is this really true??? ;; siemens) hardcode_direct=no ;; motorola) hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac ;; sysv4.3*) ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) ;; sysv5* | sco3.2v5* | sco5v6*) hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics # Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER. # Unlike libtool.m4, here we don't care about _all_ names of the library, but # only about the one the linker finds when passed -lNAME. This is the last # element of library_names_spec in libtool.m4, or possibly two of them if the # linker has special search rules. library_names_spec= # the last element of library_names_spec in libtool.m4 libname_spec='lib$name' case "$host_os" in aix3*) library_names_spec='$libname.a' ;; aix4* | aix5*) library_names_spec='$libname$shrext' ;; amigaos*) library_names_spec='$libname.a' ;; beos*) library_names_spec='$libname$shrext' ;; bsdi[45]*) library_names_spec='$libname$shrext' ;; cygwin* | mingw* | pw32*) shrext=.dll library_names_spec='$libname.dll.a $libname.lib' ;; darwin* | rhapsody*) shrext=.dylib library_names_spec='$libname$shrext' ;; dgux*) library_names_spec='$libname$shrext' ;; freebsd1*) ;; freebsd* | dragonfly*) case "$host_os" in freebsd[123]*) library_names_spec='$libname$shrext$versuffix' ;; *) library_names_spec='$libname$shrext' ;; esac ;; gnu*) library_names_spec='$libname$shrext' ;; hpux9* | hpux10* | hpux11*) case $host_cpu in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac library_names_spec='$libname$shrext' ;; interix[3-9]*) library_names_spec='$libname$shrext' ;; irix5* | irix6* | nonstopux*) library_names_spec='$libname$shrext' case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux* | k*bsd*-gnu) library_names_spec='$libname$shrext' ;; knetbsd*-gnu) library_names_spec='$libname$shrext' ;; netbsd*) library_names_spec='$libname$shrext' ;; newsos6) library_names_spec='$libname$shrext' ;; nto-qnx*) library_names_spec='$libname$shrext' ;; openbsd*) library_names_spec='$libname$shrext$versuffix' ;; os2*) libname_spec='$name' shrext=.dll library_names_spec='$libname.a' ;; osf3* | osf4* | osf5*) library_names_spec='$libname$shrext' ;; rdos*) ;; solaris*) library_names_spec='$libname$shrext' ;; sunos4*) library_names_spec='$libname$shrext$versuffix' ;; sysv4 | sysv4.3*) library_names_spec='$libname$shrext' ;; sysv4*MP*) library_names_spec='$libname$shrext' ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) library_names_spec='$libname$shrext' ;; uts4*) library_names_spec='$libname$shrext' ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` shlibext=`echo "$shrext" | sed -e 's,^\.,,'` escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' < header file. */ #undef HAVE_COREFOUNDATION_CFBASE_H /* Define to 1 if you have the header file. */ #undef HAVE_CURSES_H /* Define 1 if you have Darwin OS X-type CD-ROM support */ #undef HAVE_DARWIN_CDROM /* Define if time.h defines extern long timezone and int daylight vars. */ #undef HAVE_DAYLIGHT /* Define to 1 if you have the Apple DiskArbitration framework */ #undef HAVE_DISKARBITRATION /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the `drand48' function. */ #undef HAVE_DRAND48 /* Define to 1 if you have the header file. */ #undef HAVE_DVD_H /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define 1 if you have FreeBSD CD-ROM support */ #undef HAVE_FREEBSD_CDROM /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ #undef HAVE_FSEEKO /* Define to 1 if you have the `ftruncate' function. */ #undef HAVE_FTRUNCATE /* Define to 1 if you have the `geteuid' function. */ #undef HAVE_GETEUID /* Define to 1 if you have the `getgid' function. */ #undef HAVE_GETGID /* Define to 1 if you have the header file. */ #undef HAVE_GETOPT_H /* Define to 1 if you have the `getpwuid' function. */ #undef HAVE_GETPWUID /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define to 1 if you have the `getuid' function. */ #undef HAVE_GETUID /* Define to 1 if you have the header file. */ #undef HAVE_GLOB_H /* Define to 1 if you have the `gmtime_r' function. */ #undef HAVE_GMTIME_R /* Define if you have the iconv() function and it works. */ #undef HAVE_ICONV /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_IOKIT_IOKITLIB_H /* Supports ISO _Pragma() macro */ #undef HAVE_ISOC99_PRAGMA /* Define 1 if you want ISO-9660 Joliet extension support. You must have also libiconv installed to get Joliet extension support. */ #undef HAVE_JOLIET /* Define this if your libcurses has keypad */ #undef HAVE_KEYPAD /* Define if you have and nl_langinfo(CODESET). */ #undef HAVE_LANGINFO_CODESET /* Define to 1 if you have the `nsl' library (-lnsl). */ #undef HAVE_LIBNSL /* Define to 1 if you have the `socket' library (-lsocket). */ #undef HAVE_LIBSOCKET /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define 1 if you have Linux-type CD-ROM support */ #undef HAVE_LINUX_CDROM /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_CDROM_H /* Define 1 if timeout is in cdrom_generic_command struct */ #undef HAVE_LINUX_CDROM_TIMEOUT /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_MAJOR_H /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_VERSION_H /* Define to 1 if you have the `localtime_r' function. */ #undef HAVE_LOCALTIME_R /* Define to 1 if you have the `lstat' function. */ #undef HAVE_LSTAT /* Define to 1 if you have the `memcpy' function. */ #undef HAVE_MEMCPY /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the header file. */ #undef HAVE_NCURSES_H /* Define 1 if you have NetBSD CD-ROM support */ #undef HAVE_NETBSD_CDROM /* Define 1 if you have OS/2 CD-ROM support */ #undef HAVE_OS2_CDROM /* Define to 1 if you have the header file. */ #undef HAVE_PWD_H /* Define to 1 if you have the `rand' function. */ #undef HAVE_RAND /* Define to 1 if you have the `readlink' function. */ #undef HAVE_READLINK /* Define to 1 if you have the `realpath' function. */ #undef HAVE_REALPATH /* Define 1 if you want ISO-9660 Rock-Ridge extension support. */ #undef HAVE_ROCK /* Define to 1 if you have the `setegid' function. */ #undef HAVE_SETEGID /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV /* Define to 1 if you have the `seteuid' function. */ #undef HAVE_SETEUID /* Define to 1 if you have the `sleep' function. */ #undef HAVE_SLEEP /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF /* Define 1 if you have Solaris CD-ROM support */ #undef HAVE_SOLARIS_CDROM /* Define to 1 if you have the header file. */ #undef HAVE_STDARG_H /* Define to 1 if you have the header file. */ #undef HAVE_STDBOOL_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDIO_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define this if you have struct timespec */ #undef HAVE_STRUCT_TIMESPEC /* Define to 1 if you have the header file. */ #undef HAVE_SYS_CDIO_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIMEB_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_UTSNAME_H /* Define this defines S_ISLNK() */ #undef HAVE_S_ISLNK /* Define this defines S_ISSOCK() */ #undef HAVE_S_ISSOCK /* Define to 1 if timegm is available */ #undef HAVE_TIMEGM /* Define if you have an extern long timenzone variable. */ #undef HAVE_TIMEZONE_VAR /* Define if struct tm has the tm_gmtoff member. */ #undef HAVE_TM_GMTOFF /* Define if time.h defines extern extern char *tzname[2] variable */ #undef HAVE_TZNAME /* Define to 1 if you have the `tzset' function. */ #undef HAVE_TZSET /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `unsetenv' function. */ #undef HAVE_UNSETENV /* Define to 1 if you have the `usleep' function. */ #undef HAVE_USLEEP /* Define this if you have libvcdinfo installed */ #undef HAVE_VCDINFO /* Define to 1 if you have the `vsnprintf' function. */ #undef HAVE_VSNPRINTF /* Define 1 if you have MinGW CD-ROM support */ #undef HAVE_WIN32_CDROM /* Define to 1 if you have the header file. */ #undef HAVE_WINDOWS_H /* Define as const if the declaration of iconv() needs const. */ #undef ICONV_CONST /* Is set when libcdio's config.h has been included. Applications wishing to sue their own config.h values (such as set by the application's configure script can define this before including any of libcdio's headers. */ #undef LIBCDIO_CONFIG_H /* Full path to libcdio top_sourcedir. */ #undef LIBCDIO_SOURCE_PATH /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Define 1 if you are compiling using MinGW */ #undef MINGW32 /* Define 1 if you need timezone defined to get timzone defined as a variable. In cygwin it is a function too */ #undef NEED_TIMEZONEVAR /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif /* Version number of package */ #undef VERSION /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ #undef _LARGEFILE_SOURCE /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES /* Define to 1 if on MINIX. */ #undef _MINIX /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif libcdio-0.83/src/0000755000175000017500000000000011652210415010636 500000000000000libcdio-0.83/src/util.h0000644000175000017500000000752711650126466011731 00000000000000/* Copyright (C) 2003, 2004, 2005, 2008, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Miscellaneous things common to standalone programs. */ #ifndef UTIL_H #define UTIL_H #if defined(HAVE_CONFIG_H) && !defined(__CDIO_CONFIG_H__) # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #include #include #include #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_STRINGS_H #include #endif #include #ifdef HAVE_STDARG_H /* Get a definition for va_list. */ #include #endif /* FreeBSD 4 has getopt in unistd.h. So we include that before getopt.h */ #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_GETOPT_H #include #endif #ifdef ENABLE_NLS #include # include # define _(String) dgettext ("cdinfo", String) #else /* Stubs that do something close enough. */ # define _(String) (String) #endif /* The following test is to work around the gross typo in systems like Sony NEWS-OS Release 4.0C, whereby EXIT_FAILURE is defined to 0, not 1. */ #if !EXIT_FAILURE # undef EXIT_FAILURE # define EXIT_FAILURE 1 #endif #ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 #endif #ifndef EXIT_INFO # define EXIT_INFO 100 #endif #define DEBUG 1 #if DEBUG #define dbg_print(level, s, args...) \ if (opts.debug_level >= level) \ report(stderr, "%s: "s, __func__ , ##args) #else #define dbg_print(level, s, args...) #endif #define err_exit(fmt, args...) \ report(stderr, "%s: "fmt, program_name, ##args); \ myexit(p_cdio, EXIT_FAILURE) typedef enum { INPUT_AUTO, INPUT_DEVICE, INPUT_BIN, INPUT_CUE, INPUT_NRG, INPUT_CDRDAO, INPUT_UNKNOWN } source_image_t; extern char *source_name; extern char *program_name; extern cdio_log_handler_t gl_default_cdio_log_handler; /*! Common error exit routine which frees p_cdio. rc is the return code to pass to exit. */ void myexit(CdIo_t *p_cdio, int rc); /*! Print our version string */ void print_version (char *psz_program, const char *psz_version, int no_header, bool version_only); /*! Device input routine. If successful we return an open CdIo_t pointer. On error the program exits. */ CdIo_t * open_input(const char *psz_source, source_image_t source_image, const char *psz_access_mode); /*! On Unixish OS's we fill out the device name, from a short name. For example cdrom might become /dev/cdrom. */ char *fillout_device_name(const char *device_name); /*! Prints out SCSI-MMC drive features */ void print_mmc_drive_features(CdIo *p_cdio); /*! Prints out drive capabilities */ void print_drive_capabilities(cdio_drive_read_cap_t p_read_cap, cdio_drive_write_cap_t p_write_cap, cdio_drive_misc_cap_t p_misc_cap); /*! Common place for output routine. In some environments, like XBOX, it may not be desireable to send output to stdout and stderr. */ void report (FILE *stream, const char *psz_format, ...); /* Prints "ls"-like file attributes */ void print_fs_attrs(iso9660_stat_t *p_statbuf, bool b_rock, bool b_xa, const char *psz_name_untranslated, const char *psz_name_translated); #endif /* UTIL_H */ libcdio-0.83/src/cddb.h0000644000175000017500000000340311223250374011625 00000000000000/* $Id: cddb.h,v 1.6 2008/06/25 08:01:54 rocky Exp $ Copyright (C) 2005, 2007, 2008, 2009 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ typedef struct cddb_opts_s { char *email; /* email to report to CDDB server. */ char *server; /* CDDB server to contact */ int port; /* port number to contact CDDB server. */ int http; /* 1 if use http proxy */ int timeout; bool disable_cache; /* If set the below is meaningless. */ char *cachedir; } cddb_opts_t; extern cddb_opts_t cddb_opts; /*! Compute the CDDB disk ID for an Audio disk. This is a funny checksum consisting of the concatenation of 3 things: the sum of the decimal digits of sizes of all tracks, the total length of the disk, and the number of tracks. */ uint32_t cddb_discid(CdIo_t *p_cdio, track_t i_tracks); #ifdef HAVE_CDDB #include typedef void (*error_fn_t) (const char *msg); bool init_cddb(CdIo_t *p_cdio, cddb_conn_t **pp_conn, cddb_disc_t **pp_cddb_disc, error_fn_t errmsg, track_t i_first_track, track_t i_tracks, int *i_cddb_matches); #endif libcdio-0.83/src/iso-read.c0000644000175000017500000001744111114145233012432 00000000000000/* $Id: iso-read.c,v 1.16 2008/06/19 15:44:19 flameeyes Exp $ Copyright (C) 2004, 2005, 2006, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Program to read ISO-9660 images. */ #include "util.h" #include "portable.h" #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #include "getopt.h" /* Used by `main' to communicate with `parse_opt'. And global options */ static struct arguments { char *file_name; char *output_file; char *iso9660_image; int debug_level; int no_header; int ignore; } opts; /* Parse a options. */ static bool parse_options (int argc, char *argv[]) { int opt; /* Configuration option codes */ enum { OP_HANDLED = 0, OP_VERSION=1, OP_USAGE }; static const char helpText[] = "Usage: %s [OPTION...]\n" " -d, --debug=INT Set debugging to LEVEL.\n" " -i, --image=FILE Read from ISO-9660 image. This option is mandatory\n" " -e, --extract=FILE Extract FILE from ISO-9660 image. This option is\n" " mandatory.\n" " -k, --ignore Ignore read error(s), i.e. keep going\n" " --no-header Don't display header and copyright (for\n" " regression testing)\n" " -o, --output-file=FILE Output file. This option is mandatory.\n" " -V, --version display version and copyright information and exit\n" "\n" "Help options:\n" " -?, --help Show this help message\n" " --usage Display brief usage message\n"; static const char usageText[] = "Usage: %s [-d|--debug INT] [-i|--image FILE] [-e|--extract FILE]\n" " [--no-header] [-o|--output-file FILE] [-V|--version] [-?|--help]\n" " [--usage]\n"; /* Command-line options */ static const char* optionsString = "d:i:e:o:Vk?"; static const struct option optionsTable[] = { {"debug", required_argument, NULL, 'd' }, {"image", required_argument, NULL, 'i' }, {"extract", required_argument, NULL, 'e' }, {"no-header", no_argument, &opts.no_header, 1 }, {"ignore", no_argument, &opts.ignore, 'k' }, {"output-file", required_argument, NULL, 'o' }, {"version", no_argument, NULL, 'V' }, {"help", no_argument, NULL, '?' }, {"usage", no_argument, NULL, OP_USAGE }, { NULL, 0, NULL, 0 } }; program_name = strrchr(argv[0],'/'); program_name = program_name ? strdup(program_name+1) : strdup(argv[0]); while ((opt = getopt_long(argc, argv, optionsString, optionsTable, NULL)) != -1) switch (opt) { case 'd': opts.debug_level = atoi(optarg); break; case 'i': opts.iso9660_image = strdup(optarg); break; case 'k': opts.ignore = 1; break; case 'e': opts.file_name = strdup(optarg); break; case 'o': opts.output_file = strdup(optarg); break; case 'V': print_version(program_name, CDIO_VERSION, 0, true); free(program_name); exit (EXIT_SUCCESS); break; case '?': fprintf(stdout, helpText, program_name); free(program_name); exit(EXIT_INFO); break; case OP_USAGE: fprintf(stderr, usageText, program_name); free(program_name); exit(EXIT_FAILURE); break; case OP_HANDLED: break; } if (optind < argc) { const char *remaining_arg = argv[optind++]; if (opts.iso9660_image != NULL) { report( stderr, "%s: Source specified as --image %s and as %s\n", program_name, opts.iso9660_image, remaining_arg ); free(program_name); exit (EXIT_FAILURE); } opts.iso9660_image = strdup(remaining_arg); if (optind < argc ) { report( stderr, "%s: use only one unnamed argument for the ISO 9660 " "image name\n", program_name ); free(program_name); exit (EXIT_FAILURE); } } if (NULL == opts.iso9660_image) { report( stderr, "%s: you need to specify an ISO-9660 image name.\n", program_name ); report( stderr, "%s: Use option --image or try --help.\n", program_name ); exit (EXIT_FAILURE); } if (NULL == opts.file_name) { report( stderr, "%s: you need to specify a filename to extract.\n", program_name ); report( stderr, "%s: Use option --extract or try --help.\n", program_name ); exit (EXIT_FAILURE); } if (NULL == opts.output_file) { report( stderr, "%s: you need to specify a place write filename extraction to.\n", program_name ); report( stderr, "%s: Use option --output-file or try --help.\n", program_name ); exit (EXIT_FAILURE); } return true; } static void init(void) { opts.debug_level = 0; opts.ignore = 0; opts.file_name = NULL; opts.output_file = NULL; opts.iso9660_image = NULL; } int main(int argc, char *argv[]) { iso9660_stat_t *statbuf; FILE *outfd; int i; iso9660_t *iso; init(); /* Parse our arguments; every option seen by `parse_opt' will be reflected in `arguments'. */ if (!parse_options(argc, argv)) { report(stderr, "error while parsing command line - try --help\n"); return 2; } iso = iso9660_open (opts.iso9660_image); if (NULL == iso) { report(stderr, "%s: Sorry, couldn't open ISO-9660 image file '%s'.\n", program_name, opts.iso9660_image); return 1; } statbuf = iso9660_ifs_stat_translate (iso, opts.file_name); if (NULL == statbuf) { report(stderr, "%s: Could not get ISO-9660 file information out of %s" " for file %s.\n", program_name, opts.iso9660_image, opts.file_name); report(stderr, "%s: iso-info may be able to show the contents of %s.\n", program_name, opts.iso9660_image); return 2; } if (!(outfd = fopen (opts.output_file, "wb"))) { report(stderr, "%s: Could not open %s for writing: %s\n", program_name, opts.output_file, strerror(errno)); return 3; } /* Copy the blocks from the ISO-9660 filesystem to the local filesystem. */ for (i = 0; i < statbuf->size; i += ISO_BLOCKSIZE) { char buf[ISO_BLOCKSIZE]; memset (buf, 0, ISO_BLOCKSIZE); if ( ISO_BLOCKSIZE != iso9660_iso_seek_read (iso, buf, statbuf->lsn + (i / ISO_BLOCKSIZE), 1) ) { report(stderr, "Error reading ISO 9660 file at lsn %lu\n", (long unsigned int) statbuf->lsn + (i / ISO_BLOCKSIZE)); if (!opts.ignore) return 4; } fwrite (buf, ISO_BLOCKSIZE, 1, outfd); if (ferror (outfd)) { perror ("fwrite()"); return 5; } } fflush (outfd); /* Make sure the file size has the exact same byte size. Without the truncate below, the file will a multiple of ISO_BLOCKSIZE. */ if (ftruncate (fileno (outfd), statbuf->size)) perror ("ftruncate()"); fclose (outfd); iso9660_close(iso); return 0; } libcdio-0.83/src/getopt.h0000644000175000017500000001075711114145233012241 00000000000000/* Declarations for getopt. Copyright (C) 1989,90,91,92,93,94,96,97 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@gnu.org. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _GETOPT_H #define _GETOPT_H 1 #ifdef __cplusplus extern "C" { #endif /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ extern char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ extern int optind; /* Callers store zero here to inhibit the error message `getopt' prints for unrecognized options. */ extern int opterr; /* Set to an option character which was unrecognized. */ extern int optopt; /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector of `struct option' terminated by an element containing a name which is zero. The field `has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, optional_argument (or 2) if the option takes an optional argument. If the field `flag' is not NULL, it points to a variable that is set to the value given in the field `val' when the option is found, but left unchanged if the option is not found. To have a long-named option do something other than set an `int' to a compiled-in constant, such as set a value from `optarg', set the option's `flag' field to zero and its `val' field to a nonzero value (the equivalent single-letter option character, if there is one). For long options that have a zero `flag' field, `getopt' returns the contents of the `val' field. */ struct option { #if defined (__STDC__) && __STDC__ const char *name; #else char *name; #endif /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; int *flag; int val; }; /* Names for the values of the `has_arg' field of `struct option'. */ #define no_argument 0 #define required_argument 1 #define optional_argument 2 #if defined (__STDC__) && __STDC__ #ifdef __GNU_LIBRARY__ /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ extern int getopt (int argc, char *const *argv, const char *shortopts); #else /* not __GNU_LIBRARY__ */ extern int getopt (); #endif /* __GNU_LIBRARY__ */ extern int getopt_long (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind); extern int getopt_long_only (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind); /* Internal only. Users should not call this directly. */ extern int _getopt_internal (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind, int long_only); #else /* not __STDC__ */ extern int getopt (); extern int getopt_long (); extern int getopt_long_only (); extern int _getopt_internal (); #endif /* __STDC__ */ #ifdef __cplusplus } #endif #endif /* getopt.h */ libcdio-0.83/src/iso-read.help2man0000644000175000017500000000040111565177520013720 00000000000000[SYNOPSIS] .B iso-read \fIOPTION\fR... .TP Reads portions of an ISO 9660 image. [SEE ALSO] \&\f(CWiso-info(1)\fR for information about an ISO-9660 image. \&\f(CWcd-read(1)\fR to read portions of an ISO 9660 image. [AUTHOR] Rocky Bernstein libcdio-0.83/src/cddb.c0000644000175000017500000000726411650126675011643 00000000000000/* Copyright (C) 2005, 2008, 2009, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #include "cddb.h" cddb_opts_t cddb_opts; /*! Returns the sum of the decimal digits in a number. Eg. 1955 = 20 */ static int cddb_dec_digit_sum(int n) { int ret=0; for (;;) { ret += n%10; n = n/10; if (!n) return ret; } } /*! Compute the CDDB disk ID for an Audio disk. This is a funny checksum consisting of the concatenation of 3 things: the sum of the decimal digits of sizes of all tracks, the total length of the disk, and the number of tracks. */ uint32_t cddb_discid(CdIo_t *p_cdio, track_t i_tracks) { int i,t,n=0; msf_t start_msf; msf_t msf; for (i = 1; i <= i_tracks; i++) { cdio_get_track_msf(p_cdio, i, &msf); n += cddb_dec_digit_sum(cdio_audio_get_msf_seconds(&msf)); } cdio_get_track_msf(p_cdio, 1, &start_msf); cdio_get_track_msf(p_cdio, CDIO_CDROM_LEADOUT_TRACK, &msf); t = cdio_audio_get_msf_seconds(&msf)-cdio_audio_get_msf_seconds(&start_msf); return ((n % 0xff) << 24 | t << 8 | i_tracks); } #ifdef HAVE_CDDB bool init_cddb(CdIo_t *p_cdio, cddb_conn_t **pp_conn, cddb_disc_t **pp_cddb_disc, error_fn_t errmsg, track_t i_first_track, track_t i_tracks, int *i_cddb_matches) { track_t i; *pp_conn = cddb_new(); *pp_cddb_disc = NULL; if (!*pp_conn) { errmsg("unable to initialize libcddb"); return false; } if (NULL == cddb_opts.email) cddb_set_email_address(*pp_conn, "me@home"); else cddb_set_email_address(*pp_conn, cddb_opts.email); if (NULL == cddb_opts.server) cddb_set_server_name(*pp_conn, "freedb.freedb.org"); else cddb_set_server_name(*pp_conn, cddb_opts.server); if (cddb_opts.timeout >= 0) cddb_set_timeout(*pp_conn, cddb_opts.timeout); cddb_set_server_port(*pp_conn, cddb_opts.port); if (cddb_opts.http) cddb_http_enable(*pp_conn); else cddb_http_disable(*pp_conn); if (NULL != cddb_opts.cachedir) cddb_cache_set_dir(*pp_conn, cddb_opts.cachedir); if (cddb_opts.disable_cache) cddb_cache_disable(*pp_conn); *pp_cddb_disc = cddb_disc_new(); if (!*pp_cddb_disc) { errmsg("unable to create CDDB disc structure"); cddb_destroy(*pp_conn); return false; } for(i = 0; i < i_tracks; i++) { cddb_track_t *t = cddb_track_new(); cddb_track_set_frame_offset(t, cdio_get_track_lba(p_cdio, i+i_first_track)); cddb_disc_add_track(*pp_cddb_disc, t); } cddb_disc_set_length(*pp_cddb_disc, cdio_get_track_lba(p_cdio, CDIO_CDROM_LEADOUT_TRACK) / CDIO_CD_FRAMES_PER_SEC); if (!cddb_disc_calc_discid(*pp_cddb_disc)) { errmsg("libcddb calc discid failed."); cddb_destroy(*pp_conn); return false; } *i_cddb_matches = cddb_query(*pp_conn, *pp_cddb_disc); if (-1 == *i_cddb_matches) errmsg(cddb_error_str(cddb_errno(*pp_conn))); cddb_read(*pp_conn, *pp_cddb_disc); return true; } #endif /*HAVE_CDDB*/ libcdio-0.83/src/iso-info.help2man0000644000175000017500000000040611565177526013753 00000000000000[SYNOPSIS] .B iso-info \fIOPTION\fR... .TP Shows Information about an ISO 9660 image. [SEE ALSO] \&\f(CWcd-info(1)\fR for information about an ISO-9660 image. \&\f(CWcd-read(1)\fR to read portions of an ISO 9660 image. [AUTHOR] Rocky Bernstein libcdio-0.83/src/cd-read.c0000644000175000017500000004362611570772032012243 00000000000000/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Program to debug read routines audio, auto, mode1, mode2 forms 1 & 2. */ #include "util.h" #include #ifdef HAVE_SYS_STAT_H #include #endif #ifdef HAVE_FCNTL_H #include #endif #ifdef HAVE_ERRNO_H #include #endif #include "getopt.h" /* Configuration option codes */ enum { OP_HANDLED = 0, /* NOTE: libpopt version associated these with drivers. That appeared to be an unused historical artifact. */ OP_SOURCE_AUTO, OP_SOURCE_BIN, OP_SOURCE_CUE, OP_SOURCE_NRG, OP_SOURCE_CDRDAO, OP_SOURCE_DEVICE, OP_USAGE, /* These are the remaining configuration options */ OP_READ_MODE, OP_VERSION, }; typedef enum { READ_AUDIO = CDIO_READ_MODE_AUDIO, READ_M1F1 = CDIO_READ_MODE_M1F1, READ_M1F2 = CDIO_READ_MODE_M1F2, READ_M2F1 = CDIO_READ_MODE_M2F1, READ_M2F2 = CDIO_READ_MODE_M2F2, READ_MODE_UNINIT, READ_ANY } read_mode_t; /* Structure used so we can binary sort and set the --mode switch. */ typedef struct { char name[30]; read_mode_t read_mode; } subopt_entry_t; /* Sub-options for --mode. Note: entries must be sorted! */ static const subopt_entry_t modes_sublist[] = { {"any", READ_ANY}, {"audio", READ_AUDIO}, {"m1f1", READ_M1F1}, {"m1f2", READ_M1F2}, {"m2f1", READ_M2F1}, {"m2f2", READ_M2F2}, {"mode1form1", READ_M1F1}, {"mode1form2", READ_M1F2}, {"mode2form1", READ_M2F1}, {"mode2form2", READ_M2F2}, {"red", READ_AUDIO}, }; /* Used by `main' to communicate with `parse_opt'. And global options */ static struct arguments { char *access_mode; /* Access method driver should use for control */ char *output_file; /* file to output blocks if not NULL. */ int debug_level; int hexdump; /* Show output as a hexdump */ int nohexdump; /* Don't output as a hexdump. I don't know how to get popt to combine these as one variable. */ int just_hex; /* Don't try to print "printable" characters in hex dump. */ read_mode_t read_mode; int version_only; int no_header; int print_iso9660; source_image_t source_image; lsn_t start_lsn; lsn_t end_lsn; int num_sectors; } opts; static void hexdump (FILE *stream, uint8_t * buffer, unsigned int len, int just_hex) { unsigned int i; for (i = 0; i < len; i++, buffer++) { if (i % 16 == 0) fprintf (stream, "0x%04x: ", i); fprintf (stream, "%02x", *buffer); if (i % 2 == 1) fprintf (stream, " "); if (i % 16 == 15) { if (!just_hex) { uint8_t *p; fprintf (stream, " "); for (p=buffer-15; p <= buffer; p++) { fprintf(stream, "%c", isprint(*p) ? *p : '.'); } } fprintf (stream, "\n"); } } fprintf (stream, "\n"); fflush (stream); } /* Comparison function called by bearch() to find sub-option record. */ static int compare_subopts(const void *key1, const void *key2) { subopt_entry_t *a = (subopt_entry_t *) key1; subopt_entry_t *b = (subopt_entry_t *) key2; return (strncmp(a->name, b->name, 30)); } /* Do processing of a --mode sub option. Basically we find the option in the array, set it's corresponding flag variable to true as well as the "show.all" false. */ static void process_suboption(const char *subopt, const subopt_entry_t *sublist, const int num, const char *subopt_name) { subopt_entry_t *subopt_rec = bsearch(subopt, sublist, num, sizeof(subopt_entry_t), &compare_subopts); if (subopt_rec != NULL) { opts.read_mode = subopt_rec->read_mode; return; } else { unsigned int i; bool is_help=strcmp(subopt, "help")==0; if (is_help) { report( stderr, "The list of sub options for \"%s\" are:\n", subopt_name ); } else { report( stderr, "Invalid option following \"%s\": %s.\n", subopt_name, subopt ); report( stderr, "Should be one of: " ); } for (i=0; i= 0) switch (opt) { case 'a': opts.access_mode = strdup(optarg); break; case 'd': opts.debug_level = atoi(optarg); break; case 'x': opts.hexdump = 1; break; case 's': opts.start_lsn = atoi(optarg); break; case 'e': opts.end_lsn = atoi(optarg); break; case 'n': opts.num_sectors = atoi(optarg); break; case 'b': parse_source(OP_SOURCE_BIN); break; case 'c': parse_source(OP_SOURCE_CUE); break; case 'i': parse_source(OP_SOURCE_AUTO); break; case 'C': parse_source(OP_SOURCE_DEVICE); break; case 'N': parse_source(OP_SOURCE_NRG); break; case 't': parse_source(OP_SOURCE_CDRDAO); break; case 'o': opts.output_file = strdup(optarg); break; case 'm': process_suboption(optarg, modes_sublist, sizeof(modes_sublist) / sizeof(subopt_entry_t), "--mode"); break; case 'V': print_version(program_name, VERSION, 0, true); free(program_name); exit (EXIT_SUCCESS); break; case '?': fprintf(stdout, helpText, program_name); free(program_name); exit(EXIT_INFO); break; case OP_USAGE: fprintf(stderr, usageText, program_name); free(program_name); exit(EXIT_FAILURE); break; case OP_HANDLED: break; } if (optind < argc) { const char *remaining_arg = argv[optind++]; /* NOTE: A bug in the libpopt version checked source_image, which rendered the subsequent source_image test useless. */ if (source_name != NULL) { report( stderr, "%s: Source specified in option %s and as %s\n", program_name, source_name, remaining_arg ); free(program_name); exit (EXIT_FAILURE); } if (opts.source_image == INPUT_DEVICE) source_name = fillout_device_name(remaining_arg); else source_name = strdup(remaining_arg); if (optind < argc) { report( stderr, "%s: Source specified in previously %s and %s\n", program_name, source_name, remaining_arg ); free(program_name); exit (EXIT_FAILURE); } } if (opts.debug_level == 3) { cdio_loglevel_default = CDIO_LOG_INFO; } else if (opts.debug_level >= 4) { cdio_loglevel_default = CDIO_LOG_DEBUG; } if (opts.read_mode == READ_MODE_UNINIT) { report( stderr, "%s: Need to give a read mode " "(audio, m1f1, m1f2, m2f1, m2f2, or auto)\n", program_name ); free(program_name); exit(10); } /* Check consistency between start_lsn, end_lsn and num_sectors. */ if (opts.nohexdump && opts.hexdump != 2) { report( stderr, "%s: don't give both --hexdump and --no-hexdump together\n", program_name ); exit(13); } if (opts.nohexdump) opts.hexdump = 0; if (opts.start_lsn == CDIO_INVALID_LSN) { /* Maybe we derive the start from the end and num sectors. */ if (opts.end_lsn == CDIO_INVALID_LSN) { /* No start or end LSN, so use 0 for the start */ opts.start_lsn = 0; if (opts.num_sectors == 0) opts.num_sectors = 1; } else if (opts.num_sectors != 0) { if (opts.end_lsn <= opts.num_sectors) { report( stderr, "%s: end LSN (%lu) needs to be greater than " " the sector to read (%lu)\n", program_name, (unsigned long) opts.end_lsn, (unsigned long) opts.num_sectors ); exit(12); } opts.start_lsn = opts.end_lsn - opts.num_sectors + 1; } } /* opts.start_lsn has been set somehow or we've aborted. */ if (opts.end_lsn == CDIO_INVALID_LSN) { if (0 == opts.num_sectors) opts.num_sectors = 1; opts.end_lsn = opts.start_lsn + opts.num_sectors - 1; } else { /* We were given an end lsn. */ if (opts.end_lsn < opts.start_lsn) { report( stderr, "%s: end LSN (%lu) needs to be grater than start LSN (%lu)\n", program_name, (unsigned long) opts.start_lsn, (unsigned long) opts.end_lsn ); free(program_name); exit(13); } if (opts.num_sectors != opts.end_lsn - opts.start_lsn + 1) if (opts.num_sectors != 0) { report( stderr, "%s: inconsistency between start LSN (%lu), end (%lu), " "and count (%d)\n", program_name, (unsigned long) opts.start_lsn, (unsigned long) opts.end_lsn, opts.num_sectors ); free(program_name); exit(14); } opts.num_sectors = opts.end_lsn - opts.start_lsn + 1; } return true; } static void log_handler (cdio_log_level_t level, const char message[]) { if (level == CDIO_LOG_DEBUG && opts.debug_level < 2) return; if (level == CDIO_LOG_INFO && opts.debug_level < 1) return; if (level == CDIO_LOG_WARN && opts.debug_level < 0) return; gl_default_cdio_log_handler (level, message); } static void init(void) { opts.debug_level = 0; opts.start_lsn = CDIO_INVALID_LSN; opts.end_lsn = CDIO_INVALID_LSN; opts.num_sectors = 0; opts.read_mode = READ_MODE_UNINIT; opts.source_image = INPUT_UNKNOWN; opts.hexdump = 2; /* Not set. */ gl_default_cdio_log_handler = cdio_log_set_handler (log_handler); } int main(int argc, char *argv[]) { uint8_t buffer[CDIO_CD_FRAMESIZE_RAW] = { 0, }; unsigned int blocklen=CDIO_CD_FRAMESIZE_RAW; CdIo *p_cdio=NULL; int output_fd=-1; FILE *output_stream; init(); /* Parse our arguments; every option seen by `parse_opt' will be reflected in `arguments'. */ parse_options(argc, argv); print_version(program_name, VERSION, opts.no_header, opts.version_only); p_cdio = open_input(source_name, opts.source_image, opts.access_mode); if (opts.output_file!=NULL) { /* If hexdump not explicitly set, then don't produce hexdump when writing to a file. */ if (opts.hexdump == 2) opts.hexdump = 0; output_fd = open(opts.output_file, O_WRONLY|O_CREAT|O_TRUNC, 0644); if (-1 == output_fd) { err_exit("Error opening output file %s: %s\n", opts.output_file, strerror(errno)); } } else /* If we are writing to stdout, then the default is to produce a hexdump. */ if (opts.hexdump == 2) opts.hexdump = 1; for ( ; opts.start_lsn <= opts.end_lsn; opts.start_lsn++ ) { switch (opts.read_mode) { case READ_AUDIO: case READ_M1F1: case READ_M1F2: case READ_M2F1: case READ_M2F2: if (DRIVER_OP_SUCCESS != cdio_read_sector(p_cdio, &buffer, opts.start_lsn, (cdio_read_mode_t) opts.read_mode)) { report( stderr, "error reading block %u\n", (unsigned int) opts.start_lsn ); blocklen = 0; } else { switch (opts.read_mode) { case READ_M1F1: blocklen=CDIO_CD_FRAMESIZE; break; case READ_M1F2: blocklen=M2RAW_SECTOR_SIZE; break; case READ_M2F1: blocklen=CDIO_CD_FRAMESIZE; break; case READ_M2F2: blocklen=M2F2_SECTOR_SIZE; break; default: ; } } break; case READ_ANY: { driver_id_t driver_id = cdio_get_driver_id(p_cdio); if (cdio_is_device(source_name, driver_id)) { if (DRIVER_OP_SUCCESS != mmc_read_sectors(p_cdio, &buffer, opts.start_lsn, CDIO_MMC_READ_TYPE_ANY, 1)) { report( stderr, "error reading block %u\n", (unsigned int) opts.start_lsn ); blocklen = 0; } } else { err_exit( "%s: mode 'any' must be used with a real CD-ROM, not an image file.\n", program_name); } } break; case READ_MODE_UNINIT: err_exit("%s: Reading mode not set\n", program_name); break; } if (!opts.output_file) { output_stream = stdout; } else { output_stream = fdopen(output_fd, "w"); } if (opts.hexdump) hexdump(output_stream, buffer, blocklen, opts.just_hex); else if (opts.output_file) { ssize_t bytes_ret; bytes_ret = write(output_fd, buffer, blocklen); } else { unsigned int i; for (i=0; i libcdio-0.83/src/iso-info.c0000644000175000017500000002517011571231451012455 00000000000000/* $Id: iso-info.c,v 1.40 2008/06/19 15:44:16 flameeyes Exp $ Copyright (C) 2004, 2005, 2006, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* ISO Info - prints various information about a ISO 9660 image. */ #include "getopt.h" #include "util.h" #undef err_exit #define err_exit(fmt, args...) \ report (stderr, "%s: "fmt, program_name, ##args); \ iso9660_close(p_iso); \ free(program_name); \ return(EXIT_FAILURE); #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include #include #include #include #include #ifdef HAVE_UNISTD_H #include #endif #include #include #if 0 #define STRONG "\033[1m" #define NORMAL "\033[0m" #else #define STRONG "__________________________________\n" #define NORMAL "" #endif /* Used by `main' to communicate with `parse_opt'. And global options */ static struct arguments { uint32_t debug_level; int version_only; int silent; int no_header; int no_joliet; int no_xa; int no_rock_ridge; int print_iso9660; int print_iso9660_short; } opts; /* Configuration option codes */ enum { OP_HANDLED = 0, OP_USAGE, /* These are the remaining configuration options */ OP_VERSION, }; /* Parse a all options. */ static bool parse_options (int argc, char *argv[]) { int opt; static const char helpText[] = "Usage: %s [OPTION...]\n" " -d, --debug=INT Set debugging to LEVEL\n" " -i, --input[=FILE] Filename to read ISO-9960 image from\n" " -f Generate output similar to 'find . -print'\n" " -l, --iso9660 Generate output similar to 'ls -lR'\n" " --no-header Don't display header and copyright (for regression\n" " testing)\n" #ifdef HAVE_JOLIET " --no-joliet Don't use Joliet-extension information\n" #endif /*HAVE_JOLIET*/ " --no-rock-ridge Don't use Rock-Ridge-extension information\n" " --no-xa Don't use XA-extension information\n" " -q, --quiet Don't produce warning output\n" " -V, --version display version and copyright information and exit\n" "\n" "Help options:\n" " -?, --help Show this help message\n" " --usage Display brief usage message\n"; static const char usageText[] = "Usage: %s [-d|--debug INT] [-i|--input FILE] [-f] [-l|--iso9660]\n" " [--no-header] [--no-joliet] [--no-rock-ridge] [--no-xa] [-q|--quiet]\n" " [-V|--version] [-?|--help] [--usage]\n"; static const char optionsString[] = "d:i::flqV?"; static const struct option optionsTable[] = { {"debug", required_argument, NULL, 'd'}, {"input", optional_argument, NULL, 'i'}, {"iso9660", no_argument, NULL, 'l'}, {"no-header", no_argument, &opts.no_header, 1 }, #ifdef HAVE_JOLIET {"no-joliet", no_argument, &opts.no_joliet, 1 }, #endif /*HAVE_JOLIET*/ {"no-rock-ridge", no_argument, &opts.no_rock_ridge, 1 }, {"no-xa", no_argument, &opts.no_xa, 1 }, {"quiet", no_argument, NULL, 'q'}, {"version", no_argument, NULL, 'V'}, {"help", no_argument, NULL, '?' }, {"usage", no_argument, NULL, OP_USAGE }, { NULL, 0, NULL, 0 } }; program_name = strrchr(argv[0],'/'); program_name = program_name ? strdup(program_name+1) : strdup(argv[0]); while ((opt = getopt_long(argc, argv, optionsString, optionsTable, NULL)) >= 0) { switch (opt) { case 'd': opts.debug_level = atoi(optarg); break; case 'i': if (optarg != NULL) source_name = strdup(optarg); break; case 'f': opts.print_iso9660_short = 1; break; case 'l': opts.print_iso9660 = 1; break; case 'q': opts.silent = 1; break; case 'V': opts.version_only = 1; break; case '?': fprintf(stdout, helpText, program_name); free(program_name); exit(EXIT_INFO); break; case OP_USAGE: fprintf(stderr, usageText, program_name); free(program_name); exit(EXIT_FAILURE); break; case OP_HANDLED: break; } } if (optind < argc) { const char *remaining_arg = argv[optind++]; if ( optind < argc ) { report( stderr, "%s: Source specified in previously %s and %s\n", program_name, source_name, remaining_arg ); free(program_name); exit (EXIT_FAILURE); } source_name = strdup(remaining_arg); } return true; } /* CDIO logging routines */ static void _log_handler (cdio_log_level_t level, const char message[]) { if (level == CDIO_LOG_DEBUG && opts.debug_level < 2) return; if (level == CDIO_LOG_INFO && opts.debug_level < 1) return; if (level == CDIO_LOG_WARN && opts.silent) return; gl_default_cdio_log_handler (level, message); } static void print_iso9660_recurse (iso9660_t *p_iso, const char psz_path[]) { CdioList_t *entlist; CdioList_t *dirlist = _cdio_list_new (); CdioListNode_t *entnode; uint8_t i_joliet_level = iso9660_ifs_get_joliet_level(p_iso); char *translated_name = (char *) malloc(4096); size_t translated_name_size = 4096; entlist = iso9660_ifs_readdir (p_iso, psz_path); if (opts.print_iso9660) { printf ("%s:\n", psz_path); } if (NULL == entlist) { free(translated_name); free(dirlist); report( stderr, "Error getting above directory information\n" ); return; } /* Iterate over files in this directory */ _CDIO_LIST_FOREACH (entnode, entlist) { iso9660_stat_t *p_statbuf = _cdio_list_node_data (entnode); char *psz_iso_name = p_statbuf->filename; char _fullname[4096] = { 0, }; if (strlen(psz_iso_name) >= translated_name_size) { translated_name_size = strlen(psz_iso_name)+1; free(translated_name); translated_name = (char *) malloc(translated_name_size); if (!translated_name) { report( stderr, "Error allocating memory\n" ); return; } } if (yep != p_statbuf->rr.b3_rock || 1 == opts.no_rock_ridge) { iso9660_name_translate_ext(psz_iso_name, translated_name, i_joliet_level); snprintf (_fullname, sizeof (_fullname), "%s%s", psz_path, translated_name); } else { snprintf (_fullname, sizeof (_fullname), "%s%s", psz_path, psz_iso_name); } strncat (_fullname, "/", sizeof (_fullname)); if (p_statbuf->type == _STAT_DIR && strcmp (psz_iso_name, ".") && strcmp (psz_iso_name, "..")) _cdio_list_append (dirlist, strdup (_fullname)); if (opts.print_iso9660) { print_fs_attrs(p_statbuf, 0 == opts.no_rock_ridge, iso9660_ifs_is_xa(p_iso) && 0 == opts.no_xa, psz_iso_name, translated_name); } else if ( strcmp (psz_iso_name, ".") && strcmp (psz_iso_name, "..")) printf("%9u %s%s\n", (unsigned int) p_statbuf->size, psz_path, yep == p_statbuf->rr.b3_rock ? psz_iso_name : translated_name); if (p_statbuf->rr.i_symlink) { free(p_statbuf->rr.psz_symlink); p_statbuf->rr.i_symlink = 0; } } free (translated_name); _cdio_list_free (entlist, true); if (opts.print_iso9660) { printf ("\n"); } /* Now recurse over the directories. */ _CDIO_LIST_FOREACH (entnode, dirlist) { char *_fullname = _cdio_list_node_data (entnode); print_iso9660_recurse (p_iso, _fullname); } _cdio_list_free (dirlist, true); } static void print_iso9660_fs (iso9660_t *iso) { print_iso9660_recurse (iso, "/"); } /* Initialize global variables. */ static void init(void) { gl_default_cdio_log_handler = cdio_log_set_handler (_log_handler); /* Default option values. */ opts.silent = false; opts.no_header = false; opts.no_joliet = 0; opts.no_rock_ridge = 0; opts.no_xa = 0; opts.debug_level = 0; opts.print_iso9660 = 0; opts.print_iso9660_short = 0; } #define print_vd_info(title, fn) \ if (fn(p_iso, &psz_str)) { \ printf(title ": %s\n", psz_str); \ } \ free(psz_str); \ psz_str = NULL; /* ------------------------------------------------------------------------ */ int main(int argc, char *argv[]) { iso9660_t *p_iso=NULL; iso_extension_mask_t iso_extension_mask = ISO_EXTENSION_ALL; init(); /* Parse our arguments; every option seen by `parse_opt' will be reflected in `arguments'. */ parse_options(argc, argv); print_version(program_name, CDIO_VERSION, opts.no_header, opts.version_only); if (opts.debug_level == 3) { cdio_loglevel_default = CDIO_LOG_INFO; } else if (opts.debug_level >= 4) { cdio_loglevel_default = CDIO_LOG_DEBUG; } if (source_name==NULL) { err_exit("No input device given/found%s\n", ""); } if (opts.no_joliet) { iso_extension_mask &= ~ISO_EXTENSION_JOLIET; } p_iso = iso9660_open_ext (source_name, iso_extension_mask); if (p_iso==NULL) { free(source_name); err_exit("Error in opening ISO-9660 image%s\n", ""); } if (opts.silent == 0) { char *psz_str = NULL; printf(STRONG "ISO 9660 image: %s\n", source_name); print_vd_info("Application", iso9660_ifs_get_application_id); print_vd_info("Preparer ", iso9660_ifs_get_preparer_id); print_vd_info("Publisher ", iso9660_ifs_get_publisher_id); print_vd_info("System ", iso9660_ifs_get_system_id); print_vd_info("Volume ", iso9660_ifs_get_volume_id); print_vd_info("Volume Set ", iso9660_ifs_get_volumeset_id); } if (opts.print_iso9660 || opts.print_iso9660_short) { printf(STRONG "ISO-9660 Information\n" NORMAL); if (opts.print_iso9660 && opts.print_iso9660_short) { printf("Note: both -f and -l options given -- " "-l (long listing) takes precidence\n"); } print_iso9660_fs(p_iso); } free(source_name); iso9660_close(p_iso); /* Not reached:*/ free(program_name); return(EXIT_SUCCESS); } libcdio-0.83/src/Makefile.am0000644000175000017500000000645711565177606012647 00000000000000# $Id: Makefile.am,v 1.48 2008/08/31 13:38:22 flameeyes Exp $ # # Copyright (C) 2003, 2004, 2006, 2008 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . GETOPT_C = getopt.c getopt1.c noinst_HEADERS = cddb.h getopt.h util.h #################################################### # Things to make the utility/diagnostic programs #################################################### if BUILD_CD_PARANOIA SUBDIRS = cd-paranoia endif CDDB_LIBS=@CDDB_LIBS@ CDDA_PLAYER_LIBS=@CDDA_PLAYER_LIBS@ if BUILD_CDDA_PLAYER cdda_player_SOURCES = cdda-player.c cddb.c cddb.h $(GETOPT_C) cdda_player_LDADD = $(LIBCDIO_LIBS) $(CDDB_LIBS) $(CDDA_PLAYER_LIBS) bin_cdda_player = cdda-player endif if BUILD_CD_DRIVE cd_drive_SOURCES = cd-drive.c util.c util.h $(GETOPT_C) cd_drive_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) bin_cd_drive = cd-drive man_cd_drive = cd-drive.1 endif if BUILD_CDINFO cd_info_SOURCES = cd-info.c cddb.c cddb.h util.c util.h $(GETOPT_C) cd_info_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(CDDB_LIBS) $(VCDINFO_LIBS) $(LTLIBICONV) bin_cd_info = cd-info man_cd_info = cd-info.1 endif if BUILD_CDINFO_LINUX cdinfo_linux_SOURCES = cdinfo-linux.c cdinfo_linux_LDADD = $(LIBCDIO_LIBS) bin_cdinfo_linux = cdinfo-linux endif if BUILD_CD_READ cd_read_SOURCES = cd-read.c util.c util.h $(GETOPT_C) cd_read_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) bin_cd_read = cd-read man_cd_read = cd-read.1 endif if BUILD_ISO_INFO iso_info_SOURCES = iso-info.c util.c util.h $(GETOPT_C) iso_info_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) bin_iso_info = iso-info man_iso_info = iso-info.1 endif if BUILD_ISO_READ iso_read_SOURCES = iso-read.c util.c util.h $(GETOPT_C) iso_read_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) bin_iso_read = iso-read man_iso_read = iso-read.1 endif mmc_tool_SOURCES = mmc-tool.c util.c util.h $(GETOPT_C) mmc_tool_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) bin_mmc_tool = mmc-tool bin_PROGRAMS = $(bin_cd_drive) $(bin_cd_info) $(bin_cdinfo_linux) $(bin_cd_read) $(bin_iso_info) $(bin_iso_read) $(bin_cdda_player) $(bin_mmc_tool) INCLUDES = -I$(top_srcdir) $(LIBCDIO_CFLAGS) $(VCDINFO_CFLAGS) $(CDDB_CFLAGS) man_MANS = $(man_cd_drive) $(man_cd_info) $(man_cd_read) $(man_iso_read) $(man_iso_info) EXTRA_DIST = cd-drive.help2man cd-info.help2man cd-read.help2man \ iso-info.help2man iso-read.help2man $(GETOPT_C) getopt.h \ $(man_MANS) if MAINTAINER_MODE $(man_MANS): %.1: %$(EXEEXT) %.help2man -$(HELP2MAN) --opt-include=$(srcdir)/$(<:.exe=).help2man --no-info --output=$@ ./$< endif MAINTAINERCLEANFILES = $(man_MANS) *.rej *.orig libcdio-0.83/src/cd-info.10000644000175000017500000000702511652140342012164 00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.38.4. .TH LT-CD-INFO "1" "October 2011" "lt-cd-info version 0.83 i686-pc-linux-gnu" "User Commands" .SH NAME lt-cd-info \- manual page for lt-cd-info version 0.83 i686-pc-linux-gnu .SH SYNOPSIS .B cd-info \fIOPTION\fR... .TP Shows Information about a CD or CD-image. .SH DESCRIPTION .TP \fB\-a\fR, \fB\-\-access\-mode\fR=\fISTRING\fR Set CD access method .TP \fB\-d\fR, \fB\-\-debug\fR=\fIINT\fR Set debugging to LEVEL .TP \fB\-T\fR, \fB\-\-no\-tracks\fR Don't show track information .TP \fB\-A\fR, \fB\-\-no\-analyze\fR Don't filesystem analysis .TP \fB\-\-no\-cddb\fR Don't look up audio CDDB information or print it .TP \fB\-P\fR, \fB\-\-cddb\-port\fR=\fIINT\fR CDDB port number to use (default 8880) .TP \fB\-H\fR, \fB\-\-cddb\-http\fR Lookup CDDB via HTTP proxy (default no proxy) .TP \fB\-\-cddb\-server\fR=\fISTRING\fR CDDB server to contact for information (default: freedb.freedb.org) .TP \fB\-\-cddb\-cache\fR=\fISTRING\fR Location of CDDB cache directory (default ~/.cddbclient) .TP \fB\-\-cddb\-email\fR=\fISTRING\fR Email address to give CDDB server (default me@home) .TP \fB\-\-no\-cddb\-cache\fR Disable caching of CDDB entries locally (default caches) .TP \fB\-\-cddb\-timeout\fR=\fIINT\fR CDDB timeout value in seconds (default 10 seconds) .TP \fB\-\-no\-device\-info\fR Don't show device info, just CD info .TP \fB\-\-no\-disc\-mode\fR Don't show disc\-mode info .TP \fB\-\-dvd\fR Attempt to give DVD information if a DVD is found. .TP \fB\-v\fR, \fB\-\-no\-vcd\fR Don't look up Video CD information \- for this build, this is always set .TP \fB\-I\fR, \fB\-\-no\-ioctl\fR Don't show ioctl() information .TP \fB\-b\fR, \fB\-\-bin\-file\fR[=\fIFILE\fR] set "bin" CD\-ROM disk image file as source .TP \fB\-c\fR, \fB\-\-cue\-file\fR[=\fIFILE\fR] set "cue" CD\-ROM disk image file as source .TP \fB\-N\fR, \fB\-\-nrg\-file\fR[=\fIFILE\fR] set Nero CD\-ROM disk image file as source .TP \fB\-t\fR, \fB\-\-toc\-file\fR[=\fIFILE\fR] set cdrdao CD\-ROM disk image file as source .TP \fB\-i\fR, \fB\-\-input\fR[=\fIFILE\fR] set source and determine if "bin" image or device .TP \fB\-\-iso9660\fR print directory contents of any ISO\-9660 filesystems .TP \fB\-C\fR, \fB\-\-cdrom\-device\fR[=\fIDEVICE\fR] set CD\-ROM device as source .TP \fB\-l\fR, \fB\-\-list\-drives\fR Give a list of CD\-drives .TP \fB\-\-no\-header\fR Don't display header and copyright (for regression testing) .TP \fB\-\-no\-joliet\fR Don't use Joliet extensions .TP \fB\-\-no\-rock\-ridge\fR Don't use Rock\-Ridge\-extension information .TP \fB\-\-no\-xa\fR Don't use XA\-extension information .TP \fB\-q\fR, \fB\-\-quiet\fR Don't produce warning output .TP \fB\-V\fR, \fB\-\-version\fR display version and copyright information and exit .SS "Help options:" .TP \-?, \fB\-\-help\fR Show this help message .TP \fB\-\-usage\fR Display brief usage message .SH AUTHOR Rocky Bernstein rocky@gnu.org, based on the cdinfo program by Gerd Knorr and Heiko Eissfeldt .SH COPYRIGHT Copyright \(co 2003, 2004, 2005, 2007, 2008, 2011 R. Bernstein .br This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Have driver: GNU/Linux ioctl and MMC driver Have driver: cdrdao (TOC) disk image driver Have driver: bin/cuesheet disk image driver Have driver: Nero NRG disk image driver Default CD\-ROM device: /dev/scd0 .SH "SEE ALSO" \&\f(CWcd-drive(1)\fR for CD-ROM characteristics; \&\f(CWiso-info(1)\fR for information about an ISO-9660 image. libcdio-0.83/src/iso-read.10000644000175000017500000000320411652140342012343 00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.38.4. .TH LT-ISO-READ "1" "October 2011" "lt-iso-read version 0.83 i686-pc-linux-gnu" "User Commands" .SH NAME lt-iso-read \- manual page for lt-iso-read version 0.83 i686-pc-linux-gnu .SH SYNOPSIS .B iso-read \fIOPTION\fR... .TP Reads portions of an ISO 9660 image. .SH DESCRIPTION .TP \fB\-d\fR, \fB\-\-debug\fR=\fIINT\fR Set debugging to LEVEL. .TP \fB\-i\fR, \fB\-\-image\fR=\fIFILE\fR Read from ISO\-9660 image. This option is mandatory .TP \fB\-e\fR, \fB\-\-extract\fR=\fIFILE\fR Extract FILE from ISO\-9660 image. This option is mandatory. .TP \fB\-k\fR, \fB\-\-ignore\fR Ignore read error(s), i.e. keep going .TP \fB\-\-no\-header\fR Don't display header and copyright (for regression testing) .TP \fB\-o\fR, \fB\-\-output\-file\fR=\fIFILE\fR Output file. This option is mandatory. .TP \fB\-V\fR, \fB\-\-version\fR display version and copyright information and exit .SS "Help options:" .TP \-?, \fB\-\-help\fR Show this help message .TP \fB\-\-usage\fR Display brief usage message .SH AUTHOR Rocky Bernstein .SH COPYRIGHT Copyright \(co 2003, 2004, 2005, 2007, 2008, 2011 R. Bernstein .br This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Have driver: GNU/Linux ioctl and MMC driver Have driver: cdrdao (TOC) disk image driver Have driver: bin/cuesheet disk image driver Have driver: Nero NRG disk image driver Default CD\-ROM device: /dev/scd0 .SH "SEE ALSO" \&\f(CWiso-info(1)\fR for information about an ISO-9660 image. \&\f(CWcd-read(1)\fR to read portions of an ISO 9660 image. libcdio-0.83/src/cd-info.c0000644000175000017500000012045311650107753012256 00000000000000/* Copyright (C) 2003, 2004, 2005, 2007, 2008, 2011 Rocky Bernstein Copyright (C) 1996, 1997, 1998 Gerd Knorr and Heiko Eifeldt This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* CD Info - prints various information about a CD, and detects the type of the CD. */ #include "util.h" #include "getopt.h" #include #ifdef HAVE_STRINGS_H #include #endif #ifdef HAVE_CDDB #include #include "cddb.h" #endif #ifdef HAVE_VCDINFO #include #include #include #endif #include #include #include #include #include #include #include #include #include "cdio_assert.h" #include #ifdef __linux__ # include # include # if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,50) # include # endif #endif #include #define STRONG "__________________________________\n" #define NORMAL "" #if CDIO_IOCTL_FINISHED static struct cdrom_multisession ms; static struct cdrom_subchnl sub; #endif /* Used by `main' to communicate with `parse_opt'. And global options */ static struct opts_s { int no_tracks; int no_ioctl; int no_analysis; char *access_mode; /* Access method driver should use for control */ int no_cddb; /* If set the below are meaningless. */ int no_vcd; int show_dvd; int no_device; int no_disc_mode; uint32_t debug_level; int version_only; int silent; int no_header; int no_joliet; int no_xa; int no_rock_ridge; int print_iso9660; int list_drives; source_image_t source_image; } opts; /* Configuration option codes */ enum { OP_HANDLED = 0, OP_SOURCE_UNDEF, OP_SOURCE_AUTO, OP_SOURCE_BIN, OP_SOURCE_CUE, OP_SOURCE_CDRDAO, OP_SOURCE_NRG , OP_SOURCE_DEVICE, OP_CDDB_SERVER, OP_CDDB_CACHE, OP_CDDB_EMAIL, OP_CDDB_NOCACHE, OP_CDDB_TIMEOUT, OP_USAGE, /* These are the remaining configuration options */ OP_VERSION, }; /* Parse source options. */ static void parse_source(int opt) { /* NOTE: The libpopt version made use of an extra temporary variable (psz_my_source) for all sources _except_ devices. This distinction seemed to serve no purpose. */ if (opts.source_image != INPUT_UNKNOWN) { report(stderr, "%s: another source type option given before.\n", program_name); report(stderr, "%s: give only one source type option.\n", program_name); return; } /* For all input sources which are not a DEVICE, we need to make a copy of the string; for a DEVICE the fill-out routine makes the copy. */ if (OP_SOURCE_DEVICE != opt) if (optarg != NULL) source_name = strdup(optarg); switch (opt) { case OP_SOURCE_BIN: opts.source_image = INPUT_BIN; break; case OP_SOURCE_CUE: opts.source_image = INPUT_CUE; break; case OP_SOURCE_CDRDAO: opts.source_image = INPUT_CDRDAO; break; case OP_SOURCE_NRG: opts.source_image = INPUT_NRG; break; case OP_SOURCE_AUTO: opts.source_image = INPUT_AUTO; break; case OP_SOURCE_DEVICE: opts.source_image = INPUT_DEVICE; if (optarg != NULL) source_name = fillout_device_name(optarg); break; } } /* Parse all options. */ static bool parse_options (int argc, char *argv[]) { int opt; /* used for argument parsing */ static const char helpText[] = "Usage: %s [OPTION...]\n" " -a, --access-mode=STRING Set CD access method\n" " -d, --debug=INT Set debugging to LEVEL\n" " -T, --no-tracks Don't show track information\n" " -A, --no-analyze Don't filesystem analysis\n" #ifdef HAVE_CDDB " --no-cddb Don't look up audio CDDB information\n" " or print it\n" " -P, --cddb-port=INT CDDB port number to use (default 8880)\n" " -H, --cddb-http Lookup CDDB via HTTP proxy (default no\n" " proxy)\n" " --cddb-server=STRING CDDB server to contact for information\n" " (default: freedb.freedb.org)\n" " --cddb-cache=STRING Location of CDDB cache directory\n" " (default ~/.cddbclient)\n" " --cddb-email=STRING Email address to give CDDB server\n" " (default me@home)\n" " --no-cddb-cache Disable caching of CDDB entries\n" " locally (default caches)\n" " --cddb-timeout=INT CDDB timeout value in seconds\n" " (default 10 seconds)\n" #else " --no-cddb Does nothing since this program is not\n" " -P, --cddb-port=INT CDDB-enabled\n" " -H, --cddb-http\n" " --cddb-server=STRING\n" " --cddb-cache=STRING\n" " --cddb-email=STRING\n" " --no-cddb-cache\n" " --cddb-timeout=INT\n" #endif " --no-device-info Don't show device info, just CD info\n" " --no-disc-mode Don't show disc-mode info\n" " --dvd Attempt to give DVD information if a DVD is\n" " found.\n" #ifdef HAVE_VCDINFO " -v, --no-vcd Don't look up Video CD information\n" #else " -v, --no-vcd Don't look up Video CD information - for\n" " this build, this is always set\n" #endif " -I, --no-ioctl Don't show ioctl() information\n" " -b, --bin-file[=FILE] set \"bin\" CD-ROM disk image file as source\n" " -c, --cue-file[=FILE] set \"cue\" CD-ROM disk image file as source\n" " -N, --nrg-file[=FILE] set Nero CD-ROM disk image file as source\n" " -t, --toc-file[=FILE] set cdrdao CD-ROM disk image file as source\n" " -i, --input[=FILE] set source and determine if \"bin\" image or\n" " device\n" " --iso9660 print directory contents of any ISO-9660\n" " filesystems\n" " -C, --cdrom-device[=DEVICE] set CD-ROM device as source\n" " -l, --list-drives Give a list of CD-drives\n" " --no-header Don't display header and copyright (for\n" " regression testing)\n" #ifdef HAVE_JOLIET " --no-joliet Don't use Joliet extensions\n" #endif " --no-rock-ridge Don't use Rock-Ridge-extension information\n" " --no-xa Don't use XA-extension information\n" " -q, --quiet Don't produce warning output\n" " -V, --version display version and copyright information\n" " and exit\n" "\n" "Help options:\n" " -?, --help Show this help message\n" " --usage Display brief usage message\n"; static const char usageText[] = "Usage: %s [-a|--access-mode STRING] [-d|--debug INT] [-T|--no-tracks]\n" " [-A|--no-analyze] [--no-cddb] [-P|--cddb-port INT] [-H|--cddb-http]\n" " [--cddb-server=STRING] [--cddb-cache=STRING] [--cddb-email=STRING]\n" " [--no-cddb-cache] [--cddb-timeout=INT] [--no-device-info]\n" " [--no-disc-mode] [--dvd] [-v|--no-vcd] [-I|--no-ioctl]\n" " [-b|--bin-file FILE] [-c|--cue-file FILE] [-N|--nrg-file FILE]\n" " [-t|--toc-file FILE] [-i|--input FILE] [--iso9660]\n" " [-C|--cdrom-device DEVICE] [-l|--list-drives] [--no-header]\n" " [--no-joliet] [--no-rock-ridge] [--no-xa] [-q|--quiet] [-V|--version]\n" " [-?|--help] [--usage]\n"; static const char optionsString[] = "a:d:TAP:HvIb::c::N::t::i::C::lqV?"; static const struct option optionsTable[] = { {"access-mode", required_argument, NULL, 'a'}, {"debug", required_argument, NULL, 'd' }, {"no-tracks", no_argument, NULL, 'T' }, {"no-analyze", no_argument, NULL, 'A' }, {"no-cddb", no_argument, &opts.no_cddb, 1 }, {"cddb-port", required_argument, NULL, 'P' }, {"cddb-http", no_argument, NULL, 'H' }, {"cddb-server", required_argument, NULL, OP_CDDB_SERVER }, {"cddb-cache", required_argument, NULL, OP_CDDB_CACHE }, {"cddb-email", required_argument, NULL, OP_CDDB_EMAIL }, {"no-cddb-cache", no_argument, NULL, OP_CDDB_NOCACHE }, {"cddb-timeout", required_argument, NULL, OP_CDDB_TIMEOUT }, {"no-device-info", no_argument, &opts.no_device, 1 }, {"no-disc-mode", no_argument, &opts.no_disc_mode, 1 }, {"dvd", no_argument, &opts.show_dvd, 1 }, {"no-vcd", no_argument, NULL, 'v' }, {"no-ioctl", no_argument, NULL, 'I' }, {"bin-file", optional_argument, NULL, 'b' }, {"cue-file", optional_argument, NULL, 'c' }, {"nrg-file", optional_argument, NULL, 'N' }, {"toc-file", optional_argument, NULL, 't' }, {"input", optional_argument, NULL, 'i' }, {"iso9660", no_argument, &opts.print_iso9660, 1 }, {"cdrom-device", optional_argument, NULL, 'C' }, {"list-drives", no_argument, NULL, 'l' }, {"no-header", no_argument, &opts.no_header, 1 }, #ifdef HAVE_JOLIET {"no-joliet", no_argument, &opts.no_joliet, 1 }, #endif /*HAVE_JOLIET*/ {"no-rock-ridge", no_argument, &opts.no_rock_ridge, 1 }, {"no-xa", no_argument, &opts.no_xa, 1 }, {"quiet", no_argument, NULL, 'q' }, {"version", no_argument, NULL, 'V' }, {"help", no_argument, NULL, '?' }, {"usage", no_argument, NULL, OP_USAGE }, { NULL, 0, NULL, 0 } }; program_name = strrchr(argv[0],'/'); program_name = program_name ? strdup(program_name+1) : strdup(argv[0]); while ((opt = getopt_long(argc, argv, optionsString, optionsTable, NULL)) >= 0) { switch (opt) { case 'a': opts.access_mode = strdup(optarg); break; case 'd': opts.debug_level = atoi(optarg); break; case 'T': opts.no_tracks = 1; break; case 'A': opts.no_analysis = 1; break; #ifdef HAVE_CDDB case 'P': cddb_opts.port = atoi(optarg); break; case 'H': cddb_opts.http = 1; break; case OP_CDDB_SERVER: cddb_opts.server = strdup(optarg); break; case OP_CDDB_CACHE: cddb_opts.cachedir = strdup(optarg); break; case OP_CDDB_EMAIL: cddb_opts.email = strdup(optarg); break; case OP_CDDB_NOCACHE: cddb_opts.disable_cache = 1; break; case OP_CDDB_TIMEOUT: cddb_opts.timeout = atoi(optarg); break; #endif case 'v': opts.no_vcd = 1; break; case 'I': opts.no_ioctl = 1; break; case 'b': parse_source(OP_SOURCE_BIN); break; case 'c': parse_source(OP_SOURCE_CUE); break; case 'N': parse_source(OP_SOURCE_NRG); break; case 't': parse_source(OP_SOURCE_CDRDAO); break; case 'i': parse_source(OP_SOURCE_AUTO); break; case 'C': parse_source(OP_SOURCE_DEVICE); break; case 'l': opts.list_drives = 1; break; case 'q': opts.silent = 1; break; case 'V': opts.version_only = 1; break; case '?': fprintf(stdout, helpText, program_name); free(program_name); exit(EXIT_INFO); break; case OP_USAGE: fprintf(stderr, usageText, program_name); free(program_name); exit(EXIT_FAILURE); break; case OP_HANDLED: break; } } if (optind < argc) { const char *remaining_arg = argv[optind++]; if (source_name != NULL) { report(stderr, "%s: Source '%s' given as an argument of an option and as " "unnamed option '%s'\n", program_name, source_name, remaining_arg); free(program_name); exit (EXIT_FAILURE); } if (opts.source_image == INPUT_DEVICE) source_name = fillout_device_name(remaining_arg); else source_name = strdup(remaining_arg); if (optind < argc) { report(stderr, "%s: Source specified in previously %s and %s\n", program_name, source_name, remaining_arg); free(program_name); exit (EXIT_FAILURE); } } return true; } /* CDIO logging routines */ #ifdef HAVE_CDDB static cddb_log_handler_t gl_default_cddb_log_handler = NULL; #endif #ifdef HAVE_VCDINFO static vcd_log_handler_t gl_default_vcd_log_handler = NULL; #endif static void _log_handler (cdio_log_level_t level, const char message[]) { if (level == CDIO_LOG_DEBUG && opts.debug_level < 2) return; if (level == CDIO_LOG_INFO && opts.debug_level < 1) return; if (level == CDIO_LOG_WARN && opts.silent) return; gl_default_cdio_log_handler (level, message); } #ifdef HAVE_CDDB static void _cddb_log_handler (cddb_log_level_t level, const char message[]) { /* CDDB errors should not be considered fatal. */ if (level == CDDB_LOG_ERROR) level = CDIO_LOG_WARN; /* Might consider doing some sort of CDDB to cdio to log level conversion, but right now it's a no op. */ _log_handler(level, message); } #endif static void print_cdtext_track_info(CdIo_t *p_cdio, track_t i_track, const char *psz_msg) { cdtext_t *p_cdtext = cdio_get_cdtext(p_cdio, i_track); if (NULL != p_cdtext) { cdtext_field_t i; printf("%s\n", psz_msg); for (i=0; i < MAX_CDTEXT_FIELDS; i++) { if (p_cdtext->field[i]) { printf("\t%s: %s\n", cdtext_field2str(i), p_cdtext->field[i]); } } } cdtext_destroy(p_cdtext); } static void print_cdtext_info(CdIo_t *p_cdio, track_t i_tracks, track_t i_first_track) { track_t i_last_track = i_first_track+i_tracks; print_cdtext_track_info(p_cdio, 0, "\nCD-TEXT for Disc:"); for ( ; i_first_track < i_last_track; i_first_track++ ) { char msg[50]; sprintf(msg, "CD-TEXT for Track %2d:", i_first_track); print_cdtext_track_info(p_cdio, i_first_track, msg); } } #ifdef HAVE_CDDB static void cddb_errmsg(const char *msg) { report(stderr, "%s: %s\n", program_name, msg); } static void print_cddb_info(CdIo_t *p_cdio, track_t i_tracks, track_t i_first_track) { int i, i_cddb_matches = 0; cddb_conn_t *p_conn = NULL; cddb_disc_t *p_cddb_disc = NULL; if ( init_cddb(p_cdio, &p_conn, &p_cddb_disc, cddb_errmsg, i_first_track, i_tracks, &i_cddb_matches) ) { if (-1 == i_cddb_matches) printf("%s: %s\n", program_name, cddb_error_str(cddb_errno(p_conn))); else { printf("%s: Found %d matches in CDDB\n", program_name, i_cddb_matches); for (i=1; i<=i_cddb_matches; i++) { cddb_disc_print(p_cddb_disc); cddb_query_next(p_conn, p_cddb_disc); if (i != i_cddb_matches) cddb_read(p_conn, p_cddb_disc); } } cddb_disc_destroy(p_cddb_disc); cddb_destroy(p_conn); libcddb_shutdown(); } } #endif #ifdef HAVE_VCDINFO static void print_vcd_info(driver_id_t driver) { vcdinfo_open_return_t open_rc; vcdinfo_obj_t *p_vcd = NULL; open_rc = vcdinfo_open(&p_vcd, &source_name, driver, NULL); switch (open_rc) { case VCDINFO_OPEN_VCD: if (vcdinfo_get_format_version (p_vcd) == VCD_TYPE_INVALID) { report(stderr, "VCD format detection failed"); vcdinfo_close(p_vcd); return; } report (stdout, "Format : %s\n", vcdinfo_get_format_version_str(p_vcd)); report (stdout, "Album : `%.16s'\n", vcdinfo_get_album_id(p_vcd)); report (stdout, "Volume count : %d\n", vcdinfo_get_volume_count(p_vcd)); report (stdout, "volume number: %d\n", vcdinfo_get_volume_num(p_vcd)); break; case VCDINFO_OPEN_ERROR: report( stderr, "Error in Video CD opening of %s\n", source_name ); break; case VCDINFO_OPEN_OTHER: report( stderr, "Even though we thought this was a Video CD, " " further inspection says it is not.\n" ); break; } if (p_vcd) vcdinfo_close(p_vcd); } #endif static void print_iso9660_recurse (CdIo_t *p_cdio, const char pathname[], cdio_fs_anal_t fs) { CdioList_t *p_entlist; CdioList_t *p_dirlist = _cdio_list_new (); CdioListNode_t *entnode; uint8_t i_joliet_level; char *translated_name = (char *) malloc(4096); size_t translated_name_size = 4096; i_joliet_level = (opts.no_joliet) ? 0 : cdio_get_joliet_level(p_cdio); p_entlist = iso9660_fs_readdir (p_cdio, pathname, false); printf ("%s:\n", pathname); if (NULL == p_entlist) { report( stderr, "Error getting above directory information\n" ); free(translated_name); free(p_dirlist); return; } /* Iterate over files in this directory */ _CDIO_LIST_FOREACH (entnode, p_entlist) { iso9660_stat_t *p_statbuf = _cdio_list_node_data (entnode); char *psz_iso_name = p_statbuf->filename; char _fullname[4096] = { 0, }; if (strlen(psz_iso_name) >= translated_name_size) { translated_name_size = strlen(psz_iso_name)+1; free(translated_name); translated_name = (char *) malloc(translated_name_size); if (!translated_name) { report( stderr, "Error allocating memory\n" ); return; } } if (yep != p_statbuf->rr.b3_rock || 1 == opts.no_rock_ridge) { iso9660_name_translate_ext(psz_iso_name, translated_name, i_joliet_level); } snprintf (_fullname, sizeof (_fullname), "%s%s", pathname, psz_iso_name); strncat (_fullname, "/", sizeof (_fullname)); if (p_statbuf->type == _STAT_DIR && strcmp (psz_iso_name, ".") && strcmp (psz_iso_name, "..")) _cdio_list_append (p_dirlist, strdup (_fullname)); print_fs_attrs(p_statbuf, 0 == opts.no_rock_ridge, fs & CDIO_FS_ANAL_XA, psz_iso_name, translated_name); if (p_statbuf->rr.i_symlink) { free(p_statbuf->rr.psz_symlink); p_statbuf->rr.i_symlink = 0; } } free (translated_name); _cdio_list_free (p_entlist, true); printf ("\n"); /* Now recurse over the directories. */ _CDIO_LIST_FOREACH (entnode, p_dirlist) { char *_fullname = _cdio_list_node_data (entnode); print_iso9660_recurse (p_cdio, _fullname, fs); } _cdio_list_free (p_dirlist, true); } static void print_iso9660_fs (CdIo_t *p_cdio, cdio_fs_anal_t fs, track_format_t track_format) { iso_extension_mask_t iso_extension_mask = ISO_EXTENSION_ALL; if (fs & CDIO_FS_ANAL_XA) track_format = TRACK_FORMAT_XA; if (opts.no_joliet) { iso_extension_mask &= ~ISO_EXTENSION_JOLIET; } if ( !iso9660_fs_read_superblock(p_cdio, iso_extension_mask) ) return; printf ("ISO9660 filesystem\n"); print_iso9660_recurse (p_cdio, "/", fs); } #define print_vd_info(title, fn) \ psz_str = fn(&pvd); \ if (psz_str) { \ report(stdout, title ": %s\n", psz_str); \ free(psz_str); \ psz_str = NULL; \ } static void print_analysis(int ms_offset, cdio_iso_analysis_t cdio_iso_analysis, cdio_fs_anal_t fs, int first_data, unsigned int num_audio, track_t i_tracks, track_t i_first_track, track_format_t track_format, CdIo_t *p_cdio) { int need_lf; switch(CDIO_FSTYPE(fs)) { case CDIO_FS_AUDIO: if (num_audio > 0) { #ifdef HAVE_CDDB if (!opts.no_cddb) { printf("Audio CD, CDDB disc ID is %08x\n", cddb_discid(p_cdio, i_tracks)); print_cddb_info(p_cdio, i_tracks, i_first_track); } #endif print_cdtext_info(p_cdio, i_tracks, i_first_track); } break; case CDIO_FS_ISO_9660: printf("CD-ROM with ISO 9660 filesystem"); if (fs & CDIO_FS_ANAL_JOLIET) { printf(" and joliet extension level %d", cdio_iso_analysis.joliet_level); } if (fs & CDIO_FS_ANAL_ROCKRIDGE) printf(" and rockridge extensions"); printf("\n"); break; case CDIO_FS_ISO_9660_INTERACTIVE: printf("CD-ROM with CD-RTOS and ISO 9660 filesystem\n"); break; case CDIO_FS_HIGH_SIERRA: printf("CD-ROM with High Sierra filesystem\n"); break; case CDIO_FS_INTERACTIVE: printf("CD-Interactive%s\n", num_audio > 0 ? "/Ready" : ""); break; case CDIO_FS_HFS: printf("CD-ROM with Macintosh HFS\n"); break; case CDIO_FS_ISO_HFS: printf("CD-ROM with both Macintosh HFS and ISO 9660 filesystem\n"); break; case CDIO_FS_UFS: printf("CD-ROM with Unix UFS\n"); break; case CDIO_FS_EXT2: printf("CD-ROM with GNU/Linux EXT2 (native) filesystem\n"); break; case CDIO_FS_3DO: printf("CD-ROM with Panasonic 3DO filesystem\n"); break; case CDIO_FS_UDFX: printf("CD-ROM with UDFX filesystem\n"); break; case CDIO_FS_UNKNOWN: printf("CD-ROM with unknown filesystem\n"); break; case CDIO_FS_XISO: printf("CD-ROM with Microsoft X-BOX XISO filesystem\n"); break; } switch(CDIO_FSTYPE(fs)) { case CDIO_FS_ISO_9660: case CDIO_FS_ISO_9660_INTERACTIVE: case CDIO_FS_ISO_HFS: case CDIO_FS_ISO_UDF: printf("ISO 9660: %i blocks, label `%.32s'\n", cdio_iso_analysis.isofs_size, cdio_iso_analysis.iso_label); { iso9660_pvd_t pvd; if ( iso9660_fs_read_pvd(p_cdio, &pvd) ) { char *psz_str; print_vd_info("Application", iso9660_get_application_id); print_vd_info("Preparer ", iso9660_get_preparer_id); print_vd_info("Publisher ", iso9660_get_publisher_id); print_vd_info("System ", iso9660_get_system_id); print_vd_info("Volume ", iso9660_get_volume_id); print_vd_info("Volume Set ", iso9660_get_volumeset_id); } } if (opts.print_iso9660) print_iso9660_fs(p_cdio, fs, track_format); break; } switch(CDIO_FSTYPE(fs)) { case CDIO_FS_UDF: case CDIO_FS_ISO_UDF: report(stdout, "UDF: version %x.%2.2x\n", cdio_iso_analysis.UDFVerMajor, cdio_iso_analysis.UDFVerMinor); break; default: ; } need_lf = 0; if (first_data == 1 && num_audio > 0) need_lf += printf("mixed mode CD "); if (fs & CDIO_FS_ANAL_XA) need_lf += printf("XA sectors "); if (fs & CDIO_FS_ANAL_MULTISESSION) need_lf += printf("Multisession, offset = %i ", ms_offset); if (fs & CDIO_FS_ANAL_HIDDEN_TRACK) need_lf += printf("Hidden Track "); if (fs & CDIO_FS_ANAL_PHOTO_CD) need_lf += printf("%sPhoto CD ", num_audio > 0 ? " Portfolio " : ""); if (fs & CDIO_FS_ANAL_CDTV) need_lf += printf("Commodore CDTV "); if (first_data > 1) need_lf += printf("CD-Plus/Extra "); if (fs & CDIO_FS_ANAL_BOOTABLE) need_lf += printf("bootable CD "); if (fs & CDIO_FS_ANAL_VIDEOCD && num_audio == 0) { need_lf += printf("Video CD "); } if (fs & CDIO_FS_ANAL_SVCD) need_lf += printf("Super Video CD (SVCD) or Chaoji Video CD (CVD)"); if (fs & CDIO_FS_ANAL_CVD) need_lf += printf("Chaoji Video CD (CVD)"); if (need_lf) printf("\n"); #ifdef HAVE_VCDINFO if (fs & (CDIO_FS_ANAL_VIDEOCD|CDIO_FS_ANAL_CVD|CDIO_FS_ANAL_SVCD)) if (!opts.no_vcd) { printf("\n"); print_vcd_info(cdio_get_driver_id(p_cdio)); } #endif } /* Initialize global variables. */ static void init(void) { gl_default_cdio_log_handler = cdio_log_set_handler (_log_handler); #ifdef HAVE_CDDB gl_default_cddb_log_handler = cddb_log_set_handler ((cddb_log_handler_t) _cddb_log_handler); #endif #ifdef HAVE_VCDINFO gl_default_vcd_log_handler = vcd_log_set_handler ((vcd_log_handler_t) _log_handler); #endif /* Default option values. */ opts.silent = false; opts.list_drives = false; opts.no_header = false; opts.no_joliet = 0; opts.no_rock_ridge = 0; opts.no_xa = 0; opts.no_device = 0; opts.no_disc_mode = 0; opts.debug_level = 0; opts.no_tracks = 0; opts.print_iso9660 = 0; #ifdef HAVE_CDDB opts.no_cddb = 0; cddb_opts.port = 8880; cddb_opts.http = 0; cddb_opts.cachedir = NULL; cddb_opts.server = NULL; cddb_opts.timeout = -1; cddb_opts.disable_cache = false; #endif #ifdef HAVE_VCDINFO opts.no_vcd = 0; #else opts.no_vcd = 1; #endif opts.no_ioctl = 0; opts.no_analysis = 0; opts.source_image = INPUT_UNKNOWN; opts.access_mode = NULL; } /* ------------------------------------------------------------------------ */ int main(int argc, char *argv[]) { CdIo_t *p_cdio=NULL; cdio_fs_anal_t fs = CDIO_FS_AUDIO; int i; lsn_t start_track_lsn; /* lsn of first track */ lsn_t data_start = 0; /* start of data area */ int ms_offset = 0; track_t i_tracks = 0; track_t i_first_track = 0; unsigned int num_audio = 0; /* # of audio tracks */ unsigned int num_data = 0; /* # of data tracks */ int first_data = -1; /* # of first data track */ int first_audio = -1; /* # of first audio track */ bool b_playing_audio = false; /* currently playing a CD-DA */ cdio_iso_analysis_t cdio_iso_analysis; char *media_catalog_number; discmode_t discmode = CDIO_DISC_MODE_NO_INFO; cdio_drive_read_cap_t i_read_cap = 0; cdio_drive_write_cap_t i_write_cap; cdio_drive_misc_cap_t i_misc_cap; cdio_isrc_t isrc; memset(&cdio_iso_analysis, 0, sizeof(cdio_iso_analysis)); init(); /* Parse our arguments; every option seen by `parse_opt' will be reflected in `arguments'. */ parse_options(argc, argv); print_version(program_name, CDIO_VERSION, opts.no_header, opts.version_only); if (opts.debug_level == 3) { cdio_loglevel_default = CDIO_LOG_INFO; #ifdef HAVE_VCDINFO vcd_loglevel_default = VCD_LOG_INFO; #endif } else if (opts.debug_level >= 4) { cdio_loglevel_default = CDIO_LOG_DEBUG; #ifdef HAVE_VCDINFO vcd_loglevel_default = VCD_LOG_DEBUG; #endif } p_cdio = open_input(source_name, opts.source_image, opts.access_mode); if (p_cdio==NULL) { if (source_name) { err_exit("%s: Error in opening device driver for input %s.\n", program_name, source_name); } else { err_exit("%s: Error in opening device driver for unspecified input.\n", program_name); } } if (source_name==NULL) { source_name=strdup(cdio_get_arg(p_cdio, "source")); if (NULL == source_name) { err_exit("%s: No input device given/found\n", program_name); } } if (0 == opts.silent) { printf("CD location : %s\n", source_name); printf("CD driver name: %s\n", cdio_get_driver_name(p_cdio)); printf(" access mode: %s\n\n", cdio_get_arg(p_cdio, "access-mode")); } cdio_get_drive_cap(p_cdio, &i_read_cap, &i_write_cap, &i_misc_cap); if (0 == opts.no_device) { cdio_hwinfo_t hwinfo; if (cdio_get_hwinfo(p_cdio, &hwinfo)) { printf("%-28s: %s\n%-28s: %s\n%-28s: %s\n", "Vendor" , hwinfo.psz_vendor, "Model" , hwinfo.psz_model, "Revision", hwinfo.psz_revision); } print_drive_capabilities(i_read_cap, i_write_cap, i_misc_cap); } if (opts.list_drives) { driver_id_t driver_id = DRIVER_DEVICE; char ** device_list = cdio_get_devices_ret(&driver_id); char ** d = device_list; printf("list of devices found:\n"); if (NULL != d) { for ( ; *d != NULL ; d++ ) { CdIo_t *p_cdio = cdio_open(source_name, driver_id); cdio_hwinfo_t hwinfo; printf("Drive %s\n", *d); if (mmc_get_hwinfo(p_cdio, &hwinfo)) { printf("%-8s: %s\n%-8s: %s\n%-8s: %s\n", "Vendor" , hwinfo.psz_vendor, "Model" , hwinfo.psz_model, "Revision", hwinfo.psz_revision); } if (p_cdio) cdio_destroy(p_cdio); } } cdio_free_device_list(device_list); } report(stdout, STRONG "\n"); discmode = cdio_get_discmode(p_cdio); if ( 0 == opts.no_disc_mode ) { printf("Disc mode is listed as: %s\n", discmode2str[discmode]); } if (cdio_is_discmode_dvd(discmode) && !opts.show_dvd) { printf("No further information currently given for DVDs.\n"); printf("Use --dvd to override.\n"); myexit(p_cdio, EXIT_SUCCESS); } i_first_track = cdio_get_first_track_num(p_cdio); if (CDIO_INVALID_TRACK == i_first_track) { err_exit("Can't get first track number. I give up%s.\n", ""); } i_tracks = cdio_get_num_tracks(p_cdio); if (CDIO_INVALID_TRACK == i_tracks) { err_exit("Can't get number of tracks. I give up.%s\n", ""); } if (!opts.no_tracks) { printf("CD-ROM Track List (%i - %i)\n" NORMAL, i_first_track, i_tracks); printf(" #: MSF LSN Type Green? Copy?"); if ( CDIO_DISC_MODE_CD_DA == discmode || CDIO_DISC_MODE_CD_MIXED == discmode ) printf(" Channels Premphasis?"); printf("\n"); } start_track_lsn = cdio_get_track_lsn(p_cdio, i_first_track); /* Read and possibly print track information. */ for (i = i_first_track; i <= CDIO_CDROM_LEADOUT_TRACK; i++) { msf_t msf; char *psz_msf; track_format_t track_format; if (!cdio_get_track_msf(p_cdio, i, &msf)) { err_exit("cdio_track_msf for track %i failed, I give up.\n", i); } track_format = cdio_get_track_format(p_cdio, i); psz_msf = cdio_msf_to_str(&msf); if (i == CDIO_CDROM_LEADOUT_TRACK) { if (!opts.no_tracks) { lsn_t lsn= cdio_msf_to_lsn(&msf); long unsigned int i_bytes_raw = lsn * CDIO_CD_FRAMESIZE_RAW; long unsigned int i_bytes_formatted = lsn - start_track_lsn; printf( "%3d: %8s %06lu leadout ", (int) i, psz_msf, (long unsigned int) lsn ); switch (discmode) { case CDIO_DISC_MODE_DVD_ROM: case CDIO_DISC_MODE_DVD_RAM: case CDIO_DISC_MODE_DVD_R: case CDIO_DISC_MODE_DVD_RW: case CDIO_DISC_MODE_DVD_PR: case CDIO_DISC_MODE_DVD_PRW: case CDIO_DISC_MODE_DVD_OTHER: case CDIO_DISC_MODE_CD_DATA: i_bytes_formatted *= CDIO_CD_FRAMESIZE; break; case CDIO_DISC_MODE_CD_DA: i_bytes_formatted *= CDIO_CD_FRAMESIZE_RAW; break; case CDIO_DISC_MODE_CD_XA: case CDIO_DISC_MODE_CD_MIXED: i_bytes_formatted *= CDIO_CD_FRAMESIZE_RAW0; break; default: i_bytes_formatted *= CDIO_CD_FRAMESIZE_RAW; } if (i_bytes_raw < 1024) printf( "(%lu bytes", i_bytes_raw ); if (i_bytes_raw < 1024 * 1024) printf( "(%lu KB", i_bytes_raw / 1024 ); else printf( "(%lu MB", i_bytes_raw / (1024 * 1024) ); printf(" raw, "); if (i_bytes_formatted < 1024) printf( "%lu bytes", i_bytes_formatted ); if (i_bytes_formatted < 1024 * 1024) printf( "%lu KB", i_bytes_formatted / 1024 ); else printf( "%lu MB", i_bytes_formatted / (1024 * 1024) ); printf(" formatted)\n"); } free(psz_msf); break; } else if (!opts.no_tracks) { const char *psz; printf( "%3d: %8s %06lu %-6s %-5s ", (int) i, psz_msf, (long unsigned int) cdio_msf_to_lsn(&msf), track_format2str[track_format], cdio_get_track_green(p_cdio, i)? "true " : "false"); switch (cdio_get_track_copy_permit(p_cdio, i)) { case CDIO_TRACK_FLAG_FALSE: psz="no"; break; case CDIO_TRACK_FLAG_TRUE: psz="yes"; break; case CDIO_TRACK_FLAG_UNKNOWN: psz="?"; break; case CDIO_TRACK_FLAG_ERROR: default: psz="error"; break; } printf("%-5s", psz); if (TRACK_FORMAT_AUDIO == track_format) { const int i_channels = cdio_get_track_channels(p_cdio, i); switch (cdio_get_track_preemphasis(p_cdio, i)) { case CDIO_TRACK_FLAG_FALSE: psz="no"; break; case CDIO_TRACK_FLAG_TRUE: psz="yes"; break; case CDIO_TRACK_FLAG_UNKNOWN: psz="?"; break; case CDIO_TRACK_FLAG_ERROR: default: psz="error"; break; } if (i_channels == -2) printf(" %-8s", "unknown"); else if (i_channels == -1) printf(" %-8s", "error"); else printf(" %-8d", i_channels); printf( " %s", psz); } printf( "\n" ); } free(psz_msf); if (TRACK_FORMAT_AUDIO == track_format) { num_audio++; if (-1 == first_audio) first_audio = i; } else { num_data++; if (-1 == first_data) first_data = i; } /* skip to leadout? */ if (i == i_tracks) i = CDIO_CDROM_LEADOUT_TRACK-1; } if (cdio_is_discmode_cdrom(discmode)) { /* get and print MCN */ report(stdout, "Media Catalog Number (MCN): "); fflush(stdout); media_catalog_number = cdio_get_mcn(p_cdio); if (NULL == media_catalog_number) { if (i_read_cap & CDIO_DRIVE_CAP_READ_MCN) report(stdout, "not available\n"); else report(stdout, "not supported by drive/driver\n"); } else { report(stdout, "%s\n", media_catalog_number); free(media_catalog_number); } if (i_read_cap & CDIO_DRIVE_CAP_READ_ISRC) { driver_return_code_t status; for (i = 1; i <= i_tracks; i++) { bzero(&isrc, sizeof(isrc)); status = mmc_isrc_track_read_subchannel (p_cdio, i, isrc); if (status == DRIVER_OP_SUCCESS && isrc[0] != '\0') { report(stdout, "TRACK %2d ISRC: %s\n", i, isrc); fflush(stdout); } } } /* List number of sessions */ { lsn_t i_last_session; report(stdout, "Last CD Session LSN: "); fflush(stdout); if (DRIVER_OP_SUCCESS == cdio_get_last_session(p_cdio, &i_last_session)) { report(stdout, "%d\n", i_last_session); } else { if (i_misc_cap & CDIO_DRIVE_CAP_MISC_MULTI_SESSION) report(stdout, "failed\n"); else report(stdout, "not supported by drive/driver\n"); } } /* get audio status from subchannel */ if ( CDIO_DISC_MODE_CD_DA == discmode || CDIO_DISC_MODE_CD_MIXED == discmode ) { cdio_subchannel_t subchannel; driver_return_code_t rc; memset(&subchannel, 0, sizeof(subchannel)); report( stdout, "audio status: "); fflush(stdout); rc = cdio_audio_read_subchannel(p_cdio, &subchannel); if (DRIVER_OP_SUCCESS == rc) { bool b_volume = false; bool b_position = false; report ( stdout, "%s\n", mmc_audio_state2str(subchannel.audio_status) ); switch (subchannel.audio_status) { case CDIO_MMC_READ_SUB_ST_PLAY: b_playing_audio = true; /* Fall through to next case. */ case CDIO_MMC_READ_SUB_ST_PAUSED: b_position = true; /* Fall through to next case. */ case CDIO_MMC_READ_SUB_ST_NO_STATUS: b_volume = true; break; default: ; } if (b_position) report( stdout, " at: %02d:%02d abs / %02d:%02d track %d\n", subchannel.abs_addr.m, subchannel.abs_addr.s, subchannel.rel_addr.m, subchannel.rel_addr.s, subchannel.track ); if (b_volume) { cdio_audio_volume_t volume; if (DRIVER_OP_SUCCESS == cdio_audio_get_volume (p_cdio, &volume)) { uint8_t i=0; for (i=0; i<4; i++) { uint8_t i_level = volume.level[i]; report( stdout, "volume level port %d: %3d (0..255) %3d (0..100)\n", i, i_level, (i_level*100+128) / 256 ); } } else report( stdout, " can't get volume levels\n" ); } } else if (DRIVER_OP_UNSUPPORTED == rc) { report( stdout, "not implemented\n" ); } else { report( stdout, "FAILED\n" ); } } } if (!opts.no_analysis) { if (b_playing_audio) { /* Running a CD Analysis would mess up audio playback.*/ report(stdout, "CD Analysis Report omitted because audio is currently " "playing.\n"); myexit(p_cdio, EXIT_SUCCESS); } report(stdout, STRONG "CD Analysis Report\n" NORMAL); /* try to find out what sort of CD we have */ if (num_audio > 0) { /* may be a "real" audio CD or hidden track CD */ msf_t msf; cdio_get_track_msf(p_cdio, i_first_track, &msf); /* CD-I/Ready says start_track_lsn <= 30*75 then CDDA */ if (start_track_lsn > 100 /* 100 is just a guess */) { fs = cdio_guess_cd_type(p_cdio, 0, 1, &cdio_iso_analysis); if ((CDIO_FSTYPE(fs)) != CDIO_FS_UNKNOWN) fs |= CDIO_FS_ANAL_HIDDEN_TRACK; else { fs &= ~CDIO_FS_MASK; /* del filesystem info */ report( stdout, "Oops: %lu unused sectors at start, " "but hidden track check failed.\n", (long unsigned int) start_track_lsn); } } print_analysis(ms_offset, cdio_iso_analysis, fs, first_data, num_audio, i_tracks, i_first_track, cdio_get_track_format(p_cdio, 1), p_cdio); } if (num_data > 0) { /* we have data track(s) */ int j; for (j = 2, i = first_data; i <= i_tracks; i++) { msf_t msf; track_format_t track_format = cdio_get_track_format(p_cdio, i); cdio_get_track_msf(p_cdio, i, &msf); switch ( track_format ) { case TRACK_FORMAT_AUDIO: case TRACK_FORMAT_ERROR: break; case TRACK_FORMAT_CDI: case TRACK_FORMAT_XA: case TRACK_FORMAT_DATA: case TRACK_FORMAT_PSX: ; } start_track_lsn = (i == 1) ? 0 : cdio_msf_to_lsn(&msf); /* save the start of the data area */ if (i == first_data) data_start = start_track_lsn; /* skip tracks which belong to the current walked session */ if (start_track_lsn < data_start + cdio_iso_analysis.isofs_size) continue; fs = cdio_guess_cd_type(p_cdio, start_track_lsn, i, &cdio_iso_analysis); if (i > 1) { /* track is beyond last session -> new session found */ ms_offset = start_track_lsn; report( stdout, "session #%d starts at track %2i, LSN: %lu," " ISO 9660 blocks: %6i\n", j++, i, (unsigned long int) start_track_lsn, cdio_iso_analysis.isofs_size); report( stdout, "ISO 9660: %i blocks, label `%.32s'\n", cdio_iso_analysis.isofs_size, cdio_iso_analysis.iso_label); fs |= CDIO_FS_ANAL_MULTISESSION; } else { print_analysis(ms_offset, cdio_iso_analysis, fs, first_data, num_audio, i_tracks, i_first_track, track_format, p_cdio); } if ( !(CDIO_FSTYPE(fs) == CDIO_FS_ISO_9660 || CDIO_FSTYPE(fs) == CDIO_FS_ISO_HFS || /* CDIO_FSTYPE(fs) == CDIO_FS_ISO_9660_INTERACTIVE) && (fs & XA))) */ CDIO_FSTYPE(fs) == CDIO_FS_ISO_9660_INTERACTIVE) ) /* no method for non-ISO9660 multisessions */ break; } } } myexit(p_cdio, EXIT_SUCCESS); /* Not reached:*/ return(EXIT_SUCCESS); } libcdio-0.83/src/cdda-player.c0000644000175000017500000014042011650126527013120 00000000000000/* Copyright (C) 2005, 2006, 2008, 2009, 2010, 2011 Rocky Bernstein Adapted from Gerd Knorr's player.c program Copyright (C) 1997, 1998 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_STRING_H #include #endif #include #ifdef HAVE_CDDB #include #endif #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_CURSES_H #include #else #ifdef HAVE_NCURSES_H #include #else # error "You need or #include #include #include #include #include "cddb.h" #include "getopt.h" static void action(const char *psz_action); static void display_cdinfo(CdIo_t *p_cdio, track_t i_tracks, track_t i_first_track); static void display_tracks(void); static void get_cddb_track_info(track_t i_track); static void get_cdtext_track_info(track_t i_track); static void get_track_info(track_t i_track); static bool play_track(track_t t1, track_t t2); static CdIo_t *p_cdio; /* libcdio handle */ static driver_id_t driver_id = DRIVER_DEVICE; static int b_sig = false; /* set on some signals */ /* cdrom data */ static track_t i_first_track; static track_t i_last_track; static track_t i_first_audio_track; static track_t i_last_audio_track; static track_t i_last_display_track = CDIO_INVALID_TRACK; static track_t i_tracks; static msf_t toc[CDIO_CDROM_LEADOUT_TRACK+1]; static cdio_subchannel_t sub; /* subchannel last time read */ static int i_data; /* # of data tracks present ? */ static int start_track = 0; static int stop_track = 0; static int one_track = 0; static int i_vol_port = 5; /* If 5, retrieve volume port. Otherwise the port number 0..3 of a working volume port and 4 for no working port. */ /* settings which can be set from the command or interactively. */ static bool b_cd = false; static bool auto_mode = false; static bool b_verbose = false; static bool debug = false; static bool b_interactive = true; static bool b_prefer_cdtext = true; #ifdef CDDB_ADDED static bool b_cddb = false; /* CDDB database present */ #endif static bool b_db = false; /* we have a database at all */ static bool b_record = false; /* we have a record for static the inserted CD */ static bool b_all_tracks = false; /* True if we display all tracks*/ static int8_t i_volume_level = -1; /* Valid range is 0..100 */ static char *psz_device=NULL; static char *psz_program; /* Info about songs and titles. The 0 entry will contain the disc info. */ typedef struct { char title[80]; char artist[80]; char length[8]; char ext_data[80]; bool b_cdtext; /* true if from CD-Text, false if from CDDB */ } cd_track_info_rec_t; static cd_track_info_rec_t cd_info[CDIO_CD_MAX_TRACKS+2]; static char title[80]; static char artist[80]; static char genre[40]; static char category[40]; static char year[5]; static bool b_cdtext_title; /* true if from CD-Text, false if from CDDB */ static bool b_cdtext_artist; /* true if from CD-Text, false if from CDDB */ static bool b_cdtext_genre; /* true if from CD-Text, false if from CDDB */ #ifdef CDTEXT_CATEGORY_ADDED static bool b_cdtext_category; /* true if from CD-Text, false if from CDDB */ #endif static bool b_cdtext_year; /* true if from CD-Text, false if from CDDB */ static cdio_audio_volume_t audio_volume; #ifdef HAVE_CDDB static cddb_conn_t *p_conn = NULL; static cddb_disc_t *p_cddb_disc = NULL; static int i_cddb_matches = 0; #endif #define MAX_KEY_STR 50 static const char key_bindings[][MAX_KEY_STR] = { " right play / next track", " left previous track", " up/down 10 sec forward / back", " 1-9 jump to track 1-9", " 0 jump to track 10", " F1-F20 jump to track 11-30", " ", " k, h, ? show this key help", " l, toggle listing all tracks", " e eject", " c close tray", " p, space pause / resume", " s stop", " q, ^C quit", " x quit and continue playing", " a toggle auto-mode", " - decrease volume level", " + increase volume level", }; static const unsigned int i_key_bindings = sizeof(key_bindings) / MAX_KEY_STR; /* ---------------------------------------------------------------------- */ /* tty stuff */ typedef enum { LINE_STATUS = 0, LINE_CDINFO = 1, LINE_ARTIST = 3, LINE_CDNAME = 4, LINE_GENRE = 5, LINE_YEAR = 6, LINE_TRACK_PREV = 8, LINE_TRACK_TITLE = 9, LINE_TRACK_ARTIST = 10, LINE_TRACK_NEXT = 11, } track_line_t; static unsigned int LINE_ACTION = 25; static unsigned int COLS_LAST; static char psz_action_line[300] = ""; static int rounded_div(unsigned int i_a, unsigned int i_b) { const unsigned int i_b_half=i_b/2; return ((i_a)+i_b_half)/i_b; } /** Curses window initialization. */ static void tty_raw() { if (!b_interactive) return; initscr(); cbreak(); clear(); noecho(); #ifdef HAVE_KEYPAD keypad(stdscr,1); #endif getmaxyx(stdscr, LINE_ACTION, COLS_LAST); LINE_ACTION--; refresh(); } /** Curses window finalization. */ static void tty_restore() { if (!b_interactive) return; endwin(); } /* Called when window is resized. */ static void sigwinch() { tty_restore(); tty_raw(); action(NULL); } /* Signal handler - Ctrl-C and others. */ static void ctrlc(int signal) { b_sig = true; } /* Timed wait on an event. */ static int select_wait(int sec) { struct timeval tv; fd_set se; FD_ZERO(&se); FD_SET(0,&se); tv.tv_sec = sec; tv.tv_usec = 0; return select(1,&se,NULL,NULL,&tv); } /* ---------------------------------------------------------------------- */ /* Display the action line. */ static void action(const char *psz_action) { if (!b_interactive) { if (b_verbose && psz_action) fprintf(stderr,"action: %s\n", psz_action); return; } if (!psz_action) psz_action = psz_action_line; else if (psz_action && strlen(psz_action)) snprintf(psz_action_line, sizeof(psz_action_line), "action : %s", psz_action); else snprintf(psz_action_line, sizeof(psz_action_line), "%s", "" ); mvprintw(LINE_ACTION, 0, psz_action_line); clrtoeol(); refresh(); } /* Display an error message.. */ static void xperror(const char *psz_msg) { char line[80]; if (!b_interactive) { if (b_verbose) { fprintf(stderr, "error: "); perror(psz_msg); } return; } if (b_verbose) { snprintf(line, sizeof(line), "%s: %s", psz_msg, strerror(errno)); attron(A_STANDOUT); mvprintw(LINE_ACTION, 0, (char *) "error : %s", line); attroff(A_STANDOUT); clrtoeol(); refresh(); select_wait(3); action(""); } } static void finish(const char *psz_msg, int rc) { if (b_interactive) { attron(A_STANDOUT); mvprintw(LINE_ACTION, 0, (char *) "%s, exiting...\n", psz_msg); attroff(A_STANDOUT); clrtoeol(); refresh(); } tty_restore(); #ifdef HAVE_CDDB if (p_conn) cddb_destroy(p_conn); cddb_disc_destroy(p_cddb_disc); libcddb_shutdown(); #endif /*HAVE_CDDB*/ cdio_destroy (p_cdio); free (psz_device); exit (rc); } /* ---------------------------------------------------------------------- */ /* Set all audio channels to level. level is assumed to be in the range 0..100. */ static bool set_volume_level(CdIo_t *p_cdio, uint8_t i_level) { const unsigned int i_new_level= rounded_div(i_level*256, 100); unsigned int i; driver_return_code_t rc; for (i=0; i<=3; i++) { audio_volume.level[i] = i_new_level; } rc = cdio_audio_set_volume(p_cdio, &audio_volume); if ( DRIVER_OP_SUCCESS != rc ) { /* If we can't do a get volume, audio_volume.level is used as a second-best guess. But if this set failed restore it to an invalid value so we don't get confused and think that this was set. */ for (i=0; i<=3; i++) { audio_volume.level[i] = 0; } } else { /* Set i_vol_port so volume levels set above will get used. */ i_vol_port=0; } return rc; } /* Subtract one from the volume level. If we are at the minimum value, * nothing is done. We used to wrap at the boundaries but this is probably wrong because is assumes someone: * looks at the display while listening, * knows that 99 is the maximum value. See issue #33333 If the volume level is undefined, then this means we could not get the current value and we'll' set it to 50 the midway point. Return the status of setting the volume level. */ static bool decrease_volume_level(CdIo_t *p_cdio) { if (i_volume_level == -1) i_volume_level = 51; if (i_volume_level <= 0) i_volume_level = 1; return set_volume_level(p_cdio, --i_volume_level); } /* Add 1 to the volume level. If we are at the maximum value, nothing is done. We used to wrap at the boundaries but this is probably wrong because is assumes someone: * looks at the display while listening, * knows that 99 is the maximum value. See issue #33333 If volume level is undefined, then this means we could not get the current value and we'll' set it to 50 the midway point. Return the status of setting the volume level. */ static bool increase_volume_level(CdIo_t *p_cdio) { if (i_volume_level == -1) i_volume_level = 49; if (i_volume_level <= 0) i_volume_level = 0; if (i_volume_level > 98) i_volume_level = 98; return set_volume_level(p_cdio, ++i_volume_level); } /** Stop playing audio CD */ static bool cd_stop(CdIo_t *p_cdio) { bool b_ok = true; if (b_cd && p_cdio) { action("stop..."); i_last_audio_track = CDIO_INVALID_TRACK; b_ok = DRIVER_OP_SUCCESS == cdio_audio_stop(p_cdio); if ( !b_ok ) xperror("stop"); if (b_all_tracks) display_tracks(); } return b_ok; } /** Eject CD */ static bool cd_eject(void) { bool b_ok = true; if (p_cdio) { cd_stop(p_cdio); action("eject..."); b_ok = DRIVER_OP_SUCCESS == cdio_eject_media(&p_cdio); if (!b_ok) xperror("eject"); b_cd = false; cdio_destroy (p_cdio); p_cdio = NULL; } return b_ok; } /** Close CD tray */ static bool cd_close(const char *psz_device) { bool b_ok = true; if (!b_cd) { action("close..."); b_ok = DRIVER_OP_SUCCESS == cdio_close_tray(psz_device, &driver_id); if (!b_ok) xperror("close"); } return b_ok; } /** Pause playing audio CD */ static bool cd_pause(CdIo_t *p_cdio) { bool b_ok = true; if (sub.audio_status == CDIO_MMC_READ_SUB_ST_PLAY) { b_ok = DRIVER_OP_SUCCESS == cdio_audio_pause(p_cdio); if (!b_ok) xperror("pause"); } return b_ok; } /** Get status/track/position info of an audio CD */ static bool read_subchannel(CdIo_t *p_cdio) { bool b_ok = true; if (!p_cdio) return false; b_ok = DRIVER_OP_SUCCESS == cdio_audio_read_subchannel(p_cdio, &sub); if (!b_ok) { xperror("read subchannel"); b_cd = 0; } if (auto_mode && sub.audio_status == CDIO_MMC_READ_SUB_ST_COMPLETED) cd_eject(); return b_ok; } #ifdef HAVE_CDDB /** This routine is called by vcd routines on error. Setup is done by init_input_plugin. */ static void cddb_log_handler (cddb_log_level_t level, const char message[]) { switch (level) { case CDDB_LOG_DEBUG: case CDDB_LOG_INFO: if (!b_verbose) return; /* Fall through if to warn case */ case CDDB_LOG_WARN: case CDDB_LOG_ERROR: case CDDB_LOG_CRITICAL: default: xperror(message); break; } /* gl_default_cdio_log_handler (level, message); */ } #endif /* HAVE_CDDB */ static void get_cddb_disc_info(CdIo_t *p_cdio) { #ifdef HAVE_CDDB b_db = init_cddb(p_cdio, &p_conn, &p_cddb_disc, xperror, i_first_track, i_tracks, &i_cddb_matches); if (b_db) { int i_year; i_year = atoi(year); cddb_disc_set_artist(p_cddb_disc, artist); cddb_disc_set_title(p_cddb_disc, title); cddb_disc_set_genre(p_cddb_disc, genre); cddb_disc_set_year(p_cddb_disc, i_year); } #endif /* HAVE_CDDB */ return; } #define add_cdtext_disc_info(format_str, info_field, FIELD) \ if (p_cdtext->field[FIELD] && !strlen(info_field)) { \ snprintf(info_field, sizeof(info_field), format_str, \ p_cdtext->field[FIELD]); \ b_cdtext_ ## info_field = true; \ } static void get_cdtext_disc_info(CdIo_t *p_cdio) { cdtext_t *p_cdtext = cdio_get_cdtext(p_cdio, 0); if (p_cdtext) { add_cdtext_disc_info("%s", title, CDTEXT_TITLE); add_cdtext_disc_info("%s", artist, CDTEXT_PERFORMER); add_cdtext_disc_info("%s", genre, CDTEXT_GENRE); cdtext_destroy(p_cdtext); } } static void get_disc_info(CdIo_t *p_cdio) { b_db = false; if (b_prefer_cdtext) { get_cdtext_disc_info(p_cdio); get_cddb_disc_info(p_cdio); } else { get_cddb_disc_info(p_cdio); get_cdtext_disc_info(p_cdio); } } /** Read CD TOC and set CD information. */ static void read_toc(CdIo_t *p_cdio) { track_t i; action("read toc..."); memset(cd_info, 0, sizeof(cd_info)); title[0] = artist[0] = genre[0] = category[0] = year[0] = '\0'; i_first_track = cdio_get_first_track_num(p_cdio); i_last_track = cdio_get_last_track_num(p_cdio); i_tracks = cdio_get_num_tracks(p_cdio); i_first_audio_track = i_first_track; i_last_audio_track = i_last_track; cdio_audio_get_volume(p_cdio, &audio_volume); for (i_vol_port=0; i_vol_port<4; i_vol_port++) { if (audio_volume.level[i_vol_port] > 0) break; } if ( CDIO_INVALID_TRACK == i_first_track || CDIO_INVALID_TRACK == i_last_track ) { xperror("read toc header"); b_cd = false; b_record = false; i_last_display_track = CDIO_INVALID_TRACK; } else { b_cd = true; i_data = 0; get_disc_info(p_cdio); for (i = i_first_track; i <= i_last_track+1; i++) { int s; if ( !cdio_get_track_msf(p_cdio, i, &(toc[i])) ) { xperror("read toc entry"); b_cd = false; return; } if ( TRACK_FORMAT_AUDIO == cdio_get_track_format(p_cdio, i) ) { if (i != i_first_track) { s = cdio_audio_get_msf_seconds(&toc[i]) - cdio_audio_get_msf_seconds(&toc[i-1]); snprintf(cd_info[i-1].length, sizeof(cd_info[0].length), "%02d:%02d", s / CDIO_CD_SECS_PER_MIN, s % CDIO_CD_SECS_PER_MIN); } } else { if ((i != i_last_track+1) ) { i_data++; if (i == i_first_track) { if (i == i_last_track) i_first_audio_track = CDIO_CDROM_LEADOUT_TRACK; else i_first_audio_track++; } } } get_track_info(i); } b_record = true; read_subchannel(p_cdio); if (auto_mode && sub.audio_status != CDIO_MMC_READ_SUB_ST_PLAY) play_track(1, CDIO_CDROM_LEADOUT_TRACK); } action(""); if (!b_all_tracks) display_cdinfo(p_cdio, i_tracks, i_first_track); } /** Play an audio track. */ static bool play_track(track_t i_start_track, track_t i_end_track) { bool b_ok = true; char line[80]; if (!b_cd) { read_toc(p_cdio); } read_subchannel(p_cdio); if (!b_cd || i_first_track == CDIO_CDROM_LEADOUT_TRACK) return false; if (debug) fprintf(stderr,"play tracks: %d-%d => ", i_start_track, i_end_track-1); if (i_start_track < i_first_track) i_start_track = i_first_track; if (i_start_track > i_last_audio_track) i_start_track = i_last_audio_track; if (i_end_track < i_first_track) i_end_track = i_first_track; if (i_end_track > i_last_audio_track) i_end_track = i_last_audio_track; i_end_track++; if (debug) fprintf(stderr,"%d-%d\n",i_start_track, i_end_track-1); cd_pause(p_cdio); snprintf(line, sizeof(line), "play track %d to track %d.", i_start_track, i_end_track-1); action(line); b_ok = (DRIVER_OP_SUCCESS == cdio_audio_play_msf(p_cdio, &(toc[i_start_track]), &(toc[i_end_track])) ); if (!b_ok) xperror("play"); return b_ok; } static void skip(int diff) { msf_t start_msf; int sec; read_subchannel(p_cdio); if (!b_cd || i_first_track == CDIO_CDROM_LEADOUT_TRACK) return; sec = cdio_audio_get_msf_seconds(&sub.abs_addr); sec += diff; if (sec < 0) sec = 0; start_msf.m = cdio_to_bcd8(sec / CDIO_CD_SECS_PER_MIN); start_msf.s = cdio_to_bcd8(sec % CDIO_CD_SECS_PER_MIN); start_msf.f = 0; cd_pause(p_cdio); if ( DRIVER_OP_SUCCESS != cdio_audio_play_msf(p_cdio, &start_msf, &(toc[i_last_audio_track])) ) xperror("play"); } static bool toggle_pause() { bool b_ok = true; if (!b_cd) return false; if (CDIO_MMC_READ_SUB_ST_PAUSED == sub.audio_status) { b_ok = DRIVER_OP_SUCCESS != cdio_audio_resume(p_cdio); if (!b_ok) xperror("resume"); } else { b_ok = DRIVER_OP_SUCCESS != cdio_audio_pause(p_cdio); if (!b_ok) xperror("pause"); } return b_ok; } /** Update windows with status and possibly track info. This used in interactive playing not batch mode. */ static void display_status(bool b_status_only) { char line[80]; if (!b_interactive) return; if (!b_cd) { snprintf(line, sizeof(line), "no CD in drive (%s)", psz_device); } else if (i_first_track == CDIO_CDROM_LEADOUT_TRACK) { snprintf(line, sizeof(line), "CD has only data tracks"); } else if (sub.audio_status == CDIO_MMC_READ_SUB_ST_PAUSED || sub.audio_status == CDIO_MMC_READ_SUB_ST_PLAY) { cdio_audio_get_volume(p_cdio, &audio_volume); if (i_vol_port < 4) { i_volume_level = rounded_div(audio_volume.level[i_vol_port]*100, 256); snprintf(line, sizeof(line), "track %2d - %02x:%02x of %s (%02x:%02x abs) %s volume: %d", sub.track, sub.rel_addr.m, sub.rel_addr.s, cd_info[sub.track].length, sub.abs_addr.m, sub.abs_addr.s, mmc_audio_state2str(sub.audio_status), i_volume_level); } else snprintf(line, sizeof(line), "track %2d - %02x:%02x of %s (%02x:%02x abs) %s", sub.track, sub.rel_addr.m, sub.rel_addr.s, cd_info[sub.track].length, sub.abs_addr.m, sub.abs_addr.s, mmc_audio_state2str(sub.audio_status)); } else { snprintf(line, sizeof(line), "%s", mmc_audio_state2str(sub.audio_status)); } action(NULL); mvprintw(LINE_STATUS, 0, (char *) "status%s: %s", auto_mode ? "*" : " ", line); clrtoeol(); if ( !b_status_only && b_db && i_last_display_track != sub.track && (sub.audio_status == CDIO_MMC_READ_SUB_ST_PAUSED || sub.audio_status == CDIO_MMC_READ_SUB_ST_PLAY) && b_cd) { if (b_all_tracks) display_tracks(); else { const cd_track_info_rec_t *p_cd_info = &cd_info[sub.track]; i_last_display_track = sub.track; if (i_first_audio_track != sub.track && strlen(cd_info[sub.track-1].title)) { const cd_track_info_rec_t *p_cd_info = &cd_info[sub.track-1]; mvprintw(LINE_TRACK_PREV, 0, (char *) " track %2d title : %s [%s]", sub.track-1, p_cd_info->title, p_cd_info->b_cdtext ? "CD-Text" : "CDDB"); clrtoeol(); } else { mvprintw(LINE_TRACK_PREV, 0, (char *) "%s",""); clrtoeol(); } if (strlen(p_cd_info->title)) { mvprintw(LINE_TRACK_TITLE, 0, (char *) ">track %2d title : %s [%s]", sub.track, p_cd_info->title, (char *) (p_cd_info->b_cdtext ? "CD-Text" : "CDDB")); clrtoeol(); } if (strlen(p_cd_info->artist)) { mvprintw(LINE_TRACK_ARTIST, 0, (char *) ">track %2d artist: %s [%s]", sub.track, p_cd_info->artist, p_cd_info->b_cdtext ? "CD-Text" : "CDDB"); clrtoeol(); } if (i_last_audio_track != sub.track && strlen(cd_info[sub.track+1].title)) { const cd_track_info_rec_t *p_cd_info = &cd_info[sub.track+1]; mvprintw(LINE_TRACK_NEXT, 0, (char *) " track %2d title : %s [%s]", sub.track+1, p_cd_info->title, p_cd_info->b_cdtext ? "CD-Text" : "CDDB"); clrtoeol(); } else { mvprintw(LINE_TRACK_NEXT, 0, (char *) "%s",""); clrtoeol(); } clrtobot(); } } action(NULL); /* Redisplay action line. */ } static void get_cddb_track_info(track_t i_track) { #ifdef HAVE_CDDB cddb_track_t *t = cddb_disc_get_track(p_cddb_disc, i_track - i_first_track); if (t) { cddb_track_set_title(t, title); cddb_track_set_artist(t, artist); } #else ; #endif } #define add_cdtext_track_info(format_str, info_field, FIELD) \ if (p_cdtext->field[FIELD]) { \ snprintf(cd_info[i_track].info_field, \ sizeof(cd_info[i_track].info_field), \ format_str, p_cdtext->field[FIELD]); \ cd_info[i_track].b_cdtext = true; \ } static void get_cdtext_track_info(track_t i_track) { cdtext_t *p_cdtext = cdio_get_cdtext(p_cdio, i_track); if (NULL != p_cdtext) { add_cdtext_track_info("%s", title, CDTEXT_TITLE); add_cdtext_track_info("%s", artist, CDTEXT_PERFORMER); cdtext_destroy(p_cdtext); } } static void get_track_info(track_t i_track) { if (b_prefer_cdtext) { get_cdtext_track_info(i_track); get_cddb_track_info(i_track); } else { get_cddb_track_info(i_track); get_cdtext_track_info(i_track); } } #define display_line(LINE_NO, COL_NO, format_str, field) \ if (field != NULL && field[0]) { \ mvprintw(LINE_NO, COL_NO, (char *) format_str " [%s]", \ field, \ b_cdtext_ ## field ? "CD-Text": "CDDB"); \ clrtoeol(); \ } static void display_cdinfo(CdIo_t *p_cdio, track_t i_tracks, track_t i_first_track) { int len; char line[80]; if (!b_interactive) return; if (!b_cd) snprintf(line, sizeof(line), "-"); else { len = snprintf(line, sizeof(line), "%2u tracks (%02x:%02x min)", (unsigned int) i_last_track, toc[i_last_track+1].m, toc[i_last_track+1].s); if (i_data && i_first_track != CDIO_CDROM_LEADOUT_TRACK) snprintf(line+len, sizeof(line)-len, ", audio=%u-%u", (unsigned int) i_first_audio_track, (unsigned int) i_last_audio_track); display_line(LINE_ARTIST, 0, "CD Artist : %s", artist); display_line(LINE_CDNAME, 0, "CD Title : %s", title); display_line(LINE_GENRE, 0, "CD Genre : %s", genre); display_line(LINE_YEAR, 0, "CD Year : %s", year); } mvprintw(LINE_CDINFO, 0, (char *) "CD info: %0s", line); clrtoeol(); action(NULL); } /* ---------------------------------------------------------------------- */ static void usage(char *prog) { fprintf(stderr, "%s is a simple curses CD player. It can pick up artist,\n" "CD name and song title from CD-Text info on the CD or\n" "via CDDB.\n" "\n" "usage: %s [options] [device]\n" "\n" "default for to search for a CD-ROM device with a CD-DA loaded\n" "\n" "These command line options available:\n" " -h print this help\n" " -k print key mapping\n" " -a start up in auto-mode\n" " -v verbose\n" "\n" "for non-interactive use (only one) of these:\n" " -l list tracks\n" " -c print cover (PostScript to stdout)\n" " -C close CD-ROM tray. If you use this option,\n" " a CD-ROM device name must be specified.\n" " -p play the whole CD\n" " -t n play track >n<\n" " -t a-b play all tracks between a and b (inclusive)\n" " -L set volume level\n" " -s stop playing\n" " -S list audio subchannel information\n" " -e eject cdrom\n" "\n" "That's all. Oh, maybe a few words more about the auto-mode. This\n" "is the 'dont-touch-any-key' feature. You load a CD, player starts\n" "to play it, and when it is done it ejects the CD. Start it that\n" "way on a spare console and forget about it...\n" "\n" "(c) 1997,98 Gerd Knorr \n" "(c) 2005, 2006 Rocky Bernstein \n" , prog, prog); } static void print_keys() { unsigned int i; for (i=0; i < i_key_bindings; i++) fprintf(stderr, "%s\n", key_bindings[i]); } static void keypress_wait(CdIo_t *p_cdio) { int key; action("press any key to continue"); while (1 != select_wait(b_cd ? 1 : 5)) { read_subchannel(p_cdio); display_status(true); } key = getch(); clrtobot(); action(NULL); if (!b_all_tracks) display_cdinfo(p_cdio, i_tracks, i_first_track); i_last_display_track = CDIO_INVALID_TRACK; } static void list_keys() { unsigned int i; for (i=0; i < i_key_bindings; i++) { mvprintw(LINE_TRACK_PREV+i, 0, (char *) "%s", key_bindings[i]); clrtoeol(); } keypress_wait(p_cdio); } static void display_tracks(void) { track_t i; int i_line=0; int s; if (b_record) { i_line=LINE_TRACK_PREV - 1; for (i = i_first_track; i <= i_last_track; i++) { char line[200]=""; s = cdio_audio_get_msf_seconds(&toc[i+1]) - cdio_audio_get_msf_seconds(&toc[i]); read_subchannel(p_cdio); snprintf(line, sizeof(line), "%2d %02d:%02d %s ", i, s / CDIO_CD_SECS_PER_MIN, s % CDIO_CD_SECS_PER_MIN, ( ( sub.audio_status == CDIO_MMC_READ_SUB_ST_PLAY || sub.audio_status == CDIO_MMC_READ_SUB_ST_PAUSED ) && sub.track == i ) ? "->" : " |"); if (b_record) { if ( strlen(cd_info[i].title) ) strcat(line, cd_info[i].title); if ( strlen(cd_info[i].artist) > 0 ) { if (strlen(cd_info[i].title)) strcat(line, " / "); strcat(line, cd_info[i].artist); } } if (sub.track == i) { attron(A_STANDOUT); mvprintw(i_line++, 0, line); attroff(A_STANDOUT); } else mvprintw(i_line++, 0, line); clrtoeol(); } } } /* * PostScript 8bit latin1 handling * stolen from mpage output -- please don't ask me how this works... */ #define ENCODING_TRICKS \ "/reencsmalldict 12 dict def\n" \ "/ReEncodeSmall { reencsmalldict begin\n" \ "/newcodesandnames exch def /newfontname exch def\n" \ "/basefontname exch def\n" \ "/basefontdict basefontname findfont def\n" \ "/newfont basefontdict maxlength dict def\n" \ "basefontdict { exch dup /FID ne { dup /Encoding eq\n" \ "{ exch dup length array copy newfont 3 1 roll put }\n" \ "{ exch newfont 3 1 roll put }\n" \ "ifelse }\n" \ "{ pop pop }\n" \ "ifelse } forall\n" \ "newfont /FontName newfontname put\n" \ "newcodesandnames aload pop newcodesandnames length 2 idiv\n" \ "{ newfont /Encoding get 3 1 roll put } repeat\n" \ "newfontname newfont definefont pop end } def\n" \ "/charvec [\n" \ "026 /Scaron\n" \ "027 /Ydieresis\n" \ "028 /Zcaron\n" \ "029 /scaron\n" \ "030 /trademark\n" \ "031 /zcaron\n" \ "032 /space\n" \ "033 /exclam\n" \ "034 /quotedbl\n" \ "035 /numbersign\n" \ "036 /dollar\n" \ "037 /percent\n" \ "038 /ampersand\n" \ "039 /quoteright\n" \ "040 /parenleft\n" \ "041 /parenright\n" \ "042 /asterisk\n" \ "043 /plus\n" \ "044 /comma\n" \ "045 /minus\n" \ "046 /period\n" \ "047 /slash\n" \ "048 /zero\n" \ "049 /one\n" \ "050 /two\n" \ "051 /three\n" \ "052 /four\n" \ "053 /five\n" \ "054 /six\n" \ "055 /seven\n" \ "056 /eight\n" \ "057 /nine\n" \ "058 /colon\n" \ "059 /semicolon\n" \ "060 /less\n" \ "061 /equal\n" \ "062 /greater\n" \ "063 /question\n" \ "064 /at\n" \ "065 /A\n" \ "066 /B\n" \ "067 /C\n" \ "068 /D\n" \ "069 /E\n" \ "070 /F\n" \ "071 /G\n" \ "072 /H\n" \ "073 /I\n" \ "074 /J\n" \ "075 /K\n" \ "076 /L\n" \ "077 /M\n" \ "078 /N\n" \ "079 /O\n" \ "080 /P\n" \ "081 /Q\n" \ "082 /R\n" \ "083 /S\n" \ "084 /T\n" \ "085 /U\n" \ "086 /V\n" \ "087 /W\n" \ "088 /X\n" \ "089 /Y\n" \ "090 /Z\n" \ "091 /bracketleft\n" \ "092 /backslash\n" \ "093 /bracketright\n" \ "094 /asciicircum\n" \ "095 /underscore\n" \ "096 /quoteleft\n" \ "097 /a\n" \ "098 /b\n" \ "099 /c\n" \ "100 /d\n" \ "101 /e\n" \ "102 /f\n" \ "103 /g\n" \ "104 /h\n" \ "105 /i\n" \ "106 /j\n" \ "107 /k\n" \ "108 /l\n" \ "109 /m\n" \ "110 /n\n" \ "111 /o\n" \ "112 /p\n" \ "113 /q\n" \ "114 /r\n" \ "115 /s\n" \ "116 /t\n" \ "117 /u\n" \ "118 /v\n" \ "119 /w\n" \ "120 /x\n" \ "121 /y\n" \ "122 /z\n" \ "123 /braceleft\n" \ "124 /bar\n" \ "125 /braceright\n" \ "126 /asciitilde\n" \ "127 /.notdef\n" \ "128 /fraction\n" \ "129 /florin\n" \ "130 /quotesingle\n" \ "131 /quotedblleft\n" \ "132 /guilsinglleft\n" \ "133 /guilsinglright\n" \ "134 /fi\n" \ "135 /fl\n" \ "136 /endash\n" \ "137 /dagger\n" \ "138 /daggerdbl\n" \ "139 /bullet\n" \ "140 /quotesinglbase\n" \ "141 /quotedblbase\n" \ "142 /quotedblright\n" \ "143 /ellipsis\n" \ "144 /dotlessi\n" \ "145 /grave\n" \ "146 /acute\n" \ "147 /circumflex\n" \ "148 /tilde\n" \ "149 /oe\n" \ "150 /breve\n" \ "151 /dotaccent\n" \ "152 /perthousand\n" \ "153 /emdash\n" \ "154 /ring\n" \ "155 /Lslash\n" \ "156 /OE\n" \ "157 /hungarumlaut\n" \ "158 /ogonek\n" \ "159 /caron\n" \ "160 /lslash\n" \ "161 /exclamdown\n" \ "162 /cent\n" \ "163 /sterling\n" \ "164 /currency\n" \ "165 /yen\n" \ "166 /brokenbar\n" \ "167 /section\n" \ "168 /dieresis\n" \ "169 /copyright\n" \ "170 /ordfeminine\n" \ "171 /guillemotleft\n" \ "172 /logicalnot\n" \ "173 /hyphen\n" \ "174 /registered\n" \ "175 /macron\n" \ "176 /degree\n" \ "177 /plusminus\n" \ "178 /twosuperior\n" \ "179 /threesuperior\n" \ "180 /acute\n" \ "181 /mu\n" \ "182 /paragraph\n" \ "183 /periodcentered\n" \ "184 /cedilla\n" \ "185 /onesuperior\n" \ "186 /ordmasculine\n" \ "187 /guillemotright\n" \ "188 /onequarter\n" \ "189 /onehalf\n" \ "190 /threequarters\n" \ "191 /questiondown\n" \ "192 /Agrave\n" \ "193 /Aacute\n" \ "194 /Acircumflex\n" \ "195 /Atilde\n" \ "196 /Adieresis\n" \ "197 /Aring\n" \ "198 /AE\n" \ "199 /Ccedilla\n" \ "200 /Egrave\n" \ "201 /Eacute\n" \ "202 /Ecircumflex\n" \ "203 /Edieresis\n" \ "204 /Igrave\n" \ "205 /Iacute\n" \ "206 /Icircumflex\n" \ "207 /Idieresis\n" \ "208 /Eth\n" \ "209 /Ntilde\n" \ "210 /Ograve\n" \ "211 /Oacute\n" \ "212 /Ocircumflex\n" \ "213 /Otilde\n" \ "214 /Odieresis\n" \ "215 /multiply\n" \ "216 /Oslash\n" \ "217 /Ugrave\n" \ "218 /Uacute\n" \ "219 /Ucircumflex\n" \ "220 /Udieresis\n" \ "221 /Yacute\n" \ "222 /Thorn\n" \ "223 /germandbls\n" \ "224 /agrave\n" \ "225 /aacute\n" \ "226 /acircumflex\n" \ "227 /atilde\n" \ "228 /adieresis\n" \ "229 /aring\n" \ "230 /ae\n" \ "231 /ccedilla\n" \ "232 /egrave\n" \ "233 /eacute\n" \ "234 /ecircumflex\n" \ "235 /edieresis\n" \ "236 /igrave\n" \ "237 /iacute\n" \ "238 /icircumflex\n" \ "239 /idieresis\n" \ "240 /eth\n" \ "241 /ntilde\n" \ "242 /ograve\n" \ "243 /oacute\n" \ "244 /ocircumflex\n" \ "245 /otilde\n" \ "246 /odieresis\n" \ "247 /divide\n" \ "248 /oslash\n" \ "249 /ugrave\n" \ "250 /uacute\n" \ "251 /ucircumflex\n" \ "252 /udieresis\n" \ "253 /yacute\n" \ "254 /thorn\n" \ "255 /ydieresis\n" \ "] def" static void ps_list_tracks(void) { int i,s,y,sy; if (!b_record) return; printf("%%!PS-Adobe-2.0\n"); /* encoding tricks */ puts(ENCODING_TRICKS); printf("/Times /TimesLatin1 charvec ReEncodeSmall\n"); printf("/Helvetica /HelveticaLatin1 charvec ReEncodeSmall\n"); /* Spaces */ printf("0 setlinewidth\n"); printf(" 100 100 moveto\n"); printf(" 390 0 rlineto\n"); printf(" 0 330 rlineto\n"); printf("-390 0 rlineto\n"); printf("closepath stroke\n"); printf(" 100 100 moveto\n"); printf("-16 0 rlineto\n"); printf(" 0 330 rlineto\n"); printf("422 0 rlineto\n"); printf(" 0 -330 rlineto\n"); printf("closepath stroke\n"); /* Title */ printf("/TimesLatin1 findfont 24 scalefont setfont\n"); printf("120 400 moveto (%s) show\n", title); printf("/TimesLatin1 findfont 18 scalefont setfont\n"); printf("120 375 moveto (%s) show\n", artist); /* List */ sy = 250 / i_last_track; if (sy > 14) sy = 14; printf("/labelfont /TimesLatin1 findfont %d scalefont def\n",sy-2); printf("/timefont /Courier findfont %d scalefont def\n",sy-2); for (i = i_first_track, y = 350; i <= i_last_track; i++, y -= sy) { s = cdio_audio_get_msf_seconds(&toc[i+1]) - cdio_audio_get_msf_seconds(&toc[i]); printf("labelfont setfont\n"); printf("120 %d moveto (%d) show\n", y, i); { char line[200]=""; if ( strlen(cd_info[i].title) ) strcat(line, cd_info[i].title); if ( strlen(cd_info[i].artist) > 0 ) { if (strlen(cd_info[i].title)) strcat(line, " / "); strcat(line, cd_info[i].artist); } printf("150 %d moveto (%s) show\n", y, line); } printf("timefont setfont\n"); printf("420 %d moveto (%2d:%02d) show\n", y, s / CDIO_CD_SECS_PER_MIN, s % CDIO_CD_SECS_PER_MIN); } /* Seitenbanner */ printf("/HelveticaLatin1 findfont 12 scalefont setfont\n"); printf(" 97 105 moveto (%s: %s) 90 rotate show -90 rotate\n", artist, title); printf("493 425 moveto (%s: %s) -90 rotate show 90 rotate\n", artist, title); printf("showpage\n"); } static void list_tracks(void) { int i,s; if (!b_record) return; printf("Title : %s\n", title); printf("Artist: %s\n", artist); for (i = i_first_track; i <= i_last_track; i++) { s = cdio_audio_get_msf_seconds(&toc[i+1]) - cdio_audio_get_msf_seconds(&toc[i]); printf("%2d: %s [%d seconds]\n", i, cd_info[i].title, s); } } typedef enum { NO_OP=0, PLAY_CD=1, PLAY_TRACK=2, STOP_PLAYING=3, EJECT_CD=4, CLOSE_CD=5, SET_VOLUME=6, LIST_SUBCHANNEL=7, LIST_KEYS=8, LIST_TRACKS=9, PS_LIST_TRACKS=10, TOGGLE_PAUSE=11, EXIT_PROGRAM=12 } cd_operation_t; int main(int argc, char *argv[]) { int c, nostop=0; char *h; int i_rc = 0; cd_operation_t cd_op = NO_OP; /* operation to do in non-interactive mode */ psz_program = strrchr(argv[0],'/'); psz_program = psz_program ? psz_program+1 : argv[0]; memset(&cddb_opts, 0, sizeof(cddb_opts)); cdio_loglevel_default = CDIO_LOG_WARN; /* parse options */ while ( 1 ) { if (-1 == (c = getopt(argc, argv, "acCdehkplL:sSt:vx"))) break; switch (c) { case 'v': b_verbose = true; if (cdio_loglevel_default > CDIO_LOG_INFO) cdio_loglevel_default = CDIO_LOG_INFO; break; case 'd': debug = 1; if (cdio_loglevel_default > CDIO_LOG_DEBUG) cdio_loglevel_default = CDIO_LOG_DEBUG; break; case 'a': auto_mode = 1; break; case 'L': i_volume_level = atoi(optarg); cd_op = SET_VOLUME; b_interactive = false; break; case 't': if (NULL != (h = strchr(optarg,'-'))) { *h = 0; start_track = atoi(optarg); stop_track = atoi(h+1)+1; if (0 == start_track) start_track = 1; if (1 == stop_track) stop_track = CDIO_CDROM_LEADOUT_TRACK; } else { start_track = atoi(optarg); stop_track = start_track+1; one_track = 1; } b_interactive = false; cd_op = PLAY_TRACK; break; case 'p': b_interactive = false; cd_op = PLAY_CD; break; case 'l': b_interactive = false; cd_op = LIST_TRACKS; break; case 'C': b_interactive = false; cd_op = CLOSE_CD; break; case 'c': b_interactive = false; cd_op = PS_LIST_TRACKS; break; case 's': b_interactive = false; cd_op = STOP_PLAYING; break; case 'S': b_interactive = false; cd_op = LIST_SUBCHANNEL; break; case 'e': b_interactive = false; cd_op = EJECT_CD; break; case 'k': print_keys(); exit(1); case 'h': usage(psz_program); exit(1); default: usage(psz_program); exit(1); } } if (argc > optind) { psz_device = strdup(argv[optind]); } else { char **ppsz_cdda_drives=NULL; char **ppsz_all_cd_drives = cdio_get_devices_ret(&driver_id); if (!ppsz_all_cd_drives) { fprintf(stderr, "Can't find a CD-ROM drive\n"); exit(2); } ppsz_cdda_drives = cdio_get_devices_with_cap(ppsz_all_cd_drives, CDIO_FS_AUDIO, false); if (!ppsz_cdda_drives || !ppsz_cdda_drives[0]) { fprintf(stderr, "Can't find a CD-ROM drive with a CD-DA in it\n"); exit(3); } psz_device = strdup(ppsz_cdda_drives[0]); cdio_free_device_list(ppsz_all_cd_drives); cdio_free_device_list(ppsz_cdda_drives); } if (!b_interactive) { b_sig = true; nostop=1; } tty_raw(); signal(SIGINT,ctrlc); signal(SIGQUIT,ctrlc); signal(SIGTERM,ctrlc); signal(SIGHUP,ctrlc); signal(SIGWINCH, sigwinch); if (CLOSE_CD != cd_op) { /* open device */ if (b_verbose) fprintf(stderr, "open %s... ", psz_device); p_cdio = cdio_open (psz_device, driver_id); if (!p_cdio && cd_op != EJECT_CD) { cd_close(psz_device); p_cdio = cdio_open (psz_device, driver_id); } if (p_cdio && b_verbose) fprintf(stderr,"ok\n"); } if (b_interactive) { #ifdef HAVE_CDDB cddb_log_set_handler (cddb_log_handler); #else ; #endif } else { b_sig = true; nostop=1; if (EJECT_CD == cd_op) { i_rc = cd_eject() ? 0 : 1; } else { switch (cd_op) { case PS_LIST_TRACKS: case LIST_TRACKS: case PLAY_TRACK: read_toc(p_cdio); default: break; } if (p_cdio) switch (cd_op) { case STOP_PLAYING: b_cd = true; i_rc = cd_stop(p_cdio) ? 0 : 1; break; case EJECT_CD: /* Should have been handled above. */ cd_eject(); break; case LIST_TRACKS: list_tracks(); break; case PS_LIST_TRACKS: ps_list_tracks(); break; case PLAY_TRACK: /* play just this one track */ if (b_record) { printf("%s / %s\n", artist, title); if (one_track) printf("%s\n", cd_info[start_track].title); } i_rc = play_track(start_track, stop_track) ? 0 : 1; break; case PLAY_CD: if (b_record) printf("%s / %s\n", artist, title); play_track(1,CDIO_CDROM_LEADOUT_TRACK); break; case SET_VOLUME: i_rc = set_volume_level(p_cdio, i_volume_level); break; case LIST_SUBCHANNEL: if (read_subchannel(p_cdio)) { if (sub.audio_status == CDIO_MMC_READ_SUB_ST_PAUSED || sub.audio_status == CDIO_MMC_READ_SUB_ST_PLAY) { { printf("track %2d - %02x:%02x (%02x:%02x abs) ", sub.track, sub.rel_addr.m, sub.rel_addr.s, sub.abs_addr.m, sub.abs_addr.s); } } printf("drive state: %s\n", mmc_audio_state2str(sub.audio_status)); } else { i_rc = 1; } break; case CLOSE_CD: /* Handled below */ case LIST_KEYS: case TOGGLE_PAUSE: case EXIT_PROGRAM: case NO_OP: break; } else if (CLOSE_CD == cd_op) { i_rc = (DRIVER_OP_SUCCESS == cdio_close_tray(psz_device, NULL)) ? 0 : 1; } else { fprintf(stderr,"no CD in drive (%s)\n", psz_device); } } } /* Play all tracks *unless* we have a play or paused status already. */ read_subchannel(p_cdio); if (sub.audio_status != CDIO_MMC_READ_SUB_ST_PAUSED && sub.audio_status != CDIO_MMC_READ_SUB_ST_PLAY) play_track(1, CDIO_CDROM_LEADOUT_TRACK); while ( !b_sig ) { int key; if (!b_cd) read_toc(p_cdio); read_subchannel(p_cdio); display_status(false); if (1 == select_wait(b_cd ? 1 : 5)) { switch (key = getch()) { case '-': decrease_volume_level(p_cdio); break; case '+': increase_volume_level(p_cdio); break; case 'A': case 'a': auto_mode = !auto_mode; break; case 'X': case 'x': nostop=1; /* fall through */ case 'Q': case 'q': b_sig = true; break; case 'E': case 'e': cd_eject(); break; case 's': cd_stop(p_cdio); break; case 'C': case 'c': cd_close(psz_device); break; case 'L': case 'l': b_all_tracks = !b_all_tracks; if (b_all_tracks) display_tracks(); else { i_last_display_track = CDIO_INVALID_TRACK; display_cdinfo(p_cdio, i_tracks, i_first_track); } break; case 'K': case 'k': case 'h': case 'H': case '?': list_keys(); break; case ' ': case 'P': case 'p': toggle_pause(); break; case KEY_RIGHT: if (b_cd && (sub.audio_status == CDIO_MMC_READ_SUB_ST_PAUSED || sub.audio_status == CDIO_MMC_READ_SUB_ST_PLAY)) play_track(sub.track+1, CDIO_CDROM_LEADOUT_TRACK); else play_track(1,CDIO_CDROM_LEADOUT_TRACK); break; case KEY_LEFT: if (b_cd && (sub.audio_status == CDIO_MMC_READ_SUB_ST_PAUSED || sub.audio_status == CDIO_MMC_READ_SUB_ST_PLAY)) play_track(sub.track-1,CDIO_CDROM_LEADOUT_TRACK); break; case KEY_UP: if (b_cd && sub.audio_status == CDIO_MMC_READ_SUB_ST_PLAY) skip(10); break; case KEY_DOWN: if (b_cd && sub.audio_status == CDIO_MMC_READ_SUB_ST_PLAY) skip(-10); break; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': play_track(key - '0', CDIO_CDROM_LEADOUT_TRACK); break; case '0': play_track(10, CDIO_CDROM_LEADOUT_TRACK); break; case KEY_F(1): case KEY_F(2): case KEY_F(3): case KEY_F(4): case KEY_F(5): case KEY_F(6): case KEY_F(7): case KEY_F(8): case KEY_F(9): case KEY_F(10): case KEY_F(11): case KEY_F(12): case KEY_F(13): case KEY_F(14): case KEY_F(15): case KEY_F(16): case KEY_F(17): case KEY_F(18): case KEY_F(19): case KEY_F(20): play_track(key - KEY_F(1) + 11, CDIO_CDROM_LEADOUT_TRACK); break; } } } if (!nostop) cd_stop(p_cdio); tty_restore(); finish("bye", i_rc); return 0; /* keep compiler happy */ } libcdio-0.83/src/cd-drive.help2man0000644000175000017500000000030711565177352013722 00000000000000[SYNOPSIS] .B cd-drive \fIOPTION\fR... .TP Shows CD-ROM drive characteristics. [SEE ALSO] \&\f(CWcd-info(1)\fR for information about the CD inside a CD-ROM. [AUTHOR] Rocky Bernstein rocky@gnu.org libcdio-0.83/src/cd-read.10000644000175000017500000000516311652140342012145 00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.38.4. .TH LT-CD-READ "1" "October 2011" "lt-cd-read version 0.83" "User Commands" .SH NAME lt-cd-read \- manual page for lt-cd-read version 0.83 .SH SYNOPSIS .B cd-read \fIOPTION\fR... .TP Reads Information from a CD or CD-image. .SH DESCRIPTION .TP \fB\-a\fR, \fB\-\-access\-mode\fR=\fISTRING\fR Set CD control access mode .TP \fB\-m\fR, \fB\-\-mode\fR=\fIMODE\-TYPE\fR set CD\-ROM read mode (audio, auto, m1f1, m1f2, m2mf1, m2f2) .TP \fB\-d\fR, \fB\-\-debug\fR=\fIINT\fR Set debugging to LEVEL .TP \fB\-x\fR, \fB\-\-hexdump\fR Show output as a hex dump. The default is a hex dump when output goes to stdout and no hex dump when output is to a file. .TP \fB\-j\fR, \fB\-\-just\-hex\fR Don't display printable chars on hex dump. The default is print chars too. .TP \fB\-\-no\-header\fR Don't display header and copyright (for regression testing) .TP \fB\-\-no\-hexdump\fR Don't show output as a hex dump. .TP \fB\-s\fR, \fB\-\-start\fR=\fIINT\fR Set LBA to start reading from .TP \fB\-e\fR, \fB\-\-end\fR=\fIINT\fR Set LBA to end reading from .TP \fB\-n\fR, \fB\-\-number\fR=\fIINT\fR Set number of sectors to read .TP \fB\-b\fR, \fB\-\-bin\-file\fR[=\fIFILE\fR] set "bin" CD\-ROM disk image file as source .TP \fB\-c\fR, \fB\-\-cue\-file\fR[=\fIFILE\fR] set "cue" CD\-ROM disk image file as source .TP \fB\-i\fR, \fB\-\-input\fR[=\fIFILE\fR] set source and determine if "bin" image or device .TP \fB\-C\fR, \fB\-\-cdrom\-device\fR[=\fIDEVICE\fR] set CD\-ROM device as source .TP \fB\-N\fR, \fB\-\-nrg\-file\fR[=\fIFILE\fR] set Nero CD\-ROM disk image file as source .TP \fB\-t\fR, \fB\-\-toc\-file\fR[=\fIFILE\fR] set "TOC" CD\-ROM disk image file as source .TP \fB\-o\fR, \fB\-\-output\-file\fR=\fIFILE\fR Output blocks to file rather than give a hexdump. .TP \fB\-V\fR, \fB\-\-version\fR display version and copyright information and exit .SS "Help options:" .TP \-?, \fB\-\-help\fR Show this help message .TP \fB\-\-usage\fR Display brief usage message .SH AUTHOR Rocky Bernstein .SH COPYRIGHT Copyright \(co 2003, 2004, 2005, 2007, 2008, 2011 R. Bernstein .br This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Have driver: GNU/Linux ioctl and MMC driver Have driver: cdrdao (TOC) disk image driver Have driver: bin/cuesheet disk image driver Have driver: Nero NRG disk image driver Default CD\-ROM device: /dev/scd0 .SH "SEE ALSO" \&\f(CWcd-info(1)\fR for information about a CD; \&\f(CWcd-drive(1)\fR for CD-ROM characteristics; \&\f(CWiso-read(1)\fR for information about an ISO-9660 image. libcdio-0.83/src/cd-paranoia/0000755000175000017500000000000011652210415013014 500000000000000libcdio-0.83/src/cd-paranoia/cd-paranoia.c0000644000175000017500000010362411650126365015274 00000000000000/* Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011 Rocky Bernstein Copyright (C) 1998 Monty This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . See ChangeLog for recent changes. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #ifdef HAVE_STDIO_H # include #endif #ifdef HAVE_STDARG_H # include #endif #ifdef HAVE_LIMITS_H #include #endif #ifdef HAVE_STDLIB_H # include #endif #ifdef HAVE_UNISTD_H # include #endif #ifdef HAVE_STRING_H # include #endif #ifdef HAVE_FCNTL_H #include #endif #include "getopt.h" #ifdef HAVE_ERRNO_H #include #endif #include #include #ifdef HAVE_SYS_STAT_H # include #endif #if !defined(HAVE_GETTIMEOFDAY) /* MinGW uses sys/time.h and sys/timeb.h to roll its own gettimeofday() */ # if defined(HAVE_SYS_TIME_H) && defined(HAVE_SYS_TIMEB_H) # include # include static void gettimeofday(struct timeval* tv, void* timezone); # endif #endif /* !defined(HAVE_GETTIMEOFDAY) */ #include #include #include #include #include #include #include "utils.h" #include "report.h" #include "version.h" #include "header.h" #include "buffering_write.h" extern int verbose; extern int quiet; /* I wonder how many alignment issues this is gonna trip in the future... it shouldn't trip any... I guess we'll find out :) */ static int bigendianp(void) { int test=1; char *hack=(char *)(&test); if(hack[0])return(0); return(1); } static long parse_offset(cdrom_drive_t *d, char *offset, int begin) { track_t i_track= CDIO_INVALID_TRACK; long hours = -1; long minutes = -1; long seconds = -1; long sectors = -1; char *time = NULL; char *temp = NULL; long ret; if (!offset) return -1; /* separate track from time offset */ temp=strchr(offset,']'); if(temp){ *temp='\0'; temp=strchr(offset,'['); if(temp==NULL){ report("Error parsing span argument"); exit(1); } *temp='\0'; time=temp+1; } /* parse track */ { int chars=strspn(offset,"0123456789"); if(chars>0){ offset[chars]='\0'; i_track=atoi(offset); if ( i_track > d->tracks ) { /*take track i_first_track-1 as pre-gap of 1st track*/ char buffer[256]; snprintf(buffer, sizeof(buffer), "Track #%d does not exist.", i_track); report(buffer); exit(1); } } } while(time){ long val,chars; char *sec=strrchr(time,'.'); if(!sec)sec=strrchr(time,':'); if(!sec)sec=time-1; chars=strspn(sec+1,"0123456789"); if(chars) val=atoi(sec+1); else val=0; switch(*sec){ case '.': if(sectors!=-1){ report("Error parsing span argument"); exit(1); } sectors=val; break; default: if(seconds==-1) seconds=val; else if(minutes==-1) minutes=val; else if(hours==-1) hours=val; else{ report("Error parsing span argument"); exit(1); } break; } if (sec<=time) break; *sec='\0'; } if (i_track == CDIO_INVALID_TRACK) { if (seconds==-1 && sectors==-1) return -1; if (begin==-1) { ret=cdda_disc_firstsector(d); } else ret = begin; } else { if ( seconds==-1 && sectors==-1 ) { if (begin==-1){ /* first half of a span */ return(cdda_track_firstsector(d, i_track)); }else{ return(cdda_track_lastsector(d, i_track)); } } else { /* relative offset into a track */ ret=cdda_track_firstsector(d, i_track); } } /* OK, we had some sort of offset into a track */ if (sectors != -1) ret += sectors; if (seconds != -1) ret += seconds*CDIO_CD_FRAMES_PER_SEC; if (minutes != -1) ret += minutes*CDIO_CD_FRAMES_PER_MIN; if (hours != -1) ret += hours *60*CDIO_CD_FRAMES_PER_MIN; /* We don't want to outside of the track; if it's relative, that's OK... */ if( i_track != CDIO_INVALID_TRACK ){ if (cdda_sector_gettrack(d,ret) != i_track) { report("Time/sector offset goes beyond end of specified track."); exit(1); } } /* Don't pass up end of session */ if( ret>cdda_disc_lastsector(d) ) { report("Time/sector offset goes beyond end of disc."); exit(1); } return(ret); } static void display_toc(cdrom_drive_t *d) { long audiolen=0; track_t i; report("\nTable of contents (audio tracks only):\n" "track length begin copy pre ch\n" "==========================================================="); for( i=1; i<=d->tracks; i++) if ( cdda_track_audiop(d,i) ) { char buffer[256]; lsn_t sec=cdda_track_firstsector(d,i); lsn_t off=cdda_track_lastsector(d,i)-sec+1; sprintf(buffer, "%3d. %7ld [%02d:%02d.%02d] %7ld [%02d:%02d.%02d] %s %s %s", i, (long int) off, (int) (off/(CDIO_CD_FRAMES_PER_MIN)), (int) ((off/CDIO_CD_FRAMES_PER_SEC) % CDIO_CD_SECS_PER_MIN), (int) (off % CDIO_CD_FRAMES_PER_SEC), (long int) sec, (int) (sec/(CDIO_CD_FRAMES_PER_MIN)), (int) ((sec/CDIO_CD_FRAMES_PER_SEC) % CDIO_CD_SECS_PER_MIN), (int) (sec % CDIO_CD_FRAMES_PER_SEC), cdda_track_copyp(d,i)?" OK":" no", cdda_track_preemp(d,i)?" yes":" no", cdda_track_channels(d,i)==2?" 2":" 4"); report(buffer); audiolen+=off; } { char buffer[256]; sprintf(buffer, "TOTAL %7ld [%02d:%02d.%02d] (audio only)", audiolen, (int) (audiolen/(CDIO_CD_FRAMES_PER_MIN)), (int) ((audiolen/CDIO_CD_FRAMES_PER_SEC) % CDIO_CD_SECS_PER_MIN), (int) (audiolen % CDIO_CD_FRAMES_PER_SEC)); report(buffer); } report(""); } #include "usage.h" static void usage(FILE *f) { fprintf( f, usage_help); } static long callbegin; static long callend; static long callscript=0; static int skipped_flag=0; static int abort_on_skip=0; static FILE *logfile = NULL; #if TRACE_PARANOIA static void callback(long int inpos, paranoia_cb_mode_t function) { } #else static const char *callback_strings[15]={ "wrote", "finished", "read", "verify", "jitter", "correction", "scratch", "scratch repair", "skip", "drift", "backoff", "overlap", "dropped", "duped", "transport error"}; static void callback(long int inpos, paranoia_cb_mode_t function) { /* (== PROGRESS == [--+!---x--------------> | 007218 01 ] == :-) . ==) */ int graph=30; char buffer[256]; static long c_sector=0, v_sector=0; static char dispcache[]=" "; static int last=0; static long lasttime=0; long int sector, osector=0; struct timeval thistime; static char heartbeat=' '; int position=0,aheadposition=0; static int overlap=0; static int printit=-1; static int slevel=0; static int slast=0; static int stimeout=0; const char *smilie="= :-)"; if (callscript) fprintf(stderr, "##: %d [%s] @ %ld\n", function, ((int) function >= -2 && (int) function < 13 ? callback_strings[function+2] : ""), inpos); if(!quiet){ long test; osector=inpos; sector=inpos/CD_FRAMEWORDS; if(printit==-1){ if(isatty(STDERR_FILENO)){ printit=1; }else{ printit=0; } } if(printit==1){ /* else don't bother; it's probably being redirected */ position=((float)(sector-callbegin)/ (callend-callbegin))*graph; aheadposition=((float)(c_sector-callbegin)/ (callend-callbegin))*graph; if(function==-2){ v_sector=sector; return; } if(function==-1){ last=8; heartbeat='*'; slevel=0; v_sector=sector; }else if(position=0) switch(function){ case PARANOIA_CB_VERIFY: if(stimeout>=30){ if(overlap>CD_FRAMEWORDS) slevel=2; else slevel=1; } break; case PARANOIA_CB_READ: if(sector>c_sector)c_sector=sector; break; case PARANOIA_CB_FIXUP_EDGE: if(stimeout>=5){ if(overlap>CD_FRAMEWORDS) slevel=2; else slevel=1; } if(dispcache[position]==' ') dispcache[position]='-'; break; case PARANOIA_CB_FIXUP_ATOM: if(slevel<3 || stimeout>5)slevel=3; if(dispcache[position]==' ' || dispcache[position]=='-') dispcache[position]='+'; break; case PARANOIA_CB_READERR: slevel=6; if(dispcache[position]!='V') dispcache[position]='e'; break; case PARANOIA_CB_SKIP: slevel=8; dispcache[position]='V'; break; case PARANOIA_CB_OVERLAP: overlap=osector; break; case PARANOIA_CB_SCRATCH: slevel=7; break; case PARANOIA_CB_DRIFT: if(slevel<4 || stimeout>5)slevel=4; break; case PARANOIA_CB_FIXUP_DROPPED: case PARANOIA_CB_FIXUP_DUPED: slevel=5; if(dispcache[position]==' ' || dispcache[position]=='-' || dispcache[position]=='+') dispcache[position]='!'; break; case PARANOIA_CB_REPAIR: case PARANOIA_CB_BACKOFF: break; } switch(slevel){ case 0: /* finished, or no jitter */ if(skipped_flag) smilie=" 8-X"; else smilie=" :^D"; break; case 1: /* normal. no atom, low jitter */ smilie=" :-)"; break; case 2: /* normal, overlap > 1 */ smilie=" :-|"; break; case 4: /* drift */ smilie=" :-/"; break; case 3: /* unreported loss of streaming */ smilie=" :-P"; break; case 5: /* dropped/duped bytes */ smilie=" 8-|"; break; case 6: /* scsi error */ smilie=" :-0"; break; case 7: /* scratch */ smilie=" :-("; break; case 8: /* skip */ smilie=" ;-("; skipped_flag=1; break; } gettimeofday(&thistime,NULL); test=thistime.tv_sec*10+thistime.tv_usec/100000; if(lasttime!=test || function==-1 || slast!=slevel){ if(lasttime!=test || function==-1){ last++; lasttime=test; if(last>7)last=0; stimeout++; switch(last){ case 0: heartbeat=' '; break; case 1:case 7: heartbeat='.'; break; case 2:case 6: heartbeat='o'; break; case 3:case 5: heartbeat='0'; break; case 4: heartbeat='O'; break; } if(function==-1) heartbeat='*'; } if(slast!=slevel){ stimeout=0; } slast=slevel; if(abort_on_skip && skipped_flag && function !=-1){ sprintf(buffer, "\r (== PROGRESS == [%s| %06ld %02d ] ==%s %c ==) ", " ...aborting; please wait... ", v_sector,overlap/CD_FRAMEWORDS,smilie,heartbeat); }else{ if(v_sector==0) sprintf(buffer, "\r (== PROGRESS == [%s| ...... %02d ] ==%s %c ==) ", dispcache,overlap/CD_FRAMEWORDS,smilie,heartbeat); else sprintf(buffer, "\r (== PROGRESS == [%s| %06ld %02d ] ==%s %c ==) ", dispcache,v_sector,overlap/CD_FRAMEWORDS,smilie,heartbeat); if(aheadposition>=0 && aheadpositiontv_sec=timebuffer.time; tv->tv_usec=1000*timebuffer.millitm; } #endif /* This is run automatically before leaving the program. Free allocated resources. */ static void cleanup (void) { if (p) paranoia_free(p); if (d) cdda_close(d); free_and_null(force_cdrom_device); free_and_null(span); if(logfile && logfile != stdout) { fclose(logfile); logfile = NULL; } } /* Returns true if we have an integer argument. If so, pi_arg is set. If no argument or integer argument found, we give an error message and return false. */ static bool get_int_arg(char c, long int *pi_arg) { long int i_arg; char *p_end; if (!optarg) { /* This shouldn't happen, but we'll check anyway. */ fprintf(stderr, "An (integer) argument for option -%c was expected " " but not found. Option ignored\n", c); return false; } errno = 0; i_arg = strtol(optarg, &p_end, 10); if ( (LONG_MIN == i_arg || LONG_MAX == i_arg) && (0 != errno) ) { fprintf(stderr, "Value '%s' for option -%c out of range. Value %ld " "used instead.\n", optarg, c, i_arg); *pi_arg = i_arg; return false; } else if (*p_end) { fprintf(stderr, "Can't convert '%s' for option -%c completely into an integer. " "Option ignored.\n", optarg, c); return false; } else { *pi_arg = i_arg; return true; } } int main(int argc,char *argv[]) { int toc_bias = 0; int force_cdrom_endian = -1; int output_type = 1; /* 0=raw, 1=wav, 2=aifc */ int output_endian = 0; /* -1=host, 0=little, 1=big */ int query_only = 0; int batch = 0; long int force_cdrom_overlap = -1; long int force_cdrom_sectors = -1; long int force_cdrom_speed = -1; long int sample_offset = 0; long int test_flags = 0; long int toc_offset = 0; long int max_retries = 20; /* full paranoia, but allow skipping */ int paranoia_mode=PARANOIA_MODE_FULL^PARANOIA_MODE_NEVERSKIP; int out; int search=0; int c,long_option_index; atexit(cleanup); while((c=getopt_long(argc,argv,optstring,options,&long_option_index))!=EOF){ switch(c){ case 'a': output_type=2; output_endian=1; break; case 'B': batch=1; break; case 'c': force_cdrom_endian=0; break; case 'C': force_cdrom_endian=1; break; case 'e': callscript=1; fprintf(stderr, "Sending all callback output to stderr for wrapper script\n"); break; case 'f': output_type=3; output_endian=1; break; case 'F': paranoia_mode&=~(PARANOIA_MODE_FRAGMENT); break; case 'g': case 'd': if (force_cdrom_device) { fprintf(stderr, "Multiple cdrom devices given. Previous device %s ignored\n", force_cdrom_device); free(force_cdrom_device); } force_cdrom_device=strdup(optarg); break; case 'h': usage(stdout); exit(0); case 'l': if(logfile && logfile != stdout)fclose(logfile); if(!strcmp(optarg,"-")) logfile=stdout; else{ logfile=fopen(optarg,"w"); if(logfile==NULL){ report3("Cannot open log summary file %s: %s",(char*)optarg, strerror(errno)); exit(1); } } break; case 'm': { long int mmc_timeout_sec; if (get_int_arg(c, &mmc_timeout_sec)) { mmc_timeout_ms = 1000*mmc_timeout_sec; } } break; case 'n': get_int_arg(c, &force_cdrom_sectors); break; case 'o': get_int_arg(c, &force_cdrom_overlap); break; case 'O': get_int_arg(c, &sample_offset); break; case 'p': output_type=0; output_endian=-1; break; case 'r': output_type=0; output_endian=0; break; case 'q': verbose=CDDA_MESSAGE_FORGETIT; quiet=1; break; case 'Q': query_only=1; break; case 'R': output_type=0; output_endian=1; break; case 's': search=1; break; case 'S': get_int_arg(c, &force_cdrom_speed); break; case 't': get_int_arg(c, &toc_offset); break; case 'T': toc_bias=-1; break; case 'v': verbose=CDDA_MESSAGE_PRINTIT; quiet=0; break; case 'V': fprintf(stderr,PARANOIA_VERSION); fprintf(stderr,"\n"); exit(0); break; case 'w': output_type=1; output_endian=0; break; case 'W': paranoia_mode&=~PARANOIA_MODE_REPAIR; break; case 'x': get_int_arg(c, &test_flags); break; case 'X': /*paranoia_mode&=~(PARANOIA_MODE_SCRATCH|PARANOIA_MODE_REPAIR);*/ abort_on_skip=1; break; case 'Y': paranoia_mode|=PARANOIA_MODE_OVERLAP; /* cdda2wav style overlap check only */ paranoia_mode&=~PARANOIA_MODE_VERIFY; break; case 'Z': paranoia_mode=PARANOIA_MODE_DISABLE; break; case 'z': if (optarg) { get_int_arg(c, &max_retries); paranoia_mode&=~PARANOIA_MODE_NEVERSKIP; } else { paranoia_mode|=PARANOIA_MODE_NEVERSKIP; } break; default: usage(stderr); exit(1); } } if(logfile){ /* log command line and version */ int i; for (i = 0; i < argc; i++) fprintf(logfile,"%s ",argv[i]); fprintf(logfile,"\n"); fprintf(logfile,VERSION); fprintf(logfile,"\n"); fflush(logfile); } if(optind>=argc && !query_only){ if(batch) span=NULL; else{ /* D'oh. No span. Fetch me a brain, Igor. */ usage(stderr); exit(1); } }else if (argv[optind]) span=strdup(argv[optind]); report(PARANOIA_VERSION); /* Query the cdrom/disc; we may need to override some settings */ if(force_cdrom_device) d=cdda_identify(force_cdrom_device,verbose,NULL); else { driver_id_t driver_id; char **ppsz_cd_drives = cdio_get_devices_with_cap_ret(NULL, CDIO_FS_AUDIO, false, &driver_id); if (ppsz_cd_drives && *ppsz_cd_drives) { d=cdda_identify(*ppsz_cd_drives,verbose, NULL); } else { report("\nUnable find or access a CD-ROM drive with an audio CD" " in it."); report("\nYou might try specifying the drive, especially if it has" " mixed-mode (and non-audio) format tracks"); exit(1); } cdio_free_device_list(ppsz_cd_drives); } if(!d){ if(!verbose) report("\nUnable to open cdrom drive; -v might give more information."); exit(1); } if(verbose) cdda_verbose_set(d,CDDA_MESSAGE_PRINTIT,CDDA_MESSAGE_PRINTIT); else cdda_verbose_set(d,CDDA_MESSAGE_PRINTIT,CDDA_MESSAGE_FORGETIT); /* possibly force hand on endianness of drive, sector request size */ if(force_cdrom_endian!=-1){ d->bigendianp=force_cdrom_endian; switch(force_cdrom_endian){ case 0: report("Forcing CDROM sense to little-endian; ignoring preset and autosense"); break; case 1: report("Forcing CDROM sense to big-endian; ignoring preset and autosense"); break; } } if (force_cdrom_sectors!=-1) { if(force_cdrom_sectors<0 || force_cdrom_sectors>100){ report("Default sector read size must be 1<= n <= 100\n"); cdda_close(d); d=NULL; exit(1); } { char buffer[256]; sprintf(buffer,"Forcing default to read %ld sectors; " "ignoring preset and autosense", force_cdrom_sectors); report(buffer); d->nsectors=force_cdrom_sectors; } } if (force_cdrom_overlap!=-1) { if (force_cdrom_overlap<0 || force_cdrom_overlap>CDIO_CD_FRAMES_PER_SEC) { report("Search overlap sectors must be 0<= n <=75\n"); cdda_close(d); d=NULL; if(logfile && logfile != stdout) fclose(logfile); exit(1); } { char buffer[256]; sprintf(buffer,"Forcing search overlap to %ld sectors; " "ignoring autosense", force_cdrom_overlap); report(buffer); } } switch( cdda_open(d) ) { case -2:case -3:case -4:case -5: report("\nUnable to open disc. Is there an audio CD in the drive?"); exit(1); case -6: report("\nCdparanoia could not find a way to read audio from this drive."); exit(1); case 0: break; default: report("\nUnable to open disc."); exit(1); } d->i_test_flags = test_flags; /* Dump the TOC */ if (query_only || verbose ) display_toc(d); if (query_only) exit(0); /* bias the disc. A hack. Of course. this is never the default. */ /* Some CD-ROM/CD-R drives will add an offset to the position on reading audio data. This is usually around 500-700 audio samples (ca. 1/75 second) on reading. So when this program queries a specific sector, it might not receive exactly that sector, but shifted by some amount. Note that if ripping includes the end of the CD, this will this cause this program to attempt to read partial sectors before or past the known user data area of the disc, probably causing read errors on most drives and possibly even hard lockups on some buggy hardware. [Note to libcdio driver hackers: make sure all CD-drivers don't try to read outside of the stated disc boundaries.] */ if(sample_offset){ toc_offset+=sample_offset/588; sample_offset%=588; if(sample_offset<0){ sample_offset+=588; toc_offset--; } } if (toc_bias) { toc_offset = -cdda_track_firstsector(d,1); } { int i; for( i=0; i < d->tracks+1; i++ ) d->disc_toc[i].dwStartSector+=toc_offset; } if (force_cdrom_speed != -1) { cdda_speed_set(d,force_cdrom_speed); } if (d->nsectors==1) { report("WARNING: The autosensed/selected sectors per read value is\n" " one sector, making it very unlikely Paranoia can \n" " work.\n\n" " Attempting to continue...\n\n"); } /* parse the span, set up begin and end sectors */ { long i_first_lsn; long i_last_lsn; long batch_first; long batch_last; int batch_track; if (span) { /* look for the hyphen */ char *span2=strchr(span,'-'); if(strrchr(span,'-')!=span2){ report("Error parsing span argument"); exit(1); } if (span2!=NULL) { *span2='\0'; span2++; } i_first_lsn=parse_offset(d, span, -1); if(i_first_lsn==-1) i_last_lsn=parse_offset(d, span2, cdda_disc_firstsector(d)); else i_last_lsn=parse_offset(d, span2, i_first_lsn); if (i_first_lsn == -1) { if (i_last_lsn == -1) { report("Error parsing span argument"); exit(1); } else { i_first_lsn=cdda_disc_firstsector(d); } } else { if (i_last_lsn==-1) { if (span2) { /* There was a hyphen */ i_last_lsn=cdda_disc_lastsector(d); } else { i_last_lsn= cdda_track_lastsector(d,cdda_sector_gettrack(d, i_first_lsn)); } } } } else { i_first_lsn = cdda_disc_firstsector(d); i_last_lsn = cdda_disc_lastsector(d); } { char buffer[250]; int track1 = cdda_sector_gettrack(d, i_first_lsn); int track2 = cdda_sector_gettrack(d, i_last_lsn); long off1 = i_first_lsn - cdda_track_firstsector(d, track1); long off2 = i_last_lsn - cdda_track_firstsector(d, track2); int i; for( i=track1; i<=track2; i++ ) if(i != 0 && !cdda_track_audiop(d,i)){ report("Selected span contains non audio tracks. Aborting.\n\n"); exit(1); } sprintf(buffer, "Ripping from sector %7ld (track %2d [%d:%02d.%02d])\n" "\t to sector %7ld (track %2d [%d:%02d.%02d])\n", i_first_lsn, track1, (int) (off1/(CDIO_CD_FRAMES_PER_MIN)), (int) ((off1/CDIO_CD_FRAMES_PER_SEC) % CDIO_CD_SECS_PER_MIN), (int) (off1 % CDIO_CD_FRAMES_PER_SEC), i_last_lsn, track2, (int) (off2/(CDIO_CD_FRAMES_PER_MIN)), (int) ((off2/CDIO_CD_FRAMES_PER_SEC) % CDIO_CD_SECS_PER_MIN), (int) (off2 % CDIO_CD_FRAMES_PER_SEC)); report(buffer); } { long cursor; int16_t offset_buffer[1176]; int offset_buffer_used=0; int offset_skip=sample_offset*4; p=paranoia_init(d); paranoia_modeset(p,paranoia_mode); if(force_cdrom_overlap!=-1)paranoia_overlapset(p,force_cdrom_overlap); if(verbose) { cdda_verbose_set(d,CDDA_MESSAGE_LOGIT,CDDA_MESSAGE_LOGIT); cdio_loglevel_default = CDIO_LOG_INFO; } else cdda_verbose_set(d,CDDA_MESSAGE_FORGETIT,CDDA_MESSAGE_FORGETIT); paranoia_seek(p,cursor=i_first_lsn,SEEK_SET); /* this is probably a good idea in general */ #if defined(HAVE_GETUID) && defined(HAVE_SETEUID) seteuid(getuid()); #endif #if defined(HAVE_GETGID) && defined(HAVE_SETEGID) setegid(getgid()); #endif /* we'll need to be able to read one sector past user data if we have a sample offset in order to pick up the last bytes. We need to set the disc length forward here so that the libs are willing to read past, assuming that works on the hardware, of course */ if(sample_offset) d->disc_toc[d->tracks].dwStartSector++; while(cursor<=i_last_lsn){ char outfile_name[256]; if ( batch ){ batch_first = cursor; batch_track = cdda_sector_gettrack(d,cursor); batch_last = cdda_track_lastsector(d, batch_track); if (batch_last>i_last_lsn) batch_last=i_last_lsn; } else { batch_first = i_first_lsn; batch_last = i_last_lsn; batch_track = -1; } callbegin=batch_first; callend=batch_last; /* argv[optind] is the span, argv[optind+1] (if exists) is outfile */ if (optind+1256?256:pos); if(batch) snprintf(outfile_name, 246, " %strack%02d.%s", path, batch_track, file); else snprintf(outfile_name, 246, "%s%s", path, file); if(file[0]=='\0'){ switch (output_type) { case 0: /* raw */ strncat(outfile_name, "cdda.raw", sizeof("cdda.raw")); break; case 1: strncat(outfile_name, "cdda.wav", sizeof("cdda.wav")); break; case 2: strncat(outfile_name, "cdda.aifc", sizeof("cdda.aifc")); break; case 3: strncat(outfile_name, "cdda.aiff", sizeof("cdda.aiff")); break; } } out=open(outfile_name,O_RDWR|O_CREAT|O_TRUNC,0666); if(out==-1){ report3("Cannot open specified output file %s: %s", outfile_name, strerror(errno)); exit(1); } report2("outputting to %s\n", outfile_name); if(logfile){ fprintf(logfile,"outputting to %s\n",outfile_name); fflush(logfile); } } } else { /* default */ if (batch) sprintf(outfile_name,"track%02d.", batch_track); else outfile_name[0]='\0'; switch(output_type){ case 0: /* raw */ strncat(outfile_name, "cdda.raw", sizeof("cdda.raw")); break; case 1: strncat(outfile_name, "cdda.wav", sizeof("cdda.wav")); break; case 2: strncat(outfile_name, "cdda.aifc", sizeof("cdda.aifc")); break; case 3: strncat(outfile_name, "cdda.aiff", sizeof("cdda.aiff")); break; } out = open(outfile_name, O_RDWR|O_CREAT|O_TRUNC, 0666); if(out==-1){ report3("Cannot open default output file %s: %s", outfile_name, strerror(errno)); exit(1); } report2("outputting to %s\n", outfile_name); if(logfile){ fprintf(logfile,"outputting to %s\n",outfile_name); fflush(logfile); } } switch(output_type) { case 0: /* raw */ break; case 1: /* wav */ WriteWav(out, (batch_last-batch_first+1)*CDIO_CD_FRAMESIZE_RAW); break; case 2: /* aifc */ WriteAifc(out, (batch_last-batch_first+1)*CDIO_CD_FRAMESIZE_RAW); break; case 3: /* aiff */ WriteAiff(out, (batch_last-batch_first+1)*CDIO_CD_FRAMESIZE_RAW); break; } /* Off we go! */ if(offset_buffer_used){ /* partial sector from previous batch read */ cursor++; if (buffering_write(out, ((char *)offset_buffer)+offset_buffer_used, CDIO_CD_FRAMESIZE_RAW-offset_buffer_used)){ report2("Error writing output: %s", strerror(errno)); exit(1); } } skipped_flag=0; while(cursor<=batch_last){ /* read a sector */ int16_t *readbuf=paranoia_read_limited(p, callback, max_retries); char *err=cdda_errors(d); char *mes=cdda_messages(d); if(mes || err) fprintf(stderr,"\r " " \r%s%s\n", mes?mes:"",err?err:""); if (err) free(err); if (mes) free(mes); if( readbuf==NULL) { skipped_flag=1; report("\nparanoia_read: Unrecoverable error, bailing.\n"); break; } if(skipped_flag && abort_on_skip){ cursor=batch_last+1; break; } skipped_flag=0; cursor++; if (output_endian!=bigendianp()) { int i; for (i=0; ibatch_last){ int i; /* read a sector and output the partial offset. Save the rest for the next batch iteration */ readbuf=paranoia_read_limited(p,callback,max_retries); err=cdda_errors(d);mes=cdda_messages(d); if(mes || err) fprintf(stderr,"\r " " \r%s%s\n", mes?mes:"",err?err:""); if(err)free(err);if(mes)free(mes); if(readbuf==NULL){ skipped_flag=1; report("\nparanoia_read: Unrecoverable error reading through " "sample_offset shift\n\tat end of track, bailing.\n"); break; } if (skipped_flag && abort_on_skip) break; skipped_flag=0; /* do not move the cursor */ if(output_endian!=bigendianp()) for(i=0;i$outfile") # || die "Can't open $outfile for writing:\n$!"; print "/* Copyright (C) 1999, 2005, 2007, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ static const char ${name}_help[] =\n"; while() { s/["]/\\"/g; # Change POD'ed items to quoted items, e.g. See L and L becomes # See "y" and "z" (with \'s around the quotes) s/[C,L,I,B,F]<(.+?)>/\\"$1\\"/g; chomp; if ( $^O eq "cygwin" ) { s/\ // } print "\"$_\\n\"\n"; } print ";\n"; libcdio-0.83/src/cd-paranoia/doc/0000755000175000017500000000000011652210415013561 500000000000000libcdio-0.83/src/cd-paranoia/doc/en/0000755000175000017500000000000011652210415014163 500000000000000libcdio-0.83/src/cd-paranoia/doc/en/Makefile.am0000644000175000017500000000217511114145233016142 00000000000000# $Id: Makefile.am,v 1.3 2008/04/17 17:39:48 karl Exp $ # # Copyright (C) 2005, 2008 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . manfiles = cd-paranoia.1 man_MANS = $(manfiles) transform = s,cd-paranoia,@CDPARANOIA_NAME@, EXTRA_DIST = $(manfiles) cd-paranoia.1.in mostlyclean-generic: -rm -f *~ \#* .*~ .\#* maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in $(manfiles) libcdio-0.83/src/cd-paranoia/doc/en/cd-paranoia.1.in0000644000175000017500000002544111565177065016776 00000000000000.TH @CDPARANOIA_NAME@ 1 "version III release alpha 9.8 libcdio" .SH NAME @CDPARANOIA_NAME@ 9.8 (Paranoia release III via libcdio) \- an audio CD reading utility which includes extra data verification features .SH SYNOPSIS .B @CDPARANOIA_NAME@ .RB [ options ] .B span .RB [ outfile ] .SH DESCRIPTION .B @CDPARANOIA_NAME@ retrieves audio tracks from CDDA capable CD-ROM drives. The data can be saved to a file or directed to standard output in WAV, AIFF, AIFF-C or raw format. Most ATAPI, SCSI and several proprietary CD-ROM drive makes are supported; .B @CDPARANOIA_NAME@ can determine if the target drive is CDDA capable. .P In addition to simple reading, .B @CDPARANOIA_NAME@ adds extra-robust data verification, synchronization, error handling and scratch reconstruction capability. .P This version uses the libcdio library for interaction with a CD-ROM drive. The jitter and error correction however are the same as used in Xiph's cdparanoia. .SH OPTIONS .TP .B \-v --verbose Be absurdly verbose about the autosensing and reading process. Good for setup and debugging. .TP .B \-q --quiet Do not print any progress or error information during the reading process. .TP .B \-e --stderr-progress Force output of progress information to stderr (for wrapper scripts). .TP .B \-V --version Print the program version and quit. .TP .B \-Q --query Perform CD-ROM drive autosense, query and print the CD-ROM table of contents, then quit. .TP .B \-s --search-for-drive Forces a complete search for a cdrom drive, even if the /dev/cdrom link exists. .TP .B \-h --help Print a brief synopsis of .B @CDPARANOIA_NAME@ usage and options. .TP .BI "\-l --log-summary " file Save result summary to file. .TP .B \-p --output-raw Output headerless data as raw 16 bit PCM data with interleaved samples in host byte order. To force little or big endian byte order, use .B \-r or .B \-R as described below. .TP .B \-r --output-raw-little-endian Output headerless data as raw 16 bit PCM data with interleaved samples in LSB first byte order. .TP .B \-R --output-raw-big-endian Output headerless data as raw 16 bit PCM data with interleaved samples in MSB first byte order. .TP .B \-w --output-wav Output data in Micro$oft RIFF WAV format (note that WAV data is always LSB first byte order). .TP .B \-f --output-aiff Output data in Apple AIFF format (note that AIFC data is always in MSB first byte order). .TP .B \-a --output-aifc Output data in uncompressed Apple AIFF-C format (note that AIFF-C data is always in MSB first byte order). .TP .BI "\-B --batch " Cdda2wav-style batch output flag; @CDPARANOIA_NAME@ will split the output into multiple files at track boundaries. Output file names are prepended with 'track#.' .TP .B \-c --force-cdrom-little-endian Some CD-ROM drives misreport their endianness (or do not report it at all); it's possible that @CDPARANOIA_NAME@ will guess wrong. Use .B \-c to force @CDPARANOIA_NAME@ to treat the drive as a little endian device. .TP .B \-C --force-cdrom-big-endian As above but force @CDPARANOIA_NAME@ to treat the drive as a big endian device. .TP .BI "\-n --force-default-sectors " n Force the interface backend to do atomic reads of .B n sectors per read. This number can be misleading; the kernel will often split read requests into multiple atomic reads (the automated Paranoia code is aware of this) or allow reads only wihin a restricted size range. .B This option should generally not be used. .TP .BI "\-d --force-cdrom-device " device Force the interface backend to read from .B device rather than the first readable CD-ROM drive it finds containing a CD-DA disc. This can be used to specify devices of any valid interface type (ATAPI, SCSI or proprietary). .TP .BI "\-g --force-generic-device " device This option is an alias for .B \-d and is retained for compatibility. .TP .BI "\-S --force-read-speed " number Use this option explicitly to set the read rate of the CD drive (where supported). This can reduce underruns on machines with slow disks, or which are low on memory. .TP .BI "\-t --toc-offset " number Use this option to force the entire disc LBA addressing to shift by the given amount; the value is added to the beginning offsets in the TOC. This can be used to shift track boundaries for the whole disc manually on sector granularity. The next option does something similar... .TP .BI "\-T --toc-bias " Some drives (usually random Toshibas) report the actual track beginning offset values in the TOC, but then treat the beginning of track 1 index 1 as sector 0 for all read operations. This results in every track seeming to start too late (losing a bit of the beginning and catching a bit of the next track). \-T accounts for this behavior. Note that this option will cause @CDPARANOIA_NAME@ to attempt to read sectors before or past the known user data area of the disc, resulting in read errors at disc edges on most drives and possibly even hard lockups on some buggy hardware. .TP .BI "\-O --sample-offset " number Some CD-ROM/CD-R drives will add an offset to the position on reading audio data. This is usually around 500-700 audio samples (ca. 1/75 second) on reading. So when @CDPARANOIA_NAME@ queries a specific sector, it might not receive exactly that sector, but shifted by some amount. .P Use this option to force the entire disc to shift sample position output by the given amount; This can be used to shift track boundaries for the whole disc manually on sample granularity. Note that if you are ripping something including the ending of the CD (e.g. the entire disk), this option will cause @CDPARANOIA_NAME@ to attempt to read partial sectors before or past the known user data area, probably causing read errors on most drives and possibly even hard lockups on some buggy hardware. .TP .B \-Z --disable-paranoia Disable .B all data verification and correction features. When using -Z, @CDPARANOIA_NAME@ reads data exactly as would cdda2wav with an overlap setting of zero. This option implies that .B \-Y is active. .TP .B \-z --never-skip[=max_retries] Do not accept any skips; retry forever if needed. An optional maximum number of retries can be specified; for comparison, default without -z is currently 20. .TP .B \-Y --disable-extra-paranoia Disables intra-read data verification; only overlap checking at read boundaries is performed. It can wedge if errors occur in the attempted overlap area. Not recommended. .TP .B \-X --abort-on-skip If the read skips due to imperfect data, a scratch, whatever, abort reading this track. If output is to a file, delete the partially completed file. .TP .B \-x --test-flags mask Simulate CD-reading errors. This is used in regression testing, but other uses might be to see how well a CD-ROM performs under (simulated) CD degradation. mask specifies the artificial kinds of errors to introduced; "or"-ing values from the selection below will simulate the kind of specified failure. .P 0x10 - Simulate under-run reading .TP .SH OUTPUT SMILIES .TP .B :-) Normal operation, low/no jitter .TP .B :-| Normal operation, considerable jitter .TP .B :-/ Read drift .TP .B :-P Unreported loss of streaming in atomic read operation .TP .B 8-| Finding read problems at same point during reread; hard to correct .TP .B :-0 SCSI/ATAPI transport error .TP .B :-( Scratch detected .TP .B ;-( Gave up trying to perform a correction .TP .B 8-X Aborted read due to known, uncorrectable error .TP .B :^D Finished extracting .SH PROGRESS BAR SYMBOLS .TP .B No corrections needed .TP .B - Jitter correction required .TP .B + Unreported loss of streaming/other error in read .TP .B ! Errors found after stage 1 correction; the drive is making the same error through multiple re-reads, and @CDPARANOIA_NAME@ is having trouble detecting them. .TP .B e SCSI/ATAPI transport error (corrected) .TP .B V Uncorrected error/skip .SH SPAN ARGUMENT The span argument specifies which track, tracks or subsections of tracks to read. This argument is required. .B NOTE: Unless the span is a simple number, it's generally a good idea to quote the span argument to protect it from the shell. .P The span argument may be a simple track number or an offset/span specification. The syntax of an offset/span takes the rough form: .P 1[ww:xx:yy.zz]-2[aa:bb:cc.dd] .P Here, 1 and 2 are track numbers; the numbers in brackets provide a finer grained offset within a particular track. [aa:bb:cc.dd] is in hours/minutes/seconds/sectors format. Zero fields need not be specified: [::20], [:20], [20], [20.], etc, would be interpreted as twenty seconds, [10:] would be ten minutes, [.30] would be thirty sectors (75 sectors per second). .P When only a single offset is supplied, it is interpreted as a starting offset and ripping will continue to the end of the track. If a single offset is preceeded or followed by a hyphen, the implicit missing offset is taken to be the start or end of the disc, respectively. Thus: .TP .B 1:[20.35] Specifies ripping from track 1, second 20, sector 35 to the end of track 1. .TP .B 1:[20.35]- Specifies ripping from 1[20.35] to the end of the disc .TP .B \-2 Specifies ripping from the beginning of the disc up to (and including) track 2 .TP .B \-2:[30.35] Specifies ripping from the beginning of the disc up to 2:[30.35] .TP .B 2-4 Specifies ripping from the beginning of track 2 to the end of track 4. .P Again, don't forget to protect square brackets and preceeding hyphens from the shell. .SH EXAMPLES A few examples, protected from the shell: .TP Query only with exhaustive search for a drive and full reporting of autosense: .P @CDPARANOIA_NAME@ -vsQ .TP Extract an entire disc, putting each track in a seperate file: .P @CDPARANOIA_NAME@ -B .TP Extract from track 1, time 0:30.12 to 1:10.00: .P @CDPARANOIA_NAME@ "1[:30.12]-1[1:10]" .TP Extract from the beginning of the disc up to track 3: .P @CDPARANOIA_NAME@ -- "-3" .TP The "--" above is to distinguish "-3" from an option flag. .SH OUTPUT The output file argument is optional; if it is not specified, @CDPARANOIA_NAME@ will output samples to one of .BR cdda.wav ", " cdda.aifc ", or " cdda.raw depending on whether .BR \-w ", " \-a ", " \-r " or " \-R " is used (" \-w is the implicit default). The output file argument of .B \- specifies standard output; all data formats may be piped. .SH ACKNOWLEDGEMENTS @CDPARANOIA_NAME@ sprang from and once drew heavily from the interface of Heiko Eissfeldt's (heiko@colossus.escape.de) 'cdda2wav' package. @CDPARANOIA_NAME@ would not have happened without it. .P Joerg Schilling has also contributed SCSI expertise through his generic SCSI transport library. .P .SH AUTHOR Monty .P Cdparanoia's homepage may be found at: http://www.xiph.org/paranoia/ .P Revised for use with libcdio by Rocky .P The libcdio homepage may be found at: http://www.gnu.org/software/libcdio libcdio-0.83/src/cd-paranoia/doc/en/cd-paranoia.10000644000175000017500000002522711652140274016360 00000000000000.TH cd-paranoia 1 "version III release alpha 9.8 libcdio" .SH NAME cd-paranoia 9.8 (Paranoia release III via libcdio) \- an audio CD reading utility which includes extra data verification features .SH SYNOPSIS .B cd-paranoia .RB [ options ] .B span .RB [ outfile ] .SH DESCRIPTION .B cd-paranoia retrieves audio tracks from CDDA capable CD-ROM drives. The data can be saved to a file or directed to standard output in WAV, AIFF, AIFF-C or raw format. Most ATAPI, SCSI and several proprietary CD-ROM drive makes are supported; .B cd-paranoia can determine if the target drive is CDDA capable. .P In addition to simple reading, .B cd-paranoia adds extra-robust data verification, synchronization, error handling and scratch reconstruction capability. .P This version uses the libcdio library for interaction with a CD-ROM drive. The jitter and error correction however are the same as used in Xiph's cdparanoia. .SH OPTIONS .TP .B \-v --verbose Be absurdly verbose about the autosensing and reading process. Good for setup and debugging. .TP .B \-q --quiet Do not print any progress or error information during the reading process. .TP .B \-e --stderr-progress Force output of progress information to stderr (for wrapper scripts). .TP .B \-V --version Print the program version and quit. .TP .B \-Q --query Perform CD-ROM drive autosense, query and print the CD-ROM table of contents, then quit. .TP .B \-s --search-for-drive Forces a complete search for a cdrom drive, even if the /dev/cdrom link exists. .TP .B \-h --help Print a brief synopsis of .B cd-paranoia usage and options. .TP .BI "\-l --log-summary " file Save result summary to file. .TP .B \-p --output-raw Output headerless data as raw 16 bit PCM data with interleaved samples in host byte order. To force little or big endian byte order, use .B \-r or .B \-R as described below. .TP .B \-r --output-raw-little-endian Output headerless data as raw 16 bit PCM data with interleaved samples in LSB first byte order. .TP .B \-R --output-raw-big-endian Output headerless data as raw 16 bit PCM data with interleaved samples in MSB first byte order. .TP .B \-w --output-wav Output data in Micro$oft RIFF WAV format (note that WAV data is always LSB first byte order). .TP .B \-f --output-aiff Output data in Apple AIFF format (note that AIFC data is always in MSB first byte order). .TP .B \-a --output-aifc Output data in uncompressed Apple AIFF-C format (note that AIFF-C data is always in MSB first byte order). .TP .BI "\-B --batch " Cdda2wav-style batch output flag; cd-paranoia will split the output into multiple files at track boundaries. Output file names are prepended with 'track#.' .TP .B \-c --force-cdrom-little-endian Some CD-ROM drives misreport their endianness (or do not report it at all); it's possible that cd-paranoia will guess wrong. Use .B \-c to force cd-paranoia to treat the drive as a little endian device. .TP .B \-C --force-cdrom-big-endian As above but force cd-paranoia to treat the drive as a big endian device. .TP .BI "\-n --force-default-sectors " n Force the interface backend to do atomic reads of .B n sectors per read. This number can be misleading; the kernel will often split read requests into multiple atomic reads (the automated Paranoia code is aware of this) or allow reads only wihin a restricted size range. .B This option should generally not be used. .TP .BI "\-d --force-cdrom-device " device Force the interface backend to read from .B device rather than the first readable CD-ROM drive it finds containing a CD-DA disc. This can be used to specify devices of any valid interface type (ATAPI, SCSI or proprietary). .TP .BI "\-g --force-generic-device " device This option is an alias for .B \-d and is retained for compatibility. .TP .BI "\-S --force-read-speed " number Use this option explicitly to set the read rate of the CD drive (where supported). This can reduce underruns on machines with slow disks, or which are low on memory. .TP .BI "\-t --toc-offset " number Use this option to force the entire disc LBA addressing to shift by the given amount; the value is added to the beginning offsets in the TOC. This can be used to shift track boundaries for the whole disc manually on sector granularity. The next option does something similar... .TP .BI "\-T --toc-bias " Some drives (usually random Toshibas) report the actual track beginning offset values in the TOC, but then treat the beginning of track 1 index 1 as sector 0 for all read operations. This results in every track seeming to start too late (losing a bit of the beginning and catching a bit of the next track). \-T accounts for this behavior. Note that this option will cause cd-paranoia to attempt to read sectors before or past the known user data area of the disc, resulting in read errors at disc edges on most drives and possibly even hard lockups on some buggy hardware. .TP .BI "\-O --sample-offset " number Some CD-ROM/CD-R drives will add an offset to the position on reading audio data. This is usually around 500-700 audio samples (ca. 1/75 second) on reading. So when cd-paranoia queries a specific sector, it might not receive exactly that sector, but shifted by some amount. .P Use this option to force the entire disc to shift sample position output by the given amount; This can be used to shift track boundaries for the whole disc manually on sample granularity. Note that if you are ripping something including the ending of the CD (e.g. the entire disk), this option will cause cd-paranoia to attempt to read partial sectors before or past the known user data area, probably causing read errors on most drives and possibly even hard lockups on some buggy hardware. .TP .B \-Z --disable-paranoia Disable .B all data verification and correction features. When using -Z, cd-paranoia reads data exactly as would cdda2wav with an overlap setting of zero. This option implies that .B \-Y is active. .TP .B \-z --never-skip[=max_retries] Do not accept any skips; retry forever if needed. An optional maximum number of retries can be specified; for comparison, default without -z is currently 20. .TP .B \-Y --disable-extra-paranoia Disables intra-read data verification; only overlap checking at read boundaries is performed. It can wedge if errors occur in the attempted overlap area. Not recommended. .TP .B \-X --abort-on-skip If the read skips due to imperfect data, a scratch, whatever, abort reading this track. If output is to a file, delete the partially completed file. .TP .B \-x --test-flags mask Simulate CD-reading errors. This is used in regression testing, but other uses might be to see how well a CD-ROM performs under (simulated) CD degradation. mask specifies the artificial kinds of errors to introduced; "or"-ing values from the selection below will simulate the kind of specified failure. .P 0x10 - Simulate under-run reading .TP .SH OUTPUT SMILIES .TP .B :-) Normal operation, low/no jitter .TP .B :-| Normal operation, considerable jitter .TP .B :-/ Read drift .TP .B :-P Unreported loss of streaming in atomic read operation .TP .B 8-| Finding read problems at same point during reread; hard to correct .TP .B :-0 SCSI/ATAPI transport error .TP .B :-( Scratch detected .TP .B ;-( Gave up trying to perform a correction .TP .B 8-X Aborted read due to known, uncorrectable error .TP .B :^D Finished extracting .SH PROGRESS BAR SYMBOLS .TP .B No corrections needed .TP .B - Jitter correction required .TP .B + Unreported loss of streaming/other error in read .TP .B ! Errors found after stage 1 correction; the drive is making the same error through multiple re-reads, and cd-paranoia is having trouble detecting them. .TP .B e SCSI/ATAPI transport error (corrected) .TP .B V Uncorrected error/skip .SH SPAN ARGUMENT The span argument specifies which track, tracks or subsections of tracks to read. This argument is required. .B NOTE: Unless the span is a simple number, it's generally a good idea to quote the span argument to protect it from the shell. .P The span argument may be a simple track number or an offset/span specification. The syntax of an offset/span takes the rough form: .P 1[ww:xx:yy.zz]-2[aa:bb:cc.dd] .P Here, 1 and 2 are track numbers; the numbers in brackets provide a finer grained offset within a particular track. [aa:bb:cc.dd] is in hours/minutes/seconds/sectors format. Zero fields need not be specified: [::20], [:20], [20], [20.], etc, would be interpreted as twenty seconds, [10:] would be ten minutes, [.30] would be thirty sectors (75 sectors per second). .P When only a single offset is supplied, it is interpreted as a starting offset and ripping will continue to the end of the track. If a single offset is preceeded or followed by a hyphen, the implicit missing offset is taken to be the start or end of the disc, respectively. Thus: .TP .B 1:[20.35] Specifies ripping from track 1, second 20, sector 35 to the end of track 1. .TP .B 1:[20.35]- Specifies ripping from 1[20.35] to the end of the disc .TP .B \-2 Specifies ripping from the beginning of the disc up to (and including) track 2 .TP .B \-2:[30.35] Specifies ripping from the beginning of the disc up to 2:[30.35] .TP .B 2-4 Specifies ripping from the beginning of track 2 to the end of track 4. .P Again, don't forget to protect square brackets and preceeding hyphens from the shell. .SH EXAMPLES A few examples, protected from the shell: .TP Query only with exhaustive search for a drive and full reporting of autosense: .P cd-paranoia -vsQ .TP Extract an entire disc, putting each track in a seperate file: .P cd-paranoia -B .TP Extract from track 1, time 0:30.12 to 1:10.00: .P cd-paranoia "1[:30.12]-1[1:10]" .TP Extract from the beginning of the disc up to track 3: .P cd-paranoia -- "-3" .TP The "--" above is to distinguish "-3" from an option flag. .SH OUTPUT The output file argument is optional; if it is not specified, cd-paranoia will output samples to one of .BR cdda.wav ", " cdda.aifc ", or " cdda.raw depending on whether .BR \-w ", " \-a ", " \-r " or " \-R " is used (" \-w is the implicit default). The output file argument of .B \- specifies standard output; all data formats may be piped. .SH ACKNOWLEDGEMENTS cd-paranoia sprang from and once drew heavily from the interface of Heiko Eissfeldt's (heiko@colossus.escape.de) 'cdda2wav' package. cd-paranoia would not have happened without it. .P Joerg Schilling has also contributed SCSI expertise through his generic SCSI transport library. .P .SH AUTHOR Monty .P Cdparanoia's homepage may be found at: http://www.xiph.org/paranoia/ .P Revised for use with libcdio by Rocky .P The libcdio homepage may be found at: http://www.gnu.org/software/libcdio libcdio-0.83/src/cd-paranoia/doc/en/Makefile.in0000644000175000017500000003701711652210030016151 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Id: Makefile.am,v 1.3 2008/04/17 17:39:48 karl Exp $ # # Copyright (C) 2005, 2008 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/cd-paranoia/doc/en DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/cd-paranoia.1.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = cd-paranoia.1 CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" NROFF = nroff MANS = $(man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) transform = s,cd-paranoia,@CDPARANOIA_NAME@, ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDDA_PLAYER_LIBS = @CDDA_PLAYER_LIBS@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CDPARANOIA_NAME = @CDPARANOIA_NAME@ CFLAGS = @CFLAGS@ CMP = @CMP@ COS_LIB = @COS_LIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_PKG_LIB_HACK = @DARWIN_PKG_LIB_HACK@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ DIFF_OPTS = @DIFF_OPTS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GIT2CL = @GIT2CL@ GREP = @GREP@ HAVE_BSDI_CDROM = @HAVE_BSDI_CDROM@ HAVE_DARWIN_CDROM = @HAVE_DARWIN_CDROM@ HAVE_FREEBSD_CDROM = @HAVE_FREEBSD_CDROM@ HAVE_JOLIET = @HAVE_JOLIET@ HAVE_LINUX_CDROM = @HAVE_LINUX_CDROM@ HAVE_OS2_CDROM = @HAVE_OS2_CDROM@ HAVE_ROCK = @HAVE_ROCK@ HAVE_SOLARIS_CDROM = @HAVE_SOLARIS_CDROM@ HAVE_WIN32_CDROM = @HAVE_WIN32_CDROM@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDIOPP_LIBS = @LIBCDIOPP_LIBS@ LIBCDIO_CDDA_LIBS = @LIBCDIO_CDDA_LIBS@ LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ LIBCDIO_DEPS = @LIBCDIO_DEPS@ LIBCDIO_LIBS = @LIBCDIO_LIBS@ LIBCDIO_PARANOIA_LIBS = @LIBCDIO_PARANOIA_LIBS@ LIBCDIO_SOURCE_PATH = @LIBCDIO_SOURCE_PATH@ LIBCDIO_VERSION_NUM = @LIBCDIO_VERSION_NUM@ LIBICONV = @LIBICONV@ LIBISO9660PP_LIBS = @LIBISO9660PP_LIBS@ LIBISO9660_CFLAGS = @LIBISO9660_CFLAGS@ LIBISO9660_LIBS = @LIBISO9660_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBUDF_LIBS = @LIBUDF_LIBS@ LINUX_CDROM_TIMEOUT = @LINUX_CDROM_TIMEOUT@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_NO_UNDEFINED = @LT_NO_UNDEFINED@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OLD_CDPARANOIA = @OLD_CDPARANOIA@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SBPCD_H = @SBPCD_H@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TYPESIZES = @TYPESIZES@ UCDROM_H = @UCDROM_H@ VCDINFO_CFLAGS = @VCDINFO_CFLAGS@ VCDINFO_LIBS = @VCDINFO_LIBS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ manfiles = cd-paranoia.1 man_MANS = $(manfiles) EXTRA_DIST = $(manfiles) cd-paranoia.1.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/cd-paranoia/doc/en/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/cd-paranoia/doc/en/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): cd-paranoia.1: $(top_builddir)/config.status $(srcdir)/cd-paranoia.1.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list=''; test -n "$(man1dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-man uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-man1 \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-man uninstall-man1 mostlyclean-generic: -rm -f *~ \#* .*~ .\#* maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in $(manfiles) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libcdio-0.83/src/cd-paranoia/doc/Makefile.am0000644000175000017500000000204211114145233015531 00000000000000# $Id: Makefile.am,v 1.4 2008/04/17 17:39:48 karl Exp $ # # Copyright (C) 2005, 2007, 2008 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . SUBDIRS = en ja EXTRA_DIST = FAQ.txt overlapdef.txt mostlyclean-generic: -rm -f *~ \#* .*~ .\#* maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in libcdio-0.83/src/cd-paranoia/doc/FAQ.txt0000644000175000017500000007274211114145233014663 00000000000000 CDDA Paranoia FAQ ---------------------------------------------------------------------------- "Suspicion Breeds Confidence!" --Brazil ---------------------------------------------------------------------------- August 20, 1999 For those new to Paranoia and cdparanoia, this is the best, first place to look for information and answers to your questions. More information can be found on the cdparanoia homepage: http://www.xiph.org/paranoia/ ---------------------------------------------------------------------------- Table of Contents 1. Questions about the Paranoia and cdparanoia projects 1. What is cdparanoia? 2. Why use cdparanoia? 3. What is Paranoia? 4. Is cdparanoia / Paranoia portable? 5. What is Paranoia's history? 6. Is cdparanoia/Paranoia related to cdda2wav? 7. What are the differences between Paranoia II, III and IV? 8. Are there cdparanoia mailing lists for users or developers? 9. What is Paranoia IV's current development status? 10. Will cdparanoia, and cdda2wav or xcdroast merge anytime in the future? 2. Questions about using Paranoia and cdparanoia 1. Requirements to run cdparanoia (as of alpha 3) 2. Does Cdparanoia support ATAPI drives? SCSI Emulation? Parallel port drives? 3. I can play audio CDs perfectly; why is reading the CD into a file so difficult and prone to errors? 4. Does cdparanoia lose quality from the CD recording? 5. Can cdparanoia detect pregaps? Can it remove the two second gaps between tracks? 6. Why don't you implement CDDB? A GUI? Four million other features I want? 7. The progress meter: What is that weird bargraph during ripping? 8. How can I tell if my drive would be OK with regular cdda2wav? 9. What is the biggest value of SG_BIG_BUFF I can use? 10. Why do the binary files from two reads differ when compared? 11. Why does CDParanoia rip files off into WAV format (and other sample formats) but not CDDA format? ------------------------------------------------------------------------- Questions about the Paranoia and cdparanoia projects What is cdparanoia? Cdparanoia is a Compact Disc Digital Audio (CDDA) extraction tool, commonly known on the net as a 'ripper'. The application is built on top of the Paranoia library, which is doing the real work (the Paranoia source is included in the cdparanoia source distribution). Like the original cdda2wav, cdparanoia package reads audio from the CDROM directly as data, with no analog step between, and writes the data to a file or pipe in WAV, AIFC or raw 16 bit linear PCM. Cdparanoia is a bit different than most other CDDA extration tools. It contains few-to-no 'extra' features, concentrating only on the ripping process and knowing as much as possible about the hardware performing it. Cdparanoia will read correct, rock-solid audio data from inexpensive drives prone to misalignment, frame jitter and loss of streaming during atomic reads. Cdparanoia will also read and repair data from CDs that have been damaged in some way. At the same time, however, cdparanoia turns out to be easy to use and administrate; It has no compile time configuration, happily autodetecting the CDROM, its type, its interface and other aspects of the ripping process at runtime. A single binary can serve the diverse hardware of the do-it-yourself computer laboratory from Hell... ----------------------------------------------------------------------- Why use cdparanoia? All CDROM drives are not created equal. You'll need cdparanoia if yours is a little less equal than others-- or maybe you just keep your CD collection in a box of full of gravel. Jewel cases are for wimps; you know what I'm talking about. Unfortunately, cdda2wav and readcdda cannot work properly with a large number of CDROM drives in the desktop world today. The most common problem is sporadic or regular clicks and pops in the read sample, regardless of 'nsector' or 'overlap' settings. Cdda2wav also cannot do anything about scratches (and they can cause cdda2wav to break). Cdparanoia is also smarter about probing CDDA support from SCSI and IDE-SCSI drives; many drives that do not work at all with cdda2wav, readcdda, tosha, etc, will work just fine with cdparanoia. ----------------------------------------------------------------------- What is Paranoia? Paranoia is a library project that provides a platform independent, unified, robust interface for packet-command based devices. In the case of CDROM drives for example, handling and programming cdrom drives becomes identical whether on Solaris or Linux, or if the Linux drive is SCSI, ATAPI or on the parallel port. In this way, Paranoia is similar to Joerg Schilling's SCG library. In addition to device/platform unification, the library provides tools for automatically identifying devices, and intelligent handling/correction of errors at all levels of the interface. On top of a generic low-level packet command layer, Paranoia implements high-level error-correcting interfaces for tasks such as CDDA where broken or vastly non-standard devices are the rule, rather than the exception. The Paranoia libraries are incomplete; the first release for use will be Paranoia IV, to be bundled with cdparanoia alpha release 10. Programming documentation for Paranoia IV will appear shortly on the documentation page as Programming with Paranoia IV. Programmers interested in contributing to Paranoia IV should read the heading Paranoia IV development information. ----------------------------------------------------------------------- Is cdparanoia / Paranoia portable? Paranoia III is Linux only (although it runs on all the flavors of linux with a 2.0 or later kernel. It is not only for x86). Paranoia IV (cdparanoia alpha 10 and later) is a port to other UNIX flavors and uses a substantially revised infrastructure. NetBSD and Solaris will be first; others will be added as time and outside assistance allow. Suggestions on the proper way to handle each OS's native configuration idioms are welcome. I want Rhapsody cdparanoia to look just like other Rhapsody apps just as much as I want Linux cdparanoia to look like a Linux app. ----------------------------------------------------------------------- What is Paranoia's history? Is cdparanoia/Paranoia related to cdda2wav? Paranoia I/II and cdparanoia began life as a set of patches to Heiko Eissfeldt's 'cdda2wav' application. Cdparanoia gained its own life as a rewrite of cdda2wav in January of 1998 as "Paranoia III". Paranoia III proved to have an inadequate structure for extention and use on other platforms, so Paranoia IV began to take form in fall of 1998. Modern Paranoia no longer has any relation to cdda2wav aside from general cooperation in sharing details between the two projects. In fact, cdda2wav itself doesn't look much like the cdda2wav of a year or two ago. ----------------------------------------------------------------------- What are the differences between Paranoia II, III and IV? Paranoia I and II were a set of patches to Heiko Eissfeldt's cdda2wav 0.8. These patches did nothing more than add some error checks to the standard cdda2wav. They were inefficient and only worked with some drives. Paranoia III was the first version to be written seperately from cdda2wav in the form of a standalone library. It was not terribly portable, however, and the API proved to be inadequate for extension. Paranoia IV is the upcoming new generation of CDDA Paranoia. It is both portable and more capable than Paranoia III. ----------------------------------------------------------------------- Are there cdparanoia mailing lists for users or developers? Yes. In addition to the mailing lists below, read-only CVS access to Paranoia III and IV will be availble from xiph.org soon (Paranoia IV is not yet under CVS). See http://www.xiph.org/paranoia/ for upto date information and automated ways of subscribing. Mailing list for Paranoia and Cdparanoia users (paranoia@xiph.org): To join: send a message containing only the one-word line 'subscribe' in the body to paranoia-request@xiph.org. Do not send subscription requests directly to the main list. The list server at xiph.org should respond fairly quickly with a welcome message. Mailing list for Paranoia IV developers: paranoia-dev@xiph.org The developers list is intended for focused development discussion amongst the core Paranoia development team and outside groups developing their own applications using Paranoia. Of course, anyone is welcome to read. To join: send a message containing only the one-word line 'subscribe' in the body to paranoia-dev-request@xiph.org. Do not send subscription requests directly to the main list. List for general CDROM tools There's also a general mailing list for those using/developing CDDA extraction and CD writing tools (cdwrite@other.debian.org). Subscribe by sending mail to other-cdwrite-request@lists.debian.org containing only the word subscribe in the body. Do not send subscription requests directly to the main list. ----------------------------------------------------------------------- What is Paranoia IV's current development status? Paranoia IV code will soon be available for internal evaluation, testing and development work to the developers involved in the Paranoia project; read-only CVS access should also be available soon. A public release does not yet set for any firm date. Those interested in contributing to the development of Paranoia, or who wich to contribute to porting to other platforms, please contact us. Paranoia IV prerelease code will be available to porters soon; I prefer to be in contact with those porting to other platforms so that Paranoia development has consistent quality across platforms. At the moment, volunteers have contacted me for most major platforms, but more help is still welcome on every OS. ----------------------------------------------------------------------- Will cdparanoia, and cdda2wav or xcdroast merge anytime in the future? Probably not beyond the point it already has. Versions of XCDRoast (and other GUI frontends; see the links page) that make use of cdparanoia already exist. Although the cdrecord/cdda2wav and Paranoia projects cooperate, they're likely to remain seperate as the former is committed to Joerg Schilling's libscg (part of the cdrecord package), just as cdparanoia is committed to using Paranoia IV. ----------------------------------------------------------------------- Questions about using Paranoia and cdparanoia Requirements to run cdparanoia (as of alpha 3) 1. A CDDA capable CDROM drive 2. Linux 2.0, 2.1, 2.2 or 2.3 1. kernel support for the particular CDROM in use 2. kernel support for the generic SCSI interface (if using a SCSI CDROM drive) and proper device (/dev/sg?) files (get them with the MAKEDEV script) in /dev. Most distributions already have the /dev/sg? files. The cdparanoia binary will likely work with Linux 1.2 and 1.3, but I do not actively support kernels older than 2.0 I do know for a fact that the source will not build on kernel installs older than 2.0, but the problems are mostly related to the ever-changing locations of proprietary cdrom include files. Also, although a 2.0 stock SCSI setup will work, performance will be better if linux/include/scsi/sg.h defines SG_BIG_BUFF to 65536 (it can't be bigger). Recent kernels (2.0.30+?) already set it to 32768; that's OK. Cdparanoia will tell you how big your generic SCSI buffer is. 2.2+ does not use a static DMA pool for SG, so there is nothing to tune. Unlike cdda2wav, cdparanoia does not require threading, IPC or (optionally) sound card support. /proc filesystem support is no longer required (but encouraged!), and /dev/sr? or /dev/scd? devices are not required for SCSI, although they do add functionality if present. ----------------------------------------------------------------------- Does Cdparanoia support ATAPI drives? SCSI Emulation? Parallel port drives? Alpha 9 supports the full ATAPI, IDE-SCSI and SCSI generic interfaces under Linux. Note that the native ATAPI driver is supported, but that IDE-SCSI emulation works better with ATAPI drives. This is an issue of control; the emulation interface gives cdparanoia complete control over the drive whereas the native ATAPI driver insists on hiding the device under an abstraction layer with poor error handling capabilities. Note also that a number of ATAPI drives that do not work at all with the ATAPI driver (error 006: Could not read audio) *will* work with IDE-SCSI emulation. Parallel port based CDROM (paride) drives are not yet supported; support for these drives in Linux will appear in alpha release 10 (Paranoia IV). ----------------------------------------------------------------------- I can play audio CDs perfectly; why is reading the CD into a file so difficult and prone to errors? It's just the same thing. Unfortunately, it isn't that easy. The audio CD is not a random access format. It can only be played from some starting point in sequence until it is done, like a vinyl LP. Unlike a data CD, there are no synchronization or positioning headers in the audio data (a CD, audio or data, uses 2352 byte sectors. In a data CD, 304 bytes of each sector is used for header, sync and error correction. An audio CD uses all 2352 bytes for data). The audio CD *does* have a continuous fragmented subchannel, but this is only good for seeking +/-1 second (or 75 sectors or ~176kB) of the desired area, as per the SCSI spec. When the CD is being played as audio, it is not only moving at 1x, the drive is keeping the media data rate (the spin speed) exactly locked to playback speed. Pick up a portable CD player while it's playing and rotate it 90 degrees. Chances are it will skip; you disturbed this delicate balance. In addition, a player is never distracted from what it's doing... it has nothing else taking up its time. Now add a non-realtime, (relatively) high-latency, multitasking kernel into the mess; it's like picking up the player and constantly shaking it. CDROM drives generally assume that any sort of DAE will be linear and throw a readahead buffer at the task. However, the OS is reading the data as broken up, seperated read requests. The drive is doing readahead buffering and attempting to store additional data as it comes in off media while it waits for the OS to get around to reading previous blocks. Seeing as how, at 36x, data is coming in at 6.2MB/second, and each read is only 13 sectors or ~30k (due to DMA restrictions), one has to get off 208 read requests a second, minimum without any interruption, to avoid skipping. A single swap to disc or flush of filesystem cache by the OS will generally result in loss of streaming, assuming the drive is working flawlessly. Oh, and virtually no PC on earth has that kind of I/O throughput; a Sun Enterprise server might, but a PC does not. Most don't come within a factor of five, assuming perfect realtime behavior. To keep piling on the difficulties, faster drives are often prone to vibration and alignment problems; some are total fiascos. They lose streaming *constantly* even without being interrupted. Philips determined 15 years ago that the CD could only be spun up to 50-60x until the physical CD (made of polycarbonate) would deform from centripetal force badly enough to become unreadable. Today's players are pushing physics to the limit. Few do so terribly reliably. Note that CD 'playback speed' is an excellent example of advertisers making numbers lie for them. A 36x cdrom is generally not spinning at 36x a normal drive's speed. As a 1x drive is adjusting velocity depending on the access's distance from the hub, a 36x drive is probably using a constant angular velocity across the whole surface such that it gets 36x max at the edge. Thus it's actually spinning slower, assuming the '36x' isn't a complete lie, as it is on some drives. Because audio discs have no headers in the data to assist in picking up where things got lost, most drives will just guess. This doesn't even *begin* to get into stupid firmware bugs. Even Plextors have occasionally had DAE bugs (although in every case, Plextor has fixed the bug *and* replaced/repaired drives for free). Cheaper drives are often complete basket cases. Rant Update (for those in the know): Several folks, through personal mail and on Usenet, have pointed out that audio discs do place absolute positioning information for (at least) nine out of every ten sectors into the Q subchannel, and that my original statement of +/-75 sectors above is wrong. I admit to it being misleading, so I'll try to clarify. The positioning data certainly is in subchannel Q; the point is moot however, for a couple of reasons. 1. The SCSI and ATAPI specs (there are a couple of each, pick one) don't give any way to retrieve the subchannel from a desired sector. The READ SUB-CHANNEL command will hand you Q all right, you just don't have any idea where exactly that Q came from. The command was intended for getting rough positioning information from audio discs that are paused or playing. This is audio; missing by several sectors is a tiny fraction of a second. 2. Older CDROM drives tended not to expect 'READ SUB-CHANNEL' unless the drive was playing audio; calling it during data reads could crash the drive and lock up the system. I had one of these drives (Apple 803i, actually a repackaged Sony CD-8003). 3. MMC-2 *does* give a way to retrieve the Q subchannel along with user data in the READ CD command. Although the drive is required to recognize the fetaure, it is allowed to simply return zeroes (effectively leaving the feature unimplemented). Guess how many drives actually implement this feature: not many. 4. Assuming you *can* get back the subchannel, most CDROM drives seem to understand audio discs primarily at the "little frame" level; thus sector-level structures aren't reliable. One might get a reassembled subQ, but if the read began in the middle of a sector (or dropped a little frame in the middle; many do), the subQ is likely corrupt and useless. As reassembling uncorrupted frames is easy without the subchannel, and corrupted reads likely result in a corrupted subchannel too, cdparanoia treats the subchannel as more trouble than it's worth (during verification). At least one other package (Exact Audio Copy for Win32) manages to use the subchannel to enhance the Table of Contents information. I don't know if this only works on MMC-2 drives that support returning Q with READ CD, but I think I'm going to revisit using the subchannel for extra TOC information. ----------------------------------------------------------------------- Does cdparanoia lose quality from the CD recording? Does it just re-record the analog signal played from the CDROM drive? No to both. Cdparanoia (and all other true CD digital audio extraction tools) reads the values off the CDROM in digital form. The data never comes anywhere near the soundcard, and does not pass through any conversion to analog first. ----------------------------------------------------------------------- Can cdparanoia detect pregaps? Can it remove the two second gaps between tracks Not yet. This feature is slated to appear in a release of alpha 10 (Paranoia IV). ----------------------------------------------------------------------- Why don't you implement CDDB? A GUI? Four million other features I want? Too many features spoil the broth. "Software is not perfect when there is nothing left to add, but rather when there is nothing extraneous left to take away." The goal of cdparanoia is perfect, rock-solid audio from every capable cdrom on every platform. As this goal has not yet been met, I'm uninterested in adding unrelated capability to the core engine. Several GUIs that incorporate cdparanoia already exist; I'm in the process of compiling a list (see the links page). Other software that implements new features by wrapping around cdpar anoia (like CDDB lookup) also exist. 'Cdparanoia' will not play to sound cards (you can always pipe the output to a WAV player), do MD5 signatures, read CD catalog or serial numbers (this *is* a feature I plan to add), search indexes, do rate reduction (use Sox, Ogg or a million others), or generally make use of the maximum speed available from a CDROM drive. If your CDROM drive is *not* prone to jitter and you don't have scratched discs to worry about, you might want to look at the original cdda2wav for features cdparanoia does not have. Keep in mind however that even the really good drives do occasionally stumble. I know of at least one cdparanoia user who insists on using full paranoia with his Plextor UltraPlex because it once botched a single sector from a rip; he'd already burned the track to several CD-Rs before noticing... ----------------------------------------------------------------------- The progress meter: What is that weird bargraph during ripping? It's a progress/status indicator. There's a completion bargraph, a number indicating the last sector number completely verified of the read currently happening, an overlap indicator, a gratuitous smilie, and a heartbeat indicator to show if the process is still alive, hung, or spinning. The bargraph also marks points during the read with characters to indicate where various 'paranoia' features were tripped into action. Different bargraph characters indicate different things occurred during that part of the read. The letters are heirarchical; for example if a trasport error occurs in the same sector as jitter, the bargraph will print 'e' instead of '-'. Legend of characters A hyphen indicates that two blocks overlapped properly, - but they were skewed (frame jitter). This case is completely corrected by Paranoia and is not a cause for concern. A plus indicates not only frame jitter, but an unreported, uncorrected loss of streaming in the middle + of an atomic read operation. That is, the drive lost its place while reading data, and restarted in some random incorrect location without alerting the kernel. This case is also corrected by Paranoia. An 'e' indicates that a transport level SCSI or ATAPI e error was caught and corrected. Paranoia will completely repair such an error without audible defects. An "X" indicates a scratch was caught and corrected. X Cdparanoia wil interpolate over any missing/corrupt samples. An asterisk indicates a scratch and jitter both * occurred in this general area of the read. Cdparanoia wil interpolate over any missing/corrupt samples. A ! indicates that a read error got through the stage one of error correction and was caught by stage two. Many '!' are a cause for concern; it means that the drive is making continuous silent errors that look ! identical on each re-read, a condition that can't always be detected. Although the presence of a '!' means the error was corrected, it also means that similar errors are probably passing by unnoticed. Upcoming releases of cdparanoia will address this issue. A V indicates a skip that could not be repaired or a V sector totally obliterated on the medium (hard read error). A 'V' marker generally results in some audible defect in the sample. The smilie is actually relevant. It makes different faces depending on the current errors it's correcting. Legend of smilies :-) Normal operation. No errors to report; if any jitter is present, it's small. :-| Normal operation, but average jitter is quite large. A rift was found in the middle of an atomically read block; in other words, the drive lost streaming in the :-P middle of a read and did not abort, alert the kernel , or restart in the proper location. The drive silently continued reading in so me random location. :-/ The read appears to be drifting; cdparanoia is shifting all of its reads to make up for it. Two matching vectors were found to disagree even after first stage verification; this is an indication that the drive is reliably dropping/adding bytes at consistent locations. Because the verification algorithm is partially 8-| based on rereading and comparing vectors, if two vectors read incorrectly but identically, cdparanoia may never detect the problem. This smilie indicates that such a situation *was* detected; other instances may be slipping through. Transport or drive error. This is normally not a cause for concern; cdparanoia can repair just about any error that :-0 it actually detects. For more information about these errors, run cdparanoia with the -v option. Any all all errors and a description will dump to stderr. :-( Cdparanoia detected a scratch. Cdparanoia gave up trying to repair a sector; it could not read consistent enough information from the drive to do ;-( so. At this point cdparanoia will make the best guess it has available and continue (a V appears in the bargraph at this point). This often results in an audible defect. Cdparanoia displays this smilie both when finished reading :^D a track and also if no error correction mechanism has been tripped so far reading a new track. ----------------------------------------------------------------------- How can I tell if my drive would be OK with regular cdda2wav? Easy. Run cdparanoia; if the progress meter never shows any characters but the little arrow going across the screen, the CDROM drive is probably one of the (currently) few drives that can read a pristine stream of data off an audio disc regardless of circumstances. This drive will work quite well with cdda2wav (or cdparanoia using the '-Z' option) A drive that results in a bargraph of all hyphens would *likely* work OK with cdda2wav, but it's less certain. Any other characters in the bargraph (colons, semicolons, pluses, Xs, etc..) indicate that a fixups had to be performed at that point during the read; that read would have failed or 'popped' using cdda2wav. ----------------------------------------------------------------------- What is the biggest value of SG_BIG_BUFF I can use? This is relevant only to 2.0 kernels and early 2.2 kernels. Modern Linux kernels no longer have a single static SG DMS pool. For 2.0, 65536 (64 kilobytes). Some motherboards can use 128kB DMA, but attempting to use 128kB DMA on a machine that can't do it will crash the machine. Cdparanoia will not use larger than 64kB requests. ----------------------------------------------------------------------- Why do the binary files from two reads differ when compared? The problem is the beginning point of the read. Cdparanoia enforces consistency from whatever the drive considers to be the starting point of the data, and the drive is returning a slightly different beginning point each time. The beginning point should not vary by much, and if this shift is accounted for when comparing the files, they should indeed turn out to be the same (aside from errors duly reported during the read; scratch correction or any reported skips will very likely also result in different files). ----------------------------------------------------------------------- Why do CDParanoia, CDDA2WAV et al. rip files off into WAV format (and other sample formats) but not CDDA format? WAV and AIFC are simply convenient formats that include enough header information such that multipurpose audio software can uniquely identify the form of the data in the sample. In raw form, mulaw, SND and CDDA look exactly alike to a program like xplay, and are very likely to blow your ears (and stereo) out when played! Header formats are more versatile and safer. By default, cdparanoia and cdda2wav write WAV files. That said, cdparanoia (and cdda2wav) will write raw, headerless formats if explicitly told to. Cdparanoia writes headerless, signed 16 bit, 44.1kHz stero files in little endian format (LSB first) when given the -r option, and the same in big endian (MSB) format when given -R. All files written by cdparanoia are a multiple of 2352 bytes long (minus the header, if any) as required by cd writer software. Cdparanoia and the Laser-Playback-Head-of-Omniscience logo are trademarks (tm) of Xiphophorus (xiph.org). This document copyright (C) 1994-1999 Xiphophorus. All rights reserved. Comments and questions are welcome. libcdio-0.83/src/cd-paranoia/doc/overlapdef.txt0000644000175000017500000000037311114145233016372 00000000000000 0 70 100 A |----------|-----| B |-----|---------| 0 40 100 offset=-30 begin=30 end=100 0 70 100 A |----------|-----| B |-----|---------| 50 90 150 offset=20 begin=30 end=100 libcdio-0.83/src/cd-paranoia/doc/ja/0000755000175000017500000000000011652210415014153 500000000000000libcdio-0.83/src/cd-paranoia/doc/ja/Makefile.am0000644000175000017500000000463011114145233016130 00000000000000# $Id: Makefile.am,v 1.2 2008/04/17 17:39:48 karl Exp $ # # Copyright (C) 2005, 2008 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . mansubdir=/jp/man1 manfiles = cd-paranoia.1 man_MANS = $(manfiles) cd-paranoia.1 transform = s,cd-paranoia,@CDPARANOIA_NAME@, EXTRA_DIST = $(manfiles) cd-paranoia.1.in install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(mandir)$(mansubdir)" @list='$(man1_MANS)'; \ l2='$(man_MANS)'; for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(mandir)$(mansubdir)/$$inst"; \ $(INSTALL_DATA) $$file $(DESTDIR)$(mandir)$(mansubdir)/$$inst; \ done uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS)'; \ l2='$(man_MANS)'; for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f $(DESTDIR)$(mandir)$(mansubdir)/$$inst"; \ rm -f $(DESTDIR)$(mandir)$(mansubdir)/$$inst; \ done mostlyclean-generic: -rm -f *~ \#* .*~ .\#* maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in $(manfiles) libcdio-0.83/src/cd-paranoia/doc/ja/cd-paranoia.1.in0000644000175000017500000002302511114145233016740 00000000000000.TH @CDPARANOIA_NAME@ 1 .\" Translated Sun Aug 22 18:02:41 JST 1999 .\" by FUJIWARA Teruyoshi .SH ̾ @CDPARANOIA_NAME@ (Paranoia release III libcdio) \- ǥ CD ɤ߼桼ƥƥ̤ʥǡȹ絡ǽġ .SH СIII ꡼9.6 (17 Aug 1999) .SH .B @CDPARANOIA_NAME@ .RB [ options ] .B span .RB [ outfile ] .SH .B @CDPARANOIA_NAME@ CD-DA ǽ CD-ROM ɥ饤֤饪ǥȥåФ Υǡ WAV, AIFF, AIFF-C, raw ǥե˥֤뤳 䡢ɸϤ뤳ȤǤޤۤȤɤ ATAPI, SCSI, ᡼ȼ CD-ROM ɥ饤֤ݡȤƤޤ .B @CDPARANOIA_NAME@ оݤΥɥ饤֤ CD-DA ǽäƤ뤫ɤȽ̤Ǥޤ .P ñɤ߼Ǥʤ .B @CDPARANOIA_NAME@ ̤˴ʥǡȹ絡ǽƱǽ顼ǽ»ǡκ ǽäƤޤ .SH ץ .TP .B \-v --verbose ưФɤ߼νˤĤơФФۤɾĹɽԤޤ ǥХåκݤǤ .TP .B \-q --quiet ɤ߼ˡʹԾ䥨顼ɽޤ .TP .B \-e --stderr-progress ʹԾ(åѥץȤΤ)ɸ२顼Ϥ˽Ϥޤ .TP .B \-V --version ץΥСɽƽλޤ .TP .B \-Q --query CD-ROM ɥ饤֤μưФԤCD-ROM TOC 䤤碌ɽ λޤ .TP .B \-s --search-for-drive Ȥ /dev/cdrom Υ󥯤¸ߤƤƤ⡢CD-ROM ɥ饤֤δ Ԥޤ .TP .B \-h --help .B @CDPARANOIA_NAME@ λȤȥץñϤޤ .TP .B \-p --output-raw إå̵ΥǡۥȤΥХȽǡ󥿥꡼ֽܤ ץ벻ޤ raw 16 ӥå PCM ǡȤƽϤޤ ХȽȤƥȥ륨ǥ󤢤뤤ϥӥåǥꤹ ϡҤ .B \-r ޤ .B \-R ץȤäƤ .TP .B \-r --output-raw-little-endian إå̵Υǡ LSB first ΥХȽǡ󥿥꡼ֽܤ ץ벻ޤ raw 16 ӥå PCM ǡȤƽϤޤ .TP .B \-R --output-raw-big-endian إå̵Υǡ MSB first ΥХȽǡ󥿥꡼ֽܤ ץ벻ޤ raw 16 ӥå PCM ǡȤƽϤޤ .TP .B \-w --output-wav ǡ Micro$oft RIFF WAV ǽϤޤ(WAV ǡΥХȽ ɬ LSB first Ǥ) .TP .B \-f --output-aiff ǡ Apple AIFF ǽϤޤ(AIFC ǡΥХȽɬ MSB first Ǥ) .TP .B \-a --output-aifc ǡ̵ Apple AIFF-C ǽϤޤ(AIFF-C ǡΥХ ɬ MSB first Ǥ) .TP .BI "\-B --batch " cdda2wav ΥХåϤԤޤ@CDPARANOIA_NAME@ ϽϤȥå ʣեʬ䤷ޤϥեΥե̾Ƭʬϡ'track(ֹ)' Ȥʤޤ .TP .B \-c --force-cdrom-little-endian CD-ROM ϴְäǥ𤷤ޤ(뤤ϥǥ ˴ؤ𤷤ޤ)Τᡢ@CDPARANOIA_NAME@ ǥ ְ㤨뤳Ȥޤɥ饤֤ȥ륨ǥΥǥХȤ @CDPARANOIA_NAME@ ˰碌ˤϡ .B \-c ץȤޤ .TP .B \-C --force-cdrom-big-endian ΥץεդǡǥХӥåǥΥǥХȤ @CDPARANOIA_NAME@ ˰碌ޤ .TP .BI "\-n --force-default-sectors " n 󥿥եΥХåɤԤǾñ̤ɤ߼ 1 ɤ߼ꤴȤ .B n Ȥޤο򵯤줬ޤͥ¿ 硢ɤ߼׵Ǿñ̤ɤ߼(@CDPARANOIA_NAME@ ˤ뼫ưϤ бƤޤ)ʣĤʬ䤹뤫¤줿礭ϰϤǤ ɤ߼Ĥޤ .B ̤ϤΥץȤ٤ǤϤޤ .TP .BI "\-d --force-cdrom-device " device 󥿥եΥХåɤˤɤ߼򡢺ǽ˸Ĥɤ߼ ǽ CD-ROM ɥ饤֤ǤϤʤꤷ .B device Ԥ褦ˤޤΥץǤϡѲǽǤǤդ 󥿥ե(ATAPI, SCSI, ᡼ȼ)ĥǥХꤹ뤳 Ǥޤ .TP .BI "\-g --force-generic-device " device ΥץϡSCSI CD-ROM ѥǥХŪ̡ .B \-d ץȤ߹碌ƻȤޤΥץΩĤΤϡSCSI ꤬ɸȰۤʤǤ .TP .BI "\-S --force-read-speed " number CD ɥ饤֤ɤ߹®٤ꤹˤϡΥץŪ ȤäƤ(ɥ饤֤бƤ)ΥץѤȡ ǥ٤꤬ʤ˵륢򸺤餹 Ǥޤ .TP .B \-Z --disable-paranoia ǡȹǽ .b ̵ˤޤ-Z ץѤȡ@CDPARANOIA_NAME@ Сåפ꤬ 0 Ǥ cdda2wav Ʊ褦˥ǡ ɤ߼Ԥޤ Υץꤹ .B \-W , .B \-X , .B \-Y ץͭˤʤޤ .B \-Z \-W \-X \-Y ƱǤ .B ޤ ʤʤ顢 .B \-W .B \-Z ޤǤΥץˤȹΥ٥뤬ŪѤ뤫Ǥºݤͭ ˤʤΤϺǸ˻ꤷץǤ .TP .B \-Y --disable-extra-paranoia ɤ߼äǡ֤ˤǡȹԤޤ󡣤Ĥޤꡢ ǡɤ߼궭ˤ륪СåʬΥåԤޤ .TP .B \-X --disable-scratch-detection ȹǤϽõԤ鷺ФƴƱԤޤ .B \-X ץꤷ硢Ĥ CD Ϳ @CDPARANOIA_NAME@ ɤ߼ μԤ򵯤ޤ .TP .B \-W --disable-scratch-repair 򸡽ФƱݤĽԤޤ줿ǡνϹԤ 󡣥եνϤԤ( .RB \-i ץ)ƤνΥե졼֤ե˽Ϥޤ .SH Ϥʸ .TP .B :-) ưåϾʤʤ .TP .B :-| ưåϵϰ .TP .B :-/ ɤ߼ǥɥեȤȯ .TP .B :-P Ǿñ̤ɤ߼ˤơ𤵤Ƥʤ»ȥ꡼ߥ󥰤ˤ .TP .B 8-| ֤ɤ߼ԤäƱ֤꤬ϺǤ .TP .B :-0 SCSI/ATAPI Υǡž顼 .TP .B :-( Ф줿 .TP .B ;-( ǡ򤢤᤿ .TP .B :^D ɤ߼꽪λ .SH ʹɽΰ̣ .TP .B <ڡ> .TP .B - åɬ .TP .B + 𤵤Ƥʤ»ȥ꡼ߥ󥰤ˤ롣뤤̤Υ顼ɤ߼ ȯ .TP .B ! ơ 1 θ˥顼Ĥäɤ߼ʣ󷫤֤Ƥ Ʊ顼ȯ@CDPARANOIA_NAME@ ϤΥ顼򤦤ޤФǤʤ .TP .B e SCSI/ATAPI Υǡž顼(Ѥ) .TP .B V Ǥʤ顼/ǡΥå .SH 'span' span ϡɤ߼Ԥȥåޤϥȥåΰꤷޤ ΰɬɬפǤ .B : span ñʤǤʤС뤬 span ŸƤޤʤ 褦˥ȤΤ̤Ǥ礦 .P span ϡñʤȥåֹ椫եåȤȥѥȹ礻λ ȤʤޤեåȤȥѥȹ礻ꤹˡϡʲ 褦ˤʤޤ: .P 1[ww:xx:yy.zz]-2[aa:bb:cc.dd] .P 1 2 ϥȥåֹǤѳ̤οͤϡꤵ줿ȥå ˤ롢٤եåȻǤ[aa:bb:cc.dd] ֻ/ʬ//פηǤͤ 0 Ǥեɤϻꤷʤ ⹽ޤ󡣤Ĥޤ [::20], [:20], [20], [20.] 20 äȲᤵ졢 [10:] 10 äȲᤵ졢[.30] 30 Ȳᤵޤ(75 1 äǤ) .P եåȤ 1 ĤꤷʤСϳϰ֤ΥեåȤɽ ۤФϤΥȥåνޤǹԤޤեåȤ 1 Ĥ ꡢ˥ϥե(-)ˤϡάƤ륪եåȤ ǥƬ뤤ȤƲᤵޤʲ˼ޤ: .TP .B 1:[20.35] ȥå 1 20 á35 ΰ֤顢ȥå 1 ޤǤۤ Фޤ .TP .B 1:[20.35]- 1[20.35] ΰ֤ǥޤǤۤФޤ .TP .B \-2 ǥƬȥå 2 ޤ(ȥå 2 ޤߤޤ)ۤФޤ .TP .B \-2:[30.35] ǥƬ 2:[30.35] ΰ֤ޤǵۤФޤ .TP .B 2-4 ȥå 2 Ƭȥå 4 ޤǤۤФޤ .P ֤ˤʤޤѳ̤ñƬˤϥեɬ ơŸʤ褦ˤƤ .SH Ȥޤ᤿򤤤Ĥޤ: .TP ɥ饤֤ĴŰŪ˹ԤưФη̤𤷤ޤ: .P @CDPARANOIA_NAME@ -vsQ .TP ǥΤۤФޤ줾Υȥå̡Υեˤޤ: .P @CDPARANOIA_NAME@ -B "1-" .TP ȥå 1 λ 0:30.12 1:10.00 ޤǤۤФޤ: .P @CDPARANOIA_NAME@ "1[:30.12]-1[1:10]" .TP ȥå 1 λ 0:30.12 1 ʬ֤ΥǡۤФޤ: .P @CDPARANOIA_NAME@ "1[:30.12]-[1:00]" .SH ϥեꤹϾάǽǤꤵƤʤС @CDPARANOIA_NAME@ ϥץ벻 .BR cdda.wav ", " cdda.aifc ", " cdda.raw Τ줫˽ϤޤɤΥե˽ϤΤϡץ .BR \-w ", " \-a ", " \-r "," \-R ΤȤˤäƷޤޤ(ꤷʤ .BR \-w ǥեͤǤ)ϥեꤹ .B \- ʤСϤɸϤФƹԤޤɤΥǡǤѥפ 뤳ȤǤޤ .SH ռ @CDPARANOIA_NAME@ δȤʤäΤ Heiko Eissfeldt (heiko@colossus.escape.de) 'cdda2wav' ѥåǤꡢ @CDPARANOIA_NAME@ Υ󥿥եʬ cdda2wav äƤ ΤǤcdda2wav ʤС@CDPARANOIA_NAME@ 뤳ȤϤʤä 礦 .P Joerg Schilling 󤬺 SCSI ǡž饤֥꤫顢SCSI μ¿ؤФƤޤ .P .SH Monty .P cdparanoia Υۡڡϰʲξˤޤ: .P .ce http://www.xiph.org/paranoia/ .P libcdio Υۡڡϰʲξˤޤ: .P .ce http://www.gnu.org/libcdio/ libcdio-0.83/src/cd-paranoia/doc/ja/cd-paranoia.10000644000175000017500000002261311652140274016344 00000000000000.TH cd-paranoia 1 .\" Translated Sun Aug 22 18:02:41 JST 1999 .\" by FUJIWARA Teruyoshi .SH ̾ cd-paranoia (Paranoia release III libcdio) \- ǥ CD ɤ߼桼ƥƥ̤ʥǡȹ絡ǽġ .SH СIII ꡼9.6 (17 Aug 1999) .SH .B cd-paranoia .RB [ options ] .B span .RB [ outfile ] .SH .B cd-paranoia CD-DA ǽ CD-ROM ɥ饤֤饪ǥȥåФ Υǡ WAV, AIFF, AIFF-C, raw ǥե˥֤뤳 䡢ɸϤ뤳ȤǤޤۤȤɤ ATAPI, SCSI, ᡼ȼ CD-ROM ɥ饤֤ݡȤƤޤ .B cd-paranoia оݤΥɥ饤֤ CD-DA ǽäƤ뤫ɤȽ̤Ǥޤ .P ñɤ߼Ǥʤ .B cd-paranoia ̤˴ʥǡȹ絡ǽƱǽ顼ǽ»ǡκ ǽäƤޤ .SH ץ .TP .B \-v --verbose ưФɤ߼νˤĤơФФۤɾĹɽԤޤ ǥХåκݤǤ .TP .B \-q --quiet ɤ߼ˡʹԾ䥨顼ɽޤ .TP .B \-e --stderr-progress ʹԾ(åѥץȤΤ)ɸ२顼Ϥ˽Ϥޤ .TP .B \-V --version ץΥСɽƽλޤ .TP .B \-Q --query CD-ROM ɥ饤֤μưФԤCD-ROM TOC 䤤碌ɽ λޤ .TP .B \-s --search-for-drive Ȥ /dev/cdrom Υ󥯤¸ߤƤƤ⡢CD-ROM ɥ饤֤δ Ԥޤ .TP .B \-h --help .B cd-paranoia λȤȥץñϤޤ .TP .B \-p --output-raw إå̵ΥǡۥȤΥХȽǡ󥿥꡼ֽܤ ץ벻ޤ raw 16 ӥå PCM ǡȤƽϤޤ ХȽȤƥȥ륨ǥ󤢤뤤ϥӥåǥꤹ ϡҤ .B \-r ޤ .B \-R ץȤäƤ .TP .B \-r --output-raw-little-endian إå̵Υǡ LSB first ΥХȽǡ󥿥꡼ֽܤ ץ벻ޤ raw 16 ӥå PCM ǡȤƽϤޤ .TP .B \-R --output-raw-big-endian إå̵Υǡ MSB first ΥХȽǡ󥿥꡼ֽܤ ץ벻ޤ raw 16 ӥå PCM ǡȤƽϤޤ .TP .B \-w --output-wav ǡ Micro$oft RIFF WAV ǽϤޤ(WAV ǡΥХȽ ɬ LSB first Ǥ) .TP .B \-f --output-aiff ǡ Apple AIFF ǽϤޤ(AIFC ǡΥХȽɬ MSB first Ǥ) .TP .B \-a --output-aifc ǡ̵ Apple AIFF-C ǽϤޤ(AIFF-C ǡΥХ ɬ MSB first Ǥ) .TP .BI "\-B --batch " cdda2wav ΥХåϤԤޤcd-paranoia ϽϤȥå ʣեʬ䤷ޤϥեΥե̾Ƭʬϡ'track(ֹ)' Ȥʤޤ .TP .B \-c --force-cdrom-little-endian CD-ROM ϴְäǥ𤷤ޤ(뤤ϥǥ ˴ؤ𤷤ޤ)Τᡢcd-paranoia ǥ ְ㤨뤳Ȥޤɥ饤֤ȥ륨ǥΥǥХȤ cd-paranoia ˰碌ˤϡ .B \-c ץȤޤ .TP .B \-C --force-cdrom-big-endian ΥץεդǡǥХӥåǥΥǥХȤ cd-paranoia ˰碌ޤ .TP .BI "\-n --force-default-sectors " n 󥿥եΥХåɤԤǾñ̤ɤ߼ 1 ɤ߼ꤴȤ .B n Ȥޤο򵯤줬ޤͥ¿ 硢ɤ߼׵Ǿñ̤ɤ߼(cd-paranoia ˤ뼫ưϤ бƤޤ)ʣĤʬ䤹뤫¤줿礭ϰϤǤ ɤ߼Ĥޤ .B ̤ϤΥץȤ٤ǤϤޤ .TP .BI "\-d --force-cdrom-device " device 󥿥եΥХåɤˤɤ߼򡢺ǽ˸Ĥɤ߼ ǽ CD-ROM ɥ饤֤ǤϤʤꤷ .B device Ԥ褦ˤޤΥץǤϡѲǽǤǤդ 󥿥ե(ATAPI, SCSI, ᡼ȼ)ĥǥХꤹ뤳 Ǥޤ .TP .BI "\-g --force-generic-device " device ΥץϡSCSI CD-ROM ѥǥХŪ̡ .B \-d ץȤ߹碌ƻȤޤΥץΩĤΤϡSCSI ꤬ɸȰۤʤǤ .TP .BI "\-S --force-read-speed " number CD ɥ饤֤ɤ߹®٤ꤹˤϡΥץŪ ȤäƤ(ɥ饤֤бƤ)ΥץѤȡ ǥ٤꤬ʤ˵륢򸺤餹 Ǥޤ .TP .B \-Z --disable-paranoia ǡȹǽ .b ̵ˤޤ-Z ץѤȡcd-paranoia Сåפ꤬ 0 Ǥ cdda2wav Ʊ褦˥ǡ ɤ߼Ԥޤ Υץꤹ .B \-W , .B \-X , .B \-Y ץͭˤʤޤ .B \-Z \-W \-X \-Y ƱǤ .B ޤ ʤʤ顢 .B \-W .B \-Z ޤǤΥץˤȹΥ٥뤬ŪѤ뤫Ǥºݤͭ ˤʤΤϺǸ˻ꤷץǤ .TP .B \-Y --disable-extra-paranoia ɤ߼äǡ֤ˤǡȹԤޤ󡣤Ĥޤꡢ ǡɤ߼궭ˤ륪СåʬΥåԤޤ .TP .B \-X --disable-scratch-detection ȹǤϽõԤ鷺ФƴƱԤޤ .B \-X ץꤷ硢Ĥ CD Ϳ cd-paranoia ɤ߼ μԤ򵯤ޤ .TP .B \-W --disable-scratch-repair 򸡽ФƱݤĽԤޤ줿ǡνϹԤ 󡣥եνϤԤ( .RB \-i ץ)ƤνΥե졼֤ե˽Ϥޤ .SH Ϥʸ .TP .B :-) ưåϾʤʤ .TP .B :-| ưåϵϰ .TP .B :-/ ɤ߼ǥɥեȤȯ .TP .B :-P Ǿñ̤ɤ߼ˤơ𤵤Ƥʤ»ȥ꡼ߥ󥰤ˤ .TP .B 8-| ֤ɤ߼ԤäƱ֤꤬ϺǤ .TP .B :-0 SCSI/ATAPI Υǡž顼 .TP .B :-( Ф줿 .TP .B ;-( ǡ򤢤᤿ .TP .B :^D ɤ߼꽪λ .SH ʹɽΰ̣ .TP .B <ڡ> .TP .B - åɬ .TP .B + 𤵤Ƥʤ»ȥ꡼ߥ󥰤ˤ롣뤤̤Υ顼ɤ߼ ȯ .TP .B ! ơ 1 θ˥顼Ĥäɤ߼ʣ󷫤֤Ƥ Ʊ顼ȯcd-paranoia ϤΥ顼򤦤ޤФǤʤ .TP .B e SCSI/ATAPI Υǡž顼(Ѥ) .TP .B V Ǥʤ顼/ǡΥå .SH 'span' span ϡɤ߼Ԥȥåޤϥȥåΰꤷޤ ΰɬɬפǤ .B : span ñʤǤʤС뤬 span ŸƤޤʤ 褦˥ȤΤ̤Ǥ礦 .P span ϡñʤȥåֹ椫եåȤȥѥȹ礻λ ȤʤޤեåȤȥѥȹ礻ꤹˡϡʲ 褦ˤʤޤ: .P 1[ww:xx:yy.zz]-2[aa:bb:cc.dd] .P 1 2 ϥȥåֹǤѳ̤οͤϡꤵ줿ȥå ˤ롢٤եåȻǤ[aa:bb:cc.dd] ֻ/ʬ//פηǤͤ 0 Ǥեɤϻꤷʤ ⹽ޤ󡣤Ĥޤ [::20], [:20], [20], [20.] 20 äȲᤵ졢 [10:] 10 äȲᤵ졢[.30] 30 Ȳᤵޤ(75 1 äǤ) .P եåȤ 1 ĤꤷʤСϳϰ֤ΥեåȤɽ ۤФϤΥȥåνޤǹԤޤեåȤ 1 Ĥ ꡢ˥ϥե(-)ˤϡάƤ륪եåȤ ǥƬ뤤ȤƲᤵޤʲ˼ޤ: .TP .B 1:[20.35] ȥå 1 20 á35 ΰ֤顢ȥå 1 ޤǤۤ Фޤ .TP .B 1:[20.35]- 1[20.35] ΰ֤ǥޤǤۤФޤ .TP .B \-2 ǥƬȥå 2 ޤ(ȥå 2 ޤߤޤ)ۤФޤ .TP .B \-2:[30.35] ǥƬ 2:[30.35] ΰ֤ޤǵۤФޤ .TP .B 2-4 ȥå 2 Ƭȥå 4 ޤǤۤФޤ .P ֤ˤʤޤѳ̤ñƬˤϥեɬ ơŸʤ褦ˤƤ .SH Ȥޤ᤿򤤤Ĥޤ: .TP ɥ饤֤ĴŰŪ˹ԤưФη̤𤷤ޤ: .P cd-paranoia -vsQ .TP ǥΤۤФޤ줾Υȥå̡Υեˤޤ: .P cd-paranoia -B "1-" .TP ȥå 1 λ 0:30.12 1:10.00 ޤǤۤФޤ: .P cd-paranoia "1[:30.12]-1[1:10]" .TP ȥå 1 λ 0:30.12 1 ʬ֤ΥǡۤФޤ: .P cd-paranoia "1[:30.12]-[1:00]" .SH ϥեꤹϾάǽǤꤵƤʤС cd-paranoia ϥץ벻 .BR cdda.wav ", " cdda.aifc ", " cdda.raw Τ줫˽ϤޤɤΥե˽ϤΤϡץ .BR \-w ", " \-a ", " \-r "," \-R ΤȤˤäƷޤޤ(ꤷʤ .BR \-w ǥեͤǤ)ϥեꤹ .B \- ʤСϤɸϤФƹԤޤɤΥǡǤѥפ 뤳ȤǤޤ .SH ռ cd-paranoia δȤʤäΤ Heiko Eissfeldt (heiko@colossus.escape.de) 'cdda2wav' ѥåǤꡢ cd-paranoia Υ󥿥եʬ cdda2wav äƤ ΤǤcdda2wav ʤСcd-paranoia 뤳ȤϤʤä 礦 .P Joerg Schilling 󤬺 SCSI ǡž饤֥꤫顢SCSI μ¿ؤФƤޤ .P .SH Monty .P cdparanoia Υۡڡϰʲξˤޤ: .P .ce http://www.xiph.org/paranoia/ .P libcdio Υۡڡϰʲξˤޤ: .P .ce http://www.gnu.org/libcdio/ libcdio-0.83/src/cd-paranoia/doc/ja/Makefile.in0000644000175000017500000003644311652210030016143 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Id: Makefile.am,v 1.2 2008/04/17 17:39:48 karl Exp $ # # Copyright (C) 2005, 2008 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/cd-paranoia/doc/ja DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/cd-paranoia.1.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = cd-paranoia.1 CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" NROFF = nroff MANS = $(man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) transform = s,cd-paranoia,@CDPARANOIA_NAME@, ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDDA_PLAYER_LIBS = @CDDA_PLAYER_LIBS@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CDPARANOIA_NAME = @CDPARANOIA_NAME@ CFLAGS = @CFLAGS@ CMP = @CMP@ COS_LIB = @COS_LIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_PKG_LIB_HACK = @DARWIN_PKG_LIB_HACK@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ DIFF_OPTS = @DIFF_OPTS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GIT2CL = @GIT2CL@ GREP = @GREP@ HAVE_BSDI_CDROM = @HAVE_BSDI_CDROM@ HAVE_DARWIN_CDROM = @HAVE_DARWIN_CDROM@ HAVE_FREEBSD_CDROM = @HAVE_FREEBSD_CDROM@ HAVE_JOLIET = @HAVE_JOLIET@ HAVE_LINUX_CDROM = @HAVE_LINUX_CDROM@ HAVE_OS2_CDROM = @HAVE_OS2_CDROM@ HAVE_ROCK = @HAVE_ROCK@ HAVE_SOLARIS_CDROM = @HAVE_SOLARIS_CDROM@ HAVE_WIN32_CDROM = @HAVE_WIN32_CDROM@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDIOPP_LIBS = @LIBCDIOPP_LIBS@ LIBCDIO_CDDA_LIBS = @LIBCDIO_CDDA_LIBS@ LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ LIBCDIO_DEPS = @LIBCDIO_DEPS@ LIBCDIO_LIBS = @LIBCDIO_LIBS@ LIBCDIO_PARANOIA_LIBS = @LIBCDIO_PARANOIA_LIBS@ LIBCDIO_SOURCE_PATH = @LIBCDIO_SOURCE_PATH@ LIBCDIO_VERSION_NUM = @LIBCDIO_VERSION_NUM@ LIBICONV = @LIBICONV@ LIBISO9660PP_LIBS = @LIBISO9660PP_LIBS@ LIBISO9660_CFLAGS = @LIBISO9660_CFLAGS@ LIBISO9660_LIBS = @LIBISO9660_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBUDF_LIBS = @LIBUDF_LIBS@ LINUX_CDROM_TIMEOUT = @LINUX_CDROM_TIMEOUT@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_NO_UNDEFINED = @LT_NO_UNDEFINED@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OLD_CDPARANOIA = @OLD_CDPARANOIA@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SBPCD_H = @SBPCD_H@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TYPESIZES = @TYPESIZES@ UCDROM_H = @UCDROM_H@ VCDINFO_CFLAGS = @VCDINFO_CFLAGS@ VCDINFO_LIBS = @VCDINFO_LIBS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ mansubdir = /jp/man1 manfiles = cd-paranoia.1 man_MANS = $(manfiles) cd-paranoia.1 EXTRA_DIST = $(manfiles) cd-paranoia.1.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/cd-paranoia/doc/ja/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/cd-paranoia/doc/ja/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): cd-paranoia.1: $(top_builddir)/config.status $(srcdir)/cd-paranoia.1.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-man uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-man1 \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-man uninstall-man1 install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(mandir)$(mansubdir)" @list='$(man1_MANS)'; \ l2='$(man_MANS)'; for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(mandir)$(mansubdir)/$$inst"; \ $(INSTALL_DATA) $$file $(DESTDIR)$(mandir)$(mansubdir)/$$inst; \ done uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS)'; \ l2='$(man_MANS)'; for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f $(DESTDIR)$(mandir)$(mansubdir)/$$inst"; \ rm -f $(DESTDIR)$(mandir)$(mansubdir)/$$inst; \ done mostlyclean-generic: -rm -f *~ \#* .*~ .\#* maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in $(manfiles) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libcdio-0.83/src/cd-paranoia/doc/Makefile.in0000644000175000017500000004563611652210030015555 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Id: Makefile.am,v 1.4 2008/04/17 17:39:48 karl Exp $ # # Copyright (C) 2005, 2007, 2008 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/cd-paranoia/doc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDDA_PLAYER_LIBS = @CDDA_PLAYER_LIBS@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CDPARANOIA_NAME = @CDPARANOIA_NAME@ CFLAGS = @CFLAGS@ CMP = @CMP@ COS_LIB = @COS_LIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_PKG_LIB_HACK = @DARWIN_PKG_LIB_HACK@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ DIFF_OPTS = @DIFF_OPTS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GIT2CL = @GIT2CL@ GREP = @GREP@ HAVE_BSDI_CDROM = @HAVE_BSDI_CDROM@ HAVE_DARWIN_CDROM = @HAVE_DARWIN_CDROM@ HAVE_FREEBSD_CDROM = @HAVE_FREEBSD_CDROM@ HAVE_JOLIET = @HAVE_JOLIET@ HAVE_LINUX_CDROM = @HAVE_LINUX_CDROM@ HAVE_OS2_CDROM = @HAVE_OS2_CDROM@ HAVE_ROCK = @HAVE_ROCK@ HAVE_SOLARIS_CDROM = @HAVE_SOLARIS_CDROM@ HAVE_WIN32_CDROM = @HAVE_WIN32_CDROM@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDIOPP_LIBS = @LIBCDIOPP_LIBS@ LIBCDIO_CDDA_LIBS = @LIBCDIO_CDDA_LIBS@ LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ LIBCDIO_DEPS = @LIBCDIO_DEPS@ LIBCDIO_LIBS = @LIBCDIO_LIBS@ LIBCDIO_PARANOIA_LIBS = @LIBCDIO_PARANOIA_LIBS@ LIBCDIO_SOURCE_PATH = @LIBCDIO_SOURCE_PATH@ LIBCDIO_VERSION_NUM = @LIBCDIO_VERSION_NUM@ LIBICONV = @LIBICONV@ LIBISO9660PP_LIBS = @LIBISO9660PP_LIBS@ LIBISO9660_CFLAGS = @LIBISO9660_CFLAGS@ LIBISO9660_LIBS = @LIBISO9660_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBUDF_LIBS = @LIBUDF_LIBS@ LINUX_CDROM_TIMEOUT = @LINUX_CDROM_TIMEOUT@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_NO_UNDEFINED = @LT_NO_UNDEFINED@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OLD_CDPARANOIA = @OLD_CDPARANOIA@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SBPCD_H = @SBPCD_H@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TYPESIZES = @TYPESIZES@ UCDROM_H = @UCDROM_H@ VCDINFO_CFLAGS = @VCDINFO_CFLAGS@ VCDINFO_LIBS = @VCDINFO_LIBS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = en ja EXTRA_DIST = FAQ.txt overlapdef.txt all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/cd-paranoia/doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/cd-paranoia/doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am mostlyclean-generic: -rm -f *~ \#* .*~ .\#* maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libcdio-0.83/src/cd-paranoia/getopt.h0000644000175000017500000001030311330201756014405 00000000000000/* Declarations for getopt. Copyright (C) 1989,90,91,92,93,94,96,97 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@gnu.org. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _GETOPT_H #define _GETOPT_H 1 #ifdef __cplusplus extern "C" { #endif /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ extern char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ extern int optind; /* Callers store zero here to inhibit the error message `getopt' prints for unrecognized options. */ extern int opterr; /* Set to an option character which was unrecognized. */ extern int optopt; /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector of `struct option' terminated by an element containing a name which is zero. The field `has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, optional_argument (or 2) if the option takes an optional argument. If the field `flag' is not NULL, it points to a variable that is set to the value given in the field `val' when the option is found, but left unchanged if the option is not found. To have a long-named option do something other than set an `int' to a compiled-in constant, such as set a value from `optarg', set the option's `flag' field to zero and its `val' field to a nonzero value (the equivalent single-letter option character, if there is one). For long options that have a zero `flag' field, `getopt' returns the contents of the `val' field. */ struct option { #if defined (__STDC__) && __STDC__ const char *name; #else char *name; #endif /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; int *flag; int val; }; /* Names for the values of the `has_arg' field of `struct option'. */ #define no_argument 0 #define required_argument 1 #define optional_argument 2 #if defined (__STDC__) && __STDC__ extern int getopt (int argc, char *const *argv, const char *optstring); extern int getopt_long (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind); extern int getopt_long_only (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind); /* Internal only. Users should not call this directly. */ extern int _getopt_internal (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind, int long_only); #else /* not __STDC__ */ extern int getopt (); extern int getopt_long (); extern int getopt_long_only (); extern int _getopt_internal (); #endif /* __STDC__ */ #ifdef __cplusplus } #endif #endif /* getopt.h */ libcdio-0.83/src/cd-paranoia/header.c0000644000175000017500000000716611565177106014356 00000000000000/* Copyright (C) 2004 Rocky Bernstein . */ /** \file header.h * \brief WAV, AIFF and AIFC header-writing routines. */ #include "header.h" #include #include #include #include static void PutNum(long num,int f,int endianness,int bytes){ int i; unsigned char c; if(!endianness) i=0; else i=bytes-1; while(bytes--){ c=(num>>(i<<3))&0xff; if(write(f,&c,1)==-1){ perror("Could not write to output."); exit(1); } if(endianness) i--; else i++; } } /** Writes WAV headers */ void WriteWav(int f, long int bytes) { /* quick and dirty */ write(f,"RIFF",4); /* 0-3 */ PutNum(bytes+44-8,f,0,4); /* 4-7 */ write(f,"WAVEfmt ",8); /* 8-15 */ PutNum(16,f,0,4); /* 16-19 */ PutNum(1,f,0,2); /* 20-21 */ PutNum(2,f,0,2); /* 22-23 */ PutNum(44100,f,0,4); /* 24-27 */ PutNum(44100*2*2,f,0,4); /* 28-31 */ PutNum(4,f,0,2); /* 32-33 */ PutNum(16,f,0,2); /* 34-35 */ write(f,"data",4); /* 36-39 */ PutNum(bytes,f,0,4); /* 40-43 */ } /** Writes AIFF headers */ void WriteAiff(int f, long int bytes) { long size=bytes+54; long frames=bytes/4; /* Again, quick and dirty */ write(f,"FORM",4); /* 4 */ PutNum(size-8,f,1,4); /* 8 */ write(f,"AIFF",4); /* 12 */ write(f,"COMM",4); /* 16 */ PutNum(18,f,1,4); /* 20 */ PutNum(2,f,1,2); /* 22 */ PutNum(frames,f,1,4); /* 26 */ PutNum(16,f,1,2); /* 28 */ write(f,"@\016\254D\0\0\0\0\0\0",10); /* 38 (44.100 as a float) */ write(f,"SSND",4); /* 42 */ PutNum(bytes+8,f,1,4); /* 46 */ PutNum(0,f,1,4); /* 50 */ PutNum(0,f,1,4); /* 54 */ } /** Writes AIFC headers */ void WriteAifc(int f, long bytes) { long size=bytes+86; long frames=bytes/4; /* Again, quick and dirty */ write(f,"FORM",4); /* 4 */ PutNum(size-8,f,1,4); /* 8 */ write(f,"AIFC",4); /* 12 */ write(f,"FVER",4); /* 16 */ PutNum(4,f,1,4); /* 20 */ PutNum(2726318400UL,f,1,4); /* 24 */ write(f,"COMM",4); /* 28 */ PutNum(38,f,1,4); /* 32 */ PutNum(2,f,1,2); /* 34 */ PutNum(frames,f,1,4); /* 38 */ PutNum(16,f,1,2); /* 40 */ write(f,"@\016\254D\0\0\0\0\0\0",10); /* 50 (44.100 as a float) */ write(f,"NONE",4); /* 54 */ PutNum(14,f,1,1); /* 55 */ write(f,"not compressed",14); /* 69 */ PutNum(0,f,1,1); /* 70 */ write(f,"SSND",4); /* 74 */ PutNum(bytes+8,f,1,4); /* 78 */ PutNum(0,f,1,4); /* 82 */ PutNum(0,f,1,4); /* 86 */ } libcdio-0.83/src/cd-paranoia/header.h0000644000175000017500000000212011114145233014326 00000000000000/* $Id: header.h,v 1.2 2008/04/11 15:44:00 karl Exp $ Copyright (C) 2008 Rocky Bernstein Copyright (C) 1998 Monty This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** \file header.h * \brief header for WAV, AIFF and AIFC header-writing routines. */ /** Writes WAV headers */ extern void WriteWav(int f,long int i_bytes); /** Writes AIFC headers */ extern void WriteAifc(int f,long int i_bytes); /** Writes AIFF headers */ extern void WriteAiff(int f,long int_bytes); libcdio-0.83/src/cd-paranoia/Makefile.am0000644000175000017500000000332011650146576015004 00000000000000# Copyright (C) 2004, 2005, 2006, 2007, 2008, # Rocky Bernstein # Copyright (C) 1998 Monty xiphmont@mit.edu # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . transform = s,cd-paranoia,@CDPARANOIA_NAME@, if BUILD_CD_PARANOIA SUBDIRS = doc GETOPT_C = getopt1.c getopt.c EXTRA_DIST = usage.txt.in usage-copy.h pod2c.pl \ doc/FAQ.txt doc/overlapdef.txt $(GETOPT_C) getopt.h noinst_HEADERS = header.h report.h $(GETOPT_H) cd_paranoia_SOURCES = cd-paranoia.c \ buffering_write.c buffering_write.h \ header.c report.c utils.h version.h $(GETOPT_C) cd_paranoia_LDADD = $(LIBCDIO_LIBS) $(LIBCDIO_CDDA_LIBS) $(LIBCDIO_PARANOIA_LIBS) $(LTLIBICONV) cd_paranoia_DEPENDENCIES = $(LIBCDIO_DEPS) $(LIBCDIO_CDDA_LIBS) $(LIBCDIO_PARANOIA_LIBS) bin_PROGRAMS = cd-paranoia INCLUDES = -I$(top_srcdir) $(LIBCDIO_CFLAGS) cd-paranoia.$(OBJEXT): usage.h #: create header file used in help text: the "usage" help. if HAVE_PERL usage.h: usage.txt $(srcdir)/pod2c.pl $(PERL) $(srcdir)/pod2c.pl usage.txt >usage.h else usage.h: usage-copy.h cp usage-copy.h $@ endif endif MOSTLYCLEANFILES = usage.h usage.txt libcdio-0.83/src/cd-paranoia/usage-copy.h0000644000175000017500000001561511176133015015172 00000000000000/* Copyright (C) 1999, 2005, 2008, 2009 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ const char usage_help[] = "USAGE:\n" " cd-paranoia [options] [outfile]\n" "\n" "OPTIONS:\n" " -v --verbose : extra verbose operation\n" " -q --quiet : quiet operation\n" " -e --stderr-progress : force output of progress information to\n" " -l --log-summary : save result summary to file\n" " stderr (for wrapper scripts)\n" " -V --version : print version info and quit\n" " -Q --query : autosense drive, query disc and quit\n" " -B --batch : 'batch' mode (saves each track to a\n" " seperate file.\n" " -s --search-for-drive : do an exhaustive search for drive\n" " -h --help : print help\n" "\n" " -p --output-raw : output raw 16 bit PCM in host byte \n" " order\n" " -r --output-raw-little-endian : output raw 16 bit little-endian PCM\n" " -R --output-raw-big-endian : output raw 16 bit big-endian PCM\n" " -w --output-wav : output as WAV file (default)\n" " -f --output-aiff : output as AIFF file\n" " -a --output-aifc : output as AIFF-C file\n" "\n" " -c --force-cdrom-little-endian : force treating drive as little endian\n" " -C --force-cdrom-big-endian : force treating drive as big endian\n" " -n --force-default-sectors : force default number of sectors in read\n" " to n sectors\n" " -o --force-search-overlap : force minimum overlap search during\n" " verification to n sectors\n" " -d --force-cdrom-device : use specified device; disallow \n" " autosense\n" " -g --force-generic-device : really an alias for -d. Kept for \n" " compatibility.\n" " -S --force-read-speed : read from device at specified speed\n" " -t --toc-offset : Add sectors to the values reported\n" " when addressing tracks. May be negative\n" " -T --toc-bias : Assume that the beginning offset of \n" " track 1 as reported in the TOC will be\n" " addressed as LBA 0. Necessary for some\n" " Toshiba drives to get track boundaries\n" " correct\n" " -m --mmc-timeout : Set SCSI-MMC timeout to seconds.\n" " -O --sample-offset : Add samples to the offset when\n" " reading data. May be negative.\n" " -z --never-skip[=n] : never accept any less than perfect\n" " data reconstruction (don't allow 'V's)\n" " but if [n] is given, skip after [n]\n" " retries without progress.\n" " -Z --disable-paranoia : disable all paranoia checking\n" " -Y --disable-extra-paranoia : only do cdda2wav-style overlap checking\n" " -X --abort-on-skip : abort on imperfect reads/skips\n" " -x --test-flags=mask : simulate CD-reading errors of ilk-mask n\n" " mask & 0x10 - simulate underrun errors\n" "\n" "OUTPUT SMILIES:\n" " :-) Normal operation, low/no jitter\n" " :-| Normal operation, considerable jitter\n" " :-/ Read drift\n" " :-P Unreported loss of streaming in atomic read operation\n" " 8-| Finding read problems at same point during reread; hard to correct\n" " :-0 SCSI/ATAPI transport error\n" " :-( Scratch detected\n" " ;-( Gave up trying to perform a correction\n" " 8-X Aborted (as per -X) due to a scratch/skip\n" " :^D Finished extracting\n" "\n" "PROGRESS BAR SYMBOLS:\n" " No corrections needed\n" " - Jitter correction required\n" " + Unreported loss of streaming/other error in read\n" " ! Errors are getting through stage 1 but corrected in stage2\n" " e SCSI/ATAPI transport error (corrected)\n" " V Uncorrected error/skip\n" "\n" "SPAN ARGUMENT:\n" "The span argument may be a simple track number or a offset/span\n" "specification. The syntax of an offset/span takes the rough form:\n" " \n" " 1[ww:xx:yy.zz]-2[aa:bb:cc.dd] \n" "\n" "Here, 1 and 2 are track numbers; the numbers in brackets provide a\n" "finer grained offset within a particular track. [aa:bb:cc.dd] is in\n" "hours/minutes/seconds/sectors format. Zero fields need not be\n" "specified: [::20], [:20], [20], [20.], etc, would be interpreted as\n" "twenty seconds, [10:] would be ten minutes, [.30] would be thirty\n" "sectors (75 sectors per second).\n" "\n" "When only a single offset is supplied, it is interpreted as a starting\n" "offset and ripping will continue to the end of he track. If a single\n" "offset is preceeded or followed by a hyphen, the implicit missing\n" "offset is taken to be the start or end of the disc, respectively. Thus:\n" "\n" " 1:[20.35] Specifies ripping from track 1, second 20, sector 35 to \n" " the end of track 1.\n" "\n" " 1:[20.35]- Specifies ripping from 1[20.35] to the end of the disc\n" "\n" " -2 Specifies ripping from the beginning of the disc up to\n" " (and including) track 2\n" "\n" " -2:[30.35] Specifies ripping from the beginning of the disc up to\n" " 2:[30.35]\n" "\n" " 2-4 Specifies ripping from the beginning of track two to the\n" " end of track 4.\n" "\n" "Don't forget to protect square brackets and preceeding hyphens from\n" "the shell...\n" "\n" "A few examples, protected from the shell:\n" " A) query only with exhaustive search for a drive and full reporting\n" " of autosense:\n" " cd-paranoia -vsQ\n" "\n" " B) extract up to and including track 3, putting each track in a seperate\n" " file:\n" " cd-paranoia -B -- \"-3\"\n" "\n" " C) extract from track 1, time 0:30.12 to 1:10.00:\n" " cd-paranoia \"[:30.12]-1[1:10]\"\n" "\n" "Submit bug reports to bug-libcdio@gnu.org\n" "\n" ; libcdio-0.83/src/cd-paranoia/usage.txt.in0000644000175000017500000001333311176133046015216 00000000000000USAGE: @CDPARANOIA_NAME@ [options] [outfile] OPTIONS: -v --verbose : extra verbose operation -q --quiet : quiet operation -e --stderr-progress : force output of progress information to stderr (for wrapper scripts) -l --log-summary : save result summary to file -V --version : print version info and quit -Q --query : autosense drive, query disc and quit -B --batch : 'batch' mode (saves each track to a seperate file. -s --search-for-drive : do an exhaustive search for drive -h --help : print help -p --output-raw : output raw 16 bit PCM in host byte order -r --output-raw-little-endian : output raw 16 bit little-endian PCM -R --output-raw-big-endian : output raw 16 bit big-endian PCM -w --output-wav : output as WAV file (default) -f --output-aiff : output as AIFF file -a --output-aifc : output as AIFF-C file -c --force-cdrom-little-endian : force treating drive as little endian -C --force-cdrom-big-endian : force treating drive as big endian -n --force-default-sectors : force default number of sectors in read to n sectors -o --force-search-overlap : force minimum overlap search during verification to n sectors -d --force-cdrom-device : use specified device; disallow autosense -g --force-generic-device : really an alias for -d. Kept for compatibility. -S --force-read-speed : read from device at specified speed -t --toc-offset : Add sectors to the values reported when addressing tracks. May be negative -T --toc-bias : Assume that the beginning offset of track 1 as reported in the TOC will be addressed as LBA 0. Necessary for some Toshiba drives to get track boundaries correct -m --mmc-timeout : Set SCSI-MMC timeout to seconds. -O --sample-offset : Add samples to the offset when reading data. May be negative. -z --never-skip[=n] : never accept any less than perfect data reconstruction (don't allow 'V's) but if [n] is given, skip after [n] retries without progress. -Z --disable-paranoia : disable all paranoia checking -Y --disable-extra-paranoia : only do cdda2wav-style overlap checking -X --abort-on-skip : abort on imperfect reads/skips -x --test-flags=mask : simulate CD-reading errors of ilk-mask n mask & 0x10 - simulate underrun errors OUTPUT SMILIES: :-) Normal operation, low/no jitter :-| Normal operation, considerable jitter :-/ Read drift :-P Unreported loss of streaming in atomic read operation 8-| Finding read problems at same point during reread; hard to correct :-0 SCSI/ATAPI transport error :-( Scratch detected ;-( Gave up trying to perform a correction 8-X Aborted (as per -X) due to a scratch/skip :^D Finished extracting PROGRESS BAR SYMBOLS: No corrections needed - Jitter correction required + Unreported loss of streaming/other error in read ! Errors are getting through stage 1 but corrected in stage2 e SCSI/ATAPI transport error (corrected) V Uncorrected error/skip SPAN ARGUMENT: The span argument may be a simple track number or a offset/span specification. The syntax of an offset/span takes the rough form: 1[ww:xx:yy.zz]-2[aa:bb:cc.dd] Here, 1 and 2 are track numbers; the numbers in brackets provide a finer grained offset within a particular track. [aa:bb:cc.dd] is in hours/minutes/seconds/sectors format. Zero fields need not be specified: [::20], [:20], [20], [20.], etc, would be interpreted as twenty seconds, [10:] would be ten minutes, [.30] would be thirty sectors (75 sectors per second). When only a single offset is supplied, it is interpreted as a starting offset and ripping will continue to the end of he track. If a single offset is preceeded or followed by a hyphen, the implicit missing offset is taken to be the start or end of the disc, respectively. Thus: 1:[20.35] Specifies ripping from track 1, second 20, sector 35 to the end of track 1. 1:[20.35]- Specifies ripping from 1[20.35] to the end of the disc -2 Specifies ripping from the beginning of the disc up to (and including) track 2 -2:[30.35] Specifies ripping from the beginning of the disc up to 2:[30.35] 2-4 Specifies ripping from the beginning of track two to the end of track 4. Don't forget to protect square brackets and preceeding hyphens from the shell... A few examples, protected from the shell: A) query only with exhaustive search for a drive and full reporting of autosense: @CDPARANOIA_NAME@ -vsQ B) extract up to and including track 3, putting each track in a separate file: @CDPARANOIA_NAME@ -B -- "-3" C) extract from track 1, time 0:30.12 to 1:10.00: @CDPARANOIA_NAME@ "[:30.12]-1[1:10]" Submit bug reports to bug-libcdio@gnu.org libcdio-0.83/src/cd-paranoia/utils.h0000644000175000017500000000214611114145233014246 00000000000000/* $Id: utils.h,v 1.5 2008/04/11 15:44:00 karl Exp $ Copyright (C) 2004, 2005, 2008 Rocky Bernstein Copyright (C) 1998 Monty This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include #include #include #define copystring(s) (s) ? s : NULL; static inline char * catstring(char *buff, const char *s) { if(s){ if(buff) buff=realloc(buff,strlen(buff)+strlen(s)+1); else buff=calloc(strlen(s)+1,1); strcat(buff,s); } return(buff); } libcdio-0.83/src/cd-paranoia/report.h0000644000175000017500000000147611114145233014426 00000000000000/* Copyright (C) 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ extern void report(const char *s); extern void report2(const char *s, char *s2); extern void report3(const char *s, char *s2, char *s3); libcdio-0.83/src/cd-paranoia/buffering_write.h0000644000175000017500000000220411114145233016262 00000000000000/* $Id: buffering_write.h,v 1.4 2008/06/19 15:44:30 flameeyes Exp $ Copyright (C) 2004, 2008 Rocky Bernstein Copyright (C) 1998 Monty This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** buffering_write() - buffers data to a specified size before writing. * * Restrictions: * - MUST CALL BUFFERING_CLOSE() WHEN FINISHED!!! * */ extern long buffering_write(int outf, char *buffer, long num); /** buffering_close() - writes out remaining buffered data before * closing file. * */ extern int buffering_close(int fd); libcdio-0.83/src/cd-paranoia/version.h0000644000175000017500000000237011114145233014572 00000000000000/* $Id: version.h,v 1.6 2008/04/11 15:44:00 karl Exp $ Copyright (C) 2004, 2005, 2008 Rocky Bernstein Copyright (C) 2001 Monty This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /****************************************************************** * cdda_paranoia generation III release 9.8 libcdio ******************************************************************/ #include #define PARANOIA_VERSION \ "cdparanoia III release 9.8 libcdio " CDIO_VERSION "\n" \ "(C) 2001 Monty and Xiphophorus\n" \ "(C) 2004, 2005, 2008 Rocky Bernstein \n\n" \ "Report bugs to bug-libcdio@gnu.org\n" libcdio-0.83/src/cd-paranoia/report.c0000644000175000017500000000303411650126417014421 00000000000000/* Copyright (C) 2004, 2008, 2010, 2011 Rocky Bernstein Copyright (C) 1998 Monty xiphmont@mit.edu This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /****************************************************************** * * reporting/logging routines * ******************************************************************/ /* config.h has to come first else _FILE_OFFSET_BITS are redefined in say opensolaris. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #include "report.h" int quiet=0; int verbose=CDDA_MESSAGE_FORGETIT; void report(const char *s) { if (!quiet) { fprintf(stderr, "%s", s); fputc('\n',stderr); } } void report2(const char *s, char *s2) { if (!quiet) { fprintf(stderr,s,s2); fputc('\n',stderr); } } void report3(const char *s, char *s2, char *s3) { if (!quiet) { fprintf(stderr,s,s2,s3); fputc('\n',stderr); } } libcdio-0.83/src/cd-paranoia/getopt.c0000644000175000017500000007272011114145233014410 00000000000000/* Getopt for GNU. NOTE: getopt is now part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to drepper@gnu.org before changing it! Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@gnu.org. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This tells Alpha OSF/1 not to define a getopt prototype in . Ditto for AIX 3.2 and . */ #ifndef _NO_PROTO # define _NO_PROTO #endif #ifdef HAVE_CONFIG_H # include #endif #if !defined __STDC__ || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ # ifndef const # define const # endif #endif #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #define GETOPT_INTERFACE_VERSION 2 #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 # include # if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION # define ELIDE_CODE # endif #endif #ifndef ELIDE_CODE /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ /* Don't include stdlib.h for non-GNU C libraries because some of them contain conflicting prototypes for getopt. */ # include # include #endif /* GNU C library. */ #ifdef VMS # include # if HAVE_STRING_H - 0 # include # endif #endif #ifndef _ /* This is for other GNU distributions with internationalized messages. When compiling libc, the _ macro is predefined. */ # ifdef HAVE_LIBINTL_H # include # define _(msgid) gettext (msgid) # else # define _(msgid) (msgid) # endif #endif /* This version of `getopt' appears to the caller like standard Unix `getopt' but it behaves differently for the user, since it allows the user to intersperse the options with the other arguments. As `getopt' works, it permutes the elements of ARGV so that, when it is done, all the options precede everything else. Thus all application programs are extended to handle flexible argument order. Setting the environment variable POSIXLY_CORRECT disables permutation. Then the behavior is completely standard. GNU application programs can use a third alternative mode in which they can distinguish the relative order of options and other arguments. */ #include "getopt.h" /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ char *optarg = NULL; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ /* 1003.2 says this must be 1 before any call. */ int optind = 1; /* Formerly, initialization of getopt depended on optind==0, which causes problems with re-calling getopt as programs generally don't know that. */ int __getopt_initialized = 0; /* The next char to be scanned in the option-element in which the last option character we returned was found. This allows us to pick up the scan where we left off. If this is zero, or a null string, it means resume the scan by advancing to the next ARGV-element. */ static char *nextchar; /* Callers store zero here to inhibit the error message for unrecognized options. */ int opterr = 1; /* Set to an option character which was unrecognized. This must be initialized on some systems to avoid linking in the system's own getopt implementation. */ int optopt = '?'; /* Describe how to deal with options that follow non-option ARGV-elements. If the caller did not specify anything, the default is REQUIRE_ORDER if the environment variable POSIXLY_CORRECT is defined, PERMUTE otherwise. REQUIRE_ORDER means don't recognize them as options; stop option processing when the first non-option is seen. This is what Unix does. This mode of operation is selected by either setting the environment variable POSIXLY_CORRECT, or using `+' as the first character of the list of option characters. PERMUTE is the default. We permute the contents of ARGV as we scan, so that eventually all the non-options are at the end. This allows options to be given in any order, even with programs that were not written to expect this. RETURN_IN_ORDER is an option available to programs that were written to expect options and other ARGV-elements in any order and that care about the ordering of the two. We describe each non-option ARGV-element as if it were the argument of an option with character code 1. Using `-' as the first character of the list of option characters selects this mode of operation. The special argument `--' forces an end of option-scanning regardless of the value of `ordering'. In the case of RETURN_IN_ORDER, only `--' can cause `getopt' to return -1 with `optind' != ARGC. */ static enum { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } ordering; /* Value of POSIXLY_CORRECT environment variable. */ static char *posixly_correct; #ifdef __GNU_LIBRARY__ /* We want to avoid inclusion of string.h with non-GNU libraries because there are many ways it can cause trouble. On some systems, it contains special magic macros that don't work in GCC. */ # include # define my_index strchr #else # if HAVE_STRING_H # include # else # if HAVE_STRINGS_H # include # endif # endif /* Avoid depending on library functions or files whose names are inconsistent. */ #ifndef getenv extern char *getenv (); #endif static char * my_index (str, chr) const char *str; int chr; { while (*str) { if (*str == chr) return (char *) str; str++; } return 0; } /* If using GCC, we can safely declare strlen this way. If not using GCC, it is ok not to declare it. */ #ifdef __GNUC__ /* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. That was relevant to code that was here before. */ # if (!defined __STDC__ || !__STDC__) && !defined strlen /* gcc with -traditional declares the built-in strlen to return int, and has done so at least since version 2.4.5. -- rms. */ extern int strlen (const char *); # endif /* not __STDC__ */ #endif /* __GNUC__ */ #endif /* not __GNU_LIBRARY__ */ /* Handle permutation of arguments. */ /* Describe the part of ARGV that contains non-options that have been skipped. `first_nonopt' is the index in ARGV of the first of them; `last_nonopt' is the index after the last of them. */ static int first_nonopt; static int last_nonopt; #ifdef _LIBC /* Bash 2.0 gives us an environment variable containing flags indicating ARGV elements that should not be considered arguments. */ /* Defined in getopt_init.c */ extern char *__getopt_nonoption_flags; static int nonoption_flags_max_len; static int nonoption_flags_len; static int original_argc; static char *const *original_argv; /* Make sure the environment variable bash 2.0 puts in the environment is valid for the getopt call we must make sure that the ARGV passed to getopt is that one passed to the process. */ static void __attribute__ ((unused)) store_args_and_env (int argc, char *const *argv) { /* XXX This is no good solution. We should rather copy the args so that we can compare them later. But we must not use malloc(3). */ original_argc = argc; original_argv = argv; } # ifdef text_set_element text_set_element (__libc_subinit, store_args_and_env); # endif /* text_set_element */ # define SWAP_FLAGS(ch1, ch2) \ if (nonoption_flags_len > 0) \ { \ char __tmp = __getopt_nonoption_flags[ch1]; \ __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ __getopt_nonoption_flags[ch2] = __tmp; \ } #else /* !_LIBC */ # define SWAP_FLAGS(ch1, ch2) #endif /* _LIBC */ /* Exchange two adjacent subsequences of ARGV. One subsequence is elements [first_nonopt,last_nonopt) which contains all the non-options that have been skipped so far. The other is elements [last_nonopt,optind), which contains all the options processed since those non-options were skipped. `first_nonopt' and `last_nonopt' are relocated so that they describe the new indices of the non-options in ARGV after they are moved. */ #if defined __STDC__ && __STDC__ static void exchange (char **); #endif static void exchange (argv) char **argv; { int bottom = first_nonopt; int middle = last_nonopt; int top = optind; char *tem; /* Exchange the shorter segment with the far end of the longer segment. That puts the shorter segment into the right place. It leaves the longer segment in the right place overall, but it consists of two parts that need to be swapped next. */ #ifdef _LIBC /* First make sure the handling of the `__getopt_nonoption_flags' string can work normally. Our top argument must be in the range of the string. */ if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len) { /* We must extend the array. The user plays games with us and presents new arguments. */ char *new_str = malloc (top + 1); if (new_str == NULL) nonoption_flags_len = nonoption_flags_max_len = 0; else { memset (__mempcpy (new_str, __getopt_nonoption_flags, nonoption_flags_max_len), '\0', top + 1 - nonoption_flags_max_len); nonoption_flags_max_len = top + 1; __getopt_nonoption_flags = new_str; } } #endif while (top > middle && middle > bottom) { if (top - middle > middle - bottom) { /* Bottom segment is the short one. */ int len = middle - bottom; register int i; /* Swap it with the top part of the top segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[top - (middle - bottom) + i]; argv[top - (middle - bottom) + i] = tem; SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); } /* Exclude the moved bottom segment from further swapping. */ top -= len; } else { /* Top segment is the short one. */ int len = top - middle; register int i; /* Swap it with the bottom part of the bottom segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[middle + i]; argv[middle + i] = tem; SWAP_FLAGS (bottom + i, middle + i); } /* Exclude the moved top segment from further swapping. */ bottom += len; } } /* Update records for the slots the non-options now occupy. */ first_nonopt += (optind - last_nonopt); last_nonopt = optind; } /* Initialize the internal data when the first call is made. */ #if defined __STDC__ && __STDC__ static const char *_getopt_initialize (int, char *const *, const char *); #endif static const char * _getopt_initialize (argc, argv, optstring) int argc; char *const *argv; const char *optstring; { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped non-option ARGV-elements is empty. */ first_nonopt = last_nonopt = optind; nextchar = NULL; posixly_correct = getenv ("POSIXLY_CORRECT"); /* Determine how to handle the ordering of options and nonoptions. */ if (optstring[0] == '-') { ordering = RETURN_IN_ORDER; ++optstring; } else if (optstring[0] == '+') { ordering = REQUIRE_ORDER; ++optstring; } else if (posixly_correct != NULL) ordering = REQUIRE_ORDER; else ordering = PERMUTE; #ifdef _LIBC if (posixly_correct == NULL && argc == original_argc && argv == original_argv) { if (nonoption_flags_max_len == 0) { if (__getopt_nonoption_flags == NULL || __getopt_nonoption_flags[0] == '\0') nonoption_flags_max_len = -1; else { const char *orig_str = __getopt_nonoption_flags; int len = nonoption_flags_max_len = strlen (orig_str); if (nonoption_flags_max_len < argc) nonoption_flags_max_len = argc; __getopt_nonoption_flags = (char *) malloc (nonoption_flags_max_len); if (__getopt_nonoption_flags == NULL) nonoption_flags_max_len = -1; else memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), '\0', nonoption_flags_max_len - len); } } nonoption_flags_len = nonoption_flags_max_len; } else nonoption_flags_len = 0; #endif return optstring; } /* Scan elements of ARGV (whose length is ARGC) for option characters given in OPTSTRING. If an element of ARGV starts with '-', and is not exactly "-" or "--", then it is an option element. The characters of this element (aside from the initial '-') are option characters. If `getopt' is called repeatedly, it returns successively each of the option characters from each of the option elements. If `getopt' finds another option character, it returns that character, updating `optind' and `nextchar' so that the next call to `getopt' can resume the scan with the following option character or ARGV-element. If there are no more option characters, `getopt' returns -1. Then `optind' is the index in ARGV of the first ARGV-element that is not an option. (The ARGV-elements have been permuted so that those that are not options now come last.) OPTSTRING is a string containing the legitimate option characters. If an option character is seen that is not listed in OPTSTRING, return '?' after printing an error message. If you set `opterr' to zero, the error message is suppressed but we still return '?'. If a char in OPTSTRING is followed by a colon, that means it wants an arg, so the following text in the same ARGV-element, or the text of the following ARGV-element, is returned in `optarg'. Two colons mean an option that wants an optional arg; if there is text in the current ARGV-element, it is returned in `optarg', otherwise `optarg' is set to zero. If OPTSTRING starts with `-' or `+', it requests different methods of handling the non-option ARGV-elements. See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. Long-named options begin with `--' instead of `-'. Their names may be abbreviated as long as the abbreviation is unique or is an exact match for some defined option. If they have an argument, it follows the option name in the same ARGV-element, separated from the option name by a `=', or else the in next ARGV-element. When `getopt' finds a long-named option, it returns 0 if that option's `flag' field is nonzero, the value of the option's `val' field if the `flag' field is zero. The elements of ARGV aren't really const, because we permute them. But we pretend they're const in the prototype to be compatible with other systems. LONGOPTS is a vector of `struct option' terminated by an element containing a name which is zero. LONGIND returns the index in LONGOPT of the long-named option found. It is only valid when a long-named option has been found by the most recent call. If LONG_ONLY is nonzero, '-' as well as '--' can introduce long-named options. */ int _getopt_internal (argc, argv, optstring, longopts, longind, long_only) int argc; char *const *argv; const char *optstring; const struct option *longopts; int *longind; int long_only; { optarg = NULL; if (optind == 0 || !__getopt_initialized) { if (optind == 0) optind = 1; /* Don't scan ARGV[0], the program name. */ optstring = _getopt_initialize (argc, argv, optstring); __getopt_initialized = 1; } /* Test whether ARGV[optind] points to a non-option argument. Either it does not have option syntax, or there is an environment flag from the shell indicating it is not an option. The later information is only used when the used in the GNU libc. */ #ifdef _LIBC # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \ || (optind < nonoption_flags_len \ && __getopt_nonoption_flags[optind] == '1')) #else # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0') #endif if (nextchar == NULL || *nextchar == '\0') { /* Advance to the next ARGV-element. */ /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been moved back by the user (who may also have changed the arguments). */ if (last_nonopt > optind) last_nonopt = optind; if (first_nonopt > optind) first_nonopt = optind; if (ordering == PERMUTE) { /* If we have just processed some options following some non-options, exchange them so that the options come first. */ if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (last_nonopt != optind) first_nonopt = optind; /* Skip any additional non-options and extend the range of non-options previously skipped. */ while (optind < argc && NONOPTION_P) optind++; last_nonopt = optind; } /* The special ARGV-element `--' means premature end of options. Skip it like a null option, then exchange with previous non-options as if it were an option, then skip everything else like a non-option. */ if (optind != argc && !strcmp (argv[optind], "--")) { optind++; if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (first_nonopt == last_nonopt) first_nonopt = optind; last_nonopt = argc; optind = argc; } /* If we have done all the ARGV-elements, stop the scan and back over any non-options that we skipped and permuted. */ if (optind == argc) { /* Set the next-arg-index to point at the non-options that we previously skipped, so the caller will digest them. */ if (first_nonopt != last_nonopt) optind = first_nonopt; return -1; } /* If we have come to a non-option and did not permute it, either stop the scan or describe it to the caller and pass it by. */ if (NONOPTION_P) { if (ordering == REQUIRE_ORDER) return -1; optarg = argv[optind++]; return 1; } /* We have found another option-ARGV-element. Skip the initial punctuation. */ nextchar = (argv[optind] + 1 + (longopts != NULL && argv[optind][1] == '-')); } /* Decode the current option-ARGV-element. */ /* Check whether the ARGV-element is a long option. If long_only and the ARGV-element has the form "-f", where f is a valid short option, don't consider it an abbreviated form of a long option that starts with f. Otherwise there would be no way to give the -f short option. On the other hand, if there's a long option "fubar" and the ARGV-element is "-fu", do consider that an abbreviation of the long option, just like "--fu", and not "-f" with arg "u". This distinction seems to be the most useful approach. */ if (longopts != NULL && (argv[optind][1] == '-' || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1]))))) { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = -1; int option_index; for (nameend = nextchar; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, nextchar, nameend - nextchar)) { if ((unsigned int) (nameend - nextchar) == (unsigned int) strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (opterr) fprintf (stderr, _("%s: option `%s' is ambiguous\n"), argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; optopt = 0; return '?'; } if (pfound != NULL) { option_index = indfound; optind++; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) optarg = nameend + 1; else { if (opterr) { if (argv[optind - 1][1] == '-') /* --option */ fprintf (stderr, _("%s: option `--%s' doesn't allow an argument\n"), argv[0], pfound->name); else /* +option or -option */ fprintf (stderr, _("%s: option `%c%s' doesn't allow an argument\n"), argv[0], argv[optind - 1][0], pfound->name); nextchar += strlen (nextchar); optopt = pfound->val; return '?'; } } } else if (pfound->has_arg == 1) { if (optind < argc) optarg = argv[optind++]; else { if (opterr) fprintf (stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[optind - 1]); nextchar += strlen (nextchar); optopt = pfound->val; return optstring[0] == ':' ? ':' : '?'; } } nextchar += strlen (nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } /* Can't find it as a long option. If this is not getopt_long_only, or the option starts with '--' or is not a valid short option, then it's an error. Otherwise interpret it as a short option. */ if (!long_only || argv[optind][1] == '-' || my_index (optstring, *nextchar) == NULL) { if (opterr) { if (argv[optind][1] == '-') /* --option */ fprintf (stderr, _("%s: unrecognized option `--%s'\n"), argv[0], nextchar); else /* +option or -option */ fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), argv[0], argv[optind][0], nextchar); } nextchar = (char *) ""; optind++; optopt = 0; return '?'; } } /* Look at and handle the next short option-character. */ { char c = *nextchar++; char *temp = my_index (optstring, c); /* Increment `optind' when we start to process its last character. */ if (*nextchar == '\0') ++optind; if (temp == NULL || c == ':') { if (opterr) { if (posixly_correct) /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c); else fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c); } optopt = c; return '?'; } /* Convenience. Treat POSIX -W foo same as long option --foo */ if (temp[0] == 'W' && temp[1] == ';') { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = 0; int option_index; /* This is an option that requires an argument. */ if (*nextchar != '\0') { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == argc) { if (opterr) { /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); } optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; return c; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = argv[optind++]; /* optarg is now the argument, see if it's in the table of longopts. */ for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, nextchar, nameend - nextchar)) { if ((unsigned int) (nameend - nextchar) == strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (opterr) fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; return '?'; } if (pfound != NULL) { option_index = indfound; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) optarg = nameend + 1; else { if (opterr) fprintf (stderr, _("\ %s: option `-W %s' doesn't allow an argument\n"), argv[0], pfound->name); nextchar += strlen (nextchar); return '?'; } } else if (pfound->has_arg == 1) { if (optind < argc) optarg = argv[optind++]; else { if (opterr) fprintf (stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[optind - 1]); nextchar += strlen (nextchar); return optstring[0] == ':' ? ':' : '?'; } } nextchar += strlen (nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } nextchar = NULL; return 'W'; /* Let the application handle it. */ } if (temp[1] == ':') { if (temp[2] == ':') { /* This is an option that accepts an argument optionally. */ if (*nextchar != '\0') { optarg = nextchar; optind++; } else optarg = NULL; nextchar = NULL; } else { /* This is an option that requires an argument. */ if (*nextchar != '\0') { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == argc) { if (opterr) { /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); } optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = argv[optind++]; nextchar = NULL; } } return c; } } int getopt (argc, argv, optstring) int argc; char *const *argv; const char *optstring; { return _getopt_internal (argc, argv, optstring, (const struct option *) 0, (int *) 0, 0); } #endif /* Not ELIDE_CODE. */ #ifdef TEST /* Compile with -DTEST to make an executable for use in testing the above definition of `getopt'. */ int main (argc, argv) int argc; char **argv; { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; c = getopt (argc, argv, "abc:d:0123456789"); if (c == -1) break; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value `%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ libcdio-0.83/src/cd-paranoia/getopt1.c0000644000175000017500000001071211114145233014462 00000000000000/* getopt_long and getopt_long_only entry points for GNU getopt. Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@gnu.org. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include #endif #include "getopt.h" #if !defined __STDC__ || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ #ifndef const #define const #endif #endif #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #define GETOPT_INTERFACE_VERSION 2 #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 #include #if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION #define ELIDE_CODE #endif #endif #ifndef ELIDE_CODE /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ #include #endif #ifndef NULL #define NULL 0 #endif int getopt_long (argc, argv, options, long_options, opt_index) int argc; char *const *argv; const char *options; const struct option *long_options; int *opt_index; { return _getopt_internal (argc, argv, options, long_options, opt_index, 0); } /* Like getopt_long, but '-' as well as '--' can indicate a long option. If an option that starts with '-' (not '--') doesn't match a long option, but does match a short option, it is parsed as a short option instead. */ int getopt_long_only (argc, argv, options, long_options, opt_index) int argc; char *const *argv; const char *options; const struct option *long_options; int *opt_index; { return _getopt_internal (argc, argv, options, long_options, opt_index, 1); } #endif /* Not ELIDE_CODE. */ #ifdef TEST #include int main (argc, argv) int argc; char **argv; { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; int option_index = 0; static struct option long_options[] = { {"add", 1, 0, 0}, {"append", 0, 0, 0}, {"delete", 1, 0, 0}, {"verbose", 0, 0, 0}, {"create", 0, 0, 0}, {"file", 1, 0, 0}, {0, 0, 0, 0} }; c = getopt_long (argc, argv, "abc:d:0123456789", long_options, &option_index); if (c == -1) break; switch (c) { case 0: printf ("option %s", long_options[option_index].name); if (optarg) printf (" with arg %s", optarg); printf ("\n"); break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value `%s'\n", optarg); break; case 'd': printf ("option d with value `%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ libcdio-0.83/src/cd-paranoia/buffering_write.c0000644000175000017500000000540411114145233016262 00000000000000/* $Id: buffering_write.c,v 1.4 2008/06/19 15:44:28 flameeyes Exp $ Copyright (C) 2004, 2008 Rocky Bernstein Copyright (C) 1998, 1999 Monty This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Eliminate teeny little writes. patch submitted by Rob Ross --Monty 19991008 */ #include #include #include #include #define OUTBUFSZ 32*1024 #include "utils.h" #include "buffering_write.h" /* GLOBALS FOR BUFFERING CALLS */ static int bw_fd = -1; static long bw_pos = 0; static char bw_outbuf[OUTBUFSZ]; static long int blocking_write(int outf, char *buffer, long num){ long int words=0,temp; while(words= 0 && bw_pos > 0) { if (blocking_write(bw_fd, bw_outbuf, bw_pos)) { perror("write (in buffering_write, flushing)"); } } bw_fd = fd; bw_pos = 0; } if (bw_pos + num > OUTBUFSZ) { /* fill our buffer first, then write, then modify buffer and num */ memcpy(&bw_outbuf[bw_pos], buffer, OUTBUFSZ - bw_pos); if (blocking_write(fd, bw_outbuf, OUTBUFSZ)) { perror("write (in buffering_write, full buffer)"); return(-1); } num -= (OUTBUFSZ - bw_pos); buffer += (OUTBUFSZ - bw_pos); bw_pos = 0; } /* save data */ memcpy(&bw_outbuf[bw_pos], buffer, num); bw_pos += num; return(0); } /** buffering_close() - writes out remaining buffered data before * closing file. * */ int buffering_close(int fd) { if (fd == bw_fd && bw_pos > 0) { /* write out remaining data and clean up */ if (blocking_write(fd, bw_outbuf, bw_pos)) { perror("write (in buffering_close)"); } bw_fd = -1; bw_pos = 0; } return(close(fd)); } libcdio-0.83/src/cd-paranoia/Makefile.in0000644000175000017500000006322611652210027015011 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 2004, 2005, 2006, 2007, 2008, # Rocky Bernstein # Copyright (C) 1998 Monty xiphmont@mit.edu # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @BUILD_CD_PARANOIA_TRUE@bin_PROGRAMS = cd-paranoia$(EXEEXT) subdir = src/cd-paranoia DIST_COMMON = $(am__noinst_HEADERS_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/usage.txt.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = usage.txt CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am__cd_paranoia_SOURCES_DIST = cd-paranoia.c buffering_write.c \ buffering_write.h header.c report.c utils.h version.h \ getopt1.c getopt.c @BUILD_CD_PARANOIA_TRUE@am__objects_1 = getopt1.$(OBJEXT) \ @BUILD_CD_PARANOIA_TRUE@ getopt.$(OBJEXT) @BUILD_CD_PARANOIA_TRUE@am_cd_paranoia_OBJECTS = \ @BUILD_CD_PARANOIA_TRUE@ cd-paranoia.$(OBJEXT) \ @BUILD_CD_PARANOIA_TRUE@ buffering_write.$(OBJEXT) \ @BUILD_CD_PARANOIA_TRUE@ header.$(OBJEXT) report.$(OBJEXT) \ @BUILD_CD_PARANOIA_TRUE@ $(am__objects_1) cd_paranoia_OBJECTS = $(am_cd_paranoia_OBJECTS) am__DEPENDENCIES_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(cd_paranoia_SOURCES) DIST_SOURCES = $(am__cd_paranoia_SOURCES_DIST) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__noinst_HEADERS_DIST = header.h report.h HEADERS = $(noinst_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = doc DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" transform = s,cd-paranoia,@CDPARANOIA_NAME@, ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDDA_PLAYER_LIBS = @CDDA_PLAYER_LIBS@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CDPARANOIA_NAME = @CDPARANOIA_NAME@ CFLAGS = @CFLAGS@ CMP = @CMP@ COS_LIB = @COS_LIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_PKG_LIB_HACK = @DARWIN_PKG_LIB_HACK@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ DIFF_OPTS = @DIFF_OPTS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GIT2CL = @GIT2CL@ GREP = @GREP@ HAVE_BSDI_CDROM = @HAVE_BSDI_CDROM@ HAVE_DARWIN_CDROM = @HAVE_DARWIN_CDROM@ HAVE_FREEBSD_CDROM = @HAVE_FREEBSD_CDROM@ HAVE_JOLIET = @HAVE_JOLIET@ HAVE_LINUX_CDROM = @HAVE_LINUX_CDROM@ HAVE_OS2_CDROM = @HAVE_OS2_CDROM@ HAVE_ROCK = @HAVE_ROCK@ HAVE_SOLARIS_CDROM = @HAVE_SOLARIS_CDROM@ HAVE_WIN32_CDROM = @HAVE_WIN32_CDROM@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDIOPP_LIBS = @LIBCDIOPP_LIBS@ LIBCDIO_CDDA_LIBS = @LIBCDIO_CDDA_LIBS@ LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ LIBCDIO_DEPS = @LIBCDIO_DEPS@ LIBCDIO_LIBS = @LIBCDIO_LIBS@ LIBCDIO_PARANOIA_LIBS = @LIBCDIO_PARANOIA_LIBS@ LIBCDIO_SOURCE_PATH = @LIBCDIO_SOURCE_PATH@ LIBCDIO_VERSION_NUM = @LIBCDIO_VERSION_NUM@ LIBICONV = @LIBICONV@ LIBISO9660PP_LIBS = @LIBISO9660PP_LIBS@ LIBISO9660_CFLAGS = @LIBISO9660_CFLAGS@ LIBISO9660_LIBS = @LIBISO9660_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBUDF_LIBS = @LIBUDF_LIBS@ LINUX_CDROM_TIMEOUT = @LINUX_CDROM_TIMEOUT@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_NO_UNDEFINED = @LT_NO_UNDEFINED@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OLD_CDPARANOIA = @OLD_CDPARANOIA@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SBPCD_H = @SBPCD_H@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TYPESIZES = @TYPESIZES@ UCDROM_H = @UCDROM_H@ VCDINFO_CFLAGS = @VCDINFO_CFLAGS@ VCDINFO_LIBS = @VCDINFO_LIBS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @BUILD_CD_PARANOIA_TRUE@SUBDIRS = doc @BUILD_CD_PARANOIA_TRUE@GETOPT_C = getopt1.c getopt.c @BUILD_CD_PARANOIA_TRUE@EXTRA_DIST = usage.txt.in usage-copy.h pod2c.pl \ @BUILD_CD_PARANOIA_TRUE@ doc/FAQ.txt doc/overlapdef.txt $(GETOPT_C) getopt.h @BUILD_CD_PARANOIA_TRUE@noinst_HEADERS = header.h report.h $(GETOPT_H) @BUILD_CD_PARANOIA_TRUE@cd_paranoia_SOURCES = cd-paranoia.c \ @BUILD_CD_PARANOIA_TRUE@ buffering_write.c buffering_write.h \ @BUILD_CD_PARANOIA_TRUE@ header.c report.c utils.h version.h $(GETOPT_C) @BUILD_CD_PARANOIA_TRUE@cd_paranoia_LDADD = $(LIBCDIO_LIBS) $(LIBCDIO_CDDA_LIBS) $(LIBCDIO_PARANOIA_LIBS) $(LTLIBICONV) @BUILD_CD_PARANOIA_TRUE@cd_paranoia_DEPENDENCIES = $(LIBCDIO_DEPS) $(LIBCDIO_CDDA_LIBS) $(LIBCDIO_PARANOIA_LIBS) @BUILD_CD_PARANOIA_TRUE@INCLUDES = -I$(top_srcdir) $(LIBCDIO_CFLAGS) MOSTLYCLEANFILES = usage.h usage.txt all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/cd-paranoia/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/cd-paranoia/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): usage.txt: $(top_builddir)/config.status $(srcdir)/usage.txt.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list cd-paranoia$(EXEEXT): $(cd_paranoia_OBJECTS) $(cd_paranoia_DEPENDENCIES) @rm -f cd-paranoia$(EXEEXT) $(LINK) $(cd_paranoia_OBJECTS) $(cd_paranoia_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffering_write.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cd-paranoia.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/header.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/report.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(PROGRAMS) $(HEADERS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags ctags-recursive distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am \ uninstall-binPROGRAMS @BUILD_CD_PARANOIA_TRUE@cd-paranoia.$(OBJEXT): usage.h #: create header file used in help text: the "usage" help. @BUILD_CD_PARANOIA_TRUE@@HAVE_PERL_TRUE@usage.h: usage.txt $(srcdir)/pod2c.pl @BUILD_CD_PARANOIA_TRUE@@HAVE_PERL_TRUE@ $(PERL) $(srcdir)/pod2c.pl usage.txt >usage.h @BUILD_CD_PARANOIA_TRUE@@HAVE_PERL_FALSE@usage.h: usage-copy.h @BUILD_CD_PARANOIA_TRUE@@HAVE_PERL_FALSE@ cp usage-copy.h $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libcdio-0.83/src/util.c0000644000175000017500000004305311642541560011713 00000000000000/* Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Miscellaneous things common to standalone programs. */ #include "util.h" #include #include #ifdef HAVE_SYS_STAT_H # include #endif #ifndef HAVE_S_ISLNK # define S_ISLNK(s) ((void)s,0) #endif #ifndef HAVE_S_ISSOCK # define S_ISSOCK(s) ((void)s,0) #endif cdio_log_handler_t gl_default_cdio_log_handler = NULL; char *source_name = NULL; char *program_name; void myexit(CdIo_t *cdio, int rc) { if (NULL != cdio) cdio_destroy(cdio); if (NULL != program_name) free(program_name); if (NULL != source_name) free(source_name); exit(rc); } void print_version (char *program_name, const char *version, int no_header, bool version_only) { if (no_header == 0) { report( stdout, "%s version %s\nCopyright (c) 2003, 2004, 2005, 2007, 2008, 2011 R. Bernstein\n", program_name, version); report( stdout, _("This is free software; see the source for copying conditions.\n\ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\ PARTICULAR PURPOSE.\n\ ")); } if (version_only) { char *default_device; const driver_id_t *driver_id_p; for (driver_id_p=cdio_drivers; *driver_id_p!=DRIVER_UNKNOWN; driver_id_p++) { if (cdio_have_driver(*driver_id_p)) { report( stdout, "Have driver: %s\n", cdio_driver_describe(*driver_id_p)); } } default_device=cdio_get_default_device(NULL); if (default_device) report( stdout, "Default CD-ROM device: %s\n", default_device); else report( stdout, "No CD-ROM device found.\n"); free(program_name); exit(EXIT_INFO); } } /*! Device input routine. If successful we return an open CdIo_t pointer. On error the program exits. */ CdIo_t * open_input(const char *psz_source, source_image_t source_image, const char *psz_access_mode) { CdIo_t *p_cdio = NULL; switch (source_image) { case INPUT_UNKNOWN: case INPUT_AUTO: p_cdio = cdio_open_am (psz_source, DRIVER_UNKNOWN, psz_access_mode); if (!p_cdio) { if (psz_source) { err_exit("Error in automatically selecting driver for input %s.\n", psz_source); } else { err_exit("%s", "Error in automatically selecting driver.\n"); } } break; case INPUT_DEVICE: p_cdio = cdio_open_am (psz_source, DRIVER_DEVICE, psz_access_mode); if (!p_cdio) { if (psz_source) { err_exit("Cannot use CD-ROM device %s. Is a CD loaded?\n", psz_source); } else { err_exit("%s", "Cannot find a CD-ROM with a CD loaded.\n"); } } break; case INPUT_BIN: p_cdio = cdio_open_am (psz_source, DRIVER_BINCUE, psz_access_mode); if (!p_cdio) { if (psz_source) { err_exit("%s: Error in opening CDRWin BIN/CUE image for BIN" " input %s\n", psz_source); } else { err_exit("%s", "Cannot find CDRWin BIN/CUE image.\n"); } } break; case INPUT_CUE: p_cdio = cdio_open_cue(psz_source); if (p_cdio==NULL) { if (psz_source) { err_exit("%s: Error in opening CDRWin BIN/CUE image for CUE" " input %s\n", psz_source); } else { err_exit("%s", "Cannot find CDRWin BIN/CUE image.\n"); } } break; case INPUT_NRG: p_cdio = cdio_open_am (psz_source, DRIVER_NRG, psz_access_mode); if (p_cdio==NULL) { if (psz_source) { err_exit("Error in opening Nero NRG image for input %s\n", psz_source); } else { err_exit("%s", "Cannot find Nero NRG image.\n"); } } break; case INPUT_CDRDAO: p_cdio = cdio_open_am (psz_source, DRIVER_CDRDAO, psz_access_mode); if (p_cdio==NULL) { if (psz_source) { err_exit("Error in opening cdrdao TOC with input %s.\n", psz_source); } else { err_exit("%s", "Cannot find cdrdao TOC image.\n"); } } break; } return p_cdio; } #define DEV_PREFIX "/dev/" char * fillout_device_name(const char *device_name) { #if defined(HAVE_WIN32_CDROM) || defined(HAVE_OS2_CDROM) return strdup(device_name); #else unsigned int prefix_len = strlen(DEV_PREFIX); if (!device_name) return NULL; if (0 == strncmp(device_name, DEV_PREFIX, prefix_len)) return strdup(device_name); else { char *full_device_name = (char*) calloc(1, strlen(device_name)+prefix_len); report( stdout, full_device_name, DEV_PREFIX "%s", device_name); return full_device_name; } #endif } /*! Prints out SCSI-MMC drive features */ void print_mmc_drive_features(CdIo_t *p_cdio) { int i_status; /* Result of SCSI MMC command */ uint8_t buf[500] = { 0, }; /* Place to hold returned data */ mmc_cdb_t cdb = {{0, }}; /* Command Descriptor Block */ CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_GET_CONFIGURATION); CDIO_MMC_SET_READ_LENGTH8(cdb.field, sizeof(buf)); cdb.field[1] = CDIO_MMC_GET_CONF_ALL_FEATURES; cdb.field[3] = 0x0; i_status = mmc_run_cmd(p_cdio, 0, &cdb, SCSI_MMC_DATA_READ, sizeof(buf), &buf); if (i_status == 0) { uint8_t *p; uint32_t i_data; uint8_t *p_max = buf + 65530; i_data = (unsigned int) CDIO_MMC_GET_LEN32(buf); /* set to first sense feature code, and then walk through the masks */ p = buf + 8; while( (p < &(buf[i_data])) && (p < p_max) ) { uint16_t i_feature; uint8_t i_feature_additional = p[3]; i_feature = CDIO_MMC_GET_LEN16(p); { uint8_t *q; const char *feature_str = mmc_feature2str(i_feature); report( stdout, "%s Feature\n", feature_str); switch( i_feature ) { case CDIO_MMC_FEATURE_PROFILE_LIST: for ( q = p+4 ; q < p + i_feature_additional ; q += 4 ) { int i_profile=CDIO_MMC_GET_LEN16(q); const char *feature_profile_str = mmc_feature_profile2str(i_profile); report( stdout, "\t%s", feature_profile_str ); if (q[2] & 1) { report( stdout, " - on"); } report( stdout, "\n"); } report( stdout, "\n"); break; case CDIO_MMC_FEATURE_CORE: { uint8_t *q = p+4; uint32_t i_interface_standard = CDIO_MMC_GET_LEN32(q); switch(i_interface_standard) { case CDIO_MMC_FEATURE_INTERFACE_UNSPECIFIED: report( stdout, "\tunspecified interface\n"); break; case CDIO_MMC_FEATURE_INTERFACE_SCSI: report( stdout, "\tSCSI interface\n"); break; case CDIO_MMC_FEATURE_INTERFACE_ATAPI: report( stdout, "\tATAPI interface\n"); break; case CDIO_MMC_FEATURE_INTERFACE_IEEE_1394: report( stdout, "\tIEEE 1394 interface\n"); break; case CDIO_MMC_FEATURE_INTERFACE_IEEE_1394A: report( stdout, "\tIEEE 1394A interface\n"); break; case CDIO_MMC_FEATURE_INTERFACE_FIBRE_CH: report( stdout, "\tFibre Channel interface\n"); } report( stdout, "\n"); break; } case CDIO_MMC_FEATURE_MORPHING: report( stdout, "\tOperational Change Request/Notification %ssupported\n", (p[4] & 2) ? "": "not " ); report( stdout, "\t%synchronous GET EVENT/STATUS NOTIFICATION " "supported\n", (p[4] & 1) ? "As": "S" ); report( stdout, "\n"); break; ; case CDIO_MMC_FEATURE_REMOVABLE_MEDIUM: switch(p[4] >> 5) { case 0: report( stdout, "\tCaddy/Slot type loading mechanism\n" ); break; case 1: report( stdout, "\tTray type loading mechanism\n" ); break; case 2: report( stdout, "\tPop-up type loading mechanism\n"); break; case 4: report( stdout, "\tEmbedded changer with individually changeable discs\n"); break; case 5: report( stdout, "\tEmbedded changer using a magazine mechanism\n" ); break; default: report( stdout, "\tUnknown changer mechanism\n" ); } report( stdout, "\tcan%s eject the medium or magazine via the normal " "START/STOP command\n", (p[4] & 8) ? "": "not" ); report( stdout, "\tcan%s be locked into the Logical Unit\n", (p[4] & 1) ? "": "not" ); report( stdout, "\n" ); break; case CDIO_MMC_FEATURE_CD_READ: report( stdout, "\tC2 Error pointers are %ssupported\n", (p[4] & 2) ? "": "not " ); report( stdout, "\tCD-Text is %ssupported\n", (p[4] & 1) ? "": "not " ); report( stdout, "\n" ); break; case CDIO_MMC_FEATURE_ENHANCED_DEFECT: report( stdout, "\t%s-DRM mode is supported\n", (p[4] & 1) ? "DRT": "Persistent" ); report( stdout, "\n" ); break; case CDIO_MMC_FEATURE_CDDA_EXT_PLAY: report( stdout, "\tSCAN command is %ssupported\n", (p[4] & 4) ? "": "not "); report( stdout, "\taudio channels can %sbe muted separately\n", (p[4] & 2) ? "": "not "); report( stdout, "\taudio channels can %shave separate volume levels\n", (p[4] & 1) ? "": "not "); { uint8_t *q = p+6; uint16_t i_vol_levels = CDIO_MMC_GET_LEN16(q); report( stdout, "\t%d volume levels can be set\n", i_vol_levels ); } report( stdout, "\n"); break; case CDIO_MMC_FEATURE_DVD_CSS: #if 0 report( stdout, "\tMedium does%s have Content Scrambling (CSS/CPPM)\n", (p[2] & 1) ? "": "not " ); #endif report( stdout, "\tCSS version %d\n", p[7] ); report( stdout, "\t\n"); break; case CDIO_MMC_FEATURE_LU_SN: { uint8_t i_serial = *(p+3); char serial[257] = { '\0', }; memcpy(serial, p+4, i_serial ); report( stdout, "\t%s\n\n", serial ); break; } default: report( stdout, "\n"); break; } } p += i_feature_additional + 4; } } else { report( stdout, "Didn't get all feature codes\n"); } } /* Prints out drive capabilities */ void print_drive_capabilities(cdio_drive_read_cap_t i_read_cap, cdio_drive_write_cap_t i_write_cap, cdio_drive_misc_cap_t i_misc_cap) { if (CDIO_DRIVE_CAP_ERROR == i_misc_cap) { report( stdout, "Error in getting drive hardware properties\n"); } else if (CDIO_DRIVE_CAP_UNKNOWN == i_misc_cap) { report( stdout, "Uknown drive hardware properties\n"); } else { report( stdout, _("Hardware : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_FILE ? "Disk Image" : "CD-ROM or DVD"); report( stdout, _("Can eject : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_EJECT ? "Yes" : "No" ); report( stdout, _("Can close tray : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_CLOSE_TRAY ? "Yes" : "No" ); report( stdout, _("Can disable manual eject : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_LOCK ? "Yes" : "No" ); report( stdout, _("Can select juke-box disc : %s\n\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_SELECT_DISC ? "Yes" : "No" ); report( stdout, _("Can set drive speed : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_SELECT_SPEED ? "Yes" : "No" ); #if FIXED report( stdout, _("Can detect if CD changed : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_MEDIA_CHANGED ? "Yes" : "No" ); #endif report( stdout, _("Can read multiple sessions (e.g. PhotoCD) : %s\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_MULTI_SESSION ? "Yes" : "No" ); report( stdout, _("Can hard reset device : %s\n\n"), i_misc_cap & CDIO_DRIVE_CAP_MISC_RESET ? "Yes" : "No" ); } if (CDIO_DRIVE_CAP_ERROR == i_read_cap) { report( stdout, "Error in getting drive reading properties\n" ); } else if (CDIO_DRIVE_CAP_UNKNOWN == i_misc_cap) { report( stdout, "Uknown drive reading properties\n" ); } else { report( stdout, "Reading....\n"); report( stdout, _(" Can read Mode 2 Form 1 : %s\n"), i_read_cap & CDIO_DRIVE_CAP_READ_MODE2_FORM1 ? "Yes" : "No" ); report( stdout, _(" Can read Mode 2 Form 2 : %s\n"), i_read_cap & CDIO_DRIVE_CAP_READ_MODE2_FORM2 ? "Yes" : "No" ); report( stdout, _(" Can read (S)VCD (i.e. Mode 2 Form 1/2) : %s\n"), i_read_cap & (CDIO_DRIVE_CAP_READ_MODE2_FORM1|CDIO_DRIVE_CAP_READ_MODE2_FORM2) ? "Yes" : "No" ); report( stdout, _(" Can read C2 Errors : %s\n"), i_read_cap & CDIO_DRIVE_CAP_READ_C2_ERRS ? "Yes" : "No" ); report( stdout, _(" Can read IRSC : %s\n"), i_read_cap & CDIO_DRIVE_CAP_READ_ISRC ? "Yes" : "No" ); report( stdout, _(" Can read Media Channel Number (or UPC) : %s\n"), i_read_cap & CDIO_DRIVE_CAP_READ_MCN ? "Yes" : "No" ); report( stdout, _(" Can play audio : %s\n"), i_read_cap & CDIO_DRIVE_CAP_READ_AUDIO ? "Yes" : "No" ); report( stdout, _(" Can read CD-DA : %s\n"), i_read_cap & CDIO_DRIVE_CAP_READ_CD_DA ? "Yes" : "No" ); report( stdout, _(" Can read CD-R : %s\n"), i_read_cap & CDIO_DRIVE_CAP_READ_CD_R ? "Yes" : "No" ); report( stdout, _(" Can read CD-RW : %s\n"), i_read_cap & CDIO_DRIVE_CAP_READ_CD_RW ? "Yes" : "No" ); report( stdout, _(" Can read DVD-ROM : %s\n"), i_read_cap & CDIO_DRIVE_CAP_READ_DVD_ROM ? "Yes" : "No" ); } if (CDIO_DRIVE_CAP_ERROR == i_write_cap) { report( stdout, "Error in getting drive writing properties\n" ); } else if (CDIO_DRIVE_CAP_UNKNOWN == i_misc_cap) { report( stdout, "Uknown drive writing properties\n" ); } else { report( stdout, "\nWriting....\n"); #if FIXED report( stdout, _(" Can write using Burn Proof : %s\n"), i_write_cap & CDIO_DRIVE_CAP_WRITE_BURN_PROOF ? "Yes" : "No" ); #endif report( stdout, _(" Can write CD-RW : %s\n"), i_write_cap & CDIO_DRIVE_CAP_WRITE_CD_RW ? "Yes" : "No" ); report( stdout, _(" Can write DVD-R : %s\n"), i_write_cap & CDIO_DRIVE_CAP_WRITE_DVD_R ? "Yes" : "No" ); report( stdout, _(" Can write DVD-RAM : %s\n"), i_write_cap & CDIO_DRIVE_CAP_WRITE_DVD_RAM ? "Yes" : "No" ); report( stdout, _(" Can write DVD-RW : %s\n"), i_write_cap & CDIO_DRIVE_CAP_WRITE_DVD_RW ? "Yes" : "No" ); report( stdout, _(" Can write DVD+RW : %s\n"), i_write_cap & CDIO_DRIVE_CAP_WRITE_DVD_RPW ? "Yes" : "No" ); } } /*! Common place for output routine. In some environments, like XBOX, it may not be desireable to send output to stdout and stderr. */ void report (FILE *stream, const char *psz_format, ...) { va_list args; va_start (args, psz_format); #ifdef _XBOX OutputDebugString(psz_format, args); #else vfprintf (stream, psz_format, args); #endif va_end(args); } /* Prints "ls"-like file attributes */ void print_fs_attrs(iso9660_stat_t *p_statbuf, bool b_rock, bool b_xa, const char *psz_name_untranslated, const char *psz_name_translated) { char date_str[30]; #ifdef HAVE_ROCK if (yep == p_statbuf->rr.b3_rock && b_rock) { report ( stdout, " %s %3d %d %d [LSN %6lu] %9u", iso9660_get_rock_attr_str (p_statbuf->rr.st_mode), p_statbuf->rr.st_nlinks, p_statbuf->rr.st_uid, p_statbuf->rr.st_gid, (long unsigned int) p_statbuf->lsn, S_ISLNK(p_statbuf->rr.st_mode) ? strlen(p_statbuf->rr.psz_symlink) : (unsigned int) p_statbuf->size ); } else #endif if (b_xa) { report ( stdout, " %s %d %d [fn %.2d] [LSN %6lu] ", iso9660_get_xa_attr_str (p_statbuf->xa.attributes), uint16_from_be (p_statbuf->xa.user_id), uint16_from_be (p_statbuf->xa.group_id), p_statbuf->xa.filenum, (long unsigned int) p_statbuf->lsn ); if (uint16_from_be(p_statbuf->xa.attributes) & XA_ATTR_MODE2FORM2) { report ( stdout, "%9u (%9u)", (unsigned int) p_statbuf->secsize * M2F2_SECTOR_SIZE, (unsigned int) p_statbuf->size ); } else report (stdout, "%9u", (unsigned int) p_statbuf->size); } else { report ( stdout," %c [LSN %6lu] %9u", (p_statbuf->type == _STAT_DIR) ? 'd' : '-', (long unsigned int) p_statbuf->lsn, (unsigned int) p_statbuf->size ); } if (yep == p_statbuf->rr.b3_rock && b_rock) { struct tm tm; strftime(date_str, sizeof(date_str), "%b %d %Y %H:%M:%S ", &p_statbuf->tm); /* Now try the proper field for mtime: attributes */ if (p_statbuf->rr.modify.b_used) { if (p_statbuf->rr.modify.b_longdate) { iso9660_get_ltime(&p_statbuf->rr.modify.t.ltime, &tm); } else { iso9660_get_dtime(&p_statbuf->rr.modify.t.dtime, true, &tm); } strftime(date_str, sizeof(date_str), "%b %d %Y %H:%M:%S ", &tm); } report (stdout," %s %s", date_str, psz_name_untranslated ); if (S_ISLNK(p_statbuf->rr.st_mode)) { report(stdout, " -> %s", p_statbuf->rr.psz_symlink); } } else { strftime(date_str, sizeof(date_str), "%b %d %Y %H:%M:%S ", &p_statbuf->tm); report (stdout," %s %s", date_str, psz_name_translated); } report(stdout, "\n"); } libcdio-0.83/src/cd-info.help2man0000644000175000017500000000053711565177366013556 00000000000000[SYNOPSIS] .B cd-info \fIOPTION\fR... .TP Shows Information about a CD or CD-image. [SEE ALSO] \&\f(CWcd-drive(1)\fR for CD-ROM characteristics; \&\f(CWiso-info(1)\fR for information about an ISO-9660 image. [AUTHOR] Rocky Bernstein rocky@gnu.org, based on the cdinfo program by Gerd Knorr and Heiko Eissfeldt libcdio-0.83/src/cd-drive.c0000644000175000017500000002200311647675475012445 00000000000000/* Copyright (C) 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Program to show drivers installed and capabilities of CD drives. */ #include "util.h" #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #include "getopt.h" #include #include /* Used by `main' to communicate with `parse_opt'. And global options */ static struct arguments { uint32_t debug_level; int version_only; int silent; source_image_t source_image; } opts; /* Configuration option codes */ enum { OP_HANDLED, OP_SOURCE_DEVICE, OP_USAGE, /* These are the remaining configuration options */ OP_VERSION, }; /* Parse all options. */ static bool parse_options (int argc, char *argv[]) { int opt; static const char helpText[] = "Usage: %s [OPTION...]\n" " -d, --debug=INT Set debugging to LEVEL\n" " -i, --cdrom-device[=DEVICE] show only info about CD-ROM device\n" " -q, --quiet Don't produce warning output\n" " -V, --version display version and copyright information\n" " and exit\n" "\n" "Help options:\n" " -?, --help Show this help message\n" " --usage Display brief usage message\n"; static const char usageText[] = "Usage: %s [-d|--debug INT] [-i|--cdrom-device DEVICE] [-q|--quiet]\n" " [-V|--version] [-?|--help] [--usage]\n"; static const char optionsString[] = "d:i::qV?"; static const struct option optionsTable[] = { {"debug", required_argument, NULL, 'd' }, {"cdrom-device", optional_argument, NULL, 'i' }, {"quiet", no_argument, NULL, 'q' }, {"version", no_argument, NULL, 'V' }, {"help", no_argument, NULL, '?' }, {"usage", no_argument, NULL, OP_USAGE }, {NULL, 0, NULL, 0 } }; program_name = strrchr(argv[0],'/'); program_name = program_name ? strdup(program_name+1) : strdup(argv[0]); while ((opt = getopt_long(argc, argv, optionsString, optionsTable, NULL)) != -1) { switch (opt) { case 'd': opts.debug_level = atoi(optarg); break; case 'i': if (opts.source_image != (source_image_t) DRIVER_UNKNOWN) { /* NOTE: The libpopt version already set source_name by this time. To restore this behavior, fall through to the else{} block. */ report( stderr, "%s: another source type option given before.\n", program_name ); report( stderr, "%s: give only one source type option.\n", program_name ); break; } else { opts.source_image = DRIVER_DEVICE; if (optarg != NULL) { source_name = fillout_device_name(optarg); } break; } break; case 'q': opts.silent = 1; break; case 'V': opts.version_only = 1; break; case '?': fprintf(stdout, helpText, program_name); free(program_name); exit(EXIT_INFO); break; case OP_USAGE: fprintf(stderr, usageText, program_name); free(program_name); exit(EXIT_FAILURE); break; case OP_HANDLED: break; default: return false; } } if (optind < argc) { const char *remaining_arg = argv[optind++]; /* NOTE: A bug in the libpopt version checked source_image, which rendered the subsequent source_image test useless. */ if (source_name != NULL) { report( stderr, "%s: Source specified in option %s and as %s\n", program_name, source_name, remaining_arg); free(program_name); exit (EXIT_FAILURE); } if (opts.source_image == (source_image_t) DRIVER_DEVICE) source_name = fillout_device_name(remaining_arg); else source_name = strdup(remaining_arg); if (optind < argc) { report( stderr, "%s: Source specified in previously %s and %s\n", program_name, source_name, remaining_arg); free(program_name); exit (EXIT_FAILURE); } } return true; } /* CDIO logging routines */ static void _log_handler (cdio_log_level_t level, const char message[]) { if (level == CDIO_LOG_DEBUG && opts.debug_level < 2) return; if (level == CDIO_LOG_INFO && opts.debug_level < 1) return; if (level == CDIO_LOG_WARN && opts.silent) return; gl_default_cdio_log_handler (level, message); } /*! Prints out SCSI-MMC drive features */ static void print_mmc_drive_level(CdIo_t *p_cdio) { cdio_mmc_level_t mmc_level = mmc_get_drive_mmc_cap(p_cdio); printf( "CD-ROM drive supports " ); switch(mmc_level) { case CDIO_MMC_LEVEL_WEIRD: printf("some nonstandard or degenerate set of MMC\n"); break; case CDIO_MMC_LEVEL_1: printf("MMC 1\n"); break; case CDIO_MMC_LEVEL_2: printf("MMC 2\n"); break; case CDIO_MMC_LEVEL_3: printf("MMC 3\n"); break; case CDIO_MMC_LEVEL_NONE: printf("no MMC\n"); break; } printf("\n"); } /* Initialize global variables. */ static void init(void) { gl_default_cdio_log_handler = cdio_log_set_handler (_log_handler); /* Default option values. */ opts.silent = false; opts.debug_level = 0; opts.source_image = DRIVER_UNKNOWN; } int main(int argc, char *argv[]) { CdIo_t *p_cdio=NULL; init(); /* Parse our arguments; every option seen by `parse_opt' will be reflected in `arguments'. */ parse_options(argc, argv); print_version(program_name, CDIO_VERSION, false, opts.version_only); if (opts.debug_level == 3) { cdio_loglevel_default = CDIO_LOG_INFO; } else if (opts.debug_level >= 4) { cdio_loglevel_default = CDIO_LOG_DEBUG; } if (NULL == source_name) { char *default_device; p_cdio = cdio_open (NULL, DRIVER_DEVICE); if (NULL == p_cdio) { printf("No loaded CD-ROM device accessible.\n"); } else { default_device = cdio_get_default_device(p_cdio); printf("The driver selected is %s\n", cdio_get_driver_name(p_cdio)); if (default_device) { printf("The default device for this driver is %s\n", default_device); } free(default_device); cdio_destroy(p_cdio); p_cdio=NULL; printf("\n"); } } /* Print out a drivers available */ { const driver_id_t *driver_id_p; printf("Drivers available...\n"); for (driver_id_p=cdio_drivers; *driver_id_p!=DRIVER_UNKNOWN; driver_id_p++) if (cdio_have_driver(*driver_id_p)) { printf(" %-35s\n", cdio_driver_describe(*driver_id_p)); } printf("\n"); } if (NULL == source_name) { /* Print out a list of CD-drives */ char **ppsz_cdrives=NULL, **ppsz_cd; driver_id_t driver_id = DRIVER_DEVICE; ppsz_cdrives = cdio_get_devices_ret(&driver_id); if (NULL != ppsz_cdrives) for( ppsz_cd = ppsz_cdrives; *ppsz_cd != NULL; ppsz_cd++ ) { cdio_drive_read_cap_t i_read_cap; cdio_drive_write_cap_t i_write_cap; cdio_drive_misc_cap_t i_misc_cap; cdio_hwinfo_t hwinfo; CdIo_t *p_cdio = cdio_open(*ppsz_cd, driver_id); print_mmc_drive_level(p_cdio); printf("%28s: %s\n", "Drive", *ppsz_cd); if (p_cdio) { if (cdio_get_hwinfo(p_cdio, &hwinfo)) { printf("%-28s: %s\n%-28s: %s\n%-28s: %s\n", "Vendor" , hwinfo.psz_vendor, "Model" , hwinfo.psz_model, "Revision", hwinfo.psz_revision); } print_mmc_drive_features(p_cdio); cdio_get_drive_cap(p_cdio, &i_read_cap, &i_write_cap, &i_misc_cap); print_drive_capabilities(i_read_cap, i_write_cap, i_misc_cap); } printf("\n"); if (p_cdio) cdio_destroy(p_cdio); } cdio_free_device_list(ppsz_cdrives); ppsz_cdrives = NULL; } else { /* Print CD-drive info for given source */ cdio_drive_read_cap_t i_read_cap; cdio_drive_write_cap_t i_write_cap; cdio_drive_misc_cap_t i_misc_cap; cdio_hwinfo_t hwinfo; printf("Drive %s\n", source_name); p_cdio = cdio_open (source_name, DRIVER_UNKNOWN); if (p_cdio) { print_mmc_drive_level(p_cdio); if (cdio_get_hwinfo(p_cdio, &hwinfo)) { printf("%-28s: %s\n%-28s: %s\n%-28s: %s\n", "Vendor" , hwinfo.psz_vendor, "Model" , hwinfo.psz_model, "Revision", hwinfo.psz_revision); } print_mmc_drive_features(p_cdio); } cdio_get_drive_cap_dev(source_name, &i_read_cap, &i_write_cap, &i_misc_cap); print_drive_capabilities(i_read_cap, i_write_cap, i_misc_cap); printf("\n"); } myexit(p_cdio, EXIT_SUCCESS); /* Not reached:*/ return(EXIT_SUCCESS); } libcdio-0.83/src/cdinfo-linux.c0000644000175000017500000005713011565200342013330 00000000000000/* $Id: cdinfo-linux.c,v 1.4 2008/04/14 17:30:27 karl Exp $ Copyright (C) 2003,2008 Rocky Bernstein Copyright (C) 1996,1997,1998 Gerd Knorr and Heiko Eifeldt This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* CD Info - prints various information about a CD, and detects the type of the CD. usage: cdinfo [options] [ dev ] */ #define PROGRAM_NAME "CD Info" #define CDINFO_VERSION "2.0" #include "config.h" #include #include #include #include #include #include #include #include #include #include #include #ifdef __linux__ # include # include # if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,50) # include # endif #endif #include #include #include #ifdef ENABLE_NLS #include # include # define _(String) dgettext ("cdinfo", String) #else /* Stubs that do something close enough. */ # define _(String) (String) #endif /* The following test is to work around the gross typo in systems like Sony NEWS-OS Release 4.0C, whereby EXIT_FAILURE is defined to 0, not 1. */ #if !EXIT_FAILURE # undef EXIT_FAILURE # define EXIT_FAILURE 1 #endif #ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 #endif /* Used by `main' to communicate with `parse_opt'. And global options */ struct arguments { bool show_tracks; bool show_ioctl; bool show_analysis; int debug_level; bool silent; } opts; #define DEBUG 1 #if DEBUG #define dbg_print(level, s, args...) \ if (opts.debug_level >= level) \ fprintf(stderr, "%s: "s, __func__ , ##args) #else #define dbg_print(level, s, args...) #endif #define err_exit(fmt, args...) \ fprintf(stderr, "%s: "fmt, program_name, ##args); \ myexit(EXIT_FAILURE) /* Subject: -65- How can I read an IRIX (EFS) CD-ROM on a machine which doesn't use EFS? Date: 18 Jun 1995 00:00:01 EST You want 'efslook', at ftp://viz.tamu.edu/pub/sgi/software/efslook.tar.gz. and ! Robert E. Seastrom 's software (with source ! code) for using an SGI CD-ROM on a Macintosh is at ! ftp://bifrost.seastrom.com/pub/mac/CDROM-Jumpstart.sit151.hqx. */ #define FS_NO_DATA 0 /* audio only */ #define FS_HIGH_SIERRA 1 #define FS_ISO_9660 2 #define FS_INTERACTIVE 3 #define FS_HFS 4 #define FS_UFS 5 #define FS_EXT2 6 #define FS_ISO_HFS 7 /* both hfs & isofs filesystem */ #define FS_ISO_9660_INTERACTIVE 8 /* both CD-RTOS and isofs filesystem */ #define FS_3DO 9 #define FS_UNKNOWN 15 #define FS_MASK 15 #define XA 16 #define MULTISESSION 32 #define PHOTO_CD 64 #define HIDDEN_TRACK 128 #define CDTV 256 #define BOOTABLE 512 #define VIDEOCDI 1024 #define ROCKRIDGE 2048 #define JOLIET 4096 /* Some interesting sector numbers. */ #define ISO_SUPERBLOCK_SECTOR 16 #define UFS_SUPERBLOCK_SECTOR 4 #define BOOT_SECTOR 17 #define VCD_INFO_SECTOR 150 #if 0 #define STRONG "\033[1m" #define NORMAL "\033[0m" #else #define STRONG "__________________________________\n" #define NORMAL "" #endif typedef struct signature { unsigned int buf_num; unsigned int offset; const char *sig_str; const char *description; } signature_t; #define IS_ISOFS 0 #define IS_CD_I 1 #define IS_CDTV 2 #define IS_CD_RTOS 3 #define IS_HS 4 #define IS_BRIDGE 5 #define IS_XA 6 #define IS_PHOTO_CD 7 #define IS_EXT2 8 #define IS_UFS 9 #define IS_BOOTABLE 10 #define IS_VIDEO_CD 11 static signature_t sigs[] = { /* Buff off look for description */ {0, 1, "CD001", "ISO 9660"}, {0, 1, "CD-I", "CD-I"}, {0, 8, "CDTV", "CDTV"}, {0, 8, "CD-RTOS", "CD-RTOS"}, {0, 9, "CDROM", "HIGH SIERRA"}, {0, 16, "CD-BRIDGE", "BRIDGE"}, {0, 1024, "CD-XA001", "XA"}, {1, 64, "PPPPHHHHOOOOTTTTOOOO____CCCCDDDD", "PHOTO CD"}, {1, 0x438, "\x53\xef", "EXT2 FS"}, {2, 1372, "\x54\x19\x01\x0", "UFS"}, {3, 7, "EL TORITO", "BOOTABLE"}, {4, 0, "VIDEO_CD", "VIDEO CD"}, { 0 } }; int filehandle; /* Handle of /dev/>cdrom< */ int rc; /* return code */ int i,j; /* index */ int isofs_size = 0; /* size of session */ int start_track; /* first sector of track */ int ms_offset; /* multisession offset found by track-walking */ int data_start; /* start of data area */ int joliet_level = 0; char buffer[6][CDIO_CD_FRAMESIZE_RAW]; /* for CD-Data */ CdIo *img; track_t num_tracks; track_t first_track_num; struct cdrom_tocentry *toc[CDIO_CDROM_LEADOUT_TRACK+1]; /* TOC-entries */ struct cdrom_mcn mcn; struct cdrom_multisession ms; struct cdrom_subchnl sub; int first_data = -1; /* # of first data track */ int num_data = 0; /* # of data tracks */ int first_audio = -1; /* # of first audio track */ int num_audio = 0; /* # of audio tracks */ char *devname = NULL; char *program_name; const char *argp_program_version = PROGRAM_NAME CDINFO_VERSION; const char *argp_program_bug_address = "rocky@gnu.org"; /* Program documentation. */ const char doc[] = PROGRAM_NAME " -- Get information about a Compact Disk or CD image."; /* A description of the arguments we accept. */ const char args_doc[] = "[DEVICE or DISK-IMAGE]"; static struct argp_option options[] = { {"debug", 'd', "LEVEL", 0, "Set debugging to LEVEL"}, {"quiet", 'q', 0, 0, "Don't produce any output" }, {"silent", 's', 0, OPTION_ALIAS }, {"notracks", 'T', 0, 0, "Don't show track information"}, {"noanalyze",'A', 0, 0, "Don't filesystem analysis"}, {"noioctl", 'I', 0, 0, "Don't show ioctl() information"}, { 0 } }; /* Parse a single option. */ static error_t parse_opt (int key, char *arg, struct argp_state *state) { /* Get the INPUT argument from `argp_parse', which we know is a pointer to our arguments structure. */ struct arguments *arguments = state->input; switch (key) { case 'q': case 's': arguments->silent = 1; break; case 'd': /* Default debug level is 1. */ arguments->debug_level = arg ? atol(arg): 1; break; case 'I': arguments->show_ioctl = false; break; case 'T': arguments->show_tracks = false; break; case 'A': arguments->show_analysis = false; break; case ARGP_KEY_ARG: /* Let the next case parse it. */ return ARGP_ERR_UNKNOWN; break; case ARGP_KEY_ARGS: { /* Check that only one device given. If so, handle it. */ unsigned int num_remaining_args = state->argc - state->next; char **remaining_args = state->argv + state->next; if (num_remaining_args > 1) { argp_usage (state); } if (0 == strncmp(remaining_args[0],"/dev/",5)) devname = remaining_args[0]; else { devname=malloc(6+strlen(remaining_args[0])); sprintf(devname,"/dev/%s", remaining_args[0]); } } break; default: return ARGP_ERR_UNKNOWN; } return 0; } static void print_version (void) { printf( _("CD Info %s | (c) 2003 Gerd Knorr, Heiko Eifeldt & R. Bernstein\n\ This is free software; see the source for copying conditions.\n\ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\ PARTICULAR PURPOSE.\n\ "), CDINFO_VERSION); } /* ------------------------------------------------------------------------ */ /* some ISO 9660 fiddling */ static int read_block(int superblock, uint32_t offset, uint8_t bufnum, bool is_green) { memset(buffer[bufnum], 0, CDIO_CD_FRAMESIZE); dbg_print(2, "about to read sector %u\n", offset+superblock); if (cdio_read_mode2_sector(img, buffer[bufnum], offset+superblock, !is_green)) return -1; /* For now compare with what we get the old way.... */ if (0 > lseek(filehandle, CDIO_CD_FRAMESIZE*(offset+superblock), SEEK_SET)) return -1; memset(buffer[5],0,CDIO_CD_FRAMESIZE); if (0 > read(filehandle,buffer[5], CDIO_CD_FRAMESIZE)) return -1; if (memcmp(buffer[bufnum], buffer[5], CDIO_CD_FRAMESIZE) != 0) { dbg_print(0, "libcdio conversion problem in reading super, buf %d\n", bufnum); } return 0; } static bool is_it(int num) { signature_t *sigp; /* TODO: check that num < largest sig. */ sigp = &sigs[num]; int len = strlen(sigp->sig_str); return 0 == memcmp(&buffer[sigp->buf_num][sigp->offset], sigp->sig_str, len); } static int is_hfs(void) { return (0 == memcmp(&buffer[1][512],"PM",2)) || (0 == memcmp(&buffer[1][512],"TS",2)) || (0 == memcmp(&buffer[1][1024], "BD",2)); } static int is_3do(void) { return (0 == memcmp(&buffer[1][0],"\x01\x5a\x5a\x5a\x5a\x5a\x01", 7)) && (0 == memcmp(&buffer[1][40], "CD-ROM", 6)); } static int is_joliet(void) { return 2 == buffer[3][0] && buffer[3][88] == 0x25 && buffer[3][89] == 0x2f; } /* ISO 9660 volume space in M2F1_SECTOR_SIZE byte units */ static int get_size(void) { return ((buffer[0][80] & 0xff) | ((buffer[0][81] & 0xff) << 8) | ((buffer[0][82] & 0xff) << 16) | ((buffer[0][83] & 0xff) << 24)); } static int get_joliet_level( void ) { switch (buffer[3][90]) { case 0x40: return 1; case 0x43: return 2; case 0x45: return 3; } return 0; } #define is_it_dbg(sig) \ if (is_it(sig)) printf("%s, ", sigs[sig].description) static int guess_filesystem(int start_session, bool is_green) { int ret = 0; if (read_block(ISO_SUPERBLOCK_SECTOR, start_session, 0, is_green) < 0) return FS_UNKNOWN; if (opts.debug_level > 0) { /* buffer is defined */ is_it_dbg(IS_CD_I); is_it_dbg(IS_CD_RTOS); is_it_dbg(IS_ISOFS); is_it_dbg(IS_HS); is_it_dbg(IS_BRIDGE); is_it_dbg(IS_XA); is_it_dbg(IS_CDTV); puts(""); } /* filesystem */ if (is_it(IS_CD_I) && is_it(IS_CD_RTOS) && !is_it(IS_BRIDGE) && !is_it(IS_XA)) { return FS_INTERACTIVE; } else { /* read sector 0 ONLY, when NO greenbook CD-I !!!! */ if (read_block(0, start_session, 1, true) < 0) return ret; if (opts.debug_level > 0) { /* buffer[1] is defined */ is_it_dbg(IS_PHOTO_CD); if (is_hfs()) printf("HFS, "); is_it_dbg(IS_EXT2); if (is_3do()) printf("3DO, "); puts(""); } if (is_it(IS_HS)) ret |= FS_HIGH_SIERRA; else if (is_it(IS_ISOFS)) { if (is_it(IS_CD_RTOS) && is_it(IS_BRIDGE)) ret = FS_ISO_9660_INTERACTIVE; else if (is_hfs()) ret = FS_ISO_HFS; else ret = FS_ISO_9660; isofs_size = get_size(); #if 0 if (is_rockridge()) ret |= ROCKRIDGE; #endif if (read_block(BOOT_SECTOR, start_session, 3, true) < 0) return ret; if (opts.debug_level > 0) { /* buffer[3] is defined */ if (is_joliet()) printf("JOLIET, "); puts(""); is_it_dbg(IS_BOOTABLE); puts(""); } if (is_joliet()) { joliet_level = get_joliet_level(); ret |= JOLIET; } if (is_it(IS_BOOTABLE)) ret |= BOOTABLE; if (is_it(IS_BRIDGE) && is_it(IS_XA) && is_it(IS_ISOFS) && is_it(IS_CD_RTOS) && !is_it(IS_PHOTO_CD)) { if (read_block(VCD_INFO_SECTOR, start_session, 4, true) < 0) return ret; if (opts.debug_level > 0) { /* buffer[4] is defined */ is_it_dbg(IS_VIDEO_CD); puts(""); } if (is_it(IS_VIDEO_CD)) ret |= VIDEOCDI; } } else if (is_hfs()) ret |= FS_HFS; else if (is_it(IS_EXT2)) ret |= FS_EXT2; else if (is_3do()) ret |= FS_3DO; else { if (read_block(UFS_SUPERBLOCK_SECTOR, start_session, 2, true) < 0) return ret; if (opts.debug_level > 0) { /* buffer[2] is defined */ is_it_dbg(IS_UFS); puts(""); } if (is_it(IS_UFS)) ret |= FS_UFS; else ret |= FS_UNKNOWN; } } /* other checks */ if (is_it(IS_XA)) ret |= XA; if (is_it(IS_PHOTO_CD)) ret |= PHOTO_CD; if (is_it(IS_CDTV)) ret |= CDTV; return ret; } static void myexit(int rc) { close(filehandle); cdio_destroy(img); exit(rc); } /* ------------------------------------------------------------------------ */ /* CDDB */ /* Returns the sum of the decimal digits in a number. Eg. 1955 = 20 */ static int cddb_dec_digit_sum(int n) { int ret=0; for (;;) { ret += n%10; n = n/10; if (!n) return ret; } } /* Return the number of seconds (discarding frame portion) of an MSF */ static inline unsigned int msf_seconds(msf_t *msf) { return cdio_from_bcd8(msf->m)*60 + cdio_from_bcd8(msf->s); } /* Compute the CDDB disk ID for an Audio disk. This is a funny checksum consisting of the concatenation of 3 things: the sum of the decimal digits of sizes of all tracks, the total length of the disk, and the number of tracks. */ static unsigned long cddb_discid() { int i,t,n=0; msf_t start_msf; msf_t msf; for (i = 1; i <= num_tracks; i++) { cdio_get_track_msf(img, i, &msf); n += cddb_dec_digit_sum(msf_seconds(&msf)); } cdio_get_track_msf(img, 1, &start_msf); cdio_get_track_msf(img, CDIO_CDROM_LEADOUT_TRACK, &msf); t = msf_seconds(&msf) - msf_seconds(&start_msf); return ((n % 0xff) << 24 | t << 8 | num_tracks); } /* CDIO logging routines */ static cdio_log_handler_t gl_default_log_handler = NULL; static void _log_handler (cdio_log_level_t level, const char message[]) { if (level == CDIO_LOG_DEBUG && opts.debug_level < 2) return; if (level == CDIO_LOG_INFO && opts.debug_level < 1) return; if (level == CDIO_LOG_WARN && opts.silent) return; gl_default_log_handler (level, message); } static void print_analysis(int fs, int num_audio) { int need_lf; switch(fs & FS_MASK) { case FS_NO_DATA: if (num_audio > 0) printf("Audio CD, CDDB disc ID is %08lx\n", cddb_discid()); break; case FS_ISO_9660: printf("CD-ROM with ISO 9660 filesystem"); if (fs & JOLIET) printf(" and joliet extension level %d", joliet_level); if (fs & ROCKRIDGE) printf(" and rockridge extensions"); printf("\n"); break; case FS_ISO_9660_INTERACTIVE: printf("CD-ROM with CD-RTOS and ISO 9660 filesystem\n"); break; case FS_HIGH_SIERRA: printf("CD-ROM with High Sierra filesystem\n"); break; case FS_INTERACTIVE: printf("CD-Interactive%s\n", num_audio > 0 ? "/Ready" : ""); break; case FS_HFS: printf("CD-ROM with Macintosh HFS\n"); break; case FS_ISO_HFS: printf("CD-ROM with both Macintosh HFS and ISO 9660 filesystem\n"); break; case FS_UFS: printf("CD-ROM with Unix UFS\n"); break; case FS_EXT2: printf("CD-ROM with Linux second extended filesystem\n"); break; case FS_3DO: printf("CD-ROM with Panasonic 3DO filesystem\n"); break; case FS_UNKNOWN: printf("CD-ROM with unknown filesystem\n"); break; } switch(fs & FS_MASK) { case FS_ISO_9660: case FS_ISO_9660_INTERACTIVE: case FS_ISO_HFS: printf("ISO 9660: %i blocks, label `%.32s'\n", isofs_size, buffer[0]+40); break; } need_lf = 0; if (first_data == 1 && num_audio > 0) need_lf += printf("mixed mode CD "); if (fs & XA) need_lf += printf("XA sectors "); if (fs & MULTISESSION) need_lf += printf("Multisession, offset = %i ",ms_offset); if (fs & HIDDEN_TRACK) need_lf += printf("Hidden Track "); if (fs & PHOTO_CD) need_lf += printf("%sPhoto CD ", num_audio > 0 ? " Portfolio " : ""); if (fs & CDTV) need_lf += printf("Commodore CDTV "); if (first_data > 1) need_lf += printf("CD-Plus/Extra "); if (fs & BOOTABLE) need_lf += printf("bootable CD "); if (fs & VIDEOCDI && num_audio == 0) need_lf += printf("Video CD "); if (need_lf) puts(""); } /* ------------------------------------------------------------------------ */ /* Our argp parser. */ static struct argp argp = { options, parse_opt, args_doc, doc }; int main(int argc, char *argv[]) { int fs=0; gl_default_log_handler = cdio_log_set_handler (_log_handler); program_name = strrchr(argv[0],'/'); program_name = program_name ? program_name+1 : argv[0]; /* Default option values. */ opts.silent = false; opts.debug_level = 0; opts.show_tracks = true; opts.show_ioctl = true; opts.show_analysis = true; /* Parse our arguments; every option seen by `parse_opt' will be reflected in `arguments'. */ argp_parse (&argp, argc, argv, 0, 0, &opts); print_version(); if (devname==NULL) { devname=strdup(cdio_get_default_device(img)); } img = cdio_open (devname, DRIVER_UNKNOWN); /* open device */ filehandle = open(devname,O_RDONLY); if (filehandle == -1) { err_exit("%s: %s\n", devname, strerror(errno)); } first_track_num = cdio_get_first_track_num(img); num_tracks = cdio_get_num_tracks(img); if (opts.show_tracks) { printf(STRONG "Track List (%i - %i)\n" NORMAL, first_track_num, num_tracks); printf(" nr: MSF LSN Ctrl Adr Type\n"); } /* Read and possibly print track information. */ for (i = first_track_num; i <= CDIO_CDROM_LEADOUT_TRACK; i++) { msf_t msf; toc[i] = malloc(sizeof(struct cdrom_tocentry)); if (toc[i] == NULL) { err_exit("out of memory"); } memset(toc[i],0,sizeof(struct cdrom_tocentry)); toc[i]->cdte_track = i; toc[i]->cdte_format = CDROM_MSF; if (ioctl(filehandle,CDROMREADTOCENTRY,toc[i])) { err_exit("read TOC entry ioctl failed for track %i, give up\n", i); } if (!cdio_get_track_msf(img, i, &msf)) { err_exit("cdio_track_msf for track %i failed, I give up.\n", i); } if (opts.show_tracks) { printf("%3d: %2.2x:%2.2x:%2.2x (%06d) 0x%x 0x%x %s%s\n", (int) i, msf.m, msf.s, msf.f, cdio_msf_to_lsn(&msf), (int)toc[i]->cdte_ctrl, (int)toc[i]->cdte_adr, track_format2str[cdio_get_track_format(img, i)], CDIO_CDROM_LEADOUT_TRACK == i ? " (leadout)" : ""); } if (i == CDIO_CDROM_LEADOUT_TRACK) break; if (TRACK_FORMAT_DATA == cdio_get_track_format(img, i)) { num_data++; if (-1 == first_data) first_data = i; } else { num_audio++; if (-1 == first_audio) first_audio = i; } /* skip to leadout */ if (i == num_tracks) i = CDIO_CDROM_LEADOUT_TRACK-1; } if (opts.show_ioctl) { printf(STRONG "What ioctl's report...\n" NORMAL); /* get mcn */ printf("Get MCN : "); fflush(stdout); if (ioctl(filehandle,CDROM_GET_MCN, &mcn)) printf("FAILED\n"); else printf("%s\n",mcn.medium_catalog_number); /* get disk status */ printf("disc status : "); fflush(stdout); switch (ioctl(filehandle,CDROM_DISC_STATUS,0)) { case CDS_NO_INFO: printf("no info\n"); break; case CDS_NO_DISC: printf("no disc\n"); break; case CDS_AUDIO: printf("audio\n"); break; case CDS_DATA_1: printf("data mode 1\n"); break; case CDS_DATA_2: printf("data mode 2\n"); break; case CDS_XA_2_1: printf("XA mode 1\n"); break; case CDS_XA_2_2: printf("XA mode 2\n"); break; default: printf("unknown (failed?)\n"); } /* get multisession */ printf("multisession: "); fflush(stdout); ms.addr_format = CDROM_LBA; if (ioctl(filehandle,CDROMMULTISESSION,&ms)) printf("FAILED\n"); else printf("%d%s\n",ms.addr.lba,ms.xa_flag?" XA":""); /* get audio status from subchnl */ printf("audio status: "); fflush(stdout); sub.cdsc_format = CDROM_MSF; if (ioctl(filehandle,CDROMSUBCHNL,&sub)) printf("FAILED\n"); else { switch (sub.cdsc_audiostatus) { case CDROM_AUDIO_INVALID: printf("invalid\n"); break; case CDROM_AUDIO_PLAY: printf("playing"); break; case CDROM_AUDIO_PAUSED: printf("paused"); break; case CDROM_AUDIO_COMPLETED: printf("completed\n"); break; case CDROM_AUDIO_ERROR: printf("error\n"); break; case CDROM_AUDIO_NO_STATUS: printf("no status\n"); break; default: printf("Oops: unknown\n"); } if (sub.cdsc_audiostatus == CDROM_AUDIO_PLAY || sub.cdsc_audiostatus == CDROM_AUDIO_PAUSED) { printf(" at: %02d:%02d abs / %02d:%02d track %d\n", sub.cdsc_absaddr.msf.minute, sub.cdsc_absaddr.msf.second, sub.cdsc_reladdr.msf.minute, sub.cdsc_reladdr.msf.second, sub.cdsc_trk); } } } if (opts.show_analysis) { printf(STRONG "try to find out what sort of CD this is\n" NORMAL); /* try to find out what sort of CD we have */ if (0 == num_data) { /* no data track, may be a "real" audio CD or hidden track CD */ msf_t msf; cdio_get_track_msf(img, 1, &msf); start_track = cdio_msf_to_lsn(&msf); /* CD-I/Ready says start_track <= 30*75 then CDDA */ if (start_track > 100 /* 100 is just a guess */) { fs = guess_filesystem(0, false); if ((fs & FS_MASK) != FS_UNKNOWN) fs |= HIDDEN_TRACK; else { fs &= ~FS_MASK; /* del filesystem info */ printf("Oops: %i unused sectors at start, but hidden track check failed.\n",start_track); } } print_analysis(fs, num_audio); } else { /* we have data track(s) */ for (j = 2, i = first_data; i <= num_tracks; i++) { msf_t msf; track_format_t track_format = cdio_get_track_format(img, i); cdio_get_track_msf(img, i, &msf); switch ( track_format ) { case TRACK_FORMAT_AUDIO: case TRACK_FORMAT_ERROR: break; case TRACK_FORMAT_CDI: case TRACK_FORMAT_XA: case TRACK_FORMAT_DATA: case TRACK_FORMAT_PSX: ; } start_track = (i == 1) ? 0 : cdio_msf_to_lsn(&msf); /* save the start of the data area */ if (i == first_data) data_start = start_track; /* skip tracks which belong to the current walked session */ if (start_track < data_start + isofs_size) continue; fs = guess_filesystem(start_track, cdio_get_track_green(img, i)); if (i > 1) { /* track is beyond last session -> new session found */ ms_offset = start_track; printf("session #%d starts at track %2i, LSN: %6i," " ISO 9660 blocks: %6i\n", j++, i, start_track, isofs_size); printf("ISO 9660: %i blocks, label `%.32s'\n", isofs_size, buffer[0]+40); fs |= MULTISESSION; } else { print_analysis(fs, num_audio); } if (!(((fs & FS_MASK) == FS_ISO_9660 || (fs & FS_MASK) == FS_ISO_HFS || /* (fs & FS_MASK) == FS_ISO_9660_INTERACTIVE) && (fs & XA))) */ (fs & FS_MASK) == FS_ISO_9660_INTERACTIVE))) break; /* no method for non-iso9660 multisessions */ } } } myexit(EXIT_SUCCESS); /* Not reached:*/ return(EXIT_SUCCESS); } libcdio-0.83/src/iso-info.10000644000175000017500000000340211652140342012363 00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.38.4. .TH LT-ISO-INFO "1" "October 2011" "lt-iso-info version 0.83 i686-pc-linux-gnu" "User Commands" .SH NAME lt-iso-info \- manual page for lt-iso-info version 0.83 i686-pc-linux-gnu .SH SYNOPSIS .B iso-info \fIOPTION\fR... .TP Shows Information about an ISO 9660 image. .SH DESCRIPTION .TP \fB\-d\fR, \fB\-\-debug\fR=\fIINT\fR Set debugging to LEVEL .TP \fB\-i\fR, \fB\-\-input\fR[=\fIFILE\fR] Filename to read ISO\-9960 image from .TP \fB\-f\fR Generate output similar to 'find . \fB\-print\fR' .TP \fB\-l\fR, \fB\-\-iso9660\fR Generate output similar to 'ls \fB\-lR\fR' .TP \fB\-\-no\-header\fR Don't display header and copyright (for regression testing) .TP \fB\-\-no\-joliet\fR Don't use Joliet\-extension information .TP \fB\-\-no\-rock\-ridge\fR Don't use Rock\-Ridge\-extension information .TP \fB\-\-no\-xa\fR Don't use XA\-extension information .TP \fB\-q\fR, \fB\-\-quiet\fR Don't produce warning output .TP \fB\-V\fR, \fB\-\-version\fR display version and copyright information and exit .SS "Help options:" .TP \-?, \fB\-\-help\fR Show this help message .TP \fB\-\-usage\fR Display brief usage message .SH AUTHOR Rocky Bernstein .SH COPYRIGHT Copyright \(co 2003, 2004, 2005, 2007, 2008, 2011 R. Bernstein .br This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Have driver: GNU/Linux ioctl and MMC driver Have driver: cdrdao (TOC) disk image driver Have driver: bin/cuesheet disk image driver Have driver: Nero NRG disk image driver Default CD\-ROM device: /dev/scd0 .SH "SEE ALSO" \&\f(CWcd-info(1)\fR for information about an ISO-9660 image. \&\f(CWcd-read(1)\fR to read portions of an ISO 9660 image. libcdio-0.83/src/mmc-tool.c0000644000175000017500000003407611650126723012471 00000000000000/* Copyright (C) 2006, 2008, 2010, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* A program to using the MMC interface to list CD and drive features from the MMC GET_CONFIGURATION command . */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #include #include #include #include "util.h" #include "getopt.h" static void init(const char *argv0) { program_name = strrchr(argv0,'/'); program_name = program_name ? strdup(program_name+1) : strdup(argv0); } /* Configuration option codes */ typedef enum { OPT_HANDLED = 0, OPT_USAGE, OPT_DRIVE_CAP, OPT_VERSION, } option_t; typedef enum { /* These are the remaining configuration options */ OP_FINISHED = 0, OP_BLOCKSIZE, OP_CLOSETRAY, OP_EJECT, OP_IDLE, OP_INQUIRY, OP_MODE_SENSE_2A, OP_MCN, OP_SPEED, } operation_enum_t; typedef struct { operation_enum_t op; union { long int i_num; char * psz; } arg; } operation_t; enum { MAX_OPS = 10 }; static unsigned int last_op = 0; static operation_t operation[MAX_OPS] = { {OP_FINISHED, {0}} }; static void push_op(operation_t *p_op) { if (last_op < MAX_OPS) { memcpy(&operation[last_op], p_op, sizeof(operation_t)); last_op++; } } /* Parse command-line options. */ static bool parse_options (int argc, char *argv[]) { int opt; operation_t op; int i_blocksize = 0; static const char helpText[] = "Usage: %s [OPTION...]\n" " Issues libcdio Multimedia commands. Operations occur in the order\n" " in which the options are given and a given operation may appear\n" " more than once to have it run more than once.\n" "options: \n" " -b, --blocksize[=INT] set blocksize. If no block size or a \n" " zero blocksize is given we return the\n" " current setting.\n" " -C, --drive-cap [6|10] print mode sense 2a data\n" " using 6-byte or 10-byte form\n" " -c, --close drive close drive via ALLOW_MEDIUM_REMOVAL\n" " -e, --eject [drive] eject drive via ALLOW_MEDIUM_REMOVAL\n" " and a MMC START/STOP command\n" " -I, --idle set CD-ROM to idle or power down\n" " via MMC START/STOP command\n" " -i, --inquiry print HW info via INQUIRY\n" " -m, --mcn get media catalog number (AKA UPC)\n" " -s, --speed-KB=INT Set drive speed to SPEED K bytes/sec\n" " Note: 1x = 176 KB/s \n" " -S, --speed-X=INT Set drive speed to INT X\n" " Note: 1x = 176 KB/s \n" " -V, --version display version and copyright information\n" " and exit\n" "\n" "Help options:\n" " -?, --help Show this help message\n" " --usage Display brief usage message\n"; static const char usageText[] = "Usage: %s [-b|--blocksize[=INT]] [-m|--mcn]\n" " [-I|--idle] [-I|inquiry] [-m[-s|--speed-KB INT]\n" " [-V|--version] [-?|--help] [--usage]\n"; /* Command-line options */ static const char optionsString[] = "b::c:C::e::Iis:V?"; const struct option optionsTable[] = { {"blocksize", optional_argument, &i_blocksize, 'b' }, {"close", required_argument, NULL, 'c'}, {"drive-cap", optional_argument, NULL, 'C'}, {"eject", optional_argument, NULL, 'e'}, {"idle", no_argument, NULL, 'I'}, {"inquiry", no_argument, NULL, 'i'}, {"mcn", no_argument, NULL, 'm'}, {"speed-KB", required_argument, NULL, 's'}, {"speed-X", required_argument, NULL, 'S'}, {"version", no_argument, NULL, 'V'}, {"help", no_argument, NULL, '?' }, {"usage", no_argument, NULL, OPT_USAGE }, { NULL, 0, NULL, 0 } }; while ((opt = getopt_long(argc, argv, optionsString, optionsTable, NULL)) >= 0) switch (opt) { case 'b': op.op = OP_BLOCKSIZE; op.arg.i_num = i_blocksize; push_op(&op); break; case 'C': op.arg.i_num = optarg ? atoi(optarg) : 10; switch (op.arg.i_num) { case 10: op.op = OP_MODE_SENSE_2A; op.arg.i_num = 10; push_op(&op); break; case 6: op.op = OP_MODE_SENSE_2A; op.arg.i_num = 6; push_op(&op); break; default: report( stderr, "%s: Expecting 6 or 10 or nothing\n", program_name ); } break; case 'c': op.op = OP_CLOSETRAY; op.arg.psz = strdup(optarg); push_op(&op); break; case 'e': op.op = OP_EJECT; op.arg.psz=NULL; if (optarg) op.arg.psz = strdup(optarg); push_op(&op); break; case 'i': op.op = OP_INQUIRY; op.arg.psz=NULL; push_op(&op); break; case 'I': op.op = OP_IDLE; op.arg.psz=NULL; push_op(&op); break; case 'm': op.op = OP_MCN; op.arg.psz=NULL; push_op(&op); break; case 's': op.op = OP_SPEED; op.arg.i_num=atoi(optarg); push_op(&op); break; case 'S': op.op = OP_SPEED; op.arg.i_num=176 * atoi(optarg); push_op(&op); break; case 'V': print_version(program_name, VERSION, 0, true); free(program_name); exit (EXIT_SUCCESS); break; case '?': fprintf(stdout, helpText, program_name); free(program_name); exit(EXIT_INFO); break; case OPT_USAGE: fprintf(stderr, usageText, program_name); free(program_name); exit(EXIT_FAILURE); break; case OPT_HANDLED: break; i_blocksize = 0; } if (optind < argc) { const char *remaining_arg = argv[optind++]; if (source_name != NULL) { report( stderr, "%s: Source specified in option %s and as %s\n", program_name, source_name, remaining_arg ); free(program_name); exit (EXIT_FAILURE); } source_name = strdup(remaining_arg); if (optind < argc) { report( stderr, "%s: Source specified in previously %s and %s\n", program_name, source_name, remaining_arg ); free(program_name); exit (EXIT_FAILURE); } } return true; } static void print_mode_sense (unsigned int i_mmc_size, const uint8_t buf[30]) { printf("Mode sense %d information\n", i_mmc_size); if (buf[2] & 0x01) { printf("\tReads CD-R media.\n"); } if (buf[2] & 0x02) { printf("\tReads CD-RW media.\n"); } if (buf[2] & 0x04) { printf("\tReads fixed-packet tracks when Addressing type is method 2.\n"); } if (buf[2] & 0x08) { printf("\tReads DVD ROM media.\n"); } if (buf[2] & 0x10) { printf("\tReads DVD-R media.\n"); } if (buf[2] & 0x20) { printf("\tReads DVD-RAM media.\n"); } if (buf[2] & 0x40) { printf("\tReads DVD-RAM media.\n"); } if (buf[3] & 0x01) { printf("\tWrites CD-R media.\n"); } if (buf[3] & 0x02) { printf("\tWrites CD-RW media.\n"); } if (buf[3] & 0x04) { printf("\tSupports emulation write.\n"); } if (buf[3] & 0x10) { printf("\tWrites DVD-R media.\n"); } if (buf[3] & 0x20) { printf("\tWrites DVD-RAM media.\n"); } if (buf[4] & 0x01) { printf("\tCan play audio.\n"); } if (buf[4] & 0x02) { printf("\tDelivers composition A/V stream.\n"); } if (buf[4] & 0x04) { printf("\tSupports digital output on port 2.\n"); } if (buf[4] & 0x08) { printf("\tSupports digital output on port 1.\n"); } if (buf[4] & 0x10) { printf("\tReads Mode-2 form 1 (e.g. XA) media.\n"); } if (buf[4] & 0x20) { printf("\tReads Mode-2 form 2 media.\n"); } if (buf[4] & 0x40) { printf("\tReads multi-session CD media.\n"); } if (buf[4] & 0x80) { printf("\tSupports Buffer under-run free recording on CD-R/RW media.\n"); } if (buf[4] & 0x01) { printf("\tCan read audio data with READ CD.\n"); } if (buf[4] & 0x02) { printf("\tREAD CD data stream is accurate.\n"); } if (buf[5] & 0x04) { printf("\tReads R-W subchannel information.\n"); } if (buf[5] & 0x08) { printf("\tReads de-interleaved R-W subchannel.\n"); } if (buf[5] & 0x10) { printf("\tSupports C2 error pointers.\n"); } if (buf[5] & 0x20) { printf("\tReads ISRC information.\n"); } if (buf[5] & 0x40) { printf("\tReads ISRC informaton.\n"); } if (buf[5] & 0x40) { printf("\tReads media catalog number (MCN also known as UPC).\n"); } if (buf[5] & 0x80) { printf("\tReads bar codes.\n"); } if (buf[6] & 0x01) { printf("\tPREVENT/ALLOW may lock media.\n"); } printf("\tLock state is %slocked.\n", (buf[6] & 0x02) ? "" : "un"); printf("\tPREVENT/ALLOW jumper is %spresent.\n", (buf[6] & 0x04) ? "": "not "); if (buf[6] & 0x08) { printf("\tEjects media with START STOP UNIT.\n"); } { const unsigned int i_load_type = (buf[6]>>5 & 0x07); printf("\tLoading mechanism type is %d: ", i_load_type); switch (buf[6]>>5 & 0x07) { case 0: printf("caddy type loading mechanism.\n"); break; case 1: printf("tray type loading mechanism.\n"); break; case 2: printf("popup type loading mechanism.\n"); break; case 3: printf("reserved\n"); break; case 4: printf("changer with individually changeable discs.\n"); break; case 5: printf("changer using Magazine mechanism.\n"); break; case 6: printf("changer using Magazine mechanism.\n"); break; default: printf("Invalid.\n"); break; } } if (buf[7] & 0x01) { printf("\tVolume controls each channel separately.\n"); } if (buf[7] & 0x02) { printf("\tHas a changer that supports disc present reporting.\n"); } if (buf[7] & 0x04) { printf("\tCan load empty slot in changer.\n"); } if (buf[7] & 0x08) { printf("\tSide change capable.\n"); } if (buf[7] & 0x10) { printf("\tReads raw R-W subchannel information from lead in.\n"); } { const unsigned int i_speed_Kbs = CDIO_MMC_GETPOS_LEN16(buf, 8); printf("\tMaximum read speed is %d K bytes/sec (about %dX)\n", i_speed_Kbs, i_speed_Kbs / 176) ; } printf("\tNumber of Volume levels is %d\n", CDIO_MMC_GETPOS_LEN16(buf, 10)); printf("\tBuffers size for data is %d KB\n", CDIO_MMC_GETPOS_LEN16(buf, 12)); printf("\tCurrent read speed is %d KB\n", CDIO_MMC_GETPOS_LEN16(buf, 14)); printf("\tMaximum write speed is %d KB\n", CDIO_MMC_GETPOS_LEN16(buf, 18)); printf("\tCurrent write speed is %d KB\n", CDIO_MMC_GETPOS_LEN16(buf, 28)); } int main(int argc, char *argv[]) { CdIo_t *p_cdio; driver_return_code_t rc = DRIVER_OP_SUCCESS; unsigned int i; init(argv[0]); parse_options(argc, argv); p_cdio = cdio_open (source_name, DRIVER_DEVICE); if (NULL == p_cdio) { printf("Couldn't find CD\n"); return 1; } for (i=0; i < last_op; i++) { const operation_t *p_op = &operation[i]; switch (p_op->op) { case OP_SPEED: rc = mmc_set_speed(p_cdio, p_op->arg.i_num, 0); report(stdout, "%s (mmc_set_speed): %s\n", program_name, cdio_driver_errmsg(rc)); break; case OP_BLOCKSIZE: if (p_op->arg.i_num) { driver_return_code_t rc = mmc_set_blocksize(p_cdio, p_op->arg.i_num); report(stdout, "%s (mmc_set_blocksize): %s\n", program_name, cdio_driver_errmsg(rc)); } else { int i_blocksize = mmc_get_blocksize(p_cdio); if (i_blocksize > 0) { report(stdout, "%s (mmc_get_blocksize): %d\n", program_name, i_blocksize); } else { report(stdout, "%s (mmc_get_blocksize): can't retrieve.\n", program_name); } } break; case OP_MODE_SENSE_2A: { uint8_t buf[30] = { 0, }; /* Place to hold returned data */ if (p_op->arg.i_num == 10) { rc = mmc_mode_sense_10(p_cdio, buf, sizeof(buf), CDIO_MMC_CAPABILITIES_PAGE); } else { rc = mmc_mode_sense_6(p_cdio, buf, sizeof(buf), CDIO_MMC_CAPABILITIES_PAGE); } if (DRIVER_OP_SUCCESS == rc) { print_mode_sense(p_op->arg.i_num, buf); } else { report(stdout, "%s (mmc_mode_sense 2a - drive_cap %d): %s\n", program_name, p_op->arg.i_num, cdio_driver_errmsg(rc)); } } break; case OP_CLOSETRAY: rc = mmc_close_tray(p_cdio); report(stdout, "%s (mmc_close_tray): %s\n", program_name, cdio_driver_errmsg(rc)); free(p_op->arg.psz); break; case OP_EJECT: rc = mmc_eject_media(p_cdio); report(stdout, "%s (mmc_eject_media): %s\n", program_name, cdio_driver_errmsg(rc)); if (p_op->arg.psz) free(p_op->arg.psz); break; case OP_IDLE: rc = mmc_start_stop_unit(p_cdio, false, false, true, 0); report(stdout, "%s (mmc_start_stop_media - powerdown): %s\n", program_name, cdio_driver_errmsg(rc)); break; case OP_INQUIRY: { cdio_hwinfo_t hw_info = { "", "", ""}; if (mmc_get_hwinfo(p_cdio, &hw_info)) { printf("%-8s: %s\n%-8s: %s\n%-8s: %s\n", "Vendor" , hw_info.psz_vendor, "Model" , hw_info.psz_model, "Revision", hw_info.psz_revision); } else { report(stdout, "%s (mmc_gpcmd_inquiry error)\n", program_name); } } break; case OP_MCN: { char *psz_mcn = mmc_get_mcn(p_cdio); if (psz_mcn) { report(stdout, "%s (mmc_get_mcn): %s\n", program_name, psz_mcn); free(psz_mcn); } else report(stdout, "%s (mmc_get_mcn): can't retrieve\n", program_name); } break; default: ; } } free(source_name); cdio_destroy(p_cdio); return rc; } libcdio-0.83/src/getopt.c0000644000175000017500000007272011114145233012232 00000000000000/* Getopt for GNU. NOTE: getopt is now part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to drepper@gnu.org before changing it! Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@gnu.org. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This tells Alpha OSF/1 not to define a getopt prototype in . Ditto for AIX 3.2 and . */ #ifndef _NO_PROTO # define _NO_PROTO #endif #ifdef HAVE_CONFIG_H # include #endif #if !defined __STDC__ || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ # ifndef const # define const # endif #endif #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #define GETOPT_INTERFACE_VERSION 2 #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 # include # if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION # define ELIDE_CODE # endif #endif #ifndef ELIDE_CODE /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ /* Don't include stdlib.h for non-GNU C libraries because some of them contain conflicting prototypes for getopt. */ # include # include #endif /* GNU C library. */ #ifdef VMS # include # if HAVE_STRING_H - 0 # include # endif #endif #ifndef _ /* This is for other GNU distributions with internationalized messages. When compiling libc, the _ macro is predefined. */ # ifdef HAVE_LIBINTL_H # include # define _(msgid) gettext (msgid) # else # define _(msgid) (msgid) # endif #endif /* This version of `getopt' appears to the caller like standard Unix `getopt' but it behaves differently for the user, since it allows the user to intersperse the options with the other arguments. As `getopt' works, it permutes the elements of ARGV so that, when it is done, all the options precede everything else. Thus all application programs are extended to handle flexible argument order. Setting the environment variable POSIXLY_CORRECT disables permutation. Then the behavior is completely standard. GNU application programs can use a third alternative mode in which they can distinguish the relative order of options and other arguments. */ #include "getopt.h" /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ char *optarg = NULL; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ /* 1003.2 says this must be 1 before any call. */ int optind = 1; /* Formerly, initialization of getopt depended on optind==0, which causes problems with re-calling getopt as programs generally don't know that. */ int __getopt_initialized = 0; /* The next char to be scanned in the option-element in which the last option character we returned was found. This allows us to pick up the scan where we left off. If this is zero, or a null string, it means resume the scan by advancing to the next ARGV-element. */ static char *nextchar; /* Callers store zero here to inhibit the error message for unrecognized options. */ int opterr = 1; /* Set to an option character which was unrecognized. This must be initialized on some systems to avoid linking in the system's own getopt implementation. */ int optopt = '?'; /* Describe how to deal with options that follow non-option ARGV-elements. If the caller did not specify anything, the default is REQUIRE_ORDER if the environment variable POSIXLY_CORRECT is defined, PERMUTE otherwise. REQUIRE_ORDER means don't recognize them as options; stop option processing when the first non-option is seen. This is what Unix does. This mode of operation is selected by either setting the environment variable POSIXLY_CORRECT, or using `+' as the first character of the list of option characters. PERMUTE is the default. We permute the contents of ARGV as we scan, so that eventually all the non-options are at the end. This allows options to be given in any order, even with programs that were not written to expect this. RETURN_IN_ORDER is an option available to programs that were written to expect options and other ARGV-elements in any order and that care about the ordering of the two. We describe each non-option ARGV-element as if it were the argument of an option with character code 1. Using `-' as the first character of the list of option characters selects this mode of operation. The special argument `--' forces an end of option-scanning regardless of the value of `ordering'. In the case of RETURN_IN_ORDER, only `--' can cause `getopt' to return -1 with `optind' != ARGC. */ static enum { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } ordering; /* Value of POSIXLY_CORRECT environment variable. */ static char *posixly_correct; #ifdef __GNU_LIBRARY__ /* We want to avoid inclusion of string.h with non-GNU libraries because there are many ways it can cause trouble. On some systems, it contains special magic macros that don't work in GCC. */ # include # define my_index strchr #else # if HAVE_STRING_H # include # else # if HAVE_STRINGS_H # include # endif # endif /* Avoid depending on library functions or files whose names are inconsistent. */ #ifndef getenv extern char *getenv (); #endif static char * my_index (str, chr) const char *str; int chr; { while (*str) { if (*str == chr) return (char *) str; str++; } return 0; } /* If using GCC, we can safely declare strlen this way. If not using GCC, it is ok not to declare it. */ #ifdef __GNUC__ /* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. That was relevant to code that was here before. */ # if (!defined __STDC__ || !__STDC__) && !defined strlen /* gcc with -traditional declares the built-in strlen to return int, and has done so at least since version 2.4.5. -- rms. */ extern int strlen (const char *); # endif /* not __STDC__ */ #endif /* __GNUC__ */ #endif /* not __GNU_LIBRARY__ */ /* Handle permutation of arguments. */ /* Describe the part of ARGV that contains non-options that have been skipped. `first_nonopt' is the index in ARGV of the first of them; `last_nonopt' is the index after the last of them. */ static int first_nonopt; static int last_nonopt; #ifdef _LIBC /* Bash 2.0 gives us an environment variable containing flags indicating ARGV elements that should not be considered arguments. */ /* Defined in getopt_init.c */ extern char *__getopt_nonoption_flags; static int nonoption_flags_max_len; static int nonoption_flags_len; static int original_argc; static char *const *original_argv; /* Make sure the environment variable bash 2.0 puts in the environment is valid for the getopt call we must make sure that the ARGV passed to getopt is that one passed to the process. */ static void __attribute__ ((unused)) store_args_and_env (int argc, char *const *argv) { /* XXX This is no good solution. We should rather copy the args so that we can compare them later. But we must not use malloc(3). */ original_argc = argc; original_argv = argv; } # ifdef text_set_element text_set_element (__libc_subinit, store_args_and_env); # endif /* text_set_element */ # define SWAP_FLAGS(ch1, ch2) \ if (nonoption_flags_len > 0) \ { \ char __tmp = __getopt_nonoption_flags[ch1]; \ __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ __getopt_nonoption_flags[ch2] = __tmp; \ } #else /* !_LIBC */ # define SWAP_FLAGS(ch1, ch2) #endif /* _LIBC */ /* Exchange two adjacent subsequences of ARGV. One subsequence is elements [first_nonopt,last_nonopt) which contains all the non-options that have been skipped so far. The other is elements [last_nonopt,optind), which contains all the options processed since those non-options were skipped. `first_nonopt' and `last_nonopt' are relocated so that they describe the new indices of the non-options in ARGV after they are moved. */ #if defined __STDC__ && __STDC__ static void exchange (char **); #endif static void exchange (argv) char **argv; { int bottom = first_nonopt; int middle = last_nonopt; int top = optind; char *tem; /* Exchange the shorter segment with the far end of the longer segment. That puts the shorter segment into the right place. It leaves the longer segment in the right place overall, but it consists of two parts that need to be swapped next. */ #ifdef _LIBC /* First make sure the handling of the `__getopt_nonoption_flags' string can work normally. Our top argument must be in the range of the string. */ if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len) { /* We must extend the array. The user plays games with us and presents new arguments. */ char *new_str = malloc (top + 1); if (new_str == NULL) nonoption_flags_len = nonoption_flags_max_len = 0; else { memset (__mempcpy (new_str, __getopt_nonoption_flags, nonoption_flags_max_len), '\0', top + 1 - nonoption_flags_max_len); nonoption_flags_max_len = top + 1; __getopt_nonoption_flags = new_str; } } #endif while (top > middle && middle > bottom) { if (top - middle > middle - bottom) { /* Bottom segment is the short one. */ int len = middle - bottom; register int i; /* Swap it with the top part of the top segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[top - (middle - bottom) + i]; argv[top - (middle - bottom) + i] = tem; SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); } /* Exclude the moved bottom segment from further swapping. */ top -= len; } else { /* Top segment is the short one. */ int len = top - middle; register int i; /* Swap it with the bottom part of the bottom segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[middle + i]; argv[middle + i] = tem; SWAP_FLAGS (bottom + i, middle + i); } /* Exclude the moved top segment from further swapping. */ bottom += len; } } /* Update records for the slots the non-options now occupy. */ first_nonopt += (optind - last_nonopt); last_nonopt = optind; } /* Initialize the internal data when the first call is made. */ #if defined __STDC__ && __STDC__ static const char *_getopt_initialize (int, char *const *, const char *); #endif static const char * _getopt_initialize (argc, argv, optstring) int argc; char *const *argv; const char *optstring; { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped non-option ARGV-elements is empty. */ first_nonopt = last_nonopt = optind; nextchar = NULL; posixly_correct = getenv ("POSIXLY_CORRECT"); /* Determine how to handle the ordering of options and nonoptions. */ if (optstring[0] == '-') { ordering = RETURN_IN_ORDER; ++optstring; } else if (optstring[0] == '+') { ordering = REQUIRE_ORDER; ++optstring; } else if (posixly_correct != NULL) ordering = REQUIRE_ORDER; else ordering = PERMUTE; #ifdef _LIBC if (posixly_correct == NULL && argc == original_argc && argv == original_argv) { if (nonoption_flags_max_len == 0) { if (__getopt_nonoption_flags == NULL || __getopt_nonoption_flags[0] == '\0') nonoption_flags_max_len = -1; else { const char *orig_str = __getopt_nonoption_flags; int len = nonoption_flags_max_len = strlen (orig_str); if (nonoption_flags_max_len < argc) nonoption_flags_max_len = argc; __getopt_nonoption_flags = (char *) malloc (nonoption_flags_max_len); if (__getopt_nonoption_flags == NULL) nonoption_flags_max_len = -1; else memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), '\0', nonoption_flags_max_len - len); } } nonoption_flags_len = nonoption_flags_max_len; } else nonoption_flags_len = 0; #endif return optstring; } /* Scan elements of ARGV (whose length is ARGC) for option characters given in OPTSTRING. If an element of ARGV starts with '-', and is not exactly "-" or "--", then it is an option element. The characters of this element (aside from the initial '-') are option characters. If `getopt' is called repeatedly, it returns successively each of the option characters from each of the option elements. If `getopt' finds another option character, it returns that character, updating `optind' and `nextchar' so that the next call to `getopt' can resume the scan with the following option character or ARGV-element. If there are no more option characters, `getopt' returns -1. Then `optind' is the index in ARGV of the first ARGV-element that is not an option. (The ARGV-elements have been permuted so that those that are not options now come last.) OPTSTRING is a string containing the legitimate option characters. If an option character is seen that is not listed in OPTSTRING, return '?' after printing an error message. If you set `opterr' to zero, the error message is suppressed but we still return '?'. If a char in OPTSTRING is followed by a colon, that means it wants an arg, so the following text in the same ARGV-element, or the text of the following ARGV-element, is returned in `optarg'. Two colons mean an option that wants an optional arg; if there is text in the current ARGV-element, it is returned in `optarg', otherwise `optarg' is set to zero. If OPTSTRING starts with `-' or `+', it requests different methods of handling the non-option ARGV-elements. See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. Long-named options begin with `--' instead of `-'. Their names may be abbreviated as long as the abbreviation is unique or is an exact match for some defined option. If they have an argument, it follows the option name in the same ARGV-element, separated from the option name by a `=', or else the in next ARGV-element. When `getopt' finds a long-named option, it returns 0 if that option's `flag' field is nonzero, the value of the option's `val' field if the `flag' field is zero. The elements of ARGV aren't really const, because we permute them. But we pretend they're const in the prototype to be compatible with other systems. LONGOPTS is a vector of `struct option' terminated by an element containing a name which is zero. LONGIND returns the index in LONGOPT of the long-named option found. It is only valid when a long-named option has been found by the most recent call. If LONG_ONLY is nonzero, '-' as well as '--' can introduce long-named options. */ int _getopt_internal (argc, argv, optstring, longopts, longind, long_only) int argc; char *const *argv; const char *optstring; const struct option *longopts; int *longind; int long_only; { optarg = NULL; if (optind == 0 || !__getopt_initialized) { if (optind == 0) optind = 1; /* Don't scan ARGV[0], the program name. */ optstring = _getopt_initialize (argc, argv, optstring); __getopt_initialized = 1; } /* Test whether ARGV[optind] points to a non-option argument. Either it does not have option syntax, or there is an environment flag from the shell indicating it is not an option. The later information is only used when the used in the GNU libc. */ #ifdef _LIBC # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \ || (optind < nonoption_flags_len \ && __getopt_nonoption_flags[optind] == '1')) #else # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0') #endif if (nextchar == NULL || *nextchar == '\0') { /* Advance to the next ARGV-element. */ /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been moved back by the user (who may also have changed the arguments). */ if (last_nonopt > optind) last_nonopt = optind; if (first_nonopt > optind) first_nonopt = optind; if (ordering == PERMUTE) { /* If we have just processed some options following some non-options, exchange them so that the options come first. */ if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (last_nonopt != optind) first_nonopt = optind; /* Skip any additional non-options and extend the range of non-options previously skipped. */ while (optind < argc && NONOPTION_P) optind++; last_nonopt = optind; } /* The special ARGV-element `--' means premature end of options. Skip it like a null option, then exchange with previous non-options as if it were an option, then skip everything else like a non-option. */ if (optind != argc && !strcmp (argv[optind], "--")) { optind++; if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (first_nonopt == last_nonopt) first_nonopt = optind; last_nonopt = argc; optind = argc; } /* If we have done all the ARGV-elements, stop the scan and back over any non-options that we skipped and permuted. */ if (optind == argc) { /* Set the next-arg-index to point at the non-options that we previously skipped, so the caller will digest them. */ if (first_nonopt != last_nonopt) optind = first_nonopt; return -1; } /* If we have come to a non-option and did not permute it, either stop the scan or describe it to the caller and pass it by. */ if (NONOPTION_P) { if (ordering == REQUIRE_ORDER) return -1; optarg = argv[optind++]; return 1; } /* We have found another option-ARGV-element. Skip the initial punctuation. */ nextchar = (argv[optind] + 1 + (longopts != NULL && argv[optind][1] == '-')); } /* Decode the current option-ARGV-element. */ /* Check whether the ARGV-element is a long option. If long_only and the ARGV-element has the form "-f", where f is a valid short option, don't consider it an abbreviated form of a long option that starts with f. Otherwise there would be no way to give the -f short option. On the other hand, if there's a long option "fubar" and the ARGV-element is "-fu", do consider that an abbreviation of the long option, just like "--fu", and not "-f" with arg "u". This distinction seems to be the most useful approach. */ if (longopts != NULL && (argv[optind][1] == '-' || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1]))))) { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = -1; int option_index; for (nameend = nextchar; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, nextchar, nameend - nextchar)) { if ((unsigned int) (nameend - nextchar) == (unsigned int) strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (opterr) fprintf (stderr, _("%s: option `%s' is ambiguous\n"), argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; optopt = 0; return '?'; } if (pfound != NULL) { option_index = indfound; optind++; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) optarg = nameend + 1; else { if (opterr) { if (argv[optind - 1][1] == '-') /* --option */ fprintf (stderr, _("%s: option `--%s' doesn't allow an argument\n"), argv[0], pfound->name); else /* +option or -option */ fprintf (stderr, _("%s: option `%c%s' doesn't allow an argument\n"), argv[0], argv[optind - 1][0], pfound->name); nextchar += strlen (nextchar); optopt = pfound->val; return '?'; } } } else if (pfound->has_arg == 1) { if (optind < argc) optarg = argv[optind++]; else { if (opterr) fprintf (stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[optind - 1]); nextchar += strlen (nextchar); optopt = pfound->val; return optstring[0] == ':' ? ':' : '?'; } } nextchar += strlen (nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } /* Can't find it as a long option. If this is not getopt_long_only, or the option starts with '--' or is not a valid short option, then it's an error. Otherwise interpret it as a short option. */ if (!long_only || argv[optind][1] == '-' || my_index (optstring, *nextchar) == NULL) { if (opterr) { if (argv[optind][1] == '-') /* --option */ fprintf (stderr, _("%s: unrecognized option `--%s'\n"), argv[0], nextchar); else /* +option or -option */ fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), argv[0], argv[optind][0], nextchar); } nextchar = (char *) ""; optind++; optopt = 0; return '?'; } } /* Look at and handle the next short option-character. */ { char c = *nextchar++; char *temp = my_index (optstring, c); /* Increment `optind' when we start to process its last character. */ if (*nextchar == '\0') ++optind; if (temp == NULL || c == ':') { if (opterr) { if (posixly_correct) /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c); else fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c); } optopt = c; return '?'; } /* Convenience. Treat POSIX -W foo same as long option --foo */ if (temp[0] == 'W' && temp[1] == ';') { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = 0; int option_index; /* This is an option that requires an argument. */ if (*nextchar != '\0') { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == argc) { if (opterr) { /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); } optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; return c; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = argv[optind++]; /* optarg is now the argument, see if it's in the table of longopts. */ for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, nextchar, nameend - nextchar)) { if ((unsigned int) (nameend - nextchar) == strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (opterr) fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; return '?'; } if (pfound != NULL) { option_index = indfound; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) optarg = nameend + 1; else { if (opterr) fprintf (stderr, _("\ %s: option `-W %s' doesn't allow an argument\n"), argv[0], pfound->name); nextchar += strlen (nextchar); return '?'; } } else if (pfound->has_arg == 1) { if (optind < argc) optarg = argv[optind++]; else { if (opterr) fprintf (stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[optind - 1]); nextchar += strlen (nextchar); return optstring[0] == ':' ? ':' : '?'; } } nextchar += strlen (nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } nextchar = NULL; return 'W'; /* Let the application handle it. */ } if (temp[1] == ':') { if (temp[2] == ':') { /* This is an option that accepts an argument optionally. */ if (*nextchar != '\0') { optarg = nextchar; optind++; } else optarg = NULL; nextchar = NULL; } else { /* This is an option that requires an argument. */ if (*nextchar != '\0') { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == argc) { if (opterr) { /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); } optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = argv[optind++]; nextchar = NULL; } } return c; } } int getopt (argc, argv, optstring) int argc; char *const *argv; const char *optstring; { return _getopt_internal (argc, argv, optstring, (const struct option *) 0, (int *) 0, 0); } #endif /* Not ELIDE_CODE. */ #ifdef TEST /* Compile with -DTEST to make an executable for use in testing the above definition of `getopt'. */ int main (argc, argv) int argc; char **argv; { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; c = getopt (argc, argv, "abc:d:0123456789"); if (c == -1) break; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value `%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ libcdio-0.83/src/getopt1.c0000644000175000017500000001071211114145233012304 00000000000000/* getopt_long and getopt_long_only entry points for GNU getopt. Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@gnu.org. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include #endif #include "getopt.h" #if !defined __STDC__ || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ #ifndef const #define const #endif #endif #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #define GETOPT_INTERFACE_VERSION 2 #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 #include #if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION #define ELIDE_CODE #endif #endif #ifndef ELIDE_CODE /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ #include #endif #ifndef NULL #define NULL 0 #endif int getopt_long (argc, argv, options, long_options, opt_index) int argc; char *const *argv; const char *options; const struct option *long_options; int *opt_index; { return _getopt_internal (argc, argv, options, long_options, opt_index, 0); } /* Like getopt_long, but '-' as well as '--' can indicate a long option. If an option that starts with '-' (not '--') doesn't match a long option, but does match a short option, it is parsed as a short option instead. */ int getopt_long_only (argc, argv, options, long_options, opt_index) int argc; char *const *argv; const char *options; const struct option *long_options; int *opt_index; { return _getopt_internal (argc, argv, options, long_options, opt_index, 1); } #endif /* Not ELIDE_CODE. */ #ifdef TEST #include int main (argc, argv) int argc; char **argv; { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; int option_index = 0; static struct option long_options[] = { {"add", 1, 0, 0}, {"append", 0, 0, 0}, {"delete", 1, 0, 0}, {"verbose", 0, 0, 0}, {"create", 0, 0, 0}, {"file", 1, 0, 0}, {0, 0, 0, 0} }; c = getopt_long (argc, argv, "abc:d:0123456789", long_options, &option_index); if (c == -1) break; switch (c) { case 0: printf ("option %s", long_options[option_index].name); if (optarg) printf (" with arg %s", optarg); printf ("\n"); break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value `%s'\n", optarg); break; case 'd': printf ("option d with value `%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ libcdio-0.83/src/cd-drive.10000644000175000017500000000244411652140342012342 00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.38.4. .TH LT-CD-DRIVE "1" "October 2011" "lt-cd-drive version 0.83 i686-pc-linux-gnu" "User Commands" .SH NAME lt-cd-drive \- manual page for lt-cd-drive version 0.83 i686-pc-linux-gnu .SH SYNOPSIS .B cd-drive \fIOPTION\fR... .TP Shows CD-ROM drive characteristics. .SH DESCRIPTION .TP \fB\-d\fR, \fB\-\-debug\fR=\fIINT\fR Set debugging to LEVEL .TP \fB\-i\fR, \fB\-\-cdrom\-device\fR[=\fIDEVICE\fR] show only info about CD\-ROM device .TP \fB\-q\fR, \fB\-\-quiet\fR Don't produce warning output .TP \fB\-V\fR, \fB\-\-version\fR display version and copyright information and exit .SS "Help options:" .TP \-?, \fB\-\-help\fR Show this help message .TP \fB\-\-usage\fR Display brief usage message .SH AUTHOR Rocky Bernstein rocky@gnu.org .SH COPYRIGHT Copyright \(co 2003, 2004, 2005, 2007, 2008, 2011 R. Bernstein .br This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Have driver: GNU/Linux ioctl and MMC driver Have driver: cdrdao (TOC) disk image driver Have driver: bin/cuesheet disk image driver Have driver: Nero NRG disk image driver Default CD\-ROM device: /dev/scd0 .SH "SEE ALSO" \&\f(CWcd-info(1)\fR for information about the CD inside a CD-ROM. libcdio-0.83/src/Makefile.in0000644000175000017500000010564711652210027012637 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Id: Makefile.am,v 1.48 2008/08/31 13:38:22 flameeyes Exp $ # # Copyright (C) 2003, 2004, 2006, 2008 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \ $(am__EXEEXT_4) $(am__EXEEXT_5) $(am__EXEEXT_6) \ $(am__EXEEXT_7) $(am__EXEEXT_8) subdir = src DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @BUILD_CD_DRIVE_TRUE@am__EXEEXT_1 = cd-drive$(EXEEXT) @BUILD_CDINFO_TRUE@am__EXEEXT_2 = cd-info$(EXEEXT) @BUILD_CDINFO_LINUX_TRUE@am__EXEEXT_3 = cdinfo-linux$(EXEEXT) @BUILD_CD_READ_TRUE@am__EXEEXT_4 = cd-read$(EXEEXT) @BUILD_ISO_INFO_TRUE@am__EXEEXT_5 = iso-info$(EXEEXT) @BUILD_ISO_READ_TRUE@am__EXEEXT_6 = iso-read$(EXEEXT) @BUILD_CDDA_PLAYER_TRUE@am__EXEEXT_7 = cdda-player$(EXEEXT) am__EXEEXT_8 = mmc-tool$(EXEEXT) am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" PROGRAMS = $(bin_PROGRAMS) am__cd_drive_SOURCES_DIST = cd-drive.c util.c util.h getopt.c \ getopt1.c am__objects_1 = getopt.$(OBJEXT) getopt1.$(OBJEXT) @BUILD_CD_DRIVE_TRUE@am_cd_drive_OBJECTS = cd-drive.$(OBJEXT) \ @BUILD_CD_DRIVE_TRUE@ util.$(OBJEXT) $(am__objects_1) cd_drive_OBJECTS = $(am_cd_drive_OBJECTS) am__DEPENDENCIES_1 = @BUILD_CD_DRIVE_TRUE@cd_drive_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @BUILD_CD_DRIVE_TRUE@ $(am__DEPENDENCIES_1) \ @BUILD_CD_DRIVE_TRUE@ $(am__DEPENDENCIES_1) am__cd_info_SOURCES_DIST = cd-info.c cddb.c cddb.h util.c util.h \ getopt.c getopt1.c @BUILD_CDINFO_TRUE@am_cd_info_OBJECTS = cd-info.$(OBJEXT) \ @BUILD_CDINFO_TRUE@ cddb.$(OBJEXT) util.$(OBJEXT) \ @BUILD_CDINFO_TRUE@ $(am__objects_1) cd_info_OBJECTS = $(am_cd_info_OBJECTS) @BUILD_CDINFO_TRUE@cd_info_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @BUILD_CDINFO_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @BUILD_CDINFO_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am__cd_read_SOURCES_DIST = cd-read.c util.c util.h getopt.c getopt1.c @BUILD_CD_READ_TRUE@am_cd_read_OBJECTS = cd-read.$(OBJEXT) \ @BUILD_CD_READ_TRUE@ util.$(OBJEXT) $(am__objects_1) cd_read_OBJECTS = $(am_cd_read_OBJECTS) @BUILD_CD_READ_TRUE@cd_read_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @BUILD_CD_READ_TRUE@ $(am__DEPENDENCIES_1) \ @BUILD_CD_READ_TRUE@ $(am__DEPENDENCIES_1) am__cdda_player_SOURCES_DIST = cdda-player.c cddb.c cddb.h getopt.c \ getopt1.c @BUILD_CDDA_PLAYER_TRUE@am_cdda_player_OBJECTS = \ @BUILD_CDDA_PLAYER_TRUE@ cdda-player.$(OBJEXT) cddb.$(OBJEXT) \ @BUILD_CDDA_PLAYER_TRUE@ $(am__objects_1) cdda_player_OBJECTS = $(am_cdda_player_OBJECTS) @BUILD_CDDA_PLAYER_TRUE@cdda_player_DEPENDENCIES = \ @BUILD_CDDA_PLAYER_TRUE@ $(am__DEPENDENCIES_1) \ @BUILD_CDDA_PLAYER_TRUE@ $(am__DEPENDENCIES_1) \ @BUILD_CDDA_PLAYER_TRUE@ $(am__DEPENDENCIES_1) am__cdinfo_linux_SOURCES_DIST = cdinfo-linux.c @BUILD_CDINFO_LINUX_TRUE@am_cdinfo_linux_OBJECTS = \ @BUILD_CDINFO_LINUX_TRUE@ cdinfo-linux.$(OBJEXT) cdinfo_linux_OBJECTS = $(am_cdinfo_linux_OBJECTS) @BUILD_CDINFO_LINUX_TRUE@cdinfo_linux_DEPENDENCIES = \ @BUILD_CDINFO_LINUX_TRUE@ $(am__DEPENDENCIES_1) am__iso_info_SOURCES_DIST = iso-info.c util.c util.h getopt.c \ getopt1.c @BUILD_ISO_INFO_TRUE@am_iso_info_OBJECTS = iso-info.$(OBJEXT) \ @BUILD_ISO_INFO_TRUE@ util.$(OBJEXT) $(am__objects_1) iso_info_OBJECTS = $(am_iso_info_OBJECTS) @BUILD_ISO_INFO_TRUE@iso_info_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @BUILD_ISO_INFO_TRUE@ $(am__DEPENDENCIES_1) \ @BUILD_ISO_INFO_TRUE@ $(am__DEPENDENCIES_1) am__iso_read_SOURCES_DIST = iso-read.c util.c util.h getopt.c \ getopt1.c @BUILD_ISO_READ_TRUE@am_iso_read_OBJECTS = iso-read.$(OBJEXT) \ @BUILD_ISO_READ_TRUE@ util.$(OBJEXT) $(am__objects_1) iso_read_OBJECTS = $(am_iso_read_OBJECTS) @BUILD_ISO_READ_TRUE@iso_read_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @BUILD_ISO_READ_TRUE@ $(am__DEPENDENCIES_1) \ @BUILD_ISO_READ_TRUE@ $(am__DEPENDENCIES_1) am_mmc_tool_OBJECTS = mmc-tool.$(OBJEXT) util.$(OBJEXT) \ $(am__objects_1) mmc_tool_OBJECTS = $(am_mmc_tool_OBJECTS) mmc_tool_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(cd_drive_SOURCES) $(cd_info_SOURCES) $(cd_read_SOURCES) \ $(cdda_player_SOURCES) $(cdinfo_linux_SOURCES) \ $(iso_info_SOURCES) $(iso_read_SOURCES) $(mmc_tool_SOURCES) DIST_SOURCES = $(am__cd_drive_SOURCES_DIST) \ $(am__cd_info_SOURCES_DIST) $(am__cd_read_SOURCES_DIST) \ $(am__cdda_player_SOURCES_DIST) \ $(am__cdinfo_linux_SOURCES_DIST) $(am__iso_info_SOURCES_DIST) \ $(am__iso_read_SOURCES_DIST) $(mmc_tool_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) HEADERS = $(noinst_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = cd-paranoia DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDDA_PLAYER_LIBS = @CDDA_PLAYER_LIBS@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CDPARANOIA_NAME = @CDPARANOIA_NAME@ CFLAGS = @CFLAGS@ CMP = @CMP@ COS_LIB = @COS_LIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_PKG_LIB_HACK = @DARWIN_PKG_LIB_HACK@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ DIFF_OPTS = @DIFF_OPTS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GIT2CL = @GIT2CL@ GREP = @GREP@ HAVE_BSDI_CDROM = @HAVE_BSDI_CDROM@ HAVE_DARWIN_CDROM = @HAVE_DARWIN_CDROM@ HAVE_FREEBSD_CDROM = @HAVE_FREEBSD_CDROM@ HAVE_JOLIET = @HAVE_JOLIET@ HAVE_LINUX_CDROM = @HAVE_LINUX_CDROM@ HAVE_OS2_CDROM = @HAVE_OS2_CDROM@ HAVE_ROCK = @HAVE_ROCK@ HAVE_SOLARIS_CDROM = @HAVE_SOLARIS_CDROM@ HAVE_WIN32_CDROM = @HAVE_WIN32_CDROM@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDIOPP_LIBS = @LIBCDIOPP_LIBS@ LIBCDIO_CDDA_LIBS = @LIBCDIO_CDDA_LIBS@ LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ LIBCDIO_DEPS = @LIBCDIO_DEPS@ LIBCDIO_LIBS = @LIBCDIO_LIBS@ LIBCDIO_PARANOIA_LIBS = @LIBCDIO_PARANOIA_LIBS@ LIBCDIO_SOURCE_PATH = @LIBCDIO_SOURCE_PATH@ LIBCDIO_VERSION_NUM = @LIBCDIO_VERSION_NUM@ LIBICONV = @LIBICONV@ LIBISO9660PP_LIBS = @LIBISO9660PP_LIBS@ LIBISO9660_CFLAGS = @LIBISO9660_CFLAGS@ LIBISO9660_LIBS = @LIBISO9660_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBUDF_LIBS = @LIBUDF_LIBS@ LINUX_CDROM_TIMEOUT = @LINUX_CDROM_TIMEOUT@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_NO_UNDEFINED = @LT_NO_UNDEFINED@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OLD_CDPARANOIA = @OLD_CDPARANOIA@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SBPCD_H = @SBPCD_H@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TYPESIZES = @TYPESIZES@ UCDROM_H = @UCDROM_H@ VCDINFO_CFLAGS = @VCDINFO_CFLAGS@ VCDINFO_LIBS = @VCDINFO_LIBS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ GETOPT_C = getopt.c getopt1.c noinst_HEADERS = cddb.h getopt.h util.h #################################################### # Things to make the utility/diagnostic programs #################################################### @BUILD_CD_PARANOIA_TRUE@SUBDIRS = cd-paranoia @BUILD_CDDA_PLAYER_TRUE@cdda_player_SOURCES = cdda-player.c cddb.c cddb.h $(GETOPT_C) @BUILD_CDDA_PLAYER_TRUE@cdda_player_LDADD = $(LIBCDIO_LIBS) $(CDDB_LIBS) $(CDDA_PLAYER_LIBS) @BUILD_CDDA_PLAYER_TRUE@bin_cdda_player = cdda-player @BUILD_CD_DRIVE_TRUE@cd_drive_SOURCES = cd-drive.c util.c util.h $(GETOPT_C) @BUILD_CD_DRIVE_TRUE@cd_drive_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) @BUILD_CD_DRIVE_TRUE@bin_cd_drive = cd-drive @BUILD_CD_DRIVE_TRUE@man_cd_drive = cd-drive.1 @BUILD_CDINFO_TRUE@cd_info_SOURCES = cd-info.c cddb.c cddb.h util.c util.h $(GETOPT_C) @BUILD_CDINFO_TRUE@cd_info_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(CDDB_LIBS) $(VCDINFO_LIBS) $(LTLIBICONV) @BUILD_CDINFO_TRUE@bin_cd_info = cd-info @BUILD_CDINFO_TRUE@man_cd_info = cd-info.1 @BUILD_CDINFO_LINUX_TRUE@cdinfo_linux_SOURCES = cdinfo-linux.c @BUILD_CDINFO_LINUX_TRUE@cdinfo_linux_LDADD = $(LIBCDIO_LIBS) @BUILD_CDINFO_LINUX_TRUE@bin_cdinfo_linux = cdinfo-linux @BUILD_CD_READ_TRUE@cd_read_SOURCES = cd-read.c util.c util.h $(GETOPT_C) @BUILD_CD_READ_TRUE@cd_read_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) @BUILD_CD_READ_TRUE@bin_cd_read = cd-read @BUILD_CD_READ_TRUE@man_cd_read = cd-read.1 @BUILD_ISO_INFO_TRUE@iso_info_SOURCES = iso-info.c util.c util.h $(GETOPT_C) @BUILD_ISO_INFO_TRUE@iso_info_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) @BUILD_ISO_INFO_TRUE@bin_iso_info = iso-info @BUILD_ISO_INFO_TRUE@man_iso_info = iso-info.1 @BUILD_ISO_READ_TRUE@iso_read_SOURCES = iso-read.c util.c util.h $(GETOPT_C) @BUILD_ISO_READ_TRUE@iso_read_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) @BUILD_ISO_READ_TRUE@bin_iso_read = iso-read @BUILD_ISO_READ_TRUE@man_iso_read = iso-read.1 mmc_tool_SOURCES = mmc-tool.c util.c util.h $(GETOPT_C) mmc_tool_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) bin_mmc_tool = mmc-tool INCLUDES = -I$(top_srcdir) $(LIBCDIO_CFLAGS) $(VCDINFO_CFLAGS) $(CDDB_CFLAGS) man_MANS = $(man_cd_drive) $(man_cd_info) $(man_cd_read) $(man_iso_read) $(man_iso_info) EXTRA_DIST = cd-drive.help2man cd-info.help2man cd-read.help2man \ iso-info.help2man iso-read.help2man $(GETOPT_C) getopt.h \ $(man_MANS) MAINTAINERCLEANFILES = $(man_MANS) *.rej *.orig all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list cd-drive$(EXEEXT): $(cd_drive_OBJECTS) $(cd_drive_DEPENDENCIES) @rm -f cd-drive$(EXEEXT) $(LINK) $(cd_drive_OBJECTS) $(cd_drive_LDADD) $(LIBS) cd-info$(EXEEXT): $(cd_info_OBJECTS) $(cd_info_DEPENDENCIES) @rm -f cd-info$(EXEEXT) $(LINK) $(cd_info_OBJECTS) $(cd_info_LDADD) $(LIBS) cd-read$(EXEEXT): $(cd_read_OBJECTS) $(cd_read_DEPENDENCIES) @rm -f cd-read$(EXEEXT) $(LINK) $(cd_read_OBJECTS) $(cd_read_LDADD) $(LIBS) cdda-player$(EXEEXT): $(cdda_player_OBJECTS) $(cdda_player_DEPENDENCIES) @rm -f cdda-player$(EXEEXT) $(LINK) $(cdda_player_OBJECTS) $(cdda_player_LDADD) $(LIBS) cdinfo-linux$(EXEEXT): $(cdinfo_linux_OBJECTS) $(cdinfo_linux_DEPENDENCIES) @rm -f cdinfo-linux$(EXEEXT) $(LINK) $(cdinfo_linux_OBJECTS) $(cdinfo_linux_LDADD) $(LIBS) iso-info$(EXEEXT): $(iso_info_OBJECTS) $(iso_info_DEPENDENCIES) @rm -f iso-info$(EXEEXT) $(LINK) $(iso_info_OBJECTS) $(iso_info_LDADD) $(LIBS) iso-read$(EXEEXT): $(iso_read_OBJECTS) $(iso_read_DEPENDENCIES) @rm -f iso-read$(EXEEXT) $(LINK) $(iso_read_OBJECTS) $(iso_read_LDADD) $(LIBS) mmc-tool$(EXEEXT): $(mmc_tool_OBJECTS) $(mmc_tool_DEPENDENCIES) @rm -f mmc-tool$(EXEEXT) $(LINK) $(mmc_tool_OBJECTS) $(mmc_tool_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cd-drive.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cd-info.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cd-read.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdda-player.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cddb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdinfo-linux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iso-info.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iso-read.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmc-tool.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list=''; test -n "$(man1dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(PROGRAMS) $(MANS) $(HEADERS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-man install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-man1 install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-man uninstall-man: uninstall-man1 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags ctags-recursive distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-man1 install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-man uninstall-man1 @MAINTAINER_MODE_TRUE@$(man_MANS): %.1: %$(EXEEXT) %.help2man @MAINTAINER_MODE_TRUE@ -$(HELP2MAN) --opt-include=$(srcdir)/$(<:.exe=).help2man --no-info --output=$@ ./$< # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libcdio-0.83/THANKS0000644000175000017500000000433711650320562010714 00000000000000Geoff Bailey FreeBSD debugging & testing Burkhard Plaum some GNU/Linux and CD-Text patches Carlo Bramini fixes for Mingw+MSYS and DLL support Dagobert Michelsen Solaris compilation issues and the wonderful test Solaris test platform opencsw.org Diego 'Flameeyes' Petten patches to FreeBSD and making Gentoo-friendly Frank Endres mmc_get_disc_erasable Frantisek Dvorak : bug reports and miscellaneous fixes Heiner FreeBSD CAM support and FreeBSD debugging & testing Ian MacIntosh Sun-related things. Justin B. Ruggles SCSI MMC discmode determination via Read TOC. Justin F. Hallett Fink packaging and matters OSX KO Myung-Hun OS2 Driver Kris Verbeeck : CDDB library support from libcddb http://libcddb.sourceforge.net Gentoo ebuild-file Manfred Tremmel : RPM spec file and inclusion of libcdio into http://packman.links2linux.de/ Michael Kukat , for the hints in extractnrg.pl Nicolas Boullis Build issues, library symbol versioning, Debian packaging and issues Patrick Guimond CD-Extra audio data boundaries Peter Hartley Cross-compiling to mingw32 Peter J. Creath removal of libpopt, paranoia documentation, some bug fixes to cd-* programs and the paranoia lib Steven M. Schultz All things BSDI and the use of a really fabulous Darwin G5 box. Svend S. Sorensen cdrdao TOC-reading and CDRWin CUE parsing code based on cuetools http://cuetools.sourceforge.net/ xboxmediacenter team (www.xboxmediacenter.de) X-Box detection and XDF filesystem things Thomas Schmitt Recording and retrieval of SCSI sense reply. Write/burning interface. MMC bug fixes Daniel Schwarz log-summary option in cd-paranoia. Robert William Fuller get_track_pregap_lba, get_track_pregap_lsn. Section on "CD-DA pregap" in libcdio manual. Scot C. Bontrager mmc routine to get the ISRC information on a CD that is in the q subchannel but not showing up in the CDTEXT. Addition of this information to cd-info. libcdio-0.83/config.guess0000755000175000017500000012761511652140255012327 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. timestamp='2009-11-20' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner. Please send patches (context # diff format) to and include a ChangeLog # entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in i386) eval $set_cc_for_build if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then UNAME_PROCESSOR="x86_64" fi fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: libcdio-0.83/ltmain.sh0000755000175000017500000073341511652140251011627 00000000000000# Generated from ltmain.m4sh. # ltmain.sh (GNU libtool) 2.2.6b # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print informational messages (default) # --version print version information # -h, --help print short or long help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu3 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . PROGRAM=ltmain.sh PACKAGE=libtool VERSION="2.2.6b Debian-2.2.6b-2ubuntu3" TIMESTAMP="" package_revision=1.3017 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # NLS nuisances: We save the old values to restore during execute mode. # Only set LANG and LC_ALL to C if already set. # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done $lt_unset CDPATH : ${CP="cp -f"} : ${ECHO="echo"} : ${EGREP="/bin/grep -E"} : ${FGREP="/bin/grep -F"} : ${GREP="/bin/grep"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } # Generated shell functions inserted here. # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # The name of this program: # In the unlikely event $progname began with a '-', it would play havoc with # func_echo (imagine progname=-n), so we prepend ./ in that case: func_dirname_and_basename "$progpath" progname=$func_basename_result case $progname in -*) progname=./$progname ;; esac # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=: for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname${mode+: }$mode: $*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` done my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "X$my_tmpdir" | $Xsed } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "X$1" | $Xsed \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_version # Echo version message to standard output and exit. func_version () { $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $SED -n '/^# Usage:/,/# -h/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" $ECHO $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help # Echo long help message to standard output and exit. func_help () { $SED -n '/^# Usage:/,/# Report bugs to/ { s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p }' < "$progpath" exit $? } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { func_error "missing argument for $1" exit_cmd=exit } exit_cmd=: # Check that we have a working $ECHO. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then # Yippee, $ECHO works! : else # Restart under the correct shell, and then maybe $ECHO will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # Parse options once, thoroughly. This comes as soon as possible in # the script to make things like `libtool --version' happen quickly. { # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Parse non-mode specific arguments: while test "$#" -gt 0; do opt="$1" shift case $opt in --config) func_config ;; --debug) preserve_args="$preserve_args $opt" func_echo "enabling shell trace mode" opt_debug='set -x' $opt_debug ;; -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break execute_dlfiles="$execute_dlfiles $1" shift ;; --dry-run | -n) opt_dry_run=: ;; --features) func_features ;; --finish) mode="finish" ;; --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break case $1 in # Valid mode arguments: clean) ;; compile) ;; execute) ;; finish) ;; install) ;; link) ;; relink) ;; uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac mode="$1" shift ;; --preserve-dup-deps) opt_duplicate_deps=: ;; --quiet|--silent) preserve_args="$preserve_args $opt" opt_silent=: ;; --verbose| -v) preserve_args="$preserve_args $opt" opt_silent=false ;; --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break preserve_args="$preserve_args $opt $1" func_enable_tag "$1" # tagname is set here shift ;; # Separate optargs to long options: -dlopen=*|--mode=*|--tag=*) func_opt_split "$opt" set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} shift ;; -\?|-h) func_usage ;; --help) opt_help=: ;; --version) func_version ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) nonopt="$opt" break ;; esac done case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_duplicate_deps ;; esac # Having warned about all mis-specified options, bail out if # anything was wrong. $exit_cmd $EXIT_FAILURE } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } ## ----------- ## ## Main. ## ## ----------- ## $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi test -z "$mode" && func_fatal_error "error: you must specify a MODE." # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$mode' for more information." } # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_ltwrapper_scriptname_result="" if func_ltwrapper_executable_p "$1"; then func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" fi } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" done case "$@ " in " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T <?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi removelist="$removelist $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist removelist="$removelist $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir command="$command -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then command="$command -o $obj" fi # Suppress compiler output if we already did a PIC compilation. command="$command$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$mode'" ;; esac $ECHO $ECHO "Try \`$progname --help' for more information about other modes." exit $? } # Now that we've collected a possible --mode arg, show help if necessary $opt_help && func_mode_help # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $execute_dlfiles; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_quote_for_eval "$file" args="$args $func_quote_for_eval_result" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" $ECHO "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS $ECHO "X----------------------------------------------------------------------" | $Xsed $ECHO "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done $ECHO $ECHO "If you ever happen to want to link against installed libraries" $ECHO "in a given directory, LIBDIR, you must either use libtool, and" $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" $ECHO "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" $ECHO " during execution" fi if test -n "$runpath_var"; then $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" $ECHO " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $ECHO $ECHO "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" $ECHO "pages." ;; *) $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac $ECHO "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS } test "$mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $ECHO "X$nonopt" | $GREP shtool >/dev/null; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" install_prog="$install_prog$func_quote_for_eval_result" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) case " $install_prog " in *[\\\ /]cp\ *) ;; *) prev=$arg ;; esac ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" install_prog="$install_prog $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for progfile in $progfiles; do func_verbose "extracting global C symbols from \`$progfile'" $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" } done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" fi $ECHO >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; " case $host in *cygwin* | *mingw* | *cegcc* ) $ECHO >> "$output_objdir/$my_dlsyms" "\ /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */" lt_dlsym_const= ;; *osf5*) echo >> "$output_objdir/$my_dlsyms" "\ /* This system does not cope well with relocations in const data */" lt_dlsym_const= ;; *) lt_dlsym_const=const ;; esac $ECHO >> "$output_objdir/$my_dlsyms" "\ extern $lt_dlsym_const lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; $lt_dlsym_const lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac $ECHO >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) symtab_cflags="$symtab_cflags $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper_part1 [arg=no] # # Emit the first part of a libtool wrapper script on stdout. # For more information, see the description associated with # func_emit_wrapper(), below. func_emit_wrapper_part1 () { func_emit_wrapper_part1_arg1=no if test -n "$1" ; then func_emit_wrapper_part1_arg1=$1 fi $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then ECHO=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then # Yippee, \$ECHO works! : else # Restart under the correct shell, and then maybe \$ECHO will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $ECHO "\ # Find the directory that this script lives in. thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done " } # end: func_emit_wrapper_part1 # func_emit_wrapper_part2 [arg=no] # # Emit the second part of a libtool wrapper script on stdout. # For more information, see the description associated with # func_emit_wrapper(), below. func_emit_wrapper_part2 () { func_emit_wrapper_part2_arg1=no if test -n "$1" ; then func_emit_wrapper_part2_arg1=$1 fi $ECHO "\ # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # end: func_emit_wrapper_part2 # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=no if test -n "$1" ; then func_emit_wrapper_arg1=$1 fi # split this up so that func_emit_cwrapperexe_src # can call each part independently. func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" } # func_to_host_path arg # # Convert paths to host format when used with build tools. # Intended for use with "native" mingw (where libtool itself # is running under the msys shell), or in the following cross- # build environments: # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # where wine is equipped with the `winepath' executable. # In the native mingw case, the (msys) shell automatically # converts paths for any non-msys applications it launches, # but that facility isn't available from inside the cwrapper. # Similar accommodations are necessary for $host mingw and # $build cygwin. Calling this function does no harm for other # $host/$build combinations not listed above. # # ARG is the path (on $build) that should be converted to # the proper representation for $host. The result is stored # in $func_to_host_path_result. func_to_host_path () { func_to_host_path_result="$1" if test -n "$1" ; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' case $build in *mingw* ) # actually, msys # awkward: cmd appends spaces to result lt_sed_strip_trailing_spaces="s/[ ]*\$//" func_to_host_path_tmp1=`( cmd //c echo "$1" |\ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_path_tmp1=`cygpath -w "$1"` func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` ;; * ) # Unfortunately, winepath does not exit with a non-zero # error code, so we are forced to check the contents of # stdout. On the other hand, if the command is not # found, the shell will set an exit code of 127 and print # *an error message* to stdout. So we must check for both # error code of zero AND non-empty stdout, which explains # the odd construction: func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` else # Allow warning below. func_to_host_path_result="" fi ;; esac if test -z "$func_to_host_path_result" ; then func_error "Could not determine host path corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_path_result="$1" fi ;; esac fi } # end: func_to_host_path # func_to_host_pathlist arg # # Convert pathlists to host format when used with build tools. # See func_to_host_path(), above. This function supports the # following $build/$host combinations (but does no harm for # combinations not listed here): # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # # Path separators are also converted from $build format to # $host format. If ARG begins or ends with a path separator # character, it is preserved (but converted to $host format) # on output. # # ARG is a pathlist (on $build) that should be converted to # the proper representation on $host. The result is stored # in $func_to_host_pathlist_result. func_to_host_pathlist () { func_to_host_pathlist_result="$1" if test -n "$1" ; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_to_host_pathlist_tmp2="$1" # Once set for this call, this variable should not be # reassigned. It is used in tha fallback case. func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e 's|^:*||' -e 's|:*$||'` case $build in *mingw* ) # Actually, msys. # Awkward: cmd appends spaces to result. lt_sed_strip_trailing_spaces="s/[ ]*\$//" func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e "$lt_sed_naive_backslashify"` ;; * ) # unfortunately, winepath doesn't convert pathlists func_to_host_pathlist_result="" func_to_host_pathlist_oldIFS=$IFS IFS=: for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do IFS=$func_to_host_pathlist_oldIFS if test -n "$func_to_host_pathlist_f" ; then func_to_host_path "$func_to_host_pathlist_f" if test -n "$func_to_host_path_result" ; then if test -z "$func_to_host_pathlist_result" ; then func_to_host_pathlist_result="$func_to_host_path_result" else func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" fi fi fi IFS=: done IFS=$func_to_host_pathlist_oldIFS ;; esac if test -z "$func_to_host_pathlist_result" ; then func_error "Could not determine the host path(s) corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This may break if $1 contains DOS-style drive # specifications. The fix is not to complicate the expression # below, but for the user to provide a working wine installation # with winepath so that path translation in the cross-to-mingw # case works properly. lt_replace_pathsep_nix_to_dos="s|:|;|g" func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ $SED -e "$lt_replace_pathsep_nix_to_dos"` fi # Now, add the leading and trailing path separators back case "$1" in :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" ;; esac case "$1" in *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" ;; esac ;; esac fi } # end: func_to_host_pathlist # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include # define setmode _setmode #else # include # include # ifdef __CYGWIN__ # include # define HAVE_SETENV # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif # endif #endif #include #include #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif #ifdef _MSC_VER # define S_IXUSR _S_IEXEC # define stat _stat # ifndef _INTPTR_T_DEFINED # define intptr_t int # endif #endif #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifdef __CYGWIN__ # define FOPEN_WB "wb" #endif #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #undef LTWRAPPER_DEBUGPRINTF #if defined DEBUGWRAPPER # define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args static void ltwrapper_debugprintf (const char *fmt, ...) { va_list args; va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } #else # define LTWRAPPER_DEBUGPRINTF(args) #endif const char *program_name = NULL; void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_fatal (const char *message, ...); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_opt_process_env_set (const char *arg); void lt_opt_process_env_prepend (const char *arg); void lt_opt_process_env_append (const char *arg); int lt_split_name_value (const char *arg, char** name, char** value); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); static const char *script_text_part1 = EOF func_emit_wrapper_part1 yes | $SED -e 's/\([\\"]\)/\\\1/g' \ -e 's/^/ "/' -e 's/$/\\n"/' echo ";" cat <"))); for (i = 0; i < newargc; i++) { LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); } EOF case $host_os in mingw*) cat <<"EOF" /* execv doesn't actually work on mingw as expected on unix */ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); if (rval == -1) { /* failed to start process */ LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); return 127; } return rval; EOF ;; *) cat <<"EOF" execv (lt_argv_zero, newargz); return rval; /* =127, but avoids unused variable warning */ EOF ;; esac cat <<"EOF" } void * xmalloc (size_t num) { void *p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL; } const char * base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char) name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return base; } int check_executable (const char *path) { struct stat st; LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); if ((!path) || (!*path)) return 0; if ((stat (path, &st) >= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", tmp_pathspec)); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { char *errstr = strerror (errno); lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal ("Could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } void lt_setenv (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", (name ? name : ""), (value ? value : ""))); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } int lt_split_name_value (const char *arg, char** name, char** value) { const char *p; int len; if (!arg || !*arg) return 1; p = strchr (arg, (int)'='); if (!p) return 1; *value = xstrdup (++p); len = strlen (arg) - strlen (*value); *name = XMALLOC (char, len); strncpy (*name, arg, len-1); (*name)[len - 1] = '\0'; return 0; } void lt_opt_process_env_set (const char *arg) { char *name = NULL; char *value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); } lt_setenv (name, value); XFREE (name); XFREE (value); } void lt_opt_process_env_prepend (const char *arg) { char *name = NULL; char *value = NULL; char *new_value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); } new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); XFREE (name); XFREE (value); } void lt_opt_process_env_append (const char *arg) { char *name = NULL; char *value = NULL; char *new_value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); } new_value = lt_extend_str (getenv (name), value, 1); lt_setenv (name, new_value); XFREE (new_value); XFREE (name); XFREE (value); } void lt_update_exe_path (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? value : ""))); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? value : ""))); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF } # end: func_emit_cwrapperexe_src # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) deplibs="$deplibs $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) weak_libs="$weak_libs $arg" prev= continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname '-L' '' "$arg" dir=$func_stripname_result if test -z "$dir"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot) compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" arg="$arg $wl$func_quote_for_eval_result" compiler_flags="$compiler_flags $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" arg="$arg $wl$func_quote_for_eval_result" compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" linker_flags="$linker_flags $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # -64, -mips[0-9] enable 64-bit mode on the SGI compiler # -r[0-9][0-9]* specifies the processor on the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC # -F/path gives path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC # @file GCC response files -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" compiler_flags="$compiler_flags $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_duplicate_deps ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= case $lib in *.la) func_source "$lib" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` case " $weak_libs " in *" $deplib_base "*) ;; *) deplibs="$deplibs $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" dir=$func_stripname_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then $ECHO $ECHO "*** Warning: Trying to link with static lib archive $deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because the file extensions .$libext of this argument makes me believe" $ECHO "*** that it is just a static archive that I should not use here." else $ECHO $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) temp_rpath="$temp_rpath$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded notinst_deplibs="$notinst_deplibs $lib" need_relink=no ;; *) if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then $ECHO if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $ECHO $ECHO "*** And there doesn't seem to be a static archive available" $ECHO "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $ECHO $ECHO "*** Warning: This system can not link to static lib archive $lib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $ECHO "*** But as you try to build a module library, libtool will still create " $ECHO "*** a static module, that should work as long as the dlopening application" $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $ECHO $ECHO "*** However, this would only work if libtool was able to extract symbol" $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" $ECHO "*** not find such a program. So, this module is probably useless." $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_dirname "$deplib" "" "." dir="$func_dirname_result" # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else $ECHO $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type \`$version_type'" ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" libobjs="$libobjs $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $ECHO $ECHO "*** Warning: linker path does not have real file for library $a_deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $ECHO $ECHO "*** Warning: linker path does not have real file for library $a_deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` done fi if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | $GREP . >/dev/null; then $ECHO if test "X$deplibs_check_method" = "Xnone"; then $ECHO "*** Warning: inter-library dependencies are not supported in this platform." else $ECHO "*** Warning: inter-library dependencies are not known to be supported." fi $ECHO "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $ECHO $ECHO "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" $ECHO "*** a static module, that should work as long as the dlopening" $ECHO "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $ECHO $ECHO "*** However, this would only work if libtool was able to extract symbol" $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" $ECHO "*** not find such a program. So, this module is probably useless." $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $ECHO "*** The inter-library dependencies that have been dropped here will be" $ECHO "*** automatically added whenever a program is linked with this library" $ECHO "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $ECHO $ECHO "*** Since this library must not contain undefined symbols," $ECHO "*** because either the platform does not support them or" $ECHO "*** it was explicitly requested with -no-undefined," $ECHO "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" delfiles="$delfiles $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" func_len " $cmd" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then func_show_eval "$cmd" 'exit $?' skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output output_la=`$ECHO "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" $ECHO 'INPUT (' > $output for obj in $save_libobjs do $ECHO "$obj" >> $output done $ECHO ')' >> $output delfiles="$delfiles $output" elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do $ECHO "$obj" >> $output done delfiles="$delfiles $output" output=$firstobj\"$file_list_spec$output\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=$obj func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi delfiles="$delfiles $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles libobjs="$libobjs $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done compile_deplibs="$new_libs" compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *cegcc) # Disable wrappers for cegcc, we are cross compiling anyway. wrappers_required=no ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $ECHO for shipping. if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then oldobjs="$oldobjs $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles oldobjs="$oldobjs $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else $ECHO "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" newdlfiles="$newdlfiles $libdir/$name" ;; *) newdlfiles="$newdlfiles $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" newdlprefiles="$newdlprefiles $libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$mode" = link || test "$mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) RM="$RM $arg"; rmforce=yes ;; -*) RM="$RM $arg" ;; *) files="$files $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= origobjdir="$objdir" for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then objdir="$origobjdir" else objdir="$dir/$origobjdir" fi func_basename "$file" name="$func_basename_result" test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" case "$mode" in clean) case " $library_names " in # " " in the beginning catches empty $dlname *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result rmfiles="$rmfiles $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$mode" = uninstall || test "$mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 libcdio-0.83/libiso9660.pc.in0000644000175000017500000000043111126441340012523 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ libiconv=@LTLIBICONV@ Name: libiso9660 Description: ISO-9660 library of libcdio Version: @PACKAGE_VERSION@ Requires: libcdio Libs: -L${libdir} -liso9660 @LTLIBICONV@ -lcdio Cflags: -I${includedir} libcdio-0.83/libcdio++.pc.in0000644000175000017500000000044111114145233012450 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: @PACKAGE_NAME@++ Description: C++ OO Portable CD-ROM I/O library Version: @PACKAGE_VERSION@ #Requires: glib-2.0 Libs: -L${libdir} -lcdio++ -lcdio @LIBS@ @DARWIN_PKG_LIB_HACK@ Cflags: -I${includedir} libcdio-0.83/libcdio_paranoia.pc.in0000644000175000017500000000042511114145233014176 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: libcdio_paranoia Description: CD paranoia library from libcdio Version: @PACKAGE_VERSION@ #Requires: glib-2.0 Libs: -L${libdir} -lcdio_paranoia -lcdio_cdda -lcdio Cflags: -I${includedir} libcdio-0.83/test/0000755000175000017500000000000011652210415011026 500000000000000libcdio-0.83/test/testisocd2.c.in0000644000175000017500000000751411325727471013625 00000000000000/* $Id: testisocd2.c.in,v 1.2 2008/03/22 18:08:25 karl Exp $ Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Tests reading ISO 9660 info from an ISO 9660 image. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "portable.h" #include #include #include #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif /* Set up a CD-DA image to test on which is in the libcdio distribution. */ #define ISO9660_IMAGE_PATH "@abs_top_srcdir@/test/data/" #define ISO9660_IMAGE ISO9660_IMAGE_PATH "copying.iso" #define SKIP_TEST_RC 77 int main(int argc, const char *argv[]) { iso9660_t *p_iso; p_iso = iso9660_open (ISO9660_IMAGE); if (!p_iso) { fprintf(stderr, "Sorry, couldn't open ISO9660 image %s\n", ISO9660_IMAGE); return 1; } else { /* You make get different results looking up "/" versus "/." and the latter may give more complete information. "/" will take information from the PVD only, whereas "/." will force a directory read of "/" and find "." and in that Rock-Ridge information might be found which fills in more stat information that iso9660_fs_find_lsn also will find. . Ideally iso9660_fs_stat should be fixed. */ iso9660_stat_t *p_statbuf = iso9660_ifs_stat (p_iso, "/."); if (NULL == p_statbuf) { fprintf(stderr, "Could not get ISO-9660 file information for file /.\n"); iso9660_close(p_iso); exit(2); } else { /* Now try getting the statbuf another way */ char buf[ISO_BLOCKSIZE]; char *psz_path = NULL; const lsn_t i_lsn = p_statbuf->lsn; const iso9660_stat_t *p_statbuf2 = iso9660_ifs_find_lsn (p_iso, i_lsn); const iso9660_stat_t *p_statbuf3 = iso9660_ifs_find_lsn_with_path (p_iso, i_lsn, &psz_path); /* Compare the two statbufs. */ if (p_statbuf->lsn != p_statbuf2->lsn || p_statbuf->size != p_statbuf2->size || p_statbuf->type != p_statbuf2->type) { fprintf(stderr, "File stat information between fs_stat and " "iso9660_ifs_find_lsn isn't the same\n"); exit(3); } if (p_statbuf3->lsn != p_statbuf2->lsn || p_statbuf3->size != p_statbuf2->size || p_statbuf3->type != p_statbuf2->type) { exit(4); } if (psz_path != NULL) { if (0 != strncmp("/./", psz_path, strlen("/./"))) { fprintf(stderr, "Path returned for ifs_find_lsn_with_path " "is not correct should be /./, is %s\n", psz_path); exit(5); } free(psz_path); } else { fprintf(stderr, "Path returned for fs_find_lsn_with_path is NULL\n"); exit(6); } /* Try reading from the directory. */ memset (buf, 0, ISO_BLOCKSIZE); if ( ISO_BLOCKSIZE != iso9660_iso_seek_read (p_iso, buf, i_lsn, 1) ) { fprintf(stderr, "Error reading ISO 9660 file at lsn %lu\n", (long unsigned int) p_statbuf->lsn); exit(7); } exit(0); } } exit(0); } libcdio-0.83/test/check_opts2.right0000644000175000017500000000052511642541561014223 00000000000000__________________________________ Disc mode is listed as: CD-DATA (Mode 1) CD-ROM Track List (1 - 1) #: MSF LSN Type Green? Copy? 1: 00:02:00 000000 data false no 170: 00:06:02 000302 leadout (693 KB raw, 604 KB formatted) Media Catalog Number (MCN): not available Last CD Session LSN: not supported by drive/driver libcdio-0.83/test/copying.right0000644000175000017500000000033411642541561013465 00000000000000__________________________________ ISO-9660 Information /: d [LSN 23] 2048 Jan 05 2006 21:50:19 . d [LSN 23] 2048 Jan 05 2006 21:50:19 .. - [LSN 24] 18002 Jan 05 2006 21:46:30 copying libcdio-0.83/test/testunconfig.c0000644000175000017500000000232111650136131013620 00000000000000/* Copyright (C) 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Regression test config.h and cdio_unconfig and cdio_free_device_list() */ #include "config.h" #define __CDIO_CONFIG_H__ 1 #include "cdio/cdio_config.h" /* should do nothing */ #include "cdio/cdio.h" #include int main(int argc, const char *argv[]) { #ifndef PACKAGE printf("config.h should have set PACKAGE preprocessor symbol\n"); #endif #include "cdio/cdio_unconfig.h" #ifdef PACKAGE printf("cdio_unconfig should have removed PACKAGE preprocessor symbol\n"); return 2; #else return 0; #endif } libcdio-0.83/test/cdda.right0000644000175000017500000000105611642541560012711 00000000000000__________________________________ Disc mode is listed as: CD-DA CD-ROM Track List (1 - 1) #: MSF LSN Type Green? Copy? Channels Premphasis? 1: 00:02:00 000000 audio false yes 2 no 170: 00:06:02 000302 leadout (693 KB raw, 693 KB formatted) Media Catalog Number (MCN): 0000010271955 Last CD Session LSN: not supported by drive/driver audio status: not implemented __________________________________ CD Analysis Report CD-TEXT for Disc: PERFORMER: Richard Stallman TITLE: Join us now we have the software CD-TEXT for Track 1: libcdio-0.83/test/testisocd.c0000644000175000017500000001101111650130563013110 00000000000000/* Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Tests reading ISO 9660 info from a CD. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include "portable.h" #include #include #include #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #define SKIP_TEST_RC 77 int main(int argc, const char *argv[]) { char **ppsz_cd_drives; /* List of all drives with an ISO9660 filesystem. */ driver_id_t driver_id; /* Driver ID found */ char *psz_drive; /* Name of drive */ CdIo_t *p_cdio; /* See if we can find a device with a loaded CD-DA in it. If successful drive_id will be set. */ ppsz_cd_drives = cdio_get_devices_with_cap_ret(NULL, CDIO_FS_ANAL_ISO9660_ANY, true, &driver_id); if (ppsz_cd_drives && ppsz_cd_drives[0]) { /* Found such a CD-ROM with an ISO 9660 filesystem. Use the first drive in the list. */ psz_drive = strdup(ppsz_cd_drives[0]); /* Don't need a list of CD's with CD-DA's any more. */ cdio_free_device_list(ppsz_cd_drives); } else { printf("Unable find or access a CD-ROM drive with an ISO-9660 " "filesystem.\n"); exit(SKIP_TEST_RC); } p_cdio = cdio_open (psz_drive, driver_id); if (!p_cdio) { fprintf(stderr, "Sorry, couldn't open %s\n", psz_drive); return 1; } else { /* You make get different results looking up "/" versus "/." and the latter may give more complete information. "/" will take information from the PVD only, whereas "/." will force a directory read of "/" and find "." and in that Rock-Ridge information might be found which fills in more stat information that iso9660_fs_find_lsn also will find. . Ideally iso9660_fs_stat should be fixed. */ iso9660_stat_t *p_statbuf = iso9660_fs_stat (p_cdio, "/."); if (NULL == p_statbuf) { fprintf(stderr, "Could not get ISO-9660 file information for file /.\n"); cdio_destroy(p_cdio); exit(2); } else { /* Now try getting the statbuf another way */ char buf[ISO_BLOCKSIZE]; char *psz_path = NULL; const lsn_t i_lsn = p_statbuf->lsn; const iso9660_stat_t *p_statbuf2 = iso9660_fs_find_lsn (p_cdio, i_lsn); const iso9660_stat_t *p_statbuf3 = iso9660_fs_find_lsn_with_path (p_cdio, i_lsn, &psz_path); /* Compare the two statbufs. */ #if 0 if (0 != memcmp(p_statbuf, p_statbuf2, sizeof(iso9660_stat_t))) { #else if (p_statbuf->lsn != p_statbuf2->lsn || p_statbuf->size != p_statbuf2->size || p_statbuf->type != p_statbuf2->type) { #endif fprintf(stderr, "File stat information between fs_stat and " "fs_find_lsn isn't the same\n"); exit(3); } if (0 != memcmp(p_statbuf3, p_statbuf2, sizeof(iso9660_stat_t))) { fprintf(stderr, "File stat information between fs_find_lsn and " "fs_find_lsn_with_path isn't the same\n"); exit(4); } if (psz_path != NULL) { if (0 != strncmp("/./", psz_path, strlen("/./"))) { fprintf(stderr, "Path returned for fs_find_lsn_with_path " "is not correct should be /./, is %s\n", psz_path); exit(5); free(psz_path); } } else { fprintf(stderr, "Path returned for fs_find_lsn_with_path is NULL\n"); exit(6); } /* Try reading from the directory. */ memset (buf, 0, ISO_BLOCKSIZE); if ( 0 != cdio_read_data_sectors (p_cdio, buf, i_lsn, ISO_BLOCKSIZE, 1) ) { fprintf(stderr, "Error reading ISO 9660 file at lsn %lu\n", (long unsigned int) p_statbuf->lsn); exit(7); } exit(0); } } exit(0); } libcdio-0.83/test/testischar.c0000644000175000017500000000275111650130511013264 00000000000000/* $Id: testischar.c,v 1.3 2008/03/22 18:08:25 karl Exp $ Copyright (C) 2001, 2008 Herbert Valerio Riedel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Tests ISO9660 character sets. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include int main (int argc, const char *argv[]) { int i, j; printf (" "); for (j = 0; j < 0x10; j++) printf (" %1.1x", j); printf (" |"); for (j = 0; j < 0x10; j++) printf (" %1.1x", j); printf ("\n"); for (i = 0; i < 0x10; i++) { printf ("%1.1x ", i); for (j = 0; j < 0x10; j++) { int c = (j << 4) + i; printf (" %c", iso9660_is_dchar (c) ? c : ' '); } printf (" |"); for (j = 0; j < 0x10; j++) { int c = (j << 4) + i; printf (" %c", iso9660_isachar (c) ? c : ' '); } printf ("\n"); } return 0; } libcdio-0.83/test/check_cd_read.sh0000755000175000017500000000320311325726267014037 00000000000000#!/bin/sh # $Id: check_cd_read.sh,v 1.12 2008/03/22 18:08:25 karl Exp $ # # Copyright (C) 2003, 2005, 2008, 2010 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Tests to see that CD reading is correct (via cd-read). if test -z $srcdir ; then srcdir=`pwd` fi if test "X$top_builddir" = "X" ; then top_builddir=`pwd`/.. fi . ${top_builddir}/test/check_common_fn if test ! -x ../src/cd-read ; then exit 77 fi BASE=`basename $0 .sh` fname=cdda testnum=CD-DA opts="-c ${srcdir}/data/${fname}.cue --mode=red --just-hex --start=0" test_cd_read "$opts" ${fname}-read.dump ${srcdir}/${fname}-read.right RC=$? check_result $RC "cd-read CUE test $testnum" "cd-read $opts" fname=isofs-m1 testnum=MODE1 opts="-i ${srcdir}/data/${fname}.cue --mode m1f1 -s 26 -n 2" test_cd_read "$opts" ${fname}-read.dump ${srcdir}/${fname}-read.right RC=$? check_result $RC "cd-read CUE test $testnum" "$CD_READ $opts" exit $RC #;;; Local Variables: *** #;;; mode:shell-script *** #;;; eval: (sh-set-shell "bash") *** #;;; End: *** libcdio-0.83/test/copying-rr.right0000644000175000017500000000212711642541561014110 00000000000000__________________________________ ISO-9660 Information /: dr-xr-xr-x 4 0 0 [LSN 23] 2048 Oct 22 2004 02:21:14 . dr-xr-xr-x 2 0 0 [LSN 23] 2048 Oct 22 2004 02:21:14 .. dr-xr-xr-x 2 0 0 [LSN 24] 2048 Mar 05 2005 16:12:25 copy lr-xr-xr-x 1 0 0 [LSN 27] 7 Mar 05 2005 15:26:00 Copy2 -> COPYING -r--r--r-- 1 0 0 [LSN 27] 17992 Mar 05 2005 15:25:51 COPYING br--r--r-- 1 0 0 [LSN 36] 0 Mar 05 2005 15:32:05 fd0 dr-xr-xr-x 2 0 0 [LSN 25] 2048 Mar 05 2005 16:12:25 tmp cr--r--r-- 1 0 0 [LSN 36] 0 Mar 05 2005 15:31:42 zero /copy/: dr-xr-xr-x 2 0 0 [LSN 24] 2048 Mar 05 2005 16:12:25 . dr-xr-xr-x 4 0 0 [LSN 23] 2048 Mar 05 2005 16:12:25 .. lr-xr-xr-x 1 0 0 [LSN 36] 10 Mar 05 2005 15:27:05 COPYING -> ../COPYING /tmp/: dr-xr-xr-x 2 0 0 [LSN 25] 2048 Mar 05 2005 16:12:25 . dr-xr-xr-x 4 0 0 [LSN 23] 2048 Mar 05 2005 16:12:25 .. lr-xr-xr-x 1 0 0 [LSN 36] 18 Mar 05 2005 15:51:05 COPYING -> ../copying/COPYING libcdio-0.83/test/check_opts5.right0000644000175000017500000000127611642541561014232 00000000000000__________________________________ Disc mode is listed as: CD-DATA (Mode 1) CD-ROM Track List (1 - 1) #: MSF LSN Type Green? Copy? 1: 00:02:00 000000 data false no 170: 00:06:02 000302 leadout (693 KB raw, 604 KB formatted) Media Catalog Number (MCN): not available Last CD Session LSN: not supported by drive/driver __________________________________ CD Analysis Report CD-ROM with ISO 9660 filesystem ISO 9660: 64 blocks, label `CDROM ' Application: MKISOFS ISO 9660/HFS FILESYSTEM BUILDER & CDRECORD CD-R/DVD CREATOR (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING Preparer : Publisher : System : LINUX Volume : CDROM Volume Set : libcdio-0.83/test/cdda-read.right0000644000175000017500000001604411642541560013625 000000000000000x0000: 0000 0000 0000 0000 0000 0000 0000 0000 0x0010: 0000 0000 0000 0000 0000 0000 0000 0000 0x0020: 0000 0000 0000 0000 0000 0000 0000 0000 0x0030: 0000 0000 0000 0000 0000 0000 0000 0000 0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 0x0080: 0000 0000 0000 0000 0000 0000 0000 0000 0x0090: 0000 0000 0000 0000 0000 0000 0000 0000 0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 0x0100: 0000 0000 0000 0000 0000 0000 0000 0000 0x0110: 0000 0000 0000 0000 0000 0000 0000 0000 0x0120: 0000 0000 0000 0000 0000 0000 0000 0000 0x0130: 0000 0000 0000 0000 0000 0000 0000 0000 0x0140: 0000 0000 0000 0000 0000 0000 0000 0000 0x0150: 0000 0000 0000 0000 0000 0000 0000 0000 0x0160: 0000 0000 0000 0000 0000 0000 0000 0000 0x0170: 0000 0000 0000 0000 0000 0000 0000 0000 0x0180: 0000 0000 0000 0000 0000 0000 0000 0000 0x0190: 0000 0000 0000 0000 0000 0000 0000 0000 0x01a0: 0000 0000 0000 0000 0000 0000 0000 0000 0x01b0: 0000 0000 0000 0000 0000 0000 0000 0000 0x01c0: 0000 0000 0000 0000 0000 0000 0000 0000 0x01d0: 0000 0000 0000 0000 0000 0000 0000 0000 0x01e0: 0000 0000 0000 0000 0000 0000 0000 0000 0x01f0: 0000 0000 0000 0000 0000 0000 0000 0000 0x0200: 0000 0000 0000 0000 0000 0000 0000 0000 0x0210: 0000 0000 0000 0000 0000 0000 0000 0000 0x0220: 0000 0000 0000 0000 0000 0000 0000 0000 0x0230: 0000 0000 0000 0000 0000 0000 0000 0000 0x0240: 0000 0000 0000 0000 0000 0000 0000 0000 0x0250: 0000 0000 0000 0000 0000 0000 0000 0000 0x0260: 0000 0000 0000 0000 0000 0000 0000 0000 0x0270: 0000 0000 0000 0000 0000 0000 0000 0000 0x0280: 0000 0000 0000 0000 0000 0000 0000 0000 0x0290: 0000 0000 0000 0000 0000 0000 0000 0000 0x02a0: 0000 0000 0000 0000 0000 0000 0000 0000 0x02b0: 0000 0000 0000 0000 0000 0000 0000 0000 0x02c0: 0000 0000 0000 0000 0000 0000 0000 0000 0x02d0: 0000 0000 0000 0000 0000 0000 0000 0000 0x02e0: 0000 0000 0000 0000 0000 0000 0000 0000 0x02f0: 0000 0000 0000 0000 0000 0000 0000 0000 0x0300: 0000 0000 0000 0000 0000 0000 0000 0000 0x0310: 0000 0000 0000 0000 0000 0000 0000 0000 0x0320: 0000 0000 0000 0000 0000 0000 0000 0000 0x0330: 0000 0000 0000 0000 0000 0000 0000 0000 0x0340: 0000 0000 0000 0000 0000 0000 0000 0000 0x0350: 0000 0000 0000 0000 0000 0000 0000 0000 0x0360: 0000 0000 0000 0000 0000 0000 0000 0000 0x0370: 0000 0000 0000 0000 0000 0000 0000 0000 0x0380: 0000 0000 0000 0000 0000 0000 0000 0000 0x0390: 0000 0000 0000 0000 0000 0000 0000 0000 0x03a0: 0000 0000 0000 0000 0000 0000 0000 0000 0x03b0: 0000 0000 0000 0000 0000 0000 0000 0000 0x03c0: 0000 0000 0000 0000 0000 0000 0000 0000 0x03d0: 0000 0000 0000 0000 0000 0000 0000 0000 0x03e0: 0000 0000 0000 0000 0000 0000 0000 0000 0x03f0: 0000 0000 0000 0000 0000 0000 0000 0000 0x0400: 0000 0000 0000 0000 0000 0000 0000 0000 0x0410: 0000 0000 0000 0000 0000 0000 0000 0000 0x0420: 0000 0000 0000 0000 0000 0000 0000 0000 0x0430: 0000 0000 0000 0000 0000 0000 0000 0000 0x0440: 0000 0000 0000 0000 0000 0000 0000 0000 0x0450: 0000 0000 0000 0000 0000 0000 0000 0000 0x0460: 0000 0000 0000 0000 0000 0000 0000 0000 0x0470: 0000 0000 0000 0000 0000 0000 0000 0000 0x0480: 0000 0000 0000 0000 f0ff 0000 f0ff 0000 0x0490: e3ff f0ff e3ff f0ff d8ff e3ff d8ff e3ff 0x04a0: dfff e8ff dfff e8ff f5ff fcff f5ff fcff 0x04b0: 0700 0c00 0700 0c00 1500 1800 1500 1800 0x04c0: 2000 1100 2000 1100 2800 0b00 2800 0b00 0x04d0: 1d00 0500 1d00 0500 1300 0000 1300 0000 0x04e0: 0a00 0b00 0a00 0b00 1200 1300 1200 1300 0x04f0: 1800 1900 1800 1900 0c00 0d00 0c00 0d00 0x0500: 0200 0300 0200 0300 e9ff faff e9ff faff 0x0510: d5ff f2ff d5ff f2ff b5ff dbff b5ff dbff 0x0520: 9cff c8ff 9cff c8ff a9ff c9ff a9ff c9ff 0x0530: c4ff daff c4ff daff eaff f8ff eaff f8ff 0x0540: 1900 1000 1900 1000 3e00 2300 3e00 2300 0x0550: 6b00 3100 6b00 3100 8d00 3b00 8d00 3b00 0x0560: 7600 4200 7600 4200 6100 3600 6100 3600 0x0570: 3e00 2b00 3e00 2b00 1000 1100 1000 1100 0x0580: eaff fbff eaff fbff cbff e9ff cbff e9ff 0x0590: b2ff daff b2ff daff ceff deff ceff deff 0x05a0: e5ff f1ff e5ff f1ff f8ff 0000 f8ff 0000 0x05b0: 0700 0c00 0700 0c00 1300 1500 1300 1500 0x05c0: 0c00 0b00 0c00 0b00 e6ff f2ff e6ff f2ff 0x05d0: c7ff ddff c7ff ddff aeff ccff aeff ccff 0x05e0: 8aff bfff 8aff bfff 6eff b5ff 6eff b5ff 0x05f0: 99ff ceff 99ff ceff d0ff e3ff d0ff e3ff 0x0600: 0e00 0400 0e00 0400 8000 3e00 8000 3e00 0x0610: da00 6c00 da00 6c00 1f01 8f00 1f01 8f00 0x0620: 4201 a900 4201 a900 2901 9b00 2901 9b00 0x0630: d000 6d00 d000 6d00 7100 3500 7100 3500 0x0640: 0000 0600 0000 0600 64ff bfff 64ff bfff 0x0650: e7fe 86ff e7fe 86ff a7fe 59ff a7fe 59ff 0x0660: 98fe 47ff 98fe 47ff b1fe 4bff b1fe 4bff 0x0670: eafe 71ff eafe 71ff 5cff a2ff 5cff a2ff 0x0680: ceff ebff ceff ebff 3c00 2600 3c00 2600 0x0690: 9400 5500 9400 5500 d900 7900 d900 7900 0x06a0: bd00 6400 bd00 6400 a300 5100 a300 5100 0x06b0: 5f00 3000 5f00 3000 1300 1400 1300 1400 0x06c0: 0700 fcff 0700 fcff 0d00 f8ff 0d00 f8ff 0x06d0: 1100 0400 1100 0400 4300 1d00 4300 1d00 0x06e0: 6a00 3000 6a00 3000 8800 3e00 8800 3e00 0x06f0: 8e00 4800 8e00 4800 6000 2f00 6000 2f00 0x0700: e9ff f9ff e9ff f9ff 88ff cdff 88ff cdff 0x0710: 3bff 9aff 3bff 9aff ecfe 72ff ecfe 72ff 0x0720: d2fe 63ff d2fe 63ff 01ff 79ff 01ff 79ff 0x0730: 2bff 8cff 2bff 8cff 83ff bdff 83ff bdff 0x0740: fcff f5ff fcff f5ff 5e00 3200 5e00 3200 0x0750: ac00 6200 ac00 6200 e800 8700 e800 8700 0x0760: 0501 8200 0501 8200 d800 6b00 d800 6b00 0x0770: 9d00 5600 9d00 5600 6a00 4300 6a00 4300 0x0780: 3e00 2200 3e00 2200 1900 0600 1900 0600 0x0790: eaff efff eaff efff e4ff ecff e4ff ecff 0x07a0: dfff e9ff dfff e9ff bbff e6ff bbff e6ff 0x07b0: 9eff d3ff 9eff d3ff 77ff c4ff 77ff c4ff 0x07c0: 39ff a8ff 39ff a8ff 19ff 92ff 19ff 92ff 0x07d0: 22ff 91ff 22ff 91ff 5cff b1ff 5cff b1ff 0x07e0: cdff ecff cdff ecff 7500 3c00 7500 3c00 0x07f0: 1101 8c00 1101 8c00 8b01 ca00 8b01 ca00 0x0800: e701 f900 e701 f900 da01 fb00 da01 fb00 0x0810: 6401 b800 6401 b800 8a00 4500 8a00 4500 0x0820: 92ff c4ff 92ff c4ff 8efe 4cff 8efe 4cff 0x0830: a6fd cdfe a6fd cdfe 09fd 7afe 09fd 7afe 0x0840: 21fd 8cfe 21fd 8cfe 9dfd d2fe 9dfd d2fe 0x0850: b3fe 67ff b3fe 67ff 3000 1600 3000 1600 0x0860: e801 e800 e801 e800 4503 8f01 4503 8f01 0x0870: 3004 2102 3004 2102 2404 1f02 2404 1f02 0x0880: 4f03 a201 4f03 a201 b801 cf00 b801 cf00 0x0890: e4ff e4ff e4ff e4ff bafd d7fe bafd d7fe 0x08a0: 00fc 01fe 00fc 01fe 60fb abfd 60fb abfd 0x08b0: 5efb 9cfd 5efb 9cfd 32fc 11fe 32fc 11fe 0x08c0: d5fd c7fe d5fd c7fe 0100 0e00 0100 0e00 0x08d0: 0102 1701 0102 1701 9803 e901 9803 e901 0x08e0: d404 8b02 d404 8b02 ea04 8f02 ea04 8f02 0x08f0: d803 fc01 d803 fc01 4802 2a01 4802 2a01 0x0900: 2100 0e00 2100 0e00 20fe 07ff 20fe 07ff 0x0910: 86fc 35fe 86fc 35fe acfb c3fd acfb c3fd 0x0920: c0fb ddfd c0fb ddfd b5fc 40fe b5fc 40fe libcdio-0.83/test/check_sizeof.c0000644000175000017500000000414211650130422013544 00000000000000/* Copyright (C) 2001, 2008, 2011 Herbert Valerio Riedel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #include #include #include #include #include /* Private headers */ #include "iso9660_private.h" #define CHECK_SIZEOF(typnam) { \ printf ("checking sizeof (%s) ...", #typnam); \ if (sizeof (typnam) != (typnam##_SIZEOF)) { \ printf ("failed!\n==> sizeof (%s) == %d (but should be %d)\n", \ #typnam, (int)sizeof(typnam), (int)(typnam##_SIZEOF)); \ fail++; \ } else { pass++; printf ("ok!\n"); } \ } #define CHECK_SIZEOF_STRUCT(typnam) { \ printf ("checking sizeof (struct %s) ...", #typnam); \ if (sizeof (struct typnam) != (struct_##typnam##_SIZEOF)) { \ printf ("failed!\n==> sizeof (struct %s) == %d (but should be %d)\n", \ #typnam, (int)sizeof(struct typnam), (int)(struct_##typnam##_SIZEOF)); \ fail++; \ } else { pass++; printf ("ok!\n"); } \ } int main (int argc, const char *argv[]) { unsigned fail = 0, pass = 0; /* */ CHECK_SIZEOF(msf_t); /* "iso9660_private.h" */ CHECK_SIZEOF(iso_volume_descriptor_t); CHECK_SIZEOF(iso9660_pvd_t); CHECK_SIZEOF(iso_path_table_t); CHECK_SIZEOF(iso9660_dir_t); #define iso9660_xa_t_SIZEOF 14 /* xa.h */ CHECK_SIZEOF(iso9660_xa_t); if (fail) return 1; return 0; } libcdio-0.83/test/check_paranoia.sh.in0000644000175000017500000000476211325727326014662 00000000000000#!/bin/sh # $Id: check_paranoia.sh.in,v 1.18 2008/10/17 01:51:47 rocky Exp $ # Compare our cd-paranoia with known good results. if test "X$srcdir" = "X" ; then srcdir=`pwd` fi if test "X$top_builddir" = "X" ; then top_builddir=`pwd`/.. fi if test "X$top_srcdir" = "X" ; then top_srcdir=`pwd`/.. fi if test "@CMP@" != no -a "@BUILD_CD_PARANOIA_TRUE@"X = X ; then cd_paranoia=$top_builddir/src/cd-paranoia/cd-paranoia@EXEEXT@ $cd_paranoia -d $srcdir/data/cdda.cue -v -r -- "1-" if test $? -ne 0 ; then exit 6 fi dd bs=16 if=cdda.raw of=cdda-1.raw dd bs=16 if=cdda.bin of=cdda-2.raw if @CMP@ cdda-1.raw cdda-2.raw ; then echo "** Raw cdda.bin extraction okay" else echo "** Raw cdda.bin extraction differ" exit 3 fi mv cdda.raw cdda-good.raw $cd_paranoia -d $srcdir/data/cdda.cue -x 64 -v -r -- "1-" mv cdda.raw cdda-underrun.raw $cd_paranoia -d $srcdir/data/cdda.cue -r -- "1-" if test $? -ne 0 ; then exit 6 fi if @CMP@ cdda-underrun.raw cdda-good.raw ; then echo "** Under-run correction okay" else echo "** Under-run correction problem" exit 3 fi # Start out with small jitter $cd_paranoia -l ./cd-paranoia.log -d $srcdir/data/cdda.cue -x 5 -v -r -- "1-" if test $? -ne 0 ; then exit 6 fi mv cdda.raw cdda-jitter.raw if @CMP@ cdda-jitter.raw cdda-good.raw ; then echo "** Small jitter correction okay" else echo "** Small jitter correction problem" exit 3 fi tail -3 ./cd-paranoia.log | sed -e's/\[.*\]/\[\]/' > ./cd-paranoia-filtered.log if @CMP@ $srcdir/cd-paranoia-log.right ./cd-paranoia-filtered.log ; then echo "** --log option okay" rm ./cd-paranoia.log ./cd-paranoia-filtered.log else echo "** --log option problem" exit 4 fi # A more massive set of failures: underrun + small jitter $cd_paranoia -d $srcdir/data/cdda.cue -x 69 -v -r -- "1-" if test $? -ne 0 ; then exit 6 fi mv cdda.raw cdda-jitter.raw if @CMP@ cdda-jitter.raw cdda-good.raw ; then echo "** under-run + jitter correction okay" else echo "** under-run + jitter correction problem" exit 3 fi ### FIXME: medium jitter is known to fail. Investigate. ### FIXME: large jitter is known to fail. Investigate. exit 0 else if test "@CMP@" != no ; then echo "Don't see 'cmp' program. Test skipped." else echo "Don't see libcdio 'cd-paranoia' program. Test skipped." fi exit 77 fi fi #;;; Local Variables: *** #;;; mode:shell-script *** #;;; eval: (sh-set-shell "bash") *** #;;; End: *** libcdio-0.83/test/check_cue.sh0000755000175000017500000000731411652140274013230 00000000000000#!/bin/sh #$Id: check_cue.sh.in,v 1.31 2007/12/28 02:11:01 rocky Exp $ # Tests to see that BIN/CUE and cdrdao TOC file iamge reading is correct # (via cd-info). if test "X" != "X" ; then vcd_opt='--no-vcd' fi if test "X$srcdir" = "X" ; then srcdir=`pwd` fi if test "X$top_srcdir" = "X" ; then top_srcdir=`pwd`/.. fi if test "X$top_builddir" = "X" ; then top_builddir=`pwd`/.. fi . ${top_builddir}/test/check_common_fn if test ! -x $top_srcdir/src/cd-info ; then exit 77 fi BASE=`basename $0 .sh` fname=cdda testnum=CD-DA opts="--quiet --no-device-info --cue-file ${srcdir}/data/${fname}.cue --no-cddb" test_cdinfo "$opts" ${fname}.dump ${srcdir}/${fname}.right RC=$? check_result $RC "cd-info CUE test $testnum" "${CD_INFO} $opts" opts="--quiet --no-device-info --bin-file ${srcdir}/data/${fname}.bin --no-cddb" test_cdinfo "$opts" ${fname}.dump ${srcdir}/${fname}.right RC=$? check_result $RC "cd-info BIN test $testnum" "${CD_INFO} $opts" opts="--quiet --no-device-info --toc-file ${srcdir}/data/${fname}.toc --no-cddb" test_cdinfo "$opts" ${fname}.dump ${srcdir}/${fname}.right RC=$? check_result $RC "cd-info TOC test $testnum" "${CD_INFO} $opts" fname=isofs-m1 testnum='ISO 9660 mode1 CUE' if test -f ${srcdir}/${fname}.bin ; then if test -n ""; then opts="-q --no-device-info --no-disc-mode --cue-file ${srcdir}/data/${fname}.cue --iso9660" test_cdinfo "$opts" ${fname}.dump ${srcdir}/${fname}.right RC=$? check_result $RC "cd-info Rock-Ridge CUE test $testnum" "${CD_INFO} $opts" opts="-q --no-device-info --no-disc-mode --no-rock-ridge --cue-file ${srcdir}/data/${fname}.cue --iso9660" test_cdinfo "$opts" ${fname}.dump ${srcdir}/${fname}-no-rr.right RC=$? check_result $RC "cd-info no Rock-Ridge CUE test $testnum" "${CD_INFO} $opts" fi else echo "Don't see CUE file ${srcdir}/data/${fname}.bin. Test $testnum skipped." fi if test -n ""; then testnum='ISO 9660 mode1 TOC' if test -f ${srcdir}/data/${fname}.bin ; then opts="-q --no-device-info --no-disc-mode --toc-file ${srcdir}/data/${fname}.toc --iso9660" test_cdinfo "$opts" ${fname}.dump ${srcdir}/${fname}.right RC=$? check_result $RC "cd-info TOC test $testnum" "${CD_INFO} $opts" else echo "Don't see TOC file ${srcdir}/data/${fname}.bin. Test $testnum skipped." fi fi fname=vcd_demo if test -z "" ; then right=${srcdir}/${fname}.right else right=${srcdir}/${fname}_vcdinfo.right fi testnum='Video CD' if test -f ${srcdir}/${fname}.bin ; then opts="-q --no-device-info --no-disc-mode -c ${srcdir}/data/${fname}.cue --iso9660" test_cdinfo "$opts" ${fname}.dump $right RC=$? check_result $RC "cd-info CUE test $testnum" "${CD_INFO} $opts" if test -z "" ; then right=${srcdir}/${fname}.right else right=${srcdir}/${fname}_vcdinfo.right fi opts="-q --no-device-info --no-disc-mode -t ${srcdir}/data/${fname}.toc --iso9660" if test -f ${srcdir}/${fname}.toc ; then test_cdinfo "$opts" ${fname}.dump $right RC=$? check_result $RC "cd-info TOC test $testnum" "${CD_INFO} $opts" else echo "Don't see TOC file ${srcdir}/${fname}.toc. Test $testnum skipped." fi else echo "Don't see CUE file ${srcdir}/${fname}.cue. Test $testnum skipped." fi fname=svcd_ogt_test_ntsc testnum='Super Video CD' if test -f ${srcdir}/${fname}.bin ; then opts="-q --no-device-info --no-disc-mode --cue-file ${srcdir}/data/${fname}.cue $vcd_opt --iso9660" test_cdinfo "$opts" ${fname}.dump ${srcdir}/${fname}.right RC=$? check_result $RC "cd-info CUE test $testnum" "${CD_INFO} $opts" else echo "Don't see CUE file ${srcdir}/data/${fname}.bin. Test $testnum skipped." fi exit $RC #;;; Local Variables: *** #;;; mode:shell-script *** #;;; eval: (sh-set-shell "bash") *** #;;; End: *** libcdio-0.83/test/testisocd2.c0000644000175000017500000000752511652140274013213 00000000000000/* $Id: testisocd2.c.in,v 1.2 2008/03/22 18:08:25 karl Exp $ Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Tests reading ISO 9660 info from an ISO 9660 image. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "portable.h" #include #include #include #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif /* Set up a CD-DA image to test on which is in the libcdio distribution. */ #define ISO9660_IMAGE_PATH "/src/external-vcs/libcdio/test/data/" #define ISO9660_IMAGE ISO9660_IMAGE_PATH "copying.iso" #define SKIP_TEST_RC 77 int main(int argc, const char *argv[]) { iso9660_t *p_iso; p_iso = iso9660_open (ISO9660_IMAGE); if (!p_iso) { fprintf(stderr, "Sorry, couldn't open ISO9660 image %s\n", ISO9660_IMAGE); return 1; } else { /* You make get different results looking up "/" versus "/." and the latter may give more complete information. "/" will take information from the PVD only, whereas "/." will force a directory read of "/" and find "." and in that Rock-Ridge information might be found which fills in more stat information that iso9660_fs_find_lsn also will find. . Ideally iso9660_fs_stat should be fixed. */ iso9660_stat_t *p_statbuf = iso9660_ifs_stat (p_iso, "/."); if (NULL == p_statbuf) { fprintf(stderr, "Could not get ISO-9660 file information for file /.\n"); iso9660_close(p_iso); exit(2); } else { /* Now try getting the statbuf another way */ char buf[ISO_BLOCKSIZE]; char *psz_path = NULL; const lsn_t i_lsn = p_statbuf->lsn; const iso9660_stat_t *p_statbuf2 = iso9660_ifs_find_lsn (p_iso, i_lsn); const iso9660_stat_t *p_statbuf3 = iso9660_ifs_find_lsn_with_path (p_iso, i_lsn, &psz_path); /* Compare the two statbufs. */ if (p_statbuf->lsn != p_statbuf2->lsn || p_statbuf->size != p_statbuf2->size || p_statbuf->type != p_statbuf2->type) { fprintf(stderr, "File stat information between fs_stat and " "iso9660_ifs_find_lsn isn't the same\n"); exit(3); } if (p_statbuf3->lsn != p_statbuf2->lsn || p_statbuf3->size != p_statbuf2->size || p_statbuf3->type != p_statbuf2->type) { exit(4); } if (psz_path != NULL) { if (0 != strncmp("/./", psz_path, strlen("/./"))) { fprintf(stderr, "Path returned for ifs_find_lsn_with_path " "is not correct should be /./, is %s\n", psz_path); exit(5); } free(psz_path); } else { fprintf(stderr, "Path returned for fs_find_lsn_with_path is NULL\n"); exit(6); } /* Try reading from the directory. */ memset (buf, 0, ISO_BLOCKSIZE); if ( ISO_BLOCKSIZE != iso9660_iso_seek_read (p_iso, buf, i_lsn, 1) ) { fprintf(stderr, "Error reading ISO 9660 file at lsn %lu\n", (long unsigned int) p_statbuf->lsn); exit(7); } exit(0); } } exit(0); } libcdio-0.83/test/check_iso.sh.in0000644000175000017500000000331111325726007013642 00000000000000#!/bin/sh #$Id: check_iso.sh.in,v 1.15 2008/10/17 01:51:47 rocky Exp $ if test -z $srcdir ; then srcdir=`pwd` fi if test "X$top_builddir" = "X" ; then top_builddir=`pwd`/.. fi . ${top_builddir}/test/check_common_fn if test ! -x ../src/iso-info@EXEEXT@ ; then exit 77 fi BASE=`basename $0 .sh` fname=copying opts="--quiet ${srcdir}/data/${fname}.iso --iso9660 " test_iso_info "$opts" ${fname}.dump ${srcdir}/${fname}.right RC=$? check_result $RC 'iso-info basic test' "$ISO_INFO $opts" opts="--ignore --image ${srcdir}/data/${fname}.iso --extract $fname " test_iso_read "$opts" ${fname} ${srcdir}/copying.gpl RC=$? check_result $RC 'iso-read basic test' "$ISO_READ $opts" if test -n "@HAVE_ROCK@"; then fname=copying-rr opts="--quiet ${srcdir}/data/${fname}.iso --iso9660 " test_iso_info "$opts" ${fname}.dump ${srcdir}/${fname}.right RC=$? check_result $RC 'iso-info Rock Ridge test' "$ISO_INFO $opts" opts="--image ${srcdir}/data/${fname}.iso --extract COPYING" test_iso_read "$opts" ${fname} ${srcdir}/copying-rr.gpl RC=$? check_result $RC 'iso-read RR test' "$ISO_READ $opts" fi if test -n "@HAVE_JOLIET@" ; then BASE=`basename $0 .sh` fname=joliet opts="--quiet ${srcdir}/data/${fname}.iso --iso9660 " test_iso_info "$opts" ${fname}-nojoliet.dump ${srcdir}/${fname}.right RC=$? check_result $RC 'iso-info Joliet test' "$cmdline" opts="--quiet ${srcdir}/data/${fname}.iso --iso9660 --no-joliet " test_iso_info "$opts" ${fname}-nojoliet.dump \ ${srcdir}/${fname}-nojoliet.right RC=$? check_result $RC 'iso-info --no-joliet test' "$cmdline" fi exit $RC #;;; Local Variables: *** #;;; mode:shell-script *** #;;; eval: (sh-set-shell "bash") *** #;;; End: *** libcdio-0.83/test/testassert.c0000644000175000017500000000171011650130464013315 00000000000000/* Copyright (C) 2001, 2008 Herbert Valerio Riedel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif /* Private headers */ #include "cdio_assert.h" int main (int argc, const char *argv[]) { cdio_assert (argc < 2); cdio_assert_not_reached (); return 0; } libcdio-0.83/test/Makefile.am0000644000175000017500000001052511650320562013010 00000000000000# Copyright (C) 2003, 2004, 2006, 2008, 2009, 2010 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . #################################################### # Things for regression testing #################################################### # # # There's a problem with doing make distcheck for testdefault. # A reminder of why I hate automake. SUBDIRS = data driver if BUILD_CD_PARANOIA testparanoia=testparanoia testparanoia_LDADD = $(LIBCDIO_PARANOIA_LIBS) $(LIBCDIO_CDDA_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) endif hack = check_sizeof testassert testgetdevices testischar \ testisocd testisocd2 testiso9660 test_lib_driver_util \ $(testparanoia) testpregap testunconfig EXTRA_PROGRAMS = testdefault DATA_DIR = @abs_top_srcdir@/test/data INCLUDES = -I$(top_srcdir) $(LIBCDIO_CFLAGS) $(LIBISO9660_CFLAGS) check_sizeof_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) testassert_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) testdefault_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) testgetdevices_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\" testgetdevices_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) testischar_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) testiso9660_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) testisocd_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) testisocd2_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) testunconfig_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) test_lib_driver_util_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) test_lib_driver_util_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\" testpregap_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) testpregap_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\" check_SCRIPTS = check_nrg.sh check_cue.sh check_cd_read.sh \ check_iso.sh check_fuzzyiso.sh check_paranoia.sh check_opts.sh # If we beefed this up so it checked to see if a CD-DA was loaded # it could be an automatic test. But for now, not so. # check_paranoia.sh check_PROGRAMS = $(hack) check_DATA = vcd_demo.right vcd_demo_vcdinfo.right \ videocd.right \ cdda.right \ isofs-m1.right isofs-m1-no-rr.right \ cd-paranoia-log.right \ check_opts0.right check_opts1.right check_opts2.right \ check_opts3.right check_opts4.right check_opts5.right \ check_opts6.right check_opts7.right \ isofs-m1-read.right cdda-read.right \ copying.right copying-rr.right \ joliet.right joliet-nojoliet.right \ udf102.iso copying.gpl copying-rr.gpl EXTRA_DIST = $(check_SCRIPTS) $(check_DATA) \ check_common_fn check_cue.sh.in check_nrg.sh.in \ testpregap.c.in check_legal.regex \ testgetdevices.c.in check_iso.sh.in TESTS = $(check_PROGRAMS) $(check_SCRIPTS) XFAIL_TESTS = testassert MOSTLYCLEANFILES = core core.* *.dump cdda-orig.wav cdda-try.wav *.raw test: check-am # This is a really bad hack to make sure check_nrg and check_cue.sh # are executable. Automake will remake check_nrg.sh and check_cue.sh # but not run the configure default commands for them to make sure # they are executable. You know it would be nice one could just set # permissions and mode when it makes the files. I'm sure there's some # cleaner a way to do this, but frankly I've wasted far too much of my # life the crappy automess system that I've really lost interest in # learning any more of this awful system than I need to. check-am: make-executable make-executable: check_nrg.sh check_cue.sh check_paranoia.sh chmod +x *.sh if test ! -f cdda.bin ; then \ test -L cdda.bin && $(RM) cdda.bin ; \ $(LN_S) $(abs_top_srcdir)/test/data/cdda.bin cdda.bin ; \ fi if test ! -f isofs-m1.bin ; then \ test -L cdda.bin && $(RM) isofs-m1.bin ; \ $(LN_S) $(abs_top_srcdir)/test/data/isofs-m1.bin isofs-m1.bin ; \ fi libcdio-0.83/test/isofs-m1-read.right0000644000175000017500000004140211642541561014365 000000000000000x0000: 0909 2020 2020 474e 5520 4745 4e45 5241 .. GNU GENERA 0x0010: 4c20 5055 424c 4943 204c 4943 454e 5345 L PUBLIC LICENSE 0x0020: 0a09 0920 2020 2020 2020 5665 7273 696f ... Versio 0x0030: 6e20 322c 204a 756e 6520 3139 3931 0a0a n 2, June 1991.. 0x0040: 2043 6f70 7972 6967 6874 2028 4329 2031 Copyright (C) 1 0x0050: 3938 392c 2031 3939 3120 4672 6565 2053 989, 1991 Free S 0x0060: 6f66 7477 6172 6520 466f 756e 6461 7469 oftware Foundati 0x0070: 6f6e 2c20 496e 632e 0a20 2020 2020 3539 on, Inc.. 59 0x0080: 2054 656d 706c 6520 506c 6163 652c 2053 Temple Place, S 0x0090: 7569 7465 2033 3330 2c20 426f 7374 6f6e uite 330, Boston 0x00a0: 2c20 4d41 2020 3032 3131 312d 3133 3037 , MA 02111-1307 0x00b0: 2020 5553 410a 2045 7665 7279 6f6e 6520 USA. Everyone 0x00c0: 6973 2070 6572 6d69 7474 6564 2074 6f20 is permitted to 0x00d0: 636f 7079 2061 6e64 2064 6973 7472 6962 copy and distrib 0x00e0: 7574 6520 7665 7262 6174 696d 2063 6f70 ute verbatim cop 0x00f0: 6965 730a 206f 6620 7468 6973 206c 6963 ies. of this lic 0x0100: 656e 7365 2064 6f63 756d 656e 742c 2062 ense document, b 0x0110: 7574 2063 6861 6e67 696e 6720 6974 2069 ut changing it i 0x0120: 7320 6e6f 7420 616c 6c6f 7765 642e 0a0a s not allowed... 0x0130: 0909 0920 2020 2050 7265 616d 626c 650a ... Preamble. 0x0140: 0a20 2054 6865 206c 6963 656e 7365 7320 . The licenses 0x0150: 666f 7220 6d6f 7374 2073 6f66 7477 6172 for most softwar 0x0160: 6520 6172 6520 6465 7369 676e 6564 2074 e are designed t 0x0170: 6f20 7461 6b65 2061 7761 7920 796f 7572 o take away your 0x0180: 0a66 7265 6564 6f6d 2074 6f20 7368 6172 .freedom to shar 0x0190: 6520 616e 6420 6368 616e 6765 2069 742e e and change it. 0x01a0: 2020 4279 2063 6f6e 7472 6173 742c 2074 By contrast, t 0x01b0: 6865 2047 4e55 2047 656e 6572 616c 2050 he GNU General P 0x01c0: 7562 6c69 630a 4c69 6365 6e73 6520 6973 ublic.License is 0x01d0: 2069 6e74 656e 6465 6420 746f 2067 7561 intended to gua 0x01e0: 7261 6e74 6565 2079 6f75 7220 6672 6565 rantee your free 0x01f0: 646f 6d20 746f 2073 6861 7265 2061 6e64 dom to share and 0x0200: 2063 6861 6e67 6520 6672 6565 0a73 6f66 change free.sof 0x0210: 7477 6172 652d 2d74 6f20 6d61 6b65 2073 tware--to make s 0x0220: 7572 6520 7468 6520 736f 6674 7761 7265 ure the software 0x0230: 2069 7320 6672 6565 2066 6f72 2061 6c6c is free for all 0x0240: 2069 7473 2075 7365 7273 2e20 2054 6869 its users. Thi 0x0250: 730a 4765 6e65 7261 6c20 5075 626c 6963 s.General Public 0x0260: 204c 6963 656e 7365 2061 7070 6c69 6573 License applies 0x0270: 2074 6f20 6d6f 7374 206f 6620 7468 6520 to most of the 0x0280: 4672 6565 2053 6f66 7477 6172 650a 466f Free Software.Fo 0x0290: 756e 6461 7469 6f6e 2773 2073 6f66 7477 undation's softw 0x02a0: 6172 6520 616e 6420 746f 2061 6e79 206f are and to any o 0x02b0: 7468 6572 2070 726f 6772 616d 2077 686f ther program who 0x02c0: 7365 2061 7574 686f 7273 2063 6f6d 6d69 se authors commi 0x02d0: 7420 746f 0a75 7369 6e67 2069 742e 2020 t to.using it. 0x02e0: 2853 6f6d 6520 6f74 6865 7220 4672 6565 (Some other Free 0x02f0: 2053 6f66 7477 6172 6520 466f 756e 6461 Software Founda 0x0300: 7469 6f6e 2073 6f66 7477 6172 6520 6973 tion software is 0x0310: 2063 6f76 6572 6564 2062 790a 7468 6520 covered by.the 0x0320: 474e 5520 4c69 6272 6172 7920 4765 6e65 GNU Library Gene 0x0330: 7261 6c20 5075 626c 6963 204c 6963 656e ral Public Licen 0x0340: 7365 2069 6e73 7465 6164 2e29 2020 596f se instead.) Yo 0x0350: 7520 6361 6e20 6170 706c 7920 6974 2074 u can apply it t 0x0360: 6f0a 796f 7572 2070 726f 6772 616d 732c o.your programs, 0x0370: 2074 6f6f 2e0a 0a20 2057 6865 6e20 7765 too... When we 0x0380: 2073 7065 616b 206f 6620 6672 6565 2073 speak of free s 0x0390: 6f66 7477 6172 652c 2077 6520 6172 6520 oftware, we are 0x03a0: 7265 6665 7272 696e 6720 746f 2066 7265 referring to fre 0x03b0: 6564 6f6d 2c20 6e6f 740a 7072 6963 652e edom, not.price. 0x03c0: 2020 4f75 7220 4765 6e65 7261 6c20 5075 Our General Pu 0x03d0: 626c 6963 204c 6963 656e 7365 7320 6172 blic Licenses ar 0x03e0: 6520 6465 7369 676e 6564 2074 6f20 6d61 e designed to ma 0x03f0: 6b65 2073 7572 6520 7468 6174 2079 6f75 ke sure that you 0x0400: 0a68 6176 6520 7468 6520 6672 6565 646f .have the freedo 0x0410: 6d20 746f 2064 6973 7472 6962 7574 6520 m to distribute 0x0420: 636f 7069 6573 206f 6620 6672 6565 2073 copies of free s 0x0430: 6f66 7477 6172 6520 2861 6e64 2063 6861 oftware (and cha 0x0440: 7267 6520 666f 720a 7468 6973 2073 6572 rge for.this ser 0x0450: 7669 6365 2069 6620 796f 7520 7769 7368 vice if you wish 0x0460: 292c 2074 6861 7420 796f 7520 7265 6365 ), that you rece 0x0470: 6976 6520 736f 7572 6365 2063 6f64 6520 ive source code 0x0480: 6f72 2063 616e 2067 6574 2069 740a 6966 or can get it.if 0x0490: 2079 6f75 2077 616e 7420 6974 2c20 7468 you want it, th 0x04a0: 6174 2079 6f75 2063 616e 2063 6861 6e67 at you can chang 0x04b0: 6520 7468 6520 736f 6674 7761 7265 206f e the software o 0x04c0: 7220 7573 6520 7069 6563 6573 206f 6620 r use pieces of 0x04d0: 6974 0a69 6e20 6e65 7720 6672 6565 2070 it.in new free p 0x04e0: 726f 6772 616d 733b 2061 6e64 2074 6861 rograms; and tha 0x04f0: 7420 796f 7520 6b6e 6f77 2079 6f75 2063 t you know you c 0x0500: 616e 2064 6f20 7468 6573 6520 7468 696e an do these thin 0x0510: 6773 2e0a 0a20 2054 6f20 7072 6f74 6563 gs... To protec 0x0520: 7420 796f 7572 2072 6967 6874 732c 2077 t your rights, w 0x0530: 6520 6e65 6564 2074 6f20 6d61 6b65 2072 e need to make r 0x0540: 6573 7472 6963 7469 6f6e 7320 7468 6174 estrictions that 0x0550: 2066 6f72 6269 640a 616e 796f 6e65 2074 forbid.anyone t 0x0560: 6f20 6465 6e79 2079 6f75 2074 6865 7365 o deny you these 0x0570: 2072 6967 6874 7320 6f72 2074 6f20 6173 rights or to as 0x0580: 6b20 796f 7520 746f 2073 7572 7265 6e64 k you to surrend 0x0590: 6572 2074 6865 2072 6967 6874 732e 0a54 er the rights..T 0x05a0: 6865 7365 2072 6573 7472 6963 7469 6f6e hese restriction 0x05b0: 7320 7472 616e 736c 6174 6520 746f 2063 s translate to c 0x05c0: 6572 7461 696e 2072 6573 706f 6e73 6962 ertain responsib 0x05d0: 696c 6974 6965 7320 666f 7220 796f 7520 ilities for you 0x05e0: 6966 2079 6f75 0a64 6973 7472 6962 7574 if you.distribut 0x05f0: 6520 636f 7069 6573 206f 6620 7468 6520 e copies of the 0x0600: 736f 6674 7761 7265 2c20 6f72 2069 6620 software, or if 0x0610: 796f 7520 6d6f 6469 6679 2069 742e 0a0a you modify it... 0x0620: 2020 466f 7220 6578 616d 706c 652c 2069 For example, i 0x0630: 6620 796f 7520 6469 7374 7269 6275 7465 f you distribute 0x0640: 2063 6f70 6965 7320 6f66 2073 7563 6820 copies of such 0x0650: 6120 7072 6f67 7261 6d2c 2077 6865 7468 a program, wheth 0x0660: 6572 0a67 7261 7469 7320 6f72 2066 6f72 er.gratis or for 0x0670: 2061 2066 6565 2c20 796f 7520 6d75 7374 a fee, you must 0x0680: 2067 6976 6520 7468 6520 7265 6369 7069 give the recipi 0x0690: 656e 7473 2061 6c6c 2074 6865 2072 6967 ents all the rig 0x06a0: 6874 7320 7468 6174 0a79 6f75 2068 6176 hts that.you hav 0x06b0: 652e 2020 596f 7520 6d75 7374 206d 616b e. You must mak 0x06c0: 6520 7375 7265 2074 6861 7420 7468 6579 e sure that they 0x06d0: 2c20 746f 6f2c 2072 6563 6569 7665 206f , too, receive o 0x06e0: 7220 6361 6e20 6765 7420 7468 650a 736f r can get the.so 0x06f0: 7572 6365 2063 6f64 652e 2020 416e 6420 urce code. And 0x0700: 796f 7520 6d75 7374 2073 686f 7720 7468 you must show th 0x0710: 656d 2074 6865 7365 2074 6572 6d73 2073 em these terms s 0x0720: 6f20 7468 6579 206b 6e6f 7720 7468 6569 o they know thei 0x0730: 720a 7269 6768 7473 2e0a 0a20 2057 6520 r.rights... We 0x0740: 7072 6f74 6563 7420 796f 7572 2072 6967 protect your rig 0x0750: 6874 7320 7769 7468 2074 776f 2073 7465 hts with two ste 0x0760: 7073 3a20 2831 2920 636f 7079 7269 6768 ps: (1) copyrigh 0x0770: 7420 7468 6520 736f 6674 7761 7265 2c20 t the software, 0x0780: 616e 640a 2832 2920 6f66 6665 7220 796f and.(2) offer yo 0x0790: 7520 7468 6973 206c 6963 656e 7365 2077 u this license w 0x07a0: 6869 6368 2067 6976 6573 2079 6f75 206c hich gives you l 0x07b0: 6567 616c 2070 6572 6d69 7373 696f 6e20 egal permission 0x07c0: 746f 2063 6f70 792c 0a64 6973 7472 6962 to copy,.distrib 0x07d0: 7574 6520 616e 642f 6f72 206d 6f64 6966 ute and/or modif 0x07e0: 7920 7468 6520 736f 6674 7761 7265 2e0a y the software.. 0x07f0: 0a20 2041 6c73 6f2c 2066 6f72 2065 6163 . Also, for eac 0x0000: 6820 6175 7468 6f72 2773 2070 726f 7465 h author's prote 0x0010: 6374 696f 6e20 616e 6420 6f75 7273 2c20 ction and ours, 0x0020: 7765 2077 616e 7420 746f 206d 616b 6520 we want to make 0x0030: 6365 7274 6169 6e0a 7468 6174 2065 7665 certain.that eve 0x0040: 7279 6f6e 6520 756e 6465 7273 7461 6e64 ryone understand 0x0050: 7320 7468 6174 2074 6865 7265 2069 7320 s that there is 0x0060: 6e6f 2077 6172 7261 6e74 7920 666f 7220 no warranty for 0x0070: 7468 6973 2066 7265 650a 736f 6674 7761 this free.softwa 0x0080: 7265 2e20 2049 6620 7468 6520 736f 6674 re. If the soft 0x0090: 7761 7265 2069 7320 6d6f 6469 6669 6564 ware is modified 0x00a0: 2062 7920 736f 6d65 6f6e 6520 656c 7365 by someone else 0x00b0: 2061 6e64 2070 6173 7365 6420 6f6e 2c20 and passed on, 0x00c0: 7765 0a77 616e 7420 6974 7320 7265 6369 we.want its reci 0x00d0: 7069 656e 7473 2074 6f20 6b6e 6f77 2074 pients to know t 0x00e0: 6861 7420 7768 6174 2074 6865 7920 6861 hat what they ha 0x00f0: 7665 2069 7320 6e6f 7420 7468 6520 6f72 ve is not the or 0x0100: 6967 696e 616c 2c20 736f 0a74 6861 7420 iginal, so.that 0x0110: 616e 7920 7072 6f62 6c65 6d73 2069 6e74 any problems int 0x0120: 726f 6475 6365 6420 6279 206f 7468 6572 roduced by other 0x0130: 7320 7769 6c6c 206e 6f74 2072 6566 6c65 s will not refle 0x0140: 6374 206f 6e20 7468 6520 6f72 6967 696e ct on the origin 0x0150: 616c 0a61 7574 686f 7273 2720 7265 7075 al.authors' repu 0x0160: 7461 7469 6f6e 732e 0a0a 2020 4669 6e61 tations... Fina 0x0170: 6c6c 792c 2061 6e79 2066 7265 6520 7072 lly, any free pr 0x0180: 6f67 7261 6d20 6973 2074 6872 6561 7465 ogram is threate 0x0190: 6e65 6420 636f 6e73 7461 6e74 6c79 2062 ned constantly b 0x01a0: 7920 736f 6674 7761 7265 0a70 6174 656e y software.paten 0x01b0: 7473 2e20 2057 6520 7769 7368 2074 6f20 ts. We wish to 0x01c0: 6176 6f69 6420 7468 6520 6461 6e67 6572 avoid the danger 0x01d0: 2074 6861 7420 7265 6469 7374 7269 6275 that redistribu 0x01e0: 746f 7273 206f 6620 6120 6672 6565 0a70 tors of a free.p 0x01f0: 726f 6772 616d 2077 696c 6c20 696e 6469 rogram will indi 0x0200: 7669 6475 616c 6c79 206f 6274 6169 6e20 vidually obtain 0x0210: 7061 7465 6e74 206c 6963 656e 7365 732c patent licenses, 0x0220: 2069 6e20 6566 6665 6374 206d 616b 696e in effect makin 0x0230: 6720 7468 650a 7072 6f67 7261 6d20 7072 g the.program pr 0x0240: 6f70 7269 6574 6172 792e 2020 546f 2070 oprietary. To p 0x0250: 7265 7665 6e74 2074 6869 732c 2077 6520 revent this, we 0x0260: 6861 7665 206d 6164 6520 6974 2063 6c65 have made it cle 0x0270: 6172 2074 6861 7420 616e 790a 7061 7465 ar that any.pate 0x0280: 6e74 206d 7573 7420 6265 206c 6963 656e nt must be licen 0x0290: 7365 6420 666f 7220 6576 6572 796f 6e65 sed for everyone 0x02a0: 2773 2066 7265 6520 7573 6520 6f72 206e 's free use or n 0x02b0: 6f74 206c 6963 656e 7365 6420 6174 2061 ot licensed at a 0x02c0: 6c6c 2e0a 0a20 2054 6865 2070 7265 6369 ll... The preci 0x02d0: 7365 2074 6572 6d73 2061 6e64 2063 6f6e se terms and con 0x02e0: 6469 7469 6f6e 7320 666f 7220 636f 7079 ditions for copy 0x02f0: 696e 672c 2064 6973 7472 6962 7574 696f ing, distributio 0x0300: 6e20 616e 640a 6d6f 6469 6669 6361 7469 n and.modificati 0x0310: 6f6e 2066 6f6c 6c6f 772e 0a0c 0a09 0920 on follow...... 0x0320: 2020 2047 4e55 2047 454e 4552 414c 2050 GNU GENERAL P 0x0330: 5542 4c49 4320 4c49 4345 4e53 450a 2020 UBLIC LICENSE. 0x0340: 2054 4552 4d53 2041 4e44 2043 4f4e 4449 TERMS AND CONDI 0x0350: 5449 4f4e 5320 464f 5220 434f 5059 494e TIONS FOR COPYIN 0x0360: 472c 2044 4953 5452 4942 5554 494f 4e20 G, DISTRIBUTION 0x0370: 414e 4420 4d4f 4449 4649 4341 5449 4f4e AND MODIFICATION 0x0380: 0a0a 2020 302e 2054 6869 7320 4c69 6365 .. 0. This Lice 0x0390: 6e73 6520 6170 706c 6965 7320 746f 2061 nse applies to a 0x03a0: 6e79 2070 726f 6772 616d 206f 7220 6f74 ny program or ot 0x03b0: 6865 7220 776f 726b 2077 6869 6368 2063 her work which c 0x03c0: 6f6e 7461 696e 730a 6120 6e6f 7469 6365 ontains.a notice 0x03d0: 2070 6c61 6365 6420 6279 2074 6865 2063 placed by the c 0x03e0: 6f70 7972 6967 6874 2068 6f6c 6465 7220 opyright holder 0x03f0: 7361 7969 6e67 2069 7420 6d61 7920 6265 saying it may be 0x0400: 2064 6973 7472 6962 7574 6564 0a75 6e64 distributed.und 0x0410: 6572 2074 6865 2074 6572 6d73 206f 6620 er the terms of 0x0420: 7468 6973 2047 656e 6572 616c 2050 7562 this General Pub 0x0430: 6c69 6320 4c69 6365 6e73 652e 2020 5468 lic License. Th 0x0440: 6520 2250 726f 6772 616d 222c 2062 656c e "Program", bel 0x0450: 6f77 2c0a 7265 6665 7273 2074 6f20 616e ow,.refers to an 0x0460: 7920 7375 6368 2070 726f 6772 616d 206f y such program o 0x0470: 7220 776f 726b 2c20 616e 6420 6120 2277 r work, and a "w 0x0480: 6f72 6b20 6261 7365 6420 6f6e 2074 6865 ork based on the 0x0490: 2050 726f 6772 616d 220a 6d65 616e 7320 Program".means 0x04a0: 6569 7468 6572 2074 6865 2050 726f 6772 either the Progr 0x04b0: 616d 206f 7220 616e 7920 6465 7269 7661 am or any deriva 0x04c0: 7469 7665 2077 6f72 6b20 756e 6465 7220 tive work under 0x04d0: 636f 7079 7269 6768 7420 6c61 773a 0a74 copyright law:.t 0x04e0: 6861 7420 6973 2074 6f20 7361 792c 2061 hat is to say, a 0x04f0: 2077 6f72 6b20 636f 6e74 6169 6e69 6e67 work containing 0x0500: 2074 6865 2050 726f 6772 616d 206f 7220 the Program or 0x0510: 6120 706f 7274 696f 6e20 6f66 2069 742c a portion of it, 0x0520: 0a65 6974 6865 7220 7665 7262 6174 696d .either verbatim 0x0530: 206f 7220 7769 7468 206d 6f64 6966 6963 or with modific 0x0540: 6174 696f 6e73 2061 6e64 2f6f 7220 7472 ations and/or tr 0x0550: 616e 736c 6174 6564 2069 6e74 6f20 616e anslated into an 0x0560: 6f74 6865 720a 6c61 6e67 7561 6765 2e20 other.language. 0x0570: 2028 4865 7265 696e 6166 7465 722c 2074 (Hereinafter, t 0x0580: 7261 6e73 6c61 7469 6f6e 2069 7320 696e ranslation is in 0x0590: 636c 7564 6564 2077 6974 686f 7574 206c cluded without l 0x05a0: 696d 6974 6174 696f 6e20 696e 0a74 6865 imitation in.the 0x05b0: 2074 6572 6d20 226d 6f64 6966 6963 6174 term "modificat 0x05c0: 696f 6e22 2e29 2020 4561 6368 206c 6963 ion".) Each lic 0x05d0: 656e 7365 6520 6973 2061 6464 7265 7373 ensee is address 0x05e0: 6564 2061 7320 2279 6f75 222e 0a0a 4163 ed as "you"...Ac 0x05f0: 7469 7669 7469 6573 206f 7468 6572 2074 tivities other t 0x0600: 6861 6e20 636f 7079 696e 672c 2064 6973 han copying, dis 0x0610: 7472 6962 7574 696f 6e20 616e 6420 6d6f tribution and mo 0x0620: 6469 6669 6361 7469 6f6e 2061 7265 206e dification are n 0x0630: 6f74 0a63 6f76 6572 6564 2062 7920 7468 ot.covered by th 0x0640: 6973 204c 6963 656e 7365 3b20 7468 6579 is License; they 0x0650: 2061 7265 206f 7574 7369 6465 2069 7473 are outside its 0x0660: 2073 636f 7065 2e20 2054 6865 2061 6374 scope. The act 0x0670: 206f 660a 7275 6e6e 696e 6720 7468 6520 of.running the 0x0680: 5072 6f67 7261 6d20 6973 206e 6f74 2072 Program is not r 0x0690: 6573 7472 6963 7465 642c 2061 6e64 2074 estricted, and t 0x06a0: 6865 206f 7574 7075 7420 6672 6f6d 2074 he output from t 0x06b0: 6865 2050 726f 6772 616d 0a69 7320 636f he Program.is co 0x06c0: 7665 7265 6420 6f6e 6c79 2069 6620 6974 vered only if it 0x06d0: 7320 636f 6e74 656e 7473 2063 6f6e 7374 s contents const 0x06e0: 6974 7574 6520 6120 776f 726b 2062 6173 itute a work bas 0x06f0: 6564 206f 6e20 7468 650a 5072 6f67 7261 ed on the.Progra 0x0700: 6d20 2869 6e64 6570 656e 6465 6e74 206f m (independent o 0x0710: 6620 6861 7669 6e67 2062 6565 6e20 6d61 f having been ma 0x0720: 6465 2062 7920 7275 6e6e 696e 6720 7468 de by running th 0x0730: 6520 5072 6f67 7261 6d29 2e0a 5768 6574 e Program)..Whet 0x0740: 6865 7220 7468 6174 2069 7320 7472 7565 her that is true 0x0750: 2064 6570 656e 6473 206f 6e20 7768 6174 depends on what 0x0760: 2074 6865 2050 726f 6772 616d 2064 6f65 the Program doe 0x0770: 732e 0a0a 2020 312e 2059 6f75 206d 6179 s... 1. You may 0x0780: 2063 6f70 7920 616e 6420 6469 7374 7269 copy and distri 0x0790: 6275 7465 2076 6572 6261 7469 6d20 636f bute verbatim co 0x07a0: 7069 6573 206f 6620 7468 6520 5072 6f67 pies of the Prog 0x07b0: 7261 6d27 730a 736f 7572 6365 2063 6f64 ram's.source cod 0x07c0: 6520 6173 2079 6f75 2072 6563 6569 7665 e as you receive 0x07d0: 2069 742c 2069 6e20 616e 7920 6d65 6469 it, in any medi 0x07e0: 756d 2c20 7072 6f76 6964 6564 2074 6861 um, provided tha 0x07f0: 7420 796f 750a 636f 6e73 7069 6375 6f75 t you.conspicuou libcdio-0.83/test/check_nrg.sh0000755000175000017500000000353711652140274013245 00000000000000#!/bin/sh #$Id: check_nrg.sh.in,v 1.17 2007/12/28 02:11:01 rocky Exp $ if test "X" != "X" ; then vcd_opt='--no-vcd' fi if test "X$srcdir" = "X" ; then srcdir=`pwd` fi if test "X$top_srcdir" = "X" ; then top_srcdir=`pwd`/.. fi if test "X$top_builddir" = "X" ; then top_builddir=`pwd`/.. fi . ${top_builddir}/test/check_common_fn if test ! -x $top_srcdir/src/cd-info ; then exit 77 fi BASE=`basename $0 .sh` test_name=videocd opts="--quiet --no-device-info --nrg-file ${srcdir}/data/${test_name}.nrg $vcd_opt --iso9660" test_cdinfo "$opts" ${test_name}.dump ${srcdir}/${test_name}.right RC=$? check_result $RC 'cd-info NRG test 1' "${CD_INFO} $opts" BASE=`basename $0 .sh` nrg_file=${srcdir}/data/monvoisin.nrg if test -f $nrg_file ; then test_cdinfo "-q --no-device-info --nrg-file $nrg_file $vcd_opt --iso9660 " \ monvoisin.dump ${srcdir}/monvoisin.right RC=$? check_result $RC 'cd-info NRG test 2' else echo "Don't see NRG file ${nrg_file}. Test skipped." exit 0 fi test_name='svcdgs' nrg_file=${srcdir}/data/${test_name}.nrg opts="-q --no-device-info --nrg-file $nrg_file $vcd_opt --iso9660" if test -f $nrg_file ; then test_cdinfo "$opts" ${test_name}.dump ${srcdir}/${test_name}.right RC=$? check_result $RC "cd-info NRG $test_name" "${CD_INFO} $opts" else echo "Don't see NRG file ${nrg_file}. Test skipped." exit $SKIP_TEST_EXITCODE fi test_name='cdda-mcn' nrg_file=${srcdir}/data/${test_name}.nrg opts="-q --no-device-info --nrg-file $nrg_file --no-cddb" if test -f $nrg_file ; then test_cdinfo "$opts" ${test_name}.dump ${srcdir}/${test_name}.right RC=$? check_result $RC "cd-info NRG $test_name" "${CD_INFO} $opts" exit $RC else echo "Don't see NRG file ${nrg_file}. Test skipped." exit $SKIP_TEST_EXITCODE fi #;;; Local Variables: *** #;;; mode:shell-script *** #;;; eval: (sh-set-shell "bash") *** #;;; End: *** libcdio-0.83/test/udf102.iso0000644000175000017500000277400011114145233012473 00000000000000CD001 NEU  "h8 NERO BURNING ROM 2004062515560000200406251556000000000000000000000000000000000000CD001 NEU %/E "h8 Nero Burning ROM 2004062515560000200406251556000000000000000000000000000000000000CD001BEA01NSR02TEA01 NEU30D97F26CF2680D9OSTA Compressed UnicodeOSTA Compressed Unicode<9 *AHEAD NeroYT!*UDF LV InfoOSTA Compressed UnicodeNEU*AHEAD NeroP"+NSR02 *AHEAD Nero*#OSTA Compressed UnicodeNEU*OSTA UDF Compliant*AHEAD Nero@m$!%0NEU30D97F26CF2680D9OSTA Compressed UnicodeOSTA Compressed Unicode<9 *AHEAD NeroiT1*UDF LV InfoOSTA Compressed UnicodeNEU*AHEAD Nero)P2+NSR02 *AHEAD Nero*3OSTA Compressed UnicodeNEU*OSTA UDF Compliant*AHEAD Nero@m415 Pv@<9 . *AHEAD Nero=A 0"h8"h8*  HFFHh / COPYING;1"h8"h84  HFFHh /COPYING;1b<9 OSTA Compressed UnicodeNEUOSTA Compressed UnicodeNEU*OSTA UDF Compliant'!`<9 <9 <9 *AHEAD Nero`  F(COPYING6!HF < /< /< /*AHEAD NeroHF GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License.  0 0 0 0 0 0 0 0 0 0 0 0  0! 0" 0# 0$ 0% 0& 0' 0( 0) 0* 0+ 0, 0- 0. 0/ 00 01 02 03 04 05 06 07 08 09 0 : 0 ; 0 < 0 = 0 > 0? 0@ 0A 0B 0C 0D 0E 0F 0G 0H 0I 0J 0K 0L 0M 0N 0O 0P 0 Q 0!R 0"S 0#T 0$U 0%V 0&W 0'X 0(Y 0)Z 0*[ 0+\ 0,] 0-^ 0._ 0/` 00a 01b 02c 03d 04e 05f 06g 07h 08i 09j 0:k 0;l 0<m 0=n 0>o 0?p 0@q 0Ar 0Bs 0Ct 0Du 0Ev 0Fw 0Gx 0Hy 0Iz 0J{ 0K| 0L} 0M~ 0libcdio-0.83/test/testiso9660.c0000644000175000017500000002035211650130545013136 00000000000000/* Copyright (C) 2003, 2006, 2007, 2008, 2009, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Tests ISO9660 library routines. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_STDIO_H #include #endif #include static bool time_compare(struct tm *p_tm1, struct tm *p_tm2) { bool okay = true; if (!p_tm1) { printf("get time is NULL\n"); return false; } if (!p_tm2) { printf("set time is NULL\n"); return false; } if (p_tm1->tm_year != p_tm2->tm_year) { printf("Years aren't equal. get: %d, set %d\n", p_tm1->tm_year, p_tm2->tm_year); okay=false; } if (p_tm1->tm_mon != p_tm2->tm_mon) { printf("Months aren't equal. get: %d, set %d\n", p_tm1->tm_mon, p_tm2->tm_mon); okay=false; } if (p_tm1->tm_mday != p_tm2->tm_mday) { printf("Month days aren't equal. get: %d, set %d\n", p_tm1->tm_mday, p_tm2->tm_mday); okay=false; } if (p_tm1->tm_min != p_tm2->tm_min) { printf("minutes aren't equal. get: %d, set %d\n", p_tm1->tm_min, p_tm2->tm_min); okay=false; } if (p_tm1->tm_hour != p_tm2->tm_hour) { printf("hours aren't equal. get: %d, set %d\n", p_tm1->tm_hour, p_tm2->tm_hour); okay=false; } if (p_tm1->tm_sec != p_tm2->tm_sec) { printf("seconds aren't equal. get: %d, set %d\n", p_tm1->tm_sec, p_tm2->tm_sec); okay=false; } if (p_tm1->tm_wday != p_tm2->tm_wday) { printf("Week days aren't equal. get: %d, set %d\n", p_tm1->tm_wday, p_tm2->tm_wday); okay=false; } if (p_tm1->tm_yday != p_tm2->tm_yday) { printf("Year days aren't equal. get: %d, set %d\n", p_tm1->tm_yday, p_tm2->tm_yday); okay=false; } #if FIXED if (p_tm1->tm_isdst != p_tm2->tm_isdst) { printf("Is daylight savings times aren't equal. get: %d, set %d\n", p_tm1->tm_isdst, p_tm2->tm_isdst); okay=false; } #endif #ifdef HAVE_TM_GMTOFF if (p_tm1->tm_gmtoff != p_tm2->tm_gmtoff) { printf("GMT offsets aren't equal. get: %ld, set %ld\n", p_tm1->tm_gmtoff, p_tm2->tm_gmtoff); okay=false; } if (p_tm1 != p_tm2 && p_tm1 && p_tm2) { #ifdef FIXED if (strcmp(p_tm1->tm_zone, p_tm2->tm_zone) != 0) { printf("Time Zone values. get: %s, set %s\n", p_tm1->tm_zone, p_tm2->tm_zone); /* Argh... sometimes GMT is converted to UTC. So Let's not call this a failure if everything else was okay. */ } #endif } #endif return okay; } int main (int argc, const char *argv[]) { int c; int i; int i_bad = 0; char dst[100]; char *dst_p; int achars[] = {'!', '"', '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', '?', '<', '=', '>'}; /********************************************* * Test ACHAR and DCHAR *********************************************/ for (c='A'; c<='Z'; c++ ) { if (!iso9660_is_dchar(c)) { printf("Failed iso9660_is_dchar test on %c\n", c); i_bad++; } if (!iso9660_is_achar(c)) { printf("Failed iso9660_is_achar test on %c\n", c); i_bad++; } } if (i_bad) return i_bad; for (c='0'; c<='9'; c++ ) { if (!iso9660_is_dchar(c)) { printf("Failed iso9660_is_dchar test on %c\n", c); i_bad++; } if (!iso9660_is_achar(c)) { printf("Failed iso9660_is_achar test on %c\n", c); i_bad++; } } if (i_bad) return i_bad; for (i=0; i<=13; i++ ) { c=achars[i]; if (iso9660_is_dchar(c)) { printf("Should not pass iso9660_is_dchar test on %c\n", c); i_bad++; } if (!iso9660_is_achar(c)) { printf("Failed iso9660_is_achar test on symbol %c\n", c); i_bad++; } } if (i_bad) return i_bad; /********************************************* * Test iso9660_strncpy_pad *********************************************/ dst_p = iso9660_strncpy_pad(dst, "1_3", 5, ISO9660_DCHARS); if ( 0 != strncmp(dst, "1_3 ", 5) ) { printf("Failed iso9660_strncpy_pad DCHARS\n"); return 31; } dst_p = iso9660_strncpy_pad(dst, "ABC!123", 2, ISO9660_ACHARS); if ( 0 != strncmp(dst, "AB", 2) ) { printf("Failed iso9660_strncpy_pad ACHARS truncation\n"); return 32; } /********************************************* * Test iso9660_dirname_valid_p *********************************************/ if ( iso9660_dirname_valid_p("/NOGOOD") ) { printf("/NOGOOD should fail iso9660_dirname_valid_p\n"); return 33; } if ( iso9660_dirname_valid_p("LONGDIRECTORY/NOGOOD") ) { printf("LONGDIRECTORY/NOGOOD should fail iso9660_dirname_valid_p\n"); return 34; } if ( !iso9660_dirname_valid_p("OKAY/DIR") ) { printf("OKAY/DIR should pass iso9660_dirname_valid_p\n"); return 35; } if ( iso9660_dirname_valid_p("OKAY/FILE.EXT") ) { printf("OKAY/FILENAME.EXT should fail iso9660_dirname_valid_p\n"); return 36; } /********************************************* * Test iso9660_pathname_valid_p *********************************************/ if ( !iso9660_pathname_valid_p("OKAY/FILE.EXT") ) { printf("OKAY/FILE.EXT should pass iso9660_dirname_valid_p\n"); return 37; } if ( iso9660_pathname_valid_p("OKAY/FILENAMETOOLONG.EXT") ) { printf("OKAY/FILENAMETOOLONG.EXT should fail iso9660_dirname_valid_p\n"); return 38; } if ( iso9660_pathname_valid_p("OKAY/FILE.LONGEXT") ) { printf("OKAY/FILE.LONGEXT should fail iso9660_dirname_valid_p\n"); return 39; } dst_p = iso9660_pathname_isofy ("this/file.ext", 1); if ( 0 != strncmp(dst_p, "this/file.ext;1", 16) ) { printf("Failed iso9660_pathname_isofy\n"); free(dst_p); return 40; } free(dst_p); /********************************************* * Test get/set date *********************************************/ { struct tm *p_tm, tm; iso9660_dtime_t dtime; time_t now = time(NULL); memset(&dtime, 0, sizeof(dtime)); p_tm = localtime(&now); iso9660_set_dtime(p_tm, &dtime); iso9660_get_dtime(&dtime, true, &tm); p_tm = gmtime(&now); iso9660_set_dtime_with_timezone(p_tm, 0, &dtime); if (!iso9660_get_dtime(&dtime, false, &tm)) { printf("Error returned by iso9660_get_dtime_with_timezone\n"); return 41; } if ( !time_compare(p_tm, &tm) ) { printf("GMT time retrieved with iso9660_get_dtime_with_timezone() not same as that\n"); printf("set with iso9660_set_dtime().\n"); return 42; } #ifdef HAVE_TM_GMTOFF if ( !time_compare(p_tm, &tm) ) { return 43; } p_tm = gmtime(&now); iso9660_set_dtime(p_tm, &dtime); if (!iso9660_get_dtime(&dtime, false, &tm)) { printf("Error returned by iso9660_get_dtime\n"); return 44; } if ( !time_compare(p_tm, &tm) ) { printf("GMT time retrieved with iso9660_get_dtime() not same as that\n"); printf("set with iso9660_set_dtime().\n"); return 45; } { iso9660_ltime_t ltime; p_tm = localtime(&now); iso9660_set_ltime(p_tm, <ime); if (!iso9660_get_ltime(<ime, &tm)) { printf("Problem running iso9660_get_ltime\n"); return 46; } if ( ! time_compare(p_tm, &tm) ) { printf("local time retrieved with iso9660_get_ltime() not\n"); printf("same as that set with iso9660_set_ltime().\n"); return 47; } p_tm = gmtime(&now); iso9660_set_ltime(p_tm, <ime); iso9660_get_ltime(<ime, &tm); if ( ! time_compare(p_tm, &tm) ) { printf("GMT time retrieved with iso9660_get_ltime() not\n"); printf("same as that set with iso9660_set_ltime().\n"); return 48; } } #endif } return 0; } libcdio-0.83/test/check_opts7.right0000644000175000017500000000127611642541561014234 00000000000000__________________________________ Disc mode is listed as: CD-DATA (Mode 1) CD-ROM Track List (1 - 1) #: MSF LSN Type Green? Copy? 1: 00:02:00 000000 data false no 170: 00:06:02 000302 leadout (693 KB raw, 604 KB formatted) Media Catalog Number (MCN): not available Last CD Session LSN: not supported by drive/driver __________________________________ CD Analysis Report CD-ROM with ISO 9660 filesystem ISO 9660: 64 blocks, label `CDROM ' Application: MKISOFS ISO 9660/HFS FILESYSTEM BUILDER & CDRECORD CD-R/DVD CREATOR (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING Preparer : Publisher : System : LINUX Volume : CDROM Volume Set : libcdio-0.83/test/joliet-nojoliet.right0000644000175000017500000000135411642541561015127 00000000000000__________________________________ ISO-9660 Information /: d [LSN 28] 2048 Oct 22 2004 22:44:59 . d [LSN 28] 2048 Oct 22 2004 22:44:59 .. d [LSN 29] 2048 Oct 22 2004 22:44:59 libcdio /libcdio/: d [LSN 29] 2048 Oct 22 2004 22:44:59 . d [LSN 28] 2048 Oct 22 2004 22:44:59 .. - [LSN 34] 17992 Mar 12 2004 07:18:03 copying - [LSN 43] 2156 Jun 26 2004 10:01:09 readme - [LSN 45] 2849 Aug 12 2004 09:22:23 readme.libcdio d [LSN 30] 2048 Oct 22 2004 22:44:59 test /libcdio/test/: d [LSN 30] 2048 Oct 22 2004 22:44:59 . d [LSN 29] 2048 Oct 22 2004 22:44:59 .. - [LSN 47] 74 Jul 25 2004 09:52:32 isofs_m1.cue libcdio-0.83/test/isofs-m1-no-rr.right0000644000175000017500000000205411642541561014507 00000000000000__________________________________ CD-ROM Track List (1 - 1) #: MSF LSN Type Green? Copy? 1: 00:02:00 000000 data false no 170: 00:06:02 000302 leadout (693 KB raw, 604 KB formatted) Media Catalog Number (MCN): not available Last CD Session LSN: not supported by drive/driver __________________________________ CD Analysis Report CD-ROM with ISO 9660 filesystem ISO 9660: 64 blocks, label `CDROM ' Application: MKISOFS ISO 9660/HFS FILESYSTEM BUILDER & CDRECORD CD-R/DVD CREATOR (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING Preparer : Publisher : System : LINUX Volume : CDROM Volume Set : ISO9660 filesystem /: d [LSN 23] 2048 Apr 20 2003 11:26:46 . d [LSN 23] 2048 Apr 20 2003 11:26:46 .. - [LSN 26] 17992 Jul 29 2002 12:39:53 copying d [LSN 24] 2048 Apr 20 2003 16:18:53 doc /doc/: d [LSN 24] 2048 Apr 20 2003 16:18:53 . d [LSN 23] 2048 Apr 20 2003 11:26:46 .. - [LSN 35] 648 Apr 20 2003 16:18:53 readme.txt libcdio-0.83/test/check_common_fn.in0000755000175000017500000000706711647671212014435 00000000000000# $Id: check_common_fn.in,v 1.14 2008/10/17 01:51:43 rocky Exp $ # # Copyright (C) 2003, 2004, 2005, 2006, 2008 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Common routines and setup for regression testing. SKIP_TEST_EXITCODE=77 # Some output changes depending on TZ and locale. Set this so we get known # results TZ=CUT LC_TIME='en_US' export TZ LC_TIME check_result() { RC=$1 shift msg=$1 shift cmdline=$* if test $RC -ne 0 ; then if test $RC -ne $SKIP_TEST_EXITCODE ; then echo "$0: $msg failed in comparing output." if test -n "$cmdline" ; then echo "$0: failed command:" echo " $cmdline" fi exit $RC else echo "$0: $msg skipped." fi else echo "$0: $msg ok." fi } test_common() { cmdname="$1" cmd="../src/${cmdname}@EXEEXT@" opts="$2" outfile="$3" rightfile="$4" if [ ! -x "${cmd}" ]; then echo "$0: No ${cmd}" return 1 fi cmdline="${cmd}" if "${cmd}" --no-header ${opts} >"${outfile}" 2>&1 ; then if test "@DIFF@" != no; then if @DIFF@ @DIFF_OPTS@ "${outfile}" "${rightfile}" ; then rm -f "${outfile}" return 0 else return 3 fi else echo "$0: No diff(1) or cmp(1) found - cannot test ${cmdname}" rm -f "${outfile}" return $SKIP_TEST_EXITCODE fi else echo "$0 failed running: ${cmdname} ${opts}" return 2 fi } test_cdinfo() { test_common cd-info "$@" } test_iso_info() { test_common iso-info "$@" } test_cd_read() { test_common cd-read "$@" } test_iso_read() { # not test_common, as we use an output file not stdout. opts="$1" outfile="$2" rightfile="$3" ISO_READ="../src/iso-read@EXEEXT@" if [ ! -x ${ISO_READ} ]; then echo "$0: No ${ISO_READ}" return 1 fi if "${ISO_READ}" ${opts} -o "${outfile}" 2>&1 ; then if test "@DIFF@" != no; then if @DIFF@ @DIFF_OPTS@ "${outfile}" "${rightfile}" ; then rm -f "${outfile}" return 0 else return 3 fi else echo "$0: No diff(1) or cmp(1) found - cannot test ${ISO_READ}" rm -f "${outfile}" return 77 fi else echo "$0 failed running: ${ISO_READ} ${opts} -o ${outfile}" return 2 fi } test_legal_header() { cmdname="$1" cmd="../src/${cmdname}@EXEEXT@" opts="$2" outfile="$3" if test "@GREP@" = no; then echo "$0: No grep(1) found - cannot test ${cmd}." echo "$0: Legal header test skipped." exit $SKIP_TEST_EXITCODE fi "${cmd}" ${opts} > ${outfile} 2>&1 while read line; do if ! grep -q "${line}" ${outfile}; then echo "$0: Legal header test failed due to missing expected line:" echo " ${line}" echo "$0: Failed command:" echo " ${cmd} ${opts}" rm -f "${outfile}" exit 4 fi done < ${srcdir}/check_legal.regex rm -f ${outfile} echo "$0: Legal header of ${cmd} ${opts} ok." } #;;; Local Variables: *** #;;; mode:shell-script *** #;;; eval: (sh-set-shell "bash") *** #;;; End: *** libcdio-0.83/test/check_opts.sh0000755000175000017500000000157511642541552013447 00000000000000#!/bin/sh #$Id: check_opts.sh,v 1.10 2007/12/28 02:11:01 rocky Exp $ # Check cd-info options if test -z "$srcdir" ; then srcdir=`pwd` fi if test "X$top_builddir" = "X" ; then top_builddir=`pwd`/.. fi . ${top_builddir}/test/check_common_fn if test ! -x ../src/cd-info ; then exit 77 fi BASE=`basename $0 .sh` fname=isofs-m1 i=0 for opt in '-T' '--no-tracks' '-A' '--no-analyze' '-I' '--no-ioctl' \ '-q' '--quiet' ; do testname=${BASE}$i opts="--no-device-info --cue-file ${srcdir}/data/${fname}.cue $opt --quiet" test_cdinfo "$opts" ${testname}.dump ${srcdir}/${testname}.right RC=$? check_result $RC "cd-info option test $opt" "../src/cd-info $opts" i=`expr $i + 1` done test_legal_header cd-info "${srcdir}/data/${fname}.cue" cd-info_legal.dump exit $RC #;;; Local Variables: *** #;;; mode:shell-script *** #;;; eval: (sh-set-shell "bash") *** #;;; End: *** libcdio-0.83/test/check_opts0.right0000644000175000017500000000102311642541560014212 00000000000000__________________________________ Disc mode is listed as: CD-DATA (Mode 1) Media Catalog Number (MCN): not available Last CD Session LSN: not supported by drive/driver __________________________________ CD Analysis Report CD-ROM with ISO 9660 filesystem ISO 9660: 64 blocks, label `CDROM ' Application: MKISOFS ISO 9660/HFS FILESYSTEM BUILDER & CDRECORD CD-R/DVD CREATOR (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING Preparer : Publisher : System : LINUX Volume : CDROM Volume Set : libcdio-0.83/test/copying.gpl0000644000175000017500000004312211114145233013122 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. libcdio-0.83/test/check_opts3.right0000644000175000017500000000052511642541561014224 00000000000000__________________________________ Disc mode is listed as: CD-DATA (Mode 1) CD-ROM Track List (1 - 1) #: MSF LSN Type Green? Copy? 1: 00:02:00 000000 data false no 170: 00:06:02 000302 leadout (693 KB raw, 604 KB formatted) Media Catalog Number (MCN): not available Last CD Session LSN: not supported by drive/driver libcdio-0.83/test/driver/0000755000175000017500000000000011652210416012322 500000000000000libcdio-0.83/test/driver/freebsd.c0000644000175000017500000000450111650127630014023 00000000000000/* -*- C -*- Copyright (C) 2010 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Unit test for lib/driver/freebsd.c */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #include int main(int argc, const char *argv[]) { CdIo_t *p_cdio; char **ppsz_drives=NULL; cdio_loglevel_default = (argc > 1) ? CDIO_LOG_DEBUG : CDIO_LOG_INFO; /* snprintf(psz_nrgfile, sizeof(psz_nrgfile)-1, "%s/%s", TEST_DIR, cue_file[i]); */ if (!cdio_have_driver(DRIVER_FREEBSD)) return(77); p_cdio = cdio_open_am (NULL, DRIVER_UNKNOWN, NULL); if (p_cdio) { const char *psz_access_mode = cdio_get_arg(p_cdio, "access-mode"); if (0 != strncmp(psz_access_mode, "ioctl", strlen("ioctl")) && 0 != strncmp(psz_access_mode, "CAM", strlen("CAM"))) { fprintf(stderr, "Got %s; Should get back ioctl or CAM.\n", psz_access_mode); exit(2); } } cdio_destroy(p_cdio); ppsz_drives = cdio_get_devices(DRIVER_DEVICE); if (!ppsz_drives) { printf("Can't find a CD-ROM drive. Skipping test.\n"); exit(77); } p_cdio = cdio_open_freebsd(ppsz_drives[0]); if (p_cdio) { const char *psz_source = cdio_get_arg(p_cdio, "source"); if (0 != strncmp(psz_source, ppsz_drives[0], strlen(ppsz_drives[0]))) { fprintf(stderr, "Got %s; should get back %s, the name we opened.\n", psz_source, ppsz_drives[0]); exit(1); } } cdio_free_device_list(ppsz_drives); return 0; } libcdio-0.83/test/driver/mmc_write.c0000644000175000017500000005453611650127645014422 00000000000000/* -*- C -*- Copyright (C) 2009 Thomas Schmitt Copyright (C) 2010 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Regression test for MMC commands involving read/write access. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #include #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #include #define SKIP_TEST 77 /* gcc may warn if no prototypes are given before function definition */ static int handle_outcome(CdIo_t *p_cdio, int i_status, unsigned int *pi_sense_avail, cdio_mmc_request_sense_t * p_sense_reply, unsigned int i_flag); static int load_eject(CdIo_t *p_cdio, unsigned int *pi_sense_avail, cdio_mmc_request_sense_t * p_sense_reply, unsigned int i_flag); static void print_status_sense(int i_status, int sense_valid, cdio_mmc_request_sense_t *, unsigned int i_flag); static int test_eject_load_cycle(CdIo_t *p_cdio, unsigned int i_flag); static int test_eject_test_load(CdIo_t *p_cdio, unsigned int i_flag); static int test_mode_select(CdIo_t *p_cdio, unsigned int *pi_sense_avail, cdio_mmc_request_sense_t *p_sense_reply, unsigned char *p_buf, unsigned int i_size, unsigned int i_flag); static int mode_sense(CdIo_t *p_cdio, unsigned int *pi_sense_avail, cdio_mmc_request_sense_t * p_sense_reply, unsigned int i_page_code, unsigned int subpage_code, int i_alloc_len, unsigned char *buf, int *i_size, unsigned int i_flag); static int test_unit_ready(CdIo_t *p_cdio, unsigned int *pi_sense_avail, cdio_mmc_request_sense_t * p_sense_reply, unsigned int i_flag); static int test_rwr_mode_page(CdIo_t *p_cdio, unsigned int i_flag); static int test_write(char *psz_drive_path, unsigned int i_flag); static int wait_for_drive(CdIo_t *p_cdio, unsigned int max_tries, unsigned int i_flag); /* ------------------------- Helper functions ---------------------------- */ /* @param i_flag bit0= verbose */ static int handle_outcome(CdIo_t *p_cdio, driver_return_code_t i_status, unsigned int *pi_sense_avail, cdio_mmc_request_sense_t * p_sense_reply, unsigned int i_flag) { cdio_mmc_request_sense_t *p_temp_sense_reply = NULL; *pi_sense_avail = mmc_last_cmd_sense(p_cdio, &p_temp_sense_reply); print_status_sense(i_status, *pi_sense_avail, p_temp_sense_reply, i_flag & 1); if (18 <= *pi_sense_avail) memcpy(p_sense_reply, p_temp_sense_reply, sizeof(cdio_mmc_request_sense_t)); else memset(p_sense_reply, 0, sizeof(cdio_mmc_request_sense_t)); return i_status; } /** @param flag bit0= verbose */ static void print_status_sense(int i_status, int sense_valid, cdio_mmc_request_sense_t *p_sense_reply, unsigned int i_flag) { if (!(i_flag & 1)) return; printf("return= %d , sense(%d)", i_status, sense_valid); if (sense_valid >= 14) printf(": KEY=%s (%1.1X), ASC= %2.2X , ASCQ= %2.2X", mmc_sense_key2str[p_sense_reply->sense_key], p_sense_reply->sense_key, p_sense_reply->asc, p_sense_reply->ascq); printf("\n"); } /* --------------------------- MMC commands ------------------------------ */ /* OBTRUSIVE. PHYSICAL EFFECT: DANGER OF HUMAN INJURY */ /** @param i_flag bit0= verbose bit1= Asynchronous operation bit2= Load (else Eject) @return return value of mmc_run_cmd() */ static int load_eject(CdIo_t *p_cdio, unsigned int *pi_sense_avail, cdio_mmc_request_sense_t *p_sense_reply, unsigned int i_flag) { int i_status; bool b_eject = !!(i_flag & 4); bool b_immediate = !!(i_flag & 2); i_status = mmc_start_stop_unit(p_cdio, b_eject, b_immediate, 0, 0); if (i_flag & 1) printf("load_eject(0x%X) ... ", i_flag); return handle_outcome(p_cdio, i_status, pi_sense_avail, p_sense_reply, i_flag & 1); } /* BARELY OBTRUSIVE: MIGHT RUIN A SIMULTANEOUS BURNING OPERATION ON THE DRIVE */ /** Fetch a mode page or a part of it from the drive. @param i_alloc_len The number of bytes to be requested from the drive and to be copied into parameter buf. This has to include the 8 bytes of header and may not be less than 10. @param p_buf Will contain at most alloc_len many bytes. The first 8 are a Mode Parameter Header as of SPC-3 7.4.3, table 240. The further bytes are the mode page, typically as of MMC-5 7.2. There are meanwhile deprecated mode pages which appear only in older versions of MMC. @param i_size Will return the number of actually read bytes resp. the number of available bytes. See flag bit1. @param i_flag bit0= verbose bit1= Peek mode: Reply number of available bytes in *i_size and not the number of actually read bytes. @return return value of mmc_run_cmd(), or other driver_return_code_t */ static driver_return_code_t mode_sense(CdIo_t *p_cdio, unsigned int *pi_sense_avail, cdio_mmc_request_sense_t *p_sense_reply, unsigned int i_page_code, unsigned int subpage_code, int i_alloc_len, unsigned char *p_buf, int *pi_size, unsigned int i_flag) { driver_return_code_t i_status; if (i_alloc_len < 10) return DRIVER_OP_BAD_PARAMETER; if (i_flag & 1) printf("mode_sense(0x%X, %X, %d) ... ", i_page_code, subpage_code, i_alloc_len); i_status = mmc_mode_sense_10(p_cdio, p_buf, i_alloc_len, i_page_code); handle_outcome(p_cdio, i_status, pi_sense_avail, p_sense_reply, i_flag & 1); if (DRIVER_OP_SUCCESS != i_status) return i_status; if (i_flag & 2) *pi_size = p_buf[9] + 10; /* MMC-5 7.2.3 */ else *pi_size = p_buf[0] * 256 + p_buf[1] + 2; /* SPC-3 7.4.3, table 240 */ return i_status; } /* OBTRUSIVE. RUINS A SIMULTANEOUS BURNING OPERATION ON THE DRIVE and might return minor failure with -ROM drives */ /** Send a mode page to the drive. @param buf Contains the payload bytes. The first 8 shall be a Mode Parameter Header as of SPC-3 7.4.3, table 240. The further bytes are the mode page, typically as of MMC-5 7.2. There are meanwhile deprecated mode pages which appear only in older versions of MMC. @param i_size The number of bytes in buf. @param flag bit0= verbose @return return value of mmc_run_cmd(), or other driver_return_code_t */ static int test_mode_select(CdIo_t *p_cdio, unsigned int *pi_sense_avail, cdio_mmc_request_sense_t *p_sense_reply, unsigned char *p_buf, unsigned int i_size, unsigned int i_flag) { int i_status, i; if (i_size < 10) return DRIVER_OP_BAD_PARAMETER; if (i_flag & 1) { printf("test_mode_select to drive: %d bytes\n", i_size); for (i = 0; i < i_size; i++) { printf("%2.2X ", (unsigned int) p_buf[i]); if ((i % 20) == 19) printf("\n"); } if ((i % 20)) printf("\n"); } if (i_flag & 1) printf("test_mode_select(0x%X, %d, %d) ... ", (unsigned int) p_buf[8], (unsigned int) p_buf[9], i_size); i_status = mmc_mode_select_10(p_cdio, p_buf, i_size, 0x10, 10000); return handle_outcome(p_cdio, i_status, pi_sense_avail, p_sense_reply, i_flag & 1); } /* UNOBTRUSIVE */ /** @param pi_sense_avail Number of available sense bytes (18 get copied if all 18 exist) @param p_sense_reply eventual sense bytes @param i_flag bit0= verbose @return return value of mmc_run_cmd() */ static int test_unit_ready(CdIo_t *p_cdio, unsigned int *pi_sense_avail, cdio_mmc_request_sense_t *p_sense_reply, unsigned int i_flag) { int i_status; if (i_flag & 1) printf("test_unit_ready ... "); i_status = mmc_test_unit_ready(p_cdio, 0); return handle_outcome(p_cdio, i_status, pi_sense_avail, p_sense_reply, i_flag & 1); } /* --------------------------- Larger gestures ----------------------------- */ /* UNOBTRUSIVE */ /** Watch drive by test unit ready loop until ready, no media or timeout. @param flag bit0= verbose bit1= expect media (do not end on no-media sense) @return 1= all seems well , 0= minor failure , -1= severe failure */ static int wait_for_drive(CdIo_t *p_cdio, unsigned int i_max_tries, unsigned int i_flag) { int i_ret, i; unsigned int i_sense_avail; cdio_mmc_request_sense_t sense_reply; for (i = 0; i < i_max_tries; i++) { i_ret = test_unit_ready(p_cdio, &i_sense_avail, &sense_reply, !!(i_flag & 1)); if (i_ret == 0) /* Unit is ready */ return 1; if (i_sense_avail < 18) return -1; if (2 == sense_reply.sense_key && 0x04 == sense_reply.asc) { /* Not ready */; } else if (6 == sense_reply.sense_key && 0x28 == sense_reply.asc && 0 == sense_reply.ascq) { /* Media change notice = try again */; } else if (2 == sense_reply.sense_key && 0x3a == sense_reply.asc) { /* Medium not present */; if (!(i_flag & 2)) return 1; } else if (0 == sense_reply.sense_key && 0 == sense_reply.asc) { /* Error with no sense */; return -1; break; } else { /* Other error */; return 0; } sleep(1); } fprintf(stderr, "wait_for_drive: Drive not ready after %d retries\n", i_max_tries); return -1; } /* OBTRUSIVE. Opens and closes drive door - watch your fingers! */ /** Eject, wait, load asynchronously, and watch by test unit ready loop. @param i_flag bit0= verbose bit1= expect media (do not end on no-media sense) @return 1= all seems well , 0= minor failure , -1= severe failure */ static int test_eject_load_cycle(CdIo_t *p_cdio, unsigned int i_flag) { int i_ret; unsigned int i_sense_avail; cdio_mmc_request_sense_t sense_reply; /* Eject synchronously */ printf("test_eject_load_cycle: WARNING: EJECTING THE TRAY !\n"); sleep(2); load_eject(p_cdio, &i_sense_avail, &sense_reply, 0 | (i_flag & 1)); printf("test_eject_load_cycle: waiting for 5 seconds. DO NOT TOUCH THE TRAY !\n"); sleep(3); /* Load asynchronously */ printf("test_eject_load_cycle: WARNING: LOADING THE TRAY !\n"); sleep(2); load_eject(p_cdio, &i_sense_avail, &sense_reply, 4 | 2 | (i_flag & 1)); /* Wait for drive attention */ i_ret = wait_for_drive(p_cdio, 30, i_flag & 3); return i_ret; } /* OBTRUSIVE , PHYSICAL EFFECT , DANGER OF HUMAN INJURY */ /** Eject, wait, test, load. All synchronously. @param flag bit0= verbose @return 1= all seems well , 0= minor failure , -1= severe failure */ static int test_eject_test_load(CdIo_t *p_cdio, unsigned int i_flag) { int i_ret; unsigned int i_sense_avail; cdio_mmc_request_sense_t sense_reply; /* Eject synchronously */ printf("test_eject_test_load: WARNING: EJECTING THE TRAY !\n"); sleep(2); load_eject(p_cdio, &i_sense_avail, &sense_reply, 0 | (i_flag & 1)); printf("test_eject_test_load: waiting for 5 seconds. DO NOT TOUCH THE TRAY !\n"); sleep(3); i_ret = test_unit_ready(p_cdio, &i_sense_avail, &sense_reply, i_flag & 1); if (i_ret == 0) { fprintf(stderr, "test_eject_test_load: Drive ready although tray ejected.\n"); fprintf(stderr, "test_eject_test_load: Test aborted. Tray will stay ejected.\n"); return -1; } if (i_ret == 0 || i_sense_avail < 18) { fprintf(stderr, "test_eject_test_load: Only %d sense reply bytes returned. Expected >= 18.\n", i_sense_avail); fprintf(stderr, "test_eject_test_load: Test aborted. Tray will stay ejected.\n"); return -1; } /* Load synchronously */ fprintf(stderr, "test_eject_test_load: WARNING: LOADING THE TRAY !\n"); sleep(2); load_eject(p_cdio, &i_sense_avail, &sense_reply, 4 | (i_flag & 1)); return 1; } /* OBTRUSIVE */ /** Read Mode Page 05h "Write Parameters", change a value, write the page, check effect, restore old value, check again. @param flag bit0= verbose @return 1= all seems well , 0= minor failure , -1= severe failure */ static int test_rwr_mode_page(CdIo_t *p_cdio, unsigned int i_flag) { int i_ret; unsigned int i_sense_avail; int page_code = 5, subpage_code = 0, i_alloc_len, i_size; int write_type, final_return = 1, new_write_type, old_i_size; cdio_mmc_request_sense_t sense_reply; unsigned char buf[265], old_buf[265]; /* page size is max. 255 + 10 */ static char w_types[4][8] = {"Packet", "TAO", "SAO", "Raw"}; i_alloc_len = 10; i_ret = mode_sense(p_cdio, &i_sense_avail, &sense_reply, page_code, subpage_code, i_alloc_len, buf, &i_size, 2 | (i_flag & 1)); if (i_ret != 0) { fprintf(stderr, "test_rwr_mode_page: Cannot obtain mode page 05h.\n"); return 0; } i_alloc_len = (i_size <= sizeof(buf)) ? i_size : sizeof(buf); i_ret = mode_sense(p_cdio, &i_sense_avail, &sense_reply, page_code, subpage_code, i_alloc_len, buf, &i_size, (i_flag & 1)); if (i_ret != 0) { fprintf(stderr, "test_rwr_mode_page: Cannot obtain mode page 05h.\n"); return 0; } memcpy(old_buf, buf, sizeof(buf)); old_i_size = i_size; write_type = buf[10] & 0x0f; if (i_flag & 1) printf("test_rwr_mode_page: Write type = %d (%s)\n", write_type, write_type < 4 ? w_types[write_type] : "Reserved"); /* Choose a conservative CD writer setting. */ memset(buf, 0, 8); if (write_type == 1) { /* is TAO -> make SAO */ buf[10] = (buf[10] & 0xf0) | 2; /* SAO */ new_write_type = 2; } else { buf[10] = (buf[10] & 0xf0) | 1; /* TAO */ new_write_type = 1; } buf[11] = 4; /* Track Mode 4, no multi-session, variable Packet size */ buf[12] = 8; /* Data Block Type : CD-ROM Mode 1 */ buf[16] = 0; /* Session Format : "CD-DA or CD-ROM" */ i_ret = test_mode_select(p_cdio, &i_sense_avail, &sense_reply, buf, i_size, i_flag & 1); if (i_ret != 0) { fprintf(stderr, "test_rwr_mode_page: Cannot set mode page 05h.\n"); if (DRIVER_OP_NOT_PERMITTED == i_ret) { fprintf(stderr, "test_rwr_mode_page: DRIVER_OP_NOT_PERMITTED with MODE SELECT.\n"); return -1; } return 0; } /* Read mode page and check whether effect visible in buf[10] */ i_ret = mode_sense(p_cdio, &i_sense_avail, &sense_reply, page_code, subpage_code, i_alloc_len, buf, &i_size, (i_flag & 1)); if (0 != i_ret) { fprintf(stderr, "test_rwr_mode_page: Cannot obtain mode page 05h.\n"); final_return = final_return > 0 ? 0 : final_return; } else if ((buf[10] & 0xf) != new_write_type) { fprintf(stderr, "test_rwr_mode_page: Mode page did not get into effect. (due %d , is %d)\n", new_write_type, buf[10] & 0xf); /* One of my DVD burners does this if no media is loaded */ final_return = final_return > 0 ? 0 : final_return; } /* Restore old mode page */ i_ret = test_mode_select(p_cdio, &i_sense_avail, &sense_reply, old_buf, old_i_size, i_flag & 1); if (0 != i_ret) { fprintf(stderr, "test_rwr_mode_page: Cannot set mode page 05h.\n"); if (i_ret == DRIVER_OP_NOT_PERMITTED) { fprintf(stderr, "test_rwr_mode_page: DRIVER_OP_NOT_PERMITTED with MODE SELECT.\n"); return -1; } final_return = final_return > 0 ? 0 : final_return; } /* Read mode page and check whether old_buf is in effect again */ i_ret = mode_sense(p_cdio, &i_sense_avail, &sense_reply, page_code, subpage_code, i_alloc_len, buf, &i_size, (i_flag & 1)); if (0 != i_ret) { fprintf(stderr, "test_rwr_mode_page: Cannot obtain mode page 05h.\n"); return final_return > 0 ? 0 : final_return; } else if (memcmp(buf, old_buf, i_size) != 0) { fprintf(stderr, "test_rwr_mode_page: Mode page was not restored to old state.\n"); final_return = -1; } if (i_flag & 1) printf("test_rwr_mode_page: Mode page 2Ah restored to previous state\n"); return final_return; } /* ----------- Test of MMC driver enhancements , december 2009 ------------- */ /* OBTRUSIVE */ /** This function bundles tests for the capability to perform MMC commands of payload direction SCSI_MMC_DATA_WRITE and to detect the sense reply of MMC commands, which indicates error causes or important drive events. The default configuration is not very obtrusive to the drive, although the drive should not be used for other operations at the same time. There are static variables in this function which enable additional more obtrusive tests or simulate the lack of write capabilities. See the statements about obtrusiveness and undesired side effects above the descriptions of the single functions. @param psz_drive_path a drive address suitable for cdio_open_am() @param flag bit0= verbose @return 0= no severe failure else an proposal for an exit() value is returned */ static int test_write(char *psz_drive_path, unsigned int i_flag) { unsigned int i_sense_avail = 0; unsigned int i_sense_valid; int i_ret; bool b_verbose = !!(i_flag & 1); int old_log_level = cdio_loglevel_default; cdio_mmc_request_sense_t sense_reply; CdIo_t *p_cdio; /* If true, then the tray will get ejected and loaded again */ static bool with_tray_dance = false; /* If true, then an asynchronous test loop will wait 30 s for loaded media */ static bool test_cycle_with_media = false; /* If true, then a lack of w-permission will be emulated by using the insufficient access mode "IOCTL" */ static bool emul_lack_of_wperm = false; p_cdio = cdio_open_am(psz_drive_path, DRIVER_DEVICE, "MMC_RDWR_EXCL"); if (!p_cdio) i_ret = SKIP_TEST - 16; else { const char *psz_access_mode = cdio_get_arg(p_cdio, "access-mode"); if (0 != strncmp(psz_access_mode, "MMC_RDWR_EXCL", strlen("MMC_RDWR_EXCL"))) { fprintf(stderr, "Got %s; Should get back %s, the access mode requested.\n", psz_access_mode, "MMC_RDWR_EXCL"); i_ret = 1; goto ex; } /* The further code produces some intentional failures which should not be reported by mmc_run_cmd() as INFO messages. */ cdio_loglevel_default = CDIO_LOG_WARN; /* Test availability of sense reply in case of unready drive. E.g. if the tray is already ejected. */ i_ret = test_unit_ready(p_cdio, &i_sense_avail, &sense_reply, b_verbose); if (0 != i_ret && i_sense_avail < 18) { fprintf(stderr, "Error: Drive not ready. Only %u sense bytes. Expected >= 18.\n", i_sense_avail); i_ret = 2; goto ex; } if (emul_lack_of_wperm) { /* To check behavior with lack of w-permission */ printf("test_write: SIMULATING LACK OF WRITE CAPABILITIES by access mode IOCTL\n"); cdio_destroy(p_cdio); p_cdio = cdio_open_am(psz_drive_path, DRIVER_DEVICE, "IOCTL"); } /* Test write permission */ /* Try whether a mode page 2Ah can be set */ i_ret = test_rwr_mode_page(p_cdio, b_verbose); if (i_ret <= 0) { if (i_ret < 0) { fprintf(stderr, "Error: test_rwr_mode_page() had severe failure.\n"); i_ret = 3; goto ex; } printf("Warning: test_rwr_mode_page() had minor failure.\n"); } if (with_tray_dance) { /* More surely provoke a non-trivial sense reply */ if (test_cycle_with_media) { /* Eject, wait, load, watch by test unit ready loop */ i_ret = test_eject_load_cycle(p_cdio, 2 | b_verbose); if (i_ret <= 0) { if (i_ret < 0) { fprintf(stderr, "Error: test_eject_load_cycle() had severe failure.\n"); i_ret = 4; goto ex; } printf("Warning: test_eject_load_cycle() had minor failure.\n"); } } else { /* Eject, test for proper unreadiness, load */ i_ret = test_eject_test_load(p_cdio, b_verbose); if (i_ret <= 0) { if (i_ret < 0) { fprintf(stderr, "Error: test_eject_test_load() had severe failure.\n"); i_ret = 5; goto ex; } printf("Warning: test_eject_test_load() had minor failure.\n"); } /* Wait for drive attention */ wait_for_drive(p_cdio, 15, 2 | b_verbose); } } /* How are we, finally ? */ i_ret = test_unit_ready(p_cdio, &i_sense_valid, &sense_reply, b_verbose); if ((i_flag & 1) && 0 != i_ret && 2 == sense_reply.sense_key && 0x3a == sense_reply.asc) fprintf(stderr, "test_unit_ready: Note: No loaded media detected.\n"); i_ret = 0; } ex:; cdio_loglevel_default = old_log_level; cdio_destroy(p_cdio); return i_ret; } /* --------------------------- main ----------------------------- */ int main(int argc, const char *argv[]) { CdIo_t *p_cdio; char **ppsz_drives=NULL; int ret; int exitrc = 0; bool b_verbose = (argc > 1); cdio_loglevel_default = b_verbose ? CDIO_LOG_DEBUG : CDIO_LOG_INFO; ppsz_drives = cdio_get_devices(DRIVER_DEVICE); if (!ppsz_drives) { printf("Can't find a CD-ROM drive. Skipping test.\n"); exit(SKIP_TEST); } p_cdio = cdio_open(ppsz_drives[0], DRIVER_DEVICE); if (p_cdio) { const char *psz_have_mmc = cdio_get_arg(p_cdio, "mmc-supported?"); if ( psz_have_mmc && 0 == strncmp("true", psz_have_mmc, sizeof("true")) ) { /* Test the MMC enhancements of version 0.83 in december 2009 */ ret = test_write(ppsz_drives[0], cdio_loglevel_default == CDIO_LOG_DEBUG); if (ret != 0) exit(ret + 16); } cdio_destroy(p_cdio); } else { fprintf(stderr, "cdio_open('%s') failed\n", ppsz_drives[0]); exit(2); } cdio_free_device_list(ppsz_drives); return exitrc; } libcdio-0.83/test/driver/helper.h0000644000175000017500000000162611327023331013674 00000000000000/* -*- C -*- Copyright (C) 2010 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ void check_access_mode(CdIo_t *p_cdio, const char *psz_expected_access_mode); void check_get_arg_source(CdIo_t *p_cdio, const char *psz_expected_source); void check_mmc_supported(CdIo_t *p_cdio, int i_expected); libcdio-0.83/test/driver/osx.c0000644000175000017500000000423011650127663013227 00000000000000/* -*- C -*- Copyright (C) 2009, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Unit test for lib/driver/osx.c */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #include int main(int argc, const char *argv[]) { CdIo_t *p_cdio; char **ppsz_drives=NULL; cdio_loglevel_default = (argc > 1) ? CDIO_LOG_DEBUG : CDIO_LOG_INFO; /* snprintf(psz_nrgfile, sizeof(psz_nrgfile)-1, "%s/%s", TEST_DIR, cue_file[i]); */ if (!cdio_have_driver(DRIVER_OSX)) return(77); ppsz_drives = cdio_get_devices(DRIVER_DEVICE); if (!ppsz_drives) { printf("Can't find a CD-ROM drive. Skipping test.\n"); exit(77); } p_cdio = cdio_open_osx(ppsz_drives[0]); if (p_cdio) { const char *psz_source = cdio_get_arg(p_cdio, "source"); const char *psz_access_mode = cdio_get_arg(p_cdio, "access-mode"); if (0 != strncmp(psz_source, ppsz_drives[0], strlen(ppsz_drives[0]))) { fprintf(stderr, "Got %s; should get back %s, the name we opened.\n", psz_source, ppsz_drives[0]); exit(1); } if (0 != strncmp(psz_access_mode, "OS X", strlen("OS X"))) { fprintf(stderr, "Got %s; Should get back %s, the access mode requested.\n", psz_access_mode, "OS X"); exit(2); } } cdio_destroy(p_cdio); cdio_free_device_list(ppsz_drives); return 0; } libcdio-0.83/test/driver/Makefile.am0000644000175000017500000000447511334674052014317 00000000000000# Copyright (C) 2009, 2010 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . INCLUDES = -I$(top_srcdir) $(LIBCDIO_CFLAGS) $(LIBISO9660_CFLAGS) DATA_DIR = $(abs_top_srcdir)/test/data bincue_SOURCES = helper.c bincue.c bincue_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) bincue_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\" cdrdao_SOURCES = helper.c cdrdao.c cdrdao_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) cdrdao_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\" freebsd_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) freebsd_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\" realpath_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) realpath_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\" gnu_linux_SOURCES= helper.c gnu_linux.c gnu_linux_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) gnu_linux_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\" mmc_read_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) mmc_read_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\" mmc_write_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) mmc_write_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\" nrg_SOURCES = helper.c nrg.c nrg_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) nrg_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\" osx_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) osx_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\" solaris_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) solaris_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\" win32_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) win32_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\" check_PROGRAMS = \ bincue cdrdao freebsd gnu_linux \ mmc_read mmc_write nrg \ osx realpath solaris win32 TESTS = $(check_PROGRAMS) EXTRA_DIST = \ bincue.c.in \ helper.c \ helper.h \ cdrdao.c.in \ nrg.c.in MOSTLYCLEANFILES = \ $(check_PROGRAMS) \ core core.* *.dump cdda-orig.wav cdda-try.wav *.raw test: check-am libcdio-0.83/test/driver/nrg.c0000644000175000017500000000512111652140274013177 00000000000000/* -*- C -*- Copyright (C) 2008, 2010, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Regression test for Nero image driver: lib/driver/image/nrg.c. */ #include #include #include #if defined(HAVE_CONFIG_H) && !defined(__CDIO_CONFIG_H__) # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #include "helper.h" #ifndef DATA_DIR #define DATA_DIR "/src/external-vcs/libcdio/test/data" #endif #define NUM_FIELDS 2 int main(int argc, const char *argv[]) { char psz_nrgfile[500]; CdIo_t *p_cdio; const char *cdtext_check[NUM_FIELDS] = { "Richard Stallman", "Join us now we have the software" }; const int cdtext_fields[NUM_FIELDS] = {CDTEXT_PERFORMER, CDTEXT_TITLE}; cdio_loglevel_default = (argc > 1) ? CDIO_LOG_DEBUG : CDIO_LOG_INFO; /* snprintf(psz_nrgfile, sizeof(psz_nrgfile)-1, "%s/%s", DATA_DIR, cue_file[i]); */ if (!cdio_have_driver(DRIVER_NRG)) return(77); snprintf(psz_nrgfile, sizeof(psz_nrgfile)-1, "%s/%s", DATA_DIR, "p1.nrg"); p_cdio = cdio_open_nrg(psz_nrgfile); if (!p_cdio) { printf("Can't open Nero image file: %s.\n", psz_nrgfile); return(1); } { unsigned int i; cdtext_t *p_cdtext = cdio_get_cdtext(p_cdio, 0); if (!p_cdtext) return(1); for (i=0; ifield[cdtext_fields[i]]; if (!psz_field) return(2); if (0 != strncmp(psz_field, cdtext_check[i], strlen(cdtext_check[i]))) { printf("CD-Text compare mismatch.\n"); printf("expected:\n\t'%s'\ngot:\n\t'%s'\n", cdtext_check[i], psz_field); return(3); } } } check_mmc_supported(p_cdio, 1); check_access_mode(p_cdio, "image"); check_get_arg_source(p_cdio, psz_nrgfile); cdio_destroy(p_cdio); return 0; } libcdio-0.83/test/driver/mmc_read.c0000644000175000017500000003243611650127642014173 00000000000000/* -*- C -*- Copyright (C) 2009 Thomas Schmitt Copyright (C) 2010 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** Regression test for MMC commands which don't involve read/write access. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #include #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #include #define SKIP_TEST 77 /* gcc may warn if no prototypes are given before function definition */ static int handle_outcome(CdIo_t *p_cdio, driver_return_code_t i_status, int *pi_sense_avail, cdio_mmc_request_sense_t * p_sense_reply, unsigned int i_flag); static int get_disctype(CdIo_t *p_cdio, bool b_verbose); static driver_return_code_t get_disc_erasable(const CdIo_t *p_cdio, const char *psz_source, bool verbose); static int mode_sense(CdIo_t *p_cdio, int *pi_sense_avail, cdio_mmc_request_sense_t *p_sense_reply, unsigned int page_code, unsigned int subpage_code, int i_alloc_len, unsigned char *p_buf, int *pi_size, unsigned int i_flag); static void print_status_sense(int i_status, int i_sense_valid, cdio_mmc_request_sense_t *p_sense_reply, unsigned int i_flag); static int test_read(char *psz_drive_path, unsigned int i_flag); static int test_unit_ready(CdIo_t *p_cdio, int *pi_sense_avail, cdio_mmc_request_sense_t *p_sense_reply, unsigned int i_flag); static int wait_for_drive(CdIo_t *p_cdio, unsigned int max_tries, bool b_verbose); /* ------------------------- Helper functions ---------------------------- */ static driver_return_code_t get_disc_erasable(const CdIo_t *p_cdio, const char *psz_source, bool b_verbose) { driver_return_code_t i_status; bool b_erasable; i_status = mmc_get_disc_erasable(p_cdio, &b_erasable); if (b_verbose && DRIVER_OP_SUCCESS == i_status) printf("Disc is %serasable.\n", b_erasable ? "" : "not "); return i_status; } static int get_disctype(CdIo_t *p_cdio, bool b_verbose) { cdio_mmc_feature_profile_t disctype; driver_return_code_t i_status = mmc_get_disctype(p_cdio, 0, &disctype); if (DRIVER_OP_SUCCESS == i_status) { if (b_verbose) fprintf(stderr, "test_disctype: profile is %s (0x%X)\n", mmc_feature_profile2str(disctype), disctype); } return DRIVER_OP_SUCCESS; } /** @param flag bit0= verbose */ static int handle_outcome(CdIo_t *p_cdio, driver_return_code_t i_status, int *pi_sense_avail, cdio_mmc_request_sense_t * p_sense_reply, unsigned int i_flag) { cdio_mmc_request_sense_t *p_temp_sense_reply = NULL; *pi_sense_avail = mmc_last_cmd_sense(p_cdio, &p_temp_sense_reply); print_status_sense(i_status, *pi_sense_avail, p_temp_sense_reply, i_flag & 1); if (18 <= *pi_sense_avail) memcpy(p_sense_reply, p_temp_sense_reply, sizeof(cdio_mmc_request_sense_t)); else memset(p_sense_reply, 0, sizeof(cdio_mmc_request_sense_t)); return i_status; } /** @param i_flag bit0= verbose */ static void print_status_sense(int i_status, int i_sense_valid, cdio_mmc_request_sense_t *p_sense_reply, unsigned int i_flag) { if (!(i_flag & 1)) return; printf("return= %d , sense(%d)", i_status, i_sense_valid); if (i_sense_valid >= 14) printf(": KEY=%s (%1.1X), ASC= %2.2X , ASCQ= %2.2X", mmc_sense_key2str[p_sense_reply->sense_key], p_sense_reply->sense_key, p_sense_reply->asc, p_sense_reply->ascq); printf("\n"); } /* --------------------------- MMC commands ------------------------------ */ /** @param flag bit0= verbose @param sense_avail Number of available sense bytes (18 get copied if all 18 exist) @param sense_reply eventual sense bytes @return return value of mmc_run_cmd() */ static int test_unit_ready(CdIo_t *p_cdio, int *pi_sense_avail, cdio_mmc_request_sense_t *p_sense_reply, unsigned int i_flag) { int i_status; int old_log_level = cdio_loglevel_default; cdio_loglevel_default = CDIO_LOG_WARN; if (i_flag & 1) printf("test_unit_ready ... "); i_status = mmc_test_unit_ready(p_cdio, 0); cdio_loglevel_default = old_log_level; return handle_outcome(p_cdio, i_status, pi_sense_avail, p_sense_reply, i_flag & 1); } /* BARELY OBTRUSIVE: MIGHT RUIN A SIMULTANEOUS BURNING OPERATION ON THE DRIVE */ /** Fetch a mode page or a part of it from the drive. @param i_alloc_len The number of bytes to be requested from the drive and to be copied into parameter buf. This has to include the 8 bytes of header and may not be less than 10. @param p_buf Will contain at most alloc_len many bytes. The first 8 are a Mode Parameter Header as of SPC-3 7.4.3, table 240. The further bytes are the mode page, typically as of MMC-5 7.2. There are meanwhile deprecated mode pages which appear only in older versions of MMC. @param i_size Will return the number of actually read bytes resp. the number of available bytes. See flag bit1. @param i_flag bit0= verbose bit1= Peek mode: Reply number of available bytes in *i_size and not the number of actually read bytes. @return return value of mmc_run_cmd(), or other driver_return_code_t */ static driver_return_code_t mode_sense(CdIo_t *p_cdio, int *pi_sense_avail, cdio_mmc_request_sense_t *p_sense_reply, unsigned int i_page_code, unsigned int subpage_code, int i_alloc_len, unsigned char *p_buf, int *pi_size, unsigned int i_flag) { driver_return_code_t i_status; if (i_alloc_len < 10) return DRIVER_OP_BAD_PARAMETER; if (i_flag & 1) printf("mode_sense(0x%X, %X, %d) ... ", i_page_code, subpage_code, i_alloc_len); i_status = mmc_mode_sense_10(p_cdio, p_buf, i_alloc_len, i_page_code); handle_outcome(p_cdio, i_status, pi_sense_avail, p_sense_reply, i_flag & 1); if (DRIVER_OP_SUCCESS != i_status) return i_status; if (i_flag & 2) *pi_size = p_buf[9] + 10; /* MMC-5 7.2.3 */ else *pi_size = p_buf[0] * 256 + p_buf[1] + 2; /* SPC-3 7.4.3, table 240 */ return i_status; } /** Watch drive by test unit ready loop until ready, no media or timeout. @param b_verbose verbose @return 1= unit ready , 0= error , -1= severe failure, 2 = no media */ static int wait_for_drive(CdIo_t *p_cdio, unsigned int i_max_tries, bool b_verbose) { int i_ret, i, i_sense_avail; cdio_mmc_request_sense_t sense_reply; memset(&sense_reply, 0, sizeof(sense_reply)); for (i = 0; i < i_max_tries; i++) { i_ret = test_unit_ready(p_cdio, &i_sense_avail, &sense_reply, b_verbose); if (i_ret == 0) /* Unit is ready */ return 1; if (i_sense_avail < 18) return -1; if (2 == sense_reply.sense_key && 0x04 == sense_reply.asc) { /* Not ready */; } else if (6 == sense_reply.sense_key && 0x28 == sense_reply.asc && 0 == sense_reply.ascq) { /* Media change notice = try again */; } else if (2 == sense_reply.sense_key && 0x3a == sense_reply.asc) { /* Medium not present */; return 2; } else if (0 == sense_reply.sense_key && 0 == sense_reply.asc) { /* Error with no sense */; return -1; break; } else { /* Other error */; return 0; } sleep(1); } fprintf(stderr, "wait_for_drive: Drive not ready after %d retries\n", i_max_tries); return -1; } /** This function bundles tests for the read capability to perform MMC commands and detecting the sense reply of MMC commands, which indicates error causes or important drive events. @param drive_path a drive address suitable for cdio_open_am() @param flag bit0= verbose @return 0= no severe failure else an proposal for an exit() value is returned */ static int test_read(char *psz_drive_path, unsigned int i_flag) { int sense_avail = 0, i_ret, i_sense_valid, i_size, alloc_len = 10; bool b_verbose = !!(i_flag & 1); int old_log_level = cdio_loglevel_default; cdio_mmc_request_sense_t sense_reply; unsigned char buf[10]; CdIo_t *p_cdio; const char *scsi_tuple; p_cdio = cdio_open(psz_drive_path, DRIVER_DEVICE); if (!p_cdio) i_ret = SKIP_TEST - 16; /* The further code produces some intentional failures which should not be reported by mmc_run_cmd() as INFO messages. */ cdio_loglevel_default = CDIO_LOG_WARN; /* Test availability of info for cdrecord style adresses . */ scsi_tuple = cdio_get_arg(p_cdio, "scsi-tuple"); if (scsi_tuple == NULL) { fprintf(stderr, "Error: cdio_get_arg(\"scsi-tuple\") returns NULL.\n"); i_ret = 6; goto ex; } else if (i_flag & 1) printf("Drive '%s' has cdio_get_arg(\"scsi-tuple\") = '%s'\n", psz_drive_path, scsi_tuple); /* Test availability of sense reply in case of unready drive. E.g. if the tray is already ejected. */ i_ret = test_unit_ready(p_cdio, &sense_avail, &sense_reply, b_verbose); if (i_ret != 0 && sense_avail < 18) { fprintf(stderr, "Error: Drive not ready. Only %d sense bytes. Expected >= 18.\n", sense_avail); i_ret = 2; goto ex; } /* Cause sense reply failure by requesting inappropriate mode page 3Eh */ i_ret = mode_sense(p_cdio, &sense_avail, &sense_reply, 0x3e, 0, alloc_len, buf, &i_size, b_verbose); if (i_ret != 0 && sense_avail < 18) { fprintf(stderr, "Error: Deliberately illegal command yields only %d sense bytes. Expected >= 18.\n", sense_avail); i_ret = 3; goto ex; } else { if (sense_reply.sense_key != 5) { fprintf(stderr, "Error: Sense key should be 5, got %d\n", sense_reply.sense_key); i_ret = 3; goto ex; } else if (sense_reply.asc != 0x24) { fprintf(stderr, "Error: Sense code should be 24, got %d\n", sense_reply.asc); i_ret = 4; goto ex; } else if (sense_reply.ascq != 0) { fprintf(stderr, "Error: Sense code should be 24, got %d\n", sense_reply.ascq); i_ret = 4; goto ex; } } /* How are we, finally ? */ i_ret = test_unit_ready(p_cdio, &i_sense_valid, &sense_reply, b_verbose); if ((i_flag & 1) && 0 != i_ret && 2 == sense_reply.sense_key && 0x3a == sense_reply.asc) fprintf(stderr, "test_unit_ready: Note: No loaded media detected.\n"); i_ret = 0; ex:; cdio_loglevel_default = old_log_level; cdio_destroy(p_cdio); return i_ret; } /* --------------------------- main ----------------------------- */ int main(int argc, const char *argv[]) { CdIo_t *p_cdio; char **ppsz_drives = NULL; const char *psz_source = NULL; int i_ret; int exitrc = 0; bool b_verbose = (argc > 1); driver_return_code_t i_status; cdio_loglevel_default = b_verbose ? CDIO_LOG_DEBUG : CDIO_LOG_INFO; ppsz_drives = cdio_get_devices(DRIVER_DEVICE); if (!ppsz_drives) { printf("Can't find a CD-ROM drive. Skipping test.\n"); exit(SKIP_TEST); } p_cdio = cdio_open(ppsz_drives[0], DRIVER_DEVICE); if (p_cdio) { const char *psz_have_mmc = cdio_get_arg(p_cdio, "mmc-supported?"); psz_source = cdio_get_arg(p_cdio, "source"); if (0 != strncmp(psz_source, ppsz_drives[0], strlen(ppsz_drives[0]))) { fprintf(stderr, "Got %s; should get back %s, the name we opened.\n", psz_source, ppsz_drives[0]); exit(1); } i_ret = wait_for_drive(p_cdio, 30, b_verbose); if (0 >= i_ret) { fprintf(stderr, "Wait for drive error\n"); exit(2); } else { if (1 == i_ret) { i_status = get_disc_erasable(p_cdio, psz_source, b_verbose); if (DRIVER_OP_SUCCESS != i_status) { printf("Got status %d back from get_disc_erasable(%s)\n", i_status, psz_source); } i_status = get_disctype(p_cdio, b_verbose); if ( psz_have_mmc && 0 == strncmp("true", psz_have_mmc, sizeof("true")) ) { /* Test the MMC enhancements of version 0.83 in december 2009 */ i_ret = test_read(ppsz_drives[0], cdio_loglevel_default == CDIO_LOG_DEBUG); if (0 != i_ret) exit(i_ret + 16); } } else if (2 == i_ret && b_verbose) printf("Drive is empty... skipping remaining tests.\n"); } cdio_destroy(p_cdio); } else { fprintf(stderr, "cdio_open('%s') failed\n", ppsz_drives[0]); exit(2); } cdio_free_device_list(ppsz_drives); return exitrc; } libcdio-0.83/test/driver/nrg.c.in0000644000175000017500000000511011650130347013600 00000000000000/* -*- C -*- Copyright (C) 2008, 2010, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Regression test for Nero image driver: lib/driver/image/nrg.c. */ #include #include #include #if defined(HAVE_CONFIG_H) && !defined(__CDIO_CONFIG_H__) # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #include "helper.h" #ifndef DATA_DIR #define DATA_DIR "@abs_top_srcdir@/test/data" #endif #define NUM_FIELDS 2 int main(int argc, const char *argv[]) { char psz_nrgfile[500]; CdIo_t *p_cdio; const char *cdtext_check[NUM_FIELDS] = { "Richard Stallman", "Join us now we have the software" }; const int cdtext_fields[NUM_FIELDS] = {CDTEXT_PERFORMER, CDTEXT_TITLE}; cdio_loglevel_default = (argc > 1) ? CDIO_LOG_DEBUG : CDIO_LOG_INFO; /* snprintf(psz_nrgfile, sizeof(psz_nrgfile)-1, "%s/%s", DATA_DIR, cue_file[i]); */ if (!cdio_have_driver(DRIVER_NRG)) return(77); snprintf(psz_nrgfile, sizeof(psz_nrgfile)-1, "%s/%s", DATA_DIR, "p1.nrg"); p_cdio = cdio_open_nrg(psz_nrgfile); if (!p_cdio) { printf("Can't open Nero image file: %s.\n", psz_nrgfile); return(1); } { unsigned int i; cdtext_t *p_cdtext = cdio_get_cdtext(p_cdio, 0); if (!p_cdtext) return(1); for (i=0; ifield[cdtext_fields[i]]; if (!psz_field) return(2); if (0 != strncmp(psz_field, cdtext_check[i], strlen(cdtext_check[i]))) { printf("CD-Text compare mismatch.\n"); printf("expected:\n\t'%s'\ngot:\n\t'%s'\n", cdtext_check[i], psz_field); return(3); } } } check_mmc_supported(p_cdio, 1); check_access_mode(p_cdio, "image"); check_get_arg_source(p_cdio, psz_nrgfile); cdio_destroy(p_cdio); return 0; } libcdio-0.83/test/driver/bincue.c.in0000644000175000017500000000721411650127575014277 00000000000000/* -*- C -*- Copyright (C) 2004, 2006, 2008, 2010, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Regression test for BIN/CUE device driver: lib/driver/image/bincue.c. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #include "helper.h" #ifndef DATA_DIR #define DATA_DIR "@abs_top_srcdir@/test/data" #endif #define NUM_GOOD_CUES 2 #define NUM_BAD_CUES 7 int main(int argc, const char *argv[]) { const char *cue_file[NUM_GOOD_CUES] = { "cdda.cue", "isofs-m1.cue", }; const char *badcue_file[NUM_BAD_CUES] = { "bad-cat1.cue", "bad-cat2.cue", "bad-cat3.cue", "bad-mode1.cue", "bad-msf-1.cue", "bad-msf-2.cue", "bad-msf-3.cue", }; int ret=0; unsigned int i; char psz_cuefile[500]; unsigned int verbose = (argc > 1); psz_cuefile[sizeof(psz_cuefile)-1] = '\0'; cdio_loglevel_default = (argc > 1) ? CDIO_LOG_DEBUG : CDIO_LOG_WARN; for (i=0; i This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Regression test for BIN/CUE device driver: lib/driver/image/bincue.c. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #include "helper.h" #ifndef DATA_DIR #define DATA_DIR "/src/external-vcs/libcdio/test/data" #endif #define NUM_GOOD_CUES 2 #define NUM_BAD_CUES 7 int main(int argc, const char *argv[]) { const char *cue_file[NUM_GOOD_CUES] = { "cdda.cue", "isofs-m1.cue", }; const char *badcue_file[NUM_BAD_CUES] = { "bad-cat1.cue", "bad-cat2.cue", "bad-cat3.cue", "bad-mode1.cue", "bad-msf-1.cue", "bad-msf-2.cue", "bad-msf-3.cue", }; int ret=0; unsigned int i; char psz_cuefile[500]; unsigned int verbose = (argc > 1); psz_cuefile[sizeof(psz_cuefile)-1] = '\0'; cdio_loglevel_default = (argc > 1) ? CDIO_LOG_DEBUG : CDIO_LOG_WARN; for (i=0; i This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Unit test for lib/driver/MSWindows/win32.c */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #include int main(int argc, const char *argv[]) { CdIo_t *p_cdio; char **ppsz_drives=NULL; cdio_loglevel_default = (argc > 1) ? CDIO_LOG_DEBUG : CDIO_LOG_INFO; /* snprintf(psz_nrgfile, sizeof(psz_nrgfile)-1, "%s/%s", TEST_DIR, cue_file[i]); */ if (!cdio_have_driver(DRIVER_WIN32)) return(77); ppsz_drives = cdio_get_devices(DRIVER_DEVICE); if (!ppsz_drives) { printf("Can't find a CD-ROM drive. Skipping test.\n"); exit(77); } p_cdio = cdio_open_win32(ppsz_drives[0]); if (p_cdio) { const char *psz_source = cdio_get_arg(p_cdio, "source"); const char *psz_scsi_tuple; const char *psz_access_mode = cdio_get_arg(p_cdio, "access-mode"); if (0 != strncmp(psz_source, ppsz_drives[0], strlen(ppsz_drives[0]))) { fprintf(stderr, "Got %s; should get back %s, the name we opened.\n", psz_source, ppsz_drives[0]); cdio_destroy(p_cdio); exit(1); } if (0 == strncmp(psz_access_mode, "ioctl", strlen("ioctl"))) { psz_scsi_tuple = cdio_get_arg(p_cdio, "scsi-tuple"); if (psz_scsi_tuple == NULL) { fprintf(stderr, "cdio_get_arg(\"scsi-tuple\") returns NULL.\n"); cdio_destroy(p_cdio); exit(3); } if (cdio_loglevel_default == CDIO_LOG_DEBUG) printf("Drive '%s' has cdio_get_arg(\"scsi-tuple\") = '%s'\n", psz_source, psz_scsi_tuple); } } cdio_destroy(p_cdio); p_cdio = cdio_open_am_win32(ppsz_drives[0], "ASPI"); if (p_cdio) { const char *psz_access_mode = cdio_get_arg(p_cdio, "access-mode"); if (0 != strncmp(psz_access_mode, "ASPI", strlen("ASPI"))) { fprintf(stderr, "Got %s; Should get back %s, the access mode requested.\n", psz_access_mode, "ASPI"); exit(2); } } p_cdio = cdio_open_am_win32(ppsz_drives[0], "ioctl"); if (p_cdio) { const char *psz_access_mode = cdio_get_arg(p_cdio, "access-mode"); const char *psz_response = cdio_get_arg(p_cdio, "mmc-supported?"); if (0 != strncmp(psz_access_mode, "ioctl", strlen("ioctl"))) { fprintf(stderr, "Got %s; Should get back %s, the access mode requested.\n", psz_access_mode, "ioctl"); exit(3); } if ( psz_response == NULL || ((0 != strncmp("true", psz_response, sizeof("true")))) ) { fprintf(stderr, "cdio_get_arg(\"mmc-supported?\") should return \"true\"; got: %s.\n", psz_response); exit(4); } } cdio_destroy(p_cdio); cdio_free_device_list(ppsz_drives); return 0; } libcdio-0.83/test/driver/solaris.c0000644000175000017500000000442211650127726014075 00000000000000/* -*- C -*- Copyright (C) 2009, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Unit test for lib/driver/solaris.c */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #include int main(int argc, const char *argv[]) { CdIo_t *p_cdio; char **ppsz_drives=NULL; cdio_loglevel_default = (argc > 1) ? CDIO_LOG_DEBUG : CDIO_LOG_INFO; /* snprintf(psz_nrgfile, sizeof(psz_nrgfile)-1, "%s/%s", TEST_DIR, cue_file[i]); */ if (!cdio_have_driver(DRIVER_SOLARIS)) return(77); ppsz_drives = cdio_get_devices(DRIVER_DEVICE); if (!ppsz_drives) { printf("Can't find a CD-ROM drive. Skipping test.\n"); exit(77); } p_cdio = cdio_open_linux(ppsz_drives[0]); if (p_cdio) { const char *psz_source = cdio_get_arg(p_cdio, "source"); if (0 != strncmp(psz_source, ppsz_drives[0], strlen(ppsz_drives[0]))) { fprintf(stderr, "Got %s; should get back %s, the name we opened.\n", psz_source, ppsz_drives[0]); exit(1); } } cdio_destroy(p_cdio); p_cdio = cdio_open_am_linux(ppsz_drives[0], "SCSI"); if (p_cdio) { const char *psz_access_mode = cdio_get_arg(p_cdio, "access-mode"); if (0 != strncmp(psz_access_mode, "SCSI", strlen("SCSI"))) { fprintf(stderr, "Got %s; Should get back %s, the access mode requested.\n", psz_access_mode, "SCSI"); exit(2); } } cdio_destroy(p_cdio); cdio_free_device_list(ppsz_drives); return 0; } libcdio-0.83/test/driver/helper.c0000644000175000017500000000474511650127507013705 00000000000000/* -*- C -*- Copyright (C) 2010, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #include #include "helper.h" void check_access_mode(CdIo_t *p_cdio, const char *psz_expected_access_mode) { const char *psz_access_mode = cdio_get_arg(p_cdio, "access-mode"); if ( psz_access_mode == NULL || (0 != strcmp(psz_expected_access_mode, psz_access_mode)) ) { fprintf(stderr, "cdio_get_arg(\"access-mode?\") should return \"%s\"; got: \"%s\".\n", psz_expected_access_mode, psz_access_mode); exit(10); } } void check_get_arg_source(CdIo_t *p_cdio, const char *psz_expected_source) { const char *psz_source = cdio_get_arg(p_cdio, "source"); if ( psz_source == NULL || (0 != strcmp(psz_expected_source, psz_source)) ) { fprintf(stderr, "cdio_get_arg(\"source\") should return \"%s\"; got: \"%s\".\n", psz_expected_source, psz_source); exit(40); } } /* i_expected: 1 => expect false 2 => expect true 3 => expect true or false */ void check_mmc_supported(CdIo_t *p_cdio, int i_expected) { const char *psz_response = cdio_get_arg(p_cdio, "mmc-supported?"); if ( psz_response == NULL ) { fprintf(stderr, "cdio_get_arg(\"mmc-supported?\") returned NULL\n"); exit(30); } else if ( (0 == (i_expected & 1)) && (0 == strncmp("false", psz_response, sizeof("false"))) ) { fprintf(stderr, "cdio_get_arg(\"mmc-supported?\") should not return \"false\""); exit(31); } else if ( (0 == (i_expected & 2)) && (0 == strncmp("true", psz_response, sizeof("true"))) ) { fprintf(stderr, "cdio_get_arg(\"mmc-supported?\") should not return \"true\""); exit(32); } } libcdio-0.83/test/driver/cdrdao.c0000644000175000017500000000655611652140274013662 00000000000000/* Copyright (C) 2004, 2008, 2010, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Regression test for cdio_tocfile. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #include "helper.h" #ifndef DATA_DIR #define DATA_DIR "/src/external-vcs/libcdio/test/data" #endif #define NUM_GOOD_TOCS 16 #define NUM_BAD_TOCS 8 int main(int argc, const char *argv[]) { const char *toc_file[NUM_GOOD_TOCS] = { "cdtext.toc", "t1.toc", "t2.toc", "t3.toc", "t4.toc", "t5.toc", "t6.toc", "t7.toc", "t8.toc", "t9.toc", "data1.toc", "data2.toc", "data5.toc", "data6.toc", "data7.toc", "vcd2.toc", }; const char *badtoc_file[NUM_BAD_TOCS] = { "bad-msf-1.toc", "bad-msf-2.toc", "bad-msf-3.toc", "bad-cat1.toc", "bad-cat2.toc", "bad-cat3.toc", "bad-file.toc", "bad-mode1.toc" }; int ret=0; unsigned int i; char psz_tocfile[500]; unsigned int verbose = (argc > 1); #ifdef HAVE_CHDIR if (0 == chdir(DATA_DIR)) #endif { psz_tocfile[sizeof(psz_tocfile)-1] = '\0'; cdio_loglevel_default = verbose ? CDIO_LOG_DEBUG : CDIO_LOG_WARN; for (i=0; i This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Regression test for cdio_tocfile. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #include "helper.h" #ifndef DATA_DIR #define DATA_DIR "@abs_top_srcdir@/test/data" #endif #define NUM_GOOD_TOCS 16 #define NUM_BAD_TOCS 8 int main(int argc, const char *argv[]) { const char *toc_file[NUM_GOOD_TOCS] = { "cdtext.toc", "t1.toc", "t2.toc", "t3.toc", "t4.toc", "t5.toc", "t6.toc", "t7.toc", "t8.toc", "t9.toc", "data1.toc", "data2.toc", "data5.toc", "data6.toc", "data7.toc", "vcd2.toc", }; const char *badtoc_file[NUM_BAD_TOCS] = { "bad-msf-1.toc", "bad-msf-2.toc", "bad-msf-3.toc", "bad-cat1.toc", "bad-cat2.toc", "bad-cat3.toc", "bad-file.toc", "bad-mode1.toc" }; int ret=0; unsigned int i; char psz_tocfile[500]; unsigned int verbose = (argc > 1); #ifdef HAVE_CHDIR if (0 == chdir(DATA_DIR)) #endif { psz_tocfile[sizeof(psz_tocfile)-1] = '\0'; cdio_loglevel_default = verbose ? CDIO_LOG_DEBUG : CDIO_LOG_WARN; for (i=0; i This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Unit test for lib/driver/gnu_linux.c */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #include "helper.h" int main(int argc, const char *argv[]) { CdIo_t *p_cdio; char **ppsz_drives=NULL; cdio_loglevel_default = (argc > 1) ? CDIO_LOG_DEBUG : CDIO_LOG_INFO; /* snprintf(psz_nrgfile, sizeof(psz_nrgfile)-1, "%s/%s", TEST_DIR, cue_file[i]); */ if (!cdio_have_driver(DRIVER_LINUX)) return(77); ppsz_drives = cdio_get_devices(DRIVER_DEVICE); if (!ppsz_drives) { printf("Can't find a CD-ROM drive. Skipping test.\n"); exit(77); } p_cdio = cdio_open_linux(ppsz_drives[0]); if (p_cdio) { const char *psz_source = NULL, *psz_scsi_tuple; check_get_arg_source(p_cdio, ppsz_drives[0]); check_mmc_supported(p_cdio, 3); psz_scsi_tuple = cdio_get_arg(p_cdio, "scsi-tuple"); if (psz_scsi_tuple == NULL) { fprintf(stderr, "cdio_get_arg(\"scsi-tuple\") returns NULL.\n"); cdio_destroy(p_cdio); exit(3); } if (cdio_loglevel_default == CDIO_LOG_DEBUG) printf("Drive '%s' has cdio_get_arg(\"scsi-tuple\") = '%s'\n", psz_source, psz_scsi_tuple); cdio_destroy(p_cdio); } p_cdio = cdio_open_am_linux(ppsz_drives[0], "MMC_RDWR"); if (p_cdio) { check_access_mode(p_cdio, "MMC_RDWR"); } cdio_destroy(p_cdio); cdio_free_device_list(ppsz_drives); return 0; } libcdio-0.83/test/driver/realpath.c0000644000175000017500000001102711650127715014216 00000000000000/* -*- C -*- Copyright (C) 2010, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Unit test for lib/driver/gnu_linux.c */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #ifdef HAVE_STDIO_H # include #endif #ifdef HAVE_STRING_H # include #endif #ifdef HAVE_LIMITS_H # include #endif #ifdef HAVE_STDLIB_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_UNISTD_H # include #endif #ifdef HAVE_ERRNO_H # include #endif #include #define MY_DIR_SEPARATOR '/' static char * get_temporary_name(const char *dirname, const char *errmsg) { char *new_filename = tempnam(NULL, "syml"); if (NULL == new_filename) { printf("Could not generate %s name\n", errmsg); } return new_filename; } static int check_rc(int rc, const char *psz_operation, const char *psz_filename) { if (-1 == rc) { printf("%s %s failed with error: %s\n", psz_operation, psz_filename, strerror(errno)); } else if (0 != rc) { printf("%s %s gives weird return %d\n", psz_operation, psz_filename, rc); } return rc; } int main(int argc, const char *argv[]) { char *psz_tmp_subdir; char *psz_orig_file; char tmp_dir[PATH_MAX+1] = {0}; char tmp_subdir[PATH_MAX+1] = {0}; char psz_file_check[PATH_MAX+1]; char *psz_last_slash; unsigned int i_last_slash; char *psz_symlink_file = NULL; psz_tmp_subdir = get_temporary_name(NULL, "temporary directory"); if (NULL == psz_tmp_subdir) { exit(77); } if (NULL == psz_tmp_subdir) { printf("extract parent directory from temporary directory name\n"); exit(77); } if (-1 == check_rc(mkdir(psz_tmp_subdir, 0755), "mkdir", psz_tmp_subdir)) exit(77); cdio_realpath(psz_tmp_subdir, tmp_subdir); if (0 == strlen(tmp_subdir)) { fprintf(stderr, "cdio_realpath on temp directory %s failed\n", psz_tmp_subdir); exit(1); } psz_last_slash = strrchr(tmp_subdir, MY_DIR_SEPARATOR); i_last_slash = psz_last_slash - tmp_subdir + 1; memcpy(tmp_dir, tmp_subdir, i_last_slash); tmp_dir[i_last_slash] = '\0'; printf("Temp directory is %s\n", tmp_dir); psz_orig_file = get_temporary_name(NULL, "file"); if (NULL != psz_orig_file) { FILE *fp = fopen(psz_orig_file, "w"); char orig_file[PATH_MAX+1] = {0}; int rc; char symlink_file[PATH_MAX+1] = {0}; fprintf(fp, "testing\n"); fclose(fp); cdio_realpath(psz_orig_file, orig_file); if (0 == strlen(orig_file)) { fprintf(stderr, "cdio_realpath on temp file %s failed\n", psz_orig_file); exit(2); } psz_symlink_file = get_temporary_name(NULL, "symlink file"); rc = check_rc(symlink(psz_orig_file, psz_symlink_file), "symlink", psz_symlink_file); if (0 == rc) { /* Just when you thought we'd forgotten, here is our first test! */ cdio_realpath(psz_symlink_file, psz_file_check); if (0 != strncmp(psz_file_check, orig_file, PATH_MAX)) { fprintf(stderr, "simple cdio_realpath failed: %s vs %s\n", psz_file_check, orig_file); exit(3); } check_rc(unlink(psz_symlink_file), "unlink", psz_symlink_file); } /* Make sure we handle a cyclic symbolic name, e.g. xx -> xx */ cdio_realpath(psz_symlink_file, symlink_file); rc = check_rc(symlink(psz_symlink_file, psz_symlink_file), "symlink", psz_symlink_file); if (0 == rc) { cdio_realpath(psz_symlink_file, psz_file_check); if (0 != strncmp(psz_file_check, symlink_file, PATH_MAX)) { fprintf(stderr, "direct cdio_realpath cycle test failed. %s vs %s\n", psz_file_check, symlink_file); exit(4); } check_rc(unlink(psz_symlink_file), "unlink", psz_symlink_file); } } check_rc(unlink(psz_orig_file), "unlink", psz_orig_file); check_rc(rmdir(psz_tmp_subdir), "rmdir", psz_tmp_subdir); return 0; } libcdio-0.83/test/driver/Makefile.in0000644000175000017500000014546111652210030014312 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 2009, 2010 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ check_PROGRAMS = bincue$(EXEEXT) cdrdao$(EXEEXT) freebsd$(EXEEXT) \ gnu_linux$(EXEEXT) mmc_read$(EXEEXT) mmc_write$(EXEEXT) \ nrg$(EXEEXT) osx$(EXEEXT) realpath$(EXEEXT) solaris$(EXEEXT) \ win32$(EXEEXT) subdir = test/driver DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/bincue.c.in $(srcdir)/cdrdao.c.in $(srcdir)/nrg.c.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = bincue.c cdrdao.c nrg.c CONFIG_CLEAN_VPATH_FILES = am_bincue_OBJECTS = bincue-helper.$(OBJEXT) bincue-bincue.$(OBJEXT) bincue_OBJECTS = $(am_bincue_OBJECTS) am__DEPENDENCIES_1 = bincue_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) bincue_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(bincue_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_cdrdao_OBJECTS = cdrdao-helper.$(OBJEXT) cdrdao-cdrdao.$(OBJEXT) cdrdao_OBJECTS = $(am_cdrdao_OBJECTS) cdrdao_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) cdrdao_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(cdrdao_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ freebsd_SOURCES = freebsd.c freebsd_OBJECTS = freebsd-freebsd.$(OBJEXT) freebsd_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) freebsd_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(freebsd_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_gnu_linux_OBJECTS = gnu_linux-helper.$(OBJEXT) \ gnu_linux-gnu_linux.$(OBJEXT) gnu_linux_OBJECTS = $(am_gnu_linux_OBJECTS) gnu_linux_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) gnu_linux_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(gnu_linux_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ mmc_read_SOURCES = mmc_read.c mmc_read_OBJECTS = mmc_read-mmc_read.$(OBJEXT) mmc_read_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) mmc_read_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(mmc_read_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ mmc_write_SOURCES = mmc_write.c mmc_write_OBJECTS = mmc_write-mmc_write.$(OBJEXT) mmc_write_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) mmc_write_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(mmc_write_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_nrg_OBJECTS = nrg-helper.$(OBJEXT) nrg-nrg.$(OBJEXT) nrg_OBJECTS = $(am_nrg_OBJECTS) nrg_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) nrg_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(nrg_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ osx_SOURCES = osx.c osx_OBJECTS = osx-osx.$(OBJEXT) osx_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) osx_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(osx_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ realpath_SOURCES = realpath.c realpath_OBJECTS = realpath-realpath.$(OBJEXT) realpath_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) realpath_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(realpath_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ solaris_SOURCES = solaris.c solaris_OBJECTS = solaris-solaris.$(OBJEXT) solaris_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) solaris_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(solaris_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ win32_SOURCES = win32.c win32_OBJECTS = win32-win32.$(OBJEXT) win32_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) win32_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(win32_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(bincue_SOURCES) $(cdrdao_SOURCES) freebsd.c \ $(gnu_linux_SOURCES) mmc_read.c mmc_write.c $(nrg_SOURCES) \ osx.c realpath.c solaris.c win32.c DIST_SOURCES = $(bincue_SOURCES) $(cdrdao_SOURCES) freebsd.c \ $(gnu_linux_SOURCES) mmc_read.c mmc_write.c $(nrg_SOURCES) \ osx.c realpath.c solaris.c win32.c ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDDA_PLAYER_LIBS = @CDDA_PLAYER_LIBS@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CDPARANOIA_NAME = @CDPARANOIA_NAME@ CFLAGS = @CFLAGS@ CMP = @CMP@ COS_LIB = @COS_LIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_PKG_LIB_HACK = @DARWIN_PKG_LIB_HACK@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ DIFF_OPTS = @DIFF_OPTS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GIT2CL = @GIT2CL@ GREP = @GREP@ HAVE_BSDI_CDROM = @HAVE_BSDI_CDROM@ HAVE_DARWIN_CDROM = @HAVE_DARWIN_CDROM@ HAVE_FREEBSD_CDROM = @HAVE_FREEBSD_CDROM@ HAVE_JOLIET = @HAVE_JOLIET@ HAVE_LINUX_CDROM = @HAVE_LINUX_CDROM@ HAVE_OS2_CDROM = @HAVE_OS2_CDROM@ HAVE_ROCK = @HAVE_ROCK@ HAVE_SOLARIS_CDROM = @HAVE_SOLARIS_CDROM@ HAVE_WIN32_CDROM = @HAVE_WIN32_CDROM@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDIOPP_LIBS = @LIBCDIOPP_LIBS@ LIBCDIO_CDDA_LIBS = @LIBCDIO_CDDA_LIBS@ LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ LIBCDIO_DEPS = @LIBCDIO_DEPS@ LIBCDIO_LIBS = @LIBCDIO_LIBS@ LIBCDIO_PARANOIA_LIBS = @LIBCDIO_PARANOIA_LIBS@ LIBCDIO_SOURCE_PATH = @LIBCDIO_SOURCE_PATH@ LIBCDIO_VERSION_NUM = @LIBCDIO_VERSION_NUM@ LIBICONV = @LIBICONV@ LIBISO9660PP_LIBS = @LIBISO9660PP_LIBS@ LIBISO9660_CFLAGS = @LIBISO9660_CFLAGS@ LIBISO9660_LIBS = @LIBISO9660_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBUDF_LIBS = @LIBUDF_LIBS@ LINUX_CDROM_TIMEOUT = @LINUX_CDROM_TIMEOUT@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_NO_UNDEFINED = @LT_NO_UNDEFINED@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OLD_CDPARANOIA = @OLD_CDPARANOIA@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SBPCD_H = @SBPCD_H@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TYPESIZES = @TYPESIZES@ UCDROM_H = @UCDROM_H@ VCDINFO_CFLAGS = @VCDINFO_CFLAGS@ VCDINFO_LIBS = @VCDINFO_LIBS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = -I$(top_srcdir) $(LIBCDIO_CFLAGS) $(LIBISO9660_CFLAGS) DATA_DIR = $(abs_top_srcdir)/test/data bincue_SOURCES = helper.c bincue.c bincue_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) bincue_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\" cdrdao_SOURCES = helper.c cdrdao.c cdrdao_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) cdrdao_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\" freebsd_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) freebsd_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\" realpath_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) realpath_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\" gnu_linux_SOURCES = helper.c gnu_linux.c gnu_linux_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) gnu_linux_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\" mmc_read_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) mmc_read_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\" mmc_write_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) mmc_write_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\" nrg_SOURCES = helper.c nrg.c nrg_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) nrg_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\" osx_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) osx_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\" solaris_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) solaris_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\" win32_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) win32_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\" TESTS = $(check_PROGRAMS) EXTRA_DIST = \ bincue.c.in \ helper.c \ helper.h \ cdrdao.c.in \ nrg.c.in MOSTLYCLEANFILES = \ $(check_PROGRAMS) \ core core.* *.dump cdda-orig.wav cdda-try.wav *.raw all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/driver/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu test/driver/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): bincue.c: $(top_builddir)/config.status $(srcdir)/bincue.c.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ cdrdao.c: $(top_builddir)/config.status $(srcdir)/cdrdao.c.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ nrg.c: $(top_builddir)/config.status $(srcdir)/nrg.c.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list bincue$(EXEEXT): $(bincue_OBJECTS) $(bincue_DEPENDENCIES) @rm -f bincue$(EXEEXT) $(bincue_LINK) $(bincue_OBJECTS) $(bincue_LDADD) $(LIBS) cdrdao$(EXEEXT): $(cdrdao_OBJECTS) $(cdrdao_DEPENDENCIES) @rm -f cdrdao$(EXEEXT) $(cdrdao_LINK) $(cdrdao_OBJECTS) $(cdrdao_LDADD) $(LIBS) freebsd$(EXEEXT): $(freebsd_OBJECTS) $(freebsd_DEPENDENCIES) @rm -f freebsd$(EXEEXT) $(freebsd_LINK) $(freebsd_OBJECTS) $(freebsd_LDADD) $(LIBS) gnu_linux$(EXEEXT): $(gnu_linux_OBJECTS) $(gnu_linux_DEPENDENCIES) @rm -f gnu_linux$(EXEEXT) $(gnu_linux_LINK) $(gnu_linux_OBJECTS) $(gnu_linux_LDADD) $(LIBS) mmc_read$(EXEEXT): $(mmc_read_OBJECTS) $(mmc_read_DEPENDENCIES) @rm -f mmc_read$(EXEEXT) $(mmc_read_LINK) $(mmc_read_OBJECTS) $(mmc_read_LDADD) $(LIBS) mmc_write$(EXEEXT): $(mmc_write_OBJECTS) $(mmc_write_DEPENDENCIES) @rm -f mmc_write$(EXEEXT) $(mmc_write_LINK) $(mmc_write_OBJECTS) $(mmc_write_LDADD) $(LIBS) nrg$(EXEEXT): $(nrg_OBJECTS) $(nrg_DEPENDENCIES) @rm -f nrg$(EXEEXT) $(nrg_LINK) $(nrg_OBJECTS) $(nrg_LDADD) $(LIBS) osx$(EXEEXT): $(osx_OBJECTS) $(osx_DEPENDENCIES) @rm -f osx$(EXEEXT) $(osx_LINK) $(osx_OBJECTS) $(osx_LDADD) $(LIBS) realpath$(EXEEXT): $(realpath_OBJECTS) $(realpath_DEPENDENCIES) @rm -f realpath$(EXEEXT) $(realpath_LINK) $(realpath_OBJECTS) $(realpath_LDADD) $(LIBS) solaris$(EXEEXT): $(solaris_OBJECTS) $(solaris_DEPENDENCIES) @rm -f solaris$(EXEEXT) $(solaris_LINK) $(solaris_OBJECTS) $(solaris_LDADD) $(LIBS) win32$(EXEEXT): $(win32_OBJECTS) $(win32_DEPENDENCIES) @rm -f win32$(EXEEXT) $(win32_LINK) $(win32_OBJECTS) $(win32_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bincue-bincue.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bincue-helper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdrdao-cdrdao.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdrdao-helper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/freebsd-freebsd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnu_linux-gnu_linux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnu_linux-helper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmc_read-mmc_read.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmc_write-mmc_write.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrg-helper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrg-nrg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osx-osx.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realpath-realpath.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/solaris-solaris.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win32-win32.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< bincue-helper.o: helper.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bincue_CFLAGS) $(CFLAGS) -MT bincue-helper.o -MD -MP -MF $(DEPDIR)/bincue-helper.Tpo -c -o bincue-helper.o `test -f 'helper.c' || echo '$(srcdir)/'`helper.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/bincue-helper.Tpo $(DEPDIR)/bincue-helper.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='helper.c' object='bincue-helper.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bincue_CFLAGS) $(CFLAGS) -c -o bincue-helper.o `test -f 'helper.c' || echo '$(srcdir)/'`helper.c bincue-helper.obj: helper.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bincue_CFLAGS) $(CFLAGS) -MT bincue-helper.obj -MD -MP -MF $(DEPDIR)/bincue-helper.Tpo -c -o bincue-helper.obj `if test -f 'helper.c'; then $(CYGPATH_W) 'helper.c'; else $(CYGPATH_W) '$(srcdir)/helper.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/bincue-helper.Tpo $(DEPDIR)/bincue-helper.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='helper.c' object='bincue-helper.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bincue_CFLAGS) $(CFLAGS) -c -o bincue-helper.obj `if test -f 'helper.c'; then $(CYGPATH_W) 'helper.c'; else $(CYGPATH_W) '$(srcdir)/helper.c'; fi` bincue-bincue.o: bincue.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bincue_CFLAGS) $(CFLAGS) -MT bincue-bincue.o -MD -MP -MF $(DEPDIR)/bincue-bincue.Tpo -c -o bincue-bincue.o `test -f 'bincue.c' || echo '$(srcdir)/'`bincue.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/bincue-bincue.Tpo $(DEPDIR)/bincue-bincue.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bincue.c' object='bincue-bincue.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bincue_CFLAGS) $(CFLAGS) -c -o bincue-bincue.o `test -f 'bincue.c' || echo '$(srcdir)/'`bincue.c bincue-bincue.obj: bincue.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bincue_CFLAGS) $(CFLAGS) -MT bincue-bincue.obj -MD -MP -MF $(DEPDIR)/bincue-bincue.Tpo -c -o bincue-bincue.obj `if test -f 'bincue.c'; then $(CYGPATH_W) 'bincue.c'; else $(CYGPATH_W) '$(srcdir)/bincue.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/bincue-bincue.Tpo $(DEPDIR)/bincue-bincue.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bincue.c' object='bincue-bincue.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bincue_CFLAGS) $(CFLAGS) -c -o bincue-bincue.obj `if test -f 'bincue.c'; then $(CYGPATH_W) 'bincue.c'; else $(CYGPATH_W) '$(srcdir)/bincue.c'; fi` cdrdao-helper.o: helper.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cdrdao_CFLAGS) $(CFLAGS) -MT cdrdao-helper.o -MD -MP -MF $(DEPDIR)/cdrdao-helper.Tpo -c -o cdrdao-helper.o `test -f 'helper.c' || echo '$(srcdir)/'`helper.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cdrdao-helper.Tpo $(DEPDIR)/cdrdao-helper.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='helper.c' object='cdrdao-helper.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cdrdao_CFLAGS) $(CFLAGS) -c -o cdrdao-helper.o `test -f 'helper.c' || echo '$(srcdir)/'`helper.c cdrdao-helper.obj: helper.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cdrdao_CFLAGS) $(CFLAGS) -MT cdrdao-helper.obj -MD -MP -MF $(DEPDIR)/cdrdao-helper.Tpo -c -o cdrdao-helper.obj `if test -f 'helper.c'; then $(CYGPATH_W) 'helper.c'; else $(CYGPATH_W) '$(srcdir)/helper.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cdrdao-helper.Tpo $(DEPDIR)/cdrdao-helper.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='helper.c' object='cdrdao-helper.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cdrdao_CFLAGS) $(CFLAGS) -c -o cdrdao-helper.obj `if test -f 'helper.c'; then $(CYGPATH_W) 'helper.c'; else $(CYGPATH_W) '$(srcdir)/helper.c'; fi` cdrdao-cdrdao.o: cdrdao.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cdrdao_CFLAGS) $(CFLAGS) -MT cdrdao-cdrdao.o -MD -MP -MF $(DEPDIR)/cdrdao-cdrdao.Tpo -c -o cdrdao-cdrdao.o `test -f 'cdrdao.c' || echo '$(srcdir)/'`cdrdao.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cdrdao-cdrdao.Tpo $(DEPDIR)/cdrdao-cdrdao.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cdrdao.c' object='cdrdao-cdrdao.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cdrdao_CFLAGS) $(CFLAGS) -c -o cdrdao-cdrdao.o `test -f 'cdrdao.c' || echo '$(srcdir)/'`cdrdao.c cdrdao-cdrdao.obj: cdrdao.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cdrdao_CFLAGS) $(CFLAGS) -MT cdrdao-cdrdao.obj -MD -MP -MF $(DEPDIR)/cdrdao-cdrdao.Tpo -c -o cdrdao-cdrdao.obj `if test -f 'cdrdao.c'; then $(CYGPATH_W) 'cdrdao.c'; else $(CYGPATH_W) '$(srcdir)/cdrdao.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cdrdao-cdrdao.Tpo $(DEPDIR)/cdrdao-cdrdao.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cdrdao.c' object='cdrdao-cdrdao.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cdrdao_CFLAGS) $(CFLAGS) -c -o cdrdao-cdrdao.obj `if test -f 'cdrdao.c'; then $(CYGPATH_W) 'cdrdao.c'; else $(CYGPATH_W) '$(srcdir)/cdrdao.c'; fi` freebsd-freebsd.o: freebsd.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(freebsd_CFLAGS) $(CFLAGS) -MT freebsd-freebsd.o -MD -MP -MF $(DEPDIR)/freebsd-freebsd.Tpo -c -o freebsd-freebsd.o `test -f 'freebsd.c' || echo '$(srcdir)/'`freebsd.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/freebsd-freebsd.Tpo $(DEPDIR)/freebsd-freebsd.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='freebsd.c' object='freebsd-freebsd.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(freebsd_CFLAGS) $(CFLAGS) -c -o freebsd-freebsd.o `test -f 'freebsd.c' || echo '$(srcdir)/'`freebsd.c freebsd-freebsd.obj: freebsd.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(freebsd_CFLAGS) $(CFLAGS) -MT freebsd-freebsd.obj -MD -MP -MF $(DEPDIR)/freebsd-freebsd.Tpo -c -o freebsd-freebsd.obj `if test -f 'freebsd.c'; then $(CYGPATH_W) 'freebsd.c'; else $(CYGPATH_W) '$(srcdir)/freebsd.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/freebsd-freebsd.Tpo $(DEPDIR)/freebsd-freebsd.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='freebsd.c' object='freebsd-freebsd.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(freebsd_CFLAGS) $(CFLAGS) -c -o freebsd-freebsd.obj `if test -f 'freebsd.c'; then $(CYGPATH_W) 'freebsd.c'; else $(CYGPATH_W) '$(srcdir)/freebsd.c'; fi` gnu_linux-helper.o: helper.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnu_linux_CFLAGS) $(CFLAGS) -MT gnu_linux-helper.o -MD -MP -MF $(DEPDIR)/gnu_linux-helper.Tpo -c -o gnu_linux-helper.o `test -f 'helper.c' || echo '$(srcdir)/'`helper.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnu_linux-helper.Tpo $(DEPDIR)/gnu_linux-helper.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='helper.c' object='gnu_linux-helper.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnu_linux_CFLAGS) $(CFLAGS) -c -o gnu_linux-helper.o `test -f 'helper.c' || echo '$(srcdir)/'`helper.c gnu_linux-helper.obj: helper.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnu_linux_CFLAGS) $(CFLAGS) -MT gnu_linux-helper.obj -MD -MP -MF $(DEPDIR)/gnu_linux-helper.Tpo -c -o gnu_linux-helper.obj `if test -f 'helper.c'; then $(CYGPATH_W) 'helper.c'; else $(CYGPATH_W) '$(srcdir)/helper.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnu_linux-helper.Tpo $(DEPDIR)/gnu_linux-helper.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='helper.c' object='gnu_linux-helper.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnu_linux_CFLAGS) $(CFLAGS) -c -o gnu_linux-helper.obj `if test -f 'helper.c'; then $(CYGPATH_W) 'helper.c'; else $(CYGPATH_W) '$(srcdir)/helper.c'; fi` gnu_linux-gnu_linux.o: gnu_linux.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnu_linux_CFLAGS) $(CFLAGS) -MT gnu_linux-gnu_linux.o -MD -MP -MF $(DEPDIR)/gnu_linux-gnu_linux.Tpo -c -o gnu_linux-gnu_linux.o `test -f 'gnu_linux.c' || echo '$(srcdir)/'`gnu_linux.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnu_linux-gnu_linux.Tpo $(DEPDIR)/gnu_linux-gnu_linux.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnu_linux.c' object='gnu_linux-gnu_linux.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnu_linux_CFLAGS) $(CFLAGS) -c -o gnu_linux-gnu_linux.o `test -f 'gnu_linux.c' || echo '$(srcdir)/'`gnu_linux.c gnu_linux-gnu_linux.obj: gnu_linux.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnu_linux_CFLAGS) $(CFLAGS) -MT gnu_linux-gnu_linux.obj -MD -MP -MF $(DEPDIR)/gnu_linux-gnu_linux.Tpo -c -o gnu_linux-gnu_linux.obj `if test -f 'gnu_linux.c'; then $(CYGPATH_W) 'gnu_linux.c'; else $(CYGPATH_W) '$(srcdir)/gnu_linux.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/gnu_linux-gnu_linux.Tpo $(DEPDIR)/gnu_linux-gnu_linux.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnu_linux.c' object='gnu_linux-gnu_linux.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnu_linux_CFLAGS) $(CFLAGS) -c -o gnu_linux-gnu_linux.obj `if test -f 'gnu_linux.c'; then $(CYGPATH_W) 'gnu_linux.c'; else $(CYGPATH_W) '$(srcdir)/gnu_linux.c'; fi` mmc_read-mmc_read.o: mmc_read.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mmc_read_CFLAGS) $(CFLAGS) -MT mmc_read-mmc_read.o -MD -MP -MF $(DEPDIR)/mmc_read-mmc_read.Tpo -c -o mmc_read-mmc_read.o `test -f 'mmc_read.c' || echo '$(srcdir)/'`mmc_read.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mmc_read-mmc_read.Tpo $(DEPDIR)/mmc_read-mmc_read.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mmc_read.c' object='mmc_read-mmc_read.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mmc_read_CFLAGS) $(CFLAGS) -c -o mmc_read-mmc_read.o `test -f 'mmc_read.c' || echo '$(srcdir)/'`mmc_read.c mmc_read-mmc_read.obj: mmc_read.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mmc_read_CFLAGS) $(CFLAGS) -MT mmc_read-mmc_read.obj -MD -MP -MF $(DEPDIR)/mmc_read-mmc_read.Tpo -c -o mmc_read-mmc_read.obj `if test -f 'mmc_read.c'; then $(CYGPATH_W) 'mmc_read.c'; else $(CYGPATH_W) '$(srcdir)/mmc_read.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mmc_read-mmc_read.Tpo $(DEPDIR)/mmc_read-mmc_read.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mmc_read.c' object='mmc_read-mmc_read.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mmc_read_CFLAGS) $(CFLAGS) -c -o mmc_read-mmc_read.obj `if test -f 'mmc_read.c'; then $(CYGPATH_W) 'mmc_read.c'; else $(CYGPATH_W) '$(srcdir)/mmc_read.c'; fi` mmc_write-mmc_write.o: mmc_write.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mmc_write_CFLAGS) $(CFLAGS) -MT mmc_write-mmc_write.o -MD -MP -MF $(DEPDIR)/mmc_write-mmc_write.Tpo -c -o mmc_write-mmc_write.o `test -f 'mmc_write.c' || echo '$(srcdir)/'`mmc_write.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mmc_write-mmc_write.Tpo $(DEPDIR)/mmc_write-mmc_write.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mmc_write.c' object='mmc_write-mmc_write.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mmc_write_CFLAGS) $(CFLAGS) -c -o mmc_write-mmc_write.o `test -f 'mmc_write.c' || echo '$(srcdir)/'`mmc_write.c mmc_write-mmc_write.obj: mmc_write.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mmc_write_CFLAGS) $(CFLAGS) -MT mmc_write-mmc_write.obj -MD -MP -MF $(DEPDIR)/mmc_write-mmc_write.Tpo -c -o mmc_write-mmc_write.obj `if test -f 'mmc_write.c'; then $(CYGPATH_W) 'mmc_write.c'; else $(CYGPATH_W) '$(srcdir)/mmc_write.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mmc_write-mmc_write.Tpo $(DEPDIR)/mmc_write-mmc_write.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mmc_write.c' object='mmc_write-mmc_write.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mmc_write_CFLAGS) $(CFLAGS) -c -o mmc_write-mmc_write.obj `if test -f 'mmc_write.c'; then $(CYGPATH_W) 'mmc_write.c'; else $(CYGPATH_W) '$(srcdir)/mmc_write.c'; fi` nrg-helper.o: helper.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nrg_CFLAGS) $(CFLAGS) -MT nrg-helper.o -MD -MP -MF $(DEPDIR)/nrg-helper.Tpo -c -o nrg-helper.o `test -f 'helper.c' || echo '$(srcdir)/'`helper.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nrg-helper.Tpo $(DEPDIR)/nrg-helper.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='helper.c' object='nrg-helper.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nrg_CFLAGS) $(CFLAGS) -c -o nrg-helper.o `test -f 'helper.c' || echo '$(srcdir)/'`helper.c nrg-helper.obj: helper.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nrg_CFLAGS) $(CFLAGS) -MT nrg-helper.obj -MD -MP -MF $(DEPDIR)/nrg-helper.Tpo -c -o nrg-helper.obj `if test -f 'helper.c'; then $(CYGPATH_W) 'helper.c'; else $(CYGPATH_W) '$(srcdir)/helper.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nrg-helper.Tpo $(DEPDIR)/nrg-helper.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='helper.c' object='nrg-helper.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nrg_CFLAGS) $(CFLAGS) -c -o nrg-helper.obj `if test -f 'helper.c'; then $(CYGPATH_W) 'helper.c'; else $(CYGPATH_W) '$(srcdir)/helper.c'; fi` nrg-nrg.o: nrg.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nrg_CFLAGS) $(CFLAGS) -MT nrg-nrg.o -MD -MP -MF $(DEPDIR)/nrg-nrg.Tpo -c -o nrg-nrg.o `test -f 'nrg.c' || echo '$(srcdir)/'`nrg.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nrg-nrg.Tpo $(DEPDIR)/nrg-nrg.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nrg.c' object='nrg-nrg.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nrg_CFLAGS) $(CFLAGS) -c -o nrg-nrg.o `test -f 'nrg.c' || echo '$(srcdir)/'`nrg.c nrg-nrg.obj: nrg.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nrg_CFLAGS) $(CFLAGS) -MT nrg-nrg.obj -MD -MP -MF $(DEPDIR)/nrg-nrg.Tpo -c -o nrg-nrg.obj `if test -f 'nrg.c'; then $(CYGPATH_W) 'nrg.c'; else $(CYGPATH_W) '$(srcdir)/nrg.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/nrg-nrg.Tpo $(DEPDIR)/nrg-nrg.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nrg.c' object='nrg-nrg.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(nrg_CFLAGS) $(CFLAGS) -c -o nrg-nrg.obj `if test -f 'nrg.c'; then $(CYGPATH_W) 'nrg.c'; else $(CYGPATH_W) '$(srcdir)/nrg.c'; fi` osx-osx.o: osx.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(osx_CFLAGS) $(CFLAGS) -MT osx-osx.o -MD -MP -MF $(DEPDIR)/osx-osx.Tpo -c -o osx-osx.o `test -f 'osx.c' || echo '$(srcdir)/'`osx.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/osx-osx.Tpo $(DEPDIR)/osx-osx.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='osx.c' object='osx-osx.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(osx_CFLAGS) $(CFLAGS) -c -o osx-osx.o `test -f 'osx.c' || echo '$(srcdir)/'`osx.c osx-osx.obj: osx.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(osx_CFLAGS) $(CFLAGS) -MT osx-osx.obj -MD -MP -MF $(DEPDIR)/osx-osx.Tpo -c -o osx-osx.obj `if test -f 'osx.c'; then $(CYGPATH_W) 'osx.c'; else $(CYGPATH_W) '$(srcdir)/osx.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/osx-osx.Tpo $(DEPDIR)/osx-osx.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='osx.c' object='osx-osx.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(osx_CFLAGS) $(CFLAGS) -c -o osx-osx.obj `if test -f 'osx.c'; then $(CYGPATH_W) 'osx.c'; else $(CYGPATH_W) '$(srcdir)/osx.c'; fi` realpath-realpath.o: realpath.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realpath_CFLAGS) $(CFLAGS) -MT realpath-realpath.o -MD -MP -MF $(DEPDIR)/realpath-realpath.Tpo -c -o realpath-realpath.o `test -f 'realpath.c' || echo '$(srcdir)/'`realpath.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/realpath-realpath.Tpo $(DEPDIR)/realpath-realpath.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='realpath.c' object='realpath-realpath.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realpath_CFLAGS) $(CFLAGS) -c -o realpath-realpath.o `test -f 'realpath.c' || echo '$(srcdir)/'`realpath.c realpath-realpath.obj: realpath.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realpath_CFLAGS) $(CFLAGS) -MT realpath-realpath.obj -MD -MP -MF $(DEPDIR)/realpath-realpath.Tpo -c -o realpath-realpath.obj `if test -f 'realpath.c'; then $(CYGPATH_W) 'realpath.c'; else $(CYGPATH_W) '$(srcdir)/realpath.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/realpath-realpath.Tpo $(DEPDIR)/realpath-realpath.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='realpath.c' object='realpath-realpath.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realpath_CFLAGS) $(CFLAGS) -c -o realpath-realpath.obj `if test -f 'realpath.c'; then $(CYGPATH_W) 'realpath.c'; else $(CYGPATH_W) '$(srcdir)/realpath.c'; fi` solaris-solaris.o: solaris.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(solaris_CFLAGS) $(CFLAGS) -MT solaris-solaris.o -MD -MP -MF $(DEPDIR)/solaris-solaris.Tpo -c -o solaris-solaris.o `test -f 'solaris.c' || echo '$(srcdir)/'`solaris.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/solaris-solaris.Tpo $(DEPDIR)/solaris-solaris.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='solaris.c' object='solaris-solaris.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(solaris_CFLAGS) $(CFLAGS) -c -o solaris-solaris.o `test -f 'solaris.c' || echo '$(srcdir)/'`solaris.c solaris-solaris.obj: solaris.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(solaris_CFLAGS) $(CFLAGS) -MT solaris-solaris.obj -MD -MP -MF $(DEPDIR)/solaris-solaris.Tpo -c -o solaris-solaris.obj `if test -f 'solaris.c'; then $(CYGPATH_W) 'solaris.c'; else $(CYGPATH_W) '$(srcdir)/solaris.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/solaris-solaris.Tpo $(DEPDIR)/solaris-solaris.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='solaris.c' object='solaris-solaris.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(solaris_CFLAGS) $(CFLAGS) -c -o solaris-solaris.obj `if test -f 'solaris.c'; then $(CYGPATH_W) 'solaris.c'; else $(CYGPATH_W) '$(srcdir)/solaris.c'; fi` win32-win32.o: win32.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(win32_CFLAGS) $(CFLAGS) -MT win32-win32.o -MD -MP -MF $(DEPDIR)/win32-win32.Tpo -c -o win32-win32.o `test -f 'win32.c' || echo '$(srcdir)/'`win32.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/win32-win32.Tpo $(DEPDIR)/win32-win32.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='win32.c' object='win32-win32.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(win32_CFLAGS) $(CFLAGS) -c -o win32-win32.o `test -f 'win32.c' || echo '$(srcdir)/'`win32.c win32-win32.obj: win32.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(win32_CFLAGS) $(CFLAGS) -MT win32-win32.obj -MD -MP -MF $(DEPDIR)/win32-win32.Tpo -c -o win32-win32.obj `if test -f 'win32.c'; then $(CYGPATH_W) 'win32.c'; else $(CYGPATH_W) '$(srcdir)/win32.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/win32-win32.Tpo $(DEPDIR)/win32-win32.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='win32.c' object='win32-win32.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(win32_CFLAGS) $(CFLAGS) -c -o win32-win32.obj `if test -f 'win32.c'; then $(CYGPATH_W) 'win32.c'; else $(CYGPATH_W) '$(srcdir)/win32.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am test: check-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libcdio-0.83/test/testparanoia.c0000644000175000017500000001261611650130622013611 00000000000000/* Copyright (C) 2005, 2006, 2008, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Simple program to show using libcdio's version of cdparanoia. */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #include #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef WORDS_BIGENDIAN #define BIGENDIAN 1 #else #define BIGENDIAN 0 #endif #define SKIP_TEST_RC 77 #define MAX_SECTORS 50 static uint8_t audio_buf[MAX_SECTORS][CDIO_CD_FRAMESIZE_RAW] = { {0}, }; static paranoia_cb_mode_t audio_status[MAX_SECTORS]; static unsigned int i = 0; static void callback(long int inpos, paranoia_cb_mode_t function) { audio_status[i] = function; } int main(int argc, const char *argv[]) { cdrom_drive_t *d = NULL; /* Place to store handle given by cd-parapnioa. */ driver_id_t driver_id; char **ppsz_cd_drives; /* List of all drives with a loaded CDDA in it. */ int i_rc=0; /* See if we can find a device with a loaded CD-DA in it. If successful drive_id will be set. */ ppsz_cd_drives = cdio_get_devices_with_cap_ret(NULL, CDIO_FS_AUDIO, false, &driver_id); if (ppsz_cd_drives && *ppsz_cd_drives) { /* Found such a CD-ROM with a CD-DA loaded. Use the first drive in the list. */ d=cdda_identify(*ppsz_cd_drives, 1, NULL); } else { printf("Unable find or access a CD-ROM drive with an audio CD in it.\n"); exit(SKIP_TEST_RC); } /** We had a bug in is_device when driver_id == DRIVER_UNKNOWN or DRIVER_DEVICE. Let's make sure we've fixed that problem. **/ if (!cdio_is_device(*ppsz_cd_drives, DRIVER_UNKNOWN) || !cdio_is_device(*ppsz_cd_drives, DRIVER_DEVICE)) exit(99); /* Don't need a list of CD's with CD-DA's any more. */ cdio_free_device_list(ppsz_cd_drives); /* We'll set for verbose paranoia messages. */ cdda_verbose_set(d, CDDA_MESSAGE_PRINTIT, CDDA_MESSAGE_PRINTIT); if ( 0 != cdio_cddap_open(d) ) { printf("Unable to open disc.\n"); exit(SKIP_TEST_RC); } /* Okay now set up to read up to the first 300 frames of the first audio track of the Audio CD. */ { cdrom_paranoia_t *p = paranoia_init(d); lsn_t i_first_lsn = cdda_disc_firstsector(d); if ( -1 == i_first_lsn ) { printf("Trouble getting starting LSN\n"); } else { lsn_t i_lsn; /* Current LSN to read */ lsn_t i_last_lsn = cdda_disc_lastsector(d); unsigned int i_sectors = i_last_lsn - i_first_lsn + 1; unsigned int j; unsigned int i_good = 0; unsigned int i_bad = 0; /* Set reading mode for full paranoia, but allow skipping sectors. */ paranoia_modeset(p, PARANOIA_MODE_FULL^PARANOIA_MODE_NEVERSKIP); for ( j=0; j<10; j++ ) { /* Pick a place to start reading. */ i_lsn = i_first_lsn + (rand() % i_sectors); paranoia_seek(p, i_lsn, SEEK_SET); printf("Testing %d sectors starting at %ld\n", MAX_SECTORS, (long int) i_lsn); for ( i = 0; i < MAX_SECTORS && i_lsn <= i_last_lsn; i++, i_lsn++ ) { /* read a sector */ int16_t *p_readbuf = paranoia_read(p, callback); char *psz_err=cdio_cddap_errors(d); char *psz_mes=cdio_cddap_messages(d); memcpy(audio_buf[i], p_readbuf, CDIO_CD_FRAMESIZE_RAW); if (psz_mes || psz_err) printf("%s%s\n", psz_mes ? psz_mes: "", psz_err ? psz_err: ""); free(psz_err); free(psz_mes); if( !p_readbuf ) { printf("paranoia read error. Stopping.\n"); goto out; } } /* Compare with the sectors from paranoia. */ i_lsn -= MAX_SECTORS; for ( i = 0; i < MAX_SECTORS; i++, i_lsn++ ) { uint8_t readbuf[CDIO_CD_FRAMESIZE_RAW] = {0,}; if ( PARANOIA_CB_READ == audio_status[i] || PARANOIA_CB_VERIFY == audio_status[i] ) { /* We read the block via paranoia without an error. */ if ( 0 == cdio_read_audio_sector(d->p_cdio, readbuf, i_lsn) ) { if ( BIGENDIAN != d->bigendianp ) { /* We will compare in the slow, pedantic way*/ int j; for (j=0; j < CDIO_CD_FRAMESIZE_RAW ; j +=2) { if (audio_buf[i][j] != readbuf[j+1] && audio_buf[i][j+1] != readbuf[j] ) { printf("LSN %ld doesn't match\n", (long int) i_lsn); i_bad++; } else { i_good++; } } } else { if ( 0 != memcmp(audio_buf[i], readbuf, CDIO_CD_FRAMESIZE_RAW) ) { printf("LSN %ld doesn't match\n", (long int) i_lsn); i_bad++; } else { i_good++; } } } } else { printf("Skipping LSN %ld because of status: %s\n", (long int) i_lsn, paranoia_cb_mode2str[audio_status[i]]); } } } printf("%u sectors compared okay %u sectors were different\n", i_good, i_bad); if (i_bad > i_good) i_rc = 1; } out: paranoia_free(p); } cdio_cddap_close(d); exit(i_rc); } libcdio-0.83/test/check_iso.sh0000755000175000017500000000325211652140274013243 00000000000000#!/bin/sh #$Id: check_iso.sh.in,v 1.15 2008/10/17 01:51:47 rocky Exp $ if test -z $srcdir ; then srcdir=`pwd` fi if test "X$top_builddir" = "X" ; then top_builddir=`pwd`/.. fi . ${top_builddir}/test/check_common_fn if test ! -x ../src/iso-info ; then exit 77 fi BASE=`basename $0 .sh` fname=copying opts="--quiet ${srcdir}/data/${fname}.iso --iso9660 " test_iso_info "$opts" ${fname}.dump ${srcdir}/${fname}.right RC=$? check_result $RC 'iso-info basic test' "$ISO_INFO $opts" opts="--ignore --image ${srcdir}/data/${fname}.iso --extract $fname " test_iso_read "$opts" ${fname} ${srcdir}/copying.gpl RC=$? check_result $RC 'iso-read basic test' "$ISO_READ $opts" if test -n ""; then fname=copying-rr opts="--quiet ${srcdir}/data/${fname}.iso --iso9660 " test_iso_info "$opts" ${fname}.dump ${srcdir}/${fname}.right RC=$? check_result $RC 'iso-info Rock Ridge test' "$ISO_INFO $opts" opts="--image ${srcdir}/data/${fname}.iso --extract COPYING" test_iso_read "$opts" ${fname} ${srcdir}/copying-rr.gpl RC=$? check_result $RC 'iso-read RR test' "$ISO_READ $opts" fi if test -n "1" ; then BASE=`basename $0 .sh` fname=joliet opts="--quiet ${srcdir}/data/${fname}.iso --iso9660 " test_iso_info "$opts" ${fname}-nojoliet.dump ${srcdir}/${fname}.right RC=$? check_result $RC 'iso-info Joliet test' "$cmdline" opts="--quiet ${srcdir}/data/${fname}.iso --iso9660 --no-joliet " test_iso_info "$opts" ${fname}-nojoliet.dump \ ${srcdir}/${fname}-nojoliet.right RC=$? check_result $RC 'iso-info --no-joliet test' "$cmdline" fi exit $RC #;;; Local Variables: *** #;;; mode:shell-script *** #;;; eval: (sh-set-shell "bash") *** #;;; End: *** libcdio-0.83/test/testpregap.c.in0000644000175000017500000000605611650131056013705 00000000000000/* Copyright (C) 2003, 2004, 2005, 2011 Rocky Bernstein Copyright (C) 2008 Robert W. Fuller This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Regression test for cdio_get_pregap_lsn() */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #include #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #include #ifndef DATA_DIR #define DATA_DIR "@srcdir@/data" #endif static void log_handler (cdio_log_level_t level, const char message[]) { switch(level) { case CDIO_LOG_DEBUG: case CDIO_LOG_INFO: return; default: printf("cdio %d message: %s\n", level, message); } } typedef struct _pregap_list_t { const char *image; track_t track; lsn_t pregap; } pregap_list_t; static pregap_list_t pregapList[] = { { "@abs_top_srcdir@/test/data/t2.toc", 1, 4425 }, { "@abs_top_srcdir@/test/data/t2.toc", 2, CDIO_INVALID_LSN }, { "@abs_top_srcdir@/test/data/p1.cue", 1, 0 }, { "@abs_top_srcdir@/test/data/p1.cue", 2, 150 }, { "@abs_top_srcdir@/test/data/p1.cue", 3, CDIO_INVALID_LSN }, /* { "p1.nrg", 1, 0 }, Nero did not create the proper pre-gap - bleh */ { "@abs_top_srcdir@/test/data/p1.nrg", 2, 225 }, { "@abs_top_srcdir@/test/data/p1.nrg", 3, CDIO_INVALID_LSN } }; #define NELEMS(v) (sizeof(v) / sizeof(v[0])) /* gcc -Wall -I../include testpregap.c ../lib/driver/.libs/libcdio.a */ int main(int argc, const char *argv[]) { CdIo_t *cdObj; const char *image; lsn_t pregap; int i; int rc = 0; cdio_log_set_handler (log_handler); if (! (cdio_have_driver(DRIVER_NRG) && cdio_have_driver(DRIVER_BINCUE) && cdio_have_driver(DRIVER_CDRDAO)) ) { printf("You don't have enough drivers for this test\n"); exit(77); } for (i = 0; i < NELEMS(pregapList); ++i) { image = pregapList[i].image; cdObj = cdio_open(image, DRIVER_UNKNOWN); if (!cdObj) { printf("unrecognized image: %s\n", image); return 50; } pregap = cdio_get_track_pregap_lsn(cdObj, pregapList[i].track); if (pregap != pregapList[i].pregap) { printf("%s should have had pregap of lsn=%d instead of lsn=%d\n", image, pregapList[i].pregap, pregap); rc = i + 1; } else { printf("%s had expected pregap\n", image); } cdio_destroy(cdObj); } return rc; } libcdio-0.83/test/vcd_demo.right0000644000175000017500000001134411642541561013600 00000000000000__________________________________ CD-ROM Track List (1 - 3) #: MSF LSN Type Green? Copy? 1: 00:02:00 000000 XA true yes 2: 00:17:57 001182 XA true yes 3: 00:24:71 001721 XA true yes 170: 00:30:10 002110 leadout (4 MB raw, 4 MB formatted) Media Catalog Number (MCN): not available Last CD Session LSN: not supported by drive/driver __________________________________ CD Analysis Report CD-ROM with CD-RTOS and ISO 9660 filesystem ISO 9660: 1032 blocks, label `V0469 ' Application: Preparer : LKVCDIMAGER 5.0.7.10(WIN32) Publisher : LAURENS KOEHOORN System : CD-RTOS CD-BRIDGE Volume : V0469 Volume Set : ISO9660 filesystem /: d---1xrxrxr 0 0 [fn 00] [LSN 18] 2048 Jul 14 1978 00:00:00 . d---1xrxrxr 0 0 [fn 00] [LSN 18] 2048 Jul 14 1978 00:00:00 .. d---1xrxrxr 0 0 [fn 00] [LSN 19] 2048 Jul 14 1978 00:00:00 ext d---1xrxrxr 0 0 [fn 00] [LSN 20] 2048 Jul 14 1978 00:00:00 mpegav d---1xrxrxr 0 0 [fn 00] [LSN 21] 2048 Jul 14 1978 00:00:00 segment d---1xrxrxr 0 0 [fn 00] [LSN 22] 2048 Jul 14 1978 00:00:00 sources d---1xrxrxr 0 0 [fn 00] [LSN 25] 2048 Jul 14 1978 00:00:00 vcd /EXT/: d---1xrxrxr 0 0 [fn 00] [LSN 19] 2048 Jul 14 1978 00:00:00 . d---1xrxrxr 0 0 [fn 00] [LSN 18] 2048 Jul 14 1978 00:00:00 .. ----1xrxrxr 0 0 [fn 01] [LSN 375] 65536 Jul 14 1978 00:00:00 lot_x.vcd ----1xrxrxr 0 0 [fn 01] [LSN 407] 144 Jul 14 1978 00:00:00 psd_x.vcd /MPEGAV/: d---1xrxrxr 0 0 [fn 00] [LSN 20] 2048 Jul 14 1978 00:00:00 . d---1xrxrxr 0 0 [fn 00] [LSN 18] 2048 Jul 14 1978 00:00:00 .. ---2-xrxrxr 0 0 [fn 01] [LSN 1182] 904036 ( 796672) Jul 14 1978 00:00:00 avseq01.dat ---2-xrxrxr 0 0 [fn 02] [LSN 1721] 904036 ( 796672) Jul 14 1978 00:00:00 avseq02.dat /SEGMENT/: d---1xrxrxr 0 0 [fn 00] [LSN 21] 2048 Jul 14 1978 00:00:00 . d---1xrxrxr 0 0 [fn 00] [LSN 18] 2048 Jul 14 1978 00:00:00 .. ---2-xrxrxr 0 0 [fn 01] [LSN 225] 220780 ( 194560) Jul 14 1978 00:00:00 item0001.dat /Sources/: d---1xrxrxr 0 0 [fn 00] [LSN 22] 2048 Jul 14 1978 00:00:00 . d---1xrxrxr 0 0 [fn 00] [LSN 18] 2048 Jul 14 1978 00:00:00 .. d---1xrxrxr 0 0 [fn 00] [LSN 23] 2048 Jul 14 1978 00:00:00 html ----1xrxrxr 0 0 [fn 01] [LSN 434] 842 Dec 11 2002 10:33:47 index.htm ----1xrxrxr 0 0 [fn 01] [LSN 435] 1216557 Jan 07 2003 18:01:37 menu.ppm ----1xrxrxr 0 0 [fn 01] [LSN 1030] 2793 Jan 07 2003 18:08:20 source.xml /Sources/HTML/: d---1xrxrxr 0 0 [fn 00] [LSN 23] 2048 Jul 14 1978 00:00:00 . d---1xrxrxr 0 0 [fn 00] [LSN 22] 2048 Jul 14 1978 00:00:00 .. ----1xrxrxr 0 0 [fn 01] [LSN 425] 1067 Jan 07 2003 17:51:17 0.xml ----1xrxrxr 0 0 [fn 01] [LSN 426] 1067 Jan 07 2003 17:51:17 1.xml d---1xrxrxr 0 0 [fn 00] [LSN 24] 2048 Jul 14 1978 00:00:00 img ----1xrxrxr 0 0 [fn 01] [LSN 427] 1327 Jan 07 2003 17:51:16 movies.css ----1xrxrxr 0 0 [fn 01] [LSN 428] 12024 Jan 07 2003 17:51:16 toc.xsl /Sources/HTML/img/: d---1xrxrxr 0 0 [fn 00] [LSN 24] 2048 Jul 14 1978 00:00:00 . d---1xrxrxr 0 0 [fn 00] [LSN 23] 2048 Jul 14 1978 00:00:00 .. ----1xrxrxr 0 0 [fn 01] [LSN 408] 1999 Nov 13 2002 07:27:30 al.gif ----1xrxrxr 0 0 [fn 01] [LSN 409] 7626 Jan 07 2003 17:42:53 loeki_groep_01.gif ----1xrxrxr 0 0 [fn 01] [LSN 413] 9986 Jan 07 2003 17:42:53 loeki_groep_02.gif ----1xrxrxr 0 0 [fn 01] [LSN 418] 207 Nov 14 2002 19:33:19 a_left.gif ----1xrxrxr 0 0 [fn 01] [LSN 419] 207 Nov 14 2002 19:33:19 a_right.gif ----1xrxrxr 0 0 [fn 01] [LSN 420] 441 Nov 13 2002 10:54:14 animatie.gif ----1xrxrxr 0 0 [fn 01] [LSN 421] 250 Nov 14 2002 11:44:14 face_up2.gif ----1xrxrxr 0 0 [fn 01] [LSN 422] 259 Nov 13 2002 11:09:06 familie.gif ----1xrxrxr 0 0 [fn 01] [LSN 423] 1010 Nov 14 2002 11:52:28 goldstar2.gif ----1xrxrxr 0 0 [fn 01] [LSN 424] 1783 Nov 13 2002 07:15:09 vcd.gif /VCD/: d---1xrxrxr 0 0 [fn 00] [LSN 25] 2048 Jul 14 1978 00:00:00 . d---1xrxrxr 0 0 [fn 00] [LSN 18] 2048 Jul 14 1978 00:00:00 .. ----1xrxrxr 0 0 [fn 00] [LSN 151] 2048 Jul 14 1978 00:00:00 entries.vcd ----1xrxrxr 0 0 [fn 00] [LSN 150] 2048 Jul 14 1978 00:00:00 info.vcd ----1xrxrxr 0 0 [fn 00] [LSN 152] 65536 Jul 14 1978 00:00:00 lot.vcd ----1xrxrxr 0 0 [fn 00] [LSN 184] 72 Jul 14 1978 00:00:00 psd.vcd XA sectors Video CD session #2 starts at track 2, LSN: 1182, ISO 9660 blocks: 1032 ISO 9660: 1032 blocks, label `V0469 ' libcdio-0.83/test/check_opts6.right0000644000175000017500000000127611642541561014233 00000000000000__________________________________ Disc mode is listed as: CD-DATA (Mode 1) CD-ROM Track List (1 - 1) #: MSF LSN Type Green? Copy? 1: 00:02:00 000000 data false no 170: 00:06:02 000302 leadout (693 KB raw, 604 KB formatted) Media Catalog Number (MCN): not available Last CD Session LSN: not supported by drive/driver __________________________________ CD Analysis Report CD-ROM with ISO 9660 filesystem ISO 9660: 64 blocks, label `CDROM ' Application: MKISOFS ISO 9660/HFS FILESYSTEM BUILDER & CDRECORD CD-R/DVD CREATOR (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING Preparer : Publisher : System : LINUX Volume : CDROM Volume Set : libcdio-0.83/test/testgetdevices.c0000644000175000017500000001102011652140274014133 00000000000000/* Copyright (C) 2008, 2009, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Regression test for cdio_get_devices, cdio_get_devices_with_cap(), and cdio_free_device_list() */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #include #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_SYS_UTSNAME_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #include #ifndef DATA_DIR #define DATA_DIR "/src/external-vcs/libcdio/test/data/" #endif static void log_handler (cdio_log_level_t level, const char message[]) { switch(level) { case CDIO_LOG_DEBUG: case CDIO_LOG_INFO: return; default: printf("cdio %d message: %s\n", level, message); } } static bool is_in(char **file_list, const char *file) { char **p; for (p = file_list; p != NULL && *p != NULL; p++) { if (strcmp(*p, file) == 0) { printf("File %s found as expected\n", file); return true; } } printf("Can't find file %s in list\n", file); return false; } int main(int argc, const char *argv[]) { char **nrg_images=NULL; char **bincue_images=NULL; char **imgs; unsigned int i; int ret=0; const char *cue_files[2] = {"cdda.cue", "isofs-m1.cue"}; const char *nrg_files[1] = {"videocd.nrg"}; cdio_log_set_handler (log_handler); if (cdio_have_driver(-1) != false) { fprintf(stderr, "Bogus driver number -1 should be regexted\n"); return 5; } #ifdef HAVE_SYS_UTSNAME_H { struct utsname utsname; if (0 == uname(&utsname)) { if (0 == strncmp("Linux", utsname.sysname, sizeof("Linux"))) { if (!cdio_have_driver(DRIVER_LINUX)) { fprintf(stderr, "You should have been able to get GNU/Linux driver\n"); return 6; } else { printf("Good! You have the GNU/Linux driver installed.\n"); } } else if (0 == strncmp("CYGWIN", utsname.sysname, sizeof("CYGWIN"))) { if (!cdio_have_driver(DRIVER_WIN32)) { fprintf(stderr, "You should have been able to get Win32 driver\n"); return 6; } else { printf("Good! You have the Win32 driver installed.\n"); } } else if (0 == strncmp("Darwin", utsname.sysname, sizeof("Darwin"))) { if (!cdio_have_driver(DRIVER_OSX)) { fprintf(stderr, "You should have been able to get OS/X driver\n"); return 6; } else { printf("Good! You have the OS/X driver installed.\n"); } } else if (0 == strncmp("NetBSD", utsname.sysname, sizeof("NetBSD"))) { if (!cdio_have_driver(DRIVER_NETBSD)) { fprintf(stderr, "You should have been able to get NetBSD driver\n"); return 6; } else { printf("Good! You have the OS/X driver installed.\n"); } } } } #endif if (! (cdio_have_driver(DRIVER_NRG) && cdio_have_driver(DRIVER_BINCUE)) ) { printf("You don't have enough drivers for this test\n"); exit(77); } bincue_images = cdio_get_devices(DRIVER_BINCUE); for (imgs=bincue_images; *imgs != NULL; imgs++) { printf("bincue image %s\n", *imgs); } if (ret != 0) return ret; if (0 == chdir(DATA_DIR)) { nrg_images = cdio_get_devices(DRIVER_NRG); for (imgs=nrg_images; *imgs != NULL; imgs++) { printf("NRG image %s\n", *imgs); } if (!is_in(nrg_images, nrg_files[0])) { cdio_free_device_list(nrg_images); return 10; } for (i=0; i<2; i++) { if (is_in(bincue_images, cue_files[i])) { printf("%s parses as a CDRWIN BIN/CUE csheet.\n", cue_files[i]); } else { printf("%s doesn't parse as a CDRWIN BIN/CUE csheet.\n", cue_files[i]); ret = i+1; } } } cdio_free_device_list(nrg_images); cdio_free_device_list(bincue_images); return 0; } libcdio-0.83/test/test_lib_driver_util.c0000644000175000017500000000260111650130573015332 00000000000000/* -*- C -*- Copyright (C) 2009, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Unit test for lib/driver/util.c */ #include #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #include int main(int argc, const char *argv[]) { if (0 != strncmp(cdio_version_string, CDIO_VERSION, strlen(CDIO_VERSION))) { fprintf(stderr, "CDIO VERSION string mismatch %s vs %s\n", cdio_version_string, CDIO_VERSION); exit(1); } if (libcdio_version_num != LIBCDIO_VERSION_NUM) { fprintf(stderr, "LIBCDIO_VERSION_NUM value mismatch %d vs %d\n", libcdio_version_num, LIBCDIO_VERSION_NUM); exit(2); } exit(0); } libcdio-0.83/test/check_opts1.right0000644000175000017500000000102311642541561014214 00000000000000__________________________________ Disc mode is listed as: CD-DATA (Mode 1) Media Catalog Number (MCN): not available Last CD Session LSN: not supported by drive/driver __________________________________ CD Analysis Report CD-ROM with ISO 9660 filesystem ISO 9660: 64 blocks, label `CDROM ' Application: MKISOFS ISO 9660/HFS FILESYSTEM BUILDER & CDRECORD CD-R/DVD CREATOR (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING Preparer : Publisher : System : LINUX Volume : CDROM Volume Set : libcdio-0.83/test/check_opts4.right0000644000175000017500000000127611642541561014231 00000000000000__________________________________ Disc mode is listed as: CD-DATA (Mode 1) CD-ROM Track List (1 - 1) #: MSF LSN Type Green? Copy? 1: 00:02:00 000000 data false no 170: 00:06:02 000302 leadout (693 KB raw, 604 KB formatted) Media Catalog Number (MCN): not available Last CD Session LSN: not supported by drive/driver __________________________________ CD Analysis Report CD-ROM with ISO 9660 filesystem ISO 9660: 64 blocks, label `CDROM ' Application: MKISOFS ISO 9660/HFS FILESYSTEM BUILDER & CDRECORD CD-R/DVD CREATOR (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING Preparer : Publisher : System : LINUX Volume : CDROM Volume Set : libcdio-0.83/test/testdefault.c0000644000175000017500000001141011650130477013442 00000000000000/* Copyright (C) 2003, 2004, 2005, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Regression test for cdio_get_devices, cdio_get_devices_with_cap(), and cdio_free_device_list() */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #include #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #include static void log_handler (cdio_log_level_t level, const char message[]) { switch(level) { case CDIO_LOG_DEBUG: case CDIO_LOG_INFO: return; default: printf("cdio %d message: %s\n", level, message); } } static bool is_in(char **file_list, const char *file) { char **p; for (p = file_list; p != NULL && *p != NULL; p++) { if (strcmp(*p, file) == 0) { printf("File %s found as expected\n", file); return true; } } printf("Can't find file %s in list\n", file); return false; } int main(int argc, const char *argv[]) { char **nrg_images=NULL; char **bincue_images=NULL; char **imgs; char **c; unsigned int i; int ret=0; const char *cue_files[2] = {"cdda.cue", "isofs-m1.cue"}; const char *nrg_files[1] = {"videocd.nrg"}; cdio_log_set_handler (log_handler); if (cdio_have_driver(-1) != false) { printf("Bogus driver number -1 should be regexted\n"); return 5; } if (! (cdio_have_driver(DRIVER_NRG) && cdio_have_driver(DRIVER_BINCUE)) ) { printf("You don't have enough drivers for this test\n"); exit(77); } nrg_images = cdio_get_devices(DRIVER_NRG); for (imgs=nrg_images; *imgs != NULL; imgs++) { printf("NRG image %s\n", *imgs); } if (!is_in(nrg_images, nrg_files[0])) { cdio_free_device_list(nrg_images); return 10; } bincue_images = cdio_get_devices(DRIVER_BINCUE); for (imgs=bincue_images; *imgs != NULL; imgs++) { printf("bincue image %s\n", *imgs); } for (i=0; i<2; i++) { if (is_in(bincue_images, cue_files[i])) { printf("%s parses as a CDRWIN BIN/CUE csheet.\n", cue_files[i]); } else { printf("%s doesn't parse as a CDRWIN BIN/CUE csheet.\n", cue_files[i]); ret = i+1; } } if (ret != 0) return ret; printf("-----\n"); printf("ISO 9660 images...\n"); imgs = NULL; /* Print out a list of CDDA-drives. */ imgs = cdio_get_devices_with_cap(bincue_images, CDIO_FS_ISO_9660, false); if (NULL == imgs || *imgs == NULL) { printf("Failed to find an ISO 9660 image\n"); return 11; } for( c = imgs; *c != NULL; c++ ) { printf("%s\n", *c); } cdio_free_device_list(imgs); free(imgs); printf("-----\n"); printf("CD-DA images...\n"); imgs = NULL; /* Print out a list of CDDA-drives. */ imgs = cdio_get_devices_with_cap(bincue_images, CDIO_FS_AUDIO, false); if (NULL == imgs || *imgs == NULL) { printf("Failed to find CDDA image\n"); return 12; } for( c = imgs; *c != NULL; c++ ) { printf("%s\n", *c); } cdio_free_device_list(imgs); free(imgs); printf("-----\n"); imgs = NULL; printf("VCD images...\n"); /* Print out a list of CD-drives with VCD's in them. */ imgs = cdio_get_devices_with_cap(nrg_images, (CDIO_FS_ANAL_SVCD|CDIO_FS_ANAL_CVD|CDIO_FS_ANAL_VIDEOCD|CDIO_FS_UNKNOWN), true); if (NULL == imgs || *imgs == NULL) { printf("Failed to find VCD image\n"); return 13; } for( c = imgs; *c != NULL; c++ ) { printf("image: %s\n", *c); } cdio_free_device_list(imgs); free(imgs); imgs = NULL; /* Print out a list of CDDA-drives. */ imgs = cdio_get_devices_with_cap(bincue_images, CDIO_FS_HIGH_SIERRA, false); if (NULL != imgs && *imgs != NULL) { printf("Found erroneous High Sierra image\n"); return 14; } imgs = NULL; /* Print out a list of CDDA-drives. */ imgs = cdio_get_devices_with_cap(bincue_images, CDIO_FS_UFS, true); if (NULL != imgs && *imgs != NULL) { printf("Found erroneous UFS image\n"); return 15; } cdio_free_device_list(nrg_images); cdio_free_device_list(bincue_images); cdio_free_device_list(imgs); return 0; } libcdio-0.83/test/copying-rr.gpl0000644000175000017500000004311011114145233013540 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. libcdio-0.83/test/isofs-m1.right0000644000175000017500000000227711642541561013463 00000000000000__________________________________ CD-ROM Track List (1 - 1) #: MSF LSN Type Green? Copy? 1: 00:02:00 000000 data false no 170: 00:06:02 000302 leadout (693 KB raw, 604 KB formatted) Media Catalog Number (MCN): not available Last CD Session LSN: not supported by drive/driver __________________________________ CD Analysis Report CD-ROM with ISO 9660 filesystem ISO 9660: 64 blocks, label `CDROM ' Application: MKISOFS ISO 9660/HFS FILESYSTEM BUILDER & CDRECORD CD-R/DVD CREATOR (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING Preparer : Publisher : System : LINUX Volume : CDROM Volume Set : ISO9660 filesystem /: drwxrwxr-x 3 715 715 [LSN 23] 2048 Apr 20 2003 11:26:46 . drwxrwxr-x 3 715 715 [LSN 23] 2048 Apr 20 2003 11:26:46 .. -rw-r--r-- 1 715 715 [LSN 26] 17992 Jul 29 2002 12:39:53 COPYING drwxrwxr-x 2 715 715 [LSN 24] 2048 Apr 20 2003 16:18:53 doc /doc/: drwxrwxr-x 2 715 715 [LSN 24] 2048 Apr 20 2003 16:18:53 . drwxrwxr-x 3 715 715 [LSN 23] 2048 Apr 20 2003 11:26:46 .. -rw-rw-r-- 1 715 715 [LSN 35] 648 Apr 20 2003 16:18:53 readme.txt libcdio-0.83/test/check_fuzzyiso.sh0000755000175000017500000000161711325731673014364 00000000000000#!/bin/sh #$Id: check_fuzzyiso.sh,v 1.6 2008/03/20 03:45:43 edsdead Exp $ if test "X$srcdir" = "X" ; then srcdir=`pwd` fi if test "X$top_srcdir" = "X" ; then top_srcdir=`pwd`/.. fi if test "X$top_builddir" = "X" ; then top_builddir=`pwd`/.. fi check_program="$top_builddir/example/isofuzzy" if test ! -x $check_program ; then exit 77 fi cd $srcdir; src_dir=`pwd` for file in $src_dir/data/*.bin $src_dir/data/*.iso $src_dir/data/*.nrg ; do case "$file" in $src_dir/data/p1.nrg | $src_dir/data/p1.bin | $src_dir/data/cdda.bin | $src_dir/data/cdda-mcn.nrg | $src_dir/data/svcdgs.nrg ) good_rc=1 ;; *) good_rc=0 ;; esac $check_program $file if test $? -ne $good_rc ; then echo "$0: failed running:" echo " $check_program $file" exit 1 fi done exit 0 #;;; Local Variables: *** #;;; mode:shell-script *** #;;; eval: (sh-set-shell "bash") *** #;;; End: *** libcdio-0.83/test/joliet.right0000644000175000017500000000135411642541561013306 00000000000000__________________________________ ISO-9660 Information /: d [LSN 31] 2048 Oct 22 2004 22:44:59 . d [LSN 31] 2048 Oct 22 2004 22:44:59 .. d [LSN 32] 2048 Oct 22 2004 22:44:59 libcdio /libcdio/: d [LSN 32] 2048 Oct 22 2004 22:44:59 . d [LSN 31] 2048 Oct 22 2004 22:44:59 .. - [LSN 34] 17992 Mar 12 2004 07:18:03 COPYING - [LSN 43] 2156 Jun 26 2004 10:01:09 README - [LSN 45] 2849 Aug 12 2004 09:22:23 README.libcdio d [LSN 33] 2048 Oct 22 2004 22:44:59 test /libcdio/test/: d [LSN 33] 2048 Oct 22 2004 22:44:59 . d [LSN 32] 2048 Oct 22 2004 22:44:59 .. - [LSN 47] 74 Jul 25 2004 09:52:32 isofs-m1.cue libcdio-0.83/test/check_nrg.sh.in0000755000175000017500000000355511325732001013642 00000000000000#!/bin/sh #$Id: check_nrg.sh.in,v 1.17 2007/12/28 02:11:01 rocky Exp $ if test "@VCDINFO_LIBS@X" != "X" ; then vcd_opt='--no-vcd' fi if test "X$srcdir" = "X" ; then srcdir=`pwd` fi if test "X$top_srcdir" = "X" ; then top_srcdir=`pwd`/.. fi if test "X$top_builddir" = "X" ; then top_builddir=`pwd`/.. fi . ${top_builddir}/test/check_common_fn if test ! -x $top_srcdir/src/cd-info ; then exit 77 fi BASE=`basename $0 .sh` test_name=videocd opts="--quiet --no-device-info --nrg-file ${srcdir}/data/${test_name}.nrg $vcd_opt --iso9660" test_cdinfo "$opts" ${test_name}.dump ${srcdir}/${test_name}.right RC=$? check_result $RC 'cd-info NRG test 1' "${CD_INFO} $opts" BASE=`basename $0 .sh` nrg_file=${srcdir}/data/monvoisin.nrg if test -f $nrg_file ; then test_cdinfo "-q --no-device-info --nrg-file $nrg_file $vcd_opt --iso9660 " \ monvoisin.dump ${srcdir}/monvoisin.right RC=$? check_result $RC 'cd-info NRG test 2' else echo "Don't see NRG file ${nrg_file}. Test skipped." exit 0 fi test_name='svcdgs' nrg_file=${srcdir}/data/${test_name}.nrg opts="-q --no-device-info --nrg-file $nrg_file $vcd_opt --iso9660" if test -f $nrg_file ; then test_cdinfo "$opts" ${test_name}.dump ${srcdir}/${test_name}.right RC=$? check_result $RC "cd-info NRG $test_name" "${CD_INFO} $opts" else echo "Don't see NRG file ${nrg_file}. Test skipped." exit $SKIP_TEST_EXITCODE fi test_name='cdda-mcn' nrg_file=${srcdir}/data/${test_name}.nrg opts="-q --no-device-info --nrg-file $nrg_file --no-cddb" if test -f $nrg_file ; then test_cdinfo "$opts" ${test_name}.dump ${srcdir}/${test_name}.right RC=$? check_result $RC "cd-info NRG $test_name" "${CD_INFO} $opts" exit $RC else echo "Don't see NRG file ${nrg_file}. Test skipped." exit $SKIP_TEST_EXITCODE fi #;;; Local Variables: *** #;;; mode:shell-script *** #;;; eval: (sh-set-shell "bash") *** #;;; End: *** libcdio-0.83/test/cd-paranoia-log.right0000644000175000017500000000007411114145233014741 00000000000000outputting to cdda.raw (== PROGRESS == [] == :^D * ==) libcdio-0.83/test/check_paranoia.sh0000755000175000017500000000500311652140274014237 00000000000000#!/bin/sh # $Id: check_paranoia.sh.in,v 1.18 2008/10/17 01:51:47 rocky Exp $ # Compare our cd-paranoia with known good results. if test "X$srcdir" = "X" ; then srcdir=`pwd` fi if test "X$top_builddir" = "X" ; then top_builddir=`pwd`/.. fi if test "X$top_srcdir" = "X" ; then top_srcdir=`pwd`/.. fi if test "/usr/bin/cmp" != no -a ""X = X ; then cd_paranoia=$top_builddir/src/cd-paranoia/cd-paranoia $cd_paranoia -d $srcdir/data/cdda.cue -v -r -- "1-" if test $? -ne 0 ; then exit 6 fi dd bs=16 if=cdda.raw of=cdda-1.raw dd bs=16 if=cdda.bin of=cdda-2.raw if /usr/bin/cmp cdda-1.raw cdda-2.raw ; then echo "** Raw cdda.bin extraction okay" else echo "** Raw cdda.bin extraction differ" exit 3 fi mv cdda.raw cdda-good.raw $cd_paranoia -d $srcdir/data/cdda.cue -x 64 -v -r -- "1-" mv cdda.raw cdda-underrun.raw $cd_paranoia -d $srcdir/data/cdda.cue -r -- "1-" if test $? -ne 0 ; then exit 6 fi if /usr/bin/cmp cdda-underrun.raw cdda-good.raw ; then echo "** Under-run correction okay" else echo "** Under-run correction problem" exit 3 fi # Start out with small jitter $cd_paranoia -l ./cd-paranoia.log -d $srcdir/data/cdda.cue -x 5 -v -r -- "1-" if test $? -ne 0 ; then exit 6 fi mv cdda.raw cdda-jitter.raw if /usr/bin/cmp cdda-jitter.raw cdda-good.raw ; then echo "** Small jitter correction okay" else echo "** Small jitter correction problem" exit 3 fi tail -3 ./cd-paranoia.log | sed -e's/\[.*\]/\[\]/' > ./cd-paranoia-filtered.log if /usr/bin/cmp $srcdir/cd-paranoia-log.right ./cd-paranoia-filtered.log ; then echo "** --log option okay" rm ./cd-paranoia.log ./cd-paranoia-filtered.log else echo "** --log option problem" exit 4 fi # A more massive set of failures: underrun + small jitter $cd_paranoia -d $srcdir/data/cdda.cue -x 69 -v -r -- "1-" if test $? -ne 0 ; then exit 6 fi mv cdda.raw cdda-jitter.raw if /usr/bin/cmp cdda-jitter.raw cdda-good.raw ; then echo "** under-run + jitter correction okay" else echo "** under-run + jitter correction problem" exit 3 fi ### FIXME: medium jitter is known to fail. Investigate. ### FIXME: large jitter is known to fail. Investigate. exit 0 else if test "/usr/bin/cmp" != no ; then echo "Don't see 'cmp' program. Test skipped." else echo "Don't see libcdio 'cd-paranoia' program. Test skipped." fi exit 77 fi fi #;;; Local Variables: *** #;;; mode:shell-script *** #;;; eval: (sh-set-shell "bash") *** #;;; End: *** libcdio-0.83/test/check_cue.sh.in0000644000175000017500000000741411325726732013641 00000000000000#!/bin/sh #$Id: check_cue.sh.in,v 1.31 2007/12/28 02:11:01 rocky Exp $ # Tests to see that BIN/CUE and cdrdao TOC file iamge reading is correct # (via cd-info). if test "@VCDINFO_LIBS@X" != "X" ; then vcd_opt='--no-vcd' fi if test "X$srcdir" = "X" ; then srcdir=`pwd` fi if test "X$top_srcdir" = "X" ; then top_srcdir=`pwd`/.. fi if test "X$top_builddir" = "X" ; then top_builddir=`pwd`/.. fi . ${top_builddir}/test/check_common_fn if test ! -x $top_srcdir/src/cd-info ; then exit 77 fi BASE=`basename $0 .sh` fname=cdda testnum=CD-DA opts="--quiet --no-device-info --cue-file ${srcdir}/data/${fname}.cue --no-cddb" test_cdinfo "$opts" ${fname}.dump ${srcdir}/${fname}.right RC=$? check_result $RC "cd-info CUE test $testnum" "${CD_INFO} $opts" opts="--quiet --no-device-info --bin-file ${srcdir}/data/${fname}.bin --no-cddb" test_cdinfo "$opts" ${fname}.dump ${srcdir}/${fname}.right RC=$? check_result $RC "cd-info BIN test $testnum" "${CD_INFO} $opts" opts="--quiet --no-device-info --toc-file ${srcdir}/data/${fname}.toc --no-cddb" test_cdinfo "$opts" ${fname}.dump ${srcdir}/${fname}.right RC=$? check_result $RC "cd-info TOC test $testnum" "${CD_INFO} $opts" fname=isofs-m1 testnum='ISO 9660 mode1 CUE' if test -f ${srcdir}/${fname}.bin ; then if test -n "@HAVE_ROCK@"; then opts="-q --no-device-info --no-disc-mode --cue-file ${srcdir}/data/${fname}.cue --iso9660" test_cdinfo "$opts" ${fname}.dump ${srcdir}/${fname}.right RC=$? check_result $RC "cd-info Rock-Ridge CUE test $testnum" "${CD_INFO} $opts" opts="-q --no-device-info --no-disc-mode --no-rock-ridge --cue-file ${srcdir}/data/${fname}.cue --iso9660" test_cdinfo "$opts" ${fname}.dump ${srcdir}/${fname}-no-rr.right RC=$? check_result $RC "cd-info no Rock-Ridge CUE test $testnum" "${CD_INFO} $opts" fi else echo "Don't see CUE file ${srcdir}/data/${fname}.bin. Test $testnum skipped." fi if test -n "@HAVE_ROCK@"; then testnum='ISO 9660 mode1 TOC' if test -f ${srcdir}/data/${fname}.bin ; then opts="-q --no-device-info --no-disc-mode --toc-file ${srcdir}/data/${fname}.toc --iso9660" test_cdinfo "$opts" ${fname}.dump ${srcdir}/${fname}.right RC=$? check_result $RC "cd-info TOC test $testnum" "${CD_INFO} $opts" else echo "Don't see TOC file ${srcdir}/data/${fname}.bin. Test $testnum skipped." fi fi fname=vcd_demo if test -z "@VCDINFO_LIBS@" ; then right=${srcdir}/${fname}.right else right=${srcdir}/${fname}_vcdinfo.right fi testnum='Video CD' if test -f ${srcdir}/${fname}.bin ; then opts="-q --no-device-info --no-disc-mode -c ${srcdir}/data/${fname}.cue --iso9660" test_cdinfo "$opts" ${fname}.dump $right RC=$? check_result $RC "cd-info CUE test $testnum" "${CD_INFO} $opts" if test -z "@VCDINFO_LIBS@" ; then right=${srcdir}/${fname}.right else right=${srcdir}/${fname}_vcdinfo.right fi opts="-q --no-device-info --no-disc-mode -t ${srcdir}/data/${fname}.toc --iso9660" if test -f ${srcdir}/${fname}.toc ; then test_cdinfo "$opts" ${fname}.dump $right RC=$? check_result $RC "cd-info TOC test $testnum" "${CD_INFO} $opts" else echo "Don't see TOC file ${srcdir}/${fname}.toc. Test $testnum skipped." fi else echo "Don't see CUE file ${srcdir}/${fname}.cue. Test $testnum skipped." fi fname=svcd_ogt_test_ntsc testnum='Super Video CD' if test -f ${srcdir}/${fname}.bin ; then opts="-q --no-device-info --no-disc-mode --cue-file ${srcdir}/data/${fname}.cue $vcd_opt --iso9660" test_cdinfo "$opts" ${fname}.dump ${srcdir}/${fname}.right RC=$? check_result $RC "cd-info CUE test $testnum" "${CD_INFO} $opts" else echo "Don't see CUE file ${srcdir}/data/${fname}.bin. Test $testnum skipped." fi exit $RC #;;; Local Variables: *** #;;; mode:shell-script *** #;;; eval: (sh-set-shell "bash") *** #;;; End: *** libcdio-0.83/test/data/0000755000175000017500000000000011652210416011740 500000000000000libcdio-0.83/test/data/bad-mode1.toc0000644000175000017500000000021511114145233014113 00000000000000// $Id: bad-mode1.toc,v 1.1 2004/05/07 10:57:50 rocky Exp $ CD_DA TRACK MODE1_FORM45 // "MODE1_FORM45" is not a valid mode. SILENCE 10:0:0 libcdio-0.83/test/data/bad-cat3.toc0000644000175000017500000000025711114145233013746 00000000000000// $Id: bad-cat3.toc,v 1.1 2004/05/08 20:36:02 rocky Exp $ // test catalog number - non-digit catalog name CATALOG "123456789A123" TRACK AUDIO NO COPY FILE "cdda.bin" 1:0:0 libcdio-0.83/test/data/cdda.toc0000644000175000017500000000054110165202417013262 00000000000000// $Id: cdda.toc,v 1.4 2004/12/31 07:51:43 rocky Exp $ // Language number should always start with 0 LANGUAGE 0 { // Required fields - at least all CD-TEXT CDs I've seen so far have them. TITLE "Join us now we have the software" PERFORMER "Richard Stallman" } CATALOG "0000010271955" CD_DA TRACK AUDIO COPY FILE "cdda.bin" 00:00:00 00:00:00 libcdio-0.83/test/data/joliet.iso0000644000175000017500000143000011114145233013655 00000000000000CD001LINUX K3b data project &&"E  Rocky Bernstein K3b - Version 0.11.12 K3B THE CD KREATOR VERSION 0.11.12 (C) 2003 SEBASTIAN TRUEG AND THE K3B TEAM 2004102218445900200410221844590000000000000000002004102218445900 CD001LINUX K3b data project%/E00"E  Rocky Bernstein K3b - Version 0.11.12 K3B THE CD KREATOR VERSION 0.11.12 (C) 2003 SEBASTIAN TRUEG AND 2004102218445900200410221844590000000000000000002004102218445900 CD001MKI Fri Oct 22 18:44:59 2004 mkisofs 2.01a17 -gui -graft-points -volid K3b data project -volset -appid K3B THE CD KREATOR VERSION 0.11.12 (C) 2003 SEBASTIAN TRUEG AND THE K3B TEAM -publisher Rocky Bernstein -preparer K3b - Version 0.11.12 -sysid LINUX -volset-size 1 -volset-seqno 1 -sort .../k3bQERxJa.tmp -joliet -hide-joliet-list .../k3b2BiYra.tmp -full-iso9660-filenames -follow-links -iso-level 2 -path-list .../k3b40QqIa.tmpLIBCDIOTESTLIBCDIOTEST libcdio!test libcdio!test"h ,;"h ,;(h ,;LIBCDIO"h ,;"h ,;,""HFFHh  COPYING.;1*++llh  README.;12--! !h README.LIBCDIO;1&h ,;TEST"h ,;"h ,;0//JJh4 ISOFS_M1.CUE;1"h ,;"h ,;0 h ,;libcdio" h ,;"h ,;0""HFFHh COPYING.++llh  README>--! !h README.libcdio*!!h ,;test"!!h ,;" h ,;://JJh4 isofs-m1.cue GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. The libcdio package contains a library which encapsulates CD-ROM reading and control. Applications wishing to be oblivious of the OS- and device-dependent properties of a CD-ROM can use this library. Also included is a library for working with ISO-9660 filesystems. Some support for disk image types like CDRWin's BIN/CUE format, cdrdao's TOC format, and Nero's NRG format are available. Therefore, applications that use this library also have the ability to read disc images as though they were CD's. Projects using libcdio are the Video CD authoring and ripping tools VCDImager (http://vcdimager.org), a navigation-capable Video CD plugin and CD-DA plugins for the media players xine (http://xinehq.de), videolan's vlc (http://videolan.org), and kiso, a KDE GUI for creating, extracting and editing of ISO-Images (http://kiso.sourceforge.net). Also included in the libcdio package is a utility program cd-info which displays CD information: number of tracks, CD-format and if possible basic information about the format. If libcddb (http://libcdddb.sourceforge.net) is available, the cd-info program will display CDDB matches on CD-DA discs. And if a new enough version of libvcdinfo is available (from the vcdimager project), then cd-info shows basic VCD information. Other utility programs in the libcdio package are cd-read, for performing low-level block reading of a CD or CD image, iso-info for displaying ISO-9660 information from an ISO-9660 image, and iso-read for extracting files from an ISO-9660 image. At present, there is no support for directing CD Audio control, e.g. playing, stopping, or pausing of a CD-CA where the blocks are not actually read into the computer. Nor is there any support for writing CD's. Nor is there any support for reading or writing DVDs. For some of these, there are other libraries (e.g. libdi, libscg, or libdvdread) may be helpful. I'm not theoretically opposed to putting support like this into libcdio. However at present there are already many gaps in this library so narrowing its scope in order to focus on these things I think is a good idea. $Id: joliet.iso,v 1.1 2004/10/28 11:13:40 rocky Exp $ If you check out the source from CVS run ./autogen.sh then follow as below, except you don't need to run ./configure. To compile the source: ./configure MAKE=gmake make make check make install # may have to do this as root If you have problems linking libcdio or libiso9660, see the BSD section. You might also try the option --without-versioned-libs. However this option does help with the situtation described below so it is preferred all other things being equal. VCD dependency: --------------- One thing that confuses people is the "dependency" on libvcdinfo from vcdimager, while vcdimager has a dependency on libcdio. This libcdio dependency on vcdimager is optional (i.e. not mandatory) dependency, while the vcdimager dependency right now is mandatory. libvcdinfo is used only by the utility program cd-info. If you want cd-info to use the VCD reporting portion and you don't already have vcdimager installed, build and install libcdio, then vcdimager, then configure libcdio again and it should find libvcdinfo. People who make packages might consider making two packages, a libcdio package with just the libraries (and no dependency on libvcdinfo) and a libcdio-utils which contains cd-info and iso-info, cd-read, iso-read. Should you want cd-info with VCD support then you'd add a dependency in that package to libvcdinfo. Another thing one can do is "make install" inside the library, or run "configure --without-vcd-info --without-cddb" (since libcddb also has an optional dependency on libcdio). BSD --- Unless you use --without-versioned-libs (not recommended), you need to use GNU make which usually can be found under the name "gmake". If you use another make you are likely to get problems linking libcdio and libiso9660. Solaris ------- You may need to use --without-versioned-libs if you get a problem building libcdio or libiso9660. OS Support --------------- Support for Operating Systems's other than GNU/Linux is really based on the desire, ability and willingness of others to help out. To date it's been almost zip. I use GNU/Linux so that probably works best. Occasionally, I'll test on an old Solaris box I have. Steve Shultz has done a great job making BSDI CD support look like GNU/Linux and usually let's me know where I've blown things on BSDI. Derk-Jan Hartman started Mac OSX, but that's not complete yet. Calls for help in FreeBSD (NetBSD whatever) and Solaris have gone out but no one yet seems all that interested. Maybe it's just as well. Microsoft support is also meager. It works on my Windows 98 laptop sort of. Personally I find it a drag to develop on Microsoft Operating Systems and have spent far more time on this platform than I care for. If someone is interested in fixing the Microsoft OS support great. $Id: joliet.iso,v 1.1 2004/10/28 11:13:40 rocky Exp $ FILE "ISOFS-M1.BIN" BINARY TRACK 01 MODE1/2352 INDEX 01 00:00:00 libcdio-0.83/test/data/t4.toc0000644000175000017500000000015511114145233012714 00000000000000// non default CTL flag of track 1 TRACK AUDIO COPY PRE_EMPHASIS FOUR_CHANNEL_AUDIO FILE "cdda.bin" 1:0:0 libcdio-0.83/test/data/bad-msf-3.cue0000644000175000017500000000022711114145233014025 00000000000000REM $Id: bad-msf-3.cue,v 1.1 2004/07/12 03:58:55 rocky Exp $ REM bad MSF in second field FILE "cdda.bin" BINARY TRACK 01 AUDIO INDEX 01 xx:yy:0 libcdio-0.83/test/data/data2.toc0000644000175000017500000000024411114145233013357 00000000000000// $Id // MODE1 track followed by an AUDIO track CD_ROM TRACK MODE1 FILE "isofs-m1.bin" 00:00:00 ZERO 1:0:0 TRACK AUDIO PREGAP 0:2:0 FILE "cdda.bin" 00:00:00 libcdio-0.83/test/data/p1.cue0000644000175000017500000000042611114145233012675 00000000000000TITLE "Join us now we have the software" CATALOG 0000010271955 PERFORMER "Richard Stallman" FILE "BOING.BIN" BINARY TRACK 01 AUDIO FLAGS DCP INDEX 00 00:00:00 INDEX 01 00:01:00 TRACK 02 AUDIO FLAGS DCP INDEX 00 00:02:00 INDEX 01 00:03:00 libcdio-0.83/test/data/bad-file.toc0000644000175000017500000000031411114145233014025 00000000000000// $Id: bad-file.toc,v 1.1 2005/01/23 00:45:57 rocky Exp $ // XA disk // CD_ROM_XA TRACK MODE2_FORM2 FILE "foo.bin" 00:00:00 00:13:57 TRACK MODE2_FORM1 PREGAP 0:2:0 FILE "foo.bin" 00:20:71 00:00:00 libcdio-0.83/test/data/bad-msf-3.toc0000644000175000017500000000027711114145233014043 00000000000000// $Id: bad-msf-3.toc,v 1.1 2004/07/10 01:18:02 rocky Exp $ // bad MSF in second field TRACK AUDIO NO COPY // so that all CTL flags are 0 FILE "cdda.bin" xx:yy:zz // Should be digits libcdio-0.83/test/data/t3.toc0000644000175000017500000000047511114145233012720 00000000000000// simplest cue sheet for two tracks TRACK AUDIO NO COPY // so that all CTL flags are 0 FILE "cdda.bin" 180:0:0 // 180 for number of minutes is okay, although // it is not for a second or a frame value. TRACK AUDIO NO COPY // so that all CTL flags are 0 FILE "cdda.bin" 1:0:0 libcdio-0.83/test/data/t5.toc0000644000175000017500000000013411114145233012712 00000000000000// test catalog number CATALOG "1234567890123" TRACK AUDIO NO COPY FILE "cdda.bin" 1:0:0 libcdio-0.83/test/data/videocd.nrg0000644000175000017500001202151011114145233014004 00000000000000  5arb#g5HpSt.B!V  5arb#g5HpSt.B!V  5arb#g5HpSt.B!V  5arb#g5HpSt.B!V  5arb#g5HpSt.B!V  5arb#g5HpSt.B!V  5arb#g5HpSt.B!V  5arb#g5HpSt.B!V  5arb#g5HpSt.B!V  5arb#g5HpSt.B!V  5arb#g5HpSt.B!V  5arb#g5HpSt.B!V  5arb#g5HpSt.B!V  5arb#g5HpSt.B!V  5arb#g5HpSt.B!V  5arb#g5HpSt.B!V CD001CD-RTOS CD-BRIDGE SVIDEOCD @@"N PUBL_ID GNU VCDIMAGER CHECK MODE SVIDEOCD.APP;1 1978071400000000197807140000000000000000000000000000000000000000CD-XA001dTa}nVNF,:xb[kôx x-z{5d\gK ;!RE= 2;?:Yh O;Sٸ3!CQXܭjX`4>a5t@K(B >ӼxmnSS0=\0elg?oEBR_C'B#Dqj*W AcDxlG3|9z"!EVwАD`CD001%0x oPTU<Ji`PT  ,DQ/"31S`~kÕɭG0NUXA0NUXA2NEXTUXA4NMPEG2UXA6NSEGMENTUXA4NSVCDUXAE)Dz2{@AEo$뜇9aVYѣSLNIDdH| >ci\thB{$y. H@"tՖڕ7a4X%YĶDt!^r0в9L0:?Id)B褽,(b ę +,J7HZ `}lDvX=Sܾ:]9W@G=3H-FRX5vH6g640NUXA0NUXA>NNNSCANDATA.DAT;1 UXA0`zzzO{fe qrxtLPW{{{.MS|3D&SZ#ZйJCuD:`5Q:t)KD7Ptwqjc@k/4 /45"{0? X$ Aג=A.ʐeLsʥ.B\u<0NUXA0NUXA<::XXN AVSEQ01.MPG;1UXA<XXN AVSEQ02.MPG;1UXA<XXN AVSEQ03.MPG;1UXA<XXN AVSEQ04.MPG;1UXA| Ymbm-j|_|aOhXglDra/fxV(+ *ms֑Gt&QXU$._ %frC(J)xTU! rH?4973Duh(_U֎j:=O!#8 :WWEUe^yVN]KݛU;V#o-(ܚdbƪNy~bե\I$yNڙ80%זS Ě0NUXA0NUXA>NITEM0001.MPG;1UXA>wwNITEM0002.MPG;1UXA>  NITEM0003.MPG;1UXA## CplG-Oj3)-Eo뼟_Z6NlfdHvq h|σJ듎## կ&(Sd4~@~OciHfw",,nZjNm/!8v8ZHJ:i7σ-F: Gg1LަY r^<ĥٔm^KlYߍݭϾy̷MDf8^8}l^Z3X} q}iVhSőÅ-,0NUXA0NUXA<N ENTRIES.SVD;1 UXA:N INFO.SVD;1 UXA8N LOT.SVD;1 UXA8ppN PSD.SVD;1 UXA<((N SEARCH.DAT;1 UXA<N TRACKS.SVD;1 UXA4EH> ?S൴v~&,"z_YkFJg gȝfK==ܒGH,rMtb4@T{5 {n[{+P-erP!]oLaȝ3DBytndx<9hBxx:72<.+|(SHpRԍ$v6aeh^CU҈do %% @,ΩRCS~|0( ?!rjP]Klvh@,`@`@%05$v -`fB=;lЀ(vIټ>zM0@bS%W4`(_S=   1$g?|*d|;n<- *LɅђ'stpSSy&5[է,Kg Z8RD^'zV5gRJԴpn}u”JR"+})H"*ՠ;H^)&ྜESbvۯum<@@C i{~7H^Cn|y ''[qrnz;IRC\~E -ճ-1k@C@BtVb (6t4Q,HK̇`A_AhB3.*4 R8 Q@w*!@aɍܤ( ϙ;nV9JǮ M҇l`?6T ^v`a] rdpsz:Y/qIGpvM ?`š IEBS~K1(X&.V-!{$t=5|[`)a콳=j]0jOJm%clQ$nw!F ~r "C('l~͓X+I ; )7pC -B&ޔ !/KĄ!CBY~V:/! -R?o/u)=!Z1K'㳩 (Z:Rҝlvʰ jl{aw776Þه PP KF,0cF0%}pӭATL KzSӒS7N~su(0(2 ?灇7sT % -|3HHӝ=g_ ; (dpnHa'[i 4S!$MĴ^mj2;#mmc5{ٕbb! ћQW}Mp> `  ~Bٖq{j %s+%A }_3e!swG^ :fHhi[+) R;: Gvguvj 1ӰiN,Y[HB2Cz2;^hh ,%(M3%8b۝w85 0&t~fܴVQWT5;6 ;ʮ`ޔWJB[/q N`[Mі+tP0C oI7J4nΫH0Idn Gc7J6_{_+~ !);gvD2Ɂ;>+W^+А{mR|'׷o:JU)oNM NI0fmu@\إ)rD#})H".RM1 d'-)9,d'/qdH@ #D]VV @1(4ŀXLKnC&p$QF=*(9)M)p4}zQҴ#,ԄH62de°8R 8({g\ELf^Ņ6);|f rdoBPJx0~V2"A 9bybBw~9/@tn/p=Ī / "s߷9rr ncFuTi)7H!}7u{i- m0XJJI0B+줆֔j?}C;J vED_lJ C@`RK,AU;Y04^nw^q0i៱a^&*B!'HTQ@(~qxHB6"J8`f,7u~8}KS1h%8 ;YJ/~8c/Q{P Q~y(A(Bpn1cr{#0ZZtEIG Isd224D4Mђ~8."aaΜY5 8]H/XWԓS?P8|-," #})H".VCq0e]wԍzplX'`1Xb,}15$xp ]܄#?E=?!."޴LA(1@ u>y03I산7Hl[oZ׾/-_ؤq;FubsEC󈈼&F'!hI4f!/2?=1ެE'm[wnhAH `2Se#*"B`+t)ZMIi70AS, ,EMH Hm&k`3IO=A@' BYPjq:&!챉A(0rxxh@ IA ibu9)$݌d' 9ғ@@0jjưXޥuk 't}3:jB-$?AxpKI3t_8JDMnl%bXbG8r@0+dS| TEI`(?iN y5$( 'W:)ۿ+}Ey4[|ɬ9~di4^0 KZ*(^nF {%(۶ ;k\ SzK%$'s^C> 5(ZJ?CZxh!TbaAX}DP)N3O7ݮ >}ёjW#8ln]=cT84QHጽ- 1 X` 0,3Uq عMp$8&kDEI@;;s9 rsQllqc}`T uZQ I h3\E[D\)})H".]`d˒פ C@:RfG 0bC1{dae'nv6"00TѠ&VT@ @@@vM!C(L!# 11l@z vbb!!  /0(y4? :!(8d 01 a@(Jr0A7 ~66@ߗ女B!0&=*C'G,S`( )8az@fx /lYE=: 5#fC2Ӄ){}/1 B0ܯ`!tp p!&bRHx(fJx v@f@CŠ&%$C_HGJT'nbaAܖ>b%!9!P ɥptY7Ҝѱ+Rۣ4@Xh p 0&Ʉ0(K2bvOΞV1 /9~TP :@tQe#ZΝ^bs 5P2h BP+t? Vo+d q4 ļcbK,VBHGC?)"?milQ_qH4H^P`W{uy vJ (03o&^G :8f€Nq0i 849lZv)=) '9Ev o~t~2 D*C/PfJVm͟@vd:0 2C t @s&f@?4 ɼ1 Ѫ!JJ0vD_tԼ` E7!I 쑀Xuq׈+l"X0q4 IdgC& D6!v(aD(db`Ƨ|I(m*%Y4>FXOcGJV +%'>vu;1&VsNcgd߀.&MAHJr~?`>" 0 dǏ'`PagɈ&_/-JNF&'7/`oY@^hC&Hi1Din?wq 5F =P 9J d %l_b_'#Q d/ 1ɽ$.V,g,iJs^P `,AIK~?)g7IZH%JXb0yx}{v 5$0RZp @0 lQ4bP3 N&,ݒniI&md3/u`M :R Zz}ם7G?ߛT7m٭`&+qNFҟ߯vnu\$ &iy, ` q,1F%M!0NxU O+'aJ&)%*{,Uz`Xf)0g@1Hi``J/? lI:>T k^N,x @ d )=#]rӋ (:x´p Kaun'ho۷ݏ@<7үc@ : w&;d l".R })H".]Uƻ Aܨ%ip_P~ i X ta6` Z@7AB"/5-|_ 8BRJ01$ұŕ"}n^W GxȜwÅ>Ҁ.Qv8͔N'\dII%'А`% $1G@<-DT} 2pakŁR@&6X䖔~u44 $/ܱ -?mGAfV]Td$5?M8ΒR8iP V4@'KrWIE|5 (" ^@j5&ZK8tK%I5Ͼodr4 MN' "g@d, G%qBSϷwSe¿Zs;)g^ I;l/;A\0@C0`!P pjI#pew!%M"&ӂ8a1̀($(7 Z(FvNtI|Ԡ QB߬[:  C+d:ְ*4L̼ؐ|a 0bĠ 7s/dW+c^#\ ebQAG# ;N|H`& !#찂3읷S&"0b܂p j6% !Xo_\P  x @PN {4ntN~77LAh<0  ; (002J!7$5b~鈿t}4jM` h@P0@ ba 0Y/ QXaE,mh @0@hXK@ 8 &A(g&#4`bBQ Z @@Ln`!&P H@P`$+ɅdְP \` J =/$t a t4%RKOHnI@c"`x f6p @rh` 5#P⳧ A)`z&H`C!2Y81#@C} @ : @uD4dX<u$M, !c[_ =@U;(n * ɀ1&8 ` Bri YedQaL& /.8 #8R4X`dth &`T 6k1h/8DE<".R })H".]UƻPC JNH`"Y>#"` qv@ @&$AwD0P*X 3a!Ubb!. "p20Q10]0C,EGz BD^8,M y0HJIdԳ AC NZR\Tɤ Se{itZR a7M/vB}2qhfO# `:G 0[.0OJRݛ0ha`! $n/;l3SJhL@;!L!-*'d q 21t7 @c)&IN& N - ,Ұ/mx`U:H/v7 3 1$tn(!Omàbpg!H}8  ,$҆l0r~tL@oPO(5?JNC ~-^R@q@SB82|mɿroOW] P@,5C !@0f%@1+/{N舾H@`Q5a )9o쒑rJP7P>- |CFܢ /A?dɋG+ٷ/@PcW0 dI4m 8@-v1_`$4j147d#y[Q3|)g"4AEoNcwsԀ:;A[ Kqh QCԡg7\X,+ u?a"  @10 @v`Q&/;eDa$3 NHG|!(o` =J@I3 P(L olߡ.4q^"(@/ #&@NX@`(L%0 R 7ho ԬT @@ @aNj5P1n%i6ŠmPѥeq@\ ZbrXhϓ@~TBDŠ/BjrRa_pA?x 5/b@a\a#7o&=Dݘ!Bd6s@E` v~h@1,1%by7B!p``iAޏZ{! U&N`0 |PP O吹1S8aoxh.laЈ\ ;v= @NĆ@p 1l&PKnjCW߄H@  P;iC;I aQ0NFKxCH b@W|D"  })H",̙&d.tR{^@;Ad,WN1-P `:&ɋǁȀ^77&J7ZÓ@|E F<~3⮸\P: @Ŀ*j Q4ɏ Q{^Z9HWJp=/(phyȉRFܘi3d/~ 8 2o(440>AA%!!%#;lf7RXa0PXx!]fK>|d> JK< J'k:`@b^ &(HiKܴ;vv6ɟo?}vfqAPaAB6+ddv!sN=%)GFzbRI{@945~+}iKmm20qߗO=xͮ(@Rid4 NvLcWi@o/LB@,b2tώ0f) mh,m{d\ECQ5(5!Рrq0PvçFI`;X"fdk`Z/\vc7 ě]E@j4[.Blzbb!8A : udTEŻ0|"ЈJR" })HRFh]``CI\fq#Qڀ լTQ+֥h !0yAFp3: ipVA$!0z !1'y@E@{4_uiB/A$&/爪} bX @|4v1-YЇ-4nr`!  RRy\Y(vJ- F-!G@퇵԰*5e!^8B1d2$^VA'&a4Zgfwe޼4pԖy(0aجn~eC aeNJutE$f I`'H&aYXnfUTB $Q|+91nQ Lr%;M8oʻ)&Ald4EI|WtZ¯dJ8(PCIe Zf U{0i Q0{#?l=WXLzjM@nBg & Vb`Ԙ\ܲ|64``H΄%Xe;:ֻbZ@Ą^dI^72NSmg $i\Q3 tt8Ao| y003뤢JAcz N[00@;&Ae ܖWXԶOvMǀX `=I &J-ÒvD[ !Ӻ GO@#oYPd2` %J oƗ@Ը7޼R`/ά߯Ao _Ōâ/`x /I(n - ?G춨!!A J#tz] +0/TP BJ źI_%+dYw,@3Oha fCI0TEf@D!Rf+f&btН3~0 |7p|HOF+7r_oײ޸ąfrH ~) @ p#LIh-`j#|㺍d0@lL!ؖZ!%!;z!  :JKQ,z{R` 0T-0 >-?GHFPdR|  dѬD;(%8[9!=zp `0&&QIJK&w -Ķ@PH@OZ@?@@O^P9!=i  ~"Ԓnzzj40gY@3,ݎqЉJR" })H".] 5 e=Ļ@5 6Id0O0*M 8O$|EGHhf@^.`p@ @<&Tb, CFԆ K,=i\CP᡼N!Cx07%ua @ aL: *R YE'Y_'?ou @h T GGM BzJ7ݽj7`ЖV~ˈD@K0 5!b@M!Z@BAdi|@lOf@6kP&x@Bt_E &2 (b7 sҎo12@tlZW&@!K%㒎gr"@0zF4brpIIBs'nV0"a @aHR2?> Xg?}ӶdJ új3'vutJ %ϖ_+Ut4 ! '!%ЌKO )#r=?@A4Lv|LbHoņRxbphmpҝD(ҍe%S'QtKL0`@P5Pb1El,i[a%k  xb4$dpЍbb!A zB  @nbC@N@t$ WK%+~{X3 ;l5 T1Ed+ mgˈ<$`xxb@b D`X RYA&( Fvo@ @`T !d $Lbg0`jI`15$xk^Jwz` J EB~IE8l'M.`'&KN@h`t9 1I f @@V0 H*tp*xCd'oѓ ?^x@`8 @bM=4K%Rha0 f٨B- ~J&8`߀x8>"@1,'p` 18`:&Ąxxi4J! \D037p0  P 4x$&(-U C0- HxidĤ cI1+ziyq@b` 0 r@dx$&PT$ C0- Ha%.z_f1&d`? 1,@!p`M- $e܆  6!;k@5 bp_W@aHOg-QA( P `U M!YAh p%_@@ NG~$swG8ĤZE@($"j`T\nH[5olb S ; Ġ2CSR1BwE#@bhAeɉ4-&R A `14Ĕ+- \ތ4i/ /zRa, ?( NTPcnI,sR @ٺ'H0R`3bY4g~t쌾e5  TB@jKC?`?:na@ 9 &h#A0 B\jK g,fG&LXhj@fOOB#CX]O0!/L]/i_ِK= tq`  8q,}X @`h @b`HCK!%|ܬB ~f~I 0bԘNɉernnPtSlGZ{e7 = G,_@:PonJBIĖ ))C2wNZns6! @ @Sp1ѝn\4ɤԒUhA, i/e-RnRz0jJ,ݜ{uT\V@ ) Ӳ Ru,hg,R |PQOهa^o)8'U447-%3%)C?O@vBɡ+sa[ސ1,(gidooͲk r ! F)B2S- |Ν3{8P4C(%󺖢cm@@ 0prӆ 3PА{arL5 ! 004u[fۀ`o9x  ) J ZxicF7ug2ȢaI۹xicd HdfJFnZ ξΟ`;C&~[Z l<#ހclLM- O@ԍC>H>4FHCiAJ@ސԒ/+_ w`bb!K at,XhV|1lr}P@ gf< BhEX1 *XaEĖy/ Hbr510 @@(` b@:  Ph0o)lѪH30W@kf΍Ksc=?%X|@i03QȷA(1@T0@&0 4&hLp.@PRˆxҷ@ @A\p  h!'dɄI JR4SE4BF(&2b MHjS@ Bؖtfoٴ`0/ Ud I3sZ@VL04@ `hP*L&Tɽ.~黸/4!'`lX44*4HV) (L%VσPh/I+@Ri FŤn$ұ{}ۡ/'5 [Еdu܄(3 \ bR p*CC@@MJܙM9IA (7;Ddp`f&G&dtY e)ѵ@0HAHNMPhA- :Y/nL5U>, 3(*  0 C2H` XrY KuN\EEǥ)rD})HJs,8hRd_qntp(yDԜ5"' J̐Fd;sBj7zLซYy ;&sۮ 0>  hZJ!M&Bhi Ba€D%44ԧ#|/vL%7L W(G1zX @1)~b`!&;,`@x:7#rZqXcH@X @C@/945&i1  +!hY dgZv d 8p^\I`o堢_@gܤr>4 p~ 7 @ @  N`&8X#1`1P0(ЖNJ!4 b̄0 *(M@'i( BɅ-11 3 W{b1szBt,oI-d R ;~ߏR TA0 @ Ba0B& L&(?9mЂ 4-!2n!1 !̌L,00V(4JRy ɟv/(]pp]$0`iewN'}^{ @b0 3fp @? 22ZJ 0 +Y5Po,n:P P @b; iA0D"jD(V+VFVwuwJb p  IY bR/(ٶ?F@t 2&B'ၼ4W+(013nZ?r "@@'&M4(RfRܮJIiI{] pP P2K@:, t A Fl)Jy-?)) e@@0̚C  &4 J- ZmY3g%`\jih 9)%Ѯǿ6M?\ &@ JRQ 0Q0CpGVvٮ`x?,Rɠ@Id CY=)I1%{nġ|s0դ<`J!0|PI'txV_vD @ TT:|Q0 ZK$XklL&o qt 'rlL&=1tnV&~%^DhHD bI}RZZj#|zI= bb!Ta  uP@A5@ B HH0b!݃~r V A@ d 9@M2Y4aP+ܶ2jH_!b_x2rhfB5;w)#>Q0^@00H`1,$DĤ0aCJF e4599(P!5 Cq4!X5jB%0ӱd|x!Cw=<f Nd!)#Q .7ɀ  @5&h04d93` `RF'9 e6T '!. dk`bPP 56+% :`Kr ƗhBQH͆Hݖs/ h h@ A`;bjL,ohMAirhC@zwNF0Bb) 4 Bq7D֔fw7 %@ C @vYa%7ٳo6Vee  peİH ,Ā蘄 $g.ZnnL!! pbXB bErJ ܾnP3rNKH6FbPT6'}p@v ^P:@b%44-%(K`3.@Rp \404 eK, & `6=w'rRiy9%䒆%fCcC0R]@@`Ʌ?+kx$'%QqCirD})H".h Cu'l*Vxr(L'X@Ԉ `L?qz0@¸ P욒f Ix4ZC8N0A߀v %%n3߿ôʩPL!P䆧5L ΫY! WFb߲NKBנ`P+L!cIIx0 6- %Q%ll@ zJ)ebhd%h 7%=0a}F=u BPN+(p@0pB?(d/C8: @`)JIXԗz2Ys)wLDX@'7bD0OBC`ݪB ]; Q.W3$Xj8j0qt!-JKt{J$mɀ@') WK,bKN-< 7!)A@PO倥%V+k(@ VpQHG0`)O@a|+n;c -_Ajz0j:rw qa۝"dXpa1@)$,XԁiBF!;d71$MH%`{lҮub<*@ 8 ` p @`aZ>tWt%{  0 0 & b ۀdž ,5K>КJ5#:u,H7!p _ \jU?( $ zIEtdwct|L,ܢQ\3~5;λ@b0(f&Ryۭ]@5PC&(&'|Y !8ݳ fF+Z:#߫-V€v+tP C &|+equp dǁ^MBK #!BoN`d PR K `N`X啺G(3dw= 0 @0SPh9pSj!b(Q05 U` 5iN`zؚ (i/~Y+#l%1GޜXL! 8i,Zm%O4JA Qbb!] `&1_,@# @dR".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H+})H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR"+})H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR"+})H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR"+})H".RJR")H".RJR")HSDXޚ"֑EGB"#DXER)ZGGZ;B""ЈH".R:)HX^ER)4 00/sw5 ' &kts+ӓ|K` ou|_XpF&_LM!a`1%wg;vy$ 7&ɣa֜>,psbp"  J, bb!g! @ KJ!4axOG|d^C4Q#уp1r[=004sw5 ǡ(ىG]LirCv$|RWI.]^YT-.<}Y0>1([3!P`8GNAk퓺?uI! Ɗ(1( x <{^0nˆp0ҀMHTy|7c @N N@pӂT|G^L =n3v*!0`;O4AQ|fYY)K}*!)OsCuA JŠBq7&R6S| :)% +Zs71M쒜R1N}3F#\mm} @@tB D_:  @H Ġ2VAvazhOA3;2!$?8Wty0^<%T_I{OKa9w Tw;BBX_HO&m1%|/M&dW^M!~QFl%>$g GyaHen=³> ܚMa_̥i~ȄI8$_ A5w@@PY+s7_r@0 $y-(ԿŶ蚔R$|g!OD@ ( 0 ~P2%?71!@w鲑JO`;&6 %pߜ#3?/潸N(r G{EjqWR|FLp*OR9y@90X"d4R ӂX̰>X?!IA_~^p7Rz2])!Հf,bCx2H`:&@;-x_}(Ok@hJ&`L C,P~z17 s `K @_ؾ^_lM  YafIINrjwoݯ@0 ϰs TM+B^Cb |0dɉĤte ߠ@5yo)p1S + v9^Խ A ^X |LH5TN6\qi&>R`%"y1 w+UmrHp<5M&~anC@#oB`0H2 8oRg`{M G>UؼYD4t n7u)jΛ@JHLBt -"FۂHވ@T+.fNVjl~WNr]?:`%3}`+qCRM/''m2K~eo|`\ڴ@L8:@vZJAJA]zKF1o#/uʱ٧02T^<@ @vC&섥ƥjc^2bb!p 7 Μ%}rCId"_O V@hzRɈ,5/tmQ4 ܃ypr,B HqN8n@`|a#_c>dlZ@v^Z~i`g%%K=wEJ)/(M,5uEK7m@ Y$ѥsȔ*B A多LOu_B_ow{$P$41 /1JS{ ("@5lVgJG2gDΝl97&/j{JD\)rER)JD@3})H".RJR"6@D `z@)$g,f !?  &!+!WlUIx 5J^4`\;*,  Q:z~1P[|BHͽͪff/!E0xp_#_]M-$&j~ B9g6,@`Q^0gĦ֞ ^` ӹ^צ +I̖14 b0Fրb@;HH 0Nnֈ&gI6!yWՀ9?Rh, 8bI(w})\lM9vِ1k7-p@(!P{;q> 08%~p"@"@$_$ b*R@txPy4 3 pl tM!h-@l 3ƞR7s9J{@!&VKfg>[D:( PsC HbD'}(gwe*ءpW=PB( |D CPS{ˆI! @ V ܔ(-d(!Qr.:)2~OOYף?,^+K{ X 40ϰW\R JCFۓCAؼLOG@F&tƺY >~׉TX  h"rQIBNWs>-F]]t@J:'h/9`'pIy0'8IŠI_Š\./Mb/'\`!) ,c F~+1)0 _(0xl_БB ݖG@@&noA>PG9@`Q\ Y@+ }A7-zN@Ilr0ya\?q`9n pY &+|`i4=[,A)Øx=~@bPՀ7rƌBF`P D0Ao+{l'"&ï$ @45Ԁ V@ea43{_sr%@ܢ,ΫWV7&r`+sJK,a|e}WCWhT;v8(yt9) O 4K~ļNoSMV+Oх%k 3 I5)/bxrIWB/rҥru  ºF(1 /֎'s QhbHŎn,/Mu@ R0"ljC\g?8Tɥc!e4Vg3p> L(i|6I{1U/$$@ƒ R AH'k_x} ]GT - fo%)t!|7]Zl:5/4xe\G"klԞOYvhatZ`;%bb!y  Q:Q5 ϸvHhZLG f|V,B:ᤚVפVi4W8KDOz '^xG^#bw&M|!$n7b[|k~N!Ҏ)deC JIcJ&!`=]NBqr*؁BA0D`+H`bw B =5 %(/^ ;g valzoNeh 0Rh$=0t?&|3B(_!;(b0⺗ %\_ (%h$GzB !):8D3u|R3Aify*E1~﯀)ie g'xR,!/#V5&jP+'r} n:$ Ii X c ~&nH0jrỳL qOt N؋iƽ !7׿ctzhR")H".RJR" +})H".RJR")Hb,L.BJR")I!=xCݐ1}" N'&xvtIꄆZ41B0VRRq%C5Q4su&4I+LddEK^gѿ^{|f;=( 7_N_w ( ":Ut1 렂b^"$dP ȲyQCV$B,ttEM~IP.^@ b H@7vR ~gc9a|dQ4''sud_A 0k􀀇&O^+9L? U|P*Pa'z`I80:@؞}4r/lLG 78.aX?hB2S65cEOg=GBtx 59 n#xkb?xfczLn*RYa>Wew@hZ8 !$4؎Nɉm@EO0&)Iǣc^̌(c !üE)2>"\ʻ.IBu'l}!1@osmgULE 7{}`x+d]_"Dt=!Hic,RJR")H ;})H".RJR")H",Ѩ %E ^/D]T%EG$ӚLE g rEm{1  4'܀ i!ti'c@3&  WA$Ѽbv"ϒf?#ЁBzoӑ?b@p*m@ID00Ma Ř^1fםPװ&ĒyFCpp~LG D^Brtw}ootaiԞq64 &v'+DT(d!);aYwEɠd<!=s@`:o <`,B-gyHW6j3‘͇h6*"w!;&䘶xڊ=ݖj^ )Ɔ}źHᆀ3`(8 А Mb` ;PEzPvaYbžC9 Bp̓Nc@\E,=$ LFw? bpS;TBEK&=)lJ (?=60hJQc>}^rn;H $fZ0}=Nt?Ma hX[R>44EK#Tabb!A jD]6@263KHHEl;B͇hQv} EER)JD\) +})H".RJF")b?-'&!\ECvCS)!:.BZEp"/K.P1Ii-:#mxFD] P:3i".[5,7 _XR< ! /Ln@1u@#-Ό.jC9Z ɈB`Q9c+=* R[p%֎#g~P>  ?VnHO4sb2:;"<`$7daf !]+OZ-&|Yi i`d G2"Ab' :dEbz$i[bV"@ގ Zr0~&J&`2Ï݉P1Cx<dFa=   oPR:8vLa{[H㆔eA1 Y=wQ>"`` Sua:H9_ v'ל(Q5%|Yu$< /ozX B`0PR/ZbYws:&4yܴ аHӉ}/Yt@b@W.\&C;:"1"/xe8 4 _H` N&p= 0rgՕ]O̎b>_~zdtI@G*$PJz<B2 3mzz+*~Vpqz0 ц=3 #M;JƎE@0s;=- 5כ>+!d >xU},[ h}>މR(5 ;ލ!((`jPxT ,+uq)JD\)rD +})H".RJR")Hr#ތo,>" r :̋?Ib D]Oܴcn )Om" G6bjq0 ko|G.v_ <0CWF%R(-WX@i|3/jFdd;~WX~0hhqýQ Lj: W^Jz>؞WdY-,;8"XbD^o{_ Ѭ@D2.|EWװ`PT$bu@3$АCKg]bb! k  />F.AHʜ +v(҂ïhM&I%XaI,bR҆qə1Aa"[#mV(`S G,ϱzzB *(X7tؔ`}*wy3ijAIy.1{TPHa{DTl ~>NjBH C)3`T<4K)j;."P ٍ#A! OZK-Q>";~2R@ C p0.{E{_=p@')8}3"/r`jY8ۄܛ @20(J0 PL Ek!(tH @h@TlL)/Ɩ_wO6"P?'Y(צr Aר@?ri_Sv2 H Rt^ɡlk,:&f2@0Ѐ]  Zr Hfy$)5 g2"_>$K!\=y^L E;u95<Znqܿ/ .`(TJâ/ ͱwWe&up~gwXY,=u:rz/BJס&:"֔ER)JD\)+})H".RJR"ZR"RE@1̘ @bCQ3?cva7!/1,D0*% "  'x/&h1پMzDXǰWBhBќ*ߔ=8 @ņ 1!wtqlg`bP H\7VN1s/2Z'G]S?m|10*HdE ut>!l5=;u9b>LQZxG8@ >AD" &=& Ԍz9.πj %004DYr2?8'"@@ 3ѹNM)G (15z~"4_8!A $h %ayvXUH C 4bJb&I>!8x"G"*IB ub@$pwvi0JA/7؀LE xa T1 ۬srr~!Cp9e/`/ gI{'|'a`,ei 5J'*zC eDn< xAl7g|wp C A)HN7P}X `C!RZ22n '뒊ۤsߔ 0I5<4Ւ[׭ 'ր?@jៀ`B/G)Y%`r\v1(1 )?^;+B1ر[W9Y}`5X{3aD`*y5`HA9| \҇53>AV|Y(~wް4Yc @!%φ~zi `E| i K假"8& ,MX @wؠ)ٗ|@' (n/$=ߝ|A~C.ʼn1˃@D ZNĈ}J*myD)Ĩ}4CG<8D_(0 -7o1z\bM& aa@!&-x~#"D_@I`:=~ƎNn^t 8x}@7!Eڐ bp#7`p!>FVtk@%si>)_H7vٹ) j@@LŠb/n5{>} wݥbb! Z @ q/w.!t9Hٲԭ$C.1&n !~tpǟs@a19 d؋>nL$ OkpPg>h8s184Sda#]bNx 97f|SpMA7pc[UyRѐpDhPP(Vxw Qao\M$^߬UCS[`dEO;/ Ri G~LJ h,uţZDz hGIQhŇݤ ӱ- ؋0@t $= K#6UD_]y%o}HLE\% خY GbfJ?K$@ /xi4$ 0W+rXbByaUb805v*Bāba0u$CC ΒAFVt~I0 2 CIT HI[+ ƸP` I`\1 4 0Rv_<dC0`%PK94w^q@T4!boJ眏hš( @L`Id%Vʈ|`1&?XvDQ#4t1Jx,7~ f'UJT$ D#W @`(7X{wlw=)Yb,E bhi;vVX]!Tnv¤s;E^_O*^h Vad!V΄|}#g a9:X5 Q"C$7^ @ 7hIHa$;:}D#pFYюq|Q|EY!M䤄+q4!uHk'ty b&/R   %▞,͘־`bQ0e`.B/l(_A'>Cv9%e̥26l)W` @p" Hb:v%'.Xgt%(h`0d (a ;A(j:wƉ@;&rH,IItO;vJ9GlibbX&)@v TP fg (kdљُt (ksa45 )1L`V !P@(f 97v! D8X;x\#<W/,F!n^{5<@wքq廍Oú> `<|  +gt!oEp % PbBc6`0 &0jPfBOXk͐ HYށYaOCHi0NGq{8,i@RCr@}b8Ĺ|#EHp:9h,i $7+3BY8Ʌ.O8DM_DLI),:8G+!mPpY@T d,NV>NqA\jeaۚ9dNN C$?bb!a [4EOxJ! 8:Ȅd##:NDy⎽ Dy])H4{M뼔}|pr^kDjb/t@λSGLE32[ƧO]D?wH:":JR")H" ;})H".RJR")HM$܂TLE :t$ER1;ޑ$ͤzDb/B:l!cI $_(GX-::r 膀+H;-^M A4RNW!#y)9ѲñZ1bJ@W\G$\X =ȼZ"a78Fp~JQ_<7 RE08b}InĞ$Cao6_e7 1@xb/X̰ HHFߝ-u0dKt:6Ɛ ,4EYa'qFuBa``_9,YJ=0P ā؊` d8A eVPm @ngH@c8x5J[,Q3&;D^gnݽ5 .1[9a!B K"*l'`CG?mg@@Q,*ӄhḚCtbB‡ʈnpΈDy%u$hEBIgED:HV 0-"/_!h)tDb".RJR")H3})H".RJR")HNᄛa&"GI9GIf:ZD[H,yFIX::-wpaêkrEJ|R ^d ev&@m|`@@ĀV/b>00iv|_2қ+\iu:G00Q ]icIO&R `rGmyOJ ieMh ZMXV30/ /"V#dER-D;-tE(`COKД}`R؏/bsrr2n8۟Z^7+*"v#oR'PQ/;bj%!QgDE4,X:ٸIiJߟ`M@WB >'8LEKmHE_&0"Փy0P"04~Ν:$0q ņLw)$'2Q*_'z?e64 HiҒɊKu*_W SczmĀ7=XܬdaEQ /݂: ! PGaU pEK#m)Hau A9מ(.R#LZr5!|uB0>!߳Z4C@ Shf@g I`پ0 ?gw_7]CL8N?KM͈𙥈JR")H" +})H".RJR")H0r@bu&b/ΔHNQ#IrEdz0՗pG"@s_XvbxwjME@H].|ER.NH'D_ xKSJߑ= @@Wf%fH~;W< \0a ; VztT bb! - û^405!|M: vDI%Ak10i,Y(}u4 & 1?Eb2rEQ -tE $t(1``~vh)JKIyHQե#v$i J;""iI 9Yiú3ұaCuad MPf}fM"H::"̑wh\Ca X+d7 K$ 3( !IeVL(RInK̨ۖ߷og2̓x I`PъG HR~o|`4!%y;p38JGe d', ~RLs=_p@ )N|COp$ۊXpo,R805EAo T'Rs㾈C!,R74/7P!h#|؅ œ-qPp0_+Θ I&Xa<˰7X$hHevrTyӀnqaxa7[x 4M)$%tu?l$&'n}@Ĕ 1;&^C'?ݲYsKwґ ];&&68R^@"Y[^C1%vb7&PjJţ>}__ io!ܢg璻G{r0hie$0z@d^Qk Kuy/?q9}4-|'؋/REoݺy@#fv;dtP*4 # n[PC5|*CJz\N`399|aO}0 '#CxX<8~R%tK)|orZ BDW F"4"bֱ.CG'2N S߁c ]&*eYaD_ƍ&ϱ(A&cr9kq L)U cbM~f3`An)F  J-Q B1Ӗ94 e$`W!}k`v p & xKrJy3y.RJR")H" +})H".RJR")H0r@bu&b/ΔHNQD\)nY#ސ7,FM|`eLaRM/+o"o"rEˤm 9םk@Eu0;A  1& z4 @Y;6lE_7/# BD\)rf"b& !F_ @P3f,ishaX>[%"I R0nJ\3 sp` y Q=!YiEP`@ 6GHI3ZCRF3$?Șuds?l^DI:` KF`(ϐεh\xp;Q%BA}E85ChD  Cw `bK@b+v&4@ I#m}]*tE!AR,`e<ЌefNJPM!VN )%g\*ߧ,d ԖfN10܅J@k}9 ۶Ywۀ<` PM(fCȳ bb!! x@`@@bL BIP5 )+ah$[R 79<ߔfR-1 ;bM3Q0 IYd 0`t_^ 83/BC3!ϝWGU_ @ !4551 TN>H(ri00`SIJ- d7 R2房7s@@(Mn_^8Ů@~ - ҹ)`ǖU{q@=@@tH d5(gPnGg^;~o&7"#".RJR"3})H".RJR"#^L$riNPBb/Ϡ+ HWr\^7b/h&+Y3֍"+<%2$s :f"cb.FhH'\ۨ{DyuDs@B|b`Ԍ?4En!$yel`}\3AK ` C@ sԋXCO,^b 1 9Ʉbq3r7+q#ļEl0JK&ncve,ɅCq#q{Q44%!?G|(\`, .1-$(v$_b/aGܽu >pӮ44lEǀB\(IN$=0ɝ3]IDa%Q,]: s@00n@GI?وJ/U?47 q'芧٧5.% Jy[!ǜR sFg]2tT'"*̤RN=1 M_`0&g?7`/JE% T#;N-î# #q];@1j\/Ih:Ih:"4막78H($_(LB X Z2{F1Gk"FAst /Ne'`WzpsS & ~[9ęz*' y9{H~*M@܌[b2I_!;;TY.R# DY$4D3`dBi4$4XAQN(> Gpz@{-|0[>F"V)F)+T3.0;*@Uvv9L /ūh/eDYZ+f4 P5".dWIX}.~l=V`U6U>"B& E"&4E)H".R+})H".R R"aHuM"/ғJ$!^QX7uKD^0}7o>.\À38`x t@ u3&"o/&z [0 (b/&Z ;%x&"YמkIBn6:"Nϼ0(5*1%+̚c2%^C:)&~8gE?"3I #JHG ! PݱEÒ6+9XGj8bb! ɟ 0j]|=\TE_:ՈI ÖriKv,ۼEЂhH m*W&5A0!1 (}1d /$'q1x zW+]7h%zEz޼Ji3ro!b`bwWDޔ '8>(-#\G&"T<,&x=` @DLp%IEu ^w"L φDb 2.Rvɤ.WiatEy\ vˬ,xx@ t;``xf*P]j:L P[p(b/( u1>LE50(b/@OwPa$>@(!v6"1n l)JD\)rD+})H".RR"a9Zŵ 'F:" àuGhtFa}xDfm';DEmF@xa[@@DV?B~M!LRCGYy `zӔ8bgqjJDTa@ @#&`I %dĥH察@LdWTnxqC~ ČQ0Od; ۋg“VOl6 N '?BGJDcYp &bvHpBJ3o;` PXb@K0c0Ġs/6I/2@`Y4BBT%%⓿Jveu &I(G HC@@d clݍs=@ 0!CJ+D' V$8` /e^/p 5 Hĥ J2ad/ 7wd5jÀ@ KEm}Ad0(B!D & F쎆R1 b#~l-~ XPZa3'N{0`M p R$4r1[X5s_mF3PB|7$aJIP97` Qa,%$s-+xhb28} CCRYp7= F coۡ/Р @ &K 4`/\!Z/@B ``(m Nqw@ c;n@& 0F‰0YyHiǣ:/┽hd@`QP7 ၩb+Ǫl@0ON!dbQY$nu,SBl  :%^ ,7$C|x @@*BI,05(ⅎ"u`1o ,SJ7xPx[Q2OC/: [Q@xFal:"6Fíhވ#06o;EQ|f( 1fER)JD\)+})H".RJR")H3ݲ걀*DnYTXQ1UlX# ZDacbq%jEёosollEKhM ^䶻 @C2زPP hv~X} Cc ɍi:Cn@\M|0 ,j9C{H$!`Cdv91+"D^` GlPqLM ;|5@jz21%/P?"|G J\\J@ Rp!#gK.D1<Ome׿)?@G@%W(,z7?"Qlu!8@1?x/Z~Fb{^b}@dR;o{@PLOVIY3* Kv@bR?쭻^gHh"A@ @c3Fg `b#be}30(p‰RD_@HB26CvN `AD 0K &V^bbb9IKg):  GDD_zH-5j@L^nGpC@#``h q-= X`a},`W)+q!# 0߅*"jIJŐō' VbGY@4P%xkjy+mĤDbGPĎ" @$u Xu H~DĎV~@$u HBV~ :+BQc!C6u{};'^t3".:")H".R+})H".RJMkJR"[@$@Ix}.BrZЖx 5{C}.=71-!1@ ^? c@nPAEPB= C MRxoЈ}~ԓ@Kȴ $;  jtF90I.q@:p4`.L0gHIĥ_Ӏ = , 0L(0YNk )zZpu|Y-7~@P1ZVm\Z9I{ĬC 4&iJ+~Ɖxz ׆ @%yKAl0 #%eog}Bz>NX/@PҀDB&`eщhX9W<40 :&i䠐ZRa߻;o"9JrSXJ_Ҹ 5@'N@L߅'UA rTҒc]IY7x4`o8.NL(jT LX% 1Ɨsc@:zX ƤMmQc6Ј`@- КC,>Ʌ^ A %Zv  @vo(`f)0nRSߤ' ]. Ý1Fؼcma# ؊C (#@21/c ħ7'P0@w k& (F!s9 @ɉ4bȖ~GldoU]& ĚA1~,|@9A"D ǧF_PBfF٢*_)Az@3Th@,a(Pa$9#3{C'x}D0 ( CIaIaH5-/" `X( KeZ %0]èLH@4 `*, QHabb!A 0#u @0PC%‹@ ]èPH@4 `*, نR %Hyj9e%)+dIwϏϾY KN(u@ؤwe$iI-$`CT_y@;8) 8EX/dLTlh& ɬٱ]=|ͯ P>"ա8@!9'DXybЈ 2 uLt^EP[v"/2fU ")rER)JD@+})H".RJR")Hk@VB$T~k?TEnRHpY// WD$u.WEt4I,GH'kq u9!j[5 NMdEM7(5D$uWF}ҀbL ({ ^ e_ 7=$ p^5 +rt`SZT2Rpo&sM ̭ur< @`M(caDP̔3`?'s8u&h:q 1L-e;r 89zPŽ&2wn#|g;"E to}RMA )<~n5$n^HuA&D]".RJR")H;})H".RJR")HMv(I?tvuͶS/ 7](I1-d<ֆ}17=(}HIH iS6; &p0vζ~;uLX ƶF@6Aؠ0e 7@1J& $JB[JwH|7{V㼯bb7DCA3@VOd`$sL@d"a5(%p!#nvvk>#'$s{%Z!yHdY_ ,a"ba `VX~Ā9=ᆝvszAH{cbpo^B }t'aY$VtM w@N@hщEgǛR=ŀpi)Eudѝn5 :NA~#_@ Xv0@NB3C,;%+2 O HѝNPN yr,-3j!=0Md0c Jq+?xE7nݘxW,t} +HaI_]:0g/Wvn';ލ#%BKa <bP L!p J F~} N߈J`3SanvYa=());~"w@I7bnfµ €+RZ9mVC90 Rv+0-' ~y9In|U%f*Tñ4fbov11|J P3Pa5;vg !Xhh}J̋7@ 0(C (4QhidW$!"3T`!d׹ N=@T x) BvrsN ]v*u}^h +%!+"]`A4>d5E_%ynkD/r`츊XB&=%bb!ס yZz ]b/oZu4O:D\g}C>B$^ϐE)H".RJR"+})H".RJR")Hm$"M @&"] \ۢ| u+;戱iYI-6 V~j00J(-!r} hk<PAG ^1+g@1M0hPo @a-8~ g6` @*HoWK&ԯOO gF~m;'&a[ u`pf!)L9O^@HBD P $\D[bM @+&ߙNf1 i Ǎp@wۤE?))[`! `'I, ;$`R"Xa10b %twΞܕ!UT-T @0W Z- }hn pg4xЍA`9M@iyd՗x ;P0 aCq("h svyX m/ tďGbu *-=هV ,$Č,47qĿ###ڧ'bKC`%"m`& :kֆ Kp5 AqgyR ܔ<B[X /P@ xK9I7Jhf((fD*O;lt(ө؄hd-%H #HmUpbbQ@f ϟ~_~NA>0)=vjؚ3=tl:?4µI%fߛF-J7BX{1иx~ * i/h0XJ;H }!vMdr7 ̄h6@8@;H|~d `o,8]ȅZm_ xӐ"9)EܚZ8{` #`,)bTh@;BRݳ1{p `k / ŗr!?U/7H[x(OI}?M\p?B'_W~X+Hcp&A f"|؆|lvfDX~pR#IY䵝/ŖzR5ф֢d,Myrt, '%؜FPB 06@ܚ$j@?ԝ!O`d3]yhH+ ' Tmb/UXkawt0Kp⯲Җ );õ03qY 5?nv o:%Hfb_$OAxa7BV_=ո}d+H`!0x")v%A"w+g(e%=|:@PSBAl>C@`-ُ aGwi{?lU{`8Jf=߈ٵ&B dF:(lfBR5 @00 !)&V+ly׉k2l 4!b icF8 -o8}]1Snxz9͹λ'x1œK@@P=x,֠"/H}D y"")rER)JD@+})H".RJF"t#EQ&mS."cX+@؋(W{/ZTfQI4P,6# h, 4&9 !K!CvN4}v=z`h41bJ tuoD@ &y3ig` Ҝێ ”ZJ?(w׊,@H@_x"xi3:ݍG/M{P ن9(Iƪţ;s`ۉ_L`hCKۍ/cF@vB&XCPYΣ_ţa}xRJlOH&.%3l .*ɨ!^7cF6&odR)9s~ @L: !)%`boa{?8TK!@2̲SZ@ ?+l#f)@' [so nM & pj1DBmݶ( :t J &h&ZRY05#[FlTd = -8b^ek@ f  dѡae) Fn[@MOJ,0ԧt'l|UP x6m  3z4x04 _&|VHކf{\ ((_ AaeH!5:F|mca QHi Z:d'2D% M!rҍSawT!0rw.cE $t/?p5}bV)CӾ`k'(iJ93kb:d`!bUv$72uG_%$Y|~G+_^zBFG43S uX&(喜MNoFXdZnQm@LCbra@Pg Ih~r+^XN8` I/XkZ$ Q[>l `@ @1,B Lp*QH,4AHGQ웂X4 @0(^Hhjid|u5=@I dwuedy57xMݣ]hseN}y\u0n+(tD]T( _zM".W".VIxTEJMt@-DED]48UΈ WrUPtv͢/H}\"0x14EH".RJR")H+})H".RJR"#tn2PΒOK /\PMuEqeK@"DK"/.0E4E@t`@%˸PD_h @2]:E}'0%D H֓"#Kiw#<.%܌ }YpŗP OL&'qC~{؀8N^MH`rF#d១ JٝPB,x^P3lLFPomٶt|짼!h0(L,BI'êHbJ-%|:bˈ B` evW%Yc; !dLHj@v I1$R8b9/ts?m3e-^Y~vRIRVNJ%*i4@aI-"Swh,X@ @t#d11(OVXW_[|@@0vMR*ri0nws[ :7Sd4 :0b)Hh`g i j@LL A4 HiH)='d'v:rS{F=%b4``!0ҒYF~걀P@a)Y-3+]sw .K&C 'dZv?o8!DK."rpԨ1QI-9kK,\0izZ =`'7}xi~%덀`"_k-@%>DEp%r@"$K,]'GH Io J䌍m@0R^+$SLucm@*&|,"P %n` vJR7 zj^e)KТ)HfKH".RJR"!+})H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR""+})H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR"#+})H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR"$+})H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR"B!!4xPPˀh@"7$M1`PaEԍ[<pE~v Td.H 8ad(QY; V04era_==g9?g@oa?.p L0[J.lH" })H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H" })H".RJR")H".RJR")H".RJR")HR)Hm R)Hm R)Hm R)Hm R`|<; ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?bb! .&$bb! a `.1_ # @dR".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".R+})H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H" +})H".R  b $ L;KR;?a  (@4,"_bK/w&rO]49)L;7;0@; mB 35Ĵۯ` bjP &&,7Ɔ(B E|]-KCPЏ5}Q0XpA` @*?%L%0J-#\Xi"JLN MA\ɏQIŌFH07̼w`` C<>v6aeh^CU҈do %% @,ΩRCS~|0( ?!rjP]Klvh@,`@`@%05$v -`fB=;lЀ(vIټ>zM0@bS%W4`(_S=   1$g?|*d|;n<- *LɅђ'stpSSy&5[է,Kg Z8RD^'zV5gRJԴpn}u”JR"+})H"*ՠ;H^)&ྜESbvۯum<@@C i{~7H^Cn|y ''[qrnz;IRC\~E -ճ-1k@C@BtVb (6t4Q,HK̇`A_AhB3.*4 R8 Q@w*!@aɍܤ( ϙ;nV9JǮ M҇l`?6T ^v`a] rdpsz:Y/qIGpvM ?`š IEBS~K1(X&.V-!{$t=5|[`)a콳=j]0jOJm%clQ$nw!F ~r "C('l~͓X+I ; )7pC -B&ޔ !/KĄ!CBY~V:/! -R?o/u)=!Z1K'㳩 (Z:Rҝlvʰ jl{aw776Þه PP KF,0cF0%}pӭATL KzSӒS7N~su(0(2 ?灇7sT % -|3HHӝ=g_ ; (dpnHa'[i 4S!$MĴ^mj2;#mmc5{ٕbb! ћQW}Mp> `  ~Bٖq{j %s+%A }_3e!swG^ :fHhi[+) R;: Gvguvj 1ӰiN,Y[HB2Cz2;^hh ,%(M3%8b۝w85 0&t~fܴVQWT5;6 ;ʮ`ޔWJB[/q N`[Mі+tP0C oI7J4nΫH0Idn Gc7J6_{_+~ !);gvD2Ɂ;>+W^+А{mR|'׷o:JU)oNM NI0fmu@\إ)rD#})H".RM1 d'-)9,d'/qdH@ #D]VV @1(4ŀXLKnC&p$QF=*(9)M)p4}zQҴ#,ԄH62de°8R 8({g\ELf^Ņ6);|f rdoBPJx0~V2"A 9bybBw~9/@tn/p=Ī / "s߷9rr ncFuTi)7H!}7u{i- m0XJJI0B+줆֔j?}C;J vED_lJ C@`RK,AU;Y04^nw^q0i៱a^&*B!'HTQ@(~qxHB6"J8`f,7u~8}KS1h%8 ;YJ/~8c/Q{P Q~y(A(Bpn1cr{#0ZZtEIG Isd224D4Mђ~8."aaΜY5 8]H/XWԓS?P8|-," #})H".VCq0e]wԍzplX'`1Xb,}15$xp ]܄#?E=?!."޴LA(1@ u>y03I산7Hl[oZ׾/-_ؤq;FubsEC󈈼&F'!hI4f!/2?=1ެE'm[wnhAH `2Se#*"B`+t)ZMIi70AS, ,EMH Hm&k`3IO=A@' BYPjq:&!챉A(0rxxh@ IA ibu9)$݌d' 9ғ@@0jjưXޥuk 't}3:jB-$?AxpKI3t_8JDMnl%bXbG8r@0+dS| TEI`(?iN y5$( 'W:)ۿ+}Ey4[|ɬ9~di4^0 KZ*(^nF {%(۶ ;k\ SzK%$'s^C> 5(ZJ?CZxh!TbaAX}DP)N3O7ݮ >}ёjW#8ln]=cT84QHጽ- 1 X` 0,3Uq عMp$8&kDEI@;;s9 rsQllqc}`T uZQ I h3\E[D\)})H".]`d˒פ C@:RfG 0bC1{dae'nv6"00TѠ&VT@ @@@vM!C(L!# 11l@z vbb!!  /0(y4? :!(8d 01 a@(Jr0A7 ~66@ߗ女B!0&=*C'G,S`( )8az@fx /lYE=: 5#fC2Ӄ){}/1 B0ܯ`!tp p!&bRHx(fJx v@f@CŠ&%$C_HGJT'nbaAܖ>b%!9!P ɥptY7Ҝѱ+Rۣ4@Xh p 0&Ʉ0(K2bvOΞV1 /9~TP :@tQe#ZΝ^bs 5P2h BP+t? Vo+d q4 ļcbK,VBHGC?)"?milQ_qH4H^P`W{uy vJ (03o&^G :8f€Nq0i 849lZv)=) '9Ev o~t~2 D*C/PfJVm͟@vd:0 2C t @s&f@?4 ɼ1 Ѫ!JJ0vD_tԼ` E7!I 쑀Xuq׈+l"X0q4 IdgC& D6!v(aD(db`Ƨ|I(m*%Y4>FXOcGJV +%'>vu;1&VsNcgd߀.&MAHJr~?`>" 0 dǏ'`PagɈ&_/-JNF&'7/`oY@^hC&Hi1Din?wq 5F =P 9J d %l_b_'#Q d/ 1ɽ$.V,g,iJs^P `,AIK~?)g7IZH%JXb0yx}{v 5$0RZp @0 lQ4bP3 N&,ݒniI&md3/u`M :R Zz}ם7G?ߛT7m٭`&+qNFҟ߯vnu\$ &iy, ` q,1F%M!0NxU O+'aJ&)%*{,Uz`Xf)0g@1Hi``J/? lI:>T k^N,x @ d )=#]rӋ (:x´p Kaun'ho۷ݏ@<7үc@ : w&;d l".R })H".]Uƻ Aܨ%ip_P~ i X ta6` Z@7AB"/5-|_ 8BRJ01$ұŕ"}n^W GxȜwÅ>Ҁ.Qv8͔N'\dII%'А`% $1G@<-DT} 2pakŁR@&6X䖔~u44 $/ܱ -?mGAfV]Td$5?M8ΒR8iP V4@'KrWIE|5 (" ^@j5&ZK8tK%I5Ͼodr4 MN' "g@d, G%qBSϷwSe¿Zs;)g^ I;l/;A\0@C0`!P pjI#pew!%M"&ӂ8a1̀($(7 Z(FvNtI|Ԡ QB߬[:  C+d:ְ*4L̼ؐ|a 0bĠ 7s/dW+c^#\ ebQAG# ;N|H`& !#찂3읷S&"0b܂p j6% !Xo_\P  x @PN {4ntN~77LAh<0  ; (002J!7$5b~鈿t}4jM` h@P0@ ba 0Y/ QXaE,mh @0@hXK@ 8 &A(g&#4`bBQ Z @@Ln`!&P H@P`$+ɅdְP \` J =/$t a t4%RKOHnI@c"`x f6p @rh` 5#P⳧ A)`z&H`C!2Y81#@C} @ : @uD4dX<u$M, !c[_ =@U;(n * ɀ1&8 ` Bri YedQaL& /.8 #8R4X`dth &`T 6k1h/8DE<".R })H".]UƻPC JNH`"Y>#"` qv@ @&$AwD0P*X 3a!Ubb!. "p20Q10]0C,EGz BD^8,M y0HJIdԳ AC NZR\Tɤ Se{itZR a7M/vB}2qhfO# `:G 0[.0OJRݛ0ha`! $n/;l3SJhL@;!L!-*'d q 21t7 @c)&IN& N - ,Ұ/mx`U:H/v7 3 1$tn(!Omàbpg!H}8  ,$҆l0r~tL@oPO(5?JNC ~-^R@q@SB82|mɿroOW] P@,5C !@0f%@1+/{N舾H@`Q5a )9o쒑rJP7P>- |CFܢ /A?dɋG+ٷ/@PcW0 dI4m 8@-v1_`$4j147d#y[Q3|)g"4AEoNcwsԀ:;A[ Kqh QCԡg7\X,+ u?a"  @10 @v`Q&/;eDa$3 NHG|!(o` =J@I3 P(L olߡ.4q^"(@/ #&@NX@`(L%0 R 7ho ԬT @@ @aNj5P1n%i6ŠmPѥeq@\ ZbrXhϓ@~TBDŠ/BjrRa_pA?x 5/b@a\a#7o&=Dݘ!Bd6s@E` v~h@1,1%by7B!p``iAޏZ{! U&N`0 |PP O吹1S8aoxh.laЈ\ ;v= @NĆ@p 1l&PKnjCW߄H@  P;iC;I aQ0NFKxCH b@W|D"  })H",̙&d.tR{^@;Ad,WN1-P `:&ɋǁȀ^77&J7ZÓ@|E F<~3⮸\P: @Ŀ*j Q4ɏ Q{^Z9HWJp=/(phyȉRFܘi3d/~ 8 2o(440>AA%!!%#;lf7RXa0PXx!]fK>|d> JK< J'k:`@b^ &(HiKܴ;vv6ɟo?}vfqAPaAB6+ddv!sN=%)GFzbRI{@945~+}iKmm20qߗO=xͮ(@Rid4 NvLcWi@o/LB@,b2tώ0f) mh,m{d\ECQ5(5!Рrq0PvçFI`;X"fdk`Z/\vc7 ě]E@j4[.Blzbb!8A : udTEŻ0|"ЈJR" })HRFh]``CI\fq#Qڀ լTQ+֥h !0yAFp3: ipVA$!0z !1'y@E@{4_uiB/A$&/爪} bX @|4v1-YЇ-4nr`!  RRy\Y(vJ- F-!G@퇵԰*5e!^8B1d2$^VA'&a4Zgfwe޼4pԖy(0aجn~eC aeNJutE$f I`'H&aYXnfUTB $Q|+91nQ Lr%;M8oʻ)&Ald4EI|WtZ¯dJ8(PCIe Zf U{0i Q0{#?l=WXLzjM@nBg & Vb`Ԙ\ܲ|64``H΄%Xe;:ֻbZ@Ą^dI^72NSmg $i\Q3 tt8Ao| y003뤢JAcz N[00@;&Ae ܖWXԶOvMǀX `=I &J-ÒvD[ !Ӻ GO@#oYPd2` %J oƗ@Ը7޼R`/ά߯Ao _Ōâ/`x /I(n - ?G춨!!A J#tz] +0/TP BJ źI_%+dYw,@3Oha fCI0TEf@D!Rf+f&btН3~0 |7p|HOF+7r_oײ޸ąfrH ~) @ p#LIh-`j#|㺍d0@lL!ؖZ!%!;z!  :JKQ,z{R` 0T-0 >-?GHFPdR|  dѬD;(%8[9!=zp `0&&QIJK&w -Ķ@PH@OZ@?@@O^P9!=i  ~"Ԓnzzj40gY@3,ݎqЉJR" })H".] 5 e=Ļ@5 6Id0O0*M 8O$|EGHhf@^.`p@ @<&Tb, CFԆ K,=i\CP᡼N!Cx07%ua @ aL: *R YE'Y_'?ou @h T GGM BzJ7ݽj7`ЖV~ˈD@K0 5!b@M!Z@BAdi|@lOf@6kP&x@Bt_E &2 (b7 sҎo12@tlZW&@!K%㒎gr"@0zF4brpIIBs'nV0"a @aHR2?> Xg?}ӶdJ új3'vutJ %ϖ_+Ut4 ! '!%ЌKO )#r=?@A4Lv|LbHoņRxbphmpҝD(ҍe%S'QtKL0`@P5Pb1El,i[a%k  xb4$dpЍbb!A zB  @nbC@N@t$ WK%+~{X3 ;l5 T1Ed+ mgˈ<$`xxb@b D`X RYA&( Fvo@ @`T !d $Lbg0`jI`15$xk^Jwz` J EB~IE8l'M.`'&KN@h`t9 1I f @@V0 H*tp*xCd'oѓ ?^x@`8 @bM=4K%Rha0 f٨B- ~J&8`߀x8>"@1,'p` 18`:&Ąxxi4J! \D037p0  P 4x$&(-U C0- HxidĤ cI1+ziyq@b` 0 r@dx$&PT$ C0- Ha%.z_f1&d`? 1,@!p`M- $e܆  6!;k@5 bp_W@aHOg-QA( P `U M!YAh p%_@@ NG~$swG8ĤZE@($"j`T\nH[5olb S ; Ġ2CSR1BwE#@bhAeɉ4-&R A `14Ĕ+- \ތ4i/ /zRa, ?( NTPcnI,sR @ٺ'H0R`3bY4g~t쌾e5  TB@jKC?`?:na@ 9 &h#A0 B\jK g,fG&LXhj@fOOB#CX]O0!/L]/i_ِK= tq`  8q,}X @`h @b`HCK!%|ܬB ~f~I 0bԘNɉernnPtSlGZ{e7 = G,_@:PonJBIĖ ))C2wNZns6! @ @Sp1ѝn\4ɤԒUhA, i/e-RnRz0jJ,ݜ{uT\V@ ) Ӳ Ru,hg,R |PQOهa^o)8'U447-%3%)C?O@vBɡ+sa[ސ1,(gidooͲk r ! F)B2S- |Ν3{8P4C(%󺖢cm@@ 0prӆ 3PА{arL5 ! 004u[fۀ`o9x  ) J ZxicF7ug2ȢaI۹xicd HdfJFnZ ξΟ`;C&~[Z l<#ހclLM- O@ԍC>H>4FHCiAJ@ސԒ/+_ w`bb!K at,XhV|1lr}P@ gf< BhEX1 *XaEĖy/ Hbr510 @@(` b@:  Ph0o)lѪH30W@kf΍Ksc=?%X|@i03QȷA(1@T0@&0 4&hLp.@PRˆxҷ@ @A\p  h!'dɄI JR4SE4BF(&2b MHjS@ Bؖtfoٴ`0/ Ud I3sZ@VL04@ `hP*L&Tɽ.~黸/4!'`lX44*4HV) (L%VσPh/I+@Ri FŤn$ұ{}ۡ/'5 [Еdu܄(3 \ bR p*CC@@MJܙM9IA (7;Ddp`f&G&dtY e)ѵ@0HAHNMPhA- :Y/nL5U>, 3(*  0 C2H` XrY KuN\EEǥ)rD})HJs,8hRd_qntp(yDԜ5"' J̐Fd;sBj7zLซYy ;&sۮ 0>  hZJ!M&Bhi Ba€D%44ԧ#|/vL%7L W(G1zX @1)~b`!&;,`@x:7#rZqXcH@X @C@/945&i1  +!hY dgZv d 8p^\I`o堢_@gܤr>4 p~ 7 @ @  N`&8X#1`1P0(ЖNJ!4 b̄0 *(M@'i( BɅ-11 3 W{b1szBt,oI-d R ;~ߏR TA0 @ Ba0B& L&(?9mЂ 4-!2n!1 !̌L,00V(4JRy ɟv/(]pp]$0`iewN'}^{ @b0 3fp @? 22ZJ 0 +Y5Po,n:P P @b; iA0D"jD(V+VFVwuwJb p  IY bR/(ٶ?F@t 2&B'ၼ4W+(013nZ?r "@@'&M4(RfRܮJIiI{] pP P2K@:, t A Fl)Jy-?)) e@@0̚C  &4 J- ZmY3g%`\jih 9)%Ѯǿ6M?\ &@ JRQ 0Q0CpGVvٮ`x?,Rɠ@Id CY=)I1%{nġ|s0դ<`J!0|PI'txV_vD @ TT:|Q0 ZK$XklL&o qt 'rlL&=1tnV&~%^DhHD bI}RZZj#|zI= bb!Ta  uP@A5@ B HH0b!݃~r V A@ d 9@M2Y4aP+ܶ2jH_!b_x2rhfB5;w)#>Q0^@00H`1,$DĤ0aCJF e4599(P!5 Cq4!X5jB%0ӱd|x!Cw=<f Nd!)#Q .7ɀ  @5&h04d93` `RF'9 e6T '!. dk`bPP 56+% :`Kr ƗhBQH͆Hݖs/ h h@ A`;bjL,ohMAirhC@zwNF0Bb) 4 Bq7D֔fw7 %@ C @vYa%7ٳo6Vee  peİH ,Ā蘄 $g.ZnnL!! pbXB bErJ ܾnP3rNKH6FbPT6'}p@v ^P:@b%44-%(K`3.@Rp \404 eK, & `6=w'rRiy9%䒆%fCcC0R]@@`Ʌ?+kx$'%QqCirD})H".h Cu'l*Vxr(L'X@Ԉ `L?qz0@¸ P욒f Ix4ZC8N0A߀v %%n3߿ôʩPL!P䆧5L ΫY! WFb߲NKBנ`P+L!cIIx0 6- %Q%ll@ zJ)ebhd%h 7%=0a}F=u BPN+(p@0pB?(d/C8: @`)JIXԗz2Ys)wLDX@'7bD0OBC`ݪB ]; Q.W3$Xj8j0qt!-JKt{J$mɀ@') WK,bKN-< 7!)A@PO倥%V+k(@ VpQHG0`)O@a|+n;c -_Ajz0j:rw qa۝"dXpa1@)$,XԁiBF!;d71$MH%`{lҮub<*@ 8 ` p @`aZ>tWt%{  0 0 & b ۀdž ,5K>КJ5#:u,H7!p _ \jU?( $ zIEtdwct|L,ܢQ\3~5;λ@b0(f&Ryۭ]@5PC&(&'|Y !8ݳ fF+Z:#߫-V€v+tP C &|+equp dǁ^MBK #!BoN`d PR K `N`X啺G(3dw= 0 @0SPh9pSj!b(Q05 U` 5iN`zؚ (i/~Y+#l%1GޜXL! 8i,Zm%O4JA Qbb!] `&1_,@# @dR".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H+})H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR"+})H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR"+})H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR"+})H".RJR")H".RJR")HSDXޚ"֑EGB"#DXER)ZGGZ;B""ЈH".R:)HX^ER)4 00/sw5 ' &kts+ӓ|K` ou|_XpF&_LM!a`1%wg;vy$ 7&ɣa֜>,psbp"  J, bb!g! @ KJ!4axOG|d^C4Q#уp1r[=004sw5 ǡ(ىG]LirCv$|RWI.]^YT-.<}Y0>1([3!P`8GNAk퓺?uI! Ɗ(1( x <{^0nˆp0ҀMHTy|7c @N N@pӂT|G^L =n3v*!0`;O4AQ|fYY)K}*!)OsCuA JŠBq7&R6S| :)% +Zs71M쒜R1N}3F#\mm} @@tB D_:  @H Ġ2VAvazhOA3;2!$?8Wty0^<%T_I{OKa9w Tw;BBX_HO&m1%|/M&dW^M!~QFl%>$g GyaHen=³> ܚMa_̥i~ȄI8$_ A5w@@PY+s7_r@0 $y-(ԿŶ蚔R$|g!OD@ ( 0 ~P2%?71!@w鲑JO`;&6 %pߜ#3?/潸N(r G{EjqWR|FLp*OR9y@90X"d4R ӂX̰>X?!IA_~^p7Rz2])!Հf,bCx2H`:&@;-x_}(Ok@hJ&`L C,P~z17 s `K @_ؾ^_lM  YafIINrjwoݯ@0 ϰs TM+B^Cb |0dɉĤte ߠ@5yo)p1S + v9^Խ A ^X |LH5TN6\qi&>R`%"y1 w+UmrHp<5M&~anC@#oB`0H2 8oRg`{M G>UؼYD4t n7u)jΛ@JHLBt -"FۂHވ@T+.fNVjl~WNr]?:`%3}`+qCRM/''m2K~eo|`\ڴ@L8:@vZJAJA]zKF1o#/uʱ٧02T^<@ @vC&섥ƥjc^2bb!p 7 Μ%}rCId"_O V@hzRɈ,5/tmQ4 ܃ypr,B HqN8n@`|a#_c>dlZ@v^Z~i`g%%K=wEJ)/(M,5uEK7m@ Y$ѥsȔ*B A多LOu_B_ow{$P$41 /1JS{ ("@5lVgJG2gDΝl97&/j{JD\)rER)JD@3})H".RJR"6@D `z@)$g,f !?  &!+!WlUIx 5J^4`\;*,  Q:z~1P[|BHͽͪff/!E0xp_#_]M-$&j~ B9g6,@`Q^0gĦ֞ ^` ӹ^צ +I̖14 b0Fրb@;HH 0Nnֈ&gI6!yWՀ9?Rh, 8bI(w})\lM9vِ1k7-p@(!P{;q> 08%~p"@"@$_$ b*R@txPy4 3 pl tM!h-@l 3ƞR7s9J{@!&VKfg>[D:( PsC HbD'}(gwe*ءpW=PB( |D CPS{ˆI! @ V ܔ(-d(!Qr.:)2~OOYף?,^+K{ X 40ϰW\R JCFۓCAؼLOG@F&tƺY >~׉TX  h"rQIBNWs>-F]]t@J:'h/9`'pIy0'8IŠI_Š\./Mb/'\`!) ,c F~+1)0 _(0xl_БB ݖG@@&noA>PG9@`Q\ Y@+ }A7-zN@Ilr0ya\?q`9n pY &+|`i4=[,A)Øx=~@bPՀ7rƌBF`P D0Ao+{l'"&ï$ @45Ԁ V@ea43{_sr%@ܢ,ΫWV7&r`+sJK,a|e}WCWhT;v8(yt9) O 4K~ļNoSMV+Oх%k 3 I5)/bxrIWB/rҥru  ºF(1 /֎'s QhbHŎn,/Mu@ R0"ljC\g?8Tɥc!e4Vg3p> L(i|6I{1U/$$@ƒ R AH'k_x} ]GT - fo%)t!|7]Zl:5/4xe\G"klԞOYvhatZ`;%bb!y  Q:Q5 ϸvHhZLG f|V,B:ᤚVפVi4W8KDOz '^xG^#bw&M|!$n7b[|k~N!Ҏ)deC JIcJ&!`=]NBqr*؁BA0D`+H`bw B =5 %(/^ ;g valzoNeh 0Rh$=0t?&|3B(_!;(b0⺗ %\_ (%h$GzB !):8D3u|R3Aify*E1~﯀)ie g'xR,!/#V5&jP+'r} n:$ Ii X c ~&nH0jrỳL qOt N؋iƽ !7׿ctzhR")H".RJR" +})H".RJR")Hb,L.BJR")I!=xCݐ1}" N'&xvtIꄆZ41B0VRRq%C5Q4su&4I+LddEK^gѿ^{|f;=( 7_N_w ( ":Ut1 렂b^"$dP ȲyQCV$B,ttEM~IP.^@ b H@7vR ~gc9a|dQ4''sud_A 0k􀀇&O^+9L? U|P*Pa'z`I80:@؞}4r/lLG 78.aX?hB2S65cEOg=GBtx 59 n#xkb?xfczLn*RYa>Wew@hZ8 !$4؎Nɉm@EO0&)Iǣc^̌(c !üE)2>"\ʻ.IBu'l}!1@osmgULE 7{}`x+d]_"Dt=!Hic,RJR")H ;})H".RJR")H",Ѩ %E ^/D]T%EG$ӚLE g rEm{1  4'܀ i!ti'c@3&  WA$Ѽbv"ϒf?#ЁBzoӑ?b@p*m@ID00Ma Ř^1fםPװ&ĒyFCpp~LG D^Brtw}ootaiԞq64 &v'+DT(d!);aYwEɠd<!=s@`:o <`,B-gyHW6j3‘͇h6*"w!;&䘶xڊ=ݖj^ )Ɔ}źHᆀ3`(8 А Mb` ;PEzPvaYbžC9 Bp̓Nc@\E,=$ LFw? bpS;TBEK&=)lJ (?=60hJQc>}^rn;H $fZ0}=Nt?Ma hX[R>44EK#Tabb!A jD]6@263KHHEl;B͇hQv} EER)JD\) +})H".RJF")b?-'&!\ECvCS)!:.BZEp"/K.P1Ii-:#mxFD] P:3i".[5,7 _XR< ! /Ln@1u@#-Ό.jC9Z ɈB`Q9c+=* R[p%֎#g~P>  ?VnHO4sb2:;"<`$7daf !]+OZ-&|Yi i`d G2"Ab' :dEbz$i[bV"@ގ Zr0~&J&`2Ï݉P1Cx<dFa=   oPR:8vLa{[H㆔eA1 Y=wQ>"`` Sua:H9_ v'ל(Q5%|Yu$< /ozX B`0PR/ZbYws:&4yܴ аHӉ}/Yt@b@W.\&C;:"1"/xe8 4 _H` N&p= 0rgՕ]O̎b>_~zdtI@G*$PJz<B2 3mzz+*~Vpqz0 ц=3 #M;JƎE@0s;=- 5כ>+!d >xU},[ h}>މR(5 ;ލ!((`jPxT ,+uq)JD\)rD +})H".RJR")Hr#ތo,>" r :̋?Ib D]Oܴcn )Om" G6bjq0 ko|G.v_ <0CWF%R(-WX@i|3/jFdd;~WX~0hhqýQ Lj: W^Jz>؞WdY-,;8"XbD^o{_ Ѭ@D2.|EWװ`PT$bu@3$АCKg]bb! k  />F.AHʜ +v(҂ïhM&I%XaI,bR҆qə1Aa"[#mV(`S G,ϱzzB *(X7tؔ`}*wy3ijAIy.1{TPHa{DTl ~>NjBH C)3`T<4K)j;."P ٍ#A! OZK-Q>";~2R@ C p0.{E{_=p@')8}3"/r`jY8ۄܛ @20(J0 PL Ek!(tH @h@TlL)/Ɩ_wO6"P?'Y(צr Aר@?ri_Sv2 H Rt^ɡlk,:&f2@0Ѐ]  Zr Hfy$)5 g2"_>$K!\=y^L E;u95<Znqܿ/ .`(TJâ/ ͱwWe&up~gwXY,=u:rz/BJס&:"֔ER)JD\)+})H".RJR"ZR"RE@1̘ @bCQ3?cva7!/1,D0*% "  'x/&h1پMzDXǰWBhBќ*ߔ=8 @ņ 1!wtqlg`bP H\7VN1s/2Z'G]S?m|10*HdE ut>!l5=;u9b>LQZxG8@ >AD" &=& Ԍz9.πj %004DYr2?8'"@@ 3ѹNM)G (15z~"4_8!A $h %ayvXUH C 4bJb&I>!8x"G"*IB ub@$pwvi0JA/7؀LE xa T1 ۬srr~!Cp9e/`/ gI{'|'a`,ei 5J'*zC eDn< xAl7g|wp C A)HN7P}X `C!RZ22n '뒊ۤsߔ 0I5<4Ւ[׭ 'ր?@jៀ`B/G)Y%`r\v1(1 )?^;+B1ر[W9Y}`5X{3aD`*y5`HA9| \҇53>AV|Y(~wް4Yc @!%φ~zi `E| i K假"8& ,MX @wؠ)ٗ|@' (n/$=ߝ|A~C.ʼn1˃@D ZNĈ}J*myD)Ĩ}4CG<8D_(0 -7o1z\bM& aa@!&-x~#"D_@I`:=~ƎNn^t 8x}@7!Eڐ bp#7`p!>FVtk@%si>)_H7vٹ) j@@LŠb/n5{>} wݥbb! Z @ q/w.!t9Hٲԭ$C.1&n !~tpǟs@a19 d؋>nL$ OkpPg>h8s184Sda#]bNx 97f|SpMA7pc[UyRѐpDhPP(Vxw Qao\M$^߬UCS[`dEO;/ Ri G~LJ h,uţZDz hGIQhŇݤ ӱ- ؋0@t $= K#6UD_]y%o}HLE\% خY GbfJ?K$@ /xi4$ 0W+rXbByaUb805v*Bāba0u$CC ΒAFVt~I0 2 CIT HI[+ ƸP` I`\1 4 0Rv_<dC0`%PK94w^q@T4!boJ眏hš( @L`Id%Vʈ|`1&?XvDQ#4t1Jx,7~ f'UJT$ D#W @`(7X{wlw=)Yb,E bhi;vVX]!Tnv¤s;E^_O*^h Vad!V΄|}#g a9:X5 Q"C$7^ @ 7hIHa$;:}D#pFYюq|Q|EY!M䤄+q4!uHk'ty b&/R   %▞,͘־`bQ0e`.B/l(_A'>Cv9%e̥26l)W` @p" Hb:v%'.Xgt%(h`0d (a ;A(j:wƉ@;&rH,IItO;vJ9GlibbX&)@v TP fg (kdљُt (ksa45 )1L`V !P@(f 97v! D8X;x\#<W/,F!n^{5<@wքq廍Oú> `<|  +gt!oEp % PbBc6`0 &0jPfBOXk͐ HYށYaOCHi0NGq{8,i@RCr@}b8Ĺ|#EHp:9h,i $7+3BY8Ʌ.O8DM_DLI),:8G+!mPpY@T d,NV>NqA\jeaۚ9dNN C$?bb!a [4EOxJ! 8:Ȅd##:NDy⎽ Dy])H4{M뼔}|pr^kDjb/t@λSGLE32[ƧO]D?wH:":JR")H" ;})H".RJR")HM$܂TLE :t$ER1;ޑ$ͤzDb/B:l!cI $_(GX-::r 膀+H;-^M A4RNW!#y)9ѲñZ1bJ@W\G$\X =ȼZ"a78Fp~JQ_<7 RE08b}InĞ$Cao6_e7 1@xb/X̰ HHFߝ-u0dKt:6Ɛ ,4EYa'qFuBa``_9,YJ=0P ā؊` d8A eVPm @ngH@c8x5J[,Q3&;D^gnݽ5 .1[9a!B K"*l'`CG?mg@@Q,*ӄhḚCtbB‡ʈnpΈDy%u$hEBIgED:HV 0-"/_!h)tDb".RJR")H3})H".RJR")HNᄛa&"GI9GIf:ZD[H,yFIX::-wpaêkrEJ|R ^d ev&@m|`@@ĀV/b>00iv|_2қ+\iu:G00Q ]icIO&R `rGmyOJ ieMh ZMXV30/ /"V#dER-D;-tE(`COKД}`R؏/bsrr2n8۟Z^7+*"v#oR'PQ/;bj%!QgDE4,X:ٸIiJߟ`M@WB >'8LEKmHE_&0"Փy0P"04~Ν:$0q ņLw)$'2Q*_'z?e64 HiҒɊKu*_W SczmĀ7=XܬdaEQ /݂: ! PGaU pEK#m)Hau A9מ(.R#LZr5!|uB0>!߳Z4C@ Shf@g I`پ0 ?gw_7]CL8N?KM͈𙥈JR")H" +})H".RJR")H0r@bu&b/ΔHNQ#IrEdz0՗pG"@s_XvbxwjME@H].|ER.NH'D_ xKSJߑ= @@Wf%fH~;W< \0a ; VztT bb! - û^405!|M: vDI%Ak10i,Y(}u4 & 1?Eb2rEQ -tE $t(1``~vh)JKIyHQե#v$i J;""iI 9Yiú3ұaCuad MPf}fM"H::"̑wh\Ca X+d7 K$ 3( !IeVL(RInK̨ۖ߷og2̓x I`PъG HR~o|`4!%y;p38JGe d', ~RLs=_p@ )N|COp$ۊXpo,R805EAo T'Rs㾈C!,R74/7P!h#|؅ œ-qPp0_+Θ I&Xa<˰7X$hHevrTyӀnqaxa7[x 4M)$%tu?l$&'n}@Ĕ 1;&^C'?ݲYsKwґ ];&&68R^@"Y[^C1%vb7&PjJţ>}__ io!ܢg璻G{r0hie$0z@d^Qk Kuy/?q9}4-|'؋/REoݺy@#fv;dtP*4 # n[PC5|*CJz\N`399|aO}0 '#CxX<8~R%tK)|orZ BDW F"4"bֱ.CG'2N S߁c ]&*eYaD_ƍ&ϱ(A&cr9kq L)U cbM~f3`An)F  J-Q B1Ӗ94 e$`W!}k`v p & xKrJy3y.RJR")H" +})H".RJR")H0r@bu&b/ΔHNQD\)nY#ސ7,FM|`eLaRM/+o"o"rEˤm 9םk@Eu0;A  1& z4 @Y;6lE_7/# BD\)rf"b& !F_ @P3f,ishaX>[%"I R0nJ\3 sp` y Q=!YiEP`@ 6GHI3ZCRF3$?Șuds?l^DI:` KF`(ϐεh\xp;Q%BA}E85ChD  Cw `bK@b+v&4@ I#m}]*tE!AR,`e<ЌefNJPM!VN )%g\*ߧ,d ԖfN10܅J@k}9 ۶Ywۀ<` PM(fCȳ bb!! x@`@@bL BIP5 )+ah$[R 79<ߔfR-1 ;bM3Q0 IYd 0`t_^ 83/BC3!ϝWGU_ @ !4551 TN>H(ri00`SIJ- d7 R2房7s@@(Mn_^8Ů@~ - ҹ)`ǖU{q@=@@tH d5(gPnGg^;~o&7"#".RJR"3})H".RJR"#^L$riNPBb/Ϡ+ HWr\^7b/h&+Y3֍"+<%2$s :f"cb.FhH'\ۨ{DyuDs@B|b`Ԍ?4En!$yel`}\3AK ` C@ sԋXCO,^b 1 9Ʉbq3r7+q#ļEl0JK&ncve,ɅCq#q{Q44%!?G|(\`, .1-$(v$_b/aGܽu >pӮ44lEǀB\(IN$=0ɝ3]IDa%Q,]: s@00n@GI?وJ/U?47 q'芧٧5.% Jy[!ǜR sFg]2tT'"*̤RN=1 M_`0&g?7`/JE% T#;N-î# #q];@1j\/Ih:Ih:"4막78H($_(LB X Z2{F1Gk"FAst /Ne'`WzpsS & ~[9ęz*' y9{H~*M@܌[b2I_!;;TY.R# DY$4D3`dBi4$4XAQN(> Gpz@{-|0[>F"V)F)+T3.0;*@Uvv9L /ūh/eDYZ+f4 P5".dWIX}.~l=V`U6U>"B& E"&4E)H".R+})H".R R"aHuM"/ғJ$!^QX7uKD^0}7o>.\À38`x t@ u3&"o/&z [0 (b/&Z ;%x&"YמkIBn6:"Nϼ0(5*1%+̚c2%^C:)&~8gE?"3I #JHG ! PݱEÒ6+9XGj8bb! ɟ 0j]|=\TE_:ՈI ÖriKv,ۼEЂhH m*W&5A0!1 (}1d /$'q1x zW+]7h%zEz޼Ji3ro!b`bwWDޔ '8>(-#\G&"T<,&x=` @DLp%IEu ^w"L φDb 2.Rvɤ.WiatEy\ vˬ,xx@ t;``xf*P]j:L P[p(b/( u1>LE50(b/@OwPa$>@(!v6"1n l)JD\)rD+})H".RR"a9Zŵ 'F:" àuGhtFa}xDfm';DEmF@xa[@@DV?B~M!LRCGYy `zӔ8bgqjJDTa@ @#&`I %dĥH察@LdWTnxqC~ ČQ0Od; ۋg“VOl6 N '?BGJDcYp &bvHpBJ3o;` PXb@K0c0Ġs/6I/2@`Y4BBT%%⓿Jveu &I(G HC@@d clݍs=@ 0!CJ+D' V$8` /e^/p 5 Hĥ J2ad/ 7wd5jÀ@ KEm}Ad0(B!D & F쎆R1 b#~l-~ XPZa3'N{0`M p R$4r1[X5s_mF3PB|7$aJIP97` Qa,%$s-+xhb28} CCRYp7= F coۡ/Р @ &K 4`/\!Z/@B ``(m Nqw@ c;n@& 0F‰0YyHiǣ:/┽hd@`QP7 ၩb+Ǫl@0ON!dbQY$nu,SBl  :%^ ,7$C|x @@*BI,05(ⅎ"u`1o ,SJ7xPx[Q2OC/: [Q@xFal:"6Fíhވ#06o;EQ|f( 1fER)JD\)+})H".RJR")H3ݲ걀*DnYTXQ1UlX# ZDacbq%jEёosollEKhM ^䶻 @C2زPP hv~X} Cc ɍi:Cn@\M|0 ,j9C{H$!`Cdv91+"D^` GlPqLM ;|5@jz21%/P?"|G J\\J@ Rp!#gK.D1<Ome׿)?@G@%W(,z7?"Qlu!8@1?x/Z~Fb{^b}@dR;o{@PLOVIY3* Kv@bR?쭻^gHh"A@ @c3Fg `b#be}30(p‰RD_@HB26CvN `AD 0K &V^bbb9IKg):  GDD_zH-5j@L^nGpC@#``h q-= X`a},`W)+q!# 0߅*"jIJŐō' VbGY@4P%xkjy+mĤDbGPĎ" @$u Xu H~DĎV~@$u HBV~ :+BQc!C6u{};'^t3".:")H".R+})H".RJMkJR"[@$@Ix}.BrZЖx 5{C}.=71-!1@ ^? c@nPAEPB= C MRxoЈ}~ԓ@Kȴ $;  jtF90I.q@:p4`.L0gHIĥ_Ӏ = , 0L(0YNk )zZpu|Y-7~@P1ZVm\Z9I{ĬC 4&iJ+~Ɖxz ׆ @%yKAl0 #%eog}Bz>NX/@PҀDB&`eщhX9W<40 :&i䠐ZRa߻;o"9JrSXJ_Ҹ 5@'N@L߅'UA rTҒc]IY7x4`o8.NL(jT LX% 1Ɨsc@:zX ƤMmQc6Ј`@- КC,>Ʌ^ A %Zv  @vo(`f)0nRSߤ' ]. Ý1Fؼcma# ؊C (#@21/c ħ7'P0@w k& (F!s9 @ɉ4bȖ~GldoU]& ĚA1~,|@9A"D ǧF_PBfF٢*_)Az@3Th@,a(Pa$9#3{C'x}D0 ( CIaIaH5-/" `X( KeZ %0]èLH@4 `*, QHabb!A 0#u @0PC%‹@ ]èPH@4 `*, نR %Hyj9e%)+dIwϏϾY KN(u@ؤwe$iI-$`CT_y@;8) 8EX/dLTlh& ɬٱ]=|ͯ P>"ա8@!9'DXybЈ 2 uLt^EP[v"/2fU ")rER)JD@+})H".RJR")Hk@VB$T~k?TEnRHpY// WD$u.WEt4I,GH'kq u9!j[5 NMdEM7(5D$uWF}ҀbL ({ ^ e_ 7=$ p^5 +rt`SZT2Rpo&sM ̭ur< @`M(caDP̔3`?'s8u&h:q 1L-e;r 89zPŽ&2wn#|g;"E to}RMA )<~n5$n^HuA&D]".RJR")H;})H".RJR")HMv(I?tvuͶS/ 7](I1-d<ֆ}17=(}HIH iS6; &p0vζ~;uLX ƶF@6Aؠ0e 7@1J& $JB[JwH|7{V㼯bb7DCA3@VOd`$sL@d"a5(%p!#nvvk>#'$s{%Z!yHdY_ ,a"ba `VX~Ā9=ᆝvszAH{cbpo^B }t'aY$VtM w@N@hщEgǛR=ŀpi)Eudѝn5 :NA~#_@ Xv0@NB3C,;%+2 O HѝNPN yr,-3j!=0Md0c Jq+?xE7nݘxW,t} +HaI_]:0g/Wvn';ލ#%BKa <bP L!p J F~} N߈J`3SanvYa=());~"w@I7bnfµ €+RZ9mVC90 Rv+0-' ~y9In|U%f*Tñ4fbov11|J P3Pa5;vg !Xhh}J̋7@ 0(C (4QhidW$!"3T`!d׹ N=@T x) BvrsN ]v*u}^h +%!+"]`A4>d5E_%ynkD/r`츊XB&=%bb!ס yZz ]b/oZu4O:D\g}C>B$^ϐE)H".RJR"+})H".RJR")Hm$"M @&"] \ۢ| u+;戱iYI-6 V~j00J(-!r} hk<PAG ^1+g@1M0hPo @a-8~ g6` @*HoWK&ԯOO gF~m;'&a[ u`pf!)L9O^@HBD P $\D[bM @+&ߙNf1 i Ǎp@wۤE?))[`! `'I, ;$`R"Xa10b %twΞܕ!UT-T @0W Z- }hn pg4xЍA`9M@iyd՗x ;P0 aCq("h svyX m/ tďGbu *-=هV ,$Č,47qĿ###ڧ'bKC`%"m`& :kֆ Kp5 AqgyR ܔ<B[X /P@ xK9I7Jhf((fD*O;lt(ө؄hd-%H #HmUpbbQ@f ϟ~_~NA>0)=vjؚ3=tl:?4µI%fߛF-J7BX{1иx~ * i/h0XJ;H }!vMdr7 ̄h6@8@;H|~d `o,8]ȅZm_ xӐ"9)EܚZ8{` #`,)bTh@;BRݳ1{p `k / ŗr!?U/7H[x(OI}?M\p?B'_W~X+Hcp&A f"|؆|lvfDX~pR#IY䵝/ŖzR5ф֢d,Myrt, '%؜FPB 06@ܚ$j@?ԝ!O`d3]yhH+ ' Tmb/UXkawt0Kp⯲Җ );õ03qY 5?nv o:%Hfb_$OAxa7BV_=ո}d+H`!0x")v%A"w+g(e%=|:@PSBAl>C@`-ُ aGwi{?lU{`8Jf=߈ٵ&B dF:(lfBR5 @00 !)&V+ly׉k2l 4!b icF8 -o8}]1Snxz9͹λ'x1œK@@P=x,֠"/H}D y"")rER)JD@+})H".RJF"t#EQ&mS."cX+@؋(W{/ZTfQI4P,6# h, 4&9 !K!CvN4}v=z`h41bJ tuoD@ &y3ig` Ҝێ ”ZJ?(w׊,@H@_x"xi3:ݍG/M{P ن9(Iƪţ;s`ۉ_L`hCKۍ/cF@vB&XCPYΣ_ţa}xRJlOH&.%3l .*ɨ!^7cF6&odR)9s~ @L: !)%`boa{?8TK!@2̲SZ@ ?+l#f)@' [so nM & pj1DBmݶ( :t J &h&ZRY05#[FlTd = -8b^ek@ f  dѡae) Fn[@MOJ,0ԧt'l|UP x6m  3z4x04 _&|VHކf{\ ((_ AaeH!5:F|mca QHi Z:d'2D% M!rҍSawT!0rw.cE $t/?p5}bV)CӾ`k'(iJ93kb:d`!bUv$72uG_%$Y|~G+_^zBFG43S uX&(喜MNoFXdZnQm@LCbra@Pg Ih~r+^XN8` I/XkZ$ Q[>l `@ @1,B Lp*QH,4AHGQ웂X4 @0(^Hhjid|u5=@I dwuedy57xMݣ]hseN}y\u0n+(tD]T( _zM".W".VIxTEJMt@-DED]48UΈ WrUPtv͢/H}\"0x14EH".RJR")H+})H".RJR"#tn2PΒOK /\PMuEqeK@"DK"/.0E4E@t`@%˸PD_h @2]:E}'0%D H֓"#Kiw#<.%܌ }YpŗP OL&'qC~{؀8N^MH`rF#d១ JٝPB,x^P3lLFPomٶt|짼!h0(L,BI'êHbJ-%|:bˈ B` evW%Yc; !dLHj@v I1$R8b9/ts?m3e-^Y~vRIRVNJ%*i4@aI-"Swh,X@ @t#d11(OVXW_[|@@0vMR*ri0nws[ :7Sd4 :0b)Hh`g i j@LL A4 HiH)='d'v:rS{F=%b4``!0ҒYF~걀P@a)Y-3+]sw .K&C 'dZv?o8!DK."rpԨ1QI-9kK,\0izZ =`'7}xi~%덀`"_k-@%>DEp%r@"$K,]'GH Io J䌍m@0R^+$SLucm@*&|,"P %n` vJR7 zj^e)KТ)HfKH".RJR"!+})H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR""+})H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR"#+})H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR"$+})H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR"B!!4xPPˀh@"7$M1`PaEԍ[<pE~v Td.H 8ad(QY; V04era_==g9?g@oa?.p L0[J.lH" })H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H" })H".RJR")H".RJR")H".RJR")HR)Hm R)Hm R)Hm R)Hm R`|<; ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?bb! .&$bb! a `.1_ # @dR".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".R+})H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H" +})H".R  b $ L;KR;?a  (@4,"_bK/w&rO]49)L;7;0@; mB 35Ĵۯ` bjP &&,7Ɔ(B E|]-KCPЏ5}Q0XpA` @*?%L%0J-#\Xi"JLN MA\ɏQIŌFH07̼w`` C<>v6aeh^CU҈do %% @,ΩRCS~|0( ?!rjP]Klvh@,`@`@%05$v -`fB=;lЀ(vIټ>zM0@bS%W4`(_S=   1$g?|*d|;n<- *LɅђ'stpSSy&5[է,Kg Z8RD^'zV5gRJԴpn}u”JR"+})H"*ՠ;H^)&ྜESbvۯum<@@C i{~7H^Cn|y ''[qrnz;IRC\~E -ճ-1k@C@BtVb (6t4Q,HK̇`A_AhB3.*4 R8 Q@w*!@aɍܤ( ϙ;nV9JǮ M҇l`?6T ^v`a] rdpsz:Y/qIGpvM ?`š IEBS~K1(X&.V-!{$t=5|[`)a콳=j]0jOJm%clQ$nw!F ~r "C('l~͓X+I ; )7pC -B&ޔ !/KĄ!CBY~V:/! -R?o/u)=!Z1K'㳩 (Z:Rҝlvʰ jl{aw776Þه PP KF,0cF0%}pӭATL KzSӒS7N~su(0(2 ?灇7sT % -|3HHӝ=g_ ; (dpnHa'[i 4S!$MĴ^mj2;#mmc5{ٕbb! ћQW}Mp> `  ~Bٖq{j %s+%A }_3e!swG^ :fHhi[+) R;: Gvguvj 1ӰiN,Y[HB2Cz2;^hh ,%(M3%8b۝w85 0&t~fܴVQWT5;6 ;ʮ`ޔWJB[/q N`[Mі+tP0C oI7J4nΫH0Idn Gc7J6_{_+~ !);gvD2Ɂ;>+W^+А{mR|'׷o:JU)oNM NI0fmu@\إ)rD#})H".RM1 d'-)9,d'/qdH@ #D]VV @1(4ŀXLKnC&p$QF=*(9)M)p4}zQҴ#,ԄH62de°8R 8({g\ELf^Ņ6);|f rdoBPJx0~V2"A 9bybBw~9/@tn/p=Ī / "s߷9rr ncFuTi)7H!}7u{i- m0XJJI0B+줆֔j?}C;J vED_lJ C@`RK,AU;Y04^nw^q0i៱a^&*B!'HTQ@(~qxHB6"J8`f,7u~8}KS1h%8 ;YJ/~8c/Q{P Q~y(A(Bpn1cr{#0ZZtEIG Isd224D4Mђ~8."aaΜY5 8]H/XWԓS?P8|-," #})H".VCq0e]wԍzplX'`1Xb,}15$xp ]܄#?E=?!."޴LA(1@ u>y03I산7Hl[oZ׾/-_ؤq;FubsEC󈈼&F'!hI4f!/2?=1ެE'm[wnhAH `2Se#*"B`+t)ZMIi70AS, ,EMH Hm&k`3IO=A@' BYPjq:&!챉A(0rxxh@ IA ibu9)$݌d' 9ғ@@0jjưXޥuk 't}3:jB-$?AxpKI3t_8JDMnl%bXbG8r@0+dS| TEI`(?iN y5$( 'W:)ۿ+}Ey4[|ɬ9~di4^0 KZ*(^nF {%(۶ ;k\ SzK%$'s^C> 5(ZJ?CZxh!TbaAX}DP)N3O7ݮ >}ёjW#8ln]=cT84QHጽ- 1 X` 0,3Uq عMp$8&kDEI@;;s9 rsQllqc}`T uZQ I h3\E[D\)})H".]`d˒פ C@:RfG 0bC1{dae'nv6"00TѠ&VT@ @@@vM!C(L!# 11l@z vbb!!  /0(y4? :!(8d 01 a@(Jr0A7 ~66@ߗ女B!0&=*C'G,S`( )8az@fx /lYE=: 5#fC2Ӄ){}/1 B0ܯ`!tp p!&bRHx(fJx v@f@CŠ&%$C_HGJT'nbaAܖ>b%!9!P ɥptY7Ҝѱ+Rۣ4@Xh p 0&Ʉ0(K2bvOΞV1 /9~TP :@tQe#ZΝ^bs 5P2h BP+t? Vo+d q4 ļcbK,VBHGC?)"?milQ_qH4H^P`W{uy vJ (03o&^G :8f€Nq0i 849lZv)=) '9Ev o~t~2 D*C/PfJVm͟@vd:0 2C t @s&f@?4 ɼ1 Ѫ!JJ0vD_tԼ` E7!I 쑀Xuq׈+l"X0q4 IdgC& D6!v(aD(db`Ƨ|I(m*%Y4>FXOcGJV +%'>vu;1&VsNcgd߀.&MAHJr~?`>" 0 dǏ'`PagɈ&_/-JNF&'7/`oY@^hC&Hi1Din?wq 5F =P 9J d %l_b_'#Q d/ 1ɽ$.V,g,iJs^P `,AIK~?)g7IZH%JXb0yx}{v 5$0RZp @0 lQ4bP3 N&,ݒniI&md3/u`M :R Zz}ם7G?ߛT7m٭`&+qNFҟ߯vnu\$ &iy, ` q,1F%M!0NxU O+'aJ&)%*{,Uz`Xf)0g@1Hi``J/? lI:>T k^N,x @ d )=#]rӋ (:x´p Kaun'ho۷ݏ@<7үc@ : w&;d l".R })H".]Uƻ Aܨ%ip_P~ i X ta6` Z@7AB"/5-|_ 8BRJ01$ұŕ"}n^W GxȜwÅ>Ҁ.Qv8͔N'\dII%'А`% $1G@<-DT} 2pakŁR@&6X䖔~u44 $/ܱ -?mGAfV]Td$5?M8ΒR8iP V4@'KrWIE|5 (" ^@j5&ZK8tK%I5Ͼodr4 MN' "g@d, G%qBSϷwSe¿Zs;)g^ I;l/;A\0@C0`!P pjI#pew!%M"&ӂ8a1̀($(7 Z(FvNtI|Ԡ QB߬[:  C+d:ְ*4L̼ؐ|a 0bĠ 7s/dW+c^#\ ebQAG# ;N|H`& !#찂3읷S&"0b܂p j6% !Xo_\P  x @PN {4ntN~77LAh<0  ; (002J!7$5b~鈿t}4jM` h@P0@ ba 0Y/ QXaE,mh @0@hXK@ 8 &A(g&#4`bBQ Z @@Ln`!&P H@P`$+ɅdְP \` J =/$t a t4%RKOHnI@c"`x f6p @rh` 5#P⳧ A)`z&H`C!2Y81#@C} @ : @uD4dX<u$M, !c[_ =@U;(n * ɀ1&8 ` Bri YedQaL& /.8 #8R4X`dth &`T 6k1h/8DE<".R })H".]UƻPC JNH`"Y>#"` qv@ @&$AwD0P*X 3a!Ubb!. "p20Q10]0C,EGz BD^8,M y0HJIdԳ AC NZR\Tɤ Se{itZR a7M/vB}2qhfO# `:G 0[.0OJRݛ0ha`! $n/;l3SJhL@;!L!-*'d q 21t7 @c)&IN& N - ,Ұ/mx`U:H/v7 3 1$tn(!Omàbpg!H}8  ,$҆l0r~tL@oPO(5?JNC ~-^R@q@SB82|mɿroOW] P@,5C !@0f%@1+/{N舾H@`Q5a )9o쒑rJP7P>- |CFܢ /A?dɋG+ٷ/@PcW0 dI4m 8@-v1_`$4j147d#y[Q3|)g"4AEoNcwsԀ:;A[ Kqh QCԡg7\X,+ u?a"  @10 @v`Q&/;eDa$3 NHG|!(o` =J@I3 P(L olߡ.4q^"(@/ #&@NX@`(L%0 R 7ho ԬT @@ @aNj5P1n%i6ŠmPѥeq@\ ZbrXhϓ@~TBDŠ/BjrRa_pA?x 5/b@a\a#7o&=Dݘ!Bd6s@E` v~h@1,1%by7B!p``iAޏZ{! U&N`0 |PP O吹1S8aoxh.laЈ\ ;v= @NĆ@p 1l&PKnjCW߄H@  P;iC;I aQ0NFKxCH b@W|D"  })H",̙&d.tR{^@;Ad,WN1-P `:&ɋǁȀ^77&J7ZÓ@|E F<~3⮸\P: @Ŀ*j Q4ɏ Q{^Z9HWJp=/(phyȉRFܘi3d/~ 8 2o(440>AA%!!%#;lf7RXa0PXx!]fK>|d> JK< J'k:`@b^ &(HiKܴ;vv6ɟo?}vfqAPaAB6+ddv!sN=%)GFzbRI{@945~+}iKmm20qߗO=xͮ(@Rid4 NvLcWi@o/LB@,b2tώ0f) mh,m{d\ECQ5(5!Рrq0PvçFI`;X"fdk`Z/\vc7 ě]E@j4[.Blzbb!8A : udTEŻ0|"ЈJR" })HRFh]``CI\fq#Qڀ լTQ+֥h !0yAFp3: ipVA$!0z !1'y@E@{4_uiB/A$&/爪} bX @|4v1-YЇ-4nr`!  RRy\Y(vJ- F-!G@퇵԰*5e!^8B1d2$^VA'&a4Zgfwe޼4pԖy(0aجn~eC aeNJutE$f I`'H&aYXnfUTB $Q|+91nQ Lr%;M8oʻ)&Ald4EI|WtZ¯dJ8(PCIe Zf U{0i Q0{#?l=WXLzjM@nBg & Vb`Ԙ\ܲ|64``H΄%Xe;:ֻbZ@Ą^dI^72NSmg $i\Q3 tt8Ao| y003뤢JAcz N[00@;&Ae ܖWXԶOvMǀX `=I &J-ÒvD[ !Ӻ GO@#oYPd2` %J oƗ@Ը7޼R`/ά߯Ao _Ōâ/`x /I(n - ?G춨!!A J#tz] +0/TP BJ źI_%+dYw,@3Oha fCI0TEf@D!Rf+f&btН3~0 |7p|HOF+7r_oײ޸ąfrH ~) @ p#LIh-`j#|㺍d0@lL!ؖZ!%!;z!  :JKQ,z{R` 0T-0 >-?GHFPdR|  dѬD;(%8[9!=zp `0&&QIJK&w -Ķ@PH@OZ@?@@O^P9!=i  ~"Ԓnzzj40gY@3,ݎqЉJR" })H".] 5 e=Ļ@5 6Id0O0*M 8O$|EGHhf@^.`p@ @<&Tb, CFԆ K,=i\CP᡼N!Cx07%ua @ aL: *R YE'Y_'?ou @h T GGM BzJ7ݽj7`ЖV~ˈD@K0 5!b@M!Z@BAdi|@lOf@6kP&x@Bt_E &2 (b7 sҎo12@tlZW&@!K%㒎gr"@0zF4brpIIBs'nV0"a @aHR2?> Xg?}ӶdJ új3'vutJ %ϖ_+Ut4 ! '!%ЌKO )#r=?@A4Lv|LbHoņRxbphmpҝD(ҍe%S'QtKL0`@P5Pb1El,i[a%k  xb4$dpЍbb!A zB  @nbC@N@t$ WK%+~{X3 ;l5 T1Ed+ mgˈ<$`xxb@b D`X RYA&( Fvo@ @`T !d $Lbg0`jI`15$xk^Jwz` J EB~IE8l'M.`'&KN@h`t9 1I f @@V0 H*tp*xCd'oѓ ?^x@`8 @bM=4K%Rha0 f٨B- ~J&8`߀x8>"@1,'p` 18`:&Ąxxi4J! \D037p0  P 4x$&(-U C0- HxidĤ cI1+ziyq@b` 0 r@dx$&PT$ C0- Ha%.z_f1&d`? 1,@!p`M- $e܆  6!;k@5 bp_W@aHOg-QA( P `U M!YAh p%_@@ NG~$swG8ĤZE@($"j`T\nH[5olb S ; Ġ2CSR1BwE#@bhAeɉ4-&R A `14Ĕ+- \ތ4i/ /zRa, ?( NTPcnI,sR @ٺ'H0R`3bY4g~t쌾e5  TB@jKC?`?:na@ 9 &h#A0 B\jK g,fG&LXhj@fOOB#CX]O0!/L]/i_ِK= tq`  8q,}X @`h @b`HCK!%|ܬB ~f~I 0bԘNɉernnPtSlGZ{e7 = G,_@:PonJBIĖ ))C2wNZns6! @ @Sp1ѝn\4ɤԒUhA, i/e-RnRz0jJ,ݜ{uT\V@ ) Ӳ Ru,hg,R |PQOهa^o)8'U447-%3%)C?O@vBɡ+sa[ސ1,(gidooͲk r ! F)B2S- |Ν3{8P4C(%󺖢cm@@ 0prӆ 3PА{arL5 ! 004u[fۀ`o9x  ) J ZxicF7ug2ȢaI۹xicd HdfJFnZ ξΟ`;C&~[Z l<#ހclLM- O@ԍC>H>4FHCiAJ@ސԒ/+_ w`bb!K at,XhV|1lr}P@ gf< BhEX1 *XaEĖy/ Hbr510 @@(` b@:  Ph0o)lѪH30W@kf΍Ksc=?%X|@i03QȷA(1@T0@&0 4&hLp.@PRˆxҷ@ @A\p  h!'dɄI JR4SE4BF(&2b MHjS@ Bؖtfoٴ`0/ Ud I3sZ@VL04@ `hP*L&Tɽ.~黸/4!'`lX44*4HV) (L%VσPh/I+@Ri FŤn$ұ{}ۡ/'5 [Еdu܄(3 \ bR p*CC@@MJܙM9IA (7;Ddp`f&G&dtY e)ѵ@0HAHNMPhA- :Y/nL5U>, 3(*  0 C2H` XrY KuN\EEǥ)rD})HJs,8hRd_qntp(yDԜ5"' J̐Fd;sBj7zLซYy ;&sۮ 0>  hZJ!M&Bhi Ba€D%44ԧ#|/vL%7L W(G1zX @1)~b`!&;,`@x:7#rZqXcH@X @C@/945&i1  +!hY dgZv d 8p^\I`o堢_@gܤr>4 p~ 7 @ @  N`&8X#1`1P0(ЖNJ!4 b̄0 *(M@'i( BɅ-11 3 W{b1szBt,oI-d R ;~ߏR TA0 @ Ba0B& L&(?9mЂ 4-!2n!1 !̌L,00V(4JRy ɟv/(]pp]$0`iewN'}^{ @b0 3fp @? 22ZJ 0 +Y5Po,n:P P @b; iA0D"jD(V+VFVwuwJb p  IY bR/(ٶ?F@t 2&B'ၼ4W+(013nZ?r "@@'&M4(RfRܮJIiI{] pP P2K@:, t A Fl)Jy-?)) e@@0̚C  &4 J- ZmY3g%`\jih 9)%Ѯǿ6M?\ &@ JRQ 0Q0CpGVvٮ`x?,Rɠ@Id CY=)I1%{nġ|s0դ<`J!0|PI'txV_vD @ TT:|Q0 ZK$XklL&o qt 'rlL&=1tnV&~%^DhHD bI}RZZj#|zI= bb!Ta  uP@A5@ B HH0b!݃~r V A@ d 9@M2Y4aP+ܶ2jH_!b_x2rhfB5;w)#>Q0^@00H`1,$DĤ0aCJF e4599(P!5 Cq4!X5jB%0ӱd|x!Cw=<f Nd!)#Q .7ɀ  @5&h04d93` `RF'9 e6T '!. dk`bPP 56+% :`Kr ƗhBQH͆Hݖs/ h h@ A`;bjL,ohMAirhC@zwNF0Bb) 4 Bq7D֔fw7 %@ C @vYa%7ٳo6Vee  peİH ,Ā蘄 $g.ZnnL!! pbXB bErJ ܾnP3rNKH6FbPT6'}p@v ^P:@b%44-%(K`3.@Rp \404 eK, & `6=w'rRiy9%䒆%fCcC0R]@@`Ʌ?+kx$'%QqCirD})H".h Cu'l*Vxr(L'X@Ԉ `L?qz0@¸ P욒f Ix4ZC8N0A߀v %%n3߿ôʩPL!P䆧5L ΫY! WFb߲NKBנ`P+L!cIIx0 6- %Q%ll@ zJ)ebhd%h 7%=0a}F=u BPN+(p@0pB?(d/C8: @`)JIXԗz2Ys)wLDX@'7bD0OBC`ݪB ]; Q.W3$Xj8j0qt!-JKt{J$mɀ@') WK,bKN-< 7!)A@PO倥%V+k(@ VpQHG0`)O@a|+n;c -_Ajz0j:rw qa۝"dXpa1@)$,XԁiBF!;d71$MH%`{lҮub<*@ 8 ` p @`aZ>tWt%{  0 0 & b ۀdž ,5K>КJ5#:u,H7!p _ \jU?( $ zIEtdwct|L,ܢQ\3~5;λ@b0(f&Ryۭ]@5PC&(&'|Y !8ݳ fF+Z:#߫-V€v+tP C &|+equp dǁ^MBK #!BoN`d PR K `N`X啺G(3dw= 0 @0SPh9pSj!b(Q05 U` 5iN`zؚ (i/~Y+#l%1GޜXL! 8i,Zm%O4JA Qbb!] `&1_,@# @dR".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H+})H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR"+})H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR"+})H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR"+})H".RJR")H".RJR")HSDXޚ"֑EGB"#DXER)ZGGZ;B""ЈH".R:)HX^ER)4 00/sw5 ' &kts+ӓ|K` ou|_XpF&_LM!a`1%wg;vy$ 7&ɣa֜>,psbp"  J, bb!g! @ KJ!4axOG|d^C4Q#уp1r[=004sw5 ǡ(ىG]LirCv$|RWI.]^YT-.<}Y0>1([3!P`8GNAk퓺?uI! Ɗ(1( x <{^0nˆp0ҀMHTy|7c @N N@pӂT|G^L =n3v*!0`;O4AQ|fYY)K}*!)OsCuA JŠBq7&R6S| :)% +Zs71M쒜R1N}3F#\mm} @@tB D_:  @H Ġ2VAvazhOA3;2!$?8Wty0^<%T_I{OKa9w Tw;BBX_HO&m1%|/M&dW^M!~QFl%>$g GyaHen=³> ܚMa_̥i~ȄI8$_ A5w@@PY+s7_r@0 $y-(ԿŶ蚔R$|g!OD@ ( 0 ~P2%?71!@w鲑JO`;&6 %pߜ#3?/潸N(r G{EjqWR|FLp*OR9y@90X"d4R ӂX̰>X?!IA_~^p7Rz2])!Հf,bCx2H`:&@;-x_}(Ok@hJ&`L C,P~z17 s `K @_ؾ^_lM  YafIINrjwoݯ@0 ϰs TM+B^Cb |0dɉĤte ߠ@5yo)p1S + v9^Խ A ^X |LH5TN6\qi&>R`%"y1 w+UmrHp<5M&~anC@#oB`0H2 8oRg`{M G>UؼYD4t n7u)jΛ@JHLBt -"FۂHވ@T+.fNVjl~WNr]?:`%3}`+qCRM/''m2K~eo|`\ڴ@L8:@vZJAJA]zKF1o#/uʱ٧02T^<@ @vC&섥ƥjc^2bb!p 7 Μ%}rCId"_O V@hzRɈ,5/tmQ4 ܃ypr,B HqN8n@`|a#_c>dlZ@v^Z~i`g%%K=wEJ)/(M,5uEK7m@ Y$ѥsȔ*B A多LOu_B_ow{$P$41 /1JS{ ("@5lVgJG2gDΝl97&/j{JD\)rER)JD@3})H".RJR"6@D `z@)$g,f !?  &!+!WlUIx 5J^4`\;*,  Q:z~1P[|BHͽͪff/!E0xp_#_]M-$&j~ B9g6,@`Q^0gĦ֞ ^` ӹ^צ +I̖14 b0Fրb@;HH 0Nnֈ&gI6!yWՀ9?Rh, 8bI(w})\lM9vِ1k7-p@(!P{;q> 08%~p"@"@$_$ b*R@txPy4 3 pl tM!h-@l 3ƞR7s9J{@!&VKfg>[D:( PsC HbD'}(gwe*ءpW=PB( |D CPS{ˆI! @ V ܔ(-d(!Qr.:)2~OOYף?,^+K{ X 40ϰW\R JCFۓCAؼLOG@F&tƺY >~׉TX  h"rQIBNWs>-F]]t@J:'h/9`'pIy0'8IŠI_Š\./Mb/'\`!) ,c F~+1)0 _(0xl_БB ݖG@@&noA>PG9@`Q\ Y@+ }A7-zN@Ilr0ya\?q`9n pY &+|`i4=[,A)Øx=~@bPՀ7rƌBF`P D0Ao+{l'"&ï$ @45Ԁ V@ea43{_sr%@ܢ,ΫWV7&r`+sJK,a|e}WCWhT;v8(yt9) O 4K~ļNoSMV+Oх%k 3 I5)/bxrIWB/rҥru  ºF(1 /֎'s QhbHŎn,/Mu@ R0"ljC\g?8Tɥc!e4Vg3p> L(i|6I{1U/$$@ƒ R AH'k_x} ]GT - fo%)t!|7]Zl:5/4xe\G"klԞOYvhatZ`;%bb!y  Q:Q5 ϸvHhZLG f|V,B:ᤚVפVi4W8KDOz '^xG^#bw&M|!$n7b[|k~N!Ҏ)deC JIcJ&!`=]NBqr*؁BA0D`+H`bw B =5 %(/^ ;g valzoNeh 0Rh$=0t?&|3B(_!;(b0⺗ %\_ (%h$GzB !):8D3u|R3Aify*E1~﯀)ie g'xR,!/#V5&jP+'r} n:$ Ii X c ~&nH0jrỳL qOt N؋iƽ !7׿ctzhR")H".RJR" +})H".RJR")Hb,L.BJR")I!=xCݐ1}" N'&xvtIꄆZ41B0VRRq%C5Q4su&4I+LddEK^gѿ^{|f;=( 7_N_w ( ":Ut1 렂b^"$dP ȲyQCV$B,ttEM~IP.^@ b H@7vR ~gc9a|dQ4''sud_A 0k􀀇&O^+9L? U|P*Pa'z`I80:@؞}4r/lLG 78.aX?hB2S65cEOg=GBtx 59 n#xkb?xfczLn*RYa>Wew@hZ8 !$4؎Nɉm@EO0&)Iǣc^̌(c !üE)2>"\ʻ.IBu'l}!1@osmgULE 7{}`x+d]_"Dt=!Hic,RJR")H ;})H".RJR")H",Ѩ %E ^/D]T%EG$ӚLE g rEm{1  4'܀ i!ti'c@3&  WA$Ѽbv"ϒf?#ЁBzoӑ?b@p*m@ID00Ma Ř^1fםPװ&ĒyFCpp~LG D^Brtw}ootaiԞq64 &v'+DT(d!);aYwEɠd<!=s@`:o <`,B-gyHW6j3‘͇h6*"w!;&䘶xڊ=ݖj^ )Ɔ}źHᆀ3`(8 А Mb` ;PEzPvaYbžC9 Bp̓Nc@\E,=$ LFw? bpS;TBEK&=)lJ (?=60hJQc>}^rn;H $fZ0}=Nt?Ma hX[R>44EK#Tabb!A jD]6@263KHHEl;B͇hQv} EER)JD\) +})H".RJF")b?-'&!\ECvCS)!:.BZEp"/K.P1Ii-:#mxFD] P:3i".[5,7 _XR< ! /Ln@1u@#-Ό.jC9Z ɈB`Q9c+=* R[p%֎#g~P>  ?VnHO4sb2:;"<`$7daf !]+OZ-&|Yi i`d G2"Ab' :dEbz$i[bV"@ގ Zr0~&J&`2Ï݉P1Cx<dFa=   oPR:8vLa{[H㆔eA1 Y=wQ>"`` Sua:H9_ v'ל(Q5%|Yu$< /ozX B`0PR/ZbYws:&4yܴ аHӉ}/Yt@b@W.\&C;:"1"/xe8 4 _H` N&p= 0rgՕ]O̎b>_~zdtI@G*$PJz<B2 3mzz+*~Vpqz0 ц=3 #M;JƎE@0s;=- 5כ>+!d >xU},[ h}>މR(5 ;ލ!((`jPxT ,+uq)JD\)rD +})H".RJR")Hr#ތo,>" r :̋?Ib D]Oܴcn )Om" G6bjq0 ko|G.v_ <0CWF%R(-WX@i|3/jFdd;~WX~0hhqýQ Lj: W^Jz>؞WdY-,;8"XbD^o{_ Ѭ@D2.|EWװ`PT$bu@3$АCKg]bb! k  />F.AHʜ +v(҂ïhM&I%XaI,bR҆qə1Aa"[#mV(`S G,ϱzzB *(X7tؔ`}*wy3ijAIy.1{TPHa{DTl ~>NjBH C)3`T<4K)j;."P ٍ#A! OZK-Q>";~2R@ C p0.{E{_=p@')8}3"/r`jY8ۄܛ @20(J0 PL Ek!(tH @h@TlL)/Ɩ_wO6"P?'Y(צr Aר@?ri_Sv2 H Rt^ɡlk,:&f2@0Ѐ]  Zr Hfy$)5 g2"_>$K!\=y^L E;u95<Znqܿ/ .`(TJâ/ ͱwWe&up~gwXY,=u:rz/BJס&:"֔ER)JD\)+})H".RJR"ZR"RE@1̘ @bCQ3?cva7!/1,D0*% "  'x/&h1پMzDXǰWBhBќ*ߔ=8 @ņ 1!wtqlg`bP H\7VN1s/2Z'G]S?m|10*HdE ut>!l5=;u9b>LQZxG8@ >AD" &=& Ԍz9.πj %004DYr2?8'"@@ 3ѹNM)G (15z~"4_8!A $h %ayvXUH C 4bJb&I>!8x"G"*IB ub@$pwvi0JA/7؀LE xa T1 ۬srr~!Cp9e/`/ gI{'|'a`,ei 5J'*zC eDn< xAl7g|wp C A)HN7P}X `C!RZ22n '뒊ۤsߔ 0I5<4Ւ[׭ 'ր?@jៀ`B/G)Y%`r\v1(1 )?^;+B1ر[W9Y}`5X{3aD`*y5`HA9| \҇53>AV|Y(~wް4Yc @!%φ~zi `E| i K假"8& ,MX @wؠ)ٗ|@' (n/$=ߝ|A~C.ʼn1˃@D ZNĈ}J*myD)Ĩ}4CG<8D_(0 -7o1z\bM& aa@!&-x~#"D_@I`:=~ƎNn^t 8x}@7!Eڐ bp#7`p!>FVtk@%si>)_H7vٹ) j@@LŠb/n5{>} wݥbb! Z @ q/w.!t9Hٲԭ$C.1&n !~tpǟs@a19 d؋>nL$ OkpPg>h8s184Sda#]bNx 97f|SpMA7pc[UyRѐpDhPP(Vxw Qao\M$^߬UCS[`dEO;/ Ri G~LJ h,uţZDz hGIQhŇݤ ӱ- ؋0@t $= K#6UD_]y%o}HLE\% خY GbfJ?K$@ /xi4$ 0W+rXbByaUb805v*Bāba0u$CC ΒAFVt~I0 2 CIT HI[+ ƸP` I`\1 4 0Rv_<dC0`%PK94w^q@T4!boJ眏hš( @L`Id%Vʈ|`1&?XvDQ#4t1Jx,7~ f'UJT$ D#W @`(7X{wlw=)Yb,E bhi;vVX]!Tnv¤s;E^_O*^h Vad!V΄|}#g a9:X5 Q"C$7^ @ 7hIHa$;:}D#pFYюq|Q|EY!M䤄+q4!uHk'ty b&/R   %▞,͘־`bQ0e`.B/l(_A'>Cv9%e̥26l)W` @p" Hb:v%'.Xgt%(h`0d (a ;A(j:wƉ@;&rH,IItO;vJ9GlibbX&)@v TP fg (kdљُt (ksa45 )1L`V !P@(f 97v! D8X;x\#<W/,F!n^{5<@wքq廍Oú> `<|  +gt!oEp % PbBc6`0 &0jPfBOXk͐ HYށYaOCHi0NGq{8,i@RCr@}b8Ĺ|#EHp:9h,i $7+3BY8Ʌ.O8DM_DLI),:8G+!mPpY@T d,NV>NqA\jeaۚ9dNN C$?bb!a [4EOxJ! 8:Ȅd##:NDy⎽ Dy])H4{M뼔}|pr^kDjb/t@λSGLE32[ƧO]D?wH:":JR")H" ;})H".RJR")HM$܂TLE :t$ER1;ޑ$ͤzDb/B:l!cI $_(GX-::r 膀+H;-^M A4RNW!#y)9ѲñZ1bJ@W\G$\X =ȼZ"a78Fp~JQ_<7 RE08b}InĞ$Cao6_e7 1@xb/X̰ HHFߝ-u0dKt:6Ɛ ,4EYa'qFuBa``_9,YJ=0P ā؊` d8A eVPm @ngH@c8x5J[,Q3&;D^gnݽ5 .1[9a!B K"*l'`CG?mg@@Q,*ӄhḚCtbB‡ʈnpΈDy%u$hEBIgED:HV 0-"/_!h)tDb".RJR")H3})H".RJR")HNᄛa&"GI9GIf:ZD[H,yFIX::-wpaêkrEJ|R ^d ev&@m|`@@ĀV/b>00iv|_2қ+\iu:G00Q ]icIO&R `rGmyOJ ieMh ZMXV30/ /"V#dER-D;-tE(`COKД}`R؏/bsrr2n8۟Z^7+*"v#oR'PQ/;bj%!QgDE4,X:ٸIiJߟ`M@WB >'8LEKmHE_&0"Փy0P"04~Ν:$0q ņLw)$'2Q*_'z?e64 HiҒɊKu*_W SczmĀ7=XܬdaEQ /݂: ! PGaU pEK#m)Hau A9מ(.R#LZr5!|uB0>!߳Z4C@ Shf@g I`پ0 ?gw_7]CL8N?KM͈𙥈JR")H" +})H".RJR")H0r@bu&b/ΔHNQ#IrEdz0՗pG"@s_XvbxwjME@H].|ER.NH'D_ xKSJߑ= @@Wf%fH~;W< \0a ; VztT bb! - û^405!|M: vDI%Ak10i,Y(}u4 & 1?Eb2rEQ -tE $t(1``~vh)JKIyHQե#v$i J;""iI 9Yiú3ұaCuad MPf}fM"H::"̑wh\Ca X+d7 K$ 3( !IeVL(RInK̨ۖ߷og2̓x I`PъG HR~o|`4!%y;p38JGe d', ~RLs=_p@ )N|COp$ۊXpo,R805EAo T'Rs㾈C!,R74/7P!h#|؅ œ-qPp0_+Θ I&Xa<˰7X$hHevrTyӀnqaxa7[x 4M)$%tu?l$&'n}@Ĕ 1;&^C'?ݲYsKwґ ];&&68R^@"Y[^C1%vb7&PjJţ>}__ io!ܢg璻G{r0hie$0z@d^Qk Kuy/?q9}4-|'؋/REoݺy@#fv;dtP*4 # n[PC5|*CJz\N`399|aO}0 '#CxX<8~R%tK)|orZ BDW F"4"bֱ.CG'2N S߁c ]&*eYaD_ƍ&ϱ(A&cr9kq L)U cbM~f3`An)F  J-Q B1Ӗ94 e$`W!}k`v p & xKrJy3y.RJR")H" +})H".RJR")H0r@bu&b/ΔHNQD\)nY#ސ7,FM|`eLaRM/+o"o"rEˤm 9םk@Eu0;A  1& z4 @Y;6lE_7/# BD\)rf"b& !F_ @P3f,ishaX>[%"I R0nJ\3 sp` y Q=!YiEP`@ 6GHI3ZCRF3$?Șuds?l^DI:` KF`(ϐεh\xp;Q%BA}E85ChD  Cw `bK@b+v&4@ I#m}]*tE!AR,`e<ЌefNJPM!VN )%g\*ߧ,d ԖfN10܅J@k}9 ۶Ywۀ<` PM(fCȳ bb!! x@`@@bL BIP5 )+ah$[R 79<ߔfR-1 ;bM3Q0 IYd 0`t_^ 83/BC3!ϝWGU_ @ !4551 TN>H(ri00`SIJ- d7 R2房7s@@(Mn_^8Ů@~ - ҹ)`ǖU{q@=@@tH d5(gPnGg^;~o&7"#".RJR"3})H".RJR"#^L$riNPBb/Ϡ+ HWr\^7b/h&+Y3֍"+<%2$s :f"cb.FhH'\ۨ{DyuDs@B|b`Ԍ?4En!$yel`}\3AK ` C@ sԋXCO,^b 1 9Ʉbq3r7+q#ļEl0JK&ncve,ɅCq#q{Q44%!?G|(\`, .1-$(v$_b/aGܽu >pӮ44lEǀB\(IN$=0ɝ3]IDa%Q,]: s@00n@GI?وJ/U?47 q'芧٧5.% Jy[!ǜR sFg]2tT'"*̤RN=1 M_`0&g?7`/JE% T#;N-î# #q];@1j\/Ih:Ih:"4막78H($_(LB X Z2{F1Gk"FAst /Ne'`WzpsS & ~[9ęz*' y9{H~*M@܌[b2I_!;;TY.R# DY$4D3`dBi4$4XAQN(> Gpz@{-|0[>F"V)F)+T3.0;*@Uvv9L /ūh/eDYZ+f4 P5".dWIX}.~l=V`U6U>"B& E"&4E)H".R+})H".R R"aHuM"/ғJ$!^QX7uKD^0}7o>.\À38`x t@ u3&"o/&z [0 (b/&Z ;%x&"YמkIBn6:"Nϼ0(5*1%+̚c2%^C:)&~8gE?"3I #JHG ! PݱEÒ6+9XGj8bb! ɟ 0j]|=\TE_:ՈI ÖriKv,ۼEЂhH m*W&5A0!1 (}1d /$'q1x zW+]7h%zEz޼Ji3ro!b`bwWDޔ '8>(-#\G&"T<,&x=` @DLp%IEu ^w"L φDb 2.Rvɤ.WiatEy\ vˬ,xx@ t;``xf*P]j:L P[p(b/( u1>LE50(b/@OwPa$>@(!v6"1n l)JD\)rD+})H".RR"a9Zŵ 'F:" àuGhtFa}xDfm';DEmF@xa[@@DV?B~M!LRCGYy `zӔ8bgqjJDTa@ @#&`I %dĥH察@LdWTnxqC~ ČQ0Od; ۋg“VOl6 N '?BGJDcYp &bvHpBJ3o;` PXb@K0c0Ġs/6I/2@`Y4BBT%%⓿Jveu &I(G HC@@d clݍs=@ 0!CJ+D' V$8` /e^/p 5 Hĥ J2ad/ 7wd5jÀ@ KEm}Ad0(B!D & F쎆R1 b#~l-~ XPZa3'N{0`M p R$4r1[X5s_mF3PB|7$aJIP97` Qa,%$s-+xhb28} CCRYp7= F coۡ/Р @ &K 4`/\!Z/@B ``(m Nqw@ c;n@& 0F‰0YyHiǣ:/┽hd@`QP7 ၩb+Ǫl@0ON!dbQY$nu,SBl  :%^ ,7$C|x @@*BI,05(ⅎ"u`1o ,SJ7xPx[Q2OC/: [Q@xFal:"6Fíhވ#06o;EQ|f( 1fER)JD\)+})H".RJR")H3ݲ걀*DnYTXQ1UlX# ZDacbq%jEёosollEKhM ^䶻 @C2زPP hv~X} Cc ɍi:Cn@\M|0 ,j9C{H$!`Cdv91+"D^` GlPqLM ;|5@jz21%/P?"|G J\\J@ Rp!#gK.D1<Ome׿)?@G@%W(,z7?"Qlu!8@1?x/Z~Fb{^b}@dR;o{@PLOVIY3* Kv@bR?쭻^gHh"A@ @c3Fg `b#be}30(p‰RD_@HB26CvN `AD 0K &V^bbb9IKg):  GDD_zH-5j@L^nGpC@#``h q-= X`a},`W)+q!# 0߅*"jIJŐō' VbGY@4P%xkjy+mĤDbGPĎ" @$u Xu H~DĎV~@$u HBV~ :+BQc!C6u{};'^t3".:")H".R+})H".RJMkJR"[@$@Ix}.BrZЖx 5{C}.=71-!1@ ^? c@nPAEPB= C MRxoЈ}~ԓ@Kȴ $;  jtF90I.q@:p4`.L0gHIĥ_Ӏ = , 0L(0YNk )zZpu|Y-7~@P1ZVm\Z9I{ĬC 4&iJ+~Ɖxz ׆ @%yKAl0 #%eog}Bz>NX/@PҀDB&`eщhX9W<40 :&i䠐ZRa߻;o"9JrSXJ_Ҹ 5@'N@L߅'UA rTҒc]IY7x4`o8.NL(jT LX% 1Ɨsc@:zX ƤMmQc6Ј`@- КC,>Ʌ^ A %Zv  @vo(`f)0nRSߤ' ]. Ý1Fؼcma# ؊C (#@21/c ħ7'P0@w k& (F!s9 @ɉ4bȖ~GldoU]& ĚA1~,|@9A"D ǧF_PBfF٢*_)Az@3Th@,a(Pa$9#3{C'x}D0 ( CIaIaH5-/" `X( KeZ %0]èLH@4 `*, QHabb!A 0#u @0PC%‹@ ]èPH@4 `*, نR %Hyj9e%)+dIwϏϾY KN(u@ؤwe$iI-$`CT_y@;8) 8EX/dLTlh& ɬٱ]=|ͯ P>"ա8@!9'DXybЈ 2 uLt^EP[v"/2fU ")rER)JD@+})H".RJR")Hk@VB$T~k?TEnRHpY// WD$u.WEt4I,GH'kq u9!j[5 NMdEM7(5D$uWF}ҀbL ({ ^ e_ 7=$ p^5 +rt`SZT2Rpo&sM ̭ur< @`M(caDP̔3`?'s8u&h:q 1L-e;r 89zPŽ&2wn#|g;"E to}RMA )<~n5$n^HuA&D]".RJR")H;})H".RJR")HMv(I?tvuͶS/ 7](I1-d<ֆ}17=(}HIH iS6; &p0vζ~;uLX ƶF@6Aؠ0e 7@1J& $JB[JwH|7{V㼯bb7DCA3@VOd`$sL@d"a5(%p!#nvvk>#'$s{%Z!yHdY_ ,a"ba `VX~Ā9=ᆝvszAH{cbpo^B }t'aY$VtM w@N@hщEgǛR=ŀpi)Eudѝn5 :NA~#_@ Xv0@NB3C,;%+2 O HѝNPN yr,-3j!=0Md0c Jq+?xE7nݘxW,t} +HaI_]:0g/Wvn';ލ#%BKa <bP L!p J F~} N߈J`3SanvYa=());~"w@I7bnfµ €+RZ9mVC90 Rv+0-' ~y9In|U%f*Tñ4fbov11|J P3Pa5;vg !Xhh}J̋7@ 0(C (4QhidW$!"3T`!d׹ N=@T x) BvrsN ]v*u}^h +%!+"]`A4>d5E_%ynkD/r`츊XB&=%bb!ס yZz ]b/oZu4O:D\g}C>B$^ϐE)H".RJR"+})H".RJR")Hm$"M @&"] \ۢ| u+;戱iYI-6 V~j00J(-!r} hk<PAG ^1+g@1M0hPo @a-8~ g6` @*HoWK&ԯOO gF~m;'&a[ u`pf!)L9O^@HBD P $\D[bM @+&ߙNf1 i Ǎp@wۤE?))[`! `'I, ;$`R"Xa10b %twΞܕ!UT-T @0W Z- }hn pg4xЍA`9M@iyd՗x ;P0 aCq("h svyX m/ tďGbu *-=هV ,$Č,47qĿ###ڧ'bKC`%"m`& :kֆ Kp5 AqgyR ܔ<B[X /P@ xK9I7Jhf((fD*O;lt(ө؄hd-%H #HmUpbbQ@f ϟ~_~NA>0)=vjؚ3=tl:?4µI%fߛF-J7BX{1иx~ * i/h0XJ;H }!vMdr7 ̄h6@8@;H|~d `o,8]ȅZm_ xӐ"9)EܚZ8{` #`,)bTh@;BRݳ1{p `k / ŗr!?U/7H[x(OI}?M\p?B'_W~X+Hcp&A f"|؆|lvfDX~pR#IY䵝/ŖzR5ф֢d,Myrt, '%؜FPB 06@ܚ$j@?ԝ!O`d3]yhH+ ' Tmb/UXkawt0Kp⯲Җ );õ03qY 5?nv o:%Hfb_$OAxa7BV_=ո}d+H`!0x")v%A"w+g(e%=|:@PSBAl>C@`-ُ aGwi{?lU{`8Jf=߈ٵ&B dF:(lfBR5 @00 !)&V+ly׉k2l 4!b icF8 -o8}]1Snxz9͹λ'x1œK@@P=x,֠"/H}D y"")rER)JD@+})H".RJF"t#EQ&mS."cX+@؋(W{/ZTfQI4P,6# h, 4&9 !K!CvN4}v=z`h41bJ tuoD@ &y3ig` Ҝێ ”ZJ?(w׊,@H@_x"xi3:ݍG/M{P ن9(Iƪţ;s`ۉ_L`hCKۍ/cF@vB&XCPYΣ_ţa}xRJlOH&.%3l .*ɨ!^7cF6&odR)9s~ @L: !)%`boa{?8TK!@2̲SZ@ ?+l#f)@' [so nM & pj1DBmݶ( :t J &h&ZRY05#[FlTd = -8b^ek@ f  dѡae) Fn[@MOJ,0ԧt'l|UP x6m  3z4x04 _&|VHކf{\ ((_ AaeH!5:F|mca QHi Z:d'2D% M!rҍSawT!0rw.cE $t/?p5}bV)CӾ`k'(iJ93kb:d`!bUv$72uG_%$Y|~G+_^zBFG43S uX&(喜MNoFXdZnQm@LCbra@Pg Ih~r+^XN8` I/XkZ$ Q[>l `@ @1,B Lp*QH,4AHGQ웂X4 @0(^Hhjid|u5=@I dwuedy57xMݣ]hseN}y\u0n+(tD]T( _zM".W".VIxTEJMt@-DED]48UΈ WrUPtv͢/H}\"0x14EH".RJR")H+})H".RJR"#tn2PΒOK /\PMuEqeK@"DK"/.0E4E@t`@%˸PD_h @2]:E}'0%D H֓"#Kiw#<.%܌ }YpŗP OL&'qC~{؀8N^MH`rF#d១ JٝPB,x^P3lLFPomٶt|짼!h0(L,BI'êHbJ-%|:bˈ B` evW%Yc; !dLHj@v I1$R8b9/ts?m3e-^Y~vRIRVNJ%*i4@aI-"Swh,X@ @t#d11(OVXW_[|@@0vMR*ri0nws[ :7Sd4 :0b)Hh`g i j@LL A4 HiH)='d'v:rS{F=%b4``!0ҒYF~걀P@a)Y-3+]sw .K&C 'dZv?o8!DK."rpԨ1QI-9kK,\0izZ =`'7}xi~%덀`"_k-@%>DEp%r@"$K,]'GH Io J䌍m@0R^+$SLucm@*&|,"P %n` vJR7 zj^e)KТ)HfKH".RJR"!+})H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR""+})H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR"#+})H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR"$+})H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR"B!!4xPPˀh@"7$M1`PaEԍ[<pE~v Td.H 8ad(QY; V04era_==g9?g@oa?.p L0[J.lH" })H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H" })H".RJR")H".RJR")H".RJR")HR)Hm R)Hm R)Hm R)Hm R`|<; ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?SCAN_VCD $  '"""\~Îb~tjdx8:d-xx1?:52< v&6+?.ᒝgo4d{?I wE,柂$+gAj+[(mxV,ߌ[ 3-挸RZzpX6tgV bb!A .`edd!"  +'%bb!, `.1  !! !##$##!%&''&%)***)----010448@  })H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RzB8 I7A=yl<Ҕ/)H".RJ~!$`.ZYh8d`= 5Z@1\ 5#ru X8yK@0 @*1,k|0)^T 1\ U&ąKĮ,l40(`B@T% &q)IrER)JD\)rCX.@ M8:BB` @uLW  5sP`@5$8M`@[~h"b{ R4 $8 /(X Rg >D ,c4.^ $ N @4tFB03 +IH@ 8~,nV6 1&8Hf+%p`#| MܘPG$Z:\ `\Zprta_+\0@g I`W~`5[Z q@4! 0,# Q}}7{0@ A4( =HC/p`L(0%p aB`0 ,wIlĎ@>  h$2h @&͉}Z!ɀ`b@ ؠ h%6_;*`&"htB̢` `Bh 00h@ 8 a A` !@B1%_C7k%`rBr0@:!Mp4O Ch$h ,H@h.071]l{@ `/ ' [lYj@h)@/@ 8@& 90`B(іQ7 6NhqE( PPɈ:nM GrWOF]0@ 00@ @v|MAN0tv}h2jJ#@4!"*Z 00I ًBC1- @`က`Rdi7@C(i @t҃ &p'a~`p*Ȇ6!d#f0@jC!< LB3!= y*AHj`@vB @``*BbICIí < bMC~Q]{l#b@`` $b@ Pɤ2QD)O?`B'PICH\hLNR'1v `Ą:pj]7 9J0 Ӕ ܮR@@5X@!T Jo_#  ^ :4%`;&,I-2rӀWnP4">)?#P p%~c3 C@l Foɚh  `F E 8`J@h @E @) JRқ".RJR")H".uV܀Gp`P1 !&ۀr-oRV \x Zْ^x 9 , Pd҉ -)~ l@c @#D`' &h0&@`S9,HIh= \3Fa0 W(p!'W 5,0 @< @7'| @. @fOHb@dX&i0BR@PҔvNWU !xK /?J'dĀ!'!pB &'a)ļ4r Ha0!$ha4,/hR*}X@ bB;I VR r+@wYIJId96 C ;@ `@B4;& 1aĐ1@gh ׈R 'BhR{gC&M ig5')@` ɄnQ4 P <1  uif,%P j`BQ4CPP mἌm XH@ 8P&&*_!Ibb!> a(@Z`T @2&p n@I4 `-zeؤ@vlp5PX`jxKcJ:Cj8 +&Lp ;!nz\P0+;JYaa=I)p``b %3LHnJI $'I bg&›Xc 8B5T?@. @ tPJ&0 &񅕂s /v(LLH (ۯ=X @ HaTPa` HjR\O(  *3T`6 ؤ=A@8N#$h#A @"x`*BJ|YIqbZ@f|$ >^6P `@IAlRJNd}גk | A [!0pG /v(LLH (ۯ= @ x (49  LC*tL "JhbQCwtn@d : &j Hґ Ph#K `FG&X& !BX@\~8&K0+x@;0KIJKAnkGp @@.``@( 4G{0@b&J&A8  `@! `%`YX0^ׯG&_籂x!7b - `zL(KaLL ɀ`xY4 ( @L&@-PP22.r8 . @N0 jC5&hC@A %`ϋ{@8I4kV Z@ \@h 7 (g -$A RQc@Í&0 @((@?Í9p ɀX29(@ H]l*' PC##,@@`=`G ,@ * P%҂Z `W.op@:-@? `(M(haa);2  @LB.rL, /`bCQ S# AE3(<5 th(-@+ِpAg(x䞀P ,\`xPn J&1 $̀'LxhMĐsЀ=p:& {5( b27Ւv- H ] dp W 0 Ʉ+P14ԓ,!Ɉ/~ (&|@ 0 .LH`1!PH( G0 @7(`(SbPZ$@ ! `Q!P>' @b y n+vۋ0) @ O@  %` ezL;~Cw@jA(v** I(el>ŀܟz@2RBdO4 o@j'g A1 e݀n| B@@p@M4($7GH4c~L::!d0Y[H \p %*B! (i,b\ H(p+!RX8Հ34@!$I  )!%Ɠ?+;\)])JD\)rER)JD\)D\)\jR()qލJD\R)JD\jR)JpTER)FWE İ8؛\ b8 @]0`PJv9@I I @59 )e] +9 P@jPC&`P\ (7_,lpqk@PP C@1@aD$↏Fq4Bxp?bb!H!  JG:YhCG(2# ,1 ` H @`AJZ2 Fq@ (! fJ섐2L,% H!hI @jRv)H".RJR")H".R{@! @`!u@tt4,YE 2 @ :^hB,pË+r: 3;&@i7 @h`2ҏne *4@h: P3CIBA= @ @h f .4@` @ `@vX!n6X ` 0 e@ W$0 4&00NlBIwƁt $@`B`7L&t 0y !JX@^k;P`jR47.A7 3 @,!jaTPa{@i GG$E{@L 3]4Fe4}@$A(#3R\ @9) ?ɘdD`NI'X h+~@ri4 9 qB3I! Xm* y4 $@;P  0ɡa)?ԠӘQ`` D?!!<@CA 37 0@ @-0 =-8@TN# eP@`A>sjlB?P, ' tj5<bHHi Ʈ8 @68 9,@"4CHAl0j.x `6j @, 1L娔1 |ǿD ! P X h_!ŀT h! `@ K3    D0Ih( 2o ebup  @ :I Hrh<HJ zH <@ D  pP' 3@K&B&:PQXa-;kӂp@R^X &hA9& $ dj'$Yv@R @W @-044200Ph@Puh)@şr`(`xdj3$%RJ9i N-(W0 :0pdC@|' @6@ 5H`z l4 !1 -:( ^X x@1>B@\Y3h0vP "!^H$4AA.+!(@-?!x2: &E`0i,Jy%V ;H @@i4f r|aYp6_)28  W ; Ad.V<33:P@ ,@@0~Q3 Hh)#w @LMH@4Oܠ,37A\@`A/FP PzN:(􁞐)x}aw 3!@.̆M !:H]P@q @ @9v @`k &0aWT"-"|up <İ \/vVXIQ48`y@ gܾdƿ(>@ eP )8@` 1I+T!!k  lNDL @30@LQ Ҁrl=A  ^8 Za<01 ,fZI'BzTPV``  \ڥbb!Q @ 8t̄AI@: rQCWp@%$b`*C!a0R 8 IhrLnv *6 eYɠ\Mb5Ƞ᥀Ą43%,-5X jdrɠ&;>LKL h l 4p  MH8 RtPa ɀM @| @3@"hAe@*  @`t4 xkB 6,!7 URKqTnXvx @0 \R@@ @X @07@i,(Ϟ/ p@@GAa:!1Rɠ Q HD q`P4 J @;; `  2Ct@t`y_u @i@/&"( +|XxJI4$>^I\^0c*H@ 3 bI~BЅgx %3wp "p@b Ɉ ᜚baN2` b v`@2N IIc>`f 2&\)&bKMpՒ3` @4 A@ 8`&p*L)7g,` r v `bv(roHoRcb>kǀ6fH:z0?ᘆP&sIrRJ}T@ AA)8 ?bC/,:Ai  3X`z@Y @  @Bb@F Bp v7& Ph0Z@`R @@:&C  ` ~¦~N8-E A .? $gY:$"&R`nM&'Z8BrB  +hh"h(vņ\ S|pD|!b(1 `ḘVp?\iAr: Vߔ90PnRJR")H".RJR" +ґ@ 0GA 9`f$@2J?@  #F,  1p6b`070H`!$2h&$}`'bei@B Q;b`a3[rZ\HF>@ 0`p C?|@x @*90 %/A4Ƃ Q 0hp@AӀ!@a@'nX RQR UvD*IPB I4M H³#/H 8 9 P@T`!P7Q5$'H0Ce! ,) e(±-g 0/. 0` BC!@@ i7!e;ܔ(n - @!t`  P",k2` \d00;(L[$-R /ԘZF2Xú~CF p @XZT@. @bӀh @m~] m4ph  @`:@`Pf+03roRp @ FthD<>IHb <ږ @ 5$JbC0L!bBa 4i%L k @  t 0  <4V& !ؔ4 fDA $҉!5-Ї;f%a`_@\ V @3^pjMLb` 8@`ز@d70 }X "0@r D0*L MXh`3UK4;H(Ubb!Z @,f`ɉ(1hvQك/N@01&^pq) 1%!$ C}2 0 8 :|L d'rQl틾KI2HaeX B+Q3T>(A$0% \X` f@ P0#dz .) <Z@$h*Rri- ά>@ 1I4#x@tx&bY0BRz B6$P@@j@<\ \P M 6 ?O2CY$ǹ@hX ]9 rbL P bXbܖ$R@NM&$a@ ɠS%Me*51a?߳0@@}J@r=( P!,H]<-P   P!(HU)Z B!p(3( .cFqnO @2@ @vX <KH%"g%eD H`a+K$I7H4z`$UX4Q+4sAh ! $?1A` @1ZCz! )!: ! 1D);? A`A h<@FX`&Jd%|JrX@h@b @`  : ((0B ,^Z(P`.` 1~P a@7!Q-!(ձ@!A (a40 ptn_Ӏ R`((;pX) a1 ׀ia @`@- 14Adjk~( /nPf\@: @;*P0؆PAd$w k+̮ _`+C@lQ_|L+~a꿩4@@P A5XYaBn:% Md́my@P/ ```9᜘P7,y@@!c14(4aIJj1|.#.\)rER)JD\)rER`(H}=81[ A^!p *@m3JI ` m ` @B 4&:ӎ zE_gdb2 1/ IQ3N19(4}0*M&Q\M|B-,0D  ;|Q4L 4JI_m0@p  (ZB &$ Q8q,(>,%1 @D\)@@\fMA@T(&Xb7tqb`HRB(iE|.n*@ &@, 4!4z8i4"i`eɋG,0~JJGϯj`@ #Nv=` /' 6G\"` & @h`iH,/ Ah( @&P D@2 %A,Y(h Y),BA[P@[d #`p @էlrE= @P@P @*&+4@p!|ܠҀb Ia' >X` ;)%$҉0bfIc8e$?Ѐp_4H d @@\C,ɣ*B)OX @ i ( ]̐*@р C!?fB >`* .`@ | px T4$P 0 j0&l`xb@`8P` C@. nJhh@ `IJ(H@dKp@11:K@ RLKlYEh @f_$P`@k@r@A @8J `' eLɥBd%9ޠ"AL@:0v@(`5 *M)l `mA@5A\@/!L  Ia@b`+ X 5Jp@4@@ 1Pd0 R& Z8o@ `rW@ (05@PXu $IJ( ܽ7 8gQgX @ 4 @& iP@K% d̴nA,4iE@*ZBQ(ZА$9^Y Aׂ " kVZ@ 0b 3zJ 10aC~|L@w%Ah h8t@P ,vM2`i IܱSG"T_,3&@a0!P` dX5"C~NQ#A\rP  B<̠ ]0/ dep0$*!% Ѐ@1*u  ;x3!`eZ &cvNWk``w@!}o $K}`xz  =@ x`g!059 <`@1|MbdK_HIIk$¸ @)X(쀄aG8 PC4$X JߤsO9~L0 <P\C`p v~R’JCRu Ě C@P\u@\D 2/s @7(d0Jdž%roFh h 4, _6J  xa0@B4\4ܚP CV)6dFP{P̄ P` `aA @` C0j1x Ul `'+   a`@P R2! bGZ0g9XX 0`0M (`[ đ4\)\\)rER)JD\)rER'030ĘLP L&bɄņ$%  ! \ y @n0 0]|`$yP B/`T 0h K($gn~`f `` 2$&|@`0, R@n7Bbb!m  AP#`d@MA@WB@1Ŋ\Aזb04i@ eY(5#_1ΟB9 ' +.  !$0ߘ;rh e Հf @` 3$&x#8 1`d#K< w2H! I )J@!~ɠ$>M}@ @h  j 2 lpd07!g-r J 3  8L$n@v|IE|iHHc%;@0`'Xhh q(hƘ;q/L`f  ABX @vd~ri  &Ҡbp @n`*Ck1,İGݥђ~` 80vPE0C!%  =`a`dri @E;MҒ; A4f IT7`ޓxhO ߻gv"`%P 8 <B@t0 1 I4 )+!qЃ=ť@: HDA$'(7}@Q p@cp0@6` 5J9@ ()$ܲfH%g P@n@0 X 4C; '!  1h 攽rI` /&İ U4M q336N@ @ @  @LM@ I0f(C+D2f +h Zh $ !P 61L!PIOtcRzU &C@3 d RCRY@*OK:cٯӂ d $3@Cd@t ` Q bJ)&{uR`!z䀜 T=ria o-` I J fbpp0܆Y0|hf,@@0|@5tX !0$$_ .RHn" q018 /!$^)Ub b @h ph 4#a +Eh    <Ed72j0C? GN)$ɞ );P  "i`T R@*1 )!D,0Ҕ` kX 3&/X @@vyEw`uw$L^ bn&bCOI7CPR[$')URJR")H".RJR")H@ @*6@ (H @bl `PĀ>/eT#L`7LLbI>QDG~N'Sl7/s4{FxK@'@0@`!lb4X  BlPB7=Hp'ד J =R ! 74 $f-YJK= ^ -5J`Pn h@ޡ>x5 iv@ -$H@\`vCI0p 0 bB ( @ 64! b@4 10 vM( PK[P4~4?<LP5i0B0 *B!L@ $ PK҃I3cNk!` ɼ 2!  ԣbM\b0@@(M,FJ[`;_"t@i`~P @4nX`' 1# ܐ P0e`  4fB+l,[h1!`ĆbkYIF-gp 7x p H$lJ` rbbXlĠMGtR\ A@@a@8`@P CbP'؆C(㽇tbb!w 4Ʉ'd@@J>GBC@-% įƊ> A4R5AP. @.(\(HPAYqt.2I 4 @Mr2$09 :F/v! &! J$2 I(K%%CJGDb|J^3 <@?|M/-@6()d0 @NM ` A ;l1@: CL v d 0/UfZJ!$4M @f% d}~ Vy "1@P4 P@>,3Rcw@bSP0 7 İ3`@|@w& @/Ha D0 x0 #t2|MJ & bN %Wƥ`@RX 0>~t=DTgɠ68f%VKQ)  X` ;\ @vI=&I81Ҭ\ -b!ih%$i6C:RF[.9h̼t$0 @`` vXT@1A`&!Li@ A@ 0%n@@ T/s2Kc3 e-XR*Cp|^4p4@z@, p .!5&Rؤv&jRQ7n΂h _` b_*Z`4$ (5&v,@LM (cp B`&BQ5 /)hJg D - A( (wnn7 ZM|3^ n A$\ܘ$ 7}>E:40;H!L/?KT )uT#D@p@' } &1i2 @!H )H 0 i74 (~RXπlP!۝tRLR-,LBXf-~Rl @9j@A 6h`` CCI@_ЀRJ%jSAK p@`B1 .f$BVB,I1&ܜ0jrW`俰l0Dxp@/<t(p( CK-!!&PB! #'~-x@ #hBD`` @Bo! R 5&2C?[D0@@(Ye |P rJbZO'_RJR")H".qK @,@Z +P f\=`PQb`xb:ì@1,P D"x043b쥪e@@0` p 1&%vpA N[bZѱh(J@ !+q%_d)`@ @%v, ` N[79Hh//P`&J`. 0 .H d 8d0*0%1|  >@AHn&h0 /}+0 0Z\P@` LxL  Iߋ+r2;`0L (4~,v^ +Me\1. ` h '(H `@jX C@1,d @4-< 7K&C7&H e+Ri`r T2@ i`M@tp`o$5  `7(` s$zLLxh j@ 2f :b0 zUBI!fK&fł7 bb!a  ĵӘQɈ#L ɠ1- tPpR|Pj@1Eh J<$@j@  ,( p  7 .-<t~$ò *bP`DpRX'f`(@p̀Rݞ @L^IN`]ԙ/x T 0`p$ `  &t`Y-䒐Yj A `'@3 n@ha 4d RaH[`oߝ| KN#X >(pp0@B`2h @.@ Rb/^ ? 1@/lLb I&90q4 C(;$j]v` !v2AH \ hAHϰ濠@ mp @0z9` blԀfp1Q<@2ShH, M3 1  N@ `( @X /IoC@H h 9 @~ :!@2RKS T-@@ F @v`H`!@jPP 1+'*Z,d;8Hy#(4(ixL404$$၊C߮"A0pd@1?8 E*AAX5A`'K ` ,Pj1 `L\ iiݓ|+ 4 x % t Nobz3,cP@mpX@@ @0|`H i9$!3jL, rb@#) $ @ K -ۡdƥ, 0@g AL +d0 H `=!2I%@6o` " vx PPp;b` XĔB@wDZ dZ@ AX0@3p .  CMLvBD5^|PP(`rI8V' &!Rq|eɅ 7H G@` X@h`A @ 0  P PR h^BLV`9vfiı$ > Yݯ@@  i:?G\PJ:%ƠP@0y1hQ3 C4 Pg&b4 @2RMH0bi\|7}ԂT|bb! ݆XAP# P  %\3nBP 0HeP5B<%#  $H2@1$zd0hR nSҀNM~s@ Ah 0@B jP@2P@6ji7otR0ZA AA3 @h j6(lX@ja4ЃCY 1\  "Ʉ!-(45Cxj_>^J1@@T @Z @+05: !@/!; H`) v  @ R l0Tp.py| @%,,AXK@@2,` @ p*aa$c~83R^Qx`x@ x ~0S <~ 5@ ) X `H`bU(+Y0 S p a  `@?}7 VMGG%'bN`+  @. @*l `] >Z@ 4 AM 1!"1D && 0f3@LM!'ؠNR 2L!L&ah hN%ns  @1; 0@7ȄP $\q0O?M I`TY` J@ V@ p.B /1p R!/TBIʾO=mR@4` Hub| cq|  Ov @`z0$ @ @ @ v@B @0HXb_&1` `5 4P[z M`0}C%Ɂ҉p҃P5$ƣ 0腘 Pla ; H, +I} pޕf21LŸJRW\RJR")H".R @X @^8`:0@@迀iD0H!}tK@i#0v܆`I edVԣtxJr C$I!:~` @t4 @tB90n0C0jķ^4(INC- !%98g+p=@  @`@Wp@^b Z ; bP 8`2 K-! 0@qj (v2 hNM}ZB^dw$@ @X jH @LXD ; `:pC-!W SP@p   - 01`r@hp0  T`INQF` @ 藀HlY(ie|1HV@bq.@` \4@ppZhHܐp -;J$@^4r@ A8L!\i$&&3@#88 $`T4gD i`s < % 5I@ tQ0`@q C@bNWdR.ZBh0 LX&~\x%HŝJ)@&P@Y g j` a$@@LII4 @`8Ť(y#*xx2p A0H 4@b LRa `P;Nep @=@4S(A@ ;!4jCLpbb!!  Zsd}ƥ*zP! `@ ZX@T4@Pd"nI `()@cprA@;/3 fdR`? @5 @ ],)b@+v 0 3 =@`j`N> U( (&&2 vp @hA$@ E\RR 8H @ tHHߤ]%@ 02`Jg~P 0N< bZM,nQjdbV}@@l( l'h@(D @P04Ԁ?1/d '|5v@G @)@5  4tH|p` NixB5N`N! q,| ` @.F; (X cnB({$BJ4 .d`N.@ɠT߀-nv`1)j`jHDnL! H' 4.O>B@(x0 5@ A`@<@`74(!00 \LF ` | 3|B(@P$gX]xt - H€-vCda0SCSC>`D@U@-(!r &,0@1 &%t5 P{Xh\ 5CAI, %|"׀ 0ɀ  @gZ 0N@ 6y@@/B_RYdv 4  [0 @ H`@, 2@0! 7} 40h0@fL4wn900PCFu@Zl@P@= I>C 7b&,4A D/f p`(*AHhRvToalá<` FM @m pf?`LRh@ d41(&,&0lN # `$ Bx @ vC&D Qd"Z@,! D& N` dQ$)%@PP&A,p@P)@A)2@1T/C~< Q($ CYL9\` LF! p33.10k` k` ai4 L #b L q40 fxay t6Rp))^]@ 0@) @j`: 0 'E7, x @P@/@ $hXI @&!rB-=,@Q 0`:D3@=bp 3|Bpi@d2,BiW2h(t &A`0B|4YKq/$@0   D0 ih` 7$ q׏܎] #Rg^H( iz _ _F5,!Z)t TAG0&0(<P*^ E;%@T>@` @ p@  ,H 35(؆L|` 0+@ I eJ||Z  @A T@ F>!P :K mh @? @ A Xj0X``A`iAp@0(@`Va 49 4a0B M(B1(/60 L cjJY}??bb! @Lh5h%@ C%]B(P ~v 52@1V  `@+ɀP,h bɬRPB& 04 }|b$ A2;&* PV%R`P &`,7U\@hEj0&<&dVPFȄCt*FEPp% !t4a@00ωx,b6>0. L/'p*40X @fĄC 60 p vPV3J0A0X $X`1"HZt `Š40$a"݉T l@ ? @ n2\M!5  ҖY)H6 @!H T. 0  @` 씎P`0 z1X 4  qz@%twx  440>Y) Qh"EsJ]@= @; 3H >J$@0D0Z`BM@Raf\ BhRM(IA{8N)JN.RJR")H".Rg_>x G$@ 4Q45v@@lJ@4H %5ɡ0Jv,0dD  @P(XbO€hbPKeo@~'$ @ @t`VrL1J! ʸa4& :9xx> bP 7,0wɡh A.(0 Ed ^5v@@aC Ԅɣ0!}g @ `h @'`np! Bp@< I@d’w`M,$%7%0 A0p j _@00@9@9 ! H`T3L +w8@ @=  * `@@L( L &H@LI\(l$ P*LIx)ЎX 7TJ @F$@ @p @ p]N`J Z(I A @`@, @V @@@LP @g b(DA@:@O3\@ @4 bh , `@Gb(d@ @4  $Ƿh @ "f@+A< h @1 !Q `;&,@g#@x4ɩزX()(?OBOP@- @ #pp@3!$ H@1tH@0H@NXok1 N P@*8@`@@1HXA @Z bRX`0(Xp CQ7ۊ t2 A@0&"& L0"3@\rEpBHp@ @@Cŀ8vTi ^& 6 @ @ a, t'Ĭ05))-.0a]H &f ,r1@ `P!Q   S&3}@@RJ  #0+<  ; ! P P 0".`0 B  0@@5vH@2 b \M6Pnx.l @N\vĀ`PAaIJjm@ @1` , HHpˆj`7ܙ1 _HbF7$_ A) 5  a(v@v oj5G&:w634 @`@P@IAxP 0 NJ&!\i`XܴVPbb! =``[C/P`@b6` ] )`` IPp :P ;-``$0r- @0:0` `(ɁAQY'R`MBJ--9Дsͨ8@UDB yF+-'dKdoA& @8 $( X0@!f @ h LaX(hhBIX˒p@y(%@ AX)hn 3 OHh phd$ ].d\ 00h&!A{},N;&I0:A0ᥡ?3f(r'RH5h#x c;H Pp AMP *%V@aȺ  `@3AD02M 1@7fJ,@L@aRQ ) "iEL ,r)(Bq8p  LprP@B "6F~} T2B( (4%Ć>@.ыXnnTX뀀`X@Mx Di P &b@,!` u;- 1(@M/ɂ 7-p@=  5-* Ma)킡* 0P'`!ɿ!ji 5P e@0@-% ` $@TjF:r`ha  @K{p    c %tV @4@` 4,؄X!|$.cЄF @`@PҔw )g BGst @R @TPhP| @4   :̄@ :d̒Al|4܀@@!>@@% A0h Na+0@!!l:jfQ0TR2{Payz!@ `M0 L膁(IHD ½;@nA Iiی)i,)a%w0@H@ P I`T@;.@; @0&^` *&fM/%}@`;p @j&@ f I -C`hjj!#I\q``hL !LaH & )R Av>`! R| 2HD~ o/w,p $b8 \$P5Axp`p Ji4 ``Hbɠ$kY-. 0@ &H "i @ ~@p@ L @3`IHZZCKp I0 N! bifk-b)H".RJR")H".R +p` e8 @Y` @HP@9'&fNV:/1'd|@l@!@&/b T4eyh@ -t4t@L@h A!j%~Kba5`8Ffi"@ @@P@L@bJ @bN 0 Ю0 I8 0` 7@p@1X@ PH S:xPo4+Pߛ|/ [6Jth4@ +a 3 @! C !8@ybb!A 1)!'_AX L9 P @M4Hf; @P`apVF%y@$p@Rn @ ɠ d!`MȬJ+ {̿~2  A`Tk7^0ãz_@ Ax"N 1Ș4`'  X9 )W0eJBx‰ ƒ)Ky\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER+ pXx G9jXf>i5<.KQ0ÁcռqE@8g݀YQ0\|=֠?=EH<4aA̦N(Q䎒j XZay)V|y9{~yDY {j`j @ >@=r ,_1Q7qq(|^$ʁaLudXÈ0Sh8h4fac[Dk(h,I8"'j`tCcH*-c:/r(\EL N\XaY#p$8 Y@ gvdy EbΣ8>&8P0J;YaD"cEx+ D" _ Il9dTıy&زD٘,tC004aEb qjRcY8P q:cŌ-RE,陎B" 8 a bb#1x D0l,|ڢmjP ! S)pk!9̥$p| ~F/,IQFū|*,"T3h5 Wq?>g y8+ 'T#> sȂGZ/`@2"1#E+;D5|f`‡15{DF2hi=9.&I'OnVk#G%mKQӯ\B >u_XTφ!Mț]Y'NITjKRP۷&O >Z%tF%ICLJ ;#%K^*R6Mׯl5fffIZU@c7a(ݣ+]lʉy:u0ȫr':tOC83=5XĜI'eӡJ9*h3Gѥ]W7.n_Կ̜'!(BPvwgI b!ǜzb<G m&$s&Cd>7uy^DQtJj)4jLV &+ aaAUU[r.\.{׽vn+pH.#qɧTӪz%R%R݈bbѫS4m&m8@P8N4+J֓IѩR]\.Uf&f&y^GƟ1E,kFzǬ4<%RaHLV&gϔ(ϔ(KĶm,X81`bb)%vBP^i( |e>y!y!HBC&A-5("xW.KiZbز I }Q9cwww~ - Fxrdu P:(a!Wa!YeYh8@p1c 3gy'zX2G:J%o7TEAܢŝqghQnx=;HsG4y*lDр(nG#J ffwffDDDDmI$PPbG9CPyz)ˬ ..뱾o뮾,o0shmbb! ³?*/nݟp)/׷pgGѹ׸$gnكY>J;:1A9*O{sxu.lG [b"y=#;ꙬǸ,g  Ub_&u#Q,P,C[Pgϟfyc{7ђۻ2ǭ۶8'6YI*fs <@#;IGFrfps)ٌa͉@TI'n8q^cVu3k _<)1::Vm|gV;mݏg3ܑ߿to/?2c1Jnʨ(f7{1zl{Y?5PC$J8ʉT8b0y>8scZ0\bb(y[5LF؏ Fqp̼xOvs1N (8~s,?4W'j٪$6q>H c`%[GL6gw)ݷgZۉ㯾}cJ]ב/llln3?JUfhdqfjge|F>c16'ow^盀?zg{„[l7#>d K `|{S<Νcټ37'պR;ou78>̥o3L^r1we7qUٽ!viF}twͿϸl;`v>_ww|Z4f(f;b~??ۨM{d>On;v59Νw29ysV%?w|1~e^4mr0 j`˥)AƱǙkQ*~9gbt{jf'qDs8 cEXnGꇷ=À<9QBT(MLH[/}9ϛlH͎ngwͅ,@TI#0H ( ;vۨaڢG9Rq0_'R^u/H|;ĩGI~AGvb&8@x"a?dz|̥"`5`9&YG­Ti@$Gy*S b:rd4Jv8w T> )k|~dJ4 |(ۇ "yJ#YƭqLN1͠gq0^Q5 ' liT D9YGjrw4_8SPG3,m%yfv)CRG(X }aOΣ\xy?՝g(gS9=cv9F}ݜun>JV"Öee G?fFzhK6$G1u0ÈZ1[o ?r5X=bb!a ! HcfWb |D/ xξ#/G0s{G/ vpB (VLWuwcl4PN8#jPI?~lτ)aNBZc;zy::)F4.e0KV p9cY}2Pt1@P;01Hqަ$τʣ{؀1N(@nrbT(PُZqrs岰v j.f/G؁^lcqXßj9'0Sm;(B.%L~8@p52b'&Qى{csS8 =!07bakgv"uj7*\f `Y+9AqЬMA✝@֡S6/,|yn e,pԸy/Qfl,S_fghKcN]FfvwX$|%VA 2YyI|rԾNc?.–eLH@&8{Qmji*P#Pf}9B~z=ΏcuFN$8O":u}LKnxqVg~J8]189rp0ss$SS vQ›=SG[{/;7RX7T<f^ḛ:n9~v*n K[ S;G_3l'IԷ`oJBe P` O IX8d.J=.nPDQ(XP`p͘ՐGm }P3b0v=p8O&$qG*9wp7p6>WF`*?cOoP,XlXб.{4>lq?Q| MN :ÈpB@mwBPn."h~R< . V(uD8u X%~?*T" o$U„,Z|w'0P0؛2W,(u`p5'c>RxGPt' HD0{ah,pU ˆ;AZG9!qomMx0Aq: mG]x806j|:t"Ø:;̘*/.@^n2U@3 F>p:&:'WQW$Ol, @0 ?o8p5^8=dҔuxDqPgUx( Ǒ`w;GD"  u}xv8W̠T ^8p2^D<eyG Uxи?Bp'Pux1#Q<cij}g*Is?zT 3|€˂Ā}^KEy#6o`0qD'ˁ]~L*\O6Lpv\ PX1㇞~6>10o'kWP kب|D#Wyl@Q@Hjja:8gD$p "!bo=ʃ gu `"Taҫ/WDy=ux;MYL@zU8ppZNZ9@t?@:ez 3P:Z/WFB@|.k@v"¨x`:9A30[,@?B"*ka˃b ]Dpc-x@,+yB?Bl װ85ט'Tt `5o^7(T L@U( P8zPs^ W $gwWS:#@>]r`;ŰCUx׎@^(j@3m ^T d pH>IxgRL/L6cTMOh 9gTeeh el"& lH uE8$s 0 C`N1` 8XVvWx  PkQ)F?:&*~LĬMXRY5*-~DM ? ;Dǀq: 8=^Xa*j0]'ADS 2%6)d%X3&@  I}P!ߢRVdLQHeJ@ *`iE H @7@! @R0D0`*_h` D *P1SqRiaeRIb}LTCM -1\BPaH )0 $|~HKL,1)%|5t")0&(pEȊt\Z$&퓿',Abie4!QkPӠYix*MA)AD@CR` @u0Z` @?vK* |ISkU@aؖD~i%|PZ:-'(ܟSvHCO ˋ/nNMƒ0 @7JNqeljp8I0lI DҒZ(qu040 H);uE5> vZ.7\|aa&`j#@T:NTbYP/HUSnQ$$q0(JѓQ &[Hhe6CV:" =Wbq[@5Q `u@tu`B5AQP`Yw@:.@T>cql c}'tLtNU@'A052mv`4P*p= f]PI8!hZE.!!뜇s~zoW43v#sn*Z*ft:*$tѧ Z49d%cr&iz4i5FjXnL%qdIT8+ЮX @Ŕ,55 `9sA:h8qxyUt7o}qHTj; 0#QN&޳zrN\ބ%#iZ}1c).˺^]c  kkS}N U7 P@l,YmvV9sj-dY 1u][FѸQ(*c X2=bAى1Lى[2gٙfa41lbt2LiZX&iDc{u@=:A:m~n^15k@ jj( ֛NV}Fd4<Ƙ/sx;2eڶmAPZ0 eâc wDffffUDUDFHZF$<ߞz- o0n q1~l6WAaHHw .^QJ&8lf) ITe_Әq8TEȢ bUbU.&_*T"ŝ9]cAd ._PTmrӧ &Sx#x#%[EW/N5&nݳ93r4JEԭ+2LJ,YnFk# ndndя~,XaH)`6B)eYf)%ՊZ>']k֩lF؎Q!eˍ&L}Azc|3 LӬG1&GK-- }+0VW/pt B]e|_$HgG546!GX̣خhJhK)Ǎ%)LVk ;Zu$Il5a599ƥKmC:+Go|hZiuյ_WV'.P 4Vw+U&_U&_X1>oTި*0T_?tx"gFwKr9(v`bZvuouo[1tb1lbmt*".b%IZFSH*YcL&YbYa&rL "mDNdDžxPlsg6>%/ C~ 7E'7'7'9bŚ5pc4iZJr#-F e3 UfUfUUUUDm$sF4נyj. o q-/Lq2Ɏ]d lMV Ղz4j!B,Fj~I:@6a@b@>/!$pp0`0 >\ 5E̙UEckQ3sp6>0 0㇞pfML$EC@ҫ]BN9:pQʂU@AG|p5(.D{"|;ՊB5P<6` (qPUP 4@Mڰ85y<:cy@W< :Q!6eA@,9tuPCGJ FU@B:" ꠡP0j WN&=@rP`.1Q &0lQ Q  `55DP`0| x/8=v>,\uC><=~ :"@FA_h*.qu@h4y4< *T(ojf@^|o|  @&'B*ũ EoPc@n,at #PjpOHD(_Hh6`.OdhtaE $@fh6œn"" a@,03\h.xzUx(g X]y@q_̦_ q_:6W$X@k Pr:p~t Uʁwug/`047H @ɫ9_F{^3Ux|€6nX`7>"Jrb){*s*W(u^ ?@@E<w`x}pהU₀Q@E xx*'uUtT܇#׉*e&o?\>K={ _aR5x Dx >l\64ÀQpu[T_RI\U;ˑdxT$:'G]~ x83@lqx |O2pXQ:@3 Feuy`y l>t?vG'C&@ʯ:oy@m8n@8~J@t*:d|uڽaAW7]W8o.WxjO ໕_xq@ GW2;@D:^pװ #+ਝATO u p7^^ #YHsV^a:P3}b)W`\A΍Igy.tux8G{* *Ux8re8>y }x1 ?1r:P8+j@GѠ׌U|^0 ۀ<D @<㪾@y ʰg ]WP'o6-C_Ƈ\<20Ux@x]  p_Zyidģ?fe7tB^ A0n TO ~.,ėQ"LD3#yA!#"jH_}&:c҃eI} ` H\!*CD2go>!Xz @rSbBfhqRQCS%(Ծ!` $ZyP. ~j }X*!>~4[SBd HCO}>Q9/?NL% BnG`H-!: AcF, ,.vhJ77LxeLOxh! C,D/2?(;TIJ\j"i ؄Rx(љa40҉LNL8>30o%K +y Ra p!b` ɩ&?%~ ZPA'Pie@;&' 4rv̲&Ё i q o ɽݰŠ@`/ L RB~hgrID t-9 y8 {A[j)đ2 VW0 ? à @tZ6J KP4! 5;/oj8ajb.74> | ( }g18:7| @(dd2XiHb @nT ^R IaGĤ&̢FC|Z62 N: 5eR&,iĄwvC Jɩݘ[ܞg@CS'ϷbY{ܗ PWϝjqu0 95;qi(H&1(_j S #f|5;` $&kgb0R\[l@!%H,O ?ecQK\mМ$a\5iAFnVJQ v)a5RJõnYj'T @뮃 A:`q̭jwoXP_:'V GT}T' <0 'A&@ʬ@4cDvu(bb!A ! 1G8TXН D 0TuOATH@c 3y`-@rl U}H`xj#C㧛;0 S dX? 8@GRUgT]Hh@juG{ΨAVQ,t _[0#\42AW4\WN'M7 ><I5 ໕\oP0aQ.$ GT#Ca8 j 0 c'XҀePp}:[CҪ #YHsVS ҁ6liU` ]Qsnđ`aPΎ82<U @Pp@wSjR@3|+BR$pW&T #F{QuJ^0 2'Eq:%G]C: Elip|d<ɫܩ2jd_8:HU_r=I.LOOYF@rC mp{$"`_ttX336D7Oj\}WuuO~ y#x |O2ު9x:i>r2xc* rU~7g[_J^Ttu`˸xat+g`e}}O o <GOo;N,+UgW:I_㝛w^R3[?N8;{~WG\H*}onR]U\u 9^x=לb%}oTNY ۯ$UU^:Dte{*DwwWz{sr:a^5vUy>` 7"tĨ_| `7'WPYT:^/뿇_`^ bt|}u庯*Ճ7j`d^J;x= xx*ut+#QoU䪷#ȑiAdPfE Pd1U( " dPyEE]p;^b(P2>1" 1U"P0$#(R5eyDTUn>ªD&(8n:$4T! x I6G"^2L[4^aU" yEIR"OqWŀ{^e"EE̢EI ;R5xRb"+@F2WT.( UHk W"TPdT 00K Dj t/*EaUgawx㣮^H>q̫7p5^7D|@:On5 ^_mʃ0__YWүוow;xw3:l|c9__u=O!ïӪkxw:pYNuu}dfgW ӫߕ7'J[ԗx;Uo'W*xruypEGW(u؉_a@:_5v7UW#$w^'J-G]5]ޞ\hd@cWp^O H&|q*~X T t_q*,.Η'*:uW3ׂ؝* o_]ynʀ:@u`ZX4:8E(<eW ^bb! 1&A֭܀ p"dVYHߝoQ27B+oIʯB/K,%Dh!#.,Ćȕ,5%td 12n!2i!tb7aD C˗Q1%XiR~Vt$$qMHD @ rW: FwtB1@jgHdp!c@1pGGc4f&jO T ֟;(3to 5;4` ,(U$%p膀`39/;‹GJdlBnI PH@ % )$٘u0l<44S,i&Yd1gWNXX`-x`-}P%0 e~݇A@PB o!az~B@3 2p1 'P*Pf) +3uiDZ͋,WˀNqđ4C!> j`h``qG7 If 4khbJP$HuL8YC6vL/f'!83>1,LQLGS=mLl@XԌm"E`NqFTY!6pi$$^&qɅq.@HDDH,}f>*J;|$ NiM@hOE$(-Q4X|CKBs#엊FR̀NY4w ͟6?h W`&F5`SB L۾wTaG~ r5(e@%luL&i|_cY{!)\M kR>'&Ni$<bBU$C:dd! @ !USj)RE\zY%n3k5UUÕ&#;vki{Y4MjZ ޽m*`ysTmY4H*r-IʍFmK'6%SS(Jǔ=ѡ%Z]eg>K%I@j@›ZZl==pz]} fvfffUDD3m$Pb=TU"~{j-L4;qq&N"DA\p7`#ɋ ]Uv}AX""i4ѥBXӜs~Y^q%K$I[ƶͳ *HW~Ow=K׺{BOhlg" N2{iaeX߷3 ҥE+[ߣ[~ҸQWFz3[I>D R M#IHKp[jJ#(0HE(9WЕ/*^s(RjeH2CRYG/>OdQF@|J Y%y,fژfڢ}fڶ6]ֽ'zLY]_ŵmUp5N+8p'Bab!bvFfZe˫#VE-0,Wdl[E678\ff鳺n A)^R%ZAh AUiqVlR`1L0o[[)VUەvPdA^AduD %oRi7.,?ދ!mam^7΀. MN\(7qL{ݧh^&ɲl0V UvwfUDDDD$ s~ᚙ뺻0 0 quzCx$xLN)/ K+:+h-ۚ`95( w=R;`JX]L&R_v:$@om@ b]=FF&3$`Dh!a>&p xD~J[:mМ$09 IA_xMoHpf(& be^ZlDuupEMuD뮪,147@j|tNSIPn5 :oT@YVt?Rd@;gyq |*/8 c/*V=DY:6 v\MZȰ9@JUR'UHs'Tp ꔪ@f?:g'*:'Jj:h;U UsruKr*:#N=#T2/l4HI:2t׈$u5kΎ8@QaQO9pQĨW:T t#êUhS TuԱ[p؝* oX[ەtHg":ThupRUIPp^bb! S-bb!)! !_ xzuw~ubc?\/שpU V>@;"FX@wJ\O ʿޮ5XA { ꫫz2fqW"L _H "ȿr `. "ED\8%@WHp"͑_F#_2 fУX?(D7Ou`5@0/:'G]U$ty4@mzu}WpT賥WoUNWGGWW2uapu^&*:a*+Ug_ȝW$:^ow)UzηNHүuU: Yn@v/ʪ$˻*G]5\x8@^2G;*OWoNj9uW'u5Q,uU H3ʀ8-w*g_B ZX`הP\bb!2 X bb!; ! !\ xx.UגOD-7EUy*yH⍯02**.&((2. > i^aA$AqU^* "5\D2D 1UU"EyP$IEIp`2v"EW Ƚ^2LRM Z&>#טT&(Eyȭ",9P 10Ȩ^cATT@x0j!#E5Ek*D@r*D&EWHD@*E 1d>>E.G"WoS_^%EHjt7>::#kȇYo__ӯE*xoZugO78woJ*::A.W }{к1T 1o;GxWNZ:D꿑'Yd{Ju7u^WG\$NOGMurׇyLuzί<swਝ_@-p~UU_O 'F]DU>_:GSt*wW᪎cUBAT;nV:e?:?޼ _@dd!EA@ !m|\k)GZ5zCPԕ%Ig[VZ,#߫jo)3 1#LJ5aij@Pj.. JGm:\4TRk ֎촭(:|0\1BBEs"ӵRvEA@+dE=jz!BT8mʇ (ZLq-[ȡky,-jƔ>GLf-_k&Z/{c㝿sMAN͗beؕYmvkqJ湕k%Jt xDfwfUUDDDH LΊ:|. 0 0 otr,10L+^t/i c j9ƿų` !]L+(#6,K@ ay6z4 fT) =:kfwrmGT)Ve9z2%k *Zy4GxӍ6k@$$,2n|aRD|D_+WqhU:beWUGR䫾 jbP1``Fsa }9q `B9s2,؍6ꍣgyE 6 a<%R>U t譩[QxLms^Q] C62VM8).tAu <Qr윺6")+9`0(3(#dewԩ6ުTUVvf!cQm߱gY/hYDX'F$|Z)ӆ 6Qƛ "sOF\hm35"jp˚JoCRrˈI_?#Qȑdc,VPc"i)G萡JYѡU)}KA_!G Wp ffwvUDDD3m$Z:b A%c~mo 0sf}UEfÙ%ձDUFn5I``AՃ ̹ٗ7rpDĉ1rm\Ycҳc-M >x&GY-FQ.\ k˵u{گ랩:2tu]Bۭ@ &KWkm[aJf].DE܈'8[$2=M;^{{h?)X5RCVtcy1+q\paawLi>>,qWߧFͦn+zaHc :B!zEH=@:1DP`-`Z\CK3hpRJftzM[)a,s0OI)z*{Obe(:D4XVuv.F]I $qγ: fwffUDDD3$ 8IEQi"X;\ 1<3r<޴Z BS~JpFx8PR"7q1gԛ%ԗ.GV$D4hbb!N fbb!X ~Gbb!aa 1z&A po'ŖciMI1%aǸP݅@1,>&ai϶cZ*Ѹ|YA/Z2;in?}vT4L !hnDy3?OY'|YA-Q9>3` ɜ#! ,>97qQ\ . P^Sb3g|pčN]0rQG~ #`m(fZ?V/! xqTxA3t;씫E+Q4Q/bL-x݃ @^J#Cg%E%,8,ƍS fb=̀bkve4>Fl !9 sT+Ysx{0tM,5#~s`On>IJ7~ @BC)|}̀5+à$8gݺRAh0QCw[. @ύu1!8 S0o%41&nvQ/u Ũ NHtrj[mx5R qAJ >‡& ,Qp1&''! ̲ &цsx2&l(R$' OBŠ@a,9$$!mh"\I ;\Qe&:" V3(Qgh0#Cð$ q*n853] 8>/l'%U0R"i btC&y}! @' 6z/x$> >,7Q1p0^8*g^͎; Pø àd07{@"I1 bpKd@ɟ4hj?Ҭ S>I,O1At5?|Z6;eE'lq8A--J$JDm-~7; " Pr]$JDmvO6SDJ'v3w0uL 4"BηC~}0TB=B0$"GP*~\M NO}".*jQH9!OML89!dni5;  850LlrGԢ,CKBPۚ81;Сc O0 N~ǹ3>!?:>EQ}BqҊHܯ|I ѿd HH gu*zVB ~puDH`78 ǎBP*BLQd' N)X@]k 3Tۡ9TK(ԔWZ;C &:6@#/ YFAb>AMuD뮪uHY47:uM'A*Yҫ|j]::jΚPUwQհJ@Iruct.bcl@:N4sJUR'UH*j7ꔪ: tܪHH*J:jhurC<~&::nfQ:چpUTU8wW:Uh|5uIuMZ槩s9FHҪ5vUI]@:ꚨW@rKҫDURNj8 snnTJЃ ȵՐ@JP4_bb!j [bb!t! !Ba x)-o`Cb^}w44"";Cڿ6MAR6n͇IWquEpw$aW05dw`7`F^4^//ɝ. pUAuq7ڿp4 .:: _u]&: S_Jou_x㣮NoU]uNOg_|ZugO?w?WGGW9q?\UMW"u_]?Ng_UY_t$uDRtt?ë?Dnq:'JG]5\Uys_Ƹʿ|iRZU{6LtGcGW-e9FgW)Ud24hUB*NiI4#S3M߈!gD2$Ovp-KY"r{;N摚YH)$jiǾ۱cm]*|Of51/jup-jk@Qŵj^a5[b5\M)@&tC?O jSǥsMQy2#Qm$IreKeB% з\2tiɤ,[$iu U]hf2.6Q UwffUD333m6$ h*( ]%ҚI0<1,L=tl}T" jcB{ziDUhq#~۫GHsX}g5\ r;_ XIZF|ܸ}h*+^9G18  $" ( I@4!610J,)JUER)JD\)rF_/ܥ `;&d2a\'ayt00:@BC,MFA,5  eƞ/Dp ]\`@, i``dY-o:)H".RJsD$  %%8 Ӏ&I;vK`g5(p RC@ 4n㯋J@/|`r1d0ZqJBUC&$ OGR5TQ5 s딥'+".RJR")H"9aW ,jPP [G)^B @M!%Ղ@4(xs8j>!<NQ_0g pi_’Jbb! ţ_Px P1i&` @SOB5| :6CnGJI$ H)p@\"uћ$$Xha'@r0%ƐPpԐ/P NZC+)G,40I#pN&rWt;h3@|!d( Hi&y$44 l`8&tP8 _@;rMH͐1,* ep^` L_*qA&26L Yk`xP@( d^O(uk~`1 1SěƤ 7K *L&fC ! '#R–Oׄ`fdL8 `T PQC0a1a ߀' pwd@²{ZB9 0@Hē hÌovIK>@Hk`z%Ǹo{A4h ?@ H!}Qc%IjK$0~Q [@ `D0ۜ<uF?# Bh膌M$RO@ P`X7p` =@ RCčlW@PAPPZp҆ & IcUX(ho9, Bb]4EP ;Ȅrhi@(0'a($(w!+gA+5`@##@v/xtBdX&4Ɂ>Zõ~1PL@,!n7a.>0Ep*8jK0PMN}@ @0 .&4`0C lf&$0t $?D @ A3``΂AHIX lB.Iz`` C C(D2(a) "I>&P*&$3$ǹ_Hnx% d>43f&1)*S&|s`J^ ftPjFZJ&B N(4%kd@CMYuX  PA 0^C!@G (32  +L LH@~`4@^DͶ ,!xZ 0h((M]!=`@ , -HЃ6dR3B@@8M KIc hAYX1@3|膠 ,  j)@B@0 @.Р@[f]@5A47e)P gP j"Tp ɀ',B, @a 3_J9kߘI#ޤ  piW瀯RfF!k԰ @b8E`FWW@ `SXawP4PF pL +R)JD\)rER`0 BW4BJC9+w', $"ɩ,1 d)+;1&DC- d_7B1`p `Uj@`Qa&`.03~Bn@*FB4PI` 9ep@ @ ; Y&PI9Obb!! M1 :L,  J`axt3n%H ,`pT r4*7d>iD"X-8( O0fA:-P ?a, P`o-(}#> ^ \4b4]@ P 8!"4npJ(45Xj2 cBu|  QLK ;`T7 -#˓I^t^/ i7l ;4 JDLPaP bJ&Xi-,hVI (K@v[,449ݲ^ F &#=t5@`T&I #8%%50@;1%)C#1xb@a7lB_v`!!, T 8a/~P)hc҈EI92 P#@ #R=@LnY0 /$v0?ԆIDK+š=^ @` RM)$ @T 06(`d INPcH 6p#YI@ GD @ Aާ=8(M o0% !/$ #R=CP@3F2(iep2'ܐ@ !dPPh``Ġ0BhQ41%:2wNdx5h`\ ,1IH!|~Z3w C,, cT `uDtPCXi,/  <&5&X7a Xa \Q@Xn` h`!!:&*J&:>% |!@G (3@ @=&4A$ rA` `r5!XP/U@PHlr" @'Gڂ`& @`fL@va:&σz ]] PCGj  Pbr@@ *@ -y"@ n8>&f> ==:&( p. ` ?, P#@d CP7 =v@0"b@MɁ`4RWH ` I41Cdt100@ @M 6~q]@x{'@<R`@'0a@1A@)QGn>;p`&,;΄$8^0`oeCp NߩYOzAD d p0 ҃JŲOšW54H  CHa @bIoÎ #B= jMh fI%#KZz  bcI+, |CLCA(401Cq56'I_ _ԐtB Hg&rɁqe딥*)H".RJR")H?h7xJR"".;ѩHjR")HJR")@rw JR"(w 􈻀 CH @@ˀa @BP#(1 $@5(('K(-H3-zx@3`P '!.7d5~Bi8 {Z ~hBXZf"#m@ ('7;V@=z^dd!ȁ@ !cKS[WGQJ8č*GW+_[pr{FՊbbh]'VV- D9Nk5dœ3PV_YT_ya7 B7MFk9#|B[b6"z1Zb1K%vKk]7a2 f.:Ӎ6rFCztc|M:2>6E ESC9z[FmHʥWm5ID#߃ v_*k*Q#)Ύ̮3B=[NFAA)^!4 wfUUTDDD3m"J$ ivzp 3M4MM4]vM6lmzm4mwlm[zy$bYTf'[] D)]l<֙:d6y)ANGgs czcW89+j͆fT%X %a]~mL~&vNeU4"vl.~qWY%mWb) ]@Kk*¬,Kw%,2,7A"cF*Rʡ̊l86H\4b?^'IyX UpYmqtVhꕺb'u8JnSk@%EͿFKK%BHkQW j)ȱrUꭞ5p ihx鴼Z![硪E`tl6EeHVyeYYQ;J!գ+2Z2.P僨pO﬏K0B%S[,)Z>_F|4Ytg}Q#1mhQnbD}Am uشZkh,Dd[\ba[ Y4Tm:0Z0,}p`M"/C5YzbȊ g$GlS>ZE!7FE R+2XY]fcX8U\Zf6! 05B# T"7rߍfⶖtjZ5&e֦Q⚨%W`^*gv5CA.ׂRVٵMRDMQFIӢ?:/NaQoS_AUIlX%lYNƤud  UUUUEDC34m4(@h$H~3 >ߟ}ߟ~7w~ߏmofx퇙c*dttzEx%EAWTmj,mJŇdG2pXH5R \!tk[m(g"EѡHuΞI&ZTiN5"|',V` ELY2]vXu]Y(4weJmҔ-7cͮoRPup=G`mv=V2eե&!4dbb! $R@dƖM,-QK.RJR")H".RJR")H@ @k&p~\qh@>'HH|/ştZ@(!/x[@ jH @DX  &\,@W |8+jL0(h `a{pQ-(v_B`@  P m C0!{4pL /t0#ܠ@ @ @=&` \ A&$ ( e6o FH @3@1fY`tN0rKCB`c(1$|h @b (0 @$!p (H~ g@3YטbP0 :@a`;/ B4d((&#Cx p^0@, %AeC)#8 ,t)*$49= ` (0i ;_P @@@ 0@/8CC@@f& Q8I9  @:M@@C@b `RakB `Jp  ^M 'I4P> &hhp(JO($tg,X` Q ;txHO)$0C B-L`P AL@*` @vPӀC}*O(p} -h fFC,(6 O6>hHCN Kh/200Mi0> / 'P@ C.nx` x, `j@(yj% H11d-| $A?~0H`c1`7&h5XP +ultQ $R@vZ ̆A؝@, H eC.&Ra;A\a0~ @3` z+H!T 3@K&Y@aEaN Hx |!`p@ ,CX䚂^X0(* #|guAH,A\30@zd@ @ vAA BB!@?}X"@ `BAKw(i58`E_'hR ^jpj T@;+`jF  R  h n<0(0꾬zN`  N|qdΑ@&(` ؆Yxa#\@ @@e `@{ !bRjM;44L ! P)Zb`(H &H@ !Pa5%dRWQ| ?&Nh 9\705XPh @'(=D05 !OA <^ph 15 T L?r İ3sh!@BW8 z@0%b݅̀./X̆C92` vQ44xA!wA3 @ AL5@50W!]P@H dF?4 p@Xi`P@!&ID' @N &r@C e($lp P~R ,"g-H B d803` h0 8HaD$r`hJ7;ݰ@@4`xj $ /,4ii& P`GA[+Ux *@ p . h`2 %0 E ^H @`@N IIH/p()%0RX Ȁ Sbb!A S f`d  &^q4 "3xP@@ ` h&J &@`DA1,Xi3JR6@0 @ @@}/hC~*a5 1H9A2bo&4:(@    hL!M0%; (Y]@hزtB j0VYI-ƀ@,Rٹc/Ƃ dTjpH%@=`1` _T>z@PZ @!H K&<G1!@5ŀ@([!(-X|4^Lv 2H ib@NB+$WZ }$B 0v`T`=)$x%rixh• 0 !0@'q@$=@o B4@:VBHx/& 7rh h!b :PՂ0p`@7 BM(82a'!'叼  @7Țp` @v ,i7W-VH:h10]&@a3gXݟHGq8 @4@Z _*P @ ɽ!VHAɈ  L bB@TT &QI(X]P@G @i% 9^ H@0x47&`!ed*86 :I 0bS5ܘ )A jH`;Z2`M (L*J@6 ;j@5 @@6;+hCg(rRf6d PIha4Xah} DX'@MpaMmm@\J\T 3%h`jqY hp@B!>KJH@)[~R /0CRJR")H".RJR")H'pJD_0 Ax V^ (2:02@(`^ @uN bR8!TA\Y`bɤ?0 D၄mh}s!<( f  fn,h4P0@c `F N`:B!z`, K!D"aH0rfQW@ !@&B1$i45# ΒO$ TZ *@ @`^&Rh I@qDԓp:P LM !4400 n ĵKF$0 ,2!܄, ,``krSY `==`@t䱯x` Hd0(ptDhi1l H 3R`haiRr!cT 10 e`hR@BM%`Nbɠ&7 %VXaw`Z`5 !`Mh@vC,!BoHɾYKP 5`p )Ӊ:!H$g¡!,?jX h>p(  j^ 0T!0L `j1003p!|p$0@d0(Bx0 Xo0bP/y@?!vJ&ԷB혖5q p~p 0X ')V@tVx N7>0B0QKb%gޔ`rLv,@@*r@`007 NrgY4 bɡ>U,  Tj@B` MP`h?&$V}Gf8 "@A\Ě{ BMĤ#1a$2nkibb!䡀 3@3t%lY0% E.-&P !H`25NKF@Pp@ @' paM' B bt@Lœ@bKHj{g@@ <X c4jD LHjQɤW:R`;!bt$!`d‰QJao1ؐp}@@?<@W 0 p+@Nq@&I4`&&x( < d@ n$x `v5:04 @8*`;rX KrJCA894b@bKj@*7&OY4 x"~ K( M \#,` 1@KS9!t @@@{D@p#L#,p 9@KĢ[!Wh'jiv`L8X H9sŹ> h1 Y`bR@:- :Hh`j@LaHNZ ׀ g{H kp dPp` 4 ! dA/M&#T` B VbXZDHo`D@ r a1i 4`4`LBAZp@i0Ay@  `P(`" )c>~P `1$"v7@np7(ayhN>p@< @;+FraA@/ r [J0aC  Fnu8x { h@l @=, ;lBPѩ &_ :x y@2 @F@b -@*zL V@1&zp!P:emHp(P >, @1 X eJHBGz P @Xn !)4Q±@@ @JT %P  :&Y퐞L&M ב@uN @n@ @ @1&fɅ Ar=W^ @4 x3K>!FK&3(?JRR)JD\)rER)JD\)QZp  R^4ЃӃ5}04 @0<4V/`@PP!`*MBi 038^Up@ A @ dU`@:8+I!G @C i19,O:W@~.H@`@ !@*!&S@!  jh .!1@5#" 2#S@ P@ x Ha@bae#wIH<`&&d$"&Pߺbh O: BB@#@2&\r W䤨| @R0mj A|(dpAfMR@-QBM_"p@y! _X C; X &@10 `L Hgd+B(>p@ @b jh@4J;$Џҍ7ι @ 4 ` vX@.+vIaW䮢^ h!b `!( m RQirY 0N@ 00@ 5 CP,V ܒM IP@\ 4j0JR,Q(GT!?~\ZH` 8 @BxL>hh / @&'P@   3@ C (0iQbFgl_Ǿ,}8 A$g0X)vhR@&!$4I4CQЂj02, 84&HJrSPҰ'CpFQx@ p` 4bb! vH`-100dRvRA瀑@λ`V0?b` @HiKK- F`Aע @)4h@ N@ 8)9v`@k  4z`+W@ /Y@&N4 9Hi-8!sΨ~8B!0i0,,jP @8h A4 *8T pM 咊&PՒM $KM@@0 6j7?|HZp ɀ&g$ZB@E@ ` @@J `i:NĠC 8 v݀ >,!;Te$ Q1L,g +8 @#) ^^p 5e4`|HE2 @@@Z 4 % @@(0pd2Y`\A'A,%A !@\`/P =!@ @0F$݀t`  /@,@B 'jh P 5!  3\ (  `0!  @; hIm(-Ԍv:l `0.A  A,d̴IT7 |Y4H@T,Qg;X @ i@T.@,ZI @3#}A, PH h @+`` P: B,0h @L~akC!F@ @2N@0Z`! 1jJQ4P @@  CJ[Wh "e0Hp*PPa`TW%gl8`@kp@B @9J `!p@ ` %M((KBJ%sZ+k!h @P@ p@V1 @h&LB8`I@14 &: /oѯ?䴨: 4( *qE0 LC !005;2JpHDJ`Zh4 *LX, Ho):h kX *8z 8Xz@KᬜrLf@1~C@d$TR?#CN`@D`5d, @y$Y@ ,np .Y@ / ~OoX`@t0 @`4 2@L2`c:=45 ' @ `CA #Ӊ !I-wWq9@ %27(w`'Wvxē pӃR[c4!ɀ p '>J ` n@Xo\RRIHj\ :;A1A(`b(~4RC?+  @x^@y(3XĠnM- @R02  @0a0 rPh<0BI !{tTI@dnM (!t`F+p2_#=(fBF(Pha0000!5몶 @0b0 @A)v1e#3,wT0`&0i-sH.R.RJR")H".RJR")H`@B bL&P(C &HDұdh`nbJJRrzP@ ` .Hw 7 h@`\0  (!Зt*o4KÒ3?o}0@30@B0 >Xp0BKG) 7]` 02 & @+!ZĮ|PRE1vY4 NфC ,HO{_'mBbb!a ``@ԐLopT4 j@3 @B0 <Xx2_JI T OG& Z 4|@ @5K p68 3A@%N  & CL9BI;> I$d>4>*K1v` NS 0Pэ1wl^08 @ <0`17Hd|Y5 |f\pR Yd Ԇ%:>./P@D @@- 8v .| @:(L&! (( tA/@+ @ $ H` /@ ܠn0^nb 0?MFB5f=˴ ,MT1*)`LjIPM(Y ք-* H`&&B&B A 41= @ K 3  4PQ7d!AI$@v2@(8 Zp %P2B@4a`"၀!&1 җU), &ɸAn6ff2hP !2 :4 ew(LWAu= @@m@ @ 6%IA!&1 'zR Ri@T40M 5 T5%1 ͚8 @ @@0-*0@?1 T@1!v@ ɘ (4g[ &?NH b@cw!aʾ V /@` ',  ` 8xC&`<Π @c hPI ;d2h&bY\ĖKI  1&bh(rPlzdW $0@0@ =P@ `h@ 0Hq$@t( JJq6?A"ne&'}`~:A~RI=1@Rr&x"D $TbiJRCp2M` kX 3&/X @@vyEw`uw$L^ bn&bCOI7CPR[$')URJR")H".RJR")H@ @*6@ (H @bl `PĀ>/eT#L`7LLbI>QDG~N'Sl7/s4{FxK@'@0@`!lb4X  BlPB7=Hp'ד J =R ! 74 $f-YJK= ^ -5J`Pn h@ޡ>x5 iv@ -$H@\`vCI0p 0 bB ( @ 64! b@4 10 vM( PK[P4~4?<LP5i0B0 *B!L@ $ PK҃I3cNk!` ɼ 2!  ԣbM\b0@@(M,FJ[`;_"t@i`~P @4nX`' 1# ܐ P0e`  4fB+l,[h1!`ĆbkYIF-gp 7x`p H$lJ` rbpA5^[q ,@$6AZ98H` d0%\}d>Z(KN;p@-_I\BvO3t$4R JhZQN^ 00@@E( AT5,@; tV dd!@ !1kL\}n-=}ywwwwwwwwuűlmm||kZ}}lwul[mmlm6>|ֵ}wwwwwwwww[l[m[mͷϟ>k浭}w[űmmmϚk@ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{A=bb! !  ɹ`59wA1$@@ ,C /`]`^,X`B(>` / 0bC!`HĒ2Z2T4tF/~ĥ<(@)d @1 -0D`bxC,B 0V    @0a!M #2EXe $C@+ bZ@I(Ї@g?/P    #@55 8 58PpK6@)@Y x`@\ɡ (C@PY7;!@7J@,H paAԠ` V,ᭀJZx|j]pA A.@ eA#@KH@|`bXd @P P f^ 2`T` `,43L*uȘ р&!:RFd3+$e㖌˿K  rC ! 0&; `\A biXxT(AP @5A`P0 04=P0-X+%H-"7ͥL 3A p@rjLHL)Հn@@T Ph I9`P jLX+P @) @4*Mj^Rъ,<0%A- @@P@:[P@P4  n g5jHp@?4 ]1 'IHI@&@n}wzti(` v3C_%BR F ?&<-  N@ i0 ;XyM(70be 0@B@S@/!(2`8@nhq P0*B?;y ZY(i>Z1.@sD8@ Kl &>&0K,ԧb*@ @ A c\ɈH0YdbMB98aD8 91` W ?/ z`^ @&xP P ZC@BM&00C @G0N([Y(3 @0FЄ586CA  % jLd~T` 3PA(@* ,FĵqܞN )KY\)rER)JD\}  5X AV@/P  lz@7(0su#X,bXD2`hf0231<KTA/3}Pf a7P6A#!bLJ!!p 9/H!{ĵɣcR`;A PBVRK,4_R @J" X >2 nr_)^,!L P :%\`\- @@w4p7`T5<`Kc @@=0| HLP` @_80| ;H V0P``3A, !` W&e˹3v p` Pi0 Y3Wʸb]`@4@@ O(P@/  @bX @hZy`$o&L0 nLm% @V0 @ e ɤ$18 J7g#0HAj0@ @ nP@CIg54- @$(`p*d @t"i`@&B4 M͋0oA5IH @Yj/0 Gw@A bZ@-H "7ԁb yH@Cbb! A@?X`PAD nq400\Zx I4; 0@=TĠD@ NPD/p-=RAH a@ 293^ @`1>I; @ VFMF$BZ% 5L5/ @5N08X g 0h I006h@FId߿:@  |7G@|P` ,$ :*d\  0p.^"~(`\cl.^ؘ8!I@Lra hA$P wIԻTX @B! dRP0H1ٹЂa@ @0@-`r`rP R0` H b xd,Бwl0X-1 @f@& 0Rb@ 4@ NQ` P2_Œr_3&  @2 @)r*00R tB=%d !< 0 @4 [p4 @40 BԠbVOA0`UAY&0zvp ɠ:&FNPhAPe bh`iCz HIcL \ D0 % `, 3 b ` 1~p!xC!`جMȤYH~X . ?VM @;p&+hb_X40X@H+9c  @? @ J "h@P` @EQ@T$bR@@hF $#*^14 p!0+X !'. PJHh!|XJ Cr2Ӈ@ oԀj0   `@Adq 95M&ɀ 4.A pp2\XNBC7( T!44iKP PH :  `T0@ @@H`;&2xda4@ Hh  @~_ !KlKHF@00 !|e2 M:!PbJ&g#1f.hvB 5!  h@.  p,BkR O# _t" t THP`` B(5 0 &p . ΀ 4ɾ^\@< c_:t'·1=1 6@  P>0 4`5&p9`1 H @ @vd%P KЀ2WRdo@ s` 3P2Ԙ@F$ x ə$  Xp@j A<`(R@8@p1`B0,EfC!Q;"Y-2\|` fxh   j]|g&Հ& @;!~"T@ @/>(P` @ s 9y$逄i+ TC )8L_lzIb]$# 0 @P j``@HXbj J  E p`_fAl(A A()  @4/j !&+ @e3Դ bX I [`xQ4v. j(J %dP}HX(` <@ @4Lv (B!(3CB1eFAD )& 14AyJd,A蠁(V h(i.rBM\!`$2u(`k!}nbb!  A$@f`V=2@4)À7`)i@'&C?w 4@X f!@5@ (~ 54 @7: tӀ} zpZ ` @ 45 6j 5I0^hA`. db` a5//%m~ *p - R@@P\Ip] 0_ QJ`;`  a)RC|VMr6v t8 RBl8ŀa LI&1'_0xx bp `0 .QU "NL@b 3H &&TlP rHu) paHPC&&P04'dƷ9XUN  dB(.'  J&$ G`*0% J+@`8 @@! @\T `e h*g!Y$_'u G: F1D>CB\䱸w G'߻ @r @=h  ^;a!p y`S1 /Kmg @ @ 0@` (!A0 `  5H 9?^0 J ! JၥjJIG7L6`2 4 10@0&3 &vґɤ0 BYAV*1 db?.\)rER)JD\/j ` @/p '@t`< P҉`&`B! G` b &8ɩF#Д~*); t%HCt 3hr`1 ` ` An!Xie Q@'ZBJrpWw3Qiz@j @ 3 @ $w% @@rL% @85J;`@X 4TF &>!2Rr@ e aX` .\M"2p`r U=_̀%@b"z@@'!dx'C bIm8Y1Йx<4Œ)L&XSUd'(q @*f5@tx 7|% 蚄O:` 7M@  3D ;z:&HXbo8|48`;@i!CH` @xM/v 8 h .2# RP@qTEv4 (vOA5+>4&3ha` AYٗPY@{ `5p a g|@$TpP Rj=@`lP0`x @- ,O@C *(L I 7t$0 aJ1apbb!&A  ^ x32@QaA0c dkH  g.`1 ; D _ɠ05 VA'|* l H`P; Pa4LpZQPY".)\^ )h@ $ P `:$oXaecw㮇p@RAH KH İ j%3?^Ep'` v1 -&7b2LH+|> BH X6^q @64 f"h^P U(pj@RX@ # h @K @:D>@`'tC 4'0 'CQlJ` #  B,;7!L!d%`@}N@_2Aˀ'Nƒyd*o I@Qd05qd05$"j7&אxTl'a!@ Z lp  `0jXb&#mp @>`hATp@u@ >! rP^|Ɩa |p   @<4X` vxt,Ϲ/X0 k` @@2Jj)H P Cw: G- AT^Ŗ4tRK,vl"1@j 2`@0( n p(z jWY5E@r! 0pP@B @3 D lBBxda&@e 0 0 f7.@; (L %kѩt$ !,* gp@TA0`RBφ@ bXɥ ? PB0 %~B 4 Phen 0F+) $( QAA\h =j@Ԛ  J 1D2.[$-C*.@!Xa^"23ɀQ  4KH<!4 @< $q` `p8$(jҊQԨ1%3N j` \= &H 2%`@Q@g 2k2 i'+R!nzq?e&<L `@l @& i ` AP i0@.&d / /$O)0 8 /. A@  E50E@ @ ` `i@ww C k B4 , dҌL9ah!@ ("T 18`>!84 C@B2p @!|Q4:I\0Kj!rZS,C@` k\ R d"@PдZ4tIǂc nG.)BT$4 l=`@` zPL /j-:p* Qv@M @(gZ@/@LK"`Ybfoxx 0h e8 Zp@@J$lC&>0@NɌŤ͐V >@- Xh`@tX @`#X`% 64 d FM  R ,5P00h A4Kh8 @WN0 ŀ+0AᜐЂ !c&!f~ & ņ챌5% ,oTؠ&O`B t`4@@!. !M@ ?p A;Phv NmĀ@ @ +x$ )bb!/ @ @0 ]d(Cb4 d)( @!ztxx`@@@@\ `D C+0 ( 0H*.`@`@@" 5O+(#dB!:HA#8 pP:\0mgļLIxZx\ K@ &@8\` 3fB! ;+q |#<` %@ @6*Z @` @ ZC@vB-ؗ+1U@ 1`@T3!<8h0P* -)en / $H@j @10 HH%3 C@07nP@Wp  !CC C咐+W<_@@(4pXNLC0 d *QDD-eϻ&5!ҋ -r)H".RJR")Hvu蓼p@@j @ M p@E@4*30&P 4 ` @vMrhh ,0dD  @P(XbO€hbPKeo@~'$ @ @t`VrL1J! ʸa4& :9xx> bP 7,0wɡh A.(0 Ed ^5v@@aC Ԅɣ0!}g @ `h @'`np! Bp@< I@d’w`M,$%7%0 A0p j _@00@9@9 ! H`T3L +w8@ @=  * `@@L( L &H@LI\(l$ P*LIx)ЎX 7TJ @F$@ @p @ p]N`J Z(I A @`@, @V @@@LP @g b(DA@:@O3\@ @4 bh , `@Gb(d@ @4  $Ƿh @ "f@+A< h @1 !Q `;&,@g#@x4ɩزX()(?OBOP@- @ #pp@3!$ H@1tH@0H@NXok1 N P@*8@`@1DXA Z bRX`0(Xw&!Y(A_0d  a/LEL=  `D,f& $=y p 7  M/r@ m`L ɠ DX%6 OY`7bjRR[l\`» @L<!X& b @X: CId@4A@:L&f) P 2P 2 00@F  ` W;xA :vBAa?`D]` `?H `j d0x m 76 > \ Q '5Qdw@ځ@b AXo3,b@nH Sj@  @ Q Y 0 9!jLtlfh,    C`MC$4( 3i9Wz   C!%_$02<0 AINl,@  R @  Wldd!9@ !hűl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]2bb!Ba @1t@ PvZ I`Z`.`@ t2` P0@:)R1Om$T (ZZ Bs(Pp+R Rv&WZN  ( M @*p 4HPł`C$K-!°CVPЄ$@ PJ  Sp@/f@0(p(HP\A&@``0LB( I(03d!!) VY4vM&x` taa !KB/5fPOL + k F@&v A :0?;!@3&AY THdԍt0q@.P @=%@!8h 2Jh5ņh %Y0BI \7|ǡ ?o06&  7(& R   . (@h00<@@t tə%bKi: C|JJ@&  `P!0WH0 x`nBCWɀ0t000 4̢a ; ( :  eb&Bp`@1  P &A{( wA`$%(% ( ӷRY,SLJ` z@v\@w;a`M` T`  ݉Sϴ(l`D D@=P( )!`p B  @ @` {@i+X> L PL)AE! AH1Z p*C/ @oo n喾D,G~AX K j <2/n`@,n@bM& lp Y4Db%Sz&`0@P@M!h/b1pR4 b\8`LTY=򝶉) VX@@i`i0)ICrJK[ '_ @E @6j; p(P@0@` 3;z0a E M22Rp !,ᡄ"bKg$ B?# r\)rER)JD\)rER@4`@   b@)j  j@t?d /h3   A4 & 0@ 8|.w( H tq1 B O侏C)lL&0`_ZHj B @ A h @3 Bxtܔ^v`@F 0@@Lhp@.x X j) b0@J p2*oekq߉Y`N T`2L!a1H!a$?xG79dh @2+ @'!43b & @t`P 05#.pZJ7d05XĚ k&bb!K !@ x 4x0`0@`&!dVX ٽ_H~Q D@QHk*I VrƯaъ=}b @fH@'dL\x0Wr,H€ @Ʌ`+I2H%!CHe@W  _O뿁Mmzo|tuT:Dު7D~O4TJo}.zOө:gP}U?zyQ0y^˟z@= ru>={S\ψLӼ9Uso;bP̞̝&LM=ɋ/E[MblCSv$D^wpo_a&ō2t<'Su<U=u>O'\StY<~򣣩`4[×?qz@=}>|{;xsȪyZ:D꧑'Dz鞲u<:Rzη~Ss<:T]3t]o#ëOΞ:>ςt ;r<NҩG]=5>\{t*\TOOOu<@rwNP/J>uT᪎ycgT座l:!OZ[@W p #ph59F!D>L_ FvPv 8c *d.@ ҊExo`pCDN$\wɌg;v ^SBL:`$|: C 6l8 s r`ŏU05'{2BH@v4q?1Y@p_000~xbQʙ\`謑*a4 bP K#81,lxަP08[R_r)l-E 9)CF `50?0a/cʊ0@eU[z/G~ML~` d8)av?}a4x 4XdL4*o6@0$ *M @Ty>&x!a?;!@1!RB!وp`}S 4WepĴa@D||>ęĴYflIጯ+cTvVtc*q9@vP[,F|,@}(A8¬S0Hx*8^VgW l qLJdx`w(;O;l<%M-ۯXo]Ln'>70'7NϾK:۱gѝ e;|ﳡ-TäfFm[cBQxg^ao61=3u߰ǑV~Iݺ!J_QU1{v6I~V:>nn#8ͶvzͦQչ ͿGaR~Wcn37w;)pvKe9xq07Tgn=-adxs9؈fr 3Fg'``8:/;>|U߷wns6߷_پ~IS3`pX<yv&J=j7[03N.g#lN2I;q3XJL9m䐃>Rnx>qN~y(|aTvUDgF1A#Kc=NjWwqDž A"QTH09qÛ"OԠCȆRܝ`6xX3oen'fuPq3a8.jbm6Ӭr7=j$ O+˜?VƹA c m;m/Yֶx~_gdҗug>m7vیҕٲ3=YZ-Y_?<ѧAͷ;)'׹$Ǩ ςRX#;nu3e|4Xwvo0lIb=fun~l9?+)[j$q{Sܴt~)cǥ G$a찕}oH}ݻx?鑟}]e3o))#|#;֦FqDM$_?Yv~Xt|ƨpb{l9Fv69S^oݍN~m̎s`իI|O gj9WF9c}iqLZ2JPqqZFƊvs1l3:=39؜v7PFuC۞XǨ_*&$SO8/? YJbb!^ F(>HxZDpvSCˇb9x,j=PqSt}Q˝*GM~7I 6m6պNpCu|[';Co>Vk100I{;gTFdqR/{ϰN33T]lz?llb1φ|r ƚ>$wQ@d;Fel?: 0dK1y8#{g~'9l+THSfX{jkTKq$V)k w)u{p<%qd%'iUIƨ~an~:'?aV 9:֦4m*b\ s1([jAQ=ONߎ8;lzݖEC'b){7Q8-VaZ5q<,*Ft AzqgM0఺X#I)La;6JN;ԧoÉqKRWgat; ! $Ru"L5NJn([/,=Yrqu2y?7mqh9 Vp*=[[¿8R'ezj^q,[wcLa#Ehly$R֣a#S^ZFSa]49,/c?p8 A'Zp*fs,%8@gnm9?1ަ':Hv<ÇQE)fe `4uZ1]qN931B:JDPyaB&8j>18Su k==bW| v[r25yq, e{~Jn߯s8o~Y*KtN-g.uf3^ss SZ+<̿=CR0<9nF;W :3o9(e(~ږ9nN4. ' 9N9JZ;8pY?Ç5+7umIJ_sbpt$ @-?Jog #(IXڇp@ j{ķ`6Ng v;f1D8Jx^`jϾQ{(PxS6;qCI^N` <*a)G =.N@s0dcp s.{j:=xSsǼraHs>|bbPFjLK̳UM1ÅR5xzq b0xab*`,:?`Q:HՈzUQØ|vBCzf/3TC9SgÖvVCL"J;?>lRIsEQ;Ƭ=T'@p/Տ=G&<, $̣Vng8V T+ ;?Y xL ADxЧ}z'G¡1ڱ‚ë2(5#! 8 #Gp ÍÈDbxCHvͰ's0sEH7Sx [arLPx g9"Ex5NǁǬ#ea58Xp`D[MI="8 X,qTHbwS]Q}ߊ"SxbEAQq=Y j4M/%@Py=a 2zs>Pt&7 Q_1@v 'WbrC x8PTd|Np X\|4:H2(]Lm7x DR.f>@j'2rI #o+0 g<2HC#HUh㈭5YRR 819Ih|~ 3I< {|y85S/Ö1ҍc$R0OI.`uhs0umW#`h1F'1>Nn:`(u`Q@π?E7%3\)ŊuV@: WRR3I~EgFb ;AZG9!qomMx\> Px\Nq^ 0`FI: a^fLA g`@7F˪ #UA`xvB'x6qfAUx8c[}2iJ: 8(\3*YȰ;׉ #"Luyy:H"jE>,G17D &:x $]|&l @^`Pq1rx2=:@p<$'ytAn" טq2c7^( @s_; e`x<P x * 1(gxP D`xw߲p f+ĎfPUo8`a:T}x<uh\ c(:HSx:H@.W`5hP2 . y/!ټO`0qD'ˁ]~L*\O6LPc`3 `5q_36ML$E[ZftU8Uׅ 4su^rx@.kAG|p5ט5^(<p׃e((\EWa˃b ]Dpc-x@,n0?*, &{Wy? C:07¯ dd!qA@ !{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI xbb!z ! Axux@M`rY^ AgȎ&CGJ FW@GD@W@(t9TPګn _;(aJGW?-2Ƈ@/H(>^(j@3m ^ xx Lx N\}"}r?m^=@jPeb{yhטC@817A@#&[טq Yؠ &0OQ^aR)dPAy4h 1` h@; TAj}^b#8o#.H  3"&Ley$ا@ G@UEEIW8#@vڼ¤ !g>I oLP@uM݊ x`^ט [S\5",q>ň` 4,D yLP07pA,TP"AEj0dY 0q}yH!fPpΉzK=~k8|"t8:.0t\A;:uF P|@ k 6)ܑ re6}yfx*t'^4A8c?\FfArA" =WA#xhkĂuxێp`l= 0HP`` 2`WP\ ?z16]W0P O=^#G@?8:^f>>052 "#}xJQUB{0U4EHYcȈί 0FEW.xP0`r8* W06ig > Āi9 op 5`F P:-uQF>x 7ׂ8 =x N#㠢 5 pq@nÈ@@@oUx6#((kaP`Dl8?\* üXx0W[0!^$s2P3x1BŔN;<}UBphex#@?@žĎx @1@Jt*KGuOJoPpX|y$pp0x1׋ >\ F2fU| 1bhU c4<l|8ba"*O0P Jy®(Qࣕ@,@jt7;^ <D.(.D{"|;ױPF< @+T @0ߏv>pjdN:Gm"!.# >(pPFm J=V*P b$[:lbx(>:7^(10pUx!Ai:hj`` @,AvP%@(|U8 @\ 01ףX@v"¨x`:9A30[,@?B"*|#\TW#soĀ:d@tAP <`WV de6kx Py1ר(xlccBmSP2 8Dq0W:Tf22@B:" > Cx*ʇ_'Xuj}^DrP`.@ ܪ:ol^4:|AG%0CTE @o " p|^\XbJ&YEBB: A1?9uG-O4L !\Mϊ%H @,@^ (1%\IyՉ'!@T M!p.& 7ixRI ąT+hw2 HskS N _(<ĘV/ꁃc|^bb! ! ?t!j e2M o0"!c)<  ZOH|D HE!#Fh ,S.I,j 6,}L!\BD& CPL oSNf'5+01&F Hh(Pegb  I9e#*ae4`<@ ɥԱfO0 ",PɅ2D5j q  9} (Q,0 c +Mܸ2*G`\JIL[h43 D4 :C6z T'lp(wS5-Z &vITD(%REL4 F>45Oї^r7qU^9$JSb:\>(h2^Hy3I%"` J$ VZOJes(b[IҾJOLĢBU%'0 iC2֚̓68NXr >&RH /#~"Bƪ97!z  *L/bI BZPm*`T Dbri&~K4`0S P",r >,뀨jwrPcژ(lrnf2Бcy!n JQ)**̳ p273H"+` Єbg졐t2P x I()uO_jt'*$NBJ+ (7#7+zg@ M6m[6 @>^9!qomMDu@tu`B5Ađ㠡F& uA(\. |(uQ #UP O=P9:Ъ$Ogf`jeT _1 2iJ:UB{0Ux,0uGDQ[=c@MSE>P0`r8 p QL t:8 }@TH a` _d(tMP@t ?0(8 |`9wPa(#@@r@4pWP@p<$' N#㠢 5Bu0\$RG l<jxj.(p32fU'f=D ~6>0 0㇞pfML$EC@ҫ]BN9:pQʂU@AG|p5(.D{"|;ՊB5A`v6` I @5@t?;YTge gx:/je>tF` 2zp7Tk(XU`:99?PPF>/"81 Y`BXy` OPav<t _0D(uA@U7¯ xu@BmSʂYr#꠆( tDAC`:PCj bMz'pT(aJ@ ܪ:42-24:| 8,p1PBgP9  xQ0ahY8t(r F TUd`E_ ?` =Ɋ]` ouȿ'Ka< 2>/9 9 [Ek> U >_‰ww]]bb!a ! [<QWwF:. e 7=| 7Oq-u;ˑdxH㣮AQ2@^q̯zNx cGDu^i>H8*݃￐xɐ?4c@w^P@c,u<u_x Q Uׇ ?Tuyq j:#Ca ;@`{222 cD"xf>׼\ 5+@4 Q"@ ҁ6 M*;y~\ۯ, 5y"tux??W:UxT@^d9P2לWN e> 1 ?1r:P8+j@GѠחW ڽ dO`oN*::9ર̫m^0 7UT [v gPmxF5^((- ^ xx*t-.`U[hTy}zEAט2**P'$?e${\ @1mhUETRDT11uEUxy$?yP@kʝ{&:H t|uڽW\.Gqv _"xup}_"OAy<&U~u6^\H}xnP{^ 0 u{X9Ȳe^h }n=P *Fl.tffSJ_:6ŸrEp$ ~y^@EȠ^@n#=^0%WY:T 7uS$8ϯ_ @!O zDhUx|€6nX`7>"Jrb){*s*W@ x80y@݃g:h!bb! u[^5 eW D x =)dd!!@ !gwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵbb! ^bb! 1 ! w p}3hJF;L41|BlRKF %쪏toϯE$5H,5=02>[D2nϚ(hHCH+n$ؑXuӷJ&Ki~*` H]L;Tgd. k@&~8 1U0 S+N䉀a@ JbAS?? 1ʀw@D(bjy)ov-9G`vWh+ 0 6@H@HT$'Q`(&4Jc@W3i$L 8%!!1EKf0 hiDvhEY-a1_=b`LC;EvFe0i҈EmAA1$_Ԥ)0D¿%@jE2 x%10*HCy-efVN! #Ebp,95?3Dħm D,BŤ-SBl. , Tr >! /,b@ @6jg\@?'& Ov ɅQ0 ` y !mTW伿fY#$l~A0ae3@Q /1(PR@ @~1 C3c!J @'@jgQ07;@hK1$iW"HM/}ټB+.hh!| z0p H}X\ ʃC{Drj#f{h2ҹ Ll^}`jCK@13c@!(Rs"rLXnb@iS4SbF#_$NmtLJ8͠ @c~@@ņ2Ku$S1A#@s5ee°O| ҎQY ߊ0$D2&ah\XjrS9csp(߄)T T옔#w L1& #>1!S*LNۿԣx\b:>D$A#hz @vSb995vp o4n!Lg0R7+7td:K1X JHܵD @'%X D(P.b-GA ʢI)RQ\tRPCx1%bMD3RmPQ KP1"Az\ 4.::PqGG@lqA<"yP46 uTK 0 QGDODpP~ud;}H14dyU:x uH[Υ:hWxw 5Q a6` glʃO`9U#`0|5!͈W;kjjԭU+T.I4uJ@RDRGTH tW}'L2AW4\WN'M ><I5 ໕\oP0aQ.$ GT#Ca8 j 0 4Nr,T3\hp6p7P@4q-tf 2Uh`ѷQnjI @"wu"tuA #=Q*N( N"}I_C9\ 5r5z9Z4ڗV@/PnP@U"G*@T`n ?@@Ea x2-CThuª5 eTPP @  9bb!A Q bb!š ! _ x+t8??긿Oo@t2`1WzP&E#H#ǫqKRk 6D1FI=U&@&*E^Վw&CD!@2#ї!T"-`x1\"LUE&BHpRdk7#1.6ERd*LQ-"**_`bɯO$>  ˀ3ΰNOc "}<"ywWOQI^ Öx^+ _WyPfu]:xxUz򣣯Wuop?]S 9^/8 c//O o <GOo;%mU;[üXӀV^:5:T*SusnTPa'UyP៧W#o$N_޺x;Uo'W*xruypEGW(u؉_a@} ۯ$UU^:Dte{*Du:˺ח::@^2 1ҫr;y׏%@r/k:zUX]ם/UyNTu꯰gU:T@޾@>Wەt hup^Px2ʯ%@@}w! Cbb!A .`edd!"  +'%bb!, `.1  !! !##$##!%&''&%)***)----010448@  })H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RzB8 I7A=yl<Ҕ/)H".RJ~!$`.ZYh8d`= 5Z@1\ 5#ru X8yK@0 @*1,k|0)^T 1\ U&ąKĮ,l40(`B@T% &q)IrER)JD\)rCX.@ M8:BB` @uLW  5sP`@5$8M`@[~h"b{ R4 $8 /(X Rg >D ,c4.^ $ N @4tFB03 +IH@ 8~,nV6 1&8Hf+%p`#| MܘPG$Z:\ `\Zprta_+\0@g I`W~`5[Z q@4! 0,# Q}}7{0@ A4( =HC/p`L(0%p aB`0 ,wIlĎ@>  h$2h @&͉}Z!ɀ`b@ ؠ h%6_;*`&"htB̢` `Bh 00h@ 8 a A` !@B1%_C7k%`rBr0@:!Mp4O Ch$h ,H@h.071]l{@ `/ ' [lYj@h)@/@ 8@& 90`B(іQ7 6NhqE( PPɈ:nM GrWOF]0@ 00@ @v|MAN0tv}h2jJ#@4!"*Z 00I ًBC1- @`က`Rdi7@C(i @t҃ &p'a~`p*Ȇ6!d#f0@jC!< LB3!= y*AHj`@vB @``*BbICIí < bMC~Q]{l#b@`` $b@ Pɤ2QD)O?`B'PICH\hLNR'1v `Ą:pj]7 9J0 Ӕ ܮR@@5X@!T Jo_#  ^ :4%`;&,I-2rӀWnP4">)?#P p%~c3 C@l Foɚh  `F E 8`J@h @E @) JRқ".RJR")H".uV܀Gp`P1 !&ۀr-oRV \x Zْ^x 9 , Pd҉ -)~ l@c @#D`' &h0&@`S9,HIh= \3Fa0 W(p!'W 5,0 @< @7'| @. @fOHb@dX&i0BR@PҔvNWU !xK /?J'dĀ!'!pB &'a)ļ4r Ha0!$ha4,/hR*}X@ bB;I VR r+@wYIJId96 C ;@ `@B4;& 1aĐ1@gh ׈R 'BhR{gC&M ig5')@` ɄnQ4 P <1  uif,%P j`BQ4CPP mἌm XH@ 8P&&*_!Ibb!> a(@Z`T @2&p n@I4 `-zeؤ@vlp5PX`jxKcJ:Cj8 +&Lp ;!nz\P0+;JYaa=I)p``b %3LHnJI $'I bg&›Xc 8B5T?@. @ tPJ&0 &񅕂s /v(LLH (ۯ=X @ HaTPa` HjR\O(  *3T`6 ؤ=A@8N#$h#A @"x`*BJ|YIqbZ@f|$ >^6P `@IAlRJNd}גk | A [!0pG /v(LLH (ۯ= @ x (49  LC*tL "JhbQCwtn@d : &j Hґ Ph#K `FG&X& !BX@\~8&K0+x@;0KIJKAnkGp @@.``@( 4G{0@b&J&A8  `@! `%`YX0^ׯG&_籂x!7b - `zL(KaLL ɀ`xY4 ( @L&@-PP22.r8 . @N0 jC5&hC@A %`ϋ{@8I4kV Z@ \@h 7 (g -$A RQc@Í&0 @((@?Í9p ɀX29(@ H]l*' PC##,@@`=`G ,@ * P%҂Z `W.op@:-@? `(M(haa);2  @LB.rL, /`bCQ S# AE3(<5 th(-@+ِpAg(x䞀P ,\`xPn J&1 $̀'LxhMĐsЀ=p:& {5( b27Ւv- H ] dp W 0 Ʉ+P14ԓ,!Ɉ/~ (&|@ 0 .LH`1!PH( G0 @7(`(SbPZ$@ ! `Q!P>' @b y n+vۋ0) @ O@  %` ezL;~Cw@jA(v** I(el>ŀܟz@2RBdO4 o@j'g A1 e݀n| B@@p@M4($7GH4c~L::!d0Y[H \p %*B! (i,b\ H(p+!RX8Հ34@!$I  )!%Ɠ?+;\)])JD\)rER)JD\)D\)\jR()qލJD\R)JD\jR)JpTER)FWE İ8؛\ b8 @]0`PJv9@I I @59 )e] +9 P@jPC&`P\ (7_,lpqk@PP C@1@aD$↏Fq4Bxp?bb!H!  JG:YhCG(2# ,1 ` H @`AJZ2 Fq@ (! fJ섐2L,% H!hI @jRv)H".RJR")H".R{@! @`!u@tt4,YE 2 @ :^hB,pË+r: 3;&@i7 @h`2ҏne *4@h: P3CIBA= @ @h f .4@` @ `@vX!n6X ` 0 e@ W$0 4&00NlBIwƁt $@`B`7L&t 0y !JX@^k;P`jR47.A7 3 @,!jaTPa{@i GG$E{@L 3]4Fe4}@$A(#3R\ @9) ?ɘdD`NI'X h+~@ri4 9 qB3I! Xm* y4 $@;P  0ɡa)?ԠӘQ`` D?!!<@CA 37 0@ @-0 =-8@TN# eP@`A>sjlB?P, ' tj5<bHHi Ʈ8 @68 9,@"4CHAl0j.x `6j @, 1L娔1 |ǿD ! P X h_!ŀT h! `@ K3    D0Ih( 2o ebup  @ :I Hrh<HJ zH <@ D  pP' 3@K&B&:PQXa-;kӂp@R^X &hA9& $ dj'$Yv@R @W @-044200Ph@Puh)@şr`(`xdj3$%RJ9i N-(W0 :0pdC@|' @6@ 5H`z l4 !1 -:( ^X x@1>B@\Y3h0vP "!^H$4AA.+!(@-?!x2: &E`0i,Jy%V ;H @@i4f r|aYp6_)28  W ; Ad.V<33:P@ ,@@0~Q3 Hh)#w @LMH@4Oܠ,37A\@`A/FP PzN:(􁞐)x}aw 3!@.̆M !:H]P@q @ @9v @`k &0aWT"-"|up <İ \/vVXIQ48`y@ gܾdƿ(>@ eP )8@` 1I+T!!k  lNDL @30@LQ Ҁrl=A  ^8 Za<01 ,fZI'BzTPV``  \ڥbb!Q @ 8t̄AI@: rQCWp@%$b`*C!a0R 8 IhrLnv *6 eYɠ\Mb5Ƞ᥀Ą43%,-5X jdrɠ&;>LKL h l 4p  MH8 RtPa ɀM @| @3@"hAe@*  @`t4 xkB 6,!7 URKqTnXvx @0 \R@@ @X @07@i,(Ϟ/ p@@GAa:!1Rɠ Q HD q`P4 J @;; `  2Ct@t`y_u @i@/&"( +|XxJI4$>^I\^0c*H@ 3 bI~BЅgx %3wp "p@b Ɉ ᜚baN2` b v`@2N IIc>`f 2&\)&bKMpՒ3` @4 A@ 8`&p*L)7g,` r v `bv(roHoRcb>kǀ6fH:z0?ᘆP&sIrRJ}T@ AA)8 ?bC/,:Ai  3X`z@Y @  @Bb@F Bp v7& Ph0Z@`R @@:&C  ` ~¦~N8-E A .? $gY:$"&R`nM&'Z8BrB  +hh"h(vņ\ S|pD|!b(1 `ḘVp?\iAr: Vߔ90PnRJR")H".RJR" +ґ@ 0GA 9`f$@2J?@  #F,  1p6b`070H`!$2h&$}`'bei@B Q;b`a3[rZ\HF>@ 0`p C?|@x @*90 %/A4Ƃ Q 0hp@AӀ!@a@'nX RQR UvD*IPB I4M H³#/H 8 9 P@T`!P7Q5$'H0Ce! ,) e(±-g 0/. 0` BC!@@ i7!e;ܔ(n - @!t`  P",k2` \d00;(L[$-R /ԘZF2Xú~CF p @XZT@. @bӀh @m~] m4ph  @`:@`Pf+03roRp @ FthD<>IHb <ږ @ 5$JbC0L!bBa 4i%L k @  t 0  <4V& !ؔ4 fDA $҉!5-Ї;f%a`_@\ V @3^pjMLb` 8@`ز@d70 }X "0@r D0*L MXh`3UK4;H(Ubb!Z @,f`ɉ(1hvQك/N@01&^pq) 1%!$ C}2 0 8 :|L d'rQl틾KI2HaeX B+Q3T>(A$0% \X` f@ P0#dz .) <Z@$h*Rri- ά>@ 1I4#x@tx&bY0BRz B6$P@@j@<\ \P M 6 ?O2CY$ǹ@hX ]9 rbL P bXbܖ$R@NM&$a@ ɠS%Me*51a?߳0@@}J@r=( P!,H]<-P   P!(HU)Z B!p(3( .cFqnO @2@ @vX <KH%"g%eD H`a+K$I7H4z`$UX4Q+4sAh ! $?1A` @1ZCz! )!: ! 1D);? A`A h<@FX`&Jd%|JrX@h@b @`  : ((0B ,^Z(P`.` 1~P a@7!Q-!(ձ@!A (a40 ptn_Ӏ R`((;pX) a1 ׀ia @`@- 14Adjk~( /nPf\@: @;*P0؆PAd$w k+̮ _`+C@lQ_|L+~a꿩4@@P A5XYaBn:% Md́my@P/ ```9᜘P7,y@@!c14(4aIJj1|.#.\)rER)JD\)rER`(H}=81[ A^!p *@m3JI ` m ` @B 4&:ӎ zE_gdb2 1/ IQ3N19(4}0*M&Q\M|B-,0D  ;|Q4L 4JI_m0@p  (ZB &$ Q8q,(>,%1 @D\)@@\fMA@T(&Xb7tqb`HRB(iE|.n*@ &@, 4!4z8i4"i`eɋG,0~JJGϯj`@ #Nv=` /' 6G\"` & @h`iH,/ Ah( @&P D@2 %A,Y(h Y),BA[P@[d #`p @էlrE= @P@P @*&+4@p!|ܠҀb Ia' >X` ;)%$҉0bfIc8e$?Ѐp_4H d @@\C,ɣ*B)OX @ i ( ]̐*@р C!?fB >`* .`@ | px T4$P 0 j0&l`xb@`8P` C@. nJhh@ `IJ(H@dKp@11:K@ RLKlYEh @f_$P`@k@r@A @8J `' eLɥBd%9ޠ"AL@:0v@(`5 *M)l `mA@5A\@/!L  Ia@b`+ X 5Jp@4@@ 1Pd0 R& Z8o@ `rW@ (05@PXu $IJ( ܽ7 8gQgX @ 4 @& iP@K% d̴nA,4iE@*ZBQ(ZА$9^Y Aׂ " kVZ@ 0b 3zJ 10aC~|L@w%Ah h8t@P ,vM2`i IܱSG"T_,3&@a0!P` dX5"C~NQ#A\rP  B<̠ ]0/ dep0$*!% Ѐ@1*u  ;x3!`eZ &cvNWk``w@!}o $K}`xz  =@ x`g!059 <`@1|MbdK_HIIk$¸ @)X(쀄aG8 PC4$X JߤsO9~L0 <P\C`p v~R’JCRu Ě C@P\u@\D 2/s @7(d0Jdž%roFh h 4, _6J  xa0@B4\4ܚP CV)6dFP{P̄ P` `aA @` C0j1x Ul `'+   a`@P R2! bGZ0g9XX 0`0M (`[ đ4\)\\)rER)JD\)rER'030ĘLP L&bɄņ$%  ! \ y @n0 0]|`$yP B/`T 0h K($gn~`f `` 2$&|@`0, R@n7Bbb!m  AP#`d@MA@WB@1Ŋ\Aזb04i@ eY(5#_1ΟB9 ' +.  !$0ߘ;rh e Հf @` 3$&x#8 1`d#K< w2H! I )J@!~ɠ$>M}@ @h  j 2 lpd07!g-r J 3  8L$n@v|IE|iHHc%;@0`'Xhh q(hƘ;q/L`f  ABX @vd~ri  &Ҡbp @n`*Ck1,İGݥђ~` 80vPE0C!%  =`a`dri @E;MҒ; A4f IT7`ޓxhO ߻gv"`%P 8 <B@t0 1 I4 )+!qЃ=ť@: HDA$'(7}@Q p@cp0@6` 5J9@ ()$ܲfH%g P@n@0 X 4C; '!  1h 攽rI` /&İ U4M q336N@ @ @  @LM@ I0f(C+D2f +h Zh $ !P 61L!PIOtcRzU &C@3 d RCRY@*OK:cٯӂ d $3@Cd@t ` Q bJ)&{uR`!z䀜 T=ria o-` I J fbpp0܆Y0|hf,@@0|@5tX !0$$_ .RHn" q018 /!$^)Ub b @h ph 4#a +Eh    <Ed72j0C? GN)$ɞ );P  "i`T R@*1 )!D,0Ҕ` kX 3&/X @@vyEw`uw$L^ bn&bCOI7CPR[$')URJR")H".RJR")H@ @*6@ (H @bl `PĀ>/eT#L`7LLbI>QDG~N'Sl7/s4{FxK@'@0@`!lb4X  BlPB7=Hp'ד J =R ! 74 $f-YJK= ^ -5J`Pn h@ޡ>x5 iv@ -$H@\`vCI0p 0 bB ( @ 64! b@4 10 vM( PK[P4~4?<LP5i0B0 *B!L@ $ PK҃I3cNk!` ɼ 2!  ԣbM\b0@@(M,FJ[`;_"t@i`~P @4nX`' 1# ܐ P0e`  4fB+l,[h1!`ĆbkYIF-gp 7x p H$lJ` rbbXlĠMGtR\ A@@a@8`@P CbP'؆C(㽇tbb!w 4Ʉ'd@@J>GBC@-% įƊ> A4R5AP. @.(\(HPAYqt.2I 4 @Mr2$09 :F/v! &! J$2 I(K%%CJGDb|J^3 <@?|M/-@6()d0 @NM ` A ;l1@: CL v d 0/UfZJ!$4M @f% d}~ Vy "1@P4 P@>,3Rcw@bSP0 7 İ3`@|@w& @/Ha D0 x0 #t2|MJ & bN %Wƥ`@RX 0>~t=DTgɠ68f%VKQ)  X` ;\ @vI=&I81Ҭ\ -b!ih%$i6C:RF[.9h̼t$0 @`` vXT@1A`&!Li@ A@ 0%n@@ T/s2Kc3 e-XR*Cp|^4p4@z@, p .!5&Rؤv&jRQ7n΂h _` b_*Z`4$ (5&v,@LM (cp B`&BQ5 /)hJg D - A( (wnn7 ZM|3^ n A$\ܘ$ 7}>E:40;H!L/?KT )uT#D@p@' } &1i2 @!H )H 0 i74 (~RXπlP!۝tRLR-,LBXf-~Rl @9j@A 6h`` CCI@_ЀRJ%jSAK p@`B1 .f$BVB,I1&ܜ0jrW`俰l0Dxp@/<t(p( CK-!!&PB! #'~-x@ #hBD`` @Bo! R 5&2C?[D0@@(Ye |P rJbZO'_RJR")H".qK @,@Z +P f\=`PQb`xb:ì@1,P D"x043b쥪e@@0` p 1&%vpA N[bZѱh(J@ !+q%_d)`@ @%v, ` N[79Hh//P`&J`. 0 .H d 8d0*0%1|  >@AHn&h0 /}+0 0Z\P@` LxL  Iߋ+r2;`0L (4~,v^ +Me\1. ` h '(H `@jX C@1,d @4-< 7K&C7&H e+Ri`r T2@ i`M@tp`o$5  `7(` s$zLLxh j@ 2f :b0 zUBI!fK&fł7 bb!a  ĵӘQɈ#L ɠ1- tPpR|Pj@1Eh J<$@j@  ,( p  7 .-<t~$ò *bP`DpRX'f`(@p̀Rݞ @L^IN`]ԙ/x T 0`p$ `  &t`Y-䒐Yj A `'@3 n@ha 4d RaH[`oߝ| KN#X >(pp0@B`2h @.@ Rb/^ ? 1@/lLb I&90q4 C(;$j]v` !v2AH \ hAHϰ濠@ mp @0z9` blԀfp1Q<@2ShH, M3 1  N@ `( @X /IoC@H h 9 @~ :!@2RKS T-@@ F @v`H`!@jPP 1+'*Z,d;8Hy#(4(ixL404$$၊C߮"A0pd@1?8 E*AAX5A`'K ` ,Pj1 `L\ iiݓ|+ 4 x % t Nobz3,cP@mpX@@ @0|`H i9$!3jL, rb@#) $ @ K -ۡdƥ, 0@g AL +d0 H `=!2I%@6o` " vx PPp;b` XĔB@wDZ dZ@ AX0@3p .  CMLvBD5^|PP(`rI8V' &!Rq|eɅ 7H G@` X@h`A @ 0  P PR h^BLV`9vfiı$ > Yݯ@@  i:?G\PJ:%ƠP@0y1hQ3 C4 Pg&b4 @2RMH0bi\|7}ԂT|bb! ݆XAP# P  %\3nBP 0HeP5B<%#  $H2@1$zd0hR nSҀNM~s@ Ah 0@B jP@2P@6ji7otR0ZA AA3 @h j6(lX@ja4ЃCY 1\  "Ʉ!-(45Cxj_>^J1@@T @Z @+05: !@/!; H`) v  @ R l0Tp.py| @%,,AXK@@2,` @ p*aa$c~83R^Qx`x@ x ~0S <~ 5@ ) X `H`bU(+Y0 S p a  `@?}7 VMGG%'bN`+  @. @*l `] >Z@ 4 AM 1!"1D && 0f3@LM!'ؠNR 2L!L&ah hN%ns  @1; 0@7ȄP $\q0O?M I`TY` J@ V@ p.B /1p R!/TBIʾO=mR@4` Hub| cq|  Ov @`z0$ @ @ @ v@B @0HXb_&1` `5 4P[z M`0}C%Ɂ҉p҃P5$ƣ 0腘 Pla ; H, +I} pޕf21LŸJRW\RJR")H".R @X @^8`:0@@迀iD0H!}tK@i#0v܆`I edVԣtxJr C$I!:~` @t4 @tB90n0C0jķ^4(INC- !%98g+p=@  @`@Wp@^b Z ; bP 8`2 K-! 0@qj (v2 hNM}ZB^dw$@ @X jH @LXD ; `:pC-!W SP@p   - 01`r@hp0  T`INQF` @ 藀HlY(ie|1HV@bq.@` \4@ppZhHܐp -;J$@^4r@ A8L!\i$&&3@#88 $`T4gD i`s < % 5I@ tQ0`@q C@bNWdR.ZBh0 LX&~\x%HŝJ)@&P@Y g j` a$@@LII4 @`8Ť(y#*xx2p A0H 4@b LRa `P;Nep @=@4S(A@ ;!4jCLpbb!!  Zsd}ƥ*zP! `@ ZX@T4@Pd"nI `()@cprA@;/3 fdR`? @5 @ ],)b@+v 0 3 =@`j`N> U( (&&2 vp @hA$@ E\RR 8H @ tHHߤ]%@ 02`Jg~P 0N< bZM,nQjdbV}@@l( l'h@(D @P04Ԁ?1/d '|5v@G @)@5  4tH|p` NixB5N`N! q,| ` @.F; (X cnB({$BJ4 .d`N.@ɠT߀-nv`1)j`jHDnL! H' 4.O>B@(x0 5@ A`@<@`74(!00 \LF ` | 3|B(@P$gX]xt - H€-vCda0SCSC>`D@U@-(!r &,0@1 &%t5 P{Xh\ 5CAI, %|"׀ 0ɀ  @gZ 0N@ 6y@@/B_RYdv 4  [0 @ H`@, 2@0! 7} 40h0@fL4wn900PCFu@Zl@P@= I>C 7b&,4A D/f p`(*AHhRvToalá<` FM @m pf?`LRh@ d41(&,&0lN # `$ Bx @ vC&D Qd"Z@,! D& N` dQ$)%@PP&A,p@P)@A)2@1T/C~< Q($ CYL9\` LF! p33.10k` k` ai4 L #b L q40 fxay t6Rp))^]@ 0@) @j`: 0 'E7, x @P@/@ $hXI @&!rB-=,@Q 0`:D3@=bp 3|Bpi@d2,BiW2h(t &A`0B|4YKq/$@0   D0 ih` 7$ q׏܎] #Rg^H( iz _ _F5,!Z)t TAG0&0(<P*^ E;%@T>@` @ p@  ,H 35(؆L|` 0+@ I eJ||Z  @A T@ F>!P :K mh @? @ A Xj0X``A`iAp@0(@`Va 49 4a0B M(B1(/60 L cjJY}??bb! @Lh5h%@ C%]B(P ~v 52@1V  `@+ɀP,h bɬRPB& 04 }|b$ A2;&* PV%R`P &`,7U\@hEj0&<&dVPFȄCt*FEPp% !t4a@00ωx,b6>0. L/'p*40X @fĄC 60 p vPV3J0A0X $X`1"HZt `Š40$a"݉T l@ ? @ n2\M!5  ҖY)H6 @!H T. 0  @` 씎P`0 z1X 4  qz@%twx  440>Y) Qh"EsJ]@= @; 3H >J$@0D0Z`BM@Raf\ BhRM(IA{8N)JN.RJR")H".Rg_>x G$@ 4Q45v@@lJ@4H %5ɡ0Jv,0dD  @P(XbO€hbPKeo@~'$ @ @t`VrL1J! ʸa4& :9xx> bP 7,0wɡh A.(0 Ed ^5v@@aC Ԅɣ0!}g @ `h @'`np! Bp@< I@d’w`M,$%7%0 A0p j _@00@9@9 ! H`T3L +w8@ @=  * `@@L( L &H@LI\(l$ P*LIx)ЎX 7TJ @F$@ @p @ p]N`J Z(I A @`@, @V @@@LP @g b(DA@:@O3\@ @4 bh , `@Gb(d@ @4  $Ƿh @ "f@+A< h @1 !Q `;&,@g#@x4ɩزX()(?OBOP@- @ #pp@3!$ H@1tH@0H@NXok1 N P@*8@`@@1HXA @Z bRX`0(Xp CQ7ۊ t2 A@0&"& L0"3@\rEpBHp@ @@Cŀ8vTi ^& 6 @ @ a, t'Ĭ05))-.0a]H &f ,r1@ `P!Q   S&3}@@RJ  #0+<  ; ! P P 0".`0 B  0@@5vH@2 b \M6Pnx.l @N\vĀ`PAaIJjm@ @1` , HHpˆj`7ܙ1 _HbF7$_ A) 5  a(v@v oj5G&:w634 @`@P@IAxP 0 NJ&!\i`XܴVPbb! =``[C/P`@b6` ] )`` IPp :P ;-``$0r- @0:0` `(ɁAQY'R`MBJ--9Дsͨ8@UDB yF+-'dKdoA& @8 $( X0@!f @ h LaX(hhBIX˒p@y(%@ AX)hn 3 OHh phd$ ].d\ 00h&!A{},N;&I0:A0ᥡ?3f(r'RH5h#x c;H Pp AMP *%V@aȺ  `@3AD02M 1@7fJ,@L@aRQ ) "iEL ,r)(Bq8p  LprP@B "6F~} T2B( (4%Ć>@.ыXnnTX뀀`X@Mx Di P &b@,!` u;- 1(@M/ɂ 7-p@=  5-* Ma)킡* 0P'`!ɿ!ji 5P e@0@-% ` $@TjF:r`ha  @K{p    c %tV @4@` 4,؄X!|$.cЄF @`@PҔw )g BGst @R @TPhP| @4   :̄@ :d̒Al|4܀@@!>@@% A0h Na+0@!!l:jfQ0TR2{Payz!@ `M0 L膁(IHD ½;@nA Iiی)i,)a%w0@H@ P I`T@;.@; @0&^` *&fM/%}@`;p @j&@ f I -C`hjj!#I\q``hL !LaH & )R Av>`! R| 2HD~ o/w,p $b8 \$P5Axp`p Ji4 ``Hbɠ$kY-. 0@ &H "i @ ~@p@ L @3`IHZZCKp I0 N! bifk-b)H".RJR")H".R +p` e8 @Y` @HP@9'&fNV:/1'd|@l@!@&/b T4eyh@ -t4t@L@h A!j%~Kba5`8Ffi"@ @@P@L@bJ @bN 0 Ю0 I8 0` 7@p@1X@ PH S:xPo4+Pߛ|/ [6Jth4@ +a 3 @! C !8@ybb!A 1)!'_AX L9 P @M4Hf; @P`apVF%y@$p@Rn @ ɠ d!`MȬJ+ {̿~2  A`Tk7^0ãz_@ Ax"N 1Ș4`'  X9 )W0eJBx‰ ƒ)Ky\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER+ pXx G9jXf>i5<.KQ0ÁcռqE@8g݀YQ0\|=֠?=EH<4aA̦N(Q䎒j XZay)V|y9{~yDY {j`j @ >@=r ,_1Q7qq(|^$ʁaLudXÈ0Sh8h4fac[Dk(h,I8"'j`tCcH*-c:/r(\EL N\XaY#p$8 Y@ gvdy EbΣ8>&8P0J;YaD"cEx+ D" _ Il9dTıy&زD٘,tC004aEb qjRcY8P q:cŌ-RE,陎B" 8 a bb#1x D0l,|ڢmjP ! S)pk!9̥$p| ~F/,IQFū|*,"T3h5 Wq?>g y8+ 'T#> sȂGZ/`@2"1#E+;D5|f`‡15{DF2hi=9.&I'OnVk#G%mKQӯ\B >u_XTφ!Mț]Y'NITjKRP۷&O >Z%tF%ICLJ ;#%K^*R6Mׯl5fffIZU@c7a(ݣ+]lʉy:u0ȫr':tOC83=5XĜI'eӡJ9*h3Gѥ]W7.n_Կ̜'!(BPvwgI b!ǜzb<G m&$s&Cd>7uy^DQtJj)4jLV &+ aaAUU[r.\.{׽vn+pH.#qɧTӪz%R%R݈bbѫS4m&m8@P8N4+J֓IѩR]\.Uf&f&y^GƟ1E,kFzǬ4<%RaHLV&gϔ(ϔ(KĶm,X81`bb)%vBP^i( |e>y!y!HBC&A-5("xW.KiZbز I }Q9cwww~ - Fxrdu P:(a!Wa!YeYh8@p1c 3gy'zX2G:J%o7TEAܢŝqghQnx=;HsG4y*lDр(nG#J ffwffDDDDmI$PPbG9CPyz)ˬ ..뱾o뮾,o0shmbb! ³?*/nݟp)/׷pgGѹ׸$gnكY>J;:1A9*O{sxu.lG [b"y=#;ꙬǸ,g  Ub_&u#Q,P,C[Pgϟfyc{7ђۻ2ǭ۶8'6YI*fs <@#;IGFrfps)ٌa͉@TI'n8q^cVu3k _<)1::Vm|gV;mݏg3ܑ߿to/?2c1Jnʨ(f7{1zl{Y?5PC$J8ʉT8b0y>8scZ0\bb(y[5LF؏ Fqp̼xOvs1N (8~s,?4W'j٪$6q>H c`%[GL6gw)ݷgZۉ㯾}cJ]ב/llln3?JUfhdqfjge|F>c16'ow^盀?zg{„[l7#>d K `|{S<Νcټ37'պR;ou78>̥o3L^r1we7qUٽ!viF}twͿϸl;`v>_ww|Z4f(f;b~??ۨM{d>On;v59Νw29ysV%?w|1~e^4mr0 j`˥)AƱǙkQ*~9gbt{jf'qDs8 cEXnGꇷ=À<9QBT(MLH[/}9ϛlH͎ngwͅ,@TI#0H ( ;vۨaڢG9Rq0_'R^u/H|;ĩGI~AGvb&8@x"a?dz|̥"`5`9&YG­Ti@$Gy*S b:rd4Jv8w T> )k|~dJ4 |(ۇ "yJ#YƭqLN1͠gq0^Q5 ' liT D9YGjrw4_8SPG3,m%yfv)CRG(X }aOΣ\xy?՝g(gS9=cv9F}ݜun>JV"Öee G?fFzhK6$G1u0ÈZ1[o ?r5X=bb!a ! HcfWb |D/ xξ#/G0s{G/ vpB (VLWuwcl4PN8#jPI?~lτ)aNBZc;zy::)F4.e0KV p9cY}2Pt1@P;01Hqަ$τʣ{؀1N(@nrbT(PُZqrs岰v j.f/G؁^lcqXßj9'0Sm;(B.%L~8@p52b'&Qى{csS8 =!07bakgv"uj7*\f `Y+9AqЬMA✝@֡S6/,|yn e,pԸy/Qfl,S_fghKcN]FfvwX$|%VA 2YyI|rԾNc?.–eLH@&8{Qmji*P#Pf}9B~z=ΏcuFN$8O":u}LKnxqVg~J8]189rp0ss$SS vQ›=SG[{/;7RX7T<f^ḛ:n9~v*n K[ S;G_3l'IԷ`oJBe P` O IX8d.J=.nPDQ(XP`p͘ՐGm }P3b0v=p8O&$qG*9wp7p6>WF`*?cOoP,XlXб.{4>lq?Q| MN :ÈpB@mwBPn."h~R< . V(uD8u X%~?*T" o$U„,Z|w'0P0؛2W,(u`p5'c>RxGPt' HD0{ah,pU ˆ;AZG9!qomMx0Aq: mG]x806j|:t"Ø:;̘*/.@^n2U@3 F>p:&:'WQW$Ol, @0 ?o8p5^8=dҔuxDqPgUx( Ǒ`w;GD"  u}xv8W̠T ^8p2^D<eyG Uxи?Bp'Pux1#Q<cij}g*Is?zT 3|€˂Ā}^KEy#6o`0qD'ˁ]~L*\O6Lpv\ PX1㇞~6>10o'kWP kب|D#Wyl@Q@Hjja:8gD$p "!bo=ʃ gu `"Taҫ/WDy=ux;MYL@zU8ppZNZ9@t?@:ez 3P:Z/WFB@|.k@v"¨x`:9A30[,@?B"*ka˃b ]Dpc-x@,+yB?Bl װ85ט'Tt `5o^7(T L@U( P8zPs^ W $gwWS:#@>]r`;ŰCUx׎@^(j@3m ^T d pH>IxgRL/L6cTMOh 9gTeeh el"& lH uE8$s 0 C`N1` 8XVvWx  PkQ)F?:&*~LĬMXRY5*-~DM ? ;Dǀq: 8=^Xa*j0]'ADS 2%6)d%X3&@  I}P!ߢRVdLQHeJ@ *`iE H @7@! @R0D0`*_h` D *P1SqRiaeRIb}LTCM -1\BPaH )0 $|~HKL,1)%|5t")0&(pEȊt\Z$&퓿',Abie4!QkPӠYix*MA)AD@CR` @u0Z` @?vK* |ISkU@aؖD~i%|PZ:-'(ܟSvHCO ˋ/nNMƒ0 @7JNqeljp8I0lI DҒZ(qu040 H);uE5> vZ.7\|aa&`j#@T:NTbYP/HUSnQ$$q0(JѓQ &[Hhe6CV:" =Wbq[@5Q `u@tu`B5AQP`Yw@:.@T>cql c}'tLtNU@'A052mv`4P*p= f]PI8!hZE.!!뜇s~zoW43v#sn*Z*ft:*$tѧ Z49d%cr&iz4i5FjXnL%qdIT8+ЮX @Ŕ,55 `9sA:h8qxyUt7o}qHTj; 0#QN&޳zrN\ބ%#iZ}1c).˺^]c  kkS}N U7 P@l,YmvV9sj-dY 1u][FѸQ(*c X2=bAى1Lى[2gٙfa41lbt2LiZX&iDc{u@=:A:m~n^15k@ jj( ֛NV}Fd4<Ƙ/sx;2eڶmAPZ0 eâc wDffffUDUDFHZF$<ߞz- o0n q1~l6WAaHHw .^QJ&8lf) ITe_Әq8TEȢ bUbU.&_*T"ŝ9]cAd ._PTmrӧ &Sx#x#%[EW/N5&nݳ93r4JEԭ+2LJ,YnFk# ndndя~,XaH)`6B)eYf)%ՊZ>']k֩lF؎Q!eˍ&L}Azc|3 LӬG1&GK-- }+0VW/pt B]e|_$HgG546!GX̣خhJhK)Ǎ%)LVk ;Zu$Il5a599ƥKmC:+Go|hZiuյ_WV'.P 4Vw+U&_U&_X1>oTި*0T_?tx"gFwKr9(v`bZvuouo[1tb1lbmt*".b%IZFSH*YcL&YbYa&rL "mDNdDžxPlsg6>%/ C~ 7E'7'7'9bŚ5pc4iZJr#-F e3 UfUfUUUUDm$sF4נyj. o q-/Lq2Ɏ]d lMV Ղz4j!B,Fj~I:@6a@b@>/!$pp0`0 >\ 5E̙UEckQ3sp6>0 0㇞pfML$EC@ҫ]BN9:pQʂU@AG|p5(.D{"|;ՊB5P<6` (qPUP 4@Mڰ85y<:cy@W< :Q!6eA@,9tuPCGJ FU@B:" ꠡP0j WN&=@rP`.1Q &0lQ Q  `55DP`0| x/8=v>,\uC><=~ :"@FA_h*.qu@h4y4< *T(ojf@^|o|  @&'B*ũ EoPc@n,at #PjpOHD(_Hh6`.OdhtaE $@fh6œn"" a@,03\h.xzUx(g X]y@q_̦_ q_:6W$X@k Pr:p~t Uʁwug/`047H @ɫ9_F{^3Ux|€6nX`7>"Jrb){*s*W(u^ ?@@E<w`x}pהU₀Q@E xx*'uUtT܇#׉*e&o?\>K={ _aR5x Dx >l\64ÀQpu[T_RI\U;ˑdxT$:'G]~ x83@lqx |O2pXQ:@3 Feuy`y l>t?vG'C&@ʯ:oy@m8n@8~J@t*:d|uڽaAW7]W8o.WxjO ໕_xq@ GW2;@D:^pװ #+ਝATO u p7^^ #YHsV^a:P3}b)W`\A΍Igy.tux8G{* *Ux8re8>y }x1 ?1r:P8+j@GѠ׌U|^0 ۀ<D @<㪾@y ʰg ]WP'o6-C_Ƈ\<20Ux@x]  p_Zyidģ?fe7tB^ A0n TO ~.,ėQ"LD3#yA!#"jH_}&:c҃eI} ` H\!*CD2go>!Xz @rSbBfhqRQCS%(Ծ!` $ZyP. ~j }X*!>~4[SBd HCO}>Q9/?NL% BnG`H-!: AcF, ,.vhJ77LxeLOxh! C,D/2?(;TIJ\j"i ؄Rx(љa40҉LNL8>30o%K +y Ra p!b` ɩ&?%~ ZPA'Pie@;&' 4rv̲&Ё i q o ɽݰŠ@`/ L RB~hgrID t-9 y8 {A[j)đ2 VW0 ? à @tZ6J KP4! 5;/oj8ajb.74> | ( }g18:7| @(dd2XiHb @nT ^R IaGĤ&̢FC|Z62 N: 5eR&,iĄwvC Jɩݘ[ܞg@CS'ϷbY{ܗ PWϝjqu0 95;qi(H&1(_j S #f|5;` $&kgb0R\[l@!%H,O ?ecQK\mМ$a\5iAFnVJQ v)a5RJõnYj'T @뮃 A:`q̭jwoXP_:'V GT}T' <0 'A&@ʬ@4cDvu(bb!A ! 1G8TXН D 0TuOATH@c 3y`-@rl U}H`xj#C㧛;0 S dX? 8@GRUgT]Hh@juG{ΨAVQ,t _[0#\42AW4\WN'M7 ><I5 ໕\oP0aQ.$ GT#Ca8 j 0 c'XҀePp}:[CҪ #YHsVS ҁ6liU` ]Qsnđ`aPΎ82<U @Pp@wSjR@3|+BR$pW&T #F{QuJ^0 2'Eq:%G]C: Elip|d<ɫܩ2jd_8:HU_r=I.LOOYF@rC mp{$"`_ttX336D7Oj\}WuuO~ y#x |O2ު9x:i>r2xc* rU~7g[_J^Ttu`˸xat+g`e}}O o <GOo;N,+UgW:I_㝛w^R3[?N8;{~WG\H*}onR]U\u 9^x=לb%}oTNY ۯ$UU^:Dte{*DwwWz{sr:a^5vUy>` 7"tĨ_| `7'WPYT:^/뿇_`^ bt|}u庯*Ճ7j`d^J;x= xx*ut+#QoU䪷#ȑiAdPfE Pd1U( " dPyEE]p;^b(P2>1" 1U"P0$#(R5eyDTUn>ªD&(8n:$4T! x I6G"^2L[4^aU" yEIR"OqWŀ{^e"EE̢EI ;R5xRb"+@F2WT.( UHk W"TPdT 00K Dj t/*EaUgawx㣮^H>q̫7p5^7D|@:On5 ^_mʃ0__YWүוow;xw3:l|c9__u=O!ïӪkxw:pYNuu}dfgW ӫߕ7'J[ԗx;Uo'W*xruypEGW(u؉_a@:_5v7UW#$w^'J-G]5]ޞ\hd@cWp^O H&|q*~X T t_q*,.Η'*:uW3ׂ؝* o_]ynʀ:@u`ZX4:8E(<eW ^bb! 1&A֭܀ p"dVYHߝoQ27B+oIʯB/K,%Dh!#.,Ćȕ,5%td 12n!2i!tb7aD C˗Q1%XiR~Vt$$qMHD @ rW: FwtB1@jgHdp!c@1pGGc4f&jO T ֟;(3to 5;4` ,(U$%p膀`39/;‹GJdlBnI PH@ % )$٘u0l<44S,i&Yd1gWNXX`-x`-}P%0 e~݇A@PB o!az~B@3 2p1 'P*Pf) +3uiDZ͋,WˀNqđ4C!> j`h``qG7 If 4khbJP$HuL8YC6vL/f'!83>1,LQLGS=mLl@XԌm"E`NqFTY!6pi$$^&qɅq.@HDDH,}f>*J;|$ NiM@hOE$(-Q4X|CKBs#엊FR̀NY4w ͟6?h W`&F5`SB L۾wTaG~ r5(e@%luL&i|_cY{!)\M kR>'&Ni$<bBU$C:dd! @ !USj)RE\zY%n3k5UUÕ&#;vki{Y4MjZ ޽m*`ysTmY4H*r-IʍFmK'6%SS(Jǔ=ѡ%Z]eg>K%I@j@›ZZl==pz]} fvfffUDD3m$Pb=TU"~{j-L4;qq&N"DA\p7`#ɋ ]Uv}AX""i4ѥBXӜs~Y^q%K$I[ƶͳ *HW~Ow=K׺{BOhlg" N2{iaeX߷3 ҥE+[ߣ[~ҸQWFz3[I>D R M#IHKp[jJ#(0HE(9WЕ/*^s(RjeH2CRYG/>OdQF@|J Y%y,fژfڢ}fڶ6]ֽ'zLY]_ŵmUp5N+8p'Bab!bvFfZe˫#VE-0,Wdl[E678\ff鳺n A)^R%ZAh AUiqVlR`1L0o[[)VUەvPdA^AduD %oRi7.,?ދ!mam^7΀. MN\(7qL{ݧh^&ɲl0V UvwfUDDDD$ s~ᚙ뺻0 0 quzCx$xLN)/ K+:+h-ۚ`95( w=R;`JX]L&R_v:$@om@ b]=FF&3$`Dh!a>&p xD~J[:mМ$09 IA_xMoHpf(& be^ZlDuupEMuD뮪,147@j|tNSIPn5 :oT@YVt?Rd@;gyq |*/8 c/*V=DY:6 v\MZȰ9@JUR'UHs'Tp ꔪ@f?:g'*:'Jj:h;U UsruKr*:#N=#T2/l4HI:2t׈$u5kΎ8@QaQO9pQĨW:T t#êUhS TuԱ[p؝* oX[ەtHg":ThupRUIPp^bb! S-bb!)! !_ xzuw~ubc?\/שpU V>@;"FX@wJ\O ʿޮ5XA { ꫫz2fqW"L _H "ȿr `. "ED\8%@WHp"͑_F#_2 fУX?(D7Ou`5@0/:'G]U$ty4@mzu}WpT賥WoUNWGGWW2uapu^&*:a*+Ug_ȝW$:^ow)UzηNHүuU: Yn@v/ʪ$˻*G]5\x8@^2G;*OWoNj9uW'u5Q,uU H3ʀ8-w*g_B ZX`הP\bb!2 X bb!; ! !\ xx.UגOD-7EUy*yH⍯02**.&((2. > i^aA$AqU^* "5\D2D 1UU"EyP$IEIp`2v"EW Ƚ^2LRM Z&>#טT&(Eyȭ",9P 10Ȩ^cATT@x0j!#E5Ek*D@r*D&EWHD@*E 1d>>E.G"WoS_^%EHjt7>::#kȇYo__ӯE*xoZugO78woJ*::A.W }{к1T 1o;GxWNZ:D꿑'Yd{Ju7u^WG\$NOGMurׇyLuzί<swਝ_@-p~UU_O 'F]DU>_:GSt*wW᪎cUBAT;nV:e?:?޼ _@dd!EA@ !m|\k)GZ5zCPԕ%Ig[VZ,#߫jo)3 1#LJ5aij@Pj.. JGm:\4TRk ֎촭(:|0\1BBEs"ӵRvEA@+dE=jz!BT8mʇ (ZLq-[ȡky,-jƔ>GLf-_k&Z/{c㝿sMAN͗beؕYmvkqJ湕k%Jt xDfwfUUDDDH LΊ:|. 0 0 otr,10L+^t/i c j9ƿų` !]L+(#6,K@ ay6z4 fT) =:kfwrmGT)Ve9z2%k *Zy4GxӍ6k@$$,2n|aRD|D_+WqhU:beWUGR䫾 jbP1``Fsa }9q `B9s2,؍6ꍣgyE 6 a<%R>U t譩[QxLms^Q] C62VM8).tAu <Qr윺6")+9`0(3(#dewԩ6ުTUVvf!cQm߱gY/hYDX'F$|Z)ӆ 6Qƛ "sOF\hm35"jp˚JoCRrˈI_?#Qȑdc,VPc"i)G萡JYѡU)}KA_!G Wp ffwvUDDD3m$Z:b A%c~mo 0sf}UEfÙ%ձDUFn5I``AՃ ̹ٗ7rpDĉ1rm\Ycҳc-M >x&GY-FQ.\ k˵u{گ랩:2tu]Bۭ@ &KWkm[aJf].DE܈'8[$2=M;^{{h?)X5RCVtcy1+q\paawLi>>,qWߧFͦn+zaHc :B!zEH=@:1DP`-`Z\CK3hpRJftzM[)a,s0OI)z*{Obe(:D4XVuv.F]I $qγ: fwffUDDD3$ 8IEQi"X;\ 1<3r<޴Z BS~JpFx8PR"7q1gԛ%ԗ.GV$D4hbb!N fbb!X ~Gbb!aa 1z&A po'ŖciMI1%aǸP݅@1,>&ai϶cZ*Ѹ|YA/Z2;in?}vT4L !hnDy3?OY'|YA-Q9>3` ɜ#! ,>97qQ\ . P^Sb3g|pčN]0rQG~ #`m(fZ?V/! xqTxA3t;씫E+Q4Q/bL-x݃ @^J#Cg%E%,8,ƍS fb=̀bkve4>Fl !9 sT+Ysx{0tM,5#~s`On>IJ7~ @BC)|}̀5+à$8gݺRAh0QCw[. @ύu1!8 S0o%41&nvQ/u Ũ NHtrj[mx5R qAJ >‡& ,Qp1&''! ̲ &цsx2&l(R$' OBŠ@a,9$$!mh"\I ;\Qe&:" V3(Qgh0#Cð$ q*n853] 8>/l'%U0R"i btC&y}! @' 6z/x$> >,7Q1p0^8*g^͎; Pø àd07{@"I1 bpKd@ɟ4hj?Ҭ S>I,O1At5?|Z6;eE'lq8A--J$JDm-~7; " Pr]$JDmvO6SDJ'v3w0uL 4"BηC~}0TB=B0$"GP*~\M NO}".*jQH9!OML89!dni5;  850LlrGԢ,CKBPۚ81;Сc O0 N~ǹ3>!?:>EQ}BqҊHܯ|I ѿd HH gu*zVB ~puDH`78 ǎBP*BLQd' N)X@]k 3Tۡ9TK(ԔWZ;C &:6@#/ YFAb>AMuD뮪uHY47:uM'A*Yҫ|j]::jΚPUwQհJ@Iruct.bcl@:N4sJUR'UH*j7ꔪ: tܪHH*J:jhurC<~&::nfQ:چpUTU8wW:Uh|5uIuMZ槩s9FHҪ5vUI]@:ꚨW@rKҫDURNj8 snnTJЃ ȵՐ@JP4_bb!j [bb!t! !Ba x)-o`Cb^}w44"";Cڿ6MAR6n͇IWquEpw$aW05dw`7`F^4^//ɝ. pUAuq7ڿp4 .:: _u]&: S_Jou_x㣮NoU]uNOg_|ZugO?w?WGGW9q?\UMW"u_]?Ng_UY_t$uDRtt?ë?Dnq:'JG]5\Uys_Ƹʿ|iRZU{6LtGcGW-e9FgW)Ud24hUB*NiI4#S3M߈!gD2$Ovp-KY"r{;N摚YH)$jiǾ۱cm]*|Of51/jup-jk@Qŵj^a5[b5\M)@&tC?O jSǥsMQy2#Qm$IreKeB% з\2tiɤ,[$iu U]hf2.6Q UwffUD333m6$ h*( ]%ҚI0<1,L=tl}T" jcB{ziDUhq#~۫GHsX}g5\ r;_ XIZF|ܸ}h*+^9G18  $" ( I@4!610J,)JUER)JD\)rF_/ܥ `;&d2a\'ayt00:@BC,MFA,5  eƞ/Dp ]\`@, i``dY-o:)H".RJsD$  %%8 Ӏ&I;vK`g5(p RC@ 4n㯋J@/|`r1d0ZqJBUC&$ OGR5TQ5 s딥'+".RJR")H"9aW ,jPP [G)^B @M!%Ղ@4(xs8j>!<NQ_0g pi_’Jbb! ţ_Px P1i&` @SOB5| :6CnGJI$ H)p@\"uћ$$Xha'@r0%ƐPpԐ/P NZC+)G,40I#pN&rWt;h3@|!d( Hi&y$44 l`8&tP8 _@;rMH͐1,* ep^` L_*qA&26L Yk`xP@( d^O(uk~`1 1SěƤ 7K *L&fC ! '#R–Oׄ`fdL8 `T PQC0a1a ߀' pwd@²{ZB9 0@Hē hÌovIK>@Hk`z%Ǹo{A4h ?@ H!}Qc%IjK$0~Q [@ `D0ۜ<uF?# Bh膌M$RO@ P`X7p` =@ RCčlW@PAPPZp҆ & IcUX(ho9, Bb]4EP ;Ȅrhi@(0'a($(w!+gA+5`@##@v/xtBdX&4Ɂ>Zõ~1PL@,!n7a.>0Ep*8jK0PMN}@ @0 .&4`0C lf&$0t $?D @ A3``΂AHIX lB.Iz`` C C(D2(a) "I>&P*&$3$ǹ_Hnx% d>43f&1)*S&|s`J^ ftPjFZJ&B N(4%kd@CMYuX  PA 0^C!@G (32  +L LH@~`4@^DͶ ,!xZ 0h((M]!=`@ , -HЃ6dR3B@@8M KIc hAYX1@3|膠 ,  j)@B@0 @.Р@[f]@5A47e)P gP j"Tp ɀ',B, @a 3_J9kߘI#ޤ  piW瀯RfF!k԰ @b8E`FWW@ `SXawP4PF pL +R)JD\)rER`0 BW4BJC9+w', $"ɩ,1 d)+;1&DC- d_7B1`p `Uj@`Qa&`.03~Bn@*FB4PI` 9ep@ @ ; Y&PI9Obb!! M1 :L,  J`axt3n%H ,`pT r4*7d>iD"X-8( O0fA:-P ?a, P`o-(}#> ^ \4b4]@ P 8!"4npJ(45Xj2 cBu|  QLK ;`T7 -#˓I^t^/ i7l ;4 JDLPaP bJ&Xi-,hVI (K@v[,449ݲ^ F &#=t5@`T&I #8%%50@;1%)C#1xb@a7lB_v`!!, T 8a/~P)hc҈EI92 P#@ #R=@LnY0 /$v0?ԆIDK+š=^ @` RM)$ @T 06(`d INPcH 6p#YI@ GD @ Aާ=8(M o0% !/$ #R=CP@3F2(iep2'ܐ@ !dPPh``Ġ0BhQ41%:2wNdx5h`\ ,1IH!|~Z3w C,, cT `uDtPCXi,/  <&5&X7a Xa \Q@Xn` h`!!:&*J&:>% |!@G (3@ @=&4A$ rA` `r5!XP/U@PHlr" @'Gڂ`& @`fL@va:&σz ]] PCGj  Pbr@@ *@ -y"@ n8>&f> ==:&( p. ` ?, P#@d CP7 =v@0"b@MɁ`4RWH ` I41Cdt100@ @M 6~q]@x{'@<R`@'0a@1A@)QGn>;p`&,;΄$8^0`oeCp NߩYOzAD d p0 ҃JŲOšW54H  CHa @bIoÎ #B= jMh fI%#KZz  bcI+, |CLCA(401Cq56'I_ _ԐtB Hg&rɁqe딥*)H".RJR")H?h7xJR"".;ѩHjR")HJR")@rw JR"(w 􈻀 CH @@ˀa @BP#(1 $@5(('K(-H3-zx@3`P '!.7d5~Bi8 {Z ~hBXZf"#m@ ('7;V@=z^dd!ȁ@ !cKS[WGQJ8č*GW+_[pr{FՊbbh]'VV- D9Nk5dœ3PV_YT_ya7 B7MFk9#|B[b6"z1Zb1K%vKk]7a2 f.:Ӎ6rFCztc|M:2>6E ESC9z[FmHʥWm5ID#߃ v_*k*Q#)Ύ̮3B=[NFAA)^!4 wfUUTDDD3m"J$ ivzp 3M4MM4]vM6lmzm4mwlm[zy$bYTf'[] D)]l<֙:d6y)ANGgs czcW89+j͆fT%X %a]~mL~&vNeU4"vl.~qWY%mWb) ]@Kk*¬,Kw%,2,7A"cF*Rʡ̊l86H\4b?^'IyX UpYmqtVhꕺb'u8JnSk@%EͿFKK%BHkQW j)ȱrUꭞ5p ihx鴼Z![硪E`tl6EeHVyeYYQ;J!գ+2Z2.P僨pO﬏K0B%S[,)Z>_F|4Ytg}Q#1mhQnbD}Am uشZkh,Dd[\ba[ Y4Tm:0Z0,}p`M"/C5YzbȊ g$GlS>ZE!7FE R+2XY]fcX8U\Zf6! 05B# T"7rߍfⶖtjZ5&e֦Q⚨%W`^*gv5CA.ׂRVٵMRDMQFIӢ?:/NaQoS_AUIlX%lYNƤud  UUUUEDC34m4(@h$H~3 >ߟ}ߟ~7w~ߏmofx퇙c*dttzEx%EAWTmj,mJŇdG2pXH5R \!tk[m(g"EѡHuΞI&ZTiN5"|',V` ELY2]vXu]Y(4weJmҔ-7cͮoRPup=G`mv=V2eե&!4dbb! $R@dƖM,-QK.RJR")H".RJR")H@ @k&p~\qh@>'HH|/ştZ@(!/x[@ jH @DX  &\,@W |8+jL0(h `a{pQ-(v_B`@  P m C0!{4pL /t0#ܠ@ @ @=&` \ A&$ ( e6o FH @3@1fY`tN0rKCB`c(1$|h @b (0 @$!p (H~ g@3YטbP0 :@a`;/ B4d((&#Cx p^0@, %AeC)#8 ,t)*$49= ` (0i ;_P @@@ 0@/8CC@@f& Q8I9  @:M@@C@b `RakB `Jp  ^M 'I4P> &hhp(JO($tg,X` Q ;txHO)$0C B-L`P AL@*` @vPӀC}*O(p} -h fFC,(6 O6>hHCN Kh/200Mi0> / 'P@ C.nx` x, `j@(yj% H11d-| $A?~0H`c1`7&h5XP +ultQ $R@vZ ̆A؝@, H eC.&Ra;A\a0~ @3` z+H!T 3@K&Y@aEaN Hx |!`p@ ,CX䚂^X0(* #|guAH,A\30@zd@ @ vAA BB!@?}X"@ `BAKw(i58`E_'hR ^jpj T@;+`jF  R  h n<0(0꾬zN`  N|qdΑ@&(` ؆Yxa#\@ @@e `@{ !bRjM;44L ! P)Zb`(H &H@ !Pa5%dRWQ| ?&Nh 9\705XPh @'(=D05 !OA <^ph 15 T L?r İ3sh!@BW8 z@0%b݅̀./X̆C92` vQ44xA!wA3 @ AL5@50W!]P@H dF?4 p@Xi`P@!&ID' @N &r@C e($lp P~R ,"g-H B d803` h0 8HaD$r`hJ7;ݰ@@4`xj $ /,4ii& P`GA[+Ux *@ p . h`2 %0 E ^H @`@N IIH/p()%0RX Ȁ Sbb!A S f`d  &^q4 "3xP@@ ` h&J &@`DA1,Xi3JR6@0 @ @@}/hC~*a5 1H9A2bo&4:(@    hL!M0%; (Y]@hزtB j0VYI-ƀ@,Rٹc/Ƃ dTjpH%@=`1` _T>z@PZ @!H K&<G1!@5ŀ@([!(-X|4^Lv 2H ib@NB+$WZ }$B 0v`T`=)$x%rixh• 0 !0@'q@$=@o B4@:VBHx/& 7rh h!b :PՂ0p`@7 BM(82a'!'叼  @7Țp` @v ,i7W-VH:h10]&@a3gXݟHGq8 @4@Z _*P @ ɽ!VHAɈ  L bB@TT &QI(X]P@G @i% 9^ H@0x47&`!ed*86 :I 0bS5ܘ )A jH`;Z2`M (L*J@6 ;j@5 @@6;+hCg(rRf6d PIha4Xah} DX'@MpaMmm@\J\T 3%h`jqY hp@B!>KJH@)[~R /0CRJR")H".RJR")H'pJD_0 Ax V^ (2:02@(`^ @uN bR8!TA\Y`bɤ?0 D၄mh}s!<( f  fn,h4P0@c `F N`:B!z`, K!D"aH0rfQW@ !@&B1$i45# ΒO$ TZ *@ @`^&Rh I@qDԓp:P LM !4400 n ĵKF$0 ,2!܄, ,``krSY `==`@t䱯x` Hd0(ptDhi1l H 3R`haiRr!cT 10 e`hR@BM%`Nbɠ&7 %VXaw`Z`5 !`Mh@vC,!BoHɾYKP 5`p )Ӊ:!H$g¡!,?jX h>p(  j^ 0T!0L `j1003p!|p$0@d0(Bx0 Xo0bP/y@?!vJ&ԷB혖5q p~p 0X ')V@tVx N7>0B0QKb%gޔ`rLv,@@*r@`007 NrgY4 bɡ>U,  Tj@B` MP`h?&$V}Gf8 "@A\Ě{ BMĤ#1a$2nkibb!䡀 3@3t%lY0% E.-&P !H`25NKF@Pp@ @' paM' B bt@Lœ@bKHj{g@@ <X c4jD LHjQɤW:R`;!bt$!`d‰QJao1ؐp}@@?<@W 0 p+@Nq@&I4`&&x( < d@ n$x `v5:04 @8*`;rX KrJCA894b@bKj@*7&OY4 x"~ K( M \#,` 1@KS9!t @@@{D@p#L#,p 9@KĢ[!Wh'jiv`L8X H9sŹ> h1 Y`bR@:- :Hh`j@LaHNZ ׀ g{H kp dPp` 4 ! dA/M&#T` B VbXZDHo`D@ r a1i 4`4`LBAZp@i0Ay@  `P(`" )c>~P `1$"v7@np7(ayhN>p@< @;+FraA@/ r [J0aC  Fnu8x { h@l @=, ;lBPѩ &_ :x y@2 @F@b -@*zL V@1&zp!P:emHp(P >, @1 X eJHBGz P @Xn !)4Q±@@ @JT %P  :&Y퐞L&M ב@uN @n@ @ @1&fɅ Ar=W^ @4 x3K>!FK&3(?JRR)JD\)rER)JD\)QZp  R^4ЃӃ5}04 @0<4V/`@PP!`*MBi 038^Up@ A @ dU`@:8+I!G @C i19,O:W@~.H@`@ !@*!&S@!  jh .!1@5#" 2#S@ P@ x Ha@bae#wIH<`&&d$"&Pߺbh O: BB@#@2&\r W䤨| @R0mj A|(dpAfMR@-QBM_"p@y! _X C; X &@10 `L Hgd+B(>p@ @b jh@4J;$Џҍ7ι @ 4 ` vX@.+vIaW䮢^ h!b `!( m RQirY 0N@ 00@ 5 CP,V ܒM IP@\ 4j0JR,Q(GT!?~\ZH` 8 @BxL>hh / @&'P@   3@ C (0iQbFgl_Ǿ,}8 A$g0X)vhR@&!$4I4CQЂj02, 84&HJrSPҰ'CpFQx@ p` 4bb! vH`-100dRvRA瀑@λ`V0?b` @HiKK- F`Aע @)4h@ N@ 8)9v`@k  4z`+W@ /Y@&N4 9Hi-8!sΨ~8B!0i0,,jP @8h A4 *8T pM 咊&PՒM $KM@@0 6j7?|HZp ɀ&g$ZB@E@ ` @@J `i:NĠC 8 v݀ >,!;Te$ Q1L,g +8 @#) ^^p 5e4`|HE2 @@@Z 4 % @@(0pd2Y`\A'A,%A !@\`/P =!@ @0F$݀t`  /@,@B 'jh P 5!  3\ (  `0!  @; hIm(-Ԍv:l `0.A  A,d̴IT7 |Y4H@T,Qg;X @ i@T.@,ZI @3#}A, PH h @+`` P: B,0h @L~akC!F@ @2N@0Z`! 1jJQ4P @@  CJ[Wh "e0Hp*PPa`TW%gl8`@kp@B @9J `!p@ ` %M((KBJ%sZ+k!h @P@ p@V1 @h&LB8`I@14 &: /oѯ?䴨: 4( *qE0 LC !005;2JpHDJ`Zh4 *LX, Ho):h kX *8z 8Xz@KᬜrLf@1~C@d$TR?#CN`@D`5d, @y$Y@ ,np .Y@ / ~OoX`@t0 @`4 2@L2`c:=45 ' @ `CA #Ӊ !I-wWq9@ %27(w`'Wvxē pӃR[c4!ɀ p '>J ` n@Xo\RRIHj\ :;A1A(`b(~4RC?+  @x^@y(3XĠnM- @R02  @0a0 rPh<0BI !{tTI@dnM (!t`F+p2_#=(fBF(Pha0000!5몶 @0b0 @A)v1e#3,wT0`&0i-sH.R.RJR")H".RJR")H`@B bL&P(C &HDұdh`nbJJRrzP@ ` .Hw 7 h@`\0  (!Зt*o4KÒ3?o}0@30@B0 >Xp0BKG) 7]` 02 & @+!ZĮ|PRE1vY4 NфC ,HO{_'mBbb!a ``@ԐLopT4 j@3 @B0 <Xx2_JI T OG& Z 4|@ @5K p68 3A@%N  & CL9BI;> I$d>4>*K1v` NS 0Pэ1wl^08 @ <0`17Hd|Y5 |f\pR Yd Ԇ%:>./P@D @@- 8v .| @:(L&! (( tA/@+ @ $ H` /@ ܠn0^nb 0?MFB5f=˴ ,MT1*)`LjIPM(Y ք-* H`&&B&B A 41= @ K 3  4PQ7d!AI$@v2@(8 Zp %P2B@4a`"၀!&1 җU), &ɸAn6ff2hP !2 :4 ew(LWAu= @@m@ @ 6%IA!&1 'zR Ri@T40M 5 T5%1 ͚8 @ @@0-*0@?1 T@1!v@ ɘ (4g[ &?NH b@cw!aʾ V /@` ',  ` 8xC&`<Π @c hPI ;d2h&bY\ĖKI  1&bh(rPlzdW $0@0@ =P@ `h@ 0Hq$@t( JJq6?A"ne&'}`~:A~RI=1@Rr&x"D $TbiJRCp2M` kX 3&/X @@vyEw`uw$L^ bn&bCOI7CPR[$')URJR")H".RJR")H@ @*6@ (H @bl `PĀ>/eT#L`7LLbI>QDG~N'Sl7/s4{FxK@'@0@`!lb4X  BlPB7=Hp'ד J =R ! 74 $f-YJK= ^ -5J`Pn h@ޡ>x5 iv@ -$H@\`vCI0p 0 bB ( @ 64! b@4 10 vM( PK[P4~4?<LP5i0B0 *B!L@ $ PK҃I3cNk!` ɼ 2!  ԣbM\b0@@(M,FJ[`;_"t@i`~P @4nX`' 1# ܐ P0e`  4fB+l,[h1!`ĆbkYIF-gp 7x`p H$lJ` rbpA5^[q ,@$6AZ98H` d0%\}d>Z(KN;p@-_I\BvO3t$4R JhZQN^ 00@@E( AT5,@; tV dd!@ !1kL\}n-=}ywwwwwwwwuűlmm||kZ}}lwul[mmlm6>|ֵ}wwwwwwwww[l[m[mͷϟ>k浭}w[űmmmϚk@ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{A=bb! !  ɹ`59wA1$@@ ,C /`]`^,X`B(>` / 0bC!`HĒ2Z2T4tF/~ĥ<(@)d @1 -0D`bxC,B 0V    @0a!M #2EXe $C@+ bZ@I(Ї@g?/P    #@55 8 58PpK6@)@Y x`@\ɡ (C@PY7;!@7J@,H paAԠ` V,ᭀJZx|j]pA A.@ eA#@KH@|`bXd @P P f^ 2`T` `,43L*uȘ р&!:RFd3+$e㖌˿K  rC ! 0&; `\A biXxT(AP @5A`P0 04=P0-X+%H-"7ͥL 3A p@rjLHL)Հn@@T Ph I9`P jLX+P @) @4*Mj^Rъ,<0%A- @@P@:[P@P4  n g5jHp@?4 ]1 'IHI@&@n}wzti(` v3C_%BR F ?&<-  N@ i0 ;XyM(70be 0@B@S@/!(2`8@nhq P0*B?;y ZY(i>Z1.@sD8@ Kl &>&0K,ԧb*@ @ A c\ɈH0YdbMB98aD8 91` W ?/ z`^ @&xP P ZC@BM&00C @G0N([Y(3 @0FЄ586CA  % jLd~T` 3PA(@* ,FĵqܞN )KY\)rER)JD\}  5X AV@/P  lz@7(0su#X,bXD2`hf0231<KTA/3}Pf a7P6A#!bLJ!!p 9/H!{ĵɣcR`;A PBVRK,4_R @J" X >2 nr_)^,!L P :%\`\- @@w4p7`T5<`Kc @@=0| HLP` @_80| ;H V0P``3A, !` W&e˹3v p` Pi0 Y3Wʸb]`@4@@ O(P@/  @bX @hZy`$o&L0 nLm% @V0 @ e ɤ$18 J7g#0HAj0@ @ nP@CIg54- @$(`p*d @t"i`@&B4 M͋0oA5IH @Yj/0 Gw@A bZ@-H "7ԁb yH@Cbb! A@?X`PAD nq400\Zx I4; 0@=TĠD@ NPD/p-=RAH a@ 293^ @`1>I; @ VFMF$BZ% 5L5/ @5N08X g 0h I006h@FId߿:@  |7G@|P` ,$ :*d\  0p.^"~(`\cl.^ؘ8!I@Lra hA$P wIԻTX @B! dRP0H1ٹЂa@ @0@-`r`rP R0` H b xd,Бwl0X-1 @f@& 0Rb@ 4@ NQ` P2_Œr_3&  @2 @)r*00R tB=%d !< 0 @4 [p4 @40 BԠbVOA0`UAY&0zvp ɠ:&FNPhAPe bh`iCz HIcL \ D0 % `, 3 b ` 1~p!xC!`جMȤYH~X . ?VM @;p&+hb_X40X@H+9c  @? @ J "h@P` @EQ@T$bR@@hF $#*^14 p!0+X !'. PJHh!|XJ Cr2Ӈ@ oԀj0   `@Adq 95M&ɀ 4.A pp2\XNBC7( T!44iKP PH :  `T0@ @@H`;&2xda4@ Hh  @~_ !KlKHF@00 !|e2 M:!PbJ&g#1f.hvB 5!  h@.  p,BkR O# _t" t THP`` B(5 0 &p . ΀ 4ɾ^\@< c_:t'·1=1 6@  P>0 4`5&p9`1 H @ @vd%P KЀ2WRdo@ s` 3P2Ԙ@F$ x ə$  Xp@j A<`(R@8@p1`B0,EfC!Q;"Y-2\|` fxh   j]|g&Հ& @;!~"T@ @/>(P` @ s 9y$逄i+ TC )8L_lzIb]$# 0 @P j``@HXbj J  E p`_fAl(A A()  @4/j !&+ @e3Դ bX I [`xQ4v. j(J %dP}HX(` <@ @4Lv (B!(3CB1eFAD )& 14AyJd,A蠁(V h(i.rBM\!`$2u(`k!}nbb!  A$@f`V=2@4)À7`)i@'&C?w 4@X f!@5@ (~ 54 @7: tӀ} zpZ ` @ 45 6j 5I0^hA`. db` a5//%m~ *p - R@@P\Ip] 0_ QJ`;`  a)RC|VMr6v t8 RBl8ŀa LI&1'_0xx bp `0 .QU "NL@b 3H &&TlP rHu) paHPC&&P04'dƷ9XUN  dB(.'  J&$ G`*0% J+@`8 @@! @\T `e h*g!Y$_'u G: F1D>CB\䱸w G'߻ @r @=h  ^;a!p y`S1 /Kmg @ @ 0@` (!A0 `  5H 9?^0 J ! JၥjJIG7L6`2 4 10@0&3 &vґɤ0 BYAV*1 db?.\)rER)JD\/j ` @/p '@t`< P҉`&`B! G` b &8ɩF#Д~*); t%HCt 3hr`1 ` ` An!Xie Q@'ZBJrpWw3Qiz@j @ 3 @ $w% @@rL% @85J;`@X 4TF &>!2Rr@ e aX` .\M"2p`r U=_̀%@b"z@@'!dx'C bIm8Y1Йx<4Œ)L&XSUd'(q @*f5@tx 7|% 蚄O:` 7M@  3D ;z:&HXbo8|48`;@i!CH` @xM/v 8 h .2# RP@qTEv4 (vOA5+>4&3ha` AYٗPY@{ `5p a g|@$TpP Rj=@`lP0`x @- ,O@C *(L I 7t$0 aJ1apbb!&A  ^ x32@QaA0c dkH  g.`1 ; D _ɠ05 VA'|* l H`P; Pa4LpZQPY".)\^ )h@ $ P `:$oXaecw㮇p@RAH KH İ j%3?^Ep'` v1 -&7b2LH+|> BH X6^q @64 f"h^P U(pj@RX@ # h @K @:D>@`'tC 4'0 'CQlJ` #  B,;7!L!d%`@}N@_2Aˀ'Nƒyd*o I@Qd05qd05$"j7&אxTl'a!@ Z lp  `0jXb&#mp @>`hATp@u@ >! rP^|Ɩa |p   @<4X` vxt,Ϲ/X0 k` @@2Jj)H P Cw: G- AT^Ŗ4tRK,vl"1@j 2`@0( n p(z jWY5E@r! 0pP@B @3 D lBBxda&@e 0 0 f7.@; (L %kѩt$ !,* gp@TA0`RBφ@ bXɥ ? PB0 %~B 4 Phen 0F+) $( QAA\h =j@Ԛ  J 1D2.[$-C*.@!Xa^"23ɀQ  4KH<!4 @< $q` `p8$(jҊQԨ1%3N j` \= &H 2%`@Q@g 2k2 i'+R!nzq?e&<L `@l @& i ` AP i0@.&d / /$O)0 8 /. A@  E50E@ @ ` `i@ww C k B4 , dҌL9ah!@ ("T 18`>!84 C@B2p @!|Q4:I\0Kj!rZS,C@` k\ R d"@PдZ4tIǂc nG.)BT$4 l=`@` zPL /j-:p* Qv@M @(gZ@/@LK"`Ybfoxx 0h e8 Zp@@J$lC&>0@NɌŤ͐V >@- Xh`@tX @`#X`% 64 d FM  R ,5P00h A4Kh8 @WN0 ŀ+0AᜐЂ !c&!f~ & ņ챌5% ,oTؠ&O`B t`4@@!. !M@ ?p A;Phv NmĀ@ @ +x$ )bb!/ @ @0 ]d(Cb4 d)( @!ztxx`@@@@\ `D C+0 ( 0H*.`@`@@" 5O+(#dB!:HA#8 pP:\0mgļLIxZx\ K@ &@8\` 3fB! ;+q |#<` %@ @6*Z @` @ ZC@vB-ؗ+1U@ 1`@T3!<8h0P* -)en / $H@j @10 HH%3 C@07nP@Wp  !CC C咐+W<_@@(4pXNLC0 d *QDD-eϻ&5!ҋ -r)H".RJR")Hvu蓼p@@j @ M p@E@4*30&P 4 ` @vMrhh ,0dD  @P(XbO€hbPKeo@~'$ @ @t`VrL1J! ʸa4& :9xx> bP 7,0wɡh A.(0 Ed ^5v@@aC Ԅɣ0!}g @ `h @'`np! Bp@< I@d’w`M,$%7%0 A0p j _@00@9@9 ! H`T3L +w8@ @=  * `@@L( L &H@LI\(l$ P*LIx)ЎX 7TJ @F$@ @p @ p]N`J Z(I A @`@, @V @@@LP @g b(DA@:@O3\@ @4 bh , `@Gb(d@ @4  $Ƿh @ "f@+A< h @1 !Q `;&,@g#@x4ɩزX()(?OBOP@- @ #pp@3!$ H@1tH@0H@NXok1 N P@*8@`@1DXA Z bRX`0(Xw&!Y(A_0d  a/LEL=  `D,f& $=y p 7  M/r@ m`L ɠ DX%6 OY`7bjRR[l\`» @L<!X& b @X: CId@4A@:L&f) P 2P 2 00@F  ` W;xA :vBAa?`D]` `?H `j d0x m 76 > \ Q '5Qdw@ځ@b AXo3,b@nH Sj@  @ Q Y 0 9!jLtlfh,    C`MC$4( 3i9Wz   C!%_$02<0 AINl,@  R @  Wldd!9@ !hűl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]2bb!Ba @1t@ PvZ I`Z`.`@ t2` P0@:)R1Om$T (ZZ Bs(Pp+R Rv&WZN  ( M @*p 4HPł`C$K-!°CVPЄ$@ PJ  Sp@/f@0(p(HP\A&@``0LB( I(03d!!) VY4vM&x` taa !KB/5fPOL + k F@&v A :0?;!@3&AY THdԍt0q@.P @=%@!8h 2Jh5ņh %Y0BI \7|ǡ ?o06&  7(& R   . (@h00<@@t tə%bKi: C|JJ@&  `P!0WH0 x`nBCWɀ0t000 4̢a ; ( :  eb&Bp`@1  P &A{( wA`$%(% ( ӷRY,SLJ` z@v\@w;a`M` T`  ݉Sϴ(l`D D@=P( )!`p B  @ @` {@i+X> L PL)AE! AH1Z p*C/ @oo n喾D,G~AX K j <2/n`@,n@bM& lp Y4Db%Sz&`0@P@M!h/b1pR4 b\8`LTY=򝶉) VX@@i`i0)ICrJK[ '_ @E @6j; p(P@0@` 3;z0a E M22Rp !,ᡄ"bKg$ B?# r\)rER)JD\)rER@4`@   b@)j  j@t?d /h3   A4 & 0@ 8|.w( H tq1 B O侏C)lL&0`_ZHj B @ A h @3 Bxtܔ^v`@F 0@@Lhp@.x X j) b0@J p2*oekq߉Y`N T`2L!a1H!a$?xG79dh @2+ @'!43b & @t`P 05#.pZJ7d05XĚ k&bb!K !@ x 4x0`0@`&!dVX ٽ_H~Q D@QHk*I VrƯaъ=}b @fH@'dL\x0Wr,H€ @Ʌ`+I2H%!CHe@W  _O뿁Mmzo|tuT:Dު7D~O4TJo}.zOө:gP}U?zyQ0y^˟z@= ru>={S\ψLӼ9Uso;bP̞̝&LM=ɋ/E[MblCSv$D^wpo_a&ō2t<'Su<U=u>O'\StY<~򣣩`4[×?qz@=}>|{;xsȪyZ:D꧑'Dz鞲u<:Rzη~Ss<:T]3t]o#ëOΞ:>ςt ;r<NҩG]=5>\{t*\TOOOu<@rwNP/J>uT᪎ycgT座l:!OZ[@W p #ph59F!D>L_ FvPv 8c *d.@ ҊExo`pCDN$\wɌg;v ^SBL:`$|: C 6l8 s r`ŏU05'{2BH@v4q?1Y@p_000~xbQʙ\`謑*a4 bP K#81,lxަP08[R_r)l-E 9)CF `50?0a/cʊ0@eU[z/G~ML~` d8)av?}a4x 4XdL4*o6@0$ *M @Ty>&x!a?;!@1!RB!وp`}S 4WepĴa@D||>ęĴYflIጯ+cTvVtc*q9@vP[,F|,@}(A8¬S0Hx*8^VgW l qLJdx`w(;O;l<%M-ۯXo]Ln'>70'7NϾK:۱gѝ e;|ﳡ-TäfFm[cBQxg^ao61=3u߰ǑV~Iݺ!J_QU1{v6I~V:>nn#8ͶvzͦQչ ͿGaR~Wcn37w;)pvKe9xq07Tgn=-adxs9؈fr 3Fg'``8:/;>|U߷wns6߷_پ~IS3`pX<yv&J=j7[03N.g#lN2I;q3XJL9m䐃>Rnx>qN~y(|aTvUDgF1A#Kc=NjWwqDž A"QTH09qÛ"OԠCȆRܝ`6xX3oen'fuPq3a8.jbm6Ӭr7=j$ O+˜?VƹA c m;m/Yֶx~_gdҗug>m7vیҕٲ3=YZ-Y_?<ѧAͷ;)'׹$Ǩ ςRX#;nu3e|4Xwvo0lIb=fun~l9?+)[j$q{Sܴt~)cǥ G$a찕}oH}ݻx?鑟}]e3o))#|#;֦FqDM$_?Yv~Xt|ƨpb{l9Fv69S^oݍN~m̎s`իI|O gj9WF9c}iqLZ2JPqqZFƊvs1l3:=39؜v7PFuC۞XǨ_*&$SO8/? YJbb!^ F(>HxZDpvSCˇb9x,j=PqSt}Q˝*GM~7I 6m6պNpCu|[';Co>Vk100I{;gTFdqR/{ϰN33T]lz?llb1φ|r ƚ>$wQ@d;Fel?: 0dK1y8#{g~'9l+THSfX{jkTKq$V)k w)u{p<%qd%'iUIƨ~an~:'?aV 9:֦4m*b\ s1([jAQ=ONߎ8;lzݖEC'b){7Q8-VaZ5q<,*Ft AzqgM0఺X#I)La;6JN;ԧoÉqKRWgat; ! $Ru"L5NJn([/,=Yrqu2y?7mqh9 Vp*=[[¿8R'ezj^q,[wcLa#Ehly$R֣a#S^ZFSa]49,/c?p8 A'Zp*fs,%8@gnm9?1ަ':Hv<ÇQE)fe `4uZ1]qN931B:JDPyaB&8j>18Su k==bW| v[r25yq, e{~Jn߯s8o~Y*KtN-g.uf3^ss SZ+<̿=CR0<9nF;W :3o9(e(~ږ9nN4. ' 9N9JZ;8pY?Ç5+7umIJ_sbpt$ @-?Jog #(IXڇp@ j{ķ`6Ng v;f1D8Jx^`jϾQ{(PxS6;qCI^N` <*a)G =.N@s0dcp s.{j:=xSsǼraHs>|bbPFjLK̳UM1ÅR5xzq b0xab*`,:?`Q:HՈzUQØ|vBCzf/3TC9SgÖvVCL"J;?>lRIsEQ;Ƭ=T'@p/Տ=G&<, $̣Vng8V T+ ;?Y xL ADxЧ}z'G¡1ڱ‚ë2(5#! 8 #Gp ÍÈDbxCHvͰ's0sEH7Sx [arLPx g9"Ex5NǁǬ#ea58Xp`D[MI="8 X,qTHbwS]Q}ߊ"SxbEAQq=Y j4M/%@Py=a 2zs>Pt&7 Q_1@v 'WbrC x8PTd|Np X\|4:H2(]Lm7x DR.f>@j'2rI #o+0 g<2HC#HUh㈭5YRR 819Ih|~ 3I< {|y85S/Ö1ҍc$R0OI.`uhs0umW#`h1F'1>Nn:`(u`Q@π?E7%3\)ŊuV@: WRR3I~EgFb ;AZG9!qomMx\> Px\Nq^ 0`FI: a^fLA g`@7F˪ #UA`xvB'x6qfAUx8c[}2iJ: 8(\3*YȰ;׉ #"Luyy:H"jE>,G17D &:x $]|&l @^`Pq1rx2=:@p<$'ytAn" טq2c7^( @s_; e`x<P x * 1(gxP D`xw߲p f+ĎfPUo8`a:T}x<uh\ c(:HSx:H@.W`5hP2 . y/!ټO`0qD'ˁ]~L*\O6LPc`3 `5q_36ML$E[ZftU8Uׅ 4su^rx@.kAG|p5ט5^(<p׃e((\EWa˃b ]Dpc-x@,n0?*, &{Wy? C:07¯ dd!qA@ !{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI xbb!z ! Axux@M`rY^ AgȎ&CGJ FW@GD@W@(t9TPګn _;(aJGW?-2Ƈ@/H(>^(j@3m ^ xx Lx N\}"}r?m^=@jPeb{yhטC@817A@#&[טq Yؠ &0OQ^aR)dPAy4h 1` h@; TAj}^b#8o#.H  3"&Ley$ا@ G@UEEIW8#@vڼ¤ !g>I oLP@uM݊ x`^ט [S\5",q>ň` 4,D yLP07pA,TP"AEj0dY 0q}yH!fPpΉzK=~k8|"t8:.0t\A;:uF P|@ k 6)ܑ re6}yfx*t'^4A8c?\FfArA" =WA#xhkĂuxێp`l= 0HP`` 2`WP\ ?z16]W0P O=^#G@?8:^f>>052 "#}xJQUB{0U4EHYcȈί 0FEW.xP0`r8* W06ig > Āi9 op 5`F P:-uQF>x 7ׂ8 =x N#㠢 5 pq@nÈ@@@oUx6#((kaP`Dl8?\* üXx0W[0!^$s2P3x1BŔN;<}UBphex#@?@žĎx @1@Jt*KGuOJoPpX|y$pp0x1׋ >\ F2fU| 1bhU c4<l|8ba"*O0P Jy®(Qࣕ@,@jt7;^ <D.(.D{"|;ױPF< @+T @0ߏv>pjdN:Gm"!.# >(pPFm J=V*P b$[:lbx(>:7^(10pUx!Ai:hj`` @,AvP%@(|U8 @\ 01ףX@v"¨x`:9A30[,@?B"*|#\TW#soĀ:d@tAP <`WV de6kx Py1ר(xlccBmSP2 8Dq0W:Tf22@B:" > Cx*ʇ_'Xuj}^DrP`.@ ܪ:ol^4:|AG%0CTE @o " p|^\XbJ&YEBB: A1?9uG-O4L !\Mϊ%H @,@^ (1%\IyՉ'!@T M!p.& 7ixRI ąT+hw2 HskS N _(<ĘV/ꁃc|^bb! ! ?t!j e2M o0"!c)<  ZOH|D HE!#Fh ,S.I,j 6,}L!\BD& CPL oSNf'5+01&F Hh(Pegb  I9e#*ae4`<@ ɥԱfO0 ",PɅ2D5j q  9} (Q,0 c +Mܸ2*G`\JIL[h43 D4 :C6z T'lp(wS5-Z &vITD(%REL4 F>45Oї^r7qU^9$JSb:\>(h2^Hy3I%"` J$ VZOJes(b[IҾJOLĢBU%'0 iC2֚̓68NXr >&RH /#~"Bƪ97!z  *L/bI BZPm*`T Dbri&~K4`0S P",r >,뀨jwrPcژ(lrnf2Бcy!n JQ)**̳ p273H"+` Єbg졐t2P x I()uO_jt'*$NBJ+ (7#7+zg@ M6m[6 @>^9!qomMDu@tu`B5Ađ㠡F& uA(\. |(uQ #UP O=P9:Ъ$Ogf`jeT _1 2iJ:UB{0Ux,0uGDQ[=c@MSE>P0`r8 p QL t:8 }@TH a` _d(tMP@t ?0(8 |`9wPa(#@@r@4pWP@p<$' N#㠢 5Bu0\$RG l<jxj.(p32fU'f=D ~6>0 0㇞pfML$EC@ҫ]BN9:pQʂU@AG|p5(.D{"|;ՊB5A`v6` I @5@t?;YTge gx:/je>tF` 2zp7Tk(XU`:99?PPF>/"81 Y`BXy` OPav<t _0D(uA@U7¯ xu@BmSʂYr#꠆( tDAC`:PCj bMz'pT(aJ@ ܪ:42-24:| 8,p1PBgP9  xQ0ahY8t(r F TUd`E_ ?` =Ɋ]` ouȿ'Ka< 2>/9 9 [Ek> U >_‰ww]]bb!a ! [<QWwF:. e 7=| 7Oq-u;ˑdxH㣮AQ2@^q̯zNx cGDu^i>H8*݃￐xɐ?4c@w^P@c,u<u_x Q Uׇ ?Tuyq j:#Ca ;@`{222 cD"xf>׼\ 5+@4 Q"@ ҁ6 M*;y~\ۯ, 5y"tux??W:UxT@^d9P2לWN e> 1 ?1r:P8+j@GѠחW ڽ dO`oN*::9ર̫m^0 7UT [v gPmxF5^((- ^ xx*t-.`U[hTy}zEAט2**P'$?e${\ @1mhUETRDT11uEUxy$?yP@kʝ{&:H t|uڽW\.Gqv _"xup}_"OAy<&U~u6^\H}xnP{^ 0 u{X9Ȳe^h }n=P *Fl.tffSJ_:6ŸrEp$ ~y^@EȠ^@n#=^0%WY:T 7uS$8ϯ_ @!O zDhUx|€6nX`7>"Jrb){*s*W@ x80y@݃g:h!bb! u[^5 eW D x =)dd!!@ !gwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵbb! ^bb! 1 ! w p}3hJF;L41|BlRKF %쪏toϯE$5H,5=02>[D2nϚ(hHCH+n$ؑXuӷJ&Ki~*` H]L;Tgd. k@&~8 1U0 S+N䉀a@ JbAS?? 1ʀw@D(bjy)ov-9G`vWh+ 0 6@H@HT$'Q`(&4Jc@W3i$L 8%!!1EKf0 hiDvhEY-a1_=b`LC;EvFe0i҈EmAA1$_Ԥ)0D¿%@jE2 x%10*HCy-efVN! #Ebp,95?3Dħm D,BŤ-SBl. , Tr >! /,b@ @6jg\@?'& Ov ɅQ0 ` y !mTW伿fY#$l~A0ae3@Q /1(PR@ @~1 C3c!J @'@jgQ07;@hK1$iW"HM/}ټB+.hh!| z0p H}X\ ʃC{Drj#f{h2ҹ Ll^}`jCK@13c@!(Rs"rLXnb@iS4SbF#_$NmtLJ8͠ @c~@@ņ2Ku$S1A#@s5ee°O| ҎQY ߊ0$D2&ah\XjrS9csp(߄)T T옔#w L1& #>1!S*LNۿԣx\b:>D$A#hz @vSb995vp o4n!Lg0R7+7td:K1X JHܵD @'%X D(P.b-GA ʢI)RQ\tRPCx1%bMD3RmPQ KP1"Az\ 4.::PqGG@lqA<"yP46 uTK 0 QGDODpP~ud;}H14dyU:x uH[Υ:hWxw 5Q a6` glʃO`9U#`0|5!͈W;kjjԭU+T.I4uJ@RDRGTH tW}'L2AW4\WN'M ><I5 ໕\oP0aQ.$ GT#Ca8 j 0 4Nr,T3\hp6p7P@4q-tf 2Uh`ѷQnjI @"wu"tuA #=Q*N( N"}I_C9\ 5r5z9Z4ڗV@/PnP@U"G*@T`n ?@@Ea x2-CThuª5 eTPP @  9bb!A Q bb!š ! _ x+t8??긿Oo@t2`1WzP&E#H#ǫqKRk 6D1FI=U&@&*E^Վw&CD!@2#ї!T"-`x1\"LUE&BHpRdk7#1.6ERd*LQ-"**_`bɯO$>  ˀ3ΰNOc "}<"ywWOQI^ Öx^+ _WyPfu]:xxUz򣣯Wuop?]S 9^/8 c//O o <GOo;%mU;[üXӀV^:5:T*SusnTPa'UyP៧W#o$N_޺x;Uo'W*xruypEGW(u؉_a@} ۯ$UU^:Dte{*Du:˺ח::@^2 1ҫr;y׏%@r/k:zUX]ם/UyNTu꯰gU:T@޾@>Wەt hup^Px2ʯ%@@}w! Cbb!A .`edd!"  +'%bb!, `.1  !! !##$##!%&''&%)***)----010448@  })H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RzB8 I7A=yl<Ҕ/)H".RJ~!$`.ZYh8d`= 5Z@1\ 5#ru X8yK@0 @*1,k|0)^T 1\ U&ąKĮ,l40(`B@T% &q)IrER)JD\)rCX.@ M8:BB` @uLW  5sP`@5$8M`@[~h"b{ R4 $8 /(X Rg >D ,c4.^ $ N @4tFB03 +IH@ 8~,nV6 1&8Hf+%p`#| MܘPG$Z:\ `\Zprta_+\0@g I`W~`5[Z q@4! 0,# Q}}7{0@ A4( =HC/p`L(0%p aB`0 ,wIlĎ@>  h$2h @&͉}Z!ɀ`b@ ؠ h%6_;*`&"htB̢` `Bh 00h@ 8 a A` !@B1%_C7k%`rBr0@:!Mp4O Ch$h ,H@h.071]l{@ `/ ' [lYj@h)@/@ 8@& 90`B(іQ7 6NhqE( PPɈ:nM GrWOF]0@ 00@ @v|MAN0tv}h2jJ#@4!"*Z 00I ًBC1- @`က`Rdi7@C(i @t҃ &p'a~`p*Ȇ6!d#f0@jC!< LB3!= y*AHj`@vB @``*BbICIí < bMC~Q]{l#b@`` $b@ Pɤ2QD)O?`B'PICH\hLNR'1v `Ą:pj]7 9J0 Ӕ ܮR@@5X@!T Jo_#  ^ :4%`;&,I-2rӀWnP4">)?#P p%~c3 C@l Foɚh  `F E 8`J@h @E @) JRқ".RJR")H".uV܀Gp`P1 !&ۀr-oRV \x Zْ^x 9 , Pd҉ -)~ l@c @#D`' &h0&@`S9,HIh= \3Fa0 W(p!'W 5,0 @< @7'| @. @fOHb@dX&i0BR@PҔvNWU !xK /?J'dĀ!'!pB &'a)ļ4r Ha0!$ha4,/hR*}X@ bB;I VR r+@wYIJId96 C ;@ `@B4;& 1aĐ1@gh ׈R 'BhR{gC&M ig5')@` ɄnQ4 P <1  uif,%P j`BQ4CPP mἌm XH@ 8P&&*_!Ibb!> a(@Z`T @2&p n@I4 `-zeؤ@vlp5PX`jxKcJ:Cj8 +&Lp ;!nz\P0+;JYaa=I)p``b %3LHnJI $'I bg&›Xc 8B5T?@. @ tPJ&0 &񅕂s /v(LLH (ۯ=X @ HaTPa` HjR\O(  *3T`6 ؤ=A@8N#$h#A @"x`*BJ|YIqbZ@f|$ >^6P `@IAlRJNd}גk | A [!0pG /v(LLH (ۯ= @ x (49  LC*tL "JhbQCwtn@d : &j Hґ Ph#K `FG&X& !BX@\~8&K0+x@;0KIJKAnkGp @@.``@( 4G{0@b&J&A8  `@! `%`YX0^ׯG&_籂x!7b - `zL(KaLL ɀ`xY4 ( @L&@-PP22.r8 . @N0 jC5&hC@A %`ϋ{@8I4kV Z@ \@h 7 (g -$A RQc@Í&0 @((@?Í9p ɀX29(@ H]l*' PC##,@@`=`G ,@ * P%҂Z `W.op@:-@? `(M(haa);2  @LB.rL, /`bCQ S# AE3(<5 th(-@+ِpAg(x䞀P ,\`xPn J&1 $̀'LxhMĐsЀ=p:& {5( b27Ւv- H ] dp W 0 Ʉ+P14ԓ,!Ɉ/~ (&|@ 0 .LH`1!PH( G0 @7(`(SbPZ$@ ! `Q!P>' @b y n+vۋ0) @ O@  %` ezL;~Cw@jA(v** I(el>ŀܟz@2RBdO4 o@j'g A1 e݀n| B@@p@M4($7GH4c~L::!d0Y[H \p %*B! (i,b\ H(p+!RX8Հ34@!$I  )!%Ɠ?+;\)])JD\)rER)JD\)D\)\jR()qލJD\R)JD\jR)JpTER)FWE İ8؛\ b8 @]0`PJv9@I I @59 )e] +9 P@jPC&`P\ (7_,lpqk@PP C@1@aD$↏Fq4Bxp?bb!H!  JG:YhCG(2# ,1 ` H @`AJZ2 Fq@ (! fJ섐2L,% H!hI @jRv)H".RJR")H".R{@! @`!u@tt4,YE 2 @ :^hB,pË+r: 3;&@i7 @h`2ҏne *4@h: P3CIBA= @ @h f .4@` @ `@vX!n6X ` 0 e@ W$0 4&00NlBIwƁt $@`B`7L&t 0y !JX@^k;P`jR47.A7 3 @,!jaTPa{@i GG$E{@L 3]4Fe4}@$A(#3R\ @9) ?ɘdD`NI'X h+~@ri4 9 qB3I! Xm* y4 $@;P  0ɡa)?ԠӘQ`` D?!!<@CA 37 0@ @-0 =-8@TN# eP@`A>sjlB?P, ' tj5<bHHi Ʈ8 @68 9,@"4CHAl0j.x `6j @, 1L娔1 |ǿD ! P X h_!ŀT h! `@ K3    D0Ih( 2o ebup  @ :I Hrh<HJ zH <@ D  pP' 3@K&B&:PQXa-;kӂp@R^X &hA9& $ dj'$Yv@R @W @-044200Ph@Puh)@şr`(`xdj3$%RJ9i N-(W0 :0pdC@|' @6@ 5H`z l4 !1 -:( ^X x@1>B@\Y3h0vP "!^H$4AA.+!(@-?!x2: &E`0i,Jy%V ;H @@i4f r|aYp6_)28  W ; Ad.V<33:P@ ,@@0~Q3 Hh)#w @LMH@4Oܠ,37A\@`A/FP PzN:(􁞐)x}aw 3!@.̆M !:H]P@q @ @9v @`k &0aWT"-"|up <İ \/vVXIQ48`y@ gܾdƿ(>@ eP )8@` 1I+T!!k  lNDL @30@LQ Ҁrl=A  ^8 Za<01 ,fZI'BzTPV``  \ڥbb!Q @ 8t̄AI@: rQCWp@%$b`*C!a0R 8 IhrLnv *6 eYɠ\Mb5Ƞ᥀Ą43%,-5X jdrɠ&;>LKL h l 4p  MH8 RtPa ɀM @| @3@"hAe@*  @`t4 xkB 6,!7 URKqTnXvx @0 \R@@ @X @07@i,(Ϟ/ p@@GAa:!1Rɠ Q HD q`P4 J @;; `  2Ct@t`y_u @i@/&"( +|XxJI4$>^I\^0c*H@ 3 bI~BЅgx %3wp "p@b Ɉ ᜚baN2` b v`@2N IIc>`f 2&\)&bKMpՒ3` @4 A@ 8`&p*L)7g,` r v `bv(roHoRcb>kǀ6fH:z0?ᘆP&sIrRJ}T@ AA)8 ?bC/,:Ai  3X`z@Y @  @Bb@F Bp v7& Ph0Z@`R @@:&C  ` ~¦~N8-E A .? $gY:$"&R`nM&'Z8BrB  +hh"h(vņ\ S|pD|!b(1 `ḘVp?\iAr: Vߔ90PnRJR")H".RJR" +ґ@ 0GA 9`f$@2J?@  #F,  1p6b`070H`!$2h&$}`'bei@B Q;b`a3[rZ\HF>@ 0`p C?|@x @*90 %/A4Ƃ Q 0hp@AӀ!@a@'nX RQR UvD*IPB I4M H³#/H 8 9 P@T`!P7Q5$'H0Ce! ,) e(±-g 0/. 0` BC!@@ i7!e;ܔ(n - @!t`  P",k2` \d00;(L[$-R /ԘZF2Xú~CF p @XZT@. @bӀh @m~] m4ph  @`:@`Pf+03roRp @ FthD<>IHb <ږ @ 5$JbC0L!bBa 4i%L k @  t 0  <4V& !ؔ4 fDA $҉!5-Ї;f%a`_@\ V @3^pjMLb` 8@`ز@d70 }X "0@r D0*L MXh`3UK4;H(Ubb!Z @,f`ɉ(1hvQك/N@01&^pq) 1%!$ C}2 0 8 :|L d'rQl틾KI2HaeX B+Q3T>(A$0% \X` f@ P0#dz .) <Z@$h*Rri- ά>@ 1I4#x@tx&bY0BRz B6$P@@j@<\ \P M 6 ?O2CY$ǹ@hX ]9 rbL P bXbܖ$R@NM&$a@ ɠS%Me*51a?߳0@@}J@r=( P!,H]<-P   P!(HU)Z B!p(3( .cFqnO @2@ @vX <KH%"g%eD H`a+K$I7H4z`$UX4Q+4sAh ! $?1A` @1ZCz! )!: ! 1D);? A`A h<@FX`&Jd%|JrX@h@b @`  : ((0B ,^Z(P`.` 1~P a@7!Q-!(ձ@!A (a40 ptn_Ӏ R`((;pX) a1 ׀ia @`@- 14Adjk~( /nPf\@: @;*P0؆PAd$w k+̮ _`+C@lQ_|L+~a꿩4@@P A5XYaBn:% Md́my@P/ ```9᜘P7,y@@!c14(4aIJj1|.#.\)rER)JD\)rER`(H}=81[ A^!p *@m3JI ` m ` @B 4&:ӎ zE_gdb2 1/ IQ3N19(4}0*M&Q\M|B-,0D  ;|Q4L 4JI_m0@p  (ZB &$ Q8q,(>,%1 @D\)@@\fMA@T(&Xb7tqb`HRB(iE|.n*@ &@, 4!4z8i4"i`eɋG,0~JJGϯj`@ #Nv=` /' 6G\"` & @h`iH,/ Ah( @&P D@2 %A,Y(h Y),BA[P@[d #`p @էlrE= @P@P @*&+4@p!|ܠҀb Ia' >X` ;)%$҉0bfIc8e$?Ѐp_4H d @@\C,ɣ*B)OX @ i ( ]̐*@р C!?fB >`* .`@ | px T4$P 0 j0&l`xb@`8P` C@. nJhh@ `IJ(H@dKp@11:K@ RLKlYEh @f_$P`@k@r@A @8J `' eLɥBd%9ޠ"AL@:0v@(`5 *M)l `mA@5A\@/!L  Ia@b`+ X 5Jp@4@@ 1Pd0 R& Z8o@ `rW@ (05@PXu $IJ( ܽ7 8gQgX @ 4 @& iP@K% d̴nA,4iE@*ZBQ(ZА$9^Y Aׂ " kVZ@ 0b 3zJ 10aC~|L@w%Ah h8t@P ,vM2`i IܱSG"T_,3&@a0!P` dX5"C~NQ#A\rP  B<̠ ]0/ dep0$*!% Ѐ@1*u  ;x3!`eZ &cvNWk``w@!}o $K}`xz  =@ x`g!059 <`@1|MbdK_HIIk$¸ @)X(쀄aG8 PC4$X JߤsO9~L0 <P\C`p v~R’JCRu Ě C@P\u@\D 2/s @7(d0Jdž%roFh h 4, _6J  xa0@B4\4ܚP CV)6dFP{P̄ P` `aA @` C0j1x Ul `'+   a`@P R2! bGZ0g9XX 0`0M (`[ đ4\)\\)rER)JD\)rER'030ĘLP L&bɄņ$%  ! \ y @n0 0]|`$yP B/`T 0h K($gn~`f `` 2$&|@`0, R@n7Bbb!m  AP#`d@MA@WB@1Ŋ\Aזb04i@ eY(5#_1ΟB9 ' +.  !$0ߘ;rh e Հf @` 3$&x#8 1`d#K< w2H! I )J@!~ɠ$>M}@ @h  j 2 lpd07!g-r J 3  8L$n@v|IE|iHHc%;@0`'Xhh q(hƘ;q/L`f  ABX @vd~ri  &Ҡbp @n`*Ck1,İGݥђ~` 80vPE0C!%  =`a`dri @E;MҒ; A4f IT7`ޓxhO ߻gv"`%P 8 <B@t0 1 I4 )+!qЃ=ť@: HDA$'(7}@Q p@cp0@6` 5J9@ ()$ܲfH%g P@n@0 X 4C; '!  1h 攽rI` /&İ U4M q336N@ @ @  @LM@ I0f(C+D2f +h Zh $ !P 61L!PIOtcRzU &C@3 d RCRY@*OK:cٯӂ d $3@Cd@t ` Q bJ)&{uR`!z䀜 T=ria o-` I J fbpp0܆Y0|hf,@@0|@5tX !0$$_ .RHn" q018 /!$^)Ub b @h ph 4#a +Eh    <Ed72j0C? GN)$ɞ );P  "i`T R@*1 )!D,0Ҕ` kX 3&/X @@vyEw`uw$L^ bn&bCOI7CPR[$')URJR")H".RJR")H@ @*6@ (H @bl `PĀ>/eT#L`7LLbI>QDG~N'Sl7/s4{FxK@'@0@`!lb4X  BlPB7=Hp'ד J =R ! 74 $f-YJK= ^ -5J`Pn h@ޡ>x5 iv@ -$H@\`vCI0p 0 bB ( @ 64! b@4 10 vM( PK[P4~4?<LP5i0B0 *B!L@ $ PK҃I3cNk!` ɼ 2!  ԣbM\b0@@(M,FJ[`;_"t@i`~P @4nX`' 1# ܐ P0e`  4fB+l,[h1!`ĆbkYIF-gp 7x p H$lJ` rbbXlĠMGtR\ A@@a@8`@P CbP'؆C(㽇tbb!w 4Ʉ'd@@J>GBC@-% įƊ> A4R5AP. @.(\(HPAYqt.2I 4 @Mr2$09 :F/v! &! J$2 I(K%%CJGDb|J^3 <@?|M/-@6()d0 @NM ` A ;l1@: CL v d 0/UfZJ!$4M @f% d}~ Vy "1@P4 P@>,3Rcw@bSP0 7 İ3`@|@w& @/Ha D0 x0 #t2|MJ & bN %Wƥ`@RX 0>~t=DTgɠ68f%VKQ)  X` ;\ @vI=&I81Ҭ\ -b!ih%$i6C:RF[.9h̼t$0 @`` vXT@1A`&!Li@ A@ 0%n@@ T/s2Kc3 e-XR*Cp|^4p4@z@, p .!5&Rؤv&jRQ7n΂h _` b_*Z`4$ (5&v,@LM (cp B`&BQ5 /)hJg D - A( (wnn7 ZM|3^ n A$\ܘ$ 7}>E:40;H!L/?KT )uT#D@p@' } &1i2 @!H )H 0 i74 (~RXπlP!۝tRLR-,LBXf-~Rl @9j@A 6h`` CCI@_ЀRJ%jSAK p@`B1 .f$BVB,I1&ܜ0jrW`俰l0Dxp@/<t(p( CK-!!&PB! #'~-x@ #hBD`` @Bo! R 5&2C?[D0@@(Ye |P rJbZO'_RJR")H".qK @,@Z +P f\=`PQb`xb:ì@1,P D"x043b쥪e@@0` p 1&%vpA N[bZѱh(J@ !+q%_d)`@ @%v, ` N[79Hh//P`&J`. 0 .H d 8d0*0%1|  >@AHn&h0 /}+0 0Z\P@` LxL  Iߋ+r2;`0L (4~,v^ +Me\1. ` h '(H `@jX C@1,d @4-< 7K&C7&H e+Ri`r T2@ i`M@tp`o$5  `7(` s$zLLxh j@ 2f :b0 zUBI!fK&fł7 bb!a  ĵӘQɈ#L ɠ1- tPpR|Pj@1Eh J<$@j@  ,( p  7 .-<t~$ò *bP`DpRX'f`(@p̀Rݞ @L^IN`]ԙ/x T 0`p$ `  &t`Y-䒐Yj A `'@3 n@ha 4d RaH[`oߝ| KN#X >(pp0@B`2h @.@ Rb/^ ? 1@/lLb I&90q4 C(;$j]v` !v2AH \ hAHϰ濠@ mp @0z9` blԀfp1Q<@2ShH, M3 1  N@ `( @X /IoC@H h 9 @~ :!@2RKS T-@@ F @v`H`!@jPP 1+'*Z,d;8Hy#(4(ixL404$$၊C߮"A0pd@1?8 E*AAX5A`'K ` ,Pj1 `L\ iiݓ|+ 4 x % t Nobz3,cP@mpX@@ @0|`H i9$!3jL, rb@#) $ @ K -ۡdƥ, 0@g AL +d0 H `=!2I%@6o` " vx PPp;b` XĔB@wDZ dZ@ AX0@3p .  CMLvBD5^|PP(`rI8V' &!Rq|eɅ 7H G@` X@h`A @ 0  P PR h^BLV`9vfiı$ > Yݯ@@  i:?G\PJ:%ƠP@0y1hQ3 C4 Pg&b4 @2RMH0bi\|7}ԂT|bb! ݆XAP# P  %\3nBP 0HeP5B<%#  $H2@1$zd0hR nSҀNM~s@ Ah 0@B jP@2P@6ji7otR0ZA AA3 @h j6(lX@ja4ЃCY 1\  "Ʉ!-(45Cxj_>^J1@@T @Z @+05: !@/!; H`) v  @ R l0Tp.py| @%,,AXK@@2,` @ p*aa$c~83R^Qx`x@ x ~0S <~ 5@ ) X `H`bU(+Y0 S p a  `@?}7 VMGG%'bN`+  @. @*l `] >Z@ 4 AM 1!"1D && 0f3@LM!'ؠNR 2L!L&ah hN%ns  @1; 0@7ȄP $\q0O?M I`TY` J@ V@ p.B /1p R!/TBIʾO=mR@4` Hub| cq|  Ov @`z0$ @ @ @ v@B @0HXb_&1` `5 4P[z M`0}C%Ɂ҉p҃P5$ƣ 0腘 Pla ; H, +I} pޕf21LŸJRW\RJR")H".R @X @^8`:0@@迀iD0H!}tK@i#0v܆`I edVԣtxJr C$I!:~` @t4 @tB90n0C0jķ^4(INC- !%98g+p=@  @`@Wp@^b Z ; bP 8`2 K-! 0@qj (v2 hNM}ZB^dw$@ @X jH @LXD ; `:pC-!W SP@p   - 01`r@hp0  T`INQF` @ 藀HlY(ie|1HV@bq.@` \4@ppZhHܐp -;J$@^4r@ A8L!\i$&&3@#88 $`T4gD i`s < % 5I@ tQ0`@q C@bNWdR.ZBh0 LX&~\x%HŝJ)@&P@Y g j` a$@@LII4 @`8Ť(y#*xx2p A0H 4@b LRa `P;Nep @=@4S(A@ ;!4jCLpbb!!  Zsd}ƥ*zP! `@ ZX@T4@Pd"nI `()@cprA@;/3 fdR`? @5 @ ],)b@+v 0 3 =@`j`N> U( (&&2 vp @hA$@ E\RR 8H @ tHHߤ]%@ 02`Jg~P 0N< bZM,nQjdbV}@@l( l'h@(D @P04Ԁ?1/d '|5v@G @)@5  4tH|p` NixB5N`N! q,| ` @.F; (X cnB({$BJ4 .d`N.@ɠT߀-nv`1)j`jHDnL! H' 4.O>B@(x0 5@ A`@<@`74(!00 \LF ` | 3|B(@P$gX]xt - H€-vCda0SCSC>`D@U@-(!r &,0@1 &%t5 P{Xh\ 5CAI, %|"׀ 0ɀ  @gZ 0N@ 6y@@/B_RYdv 4  [0 @ H`@, 2@0! 7} 40h0@fL4wn900PCFu@Zl@P@= I>C 7b&,4A D/f p`(*AHhRvToalá<` FM @m pf?`LRh@ d41(&,&0lN # `$ Bx @ vC&D Qd"Z@,! D& N` dQ$)%@PP&A,p@P)@A)2@1T/C~< Q($ CYL9\` LF! p33.10k` k` ai4 L #b L q40 fxay t6Rp))^]@ 0@) @j`: 0 'E7, x @P@/@ $hXI @&!rB-=,@Q 0`:D3@=bp 3|Bpi@d2,BiW2h(t &A`0B|4YKq/$@0   D0 ih` 7$ q׏܎] #Rg^H( iz _ _F5,!Z)t TAG0&0(<P*^ E;%@T>@` @ p@  ,H 35(؆L|` 0+@ I eJ||Z  @A T@ F>!P :K mh @? @ A Xj0X``A`iAp@0(@`Va 49 4a0B M(B1(/60 L cjJY}??bb! @Lh5h%@ C%]B(P ~v 52@1V  `@+ɀP,h bɬRPB& 04 }|b$ A2;&* PV%R`P &`,7U\@hEj0&<&dVPFȄCt*FEPp% !t4a@00ωx,b6>0. L/'p*40X @fĄC 60 p vPV3J0A0X $X`1"HZt `Š40$a"݉T l@ ? @ n2\M!5  ҖY)H6 @!H T. 0  @` 씎P`0 z1X 4  qz@%twx  440>Y) Qh"EsJ]@= @; 3H >J$@0D0Z`BM@Raf\ BhRM(IA{8N)JN.RJR")H".Rg_>x G$@ 4Q45v@@lJ@4H %5ɡ0Jv,0dD  @P(XbO€hbPKeo@~'$ @ @t`VrL1J! ʸa4& :9xx> bP 7,0wɡh A.(0 Ed ^5v@@aC Ԅɣ0!}g @ `h @'`np! Bp@< I@d’w`M,$%7%0 A0p j _@00@9@9 ! H`T3L +w8@ @=  * `@@L( L &H@LI\(l$ P*LIx)ЎX 7TJ @F$@ @p @ p]N`J Z(I A @`@, @V @@@LP @g b(DA@:@O3\@ @4 bh , `@Gb(d@ @4  $Ƿh @ "f@+A< h @1 !Q `;&,@g#@x4ɩزX()(?OBOP@- @ #pp@3!$ H@1tH@0H@NXok1 N P@*8@`@@1HXA @Z bRX`0(Xp CQ7ۊ t2 A@0&"& L0"3@\rEpBHp@ @@Cŀ8vTi ^& 6 @ @ a, t'Ĭ05))-.0a]H &f ,r1@ `P!Q   S&3}@@RJ  #0+<  ; ! P P 0".`0 B  0@@5vH@2 b \M6Pnx.l @N\vĀ`PAaIJjm@ @1` , HHpˆj`7ܙ1 _HbF7$_ A) 5  a(v@v oj5G&:w634 @`@P@IAxP 0 NJ&!\i`XܴVPbb! =``[C/P`@b6` ] )`` IPp :P ;-``$0r- @0:0` `(ɁAQY'R`MBJ--9Дsͨ8@UDB yF+-'dKdoA& @8 $( X0@!f @ h LaX(hhBIX˒p@y(%@ AX)hn 3 OHh phd$ ].d\ 00h&!A{},N;&I0:A0ᥡ?3f(r'RH5h#x c;H Pp AMP *%V@aȺ  `@3AD02M 1@7fJ,@L@aRQ ) "iEL ,r)(Bq8p  LprP@B "6F~} T2B( (4%Ć>@.ыXnnTX뀀`X@Mx Di P &b@,!` u;- 1(@M/ɂ 7-p@=  5-* Ma)킡* 0P'`!ɿ!ji 5P e@0@-% ` $@TjF:r`ha  @K{p    c %tV @4@` 4,؄X!|$.cЄF @`@PҔw )g BGst @R @TPhP| @4   :̄@ :d̒Al|4܀@@!>@@% A0h Na+0@!!l:jfQ0TR2{Payz!@ `M0 L膁(IHD ½;@nA Iiی)i,)a%w0@H@ P I`T@;.@; @0&^` *&fM/%}@`;p @j&@ f I -C`hjj!#I\q``hL !LaH & )R Av>`! R| 2HD~ o/w,p $b8 \$P5Axp`p Ji4 ``Hbɠ$kY-. 0@ &H "i @ ~@p@ L @3`IHZZCKp I0 N! bifk-b)H".RJR")H".R +p` e8 @Y` @HP@9'&fNV:/1'd|@l@!@&/b T4eyh@ -t4t@L@h A!j%~Kba5`8Ffi"@ @@P@L@bJ @bN 0 Ю0 I8 0` 7@p@1X@ PH S:xPo4+Pߛ|/ [6Jth4@ +a 3 @! C !8@ybb!A 1)!'_AX L9 P @M4Hf; @P`apVF%y@$p@Rn @ ɠ d!`MȬJ+ {̿~2  A`Tk7^0ãz_@ Ax"N 1Ș4`'  X9 )W0eJBx‰ ƒ)Ky\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER+ pXx G9jXf>i5<.KQ0ÁcռqE@8g݀YQ0\|=֠?=EH<4aA̦N(Q䎒j XZay)V|y9{~yDY {j`j @ >@=r ,_1Q7qq(|^$ʁaLudXÈ0Sh8h4fac[Dk(h,I8"'j`tCcH*-c:/r(\EL N\XaY#p$8 Y@ gvdy EbΣ8>&8P0J;YaD"cEx+ D" _ Il9dTıy&زD٘,tC004aEb qjRcY8P q:cŌ-RE,陎B" 8 a bb#1x D0l,|ڢmjP ! S)pk!9̥$p| ~F/,IQFū|*,"T3h5 Wq?>g y8+ 'T#> sȂGZ/`@2"1#E+;D5|f`‡15{DF2hi=9.&I'OnVk#G%mKQӯ\B >u_XTφ!Mț]Y'NITjKRP۷&O >Z%tF%ICLJ ;#%K^*R6Mׯl5fffIZU@c7a(ݣ+]lʉy:u0ȫr':tOC83=5XĜI'eӡJ9*h3Gѥ]W7.n_Կ̜'!(BPvwgI b!ǜzb<G m&$s&Cd>7uy^DQtJj)4jLV &+ aaAUU[r.\.{׽vn+pH.#qɧTӪz%R%R݈bbѫS4m&m8@P8N4+J֓IѩR]\.Uf&f&y^GƟ1E,kFzǬ4<%RaHLV&gϔ(ϔ(KĶm,X81`bb)%vBP^i( |e>y!y!HBC&A-5("xW.KiZbز I }Q9cwww~ - Fxrdu P:(a!Wa!YeYh8@p1c 3gy'zX2G:J%o7TEAܢŝqghQnx=;HsG4y*lDр(nG#J ffwffDDDDmI$PPbG9CPyz)ˬ ..뱾o뮾,o0shmbb! ³?*/nݟp)/׷pgGѹ׸$gnكY>J;:1A9*O{sxu.lG [b"y=#;ꙬǸ,g  Ub_&u#Q,P,C[Pgϟfyc{7ђۻ2ǭ۶8'6YI*fs <@#;IGFrfps)ٌa͉@TI'n8q^cVu3k _<)1::Vm|gV;mݏg3ܑ߿to/?2c1Jnʨ(f7{1zl{Y?5PC$J8ʉT8b0y>8scZ0\bb(y[5LF؏ Fqp̼xOvs1N (8~s,?4W'j٪$6q>H c`%[GL6gw)ݷgZۉ㯾}cJ]ב/llln3?JUfhdqfjge|F>c16'ow^盀?zg{„[l7#>d K `|{S<Νcټ37'պR;ou78>̥o3L^r1we7qUٽ!viF}twͿϸl;`v>_ww|Z4f(f;b~??ۨM{d>On;v59Νw29ysV%?w|1~e^4mr0 j`˥)AƱǙkQ*~9gbt{jf'qDs8 cEXnGꇷ=À<9QBT(MLH[/}9ϛlH͎ngwͅ,@TI#0H ( ;vۨaڢG9Rq0_'R^u/H|;ĩGI~AGvb&8@x"a?dz|̥"`5`9&YG­Ti@$Gy*S b:rd4Jv8w T> )k|~dJ4 |(ۇ "yJ#YƭqLN1͠gq0^Q5 ' liT D9YGjrw4_8SPG3,m%yfv)CRG(X }aOΣ\xy?՝g(gS9=cv9F}ݜun>JV"Öee G?fFzhK6$G1u0ÈZ1[o ?r5X=bb!a ! HcfWb |D/ xξ#/G0s{G/ vpB (VLWuwcl4PN8#jPI?~lτ)aNBZc;zy::)F4.e0KV p9cY}2Pt1@P;01Hqަ$τʣ{؀1N(@nrbT(PُZqrs岰v j.f/G؁^lcqXßj9'0Sm;(B.%L~8@p52b'&Qى{csS8 =!07bakgv"uj7*\f `Y+9AqЬMA✝@֡S6/,|yn e,pԸy/Qfl,S_fghKcN]FfvwX$|%VA 2YyI|rԾNc?.–eLH@&8{Qmji*P#Pf}9B~z=ΏcuFN$8O":u}LKnxqVg~J8]189rp0ss$SS vQ›=SG[{/;7RX7T<f^ḛ:n9~v*n K[ S;G_3l'IԷ`oJBe P` O IX8d.J=.nPDQ(XP`p͘ՐGm }P3b0v=p8O&$qG*9wp7p6>WF`*?cOoP,XlXб.{4>lq?Q| MN :ÈpB@mwBPn."h~R< . V(uD8u X%~?*T" o$U„,Z|w'0P0؛2W,(u`p5'c>RxGPt' HD0{ah,pU ˆ;AZG9!qomMx0Aq: mG]x806j|:t"Ø:;̘*/.@^n2U@3 F>p:&:'WQW$Ol, @0 ?o8p5^8=dҔuxDqPgUx( Ǒ`w;GD"  u}xv8W̠T ^8p2^D<eyG Uxи?Bp'Pux1#Q<cij}g*Is?zT 3|€˂Ā}^KEy#6o`0qD'ˁ]~L*\O6Lpv\ PX1㇞~6>10o'kWP kب|D#Wyl@Q@Hjja:8gD$p "!bo=ʃ gu `"Taҫ/WDy=ux;MYL@zU8ppZNZ9@t?@:ez 3P:Z/WFB@|.k@v"¨x`:9A30[,@?B"*ka˃b ]Dpc-x@,+yB?Bl װ85ט'Tt `5o^7(T L@U( P8zPs^ W $gwWS:#@>]r`;ŰCUx׎@^(j@3m ^T d pH>IxgRL/L6cTMOh 9gTeeh el"& lH uE8$s 0 C`N1` 8XVvWx  PkQ)F?:&*~LĬMXRY5*-~DM ? ;Dǀq: 8=^Xa*j0]'ADS 2%6)d%X3&@  I}P!ߢRVdLQHeJ@ *`iE H @7@! @R0D0`*_h` D *P1SqRiaeRIb}LTCM -1\BPaH )0 $|~HKL,1)%|5t")0&(pEȊt\Z$&퓿',Abie4!QkPӠYix*MA)AD@CR` @u0Z` @?vK* |ISkU@aؖD~i%|PZ:-'(ܟSvHCO ˋ/nNMƒ0 @7JNqeljp8I0lI DҒZ(qu040 H);uE5> vZ.7\|aa&`j#@T:NTbYP/HUSnQ$$q0(JѓQ &[Hhe6CV:" =Wbq[@5Q `u@tu`B5AQP`Yw@:.@T>cql c}'tLtNU@'A052mv`4P*p= f]PI8!hZE.!!뜇s~zoW43v#sn*Z*ft:*$tѧ Z49d%cr&iz4i5FjXnL%qdIT8+ЮX @Ŕ,55 `9sA:h8qxyUt7o}qHTj; 0#QN&޳zrN\ބ%#iZ}1c).˺^]c  kkS}N U7 P@l,YmvV9sj-dY 1u][FѸQ(*c X2=bAى1Lى[2gٙfa41lbt2LiZX&iDc{u@=:A:m~n^15k@ jj( ֛NV}Fd4<Ƙ/sx;2eڶmAPZ0 eâc wDffffUDUDFHZF$<ߞz- o0n q1~l6WAaHHw .^QJ&8lf) ITe_Әq8TEȢ bUbU.&_*T"ŝ9]cAd ._PTmrӧ &Sx#x#%[EW/N5&nݳ93r4JEԭ+2LJ,YnFk# ndndя~,XaH)`6B)eYf)%ՊZ>']k֩lF؎Q!eˍ&L}Azc|3 LӬG1&GK-- }+0VW/pt B]e|_$HgG546!GX̣خhJhK)Ǎ%)LVk ;Zu$Il5a599ƥKmC:+Go|hZiuյ_WV'.P 4Vw+U&_U&_X1>oTި*0T_?tx"gFwKr9(v`bZvuouo[1tb1lbmt*".b%IZFSH*YcL&YbYa&rL "mDNdDžxPlsg6>%/ C~ 7E'7'7'9bŚ5pc4iZJr#-F e3 UfUfUUUUDm$sF4נyj. o q-/Lq2Ɏ]d lMV Ղz4j!B,Fj~I:@6a@b@>/!$pp0`0 >\ 5E̙UEckQ3sp6>0 0㇞pfML$EC@ҫ]BN9:pQʂU@AG|p5(.D{"|;ՊB5P<6` (qPUP 4@Mڰ85y<:cy@W< :Q!6eA@,9tuPCGJ FU@B:" ꠡP0j WN&=@rP`.1Q &0lQ Q  `55DP`0| x/8=v>,\uC><=~ :"@FA_h*.qu@h4y4< *T(ojf@^|o|  @&'B*ũ EoPc@n,at #PjpOHD(_Hh6`.OdhtaE $@fh6œn"" a@,03\h.xzUx(g X]y@q_̦_ q_:6W$X@k Pr:p~t Uʁwug/`047H @ɫ9_F{^3Ux|€6nX`7>"Jrb){*s*W(u^ ?@@E<w`x}pהU₀Q@E xx*'uUtT܇#׉*e&o?\>K={ _aR5x Dx >l\64ÀQpu[T_RI\U;ˑdxT$:'G]~ x83@lqx |O2pXQ:@3 Feuy`y l>t?vG'C&@ʯ:oy@m8n@8~J@t*:d|uڽaAW7]W8o.WxjO ໕_xq@ GW2;@D:^pװ #+ਝATO u p7^^ #YHsV^a:P3}b)W`\A΍Igy.tux8G{* *Ux8re8>y }x1 ?1r:P8+j@GѠ׌U|^0 ۀ<D @<㪾@y ʰg ]WP'o6-C_Ƈ\<20Ux@x]  p_Zyidģ?fe7tB^ A0n TO ~.,ėQ"LD3#yA!#"jH_}&:c҃eI} ` H\!*CD2go>!Xz @rSbBfhqRQCS%(Ծ!` $ZyP. ~j }X*!>~4[SBd HCO}>Q9/?NL% BnG`H-!: AcF, ,.vhJ77LxeLOxh! C,D/2?(;TIJ\j"i ؄Rx(љa40҉LNL8>30o%K +y Ra p!b` ɩ&?%~ ZPA'Pie@;&' 4rv̲&Ё i q o ɽݰŠ@`/ L RB~hgrID t-9 y8 {A[j)đ2 VW0 ? à @tZ6J KP4! 5;/oj8ajb.74> | ( }g18:7| @(dd2XiHb @nT ^R IaGĤ&̢FC|Z62 N: 5eR&,iĄwvC Jɩݘ[ܞg@CS'ϷbY{ܗ PWϝjqu0 95;qi(H&1(_j S #f|5;` $&kgb0R\[l@!%H,O ?ecQK\mМ$a\5iAFnVJQ v)a5RJõnYj'T @뮃 A:`q̭jwoXP_:'V GT}T' <0 'A&@ʬ@4cDvu(bb!A ! 1G8TXН D 0TuOATH@c 3y`-@rl U}H`xj#C㧛;0 S dX? 8@GRUgT]Hh@juG{ΨAVQ,t _[0#\42AW4\WN'M7 ><I5 ໕\oP0aQ.$ GT#Ca8 j 0 c'XҀePp}:[CҪ #YHsVS ҁ6liU` ]Qsnđ`aPΎ82<U @Pp@wSjR@3|+BR$pW&T #F{QuJ^0 2'Eq:%G]C: Elip|d<ɫܩ2jd_8:HU_r=I.LOOYF@rC mp{$"`_ttX336D7Oj\}WuuO~ y#x |O2ު9x:i>r2xc* rU~7g[_J^Ttu`˸xat+g`e}}O o <GOo;N,+UgW:I_㝛w^R3[?N8;{~WG\H*}onR]U\u 9^x=לb%}oTNY ۯ$UU^:Dte{*DwwWz{sr:a^5vUy>` 7"tĨ_| `7'WPYT:^/뿇_`^ bt|}u庯*Ճ7j`d^J;x= xx*ut+#QoU䪷#ȑiAdPfE Pd1U( " dPyEE]p;^b(P2>1" 1U"P0$#(R5eyDTUn>ªD&(8n:$4T! x I6G"^2L[4^aU" yEIR"OqWŀ{^e"EE̢EI ;R5xRb"+@F2WT.( UHk W"TPdT 00K Dj t/*EaUgawx㣮^H>q̫7p5^7D|@:On5 ^_mʃ0__YWүוow;xw3:l|c9__u=O!ïӪkxw:pYNuu}dfgW ӫߕ7'J[ԗx;Uo'W*xruypEGW(u؉_a@:_5v7UW#$w^'J-G]5]ޞ\hd@cWp^O H&|q*~X T t_q*,.Η'*:uW3ׂ؝* o_]ynʀ:@u`ZX4:8E(<eW ^bb! 1&A֭܀ p"dVYHߝoQ27B+oIʯB/K,%Dh!#.,Ćȕ,5%td 12n!2i!tb7aD C˗Q1%XiR~Vt$$qMHD @ rW: FwtB1@jgHdp!c@1pGGc4f&jO T ֟;(3to 5;4` ,(U$%p膀`39/;‹GJdlBnI PH@ % )$٘u0l<44S,i&Yd1gWNXX`-x`-}P%0 e~݇A@PB o!az~B@3 2p1 'P*Pf) +3uiDZ͋,WˀNqđ4C!> j`h``qG7 If 4khbJP$HuL8YC6vL/f'!83>1,LQLGS=mLl@XԌm"E`NqFTY!6pi$$^&qɅq.@HDDH,}f>*J;|$ NiM@hOE$(-Q4X|CKBs#엊FR̀NY4w ͟6?h W`&F5`SB L۾wTaG~ r5(e@%luL&i|_cY{!)\M kR>'&Ni$<bBU$C:dd! @ !USj)RE\zY%n3k5UUÕ&#;vki{Y4MjZ ޽m*`ysTmY4H*r-IʍFmK'6%SS(Jǔ=ѡ%Z]eg>K%I@j@›ZZl==pz]} fvfffUDD3m$Pb=TU"~{j-L4;qq&N"DA\p7`#ɋ ]Uv}AX""i4ѥBXӜs~Y^q%K$I[ƶͳ *HW~Ow=K׺{BOhlg" N2{iaeX߷3 ҥE+[ߣ[~ҸQWFz3[I>D R M#IHKp[jJ#(0HE(9WЕ/*^s(RjeH2CRYG/>OdQF@|J Y%y,fژfڢ}fڶ6]ֽ'zLY]_ŵmUp5N+8p'Bab!bvFfZe˫#VE-0,Wdl[E678\ff鳺n A)^R%ZAh AUiqVlR`1L0o[[)VUەvPdA^AduD %oRi7.,?ދ!mam^7΀. MN\(7qL{ݧh^&ɲl0V UvwfUDDDD$ s~ᚙ뺻0 0 quzCx$xLN)/ K+:+h-ۚ`95( w=R;`JX]L&R_v:$@om@ b]=FF&3$`Dh!a>&p xD~J[:mМ$09 IA_xMoHpf(& be^ZlDuupEMuD뮪,147@j|tNSIPn5 :oT@YVt?Rd@;gyq |*/8 c/*V=DY:6 v\MZȰ9@JUR'UHs'Tp ꔪ@f?:g'*:'Jj:h;U UsruKr*:#N=#T2/l4HI:2t׈$u5kΎ8@QaQO9pQĨW:T t#êUhS TuԱ[p؝* oX[ەtHg":ThupRUIPp^bb! S-bb!)! !_ xzuw~ubc?\/שpU V>@;"FX@wJ\O ʿޮ5XA { ꫫz2fqW"L _H "ȿr `. "ED\8%@WHp"͑_F#_2 fУX?(D7Ou`5@0/:'G]U$ty4@mzu}WpT賥WoUNWGGWW2uapu^&*:a*+Ug_ȝW$:^ow)UzηNHүuU: Yn@v/ʪ$˻*G]5\x8@^2G;*OWoNj9uW'u5Q,uU H3ʀ8-w*g_B ZX`הP\bb!2 X bb!; ! !\ xx.UגOD-7EUy*yH⍯02**.&((2. > i^aA$AqU^* "5\D2D 1UU"EyP$IEIp`2v"EW Ƚ^2LRM Z&>#טT&(Eyȭ",9P 10Ȩ^cATT@x0j!#E5Ek*D@r*D&EWHD@*E 1d>>E.G"WoS_^%EHjt7>::#kȇYo__ӯE*xoZugO78woJ*::A.W }{к1T 1o;GxWNZ:D꿑'Yd{Ju7u^WG\$NOGMurׇyLuzί<swਝ_@-p~UU_O 'F]DU>_:GSt*wW᪎cUBAT;nV:e?:?޼ _@dd!EA@ !m|\k)GZ5zCPԕ%Ig[VZ,#߫jo)3 1#LJ5aij@Pj.. JGm:\4TRk ֎촭(:|0\1BBEs"ӵRvEA@+dE=jz!BT8mʇ (ZLq-[ȡky,-jƔ>GLf-_k&Z/{c㝿sMAN͗beؕYmvkqJ湕k%Jt xDfwfUUDDDH LΊ:|. 0 0 otr,10L+^t/i c j9ƿų` !]L+(#6,K@ ay6z4 fT) =:kfwrmGT)Ve9z2%k *Zy4GxӍ6k@$$,2n|aRD|D_+WqhU:beWUGR䫾 jbP1``Fsa }9q `B9s2,؍6ꍣgyE 6 a<%R>U t譩[QxLms^Q] C62VM8).tAu <Qr윺6")+9`0(3(#dewԩ6ުTUVvf!cQm߱gY/hYDX'F$|Z)ӆ 6Qƛ "sOF\hm35"jp˚JoCRrˈI_?#Qȑdc,VPc"i)G萡JYѡU)}KA_!G Wp ffwvUDDD3m$Z:b A%c~mo 0sf}UEfÙ%ձDUFn5I``AՃ ̹ٗ7rpDĉ1rm\Ycҳc-M >x&GY-FQ.\ k˵u{گ랩:2tu]Bۭ@ &KWkm[aJf].DE܈'8[$2=M;^{{h?)X5RCVtcy1+q\paawLi>>,qWߧFͦn+zaHc :B!zEH=@:1DP`-`Z\CK3hpRJftzM[)a,s0OI)z*{Obe(:D4XVuv.F]I $qγ: fwffUDDD3$ 8IEQi"X;\ 1<3r<޴Z BS~JpFx8PR"7q1gԛ%ԗ.GV$D4hbb!N fbb!X ~Gbb!aa 1z&A po'ŖciMI1%aǸP݅@1,>&ai϶cZ*Ѹ|YA/Z2;in?}vT4L !hnDy3?OY'|YA-Q9>3` ɜ#! ,>97qQ\ . P^Sb3g|pčN]0rQG~ #`m(fZ?V/! xqTxA3t;씫E+Q4Q/bL-x݃ @^J#Cg%E%,8,ƍS fb=̀bkve4>Fl !9 sT+Ysx{0tM,5#~s`On>IJ7~ @BC)|}̀5+à$8gݺRAh0QCw[. @ύu1!8 S0o%41&nvQ/u Ũ NHtrj[mx5R qAJ >‡& ,Qp1&''! ̲ &цsx2&l(R$' OBŠ@a,9$$!mh"\I ;\Qe&:" V3(Qgh0#Cð$ q*n853] 8>/l'%U0R"i btC&y}! @' 6z/x$> >,7Q1p0^8*g^͎; Pø àd07{@"I1 bpKd@ɟ4hj?Ҭ S>I,O1At5?|Z6;eE'lq8A--J$JDm-~7; " Pr]$JDmvO6SDJ'v3w0uL 4"BηC~}0TB=B0$"GP*~\M NO}".*jQH9!OML89!dni5;  850LlrGԢ,CKBPۚ81;Сc O0 N~ǹ3>!?:>EQ}BqҊHܯ|I ѿd HH gu*zVB ~puDH`78 ǎBP*BLQd' N)X@]k 3Tۡ9TK(ԔWZ;C &:6@#/ YFAb>AMuD뮪uHY47:uM'A*Yҫ|j]::jΚPUwQհJ@Iruct.bcl@:N4sJUR'UH*j7ꔪ: tܪHH*J:jhurC<~&::nfQ:چpUTU8wW:Uh|5uIuMZ槩s9FHҪ5vUI]@:ꚨW@rKҫDURNj8 snnTJЃ ȵՐ@JP4_bb!j [bb!t! !Ba x)-o`Cb^}w44"";Cڿ6MAR6n͇IWquEpw$aW05dw`7`F^4^//ɝ. pUAuq7ڿp4 .:: _u]&: S_Jou_x㣮NoU]uNOg_|ZugO?w?WGGW9q?\UMW"u_]?Ng_UY_t$uDRtt?ë?Dnq:'JG]5\Uys_Ƹʿ|iRZU{6LtGcGW-e9FgW)Ud24hUB*NiI4#S3M߈!gD2$Ovp-KY"r{;N摚YH)$jiǾ۱cm]*|Of51/jup-jk@Qŵj^a5[b5\M)@&tC?O jSǥsMQy2#Qm$IreKeB% з\2tiɤ,[$iu U]hf2.6Q UwffUD333m6$ h*( ]%ҚI0<1,L=tl}T" jcB{ziDUhq#~۫GHsX}g5\ r;_ XIZF|ܸ}h*+^9G18  $" ( I@4!610J,)JUER)JD\)rF_/ܥ `;&d2a\'ayt00:@BC,MFA,5  eƞ/Dp ]\`@, i``dY-o:)H".RJsD$  %%8 Ӏ&I;vK`g5(p RC@ 4n㯋J@/|`r1d0ZqJBUC&$ OGR5TQ5 s딥'+".RJR")H"9aW ,jPP [G)^B @M!%Ղ@4(xs8j>!<NQ_0g pi_’Jbb! ţ_Px P1i&` @SOB5| :6CnGJI$ H)p@\"uћ$$Xha'@r0%ƐPpԐ/P NZC+)G,40I#pN&rWt;h3@|!d( Hi&y$44 l`8&tP8 _@;rMH͐1,* ep^` L_*qA&26L Yk`xP@( d^O(uk~`1 1SěƤ 7K *L&fC ! '#R–Oׄ`fdL8 `T PQC0a1a ߀' pwd@²{ZB9 0@Hē hÌovIK>@Hk`z%Ǹo{A4h ?@ H!}Qc%IjK$0~Q [@ `D0ۜ<uF?# Bh膌M$RO@ P`X7p` =@ RCčlW@PAPPZp҆ & IcUX(ho9, Bb]4EP ;Ȅrhi@(0'a($(w!+gA+5`@##@v/xtBdX&4Ɂ>Zõ~1PL@,!n7a.>0Ep*8jK0PMN}@ @0 .&4`0C lf&$0t $?D @ A3``΂AHIX lB.Iz`` C C(D2(a) "I>&P*&$3$ǹ_Hnx% d>43f&1)*S&|s`J^ ftPjFZJ&B N(4%kd@CMYuX  PA 0^C!@G (32  +L LH@~`4@^DͶ ,!xZ 0h((M]!=`@ , -HЃ6dR3B@@8M KIc hAYX1@3|膠 ,  j)@B@0 @.Р@[f]@5A47e)P gP j"Tp ɀ',B, @a 3_J9kߘI#ޤ  piW瀯RfF!k԰ @b8E`FWW@ `SXawP4PF pL +R)JD\)rER`0 BW4BJC9+w', $"ɩ,1 d)+;1&DC- d_7B1`p `Uj@`Qa&`.03~Bn@*FB4PI` 9ep@ @ ; Y&PI9Obb!! M1 :L,  J`axt3n%H ,`pT r4*7d>iD"X-8( O0fA:-P ?a, P`o-(}#> ^ \4b4]@ P 8!"4npJ(45Xj2 cBu|  QLK ;`T7 -#˓I^t^/ i7l ;4 JDLPaP bJ&Xi-,hVI (K@v[,449ݲ^ F &#=t5@`T&I #8%%50@;1%)C#1xb@a7lB_v`!!, T 8a/~P)hc҈EI92 P#@ #R=@LnY0 /$v0?ԆIDK+š=^ @` RM)$ @T 06(`d INPcH 6p#YI@ GD @ Aާ=8(M o0% !/$ #R=CP@3F2(iep2'ܐ@ !dPPh``Ġ0BhQ41%:2wNdx5h`\ ,1IH!|~Z3w C,, cT `uDtPCXi,/  <&5&X7a Xa \Q@Xn` h`!!:&*J&:>% |!@G (3@ @=&4A$ rA` `r5!XP/U@PHlr" @'Gڂ`& @`fL@va:&σz ]] PCGj  Pbr@@ *@ -y"@ n8>&f> ==:&( p. ` ?, P#@d CP7 =v@0"b@MɁ`4RWH ` I41Cdt100@ @M 6~q]@x{'@<R`@'0a@1A@)QGn>;p`&,;΄$8^0`oeCp NߩYOzAD d p0 ҃JŲOšW54H  CHa @bIoÎ #B= jMh fI%#KZz  bcI+, |CLCA(401Cq56'I_ _ԐtB Hg&rɁqe딥*)H".RJR")H?h7xJR"".;ѩHjR")HJR")@rw JR"(w 􈻀 CH @@ˀa @BP#(1 $@5(('K(-H3-zx@3`P '!.7d5~Bi8 {Z ~hBXZf"#m@ ('7;V@=z^dd!ȁ@ !cKS[WGQJ8č*GW+_[pr{FՊbbh]'VV- D9Nk5dœ3PV_YT_ya7 B7MFk9#|B[b6"z1Zb1K%vKk]7a2 f.:Ӎ6rFCztc|M:2>6E ESC9z[FmHʥWm5ID#߃ v_*k*Q#)Ύ̮3B=[NFAA)^!4 wfUUTDDD3m"J$ ivzp 3M4MM4]vM6lmzm4mwlm[zy$bYTf'[] D)]l<֙:d6y)ANGgs czcW89+j͆fT%X %a]~mL~&vNeU4"vl.~qWY%mWb) ]@Kk*¬,Kw%,2,7A"cF*Rʡ̊l86H\4b?^'IyX UpYmqtVhꕺb'u8JnSk@%EͿFKK%BHkQW j)ȱrUꭞ5p ihx鴼Z![硪E`tl6EeHVyeYYQ;J!գ+2Z2.P僨pO﬏K0B%S[,)Z>_F|4Ytg}Q#1mhQnbD}Am uشZkh,Dd[\ba[ Y4Tm:0Z0,}p`M"/C5YzbȊ g$GlS>ZE!7FE R+2XY]fcX8U\Zf6! 05B# T"7rߍfⶖtjZ5&e֦Q⚨%W`^*gv5CA.ׂRVٵMRDMQFIӢ?:/NaQoS_AUIlX%lYNƤud  UUUUEDC34m4(@h$H~3 >ߟ}ߟ~7w~ߏmofx퇙c*dttzEx%EAWTmj,mJŇdG2pXH5R \!tk[m(g"EѡHuΞI&ZTiN5"|',V` ELY2]vXu]Y(4weJmҔ-7cͮoRPup=G`mv=V2eե&!4dbb! $R@dƖM,-QK.RJR")H".RJR")H@ @k&p~\qh@>'HH|/ştZ@(!/x[@ jH @DX  &\,@W |8+jL0(h `a{pQ-(v_B`@  P m C0!{4pL /t0#ܠ@ @ @=&` \ A&$ ( e6o FH @3@1fY`tN0rKCB`c(1$|h @b (0 @$!p (H~ g@3YטbP0 :@a`;/ B4d((&#Cx p^0@, %AeC)#8 ,t)*$49= ` (0i ;_P @@@ 0@/8CC@@f& Q8I9  @:M@@C@b `RakB `Jp  ^M 'I4P> &hhp(JO($tg,X` Q ;txHO)$0C B-L`P AL@*` @vPӀC}*O(p} -h fFC,(6 O6>hHCN Kh/200Mi0> / 'P@ C.nx` x, `j@(yj% H11d-| $A?~0H`c1`7&h5XP +ultQ $R@vZ ̆A؝@, H eC.&Ra;A\a0~ @3` z+H!T 3@K&Y@aEaN Hx |!`p@ ,CX䚂^X0(* #|guAH,A\30@zd@ @ vAA BB!@?}X"@ `BAKw(i58`E_'hR ^jpj T@;+`jF  R  h n<0(0꾬zN`  N|qdΑ@&(` ؆Yxa#\@ @@e `@{ !bRjM;44L ! P)Zb`(H &H@ !Pa5%dRWQ| ?&Nh 9\705XPh @'(=D05 !OA <^ph 15 T L?r İ3sh!@BW8 z@0%b݅̀./X̆C92` vQ44xA!wA3 @ AL5@50W!]P@H dF?4 p@Xi`P@!&ID' @N &r@C e($lp P~R ,"g-H B d803` h0 8HaD$r`hJ7;ݰ@@4`xj $ /,4ii& P`GA[+Ux *@ p . h`2 %0 E ^H @`@N IIH/p()%0RX Ȁ Sbb!A S f`d  &^q4 "3xP@@ ` h&J &@`DA1,Xi3JR6@0 @ @@}/hC~*a5 1H9A2bo&4:(@    hL!M0%; (Y]@hزtB j0VYI-ƀ@,Rٹc/Ƃ dTjpH%@=`1` _T>z@PZ @!H K&<G1!@5ŀ@([!(-X|4^Lv 2H ib@NB+$WZ }$B 0v`T`=)$x%rixh• 0 !0@'q@$=@o B4@:VBHx/& 7rh h!b :PՂ0p`@7 BM(82a'!'叼  @7Țp` @v ,i7W-VH:h10]&@a3gXݟHGq8 @4@Z _*P @ ɽ!VHAɈ  L bB@TT &QI(X]P@G @i% 9^ H@0x47&`!ed*86 :I 0bS5ܘ )A jH`;Z2`M (L*J@6 ;j@5 @@6;+hCg(rRf6d PIha4Xah} DX'@MpaMmm@\J\T 3%h`jqY hp@B!>KJH@)[~R /0CRJR")H".RJR")H'pJD_0 Ax V^ (2:02@(`^ @uN bR8!TA\Y`bɤ?0 D၄mh}s!<( f  fn,h4P0@c `F N`:B!z`, K!D"aH0rfQW@ !@&B1$i45# ΒO$ TZ *@ @`^&Rh I@qDԓp:P LM !4400 n ĵKF$0 ,2!܄, ,``krSY `==`@t䱯x` Hd0(ptDhi1l H 3R`haiRr!cT 10 e`hR@BM%`Nbɠ&7 %VXaw`Z`5 !`Mh@vC,!BoHɾYKP 5`p )Ӊ:!H$g¡!,?jX h>p(  j^ 0T!0L `j1003p!|p$0@d0(Bx0 Xo0bP/y@?!vJ&ԷB혖5q p~p 0X ')V@tVx N7>0B0QKb%gޔ`rLv,@@*r@`007 NrgY4 bɡ>U,  Tj@B` MP`h?&$V}Gf8 "@A\Ě{ BMĤ#1a$2nkibb!䡀 3@3t%lY0% E.-&P !H`25NKF@Pp@ @' paM' B bt@Lœ@bKHj{g@@ <X c4jD LHjQɤW:R`;!bt$!`d‰QJao1ؐp}@@?<@W 0 p+@Nq@&I4`&&x( < d@ n$x `v5:04 @8*`;rX KrJCA894b@bKj@*7&OY4 x"~ K( M \#,` 1@KS9!t @@@{D@p#L#,p 9@KĢ[!Wh'jiv`L8X H9sŹ> h1 Y`bR@:- :Hh`j@LaHNZ ׀ g{H kp dPp` 4 ! dA/M&#T` B VbXZDHo`D@ r a1i 4`4`LBAZp@i0Ay@  `P(`" )c>~P `1$"v7@np7(ayhN>p@< @;+FraA@/ r [J0aC  Fnu8x { h@l @=, ;lBPѩ &_ :x y@2 @F@b -@*zL V@1&zp!P:emHp(P >, @1 X eJHBGz P @Xn !)4Q±@@ @JT %P  :&Y퐞L&M ב@uN @n@ @ @1&fɅ Ar=W^ @4 x3K>!FK&3(?JRR)JD\)rER)JD\)QZp  R^4ЃӃ5}04 @0<4V/`@PP!`*MBi 038^Up@ A @ dU`@:8+I!G @C i19,O:W@~.H@`@ !@*!&S@!  jh .!1@5#" 2#S@ P@ x Ha@bae#wIH<`&&d$"&Pߺbh O: BB@#@2&\r W䤨| @R0mj A|(dpAfMR@-QBM_"p@y! _X C; X &@10 `L Hgd+B(>p@ @b jh@4J;$Џҍ7ι @ 4 ` vX@.+vIaW䮢^ h!b `!( m RQirY 0N@ 00@ 5 CP,V ܒM IP@\ 4j0JR,Q(GT!?~\ZH` 8 @BxL>hh / @&'P@   3@ C (0iQbFgl_Ǿ,}8 A$g0X)vhR@&!$4I4CQЂj02, 84&HJrSPҰ'CpFQx@ p` 4bb! vH`-100dRvRA瀑@λ`V0?b` @HiKK- F`Aע @)4h@ N@ 8)9v`@k  4z`+W@ /Y@&N4 9Hi-8!sΨ~8B!0i0,,jP @8h A4 *8T pM 咊&PՒM $KM@@0 6j7?|HZp ɀ&g$ZB@E@ ` @@J `i:NĠC 8 v݀ >,!;Te$ Q1L,g +8 @#) ^^p 5e4`|HE2 @@@Z 4 % @@(0pd2Y`\A'A,%A !@\`/P =!@ @0F$݀t`  /@,@B 'jh P 5!  3\ (  `0!  @; hIm(-Ԍv:l `0.A  A,d̴IT7 |Y4H@T,Qg;X @ i@T.@,ZI @3#}A, PH h @+`` P: B,0h @L~akC!F@ @2N@0Z`! 1jJQ4P @@  CJ[Wh "e0Hp*PPa`TW%gl8`@kp@B @9J `!p@ ` %M((KBJ%sZ+k!h @P@ p@V1 @h&LB8`I@14 &: /oѯ?䴨: 4( *qE0 LC !005;2JpHDJ`Zh4 *LX, Ho):h kX *8z 8Xz@KᬜrLf@1~C@d$TR?#CN`@D`5d, @y$Y@ ,np .Y@ / ~OoX`@t0 @`4 2@L2`c:=45 ' @ `CA #Ӊ !I-wWq9@ %27(w`'Wvxē pӃR[c4!ɀ p '>J ` n@Xo\RRIHj\ :;A1A(`b(~4RC?+  @x^@y(3XĠnM- @R02  @0a0 rPh<0BI !{tTI@dnM (!t`F+p2_#=(fBF(Pha0000!5몶 @0b0 @A)v1e#3,wT0`&0i-sH.R.RJR")H".RJR")H`@B bL&P(C &HDұdh`nbJJRrzP@ ` .Hw 7 h@`\0  (!Зt*o4KÒ3?o}0@30@B0 >Xp0BKG) 7]` 02 & @+!ZĮ|PRE1vY4 NфC ,HO{_'mBbb!a ``@ԐLopT4 j@3 @B0 <Xx2_JI T OG& Z 4|@ @5K p68 3A@%N  & CL9BI;> I$d>4>*K1v` NS 0Pэ1wl^08 @ <0`17Hd|Y5 |f\pR Yd Ԇ%:>./P@D @@- 8v .| @:(L&! (( tA/@+ @ $ H` /@ ܠn0^nb 0?MFB5f=˴ ,MT1*)`LjIPM(Y ք-* H`&&B&B A 41= @ K 3  4PQ7d!AI$@v2@(8 Zp %P2B@4a`"၀!&1 җU), &ɸAn6ff2hP !2 :4 ew(LWAu= @@m@ @ 6%IA!&1 'zR Ri@T40M 5 T5%1 ͚8 @ @@0-*0@?1 T@1!v@ ɘ (4g[ &?NH b@cw!aʾ V /@` ',  ` 8xC&`<Π @c hPI ;d2h&bY\ĖKI  1&bh(rPlzdW $0@0@ =P@ `h@ 0Hq$@t( JJq6?A"ne&'}`~:A~RI=1@Rr&x"D $TbiJRCp2M` kX 3&/X @@vyEw`uw$L^ bn&bCOI7CPR[$')URJR")H".RJR")H@ @*6@ (H @bl `PĀ>/eT#L`7LLbI>QDG~N'Sl7/s4{FxK@'@0@`!lb4X  BlPB7=Hp'ד J =R ! 74 $f-YJK= ^ -5J`Pn h@ޡ>x5 iv@ -$H@\`vCI0p 0 bB ( @ 64! b@4 10 vM( PK[P4~4?<LP5i0B0 *B!L@ $ PK҃I3cNk!` ɼ 2!  ԣbM\b0@@(M,FJ[`;_"t@i`~P @4nX`' 1# ܐ P0e`  4fB+l,[h1!`ĆbkYIF-gp 7x`p H$lJ` rbpA5^[q ,@$6AZ98H` d0%\}d>Z(KN;p@-_I\BvO3t$4R JhZQN^ 00@@E( AT5,@; tV dd!@ !1kL\}n-=}ywwwwwwwwuűlmm||kZ}}lwul[mmlm6>|ֵ}wwwwwwwww[l[m[mͷϟ>k浭}w[űmmmϚk@ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{A=bb! !  ɹ`59wA1$@@ ,C /`]`^,X`B(>` / 0bC!`HĒ2Z2T4tF/~ĥ<(@)d @1 -0D`bxC,B 0V    @0a!M #2EXe $C@+ bZ@I(Ї@g?/P    #@55 8 58PpK6@)@Y x`@\ɡ (C@PY7;!@7J@,H paAԠ` V,ᭀJZx|j]pA A.@ eA#@KH@|`bXd @P P f^ 2`T` `,43L*uȘ р&!:RFd3+$e㖌˿K  rC ! 0&; `\A biXxT(AP @5A`P0 04=P0-X+%H-"7ͥL 3A p@rjLHL)Հn@@T Ph I9`P jLX+P @) @4*Mj^Rъ,<0%A- @@P@:[P@P4  n g5jHp@?4 ]1 'IHI@&@n}wzti(` v3C_%BR F ?&<-  N@ i0 ;XyM(70be 0@B@S@/!(2`8@nhq P0*B?;y ZY(i>Z1.@sD8@ Kl &>&0K,ԧb*@ @ A c\ɈH0YdbMB98aD8 91` W ?/ z`^ @&xP P ZC@BM&00C @G0N([Y(3 @0FЄ586CA  % jLd~T` 3PA(@* ,FĵqܞN )KY\)rER)JD\}  5X AV@/P  lz@7(0su#X,bXD2`hf0231<KTA/3}Pf a7P6A#!bLJ!!p 9/H!{ĵɣcR`;A PBVRK,4_R @J" X >2 nr_)^,!L P :%\`\- @@w4p7`T5<`Kc @@=0| HLP` @_80| ;H V0P``3A, !` W&e˹3v p` Pi0 Y3Wʸb]`@4@@ O(P@/  @bX @hZy`$o&L0 nLm% @V0 @ e ɤ$18 J7g#0HAj0@ @ nP@CIg54- @$(`p*d @t"i`@&B4 M͋0oA5IH @Yj/0 Gw@A bZ@-H "7ԁb yH@Cbb! A@?X`PAD nq400\Zx I4; 0@=TĠD@ NPD/p-=RAH a@ 293^ @`1>I; @ VFMF$BZ% 5L5/ @5N08X g 0h I006h@FId߿:@  |7G@|P` ,$ :*d\  0p.^"~(`\cl.^ؘ8!I@Lra hA$P wIԻTX @B! dRP0H1ٹЂa@ @0@-`r`rP R0` H b xd,Бwl0X-1 @f@& 0Rb@ 4@ NQ` P2_Œr_3&  @2 @)r*00R tB=%d !< 0 @4 [p4 @40 BԠbVOA0`UAY&0zvp ɠ:&FNPhAPe bh`iCz HIcL \ D0 % `, 3 b ` 1~p!xC!`جMȤYH~X . ?VM @;p&+hb_X40X@H+9c  @? @ J "h@P` @EQ@T$bR@@hF $#*^14 p!0+X !'. PJHh!|XJ Cr2Ӈ@ oԀj0   `@Adq 95M&ɀ 4.A pp2\XNBC7( T!44iKP PH :  `T0@ @@H`;&2xda4@ Hh  @~_ !KlKHF@00 !|e2 M:!PbJ&g#1f.hvB 5!  h@.  p,BkR O# _t" t THP`` B(5 0 &p . ΀ 4ɾ^\@< c_:t'·1=1 6@  P>0 4`5&p9`1 H @ @vd%P KЀ2WRdo@ s` 3P2Ԙ@F$ x ə$  Xp@j A<`(R@8@p1`B0,EfC!Q;"Y-2\|` fxh   j]|g&Հ& @;!~"T@ @/>(P` @ s 9y$逄i+ TC )8L_lzIb]$# 0 @P j``@HXbj J  E p`_fAl(A A()  @4/j !&+ @e3Դ bX I [`xQ4v. j(J %dP}HX(` <@ @4Lv (B!(3CB1eFAD )& 14AyJd,A蠁(V h(i.rBM\!`$2u(`k!}nbb!  A$@f`V=2@4)À7`)i@'&C?w 4@X f!@5@ (~ 54 @7: tӀ} zpZ ` @ 45 6j 5I0^hA`. db` a5//%m~ *p - R@@P\Ip] 0_ QJ`;`  a)RC|VMr6v t8 RBl8ŀa LI&1'_0xx bp `0 .QU "NL@b 3H &&TlP rHu) paHPC&&P04'dƷ9XUN  dB(.'  J&$ G`*0% J+@`8 @@! @\T `e h*g!Y$_'u G: F1D>CB\䱸w G'߻ @r @=h  ^;a!p y`S1 /Kmg @ @ 0@` (!A0 `  5H 9?^0 J ! JၥjJIG7L6`2 4 10@0&3 &vґɤ0 BYAV*1 db?.\)rER)JD\/j ` @/p '@t`< P҉`&`B! G` b &8ɩF#Д~*); t%HCt 3hr`1 ` ` An!Xie Q@'ZBJrpWw3Qiz@j @ 3 @ $w% @@rL% @85J;`@X 4TF &>!2Rr@ e aX` .\M"2p`r U=_̀%@b"z@@'!dx'C bIm8Y1Йx<4Œ)L&XSUd'(q @*f5@tx 7|% 蚄O:` 7M@  3D ;z:&HXbo8|48`;@i!CH` @xM/v 8 h .2# RP@qTEv4 (vOA5+>4&3ha` AYٗPY@{ `5p a g|@$TpP Rj=@`lP0`x @- ,O@C *(L I 7t$0 aJ1apbb!&A  ^ x32@QaA0c dkH  g.`1 ; D _ɠ05 VA'|* l H`P; Pa4LpZQPY".)\^ )h@ $ P `:$oXaecw㮇p@RAH KH İ j%3?^Ep'` v1 -&7b2LH+|> BH X6^q @64 f"h^P U(pj@RX@ # h @K @:D>@`'tC 4'0 'CQlJ` #  B,;7!L!d%`@}N@_2Aˀ'Nƒyd*o I@Qd05qd05$"j7&אxTl'a!@ Z lp  `0jXb&#mp @>`hATp@u@ >! rP^|Ɩa |p   @<4X` vxt,Ϲ/X0 k` @@2Jj)H P Cw: G- AT^Ŗ4tRK,vl"1@j 2`@0( n p(z jWY5E@r! 0pP@B @3 D lBBxda&@e 0 0 f7.@; (L %kѩt$ !,* gp@TA0`RBφ@ bXɥ ? PB0 %~B 4 Phen 0F+) $( QAA\h =j@Ԛ  J 1D2.[$-C*.@!Xa^"23ɀQ  4KH<!4 @< $q` `p8$(jҊQԨ1%3N j` \= &H 2%`@Q@g 2k2 i'+R!nzq?e&<L `@l @& i ` AP i0@.&d / /$O)0 8 /. A@  E50E@ @ ` `i@ww C k B4 , dҌL9ah!@ ("T 18`>!84 C@B2p @!|Q4:I\0Kj!rZS,C@` k\ R d"@PдZ4tIǂc nG.)BT$4 l=`@` zPL /j-:p* Qv@M @(gZ@/@LK"`Ybfoxx 0h e8 Zp@@J$lC&>0@NɌŤ͐V >@- Xh`@tX @`#X`% 64 d FM  R ,5P00h A4Kh8 @WN0 ŀ+0AᜐЂ !c&!f~ & ņ챌5% ,oTؠ&O`B t`4@@!. !M@ ?p A;Phv NmĀ@ @ +x$ )bb!/ @ @0 ]d(Cb4 d)( @!ztxx`@@@@\ `D C+0 ( 0H*.`@`@@" 5O+(#dB!:HA#8 pP:\0mgļLIxZx\ K@ &@8\` 3fB! ;+q |#<` %@ @6*Z @` @ ZC@vB-ؗ+1U@ 1`@T3!<8h0P* -)en / $H@j @10 HH%3 C@07nP@Wp  !CC C咐+W<_@@(4pXNLC0 d *QDD-eϻ&5!ҋ -r)H".RJR")Hvu蓼p@@j @ M p@E@4*30&P 4 ` @vMrhh ,0dD  @P(XbO€hbPKeo@~'$ @ @t`VrL1J! ʸa4& :9xx> bP 7,0wɡh A.(0 Ed ^5v@@aC Ԅɣ0!}g @ `h @'`np! Bp@< I@d’w`M,$%7%0 A0p j _@00@9@9 ! H`T3L +w8@ @=  * `@@L( L &H@LI\(l$ P*LIx)ЎX 7TJ @F$@ @p @ p]N`J Z(I A @`@, @V @@@LP @g b(DA@:@O3\@ @4 bh , `@Gb(d@ @4  $Ƿh @ "f@+A< h @1 !Q `;&,@g#@x4ɩزX()(?OBOP@- @ #pp@3!$ H@1tH@0H@NXok1 N P@*8@`@1DXA Z bRX`0(Xw&!Y(A_0d  a/LEL=  `D,f& $=y p 7  M/r@ m`L ɠ DX%6 OY`7bjRR[l\`» @L<!X& b @X: CId@4A@:L&f) P 2P 2 00@F  ` W;xA :vBAa?`D]` `?H `j d0x m 76 > \ Q '5Qdw@ځ@b AXo3,b@nH Sj@  @ Q Y 0 9!jLtlfh,    C`MC$4( 3i9Wz   C!%_$02<0 AINl,@  R @  Wldd!9@ !hűl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]2bb!Ba @1t@ PvZ I`Z`.`@ t2` P0@:)R1Om$T (ZZ Bs(Pp+R Rv&WZN  ( M @*p 4HPł`C$K-!°CVPЄ$@ PJ  Sp@/f@0(p(HP\A&@``0LB( I(03d!!) VY4vM&x` taa !KB/5fPOL + k F@&v A :0?;!@3&AY THdԍt0q@.P @=%@!8h 2Jh5ņh %Y0BI \7|ǡ ?o06&  7(& R   . (@h00<@@t tə%bKi: C|JJ@&  `P!0WH0 x`nBCWɀ0t000 4̢a ; ( :  eb&Bp`@1  P &A{( wA`$%(% ( ӷRY,SLJ` z@v\@w;a`M` T`  ݉Sϴ(l`D D@=P( )!`p B  @ @` {@i+X> L PL)AE! AH1Z p*C/ @oo n喾D,G~AX K j <2/n`@,n@bM& lp Y4Db%Sz&`0@P@M!h/b1pR4 b\8`LTY=򝶉) VX@@i`i0)ICrJK[ '_ @E @6j; p(P@0@` 3;z0a E M22Rp !,ᡄ"bKg$ B?# r\)rER)JD\)rER@4`@   b@)j  j@t?d /h3   A4 & 0@ 8|.w( H tq1 B O侏C)lL&0`_ZHj B @ A h @3 Bxtܔ^v`@F 0@@Lhp@.x X j) b0@J p2*oekq߉Y`N T`2L!a1H!a$?xG79dh @2+ @'!43b & @t`P 05#.pZJ7d05XĚ k&bb!K !@ x 4x0`0@`&!dVX ٽ_H~Q D@QHk*I VrƯaъ=}b @fH@'dL\x0Wr,H€ @Ʌ`+I2H%!CHe@W  _O뿁Mmzo|tuT:Dު7D~O4TJo}.zOө:gP}U?zyQ0y^˟z@= ru>={S\ψLӼ9Uso;bP̞̝&LM=ɋ/E[MblCSv$D^wpo_a&ō2t<'Su<U=u>O'\StY<~򣣩`4[×?qz@=}>|{;xsȪyZ:D꧑'Dz鞲u<:Rzη~Ss<:T]3t]o#ëOΞ:>ςt ;r<NҩG]=5>\{t*\TOOOu<@rwNP/J>uT᪎ycgT座l:!OZ[@W p #ph59F!D>L_ FvPv 8c *d.@ ҊExo`pCDN$\wɌg;v ^SBL:`$|: C 6l8 s r`ŏU05'{2BH@v4q?1Y@p_000~xbQʙ\`謑*a4 bP K#81,lxަP08[R_r)l-E 9)CF `50?0a/cʊ0@eU[z/G~ML~` d8)av?}a4x 4XdL4*o6@0$ *M @Ty>&x!a?;!@1!RB!وp`}S 4WepĴa@D||>ęĴYflIጯ+cTvVtc*q9@vP[,F|,@}(A8¬S0Hx*8^VgW l qLJdx`w(;O;l<%M-ۯXo]Ln'>70'7NϾK:۱gѝ e;|ﳡ-TäfFm[cBQxg^ao61=3u߰ǑV~Iݺ!J_QU1{v6I~V:>nn#8ͶvzͦQչ ͿGaR~Wcn37w;)pvKe9xq07Tgn=-adxs9؈fr 3Fg'``8:/;>|U߷wns6߷_پ~IS3`pX<yv&J=j7[03N.g#lN2I;q3XJL9m䐃>Rnx>qN~y(|aTvUDgF1A#Kc=NjWwqDž A"QTH09qÛ"OԠCȆRܝ`6xX3oen'fuPq3a8.jbm6Ӭr7=j$ O+˜?VƹA c m;m/Yֶx~_gdҗug>m7vیҕٲ3=YZ-Y_?<ѧAͷ;)'׹$Ǩ ςRX#;nu3e|4Xwvo0lIb=fun~l9?+)[j$q{Sܴt~)cǥ G$a찕}oH}ݻx?鑟}]e3o))#|#;֦FqDM$_?Yv~Xt|ƨpb{l9Fv69S^oݍN~m̎s`իI|O gj9WF9c}iqLZ2JPqqZFƊvs1l3:=39؜v7PFuC۞XǨ_*&$SO8/? YJbb!^ F(>HxZDpvSCˇb9x,j=PqSt}Q˝*GM~7I 6m6պNpCu|[';Co>Vk100I{;gTFdqR/{ϰN33T]lz?llb1φ|r ƚ>$wQ@d;Fel?: 0dK1y8#{g~'9l+THSfX{jkTKq$V)k w)u{p<%qd%'iUIƨ~an~:'?aV 9:֦4m*b\ s1([jAQ=ONߎ8;lzݖEC'b){7Q8-VaZ5q<,*Ft AzqgM0఺X#I)La;6JN;ԧoÉqKRWgat; ! $Ru"L5NJn([/,=Yrqu2y?7mqh9 Vp*=[[¿8R'ezj^q,[wcLa#Ehly$R֣a#S^ZFSa]49,/c?p8 A'Zp*fs,%8@gnm9?1ަ':Hv<ÇQE)fe `4uZ1]qN931B:JDPyaB&8j>18Su k==bW| v[r25yq, e{~Jn߯s8o~Y*KtN-g.uf3^ss SZ+<̿=CR0<9nF;W :3o9(e(~ږ9nN4. ' 9N9JZ;8pY?Ç5+7umIJ_sbpt$ @-?Jog #(IXڇp@ j{ķ`6Ng v;f1D8Jx^`jϾQ{(PxS6;qCI^N` <*a)G =.N@s0dcp s.{j:=xSsǼraHs>|bbPFjLK̳UM1ÅR5xzq b0xab*`,:?`Q:HՈzUQØ|vBCzf/3TC9SgÖvVCL"J;?>lRIsEQ;Ƭ=T'@p/Տ=G&<, $̣Vng8V T+ ;?Y xL ADxЧ}z'G¡1ڱ‚ë2(5#! 8 #Gp ÍÈDbxCHvͰ's0sEH7Sx [arLPx g9"Ex5NǁǬ#ea58Xp`D[MI="8 X,qTHbwS]Q}ߊ"SxbEAQq=Y j4M/%@Py=a 2zs>Pt&7 Q_1@v 'WbrC x8PTd|Np X\|4:H2(]Lm7x DR.f>@j'2rI #o+0 g<2HC#HUh㈭5YRR 819Ih|~ 3I< {|y85S/Ö1ҍc$R0OI.`uhs0umW#`h1F'1>Nn:`(u`Q@π?E7%3\)ŊuV@: WRR3I~EgFb ;AZG9!qomMx\> Px\Nq^ 0`FI: a^fLA g`@7F˪ #UA`xvB'x6qfAUx8c[}2iJ: 8(\3*YȰ;׉ #"Luyy:H"jE>,G17D &:x $]|&l @^`Pq1rx2=:@p<$'ytAn" טq2c7^( @s_; e`x<P x * 1(gxP D`xw߲p f+ĎfPUo8`a:T}x<uh\ c(:HSx:H@.W`5hP2 . y/!ټO`0qD'ˁ]~L*\O6LPc`3 `5q_36ML$E[ZftU8Uׅ 4su^rx@.kAG|p5ט5^(<p׃e((\EWa˃b ]Dpc-x@,n0?*, &{Wy? C:07¯ dd!qA@ !{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI xbb!z ! Axux@M`rY^ AgȎ&CGJ FW@GD@W@(t9TPګn _;(aJGW?-2Ƈ@/H(>^(j@3m ^ xx Lx N\}"}r?m^=@jPeb{yhטC@817A@#&[טq Yؠ &0OQ^aR)dPAy4h 1` h@; TAj}^b#8o#.H  3"&Ley$ا@ G@UEEIW8#@vڼ¤ !g>I oLP@uM݊ x`^ט [S\5",q>ň` 4,D yLP07pA,TP"AEj0dY 0q}yH!fPpΉzK=~k8|"t8:.0t\A;:uF P|@ k 6)ܑ re6}yfx*t'^4A8c?\FfArA" =WA#xhkĂuxێp`l= 0HP`` 2`WP\ ?z16]W0P O=^#G@?8:^f>>052 "#}xJQUB{0U4EHYcȈί 0FEW.xP0`r8* W06ig > Āi9 op 5`F P:-uQF>x 7ׂ8 =x N#㠢 5 pq@nÈ@@@oUx6#((kaP`Dl8?\* üXx0W[0!^$s2P3x1BŔN;<}UBphex#@?@žĎx @1@Jt*KGuOJoPpX|y$pp0x1׋ >\ F2fU| 1bhU c4<l|8ba"*O0P Jy®(Qࣕ@,@jt7;^ <D.(.D{"|;ױPF< @+T @0ߏv>pjdN:Gm"!.# >(pPFm J=V*P b$[:lbx(>:7^(10pUx!Ai:hj`` @,AvP%@(|U8 @\ 01ףX@v"¨x`:9A30[,@?B"*|#\TW#soĀ:d@tAP <`WV de6kx Py1ר(xlccBmSP2 8Dq0W:Tf22@B:" > Cx*ʇ_'Xuj}^DrP`.@ ܪ:ol^4:|AG%0CTE @o " p|^\XbJ&YEBB: A1?9uG-O4L !\Mϊ%H @,@^ (1%\IyՉ'!@T M!p.& 7ixRI ąT+hw2 HskS N _(<ĘV/ꁃc|^bb! ! ?t!j e2M o0"!c)<  ZOH|D HE!#Fh ,S.I,j 6,}L!\BD& CPL oSNf'5+01&F Hh(Pegb  I9e#*ae4`<@ ɥԱfO0 ",PɅ2D5j q  9} (Q,0 c +Mܸ2*G`\JIL[h43 D4 :C6z T'lp(wS5-Z &vITD(%REL4 F>45Oї^r7qU^9$JSb:\>(h2^Hy3I%"` J$ VZOJes(b[IҾJOLĢBU%'0 iC2֚̓68NXr >&RH /#~"Bƪ97!z  *L/bI BZPm*`T Dbri&~K4`0S P",r >,뀨jwrPcژ(lrnf2Бcy!n JQ)**̳ p273H"+` Єbg졐t2P x I()uO_jt'*$NBJ+ (7#7+zg@ M6m[6 @>^9!qomMDu@tu`B5Ađ㠡F& uA(\. |(uQ #UP O=P9:Ъ$Ogf`jeT _1 2iJ:UB{0Ux,0uGDQ[=c@MSE>P0`r8 p QL t:8 }@TH a` _d(tMP@t ?0(8 |`9wPa(#@@r@4pWP@p<$' N#㠢 5Bu0\$RG l<jxj.(p32fU'f=D ~6>0 0㇞pfML$EC@ҫ]BN9:pQʂU@AG|p5(.D{"|;ՊB5A`v6` I @5@t?;YTge gx:/je>tF` 2zp7Tk(XU`:99?PPF>/"81 Y`BXy` OPav<t _0D(uA@U7¯ xu@BmSʂYr#꠆( tDAC`:PCj bMz'pT(aJ@ ܪ:42-24:| 8,p1PBgP9  xQ0ahY8t(r F TUd`E_ ?` =Ɋ]` ouȿ'Ka< 2>/9 9 [Ek> U >_‰ww]]bb!a ! [<QWwF:. e 7=| 7Oq-u;ˑdxH㣮AQ2@^q̯zNx cGDu^i>H8*݃￐xɐ?4c@w^P@c,u<u_x Q Uׇ ?Tuyq j:#Ca ;@`{222 cD"xf>׼\ 5+@4 Q"@ ҁ6 M*;y~\ۯ, 5y"tux??W:UxT@^d9P2לWN e> 1 ?1r:P8+j@GѠחW ڽ dO`oN*::9ર̫m^0 7UT [v gPmxF5^((- ^ xx*t-.`U[hTy}zEAט2**P'$?e${\ @1mhUETRDT11uEUxy$?yP@kʝ{&:H t|uڽW\.Gqv _"xup}_"OAy<&U~u6^\H}xnP{^ 0 u{X9Ȳe^h }n=P *Fl.tffSJ_:6ŸrEp$ ~y^@EȠ^@n#=^0%WY:T 7uS$8ϯ_ @!O zDhUx|€6nX`7>"Jrb){*s*W@ x80y@݃g:h!bb! u[^5 eW D x =)dd!!@ !gwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵbb! ^bb! 1 ! w p}3hJF;L41|BlRKF %쪏toϯE$5H,5=02>[D2nϚ(hHCH+n$ؑXuӷJ&Ki~*` H]L;Tgd. k@&~8 1U0 S+N䉀a@ JbAS?? 1ʀw@D(bjy)ov-9G`vWh+ 0 6@H@HT$'Q`(&4Jc@W3i$L 8%!!1EKf0 hiDvhEY-a1_=b`LC;EvFe0i҈EmAA1$_Ԥ)0D¿%@jE2 x%10*HCy-efVN! #Ebp,95?3Dħm D,BŤ-SBl. , Tr >! /,b@ @6jg\@?'& Ov ɅQ0 ` y !mTW伿fY#$l~A0ae3@Q /1(PR@ @~1 C3c!J @'@jgQ07;@hK1$iW"HM/}ټB+.hh!| z0p H}X\ ʃC{Drj#f{h2ҹ Ll^}`jCK@13c@!(Rs"rLXnb@iS4SbF#_$NmtLJ8͠ @c~@@ņ2Ku$S1A#@s5ee°O| ҎQY ߊ0$D2&ah\XjrS9csp(߄)T T옔#w L1& #>1!S*LNۿԣx\b:>D$A#hz @vSb995vp o4n!Lg0R7+7td:K1X JHܵD @'%X D(P.b-GA ʢI)RQ\tRPCx1%bMD3RmPQ KP1"Az\ 4.::PqGG@lqA<"yP46 uTK 0 QGDODpP~ud;}H14dyU:x uH[Υ:hWxw 5Q a6` glʃO`9U#`0|5!͈W;kjjԭU+T.I4uJ@RDRGTH tW}'L2AW4\WN'M ><I5 ໕\oP0aQ.$ GT#Ca8 j 0 4Nr,T3\hp6p7P@4q-tf 2Uh`ѷQnjI @"wu"tuA #=Q*N( N"}I_C9\ 5r5z9Z4ڗV@/PnP@U"G*@T`n ?@@Ea x2-CThuª5 eTPP @  9bb!A Q bb!š ! _ x+t8??긿Oo@t2`1WzP&E#H#ǫqKRk 6D1FI=U&@&*E^Վw&CD!@2#ї!T"-`x1\"LUE&BHpRdk7#1.6ERd*LQ-"**_`bɯO$>  ˀ3ΰNOc "}<"ywWOQI^ Öx^+ _WyPfu]:xxUz򣣯Wuop?]S 9^/8 c//O o <GOo;%mU;[üXӀV^:5:T*SusnTPa'UyP៧W#o$N_޺x;Uo'W*xruypEGW(u؉_a@} ۯ$UU^:Dte{*Du:˺ח::@^2 1ҫr;y׏%@r/k:zUX]ם/UyNTu꯰gU:T@޾@>Wەt hup^Px2ʯ%@@}w! Cbb!A .`edd!"  +'%bb!, `.1  !! !##$##!%&''&%)***)----010448@  })H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RJR")H".RzB8 I7A=yl<Ҕ/)H".RJ~!$`.ZYh8d`= 5Z@1\ 5#ru X8yK@0 @*1,k|0)^T 1\ U&ąKĮ,l40(`B@T% &q)IrER)JD\)rCX.@ M8:BB` @uLW  5sP`@5$8M`@[~h"b{ R4 $8 /(X Rg >D ,c4.^ $ N @4tFB03 +IH@ 8~,nV6 1&8Hf+%p`#| MܘPG$Z:\ `\Zprta_+\0@g I`W~`5[Z q@4! 0,# Q}}7{0@ A4( =HC/p`L(0%p aB`0 ,wIlĎ@>  h$2h @&͉}Z!ɀ`b@ ؠ h%6_;*`&"htB̢` `Bh 00h@ 8 a A` !@B1%_C7k%`rBr0@:!Mp4O Ch$h ,H@h.071]l{@ `/ ' [lYj@h)@/@ 8@& 90`B(іQ7 6NhqE( PPɈ:nM GrWOF]0@ 00@ @v|MAN0tv}h2jJ#@4!"*Z 00I ًBC1- @`က`Rdi7@C(i @t҃ &p'a~`p*Ȇ6!d#f0@jC!< LB3!= y*AHj`@vB @``*BbICIí < bMC~Q]{l#b@`` $b@ Pɤ2QD)O?`B'PICH\hLNR'1v `Ą:pj]7 9J0 Ӕ ܮR@@5X@!T Jo_#  ^ :4%`;&,I-2rӀWnP4">)?#P p%~c3 C@l Foɚh  `F E 8`J@h @E @) JRқ".RJR")H".uV܀Gp`P1 !&ۀr-oRV \x Zْ^x 9 , Pd҉ -)~ l@c @#D`' &h0&@`S9,HIh= \3Fa0 W(p!'W 5,0 @< @7'| @. @fOHb@dX&i0BR@PҔvNWU !xK /?J'dĀ!'!pB &'a)ļ4r Ha0!$ha4,/hR*}X@ bB;I VR r+@wYIJId96 C ;@ `@B4;& 1aĐ1@gh ׈R 'BhR{gC&M ig5')@` ɄnQ4 P <1  uif,%P j`BQ4CPP mἌm XH@ 8P&&*_!Ibb!> a(@Z`T @2&p n@I4 `-zeؤ@vlp5PX`jxKcJ:Cj8 +&Lp ;!nz\P0+;JYaa=I)p``b %3LHnJI $'I bg&›Xc 8B5T?@. @ tPJ&0 &񅕂s /v(LLH (ۯ=X @ HaTPa` HjR\O(  *3T`6 ؤ=A@8N#$h#A @"x`*BJ|YIqbZ@f|$ >^6P `@IAlRJNd}גk | A [!0pG /v(LLH (ۯ= @ x (49  LC*tL "JhbQCwtn@d : &j Hґ Ph#K `FG&X& !BX@\~8&K0+x@;0KIJKAnkGp @@.``@( 4G{0@b&J&A8  `@! `%`YX0^ׯG&_籂x!7b - `zL(KaLL ɀ`xY4 ( @L&@-PP22.r8 . @N0 jC5&hC@A %`ϋ{@8I4kV Z@ \@h 7 (g -$A RQc@Í&0 @((@?Í9p ɀX29(@ H]l*' PC##,@@`=`G ,@ * P%҂Z `W.op@:-@? `(M(haa);2  @LB.rL, /`bCQ S# AE3(<5 th(-@+ِpAg(x䞀P ,\`xPn J&1 $̀'LxhMĐsЀ=p:& {5( b27Ւv- H ] dp W 0 Ʉ+P14ԓ,!Ɉ/~ (&|@ 0 .LH`1!PH( G0 @7(`(SbPZ$@ ! `Q!P>' @b y n+vۋ0) @ O@  %` ezL;~Cw@jA(v** I(el>ŀܟz@2RBdO4 o@j'g A1 e݀n| B@@p@M4($7GH4c~L::!d0Y[H \p %*B! (i,b\ H(p+!RX8Հ34@!$I  )!%Ɠ?+;\)])JD\)rER)JD\)D\)\jR()qލJD\R)JD\jR)JpTER)FWE İ8؛\ b8 @]0`PJv9@I I @59 )e] +9 P@jPC&`P\ (7_,lpqk@PP C@1@aD$↏Fq4Bxp?bb!H!  JG:YhCG(2# ,1 ` H @`AJZ2 Fq@ (! fJ섐2L,% H!hI @jRv)H".RJR")H".R{@! @`!u@tt4,YE 2 @ :^hB,pË+r: 3;&@i7 @h`2ҏne *4@h: P3CIBA= @ @h f .4@` @ `@vX!n6X ` 0 e@ W$0 4&00NlBIwƁt $@`B`7L&t 0y !JX@^k;P`jR47.A7 3 @,!jaTPa{@i GG$E{@L 3]4Fe4}@$A(#3R\ @9) ?ɘdD`NI'X h+~@ri4 9 qB3I! Xm* y4 $@;P  0ɡa)?ԠӘQ`` D?!!<@CA 37 0@ @-0 =-8@TN# eP@`A>sjlB?P, ' tj5<bHHi Ʈ8 @68 9,@"4CHAl0j.x `6j @, 1L娔1 |ǿD ! P X h_!ŀT h! `@ K3    D0Ih( 2o ebup  @ :I Hrh<HJ zH <@ D  pP' 3@K&B&:PQXa-;kӂp@R^X &hA9& $ dj'$Yv@R @W @-044200Ph@Puh)@şr`(`xdj3$%RJ9i N-(W0 :0pdC@|' @6@ 5H`z l4 !1 -:( ^X x@1>B@\Y3h0vP "!^H$4AA.+!(@-?!x2: &E`0i,Jy%V ;H @@i4f r|aYp6_)28  W ; Ad.V<33:P@ ,@@0~Q3 Hh)#w @LMH@4Oܠ,37A\@`A/FP PzN:(􁞐)x}aw 3!@.̆M !:H]P@q @ @9v @`k &0aWT"-"|up <İ \/vVXIQ48`y@ gܾdƿ(>@ eP )8@` 1I+T!!k  lNDL @30@LQ Ҁrl=A  ^8 Za<01 ,fZI'BzTPV``  \ڥbb!Q @ 8t̄AI@: rQCWp@%$b`*C!a0R 8 IhrLnv *6 eYɠ\Mb5Ƞ᥀Ą43%,-5X jdrɠ&;>LKL h l 4p  MH8 RtPa ɀM @| @3@"hAe@*  @`t4 xkB 6,!7 URKqTnXvx @0 \R@@ @X @07@i,(Ϟ/ p@@GAa:!1Rɠ Q HD q`P4 J @;; `  2Ct@t`y_u @i@/&"( +|XxJI4$>^I\^0c*H@ 3 bI~BЅgx %3wp "p@b Ɉ ᜚baN2` b v`@2N IIc>`f 2&\)&bKMpՒ3` @4 A@ 8`&p*L)7g,` r v `bv(roHoRcb>kǀ6fH:z0?ᘆP&sIrRJ}T@ AA)8 ?bC/,:Ai  3X`z@Y @  @Bb@F Bp v7& Ph0Z@`R @@:&C  ` ~¦~N8-E A .? $gY:$"&R`nM&'Z8BrB  +hh"h(vņ\ S|pD|!b(1 `ḘVp?\iAr: Vߔ90PnRJR")H".RJR" +ґ@ 0GA 9`f$@2J?@  #F,  1p6b`070H`!$2h&$}`'bei@B Q;b`a3[rZ\HF>@ 0`p C?|@x @*90 %/A4Ƃ Q 0hp@AӀ!@a@'nX RQR UvD*IPB I4M H³#/H 8 9 P@T`!P7Q5$'H0Ce! ,) e(±-g 0/. 0` BC!@@ i7!e;ܔ(n - @!t`  P",k2` \d00;(L[$-R /ԘZF2Xú~CF p @XZT@. @bӀh @m~] m4ph  @`:@`Pf+03roRp @ FthD<>IHb <ږ @ 5$JbC0L!bBa 4i%L k @  t 0  <4V& !ؔ4 fDA $҉!5-Ї;f%a`_@\ V @3^pjMLb` 8@`ز@d70 }X "0@r D0*L MXh`3UK4;H(Ubb!Z @,f`ɉ(1hvQك/N@01&^pq) 1%!$ C}2 0 8 :|L d'rQl틾KI2HaeX B+Q3T>(A$0% \X` f@ P0#dz .) <Z@$h*Rri- ά>@ 1I4#x@tx&bY0BRz B6$P@@j@<\ \P M 6 ?O2CY$ǹ@hX ]9 rbL P bXbܖ$R@NM&$a@ ɠS%Me*51a?߳0@@}J@r=( P!,H]<-P   P!(HU)Z B!p(3( .cFqnO @2@ @vX <KH%"g%eD H`a+K$I7H4z`$UX4Q+4sAh ! $?1A` @1ZCz! )!: ! 1D);? A`A h<@FX`&Jd%|JrX@h@b @`  : ((0B ,^Z(P`.` 1~P a@7!Q-!(ձ@!A (a40 ptn_Ӏ R`((;pX) a1 ׀ia @`@- 14Adjk~( /nPf\@: @;*P0؆PAd$w k+̮ _`+C@lQ_|L+~a꿩4@@P A5XYaBn:% Md́my@P/ ```9᜘P7,y@@!c14(4aIJj1|.#.\)rER)JD\)rER`(H}=81[ A^!p *@m3JI ` m ` @B 4&:ӎ zE_gdb2 1/ IQ3N19(4}0*M&Q\M|B-,0D  ;|Q4L 4JI_m0@p  (ZB &$ Q8q,(>,%1 @D\)@@\fMA@T(&Xb7tqb`HRB(iE|.n*@ &@, 4!4z8i4"i`eɋG,0~JJGϯj`@ #Nv=` /' 6G\"` & @h`iH,/ Ah( @&P D@2 %A,Y(h Y),BA[P@[d #`p @էlrE= @P@P @*&+4@p!|ܠҀb Ia' >X` ;)%$҉0bfIc8e$?Ѐp_4H d @@\C,ɣ*B)OX @ i ( ]̐*@р C!?fB >`* .`@ | px T4$P 0 j0&l`xb@`8P` C@. nJhh@ `IJ(H@dKp@11:K@ RLKlYEh @f_$P`@k@r@A @8J `' eLɥBd%9ޠ"AL@:0v@(`5 *M)l `mA@5A\@/!L  Ia@b`+ X 5Jp@4@@ 1Pd0 R& Z8o@ `rW@ (05@PXu $IJ( ܽ7 8gQgX @ 4 @& iP@K% d̴nA,4iE@*ZBQ(ZА$9^Y Aׂ " kVZ@ 0b 3zJ 10aC~|L@w%Ah h8t@P ,vM2`i IܱSG"T_,3&@a0!P` dX5"C~NQ#A\rP  B<̠ ]0/ dep0$*!% Ѐ@1*u  ;x3!`eZ &cvNWk``w@!}o $K}`xz  =@ x`g!059 <`@1|MbdK_HIIk$¸ @)X(쀄aG8 PC4$X JߤsO9~L0 <P\C`p v~R’JCRu Ě C@P\u@\D 2/s @7(d0Jdž%roFh h 4, _6J  xa0@B4\4ܚP CV)6dFP{P̄ P` `aA @` C0j1x Ul `'+   a`@P R2! bGZ0g9XX 0`0M (`[ đ4\)\\)rER)JD\)rER'030ĘLP L&bɄņ$%  ! \ y @n0 0]|`$yP B/`T 0h K($gn~`f `` 2$&|@`0, R@n7Bbb!m  AP#`d@MA@WB@1Ŋ\Aזb04i@ eY(5#_1ΟB9 ' +.  !$0ߘ;rh e Հf @` 3$&x#8 1`d#K< w2H! I )J@!~ɠ$>M}@ @h  j 2 lpd07!g-r J 3  8L$n@v|IE|iHHc%;@0`'Xhh q(hƘ;q/L`f  ABX @vd~ri  &Ҡbp @n`*Ck1,İGݥђ~` 80vPE0C!%  =`a`dri @E;MҒ; A4f IT7`ޓxhO ߻gv"`%P 8 <B@t0 1 I4 )+!qЃ=ť@: HDA$'(7}@Q p@cp0@6` 5J9@ ()$ܲfH%g P@n@0 X 4C; '!  1h 攽rI` /&İ U4M q336N@ @ @  @LM@ I0f(C+D2f +h Zh $ !P 61L!PIOtcRzU &C@3 d RCRY@*OK:cٯӂ d $3@Cd@t ` Q bJ)&{uR`!z䀜 T=ria o-` I J fbpp0܆Y0|hf,@@0|@5tX !0$$_ .RHn" q018 /!$^)Ub b @h ph 4#a +Eh    <Ed72j0C? GN)$ɞ );P  "i`T R@*1 )!D,0Ҕ` kX 3&/X @@vyEw`uw$L^ bn&bCOI7CPR[$')URJR")H".RJR")H@ @*6@ (H @bl `PĀ>/eT#L`7LLbI>QDG~N'Sl7/s4{FxK@'@0@`!lb4X  BlPB7=Hp'ד J =R ! 74 $f-YJK= ^ -5J`Pn h@ޡ>x5 iv@ -$H@\`vCI0p 0 bB ( @ 64! b@4 10 vM( PK[P4~4?<LP5i0B0 *B!L@ $ PK҃I3cNk!` ɼ 2!  ԣbM\b0@@(M,FJ[`;_"t@i`~P @4nX`' 1# ܐ P0e`  4fB+l,[h1!`ĆbkYIF-gp 7x p H$lJ` rbbXlĠMGtR\ A@@a@8`@P CbP'؆C(㽇tbb!w 4Ʉ'd@@J>GBC@-% įƊ> A4R5AP. @.(\(HPAYqt.2I 4 @Mr2$09 :F/v! &! J$2 I(K%%CJGDb|J^3 <@?|M/-@6()d0 @NM ` A ;l1@: CL v d 0/UfZJ!$4M @f% d}~ Vy "1@P4 P@>,3Rcw@bSP0 7 İ3`@|@w& @/Ha D0 x0 #t2|MJ & bN %Wƥ`@RX 0>~t=DTgɠ68f%VKQ)  X` ;\ @vI=&I81Ҭ\ -b!ih%$i6C:RF[.9h̼t$0 @`` vXT@1A`&!Li@ A@ 0%n@@ T/s2Kc3 e-XR*Cp|^4p4@z@, p .!5&Rؤv&jRQ7n΂h _` b_*Z`4$ (5&v,@LM (cp B`&BQ5 /)hJg D - A( (wnn7 ZM|3^ n A$\ܘ$ 7}>E:40;H!L/?KT )uT#D@p@' } &1i2 @!H )H 0 i74 (~RXπlP!۝tRLR-,LBXf-~Rl @9j@A 6h`` CCI@_ЀRJ%jSAK p@`B1 .f$BVB,I1&ܜ0jrW`俰l0Dxp@/<t(p( CK-!!&PB! #'~-x@ #hBD`` @Bo! R 5&2C?[D0@@(Ye |P rJbZO'_RJR")H".qK @,@Z +P f\=`PQb`xb:ì@1,P D"x043b쥪e@@0` p 1&%vpA N[bZѱh(J@ !+q%_d)`@ @%v, ` N[79Hh//P`&J`. 0 .H d 8d0*0%1|  >@AHn&h0 /}+0 0Z\P@` LxL  Iߋ+r2;`0L (4~,v^ +Me\1. ` h '(H `@jX C@1,d @4-< 7K&C7&H e+Ri`r T2@ i`M@tp`o$5  `7(` s$zLLxh j@ 2f :b0 zUBI!fK&fł7 bb!a  ĵӘQɈ#L ɠ1- tPpR|Pj@1Eh J<$@j@  ,( p  7 .-<t~$ò *bP`DpRX'f`(@p̀Rݞ @L^IN`]ԙ/x T 0`p$ `  &t`Y-䒐Yj A `'@3 n@ha 4d RaH[`oߝ| KN#X >(pp0@B`2h @.@ Rb/^ ? 1@/lLb I&90q4 C(;$j]v` !v2AH \ hAHϰ濠@ mp @0z9` blԀfp1Q<@2ShH, M3 1  N@ `( @X /IoC@H h 9 @~ :!@2RKS T-@@ F @v`H`!@jPP 1+'*Z,d;8Hy#(4(ixL404$$၊C߮"A0pd@1?8 E*AAX5A`'K ` ,Pj1 `L\ iiݓ|+ 4 x % t Nobz3,cP@mpX@@ @0|`H i9$!3jL, rb@#) $ @ K -ۡdƥ, 0@g AL +d0 H `=!2I%@6o` " vx PPp;b` XĔB@wDZ dZ@ AX0@3p .  CMLvBD5^|PP(`rI8V' &!Rq|eɅ 7H G@` X@h`A @ 0  P PR h^BLV`9vfiı$ > Yݯ@@  i:?G\PJ:%ƠP@0y1hQ3 C4 Pg&b4 @2RMH0bi\|7}ԂT|bb! ݆XAP# P  %\3nBP 0HeP5B<%#  $H2@1$zd0hR nSҀNM~s@ Ah 0@B jP@2P@6ji7otR0ZA AA3 @h j6(lX@ja4ЃCY 1\  "Ʉ!-(45Cxj_>^J1@@T @Z @+05: !@/!; H`) v  @ R l0Tp.py| @%,,AXK@@2,` @ p*aa$c~83R^Qx`x@ x ~0S <~ 5@ ) X `H`bU(+Y0 S p a  `@?}7 VMGG%'bN`+  @. @*l `] >Z@ 4 AM 1!"1D && 0f3@LM!'ؠNR 2L!L&ah hN%ns  @1; 0@7ȄP $\q0O?M I`TY` J@ V@ p.B /1p R!/TBIʾO=mR@4` Hub| cq|  Ov @`z0$ @ @ @ v@B @0HXb_&1` `5 4P[z M`0}C%Ɂ҉p҃P5$ƣ 0腘 Pla ; H, +I} pޕf21LŸJRW\RJR")H".R @X @^8`:0@@迀iD0H!}tK@i#0v܆`I edVԣtxJr C$I!:~` @t4 @tB90n0C0jķ^4(INC- !%98g+p=@  @`@Wp@^b Z ; bP 8`2 K-! 0@qj (v2 hNM}ZB^dw$@ @X jH @LXD ; `:pC-!W SP@p   - 01`r@hp0  T`INQF` @ 藀HlY(ie|1HV@bq.@` \4@ppZhHܐp -;J$@^4r@ A8L!\i$&&3@#88 $`T4gD i`s < % 5I@ tQ0`@q C@bNWdR.ZBh0 LX&~\x%HŝJ)@&P@Y g j` a$@@LII4 @`8Ť(y#*xx2p A0H 4@b LRa `P;Nep @=@4S(A@ ;!4jCLpbb!!  Zsd}ƥ*zP! `@ ZX@T4@Pd"nI `()@cprA@;/3 fdR`? @5 @ ],)b@+v 0 3 =@`j`N> U( (&&2 vp @hA$@ E\RR 8H @ tHHߤ]%@ 02`Jg~P 0N< bZM,nQjdbV}@@l( l'h@(D @P04Ԁ?1/d '|5v@G @)@5  4tH|p` NixB5N`N! q,| ` @.F; (X cnB({$BJ4 .d`N.@ɠT߀-nv`1)j`jHDnL! H' 4.O>B@(x0 5@ A`@<@`74(!00 \LF ` | 3|B(@P$gX]xt - H€-vCda0SCSC>`D@U@-(!r &,0@1 &%t5 P{Xh\ 5CAI, %|"׀ 0ɀ  @gZ 0N@ 6y@@/B_RYdv 4  [0 @ H`@, 2@0! 7} 40h0@fL4wn900PCFu@Zl@P@= I>C 7b&,4A D/f p`(*AHhRvToalá<` FM @m pf?`LRh@ d41(&,&0lN # `$ Bx @ vC&D Qd"Z@,! D& N` dQ$)%@PP&A,p@P)@A)2@1T/C~< Q($ CYL9\` LF! p33.10k` k` ai4 L #b L q40 fxay t6Rp))^]@ 0@) @j`: 0 'E7, x @P@/@ $hXI @&!rB-=,@Q 0`:D3@=bp 3|Bpi@d2,BiW2h(t &A`0B|4YKq/$@0   D0 ih` 7$ q׏܎] #Rg^H( iz _ _F5,!Z)t TAG0&0(<P*^ E;%@T>@` @ p@  ,H 35(؆L|` 0+@ I eJ||Z  @A T@ F>!P :K mh @? @ A Xj0X``A`iAp@0(@`Va 49 4a0B M(B1(/60 L cjJY}??bb! @Lh5h%@ C%]B(P ~v 52@1V  `@+ɀP,h bɬRPB& 04 }|b$ A2;&* PV%R`P &`,7U\@hEj0&<&dVPFȄCt*FEPp% !t4a@00ωx,b6>0. L/'p*40X @fĄC 60 p vPV3J0A0X $X`1"HZt `Š40$a"݉T l@ ? @ n2\M!5  ҖY)H6 @!H T. 0  @` 씎P`0 z1X 4  qz@%twx  440>Y) Qh"EsJ]@= @; 3H >J$@0D0Z`BM@Raf\ BhRM(IA{8N)JN.RJR")H".Rg_>x G$@ 4Q45v@@lJ@4H %5ɡ0Jv,0dD  @P(XbO€hbPKeo@~'$ @ @t`VrL1J! ʸa4& :9xx> bP 7,0wɡh A.(0 Ed ^5v@@aC Ԅɣ0!}g @ `h @'`np! Bp@< I@d’w`M,$%7%0 A0p j _@00@9@9 ! H`T3L +w8@ @=  * `@@L( L &H@LI\(l$ P*LIx)ЎX 7TJ @F$@ @p @ p]N`J Z(I A @`@, @V @@@LP @g b(DA@:@O3\@ @4 bh , `@Gb(d@ @4  $Ƿh @ "f@+A< h @1 !Q `;&,@g#@x4ɩزX()(?OBOP@- @ #pp@3!$ H@1tH@0H@NXok1 N P@*8@`@@1HXA @Z bRX`0(Xp CQ7ۊ t2 A@0&"& L0"3@\rEpBHp@ @@Cŀ8vTi ^& 6 @ @ a, t'Ĭ05))-.0a]H &f ,r1@ `P!Q   S&3}@@RJ  #0+<  ; ! P P 0".`0 B  0@@5vH@2 b \M6Pnx.l @N\vĀ`PAaIJjm@ @1` , HHpˆj`7ܙ1 _HbF7$_ A) 5  a(v@v oj5G&:w634 @`@P@IAxP 0 NJ&!\i`XܴVPbb! =``[C/P`@b6` ] )`` IPp :P ;-``$0r- @0:0` `(ɁAQY'R`MBJ--9Дsͨ8@UDB yF+-'dKdoA& @8 $( X0@!f @ h LaX(hhBIX˒p@y(%@ AX)hn 3 OHh phd$ ].d\ 00h&!A{},N;&I0:A0ᥡ?3f(r'RH5h#x c;H Pp AMP *%V@aȺ  `@3AD02M 1@7fJ,@L@aRQ ) "iEL ,r)(Bq8p  LprP@B "6F~} T2B( (4%Ć>@.ыXnnTX뀀`X@Mx Di P &b@,!` u;- 1(@M/ɂ 7-p@=  5-* Ma)킡* 0P'`!ɿ!ji 5P e@0@-% ` $@TjF:r`ha  @K{p    c %tV @4@` 4,؄X!|$.cЄF @`@PҔw )g BGst @R @TPhP| @4   :̄@ :d̒Al|4܀@@!>@@% A0h Na+0@!!l:jfQ0TR2{Payz!@ `M0 L膁(IHD ½;@nA Iiی)i,)a%w0@H@ P I`T@;.@; @0&^` *&fM/%}@`;p @j&@ f I -C`hjj!#I\q``hL !LaH & )R Av>`! R| 2HD~ o/w,p $b8 \$P5Axp`p Ji4 ``Hbɠ$kY-. 0@ &H "i @ ~@p@ L @3`IHZZCKp I0 N! bifk-b)H".RJR")H".R +p` e8 @Y` @HP@9'&fNV:/1'd|@l@!@&/b T4eyh@ -t4t@L@h A!j%~Kba5`8Ffi"@ @@P@L@bJ @bN 0 Ю0 I8 0` 7@p@1X@ PH S:xPo4+Pߛ|/ [6Jth4@ +a 3 @! C !8@ybb!A 1)!'_AX L9 P @M4Hf; @P`apVF%y@$p@Rn @ ɠ d!`MȬJ+ {̿~2  A`Tk7^0ãz_@ Ax"N 1Ș4`'  X9 )W0eJBx‰ ƒ)Ky\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER)JD\)rER+ pXx G9jXf>i5<.KQ0ÁcռqE@8g݀YQ0\|=֠?=EH<4aA̦N(Q䎒j XZay)V|y9{~yDY {j`j @ >@=r ,_1Q7qq(|^$ʁaLudXÈ0Sh8h4fac[Dk(h,I8"'j`tCcH*-c:/r(\EL N\XaY#p$8 Y@ gvdy EbΣ8>&8P0J;YaD"cEx+ D" _ Il9dTıy&زD٘,tC004aEb qjRcY8P q:cŌ-RE,陎B" 8 a bb#1x D0l,|ڢmjP ! S)pk!9̥$p| ~F/,IQFū|*,"T3h5 Wq?>g y8+ 'T#> sȂGZ/`@2"1#E+;D5|f`‡15{DF2hi=9.&I'OnVk#G%mKQӯ\B >u_XTφ!Mț]Y'NITjKRP۷&O >Z%tF%ICLJ ;#%K^*R6Mׯl5fffIZU@c7a(ݣ+]lʉy:u0ȫr':tOC83=5XĜI'eӡJ9*h3Gѥ]W7.n_Կ̜'!(BPvwgI b!ǜzb<G m&$s&Cd>7uy^DQtJj)4jLV &+ aaAUU[r.\.{׽vn+pH.#qɧTӪz%R%R݈bbѫS4m&m8@P8N4+J֓IѩR]\.Uf&f&y^GƟ1E,kFzǬ4<%RaHLV&gϔ(ϔ(KĶm,X81`bb)%vBP^i( |e>y!y!HBC&A-5("xW.KiZbز I }Q9cwww~ - Fxrdu P:(a!Wa!YeYh8@p1c 3gy'zX2G:J%o7TEAܢŝqghQnx=;HsG4y*lDр(nG#J ffwffDDDDmI$PPbG9CPyz)ˬ ..뱾o뮾,o0shmbb! ³?*/nݟp)/׷pgGѹ׸$gnكY>J;:1A9*O{sxu.lG [b"y=#;ꙬǸ,g  Ub_&u#Q,P,C[Pgϟfyc{7ђۻ2ǭ۶8'6YI*fs <@#;IGFrfps)ٌa͉@TI'n8q^cVu3k _<)1::Vm|gV;mݏg3ܑ߿to/?2c1Jnʨ(f7{1zl{Y?5PC$J8ʉT8b0y>8scZ0\bb(y[5LF؏ Fqp̼xOvs1N (8~s,?4W'j٪$6q>H c`%[GL6gw)ݷgZۉ㯾}cJ]ב/llln3?JUfhdqfjge|F>c16'ow^盀?zg{„[l7#>d K `|{S<Νcټ37'պR;ou78>̥o3L^r1we7qUٽ!viF}twͿϸl;`v>_ww|Z4f(f;b~??ۨM{d>On;v59Νw29ysV%?w|1~e^4mr0 j`˥)AƱǙkQ*~9gbt{jf'qDs8 cEXnGꇷ=À<9QBT(MLH[/}9ϛlH͎ngwͅ,@TI#0H ( ;vۨaڢG9Rq0_'R^u/H|;ĩGI~AGvb&8@x"a?dz|̥"`5`9&YG­Ti@$Gy*S b:rd4Jv8w T> )k|~dJ4 |(ۇ "yJ#YƭqLN1͠gq0^Q5 ' liT D9YGjrw4_8SPG3,m%yfv)CRG(X }aOΣ\xy?՝g(gS9=cv9F}ݜun>JV"Öee G?fFzhK6$G1u0ÈZ1[o ?r5X=bb!a ! HcfWb |D/ xξ#/G0s{G/ vpB (VLWuwcl4PN8#jPI?~lτ)aNBZc;zy::)F4.e0KV p9cY}2Pt1@P;01Hqަ$τʣ{؀1N(@nrbT(PُZqrs岰v j.f/G؁^lcqXßj9'0Sm;(B.%L~8@p52b'&Qى{csS8 =!07bakgv"uj7*\f `Y+9AqЬMA✝@֡S6/,|yn e,pԸy/Qfl,S_fghKcN]FfvwX$|%VA 2YyI|rԾNc?.–eLH@&8{Qmji*P#Pf}9B~z=ΏcuFN$8O":u}LKnxqVg~J8]189rp0ss$SS vQ›=SG[{/;7RX7T<f^ḛ:n9~v*n K[ S;G_3l'IԷ`oJBe P` O IX8d.J=.nPDQ(XP`p͘ՐGm }P3b0v=p8O&$qG*9wp7p6>WF`*?cOoP,XlXб.{4>lq?Q| MN :ÈpB@mwBPn."h~R< . V(uD8u X%~?*T" o$U„,Z|w'0P0؛2W,(u`p5'c>RxGPt' HD0{ah,pU ˆ;AZG9!qomMx0Aq: mG]x806j|:t"Ø:;̘*/.@^n2U@3 F>p:&:'WQW$Ol, @0 ?o8p5^8=dҔuxDqPgUx( Ǒ`w;GD"  u}xv8W̠T ^8p2^D<eyG Uxи?Bp'Pux1#Q<cij}g*Is?zT 3|€˂Ā}^KEy#6o`0qD'ˁ]~L*\O6Lpv\ PX1㇞~6>10o'kWP kب|D#Wyl@Q@Hjja:8gD$p "!bo=ʃ gu `"Taҫ/WDy=ux;MYL@zU8ppZNZ9@t?@:ez 3P:Z/WFB@|.k@v"¨x`:9A30[,@?B"*ka˃b ]Dpc-x@,+yB?Bl װ85ט'Tt `5o^7(T L@U( P8zPs^ W $gwWS:#@>]r`;ŰCUx׎@^(j@3m ^T d pH>IxgRL/L6cTMOh 9gTeeh el"& lH uE8$s 0 C`N1` 8XVvWx  PkQ)F?:&*~LĬMXRY5*-~DM ? ;Dǀq: 8=^Xa*j0]'ADS 2%6)d%X3&@  I}P!ߢRVdLQHeJ@ *`iE H @7@! @R0D0`*_h` D *P1SqRiaeRIb}LTCM -1\BPaH )0 $|~HKL,1)%|5t")0&(pEȊt\Z$&퓿',Abie4!QkPӠYix*MA)AD@CR` @u0Z` @?vK* |ISkU@aؖD~i%|PZ:-'(ܟSvHCO ˋ/nNMƒ0 @7JNqeljp8I0lI DҒZ(qu040 H);uE5> vZ.7\|aa&`j#@T:NTbYP/HUSnQ$$q0(JѓQ &[Hhe6CV:" =Wbq[@5Q `u@tu`B5AQP`Yw@:.@T>cql c}'tLtNU@'A052mv`4P*p= f]PI8!hZE.!!뜇s~zoW43v#sn*Z*ft:*$tѧ Z49d%cr&iz4i5FjXnL%qdIT8+ЮX @Ŕ,55 `9sA:h8qxyUt7o}qHTj; 0#QN&޳zrN\ބ%#iZ}1c).˺^]c  kkS}N U7 P@l,YmvV9sj-dY 1u][FѸQ(*c X2=bAى1Lى[2gٙfa41lbt2LiZX&iDc{u@=:A:m~n^15k@ jj( ֛NV}Fd4<Ƙ/sx;2eڶmAPZ0 eâc wDffffUDUDFHZF$<ߞz- o0n q1~l6WAaHHw .^QJ&8lf) ITe_Әq8TEȢ bUbU.&_*T"ŝ9]cAd ._PTmrӧ &Sx#x#%[EW/N5&nݳ93r4JEԭ+2LJ,YnFk# ndndя~,XaH)`6B)eYf)%ՊZ>']k֩lF؎Q!eˍ&L}Azc|3 LӬG1&GK-- }+0VW/pt B]e|_$HgG546!GX̣خhJhK)Ǎ%)LVk ;Zu$Il5a599ƥKmC:+Go|hZiuյ_WV'.P 4Vw+U&_U&_X1>oTި*0T_?tx"gFwKr9(v`bZvuouo[1tb1lbmt*".b%IZFSH*YcL&YbYa&rL "mDNdDžxPlsg6>%/ C~ 7E'7'7'9bŚ5pc4iZJr#-F e3 UfUfUUUUDm$sF4נyj. o q-/Lq2Ɏ]d lMV Ղz4j!B,Fj~I:@6a@b@>/!$pp0`0 >\ 5E̙UEckQ3sp6>0 0㇞pfML$EC@ҫ]BN9:pQʂU@AG|p5(.D{"|;ՊB5P<6` (qPUP 4@Mڰ85y<:cy@W< :Q!6eA@,9tuPCGJ FU@B:" ꠡP0j WN&=@rP`.1Q &0lQ Q  `55DP`0| x/8=v>,\uC><=~ :"@FA_h*.qu@h4y4< *T(ojf@^|o|  @&'B*ũ EoPc@n,at #PjpOHD(_Hh6`.OdhtaE $@fh6œn"" a@,03\h.xzUx(g X]y@q_̦_ q_:6W$X@k Pr:p~t Uʁwug/`047H @ɫ9_F{^3Ux|€6nX`7>"Jrb){*s*W(u^ ?@@E<w`x}pהU₀Q@E xx*'uUtT܇#׉*e&o?\>K={ _aR5x Dx >l\64ÀQpu[T_RI\U;ˑdxT$:'G]~ x83@lqx |O2pXQ:@3 Feuy`y l>t?vG'C&@ʯ:oy@m8n@8~J@t*:d|uڽaAW7]W8o.WxjO ໕_xq@ GW2;@D:^pװ #+ਝATO u p7^^ #YHsV^a:P3}b)W`\A΍Igy.tux8G{* *Ux8re8>y }x1 ?1r:P8+j@GѠ׌U|^0 ۀ<D @<㪾@y ʰg ]WP'o6-C_Ƈ\<20Ux@x]  p_Zyidģ?fe7tB^ A0n TO ~.,ėQ"LD3#yA!#"jH_}&:c҃eI} ` H\!*CD2go>!Xz @rSbBfhqRQCS%(Ծ!` $ZyP. ~j }X*!>~4[SBd HCO}>Q9/?NL% BnG`H-!: AcF, ,.vhJ77LxeLOxh! C,D/2?(;TIJ\j"i ؄Rx(љa40҉LNL8>30o%K +y Ra p!b` ɩ&?%~ ZPA'Pie@;&' 4rv̲&Ё i q o ɽݰŠ@`/ L RB~hgrID t-9 y8 {A[j)đ2 VW0 ? à @tZ6J KP4! 5;/oj8ajb.74> | ( }g18:7| @(dd2XiHb @nT ^R IaGĤ&̢FC|Z62 N: 5eR&,iĄwvC Jɩݘ[ܞg@CS'ϷbY{ܗ PWϝjqu0 95;qi(H&1(_j S #f|5;` $&kgb0R\[l@!%H,O ?ecQK\mМ$a\5iAFnVJQ v)a5RJõnYj'T @뮃 A:`q̭jwoXP_:'V GT}T' <0 'A&@ʬ@4cDvu(bb!A ! 1G8TXН D 0TuOATH@c 3y`-@rl U}H`xj#C㧛;0 S dX? 8@GRUgT]Hh@juG{ΨAVQ,t _[0#\42AW4\WN'M7 ><I5 ໕\oP0aQ.$ GT#Ca8 j 0 c'XҀePp}:[CҪ #YHsVS ҁ6liU` ]Qsnđ`aPΎ82<U @Pp@wSjR@3|+BR$pW&T #F{QuJ^0 2'Eq:%G]C: Elip|d<ɫܩ2jd_8:HU_r=I.LOOYF@rC mp{$"`_ttX336D7Oj\}WuuO~ y#x |O2ު9x:i>r2xc* rU~7g[_J^Ttu`˸xat+g`e}}O o <GOo;N,+UgW:I_㝛w^R3[?N8;{~WG\H*}onR]U\u 9^x=לb%}oTNY ۯ$UU^:Dte{*DwwWz{sr:a^5vUy>` 7"tĨ_| `7'WPYT:^/뿇_`^ bt|}u庯*Ճ7j`d^J;x= xx*ut+#QoU䪷#ȑiAdPfE Pd1U( " dPyEE]p;^b(P2>1" 1U"P0$#(R5eyDTUn>ªD&(8n:$4T! x I6G"^2L[4^aU" yEIR"OqWŀ{^e"EE̢EI ;R5xRb"+@F2WT.( UHk W"TPdT 00K Dj t/*EaUgawx㣮^H>q̫7p5^7D|@:On5 ^_mʃ0__YWүוow;xw3:l|c9__u=O!ïӪkxw:pYNuu}dfgW ӫߕ7'J[ԗx;Uo'W*xruypEGW(u؉_a@:_5v7UW#$w^'J-G]5]ޞ\hd@cWp^O H&|q*~X T t_q*,.Η'*:uW3ׂ؝* o_]ynʀ:@u`ZX4:8E(<eW ^bb! 1&A֭܀ p"dVYHߝoQ27B+oIʯB/K,%Dh!#.,Ćȕ,5%td 12n!2i!tb7aD C˗Q1%XiR~Vt$$qMHD @ rW: FwtB1@jgHdp!c@1pGGc4f&jO T ֟;(3to 5;4` ,(U$%p膀`39/;‹GJdlBnI PH@ % )$٘u0l<44S,i&Yd1gWNXX`-x`-}P%0 e~݇A@PB o!az~B@3 2p1 'P*Pf) +3uiDZ͋,WˀNqđ4C!> j`h``qG7 If 4khbJP$HuL8YC6vL/f'!83>1,LQLGS=mLl@XԌm"E`NqFTY!6pi$$^&qɅq.@HDDH,}f>*J;|$ NiM@hOE$(-Q4X|CKBs#엊FR̀NY4w ͟6?h W`&F5`SB L۾wTaG~ r5(e@%luL&i|_cY{!)\M kR>'&Ni$<bBU$C:dd! @ !USj)RE\zY%n3k5UUÕ&#;vki{Y4MjZ ޽m*`ysTmY4H*r-IʍFmK'6%SS(Jǔ=ѡ%Z]eg>K%I@j@›ZZl==pz]} fvfffUDD3m$Pb=TU"~{j-L4;qq&N"DA\p7`#ɋ ]Uv}AX""i4ѥBXӜs~Y^q%K$I[ƶͳ *HW~Ow=K׺{BOhlg" N2{iaeX߷3 ҥE+[ߣ[~ҸQWFz3[I>D R M#IHKp[jJ#(0HE(9WЕ/*^s(RjeH2CRYG/>OdQF@|J Y%y,fژfڢ}fڶ6]ֽ'zLY]_ŵmUp5N+8p'Bab!bvFfZe˫#VE-0,Wdl[E678\ff鳺n A)^R%ZAh AUiqVlR`1L0o[[)VUەvPdA^AduD %oRi7.,?ދ!mam^7΀. MN\(7qL{ݧh^&ɲl0V UvwfUDDDD$ s~ᚙ뺻0 0 quzCx$xLN)/ K+:+h-ۚ`95( w=R;`JX]L&R_v:$@om@ b]=FF&3$`Dh!a>&p xD~J[:mМ$09 IA_xMoHpf(& be^ZlDuupEMuD뮪,147@j|tNSIPn5 :oT@YVt?Rd@;gyq |*/8 c/*V=DY:6 v\MZȰ9@JUR'UHs'Tp ꔪ@f?:g'*:'Jj:h;U UsruKr*:#N=#T2/l4HI:2t׈$u5kΎ8@QaQO9pQĨW:T t#êUhS TuԱ[p؝* oX[ەtHg":ThupRUIPp^bb! S-bb!)! !_ xzuw~ubc?\/שpU V>@;"FX@wJ\O ʿޮ5XA { ꫫz2fqW"L _H "ȿr `. "ED\8%@WHp"͑_F#_2 fУX?(D7Ou`5@0/:'G]U$ty4@mzu}WpT賥WoUNWGGWW2uapu^&*:a*+Ug_ȝW$:^ow)UzηNHүuU: Yn@v/ʪ$˻*G]5\x8@^2G;*OWoNj9uW'u5Q,uU H3ʀ8-w*g_B ZX`הP\bb!2 X bb!; ! !\ xx.UגOD-7EUy*yH⍯02**.&((2. > i^aA$AqU^* "5\D2D 1UU"EyP$IEIp`2v"EW Ƚ^2LRM Z&>#טT&(Eyȭ",9P 10Ȩ^cATT@x0j!#E5Ek*D@r*D&EWHD@*E 1d>>E.G"WoS_^%EHjt7>::#kȇYo__ӯE*xoZugO78woJ*::A.W }{к1T 1o;GxWNZ:D꿑'Yd{Ju7u^WG\$NOGMurׇyLuzί<swਝ_@-p~UU_O 'F]DU>_:GSt*wW᪎cUBAT;nV:e?:?޼ _@dd!EA@ !m|\k)GZ5zCPԕ%Ig[VZ,#߫jo)3 1#LJ5aij@Pj.. JGm:\4TRk ֎촭(:|0\1BBEs"ӵRvEA@+dE=jz!BT8mʇ (ZLq-[ȡky,-jƔ>GLf-_k&Z/{c㝿sMAN͗beؕYmvkqJ湕k%Jt xDfwfUUDDDH LΊ:|. 0 0 otr,10L+^t/i c j9ƿų` !]L+(#6,K@ ay6z4 fT) =:kfwrmGT)Ve9z2%k *Zy4GxӍ6k@$$,2n|aRD|D_+WqhU:beWUGR䫾 jbP1``Fsa }9q `B9s2,؍6ꍣgyE 6 a<%R>U t譩[QxLms^Q] C62VM8).tAu <Qr윺6")+9`0(3(#dewԩ6ުTUVvf!cQm߱gY/hYDX'F$|Z)ӆ 6Qƛ "sOF\hm35"jp˚JoCRrˈI_?#Qȑdc,VPc"i)G萡JYѡU)}KA_!G Wp ffwvUDDD3m$Z:b A%c~mo 0sf}UEfÙ%ձDUFn5I``AՃ ̹ٗ7rpDĉ1rm\Ycҳc-M >x&GY-FQ.\ k˵u{گ랩:2tu]Bۭ@ &KWkm[aJf].DE܈'8[$2=M;^{{h?)X5RCVtcy1+q\paawLi>>,qWߧFͦn+zaHc :B!zEH=@:1DP`-`Z\CK3hpRJftzM[)a,s0OI)z*{Obe(:D4XVuv.F]I $qγ: fwffUDDD3$ 8IEQi"X;\ 1<3r<޴Z BS~JpFx8PR"7q1gԛ%ԗ.GV$D4hbb!N fbb!X ~Gbb!aa 1z&A po'ŖciMI1%aǸP݅@1,>&ai϶cZ*Ѹ|YA/Z2;in?}vT4L !hnDy3?OY'|YA-Q9>3` ɜ#! ,>97qQ\ . P^Sb3g|pčN]0rQG~ #`m(fZ?V/! xqTxA3t;씫E+Q4Q/bL-x݃ @^J#Cg%E%,8,ƍS fb=̀bkve4>Fl !9 sT+Ysx{0tM,5#~s`On>IJ7~ @BC)|}̀5+à$8gݺRAh0QCw[. @ύu1!8 S0o%41&nvQ/u Ũ NHtrj[mx5R qAJ >‡& ,Qp1&''! ̲ &цsx2&l(R$' OBŠ@a,9$$!mh"\I ;\Qe&:" V3(Qgh0#Cð$ q*n853] 8>/l'%U0R"i btC&y}! @' 6z/x$> >,7Q1p0^8*g^͎; Pø àd07{@"I1 bpKd@ɟ4hj?Ҭ S>I,O1At5?|Z6;eE'lq8A--J$JDm-~7; " Pr]$JDmvO6SDJ'v3w0uL 4"BηC~}0TB=B0$"GP*~\M NO}".*jQH9!OML89!dni5;  850LlrGԢ,CKBPۚ81;Сc O0 N~ǹ3>!?:>EQ}BqҊHܯ|I ѿd HH gu*zVB ~puDH`78 ǎBP*BLQd' N)X@]k 3Tۡ9TK(ԔWZ;C &:6@#/ YFAb>AMuD뮪uHY47:uM'A*Yҫ|j]::jΚPUwQհJ@Iruct.bcl@:N4sJUR'UH*j7ꔪ: tܪHH*J:jhurC<~&::nfQ:چpUTU8wW:Uh|5uIuMZ槩s9FHҪ5vUI]@:ꚨW@rKҫDURNj8 snnTJЃ ȵՐ@JP4_bb!j [bb!t! !Ba x)-o`Cb^}w44"";Cڿ6MAR6n͇IWquEpw$aW05dw`7`F^4^//ɝ. pUAuq7ڿp4 .:: _u]&: S_Jou_x㣮NoU]uNOg_|ZugO?w?WGGW9q?\UMW"u_]?Ng_UY_t$uDRtt?ë?Dnq:'JG]5\Uys_Ƹʿ|iRZU{6LtGcGW-e9FgW)Ud24hUB*NiI4#S3M߈!gD2$Ovp-KY"r{;N摚YH)$jiǾ۱cm]*|Of51/jup-jk@Qŵj^a5[b5\M)@&tC?O jSǥsMQy2#Qm$IreKeB% з\2tiɤ,[$iu U]hf2.6Q UwffUD333m6$ h*( ]%ҚI0<1,L=tl}T" jcB{ziDUhq#~۫GHsX}g5\ r;_ XIZF|ܸ}h*+^9G18  $" ( I@4!610J,)JUER)JD\)rF_/ܥ `;&d2a\'ayt00:@BC,MFA,5  eƞ/Dp ]\`@, i``dY-o:)H".RJsD$  %%8 Ӏ&I;vK`g5(p RC@ 4n㯋J@/|`r1d0ZqJBUC&$ OGR5TQ5 s딥'+".RJR")H"9aW ,jPP [G)^B @M!%Ղ@4(xs8j>!<NQ_0g pi_’Jbb! ţ_Px P1i&` @SOB5| :6CnGJI$ H)p@\"uћ$$Xha'@r0%ƐPpԐ/P NZC+)G,40I#pN&rWt;h3@|!d( Hi&y$44 l`8&tP8 _@;rMH͐1,* ep^` L_*qA&26L Yk`xP@( d^O(uk~`1 1SěƤ 7K *L&fC ! '#R–Oׄ`fdL8 `T PQC0a1a ߀' pwd@²{ZB9 0@Hē hÌovIK>@Hk`z%Ǹo{A4h ?@ H!}Qc%IjK$0~Q [@ `D0ۜ<uF?# Bh膌M$RO@ P`X7p` =@ RCčlW@PAPPZp҆ & IcUX(ho9, Bb]4EP ;Ȅrhi@(0'a($(w!+gA+5`@##@v/xtBdX&4Ɂ>Zõ~1PL@,!n7a.>0Ep*8jK0PMN}@ @0 .&4`0C lf&$0t $?D @ A3``΂AHIX lB.Iz`` C C(D2(a) "I>&P*&$3$ǹ_Hnx% d>43f&1)*S&|s`J^ ftPjFZJ&B N(4%kd@CMYuX  PA 0^C!@G (32  +L LH@~`4@^DͶ ,!xZ 0h((M]!=`@ , -HЃ6dR3B@@8M KIc hAYX1@3|膠 ,  j)@B@0 @.Р@[f]@5A47e)P gP j"Tp ɀ',B, @a 3_J9kߘI#ޤ  piW瀯RfF!k԰ @b8E`FWW@ `SXawP4PF pL +R)JD\)rER`0 BW4BJC9+w', $"ɩ,1 d)+;1&DC- d_7B1`p `Uj@`Qa&`.03~Bn@*FB4PI` 9ep@ @ ; Y&PI9Obb!! M1 :L,  J`axt3n%H ,`pT r4*7d>iD"X-8( O0fA:-P ?a, P`o-(}#> ^ \4b4]@ P 8!"4npJ(45Xj2 cBu|  QLK ;`T7 -#˓I^t^/ i7l ;4 JDLPaP bJ&Xi-,hVI (K@v[,449ݲ^ F &#=t5@`T&I #8%%50@;1%)C#1xb@a7lB_v`!!, T 8a/~P)hc҈EI92 P#@ #R=@LnY0 /$v0?ԆIDK+š=^ @` RM)$ @T 06(`d INPcH 6p#YI@ GD @ Aާ=8(M o0% !/$ #R=CP@3F2(iep2'ܐ@ !dPPh``Ġ0BhQ41%:2wNdx5h`\ ,1IH!|~Z3w C,, cT `uDtPCXi,/  <&5&X7a Xa \Q@Xn` h`!!:&*J&:>% |!@G (3@ @=&4A$ rA` `r5!XP/U@PHlr" @'Gڂ`& @`fL@va:&σz ]] PCGj  Pbr@@ *@ -y"@ n8>&f> ==:&( p. ` ?, P#@d CP7 =v@0"b@MɁ`4RWH ` I41Cdt100@ @M 6~q]@x{'@<R`@'0a@1A@)QGn>;p`&,;΄$8^0`oeCp NߩYOzAD d p0 ҃JŲOšW54H  CHa @bIoÎ #B= jMh fI%#KZz  bcI+, |CLCA(401Cq56'I_ _ԐtB Hg&rɁqe딥*)H".RJR")H?h7xJR"".;ѩHjR")HJR")@rw JR"(w 􈻀 CH @@ˀa @BP#(1 $@5(('K(-H3-zx@3`P '!.7d5~Bi8 {Z ~hBXZf"#m@ ('7;V@=z^dd!ȁ@ !cKS[WGQJ8č*GW+_[pr{FՊbbh]'VV- D9Nk5dœ3PV_YT_ya7 B7MFk9#|B[b6"z1Zb1K%vKk]7a2 f.:Ӎ6rFCztc|M:2>6E ESC9z[FmHʥWm5ID#߃ v_*k*Q#)Ύ̮3B=[NFAA)^!4 wfUUTDDD3m"J$ ivzp 3M4MM4]vM6lmzm4mwlm[zy$bYTf'[] D)]l<֙:d6y)ANGgs czcW89+j͆fT%X %a]~mL~&vNeU4"vl.~qWY%mWb) ]@Kk*¬,Kw%,2,7A"cF*Rʡ̊l86H\4b?^'IyX UpYmqtVhꕺb'u8JnSk@%EͿFKK%BHkQW j)ȱrUꭞ5p ihx鴼Z![硪E`tl6EeHVyeYYQ;J!գ+2Z2.P僨pO﬏K0B%S[,)Z>_F|4Ytg}Q#1mhQnbD}Am uشZkh,Dd[\ba[ Y4Tm:0Z0,}p`M"/C5YzbȊ g$GlS>ZE!7FE R+2XY]fcX8U\Zf6! 05B# T"7rߍfⶖtjZ5&e֦Q⚨%W`^*gv5CA.ׂRVٵMRDMQFIӢ?:/NaQoS_AUIlX%lYNƤud  UUUUEDC34m4(@h$H~3 >ߟ}ߟ~7w~ߏmofx퇙c*dttzEx%EAWTmj,mJŇdG2pXH5R \!tk[m(g"EѡHuΞI&ZTiN5"|',V` ELY2]vXu]Y(4weJmҔ-7cͮoRPup=G`mv=V2eե&!4dbb! $R@dƖM,-QK.RJR")H".RJR")H@ @k&p~\qh@>'HH|/ştZ@(!/x[@ jH @DX  &\,@W |8+jL0(h `a{pQ-(v_B`@  P m C0!{4pL /t0#ܠ@ @ @=&` \ A&$ ( e6o FH @3@1fY`tN0rKCB`c(1$|h @b (0 @$!p (H~ g@3YטbP0 :@a`;/ B4d((&#Cx p^0@, %AeC)#8 ,t)*$49= ` (0i ;_P @@@ 0@/8CC@@f& Q8I9  @:M@@C@b `RakB `Jp  ^M 'I4P> &hhp(JO($tg,X` Q ;txHO)$0C B-L`P AL@*` @vPӀC}*O(p} -h fFC,(6 O6>hHCN Kh/200Mi0> / 'P@ C.nx` x, `j@(yj% H11d-| $A?~0H`c1`7&h5XP +ultQ $R@vZ ̆A؝@, H eC.&Ra;A\a0~ @3` z+H!T 3@K&Y@aEaN Hx |!`p@ ,CX䚂^X0(* #|guAH,A\30@zd@ @ vAA BB!@?}X"@ `BAKw(i58`E_'hR ^jpj T@;+`jF  R  h n<0(0꾬zN`  N|qdΑ@&(` ؆Yxa#\@ @@e `@{ !bRjM;44L ! P)Zb`(H &H@ !Pa5%dRWQ| ?&Nh 9\705XPh @'(=D05 !OA <^ph 15 T L?r İ3sh!@BW8 z@0%b݅̀./X̆C92` vQ44xA!wA3 @ AL5@50W!]P@H dF?4 p@Xi`P@!&ID' @N &r@C e($lp P~R ,"g-H B d803` h0 8HaD$r`hJ7;ݰ@@4`xj $ /,4ii& P`GA[+Ux *@ p . h`2 %0 E ^H @`@N IIH/p()%0RX Ȁ Sbb!A S f`d  &^q4 "3xP@@ ` h&J &@`DA1,Xi3JR6@0 @ @@}/hC~*a5 1H9A2bo&4:(@    hL!M0%; (Y]@hزtB j0VYI-ƀ@,Rٹc/Ƃ dTjpH%@=`1` _T>z@PZ @!H K&<G1!@5ŀ@([!(-X|4^Lv 2H ib@NB+$WZ }$B 0v`T`=)$x%rixh• 0 !0@'q@$=@o B4@:VBHx/& 7rh h!b :PՂ0p`@7 BM(82a'!'叼  @7Țp` @v ,i7W-VH:h10]&@a3gXݟHGq8 @4@Z _*P @ ɽ!VHAɈ  L bB@TT &QI(X]P@G @i% 9^ H@0x47&`!ed*86 :I 0bS5ܘ )A jH`;Z2`M (L*J@6 ;j@5 @@6;+hCg(rRf6d PIha4Xah} DX'@MpaMmm@\J\T 3%h`jqY hp@B!>KJH@)[~R /0CRJR")H".RJR")H'pJD_0 Ax V^ (2:02@(`^ @uN bR8!TA\Y`bɤ?0 D၄mh}s!<( f  fn,h4P0@c `F N`:B!z`, K!D"aH0rfQW@ !@&B1$i45# ΒO$ TZ *@ @`^&Rh I@qDԓp:P LM !4400 n ĵKF$0 ,2!܄, ,``krSY `==`@t䱯x` Hd0(ptDhi1l H 3R`haiRr!cT 10 e`hR@BM%`Nbɠ&7 %VXaw`Z`5 !`Mh@vC,!BoHɾYKP 5`p )Ӊ:!H$g¡!,?jX h>p(  j^ 0T!0L `j1003p!|p$0@d0(Bx0 Xo0bP/y@?!vJ&ԷB혖5q p~p 0X ')V@tVx N7>0B0QKb%gޔ`rLv,@@*r@`007 NrgY4 bɡ>U,  Tj@B` MP`h?&$V}Gf8 "@A\Ě{ BMĤ#1a$2nkibb!䡀 3@3t%lY0% E.-&P !H`25NKF@Pp@ @' paM' B bt@Lœ@bKHj{g@@ <X c4jD LHjQɤW:R`;!bt$!`d‰QJao1ؐp}@@?<@W 0 p+@Nq@&I4`&&x( < d@ n$x `v5:04 @8*`;rX KrJCA894b@bKj@*7&OY4 x"~ K( M \#,` 1@KS9!t @@@{D@p#L#,p 9@KĢ[!Wh'jiv`L8X H9sŹ> h1 Y`bR@:- :Hh`j@LaHNZ ׀ g{H kp dPp` 4 ! dA/M&#T` B VbXZDHo`D@ r a1i 4`4`LBAZp@i0Ay@  `P(`" )c>~P `1$"v7@np7(ayhN>p@< @;+FraA@/ r [J0aC  Fnu8x { h@l @=, ;lBPѩ &_ :x y@2 @F@b -@*zL V@1&zp!P:emHp(P >, @1 X eJHBGz P @Xn !)4Q±@@ @JT %P  :&Y퐞L&M ב@uN @n@ @ @1&fɅ Ar=W^ @4 x3K>!FK&3(?JRR)JD\)rER)JD\)QZp  R^4ЃӃ5}04 @0<4V/`@PP!`*MBi 038^Up@ A @ dU`@:8+I!G @C i19,O:W@~.H@`@ !@*!&S@!  jh .!1@5#" 2#S@ P@ x Ha@bae#wIH<`&&d$"&Pߺbh O: BB@#@2&\r W䤨| @R0mj A|(dpAfMR@-QBM_"p@y! _X C; X &@10 `L Hgd+B(>p@ @b jh@4J;$Џҍ7ι @ 4 ` vX@.+vIaW䮢^ h!b `!( m RQirY 0N@ 00@ 5 CP,V ܒM IP@\ 4j0JR,Q(GT!?~\ZH` 8 @BxL>hh / @&'P@   3@ C (0iQbFgl_Ǿ,}8 A$g0X)vhR@&!$4I4CQЂj02, 84&HJrSPҰ'CpFQx@ p` 4bb! vH`-100dRvRA瀑@λ`V0?b` @HiKK- F`Aע @)4h@ N@ 8)9v`@k  4z`+W@ /Y@&N4 9Hi-8!sΨ~8B!0i0,,jP @8h A4 *8T pM 咊&PՒM $KM@@0 6j7?|HZp ɀ&g$ZB@E@ ` @@J `i:NĠC 8 v݀ >,!;Te$ Q1L,g +8 @#) ^^p 5e4`|HE2 @@@Z 4 % @@(0pd2Y`\A'A,%A !@\`/P =!@ @0F$݀t`  /@,@B 'jh P 5!  3\ (  `0!  @; hIm(-Ԍv:l `0.A  A,d̴IT7 |Y4H@T,Qg;X @ i@T.@,ZI @3#}A, PH h @+`` P: B,0h @L~akC!F@ @2N@0Z`! 1jJQ4P @@  CJ[Wh "e0Hp*PPa`TW%gl8`@kp@B @9J `!p@ ` %M((KBJ%sZ+k!h @P@ p@V1 @h&LB8`I@14 &: /oѯ?䴨: 4( *qE0 LC !005;2JpHDJ`Zh4 *LX, Ho):h kX *8z 8Xz@KᬜrLf@1~C@d$TR?#CN`@D`5d, @y$Y@ ,np .Y@ / ~OoX`@t0 @`4 2@L2`c:=45 ' @ `CA #Ӊ !I-wWq9@ %27(w`'Wvxē pӃR[c4!ɀ p '>J ` n@Xo\RRIHj\ :;A1A(`b(~4RC?+  @x^@y(3XĠnM- @R02  @0a0 rPh<0BI !{tTI@dnM (!t`F+p2_#=(fBF(Pha0000!5몶 @0b0 @A)v1e#3,wT0`&0i-sH.R.RJR")H".RJR")H`@B bL&P(C &HDұdh`nbJJRrzP@ ` .Hw 7 h@`\0  (!Зt*o4KÒ3?o}0@30@B0 >Xp0BKG) 7]` 02 & @+!ZĮ|PRE1vY4 NфC ,HO{_'mBbb!a ``@ԐLopT4 j@3 @B0 <Xx2_JI T OG& Z 4|@ @5K p68 3A@%N  & CL9BI;> I$d>4>*K1v` NS 0Pэ1wl^08 @ <0`17Hd|Y5 |f\pR Yd Ԇ%:>./P@D @@- 8v .| @:(L&! (( tA/@+ @ $ H` /@ ܠn0^nb 0?MFB5f=˴ ,MT1*)`LjIPM(Y ք-* H`&&B&B A 41= @ K 3  4PQ7d!AI$@v2@(8 Zp %P2B@4a`"၀!&1 җU), &ɸAn6ff2hP !2 :4 ew(LWAu= @@m@ @ 6%IA!&1 'zR Ri@T40M 5 T5%1 ͚8 @ @@0-*0@?1 T@1!v@ ɘ (4g[ &?NH b@cw!aʾ V /@` ',  ` 8xC&`<Π @c hPI ;d2h&bY\ĖKI  1&bh(rPlzdW $0@0@ =P@ `h@ 0Hq$@t( JJq6?A"ne&'}`~:A~RI=1@Rr&x"D $TbiJRCp2M` kX 3&/X @@vyEw`uw$L^ bn&bCOI7CPR[$')URJR")H".RJR")H@ @*6@ (H @bl `PĀ>/eT#L`7LLbI>QDG~N'Sl7/s4{FxK@'@0@`!lb4X  BlPB7=Hp'ד J =R ! 74 $f-YJK= ^ -5J`Pn h@ޡ>x5 iv@ -$H@\`vCI0p 0 bB ( @ 64! b@4 10 vM( PK[P4~4?<LP5i0B0 *B!L@ $ PK҃I3cNk!` ɼ 2!  ԣbM\b0@@(M,FJ[`;_"t@i`~P @4nX`' 1# ܐ P0e`  4fB+l,[h1!`ĆbkYIF-gp 7x`p H$lJ` rbpA5^[q ,@$6AZ98H` d0%\}d>Z(KN;p@-_I\BvO3t$4R JhZQN^ 00@@E( AT5,@; tV dd!@ !1kL\}n-=}ywwwwwwwwuűlmm||kZ}}lwul[mmlm6>|ֵ}wwwwwwwww[l[m[mͷϟ>k浭}w[űmmmϚk@ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{A=bb! !  ɹ`59wA1$@@ ,C /`]`^,X`B(>` / 0bC!`HĒ2Z2T4tF/~ĥ<(@)d @1 -0D`bxC,B 0V    @0a!M #2EXe $C@+ bZ@I(Ї@g?/P    #@55 8 58PpK6@)@Y x`@\ɡ (C@PY7;!@7J@,H paAԠ` V,ᭀJZx|j]pA A.@ eA#@KH@|`bXd @P P f^ 2`T` `,43L*uȘ р&!:RFd3+$e㖌˿K  rC ! 0&; `\A biXxT(AP @5A`P0 04=P0-X+%H-"7ͥL 3A p@rjLHL)Հn@@T Ph I9`P jLX+P @) @4*Mj^Rъ,<0%A- @@P@:[P@P4  n g5jHp@?4 ]1 'IHI@&@n}wzti(` v3C_%BR F ?&<-  N@ i0 ;XyM(70be 0@B@S@/!(2`8@nhq P0*B?;y ZY(i>Z1.@sD8@ Kl &>&0K,ԧb*@ @ A c\ɈH0YdbMB98aD8 91` W ?/ z`^ @&xP P ZC@BM&00C @G0N([Y(3 @0FЄ586CA  % jLd~T` 3PA(@* ,FĵqܞN )KY\)rER)JD\}  5X AV@/P  lz@7(0su#X,bXD2`hf0231<KTA/3}Pf a7P6A#!bLJ!!p 9/H!{ĵɣcR`;A PBVRK,4_R @J" X >2 nr_)^,!L P :%\`\- @@w4p7`T5<`Kc @@=0| HLP` @_80| ;H V0P``3A, !` W&e˹3v p` Pi0 Y3Wʸb]`@4@@ O(P@/  @bX @hZy`$o&L0 nLm% @V0 @ e ɤ$18 J7g#0HAj0@ @ nP@CIg54- @$(`p*d @t"i`@&B4 M͋0oA5IH @Yj/0 Gw@A bZ@-H "7ԁb yH@Cbb! A@?X`PAD nq400\Zx I4; 0@=TĠD@ NPD/p-=RAH a@ 293^ @`1>I; @ VFMF$BZ% 5L5/ @5N08X g 0h I006h@FId߿:@  |7G@|P` ,$ :*d\  0p.^"~(`\cl.^ؘ8!I@Lra hA$P wIԻTX @B! dRP0H1ٹЂa@ @0@-`r`rP R0` H b xd,Бwl0X-1 @f@& 0Rb@ 4@ NQ` P2_Œr_3&  @2 @)r*00R tB=%d !< 0 @4 [p4 @40 BԠbVOA0`UAY&0zvp ɠ:&FNPhAPe bh`iCz HIcL \ D0 % `, 3 b ` 1~p!xC!`جMȤYH~X . ?VM @;p&+hb_X40X@H+9c  @? @ J "h@P` @EQ@T$bR@@hF $#*^14 p!0+X !'. PJHh!|XJ Cr2Ӈ@ oԀj0   `@Adq 95M&ɀ 4.A pp2\XNBC7( T!44iKP PH :  `T0@ @@H`;&2xda4@ Hh  @~_ !KlKHF@00 !|e2 M:!PbJ&g#1f.hvB 5!  h@.  p,BkR O# _t" t THP`` B(5 0 &p . ΀ 4ɾ^\@< c_:t'·1=1 6@  P>0 4`5&p9`1 H @ @vd%P KЀ2WRdo@ s` 3P2Ԙ@F$ x ə$  Xp@j A<`(R@8@p1`B0,EfC!Q;"Y-2\|` fxh   j]|g&Հ& @;!~"T@ @/>(P` @ s 9y$逄i+ TC )8L_lzIb]$# 0 @P j``@HXbj J  E p`_fAl(A A()  @4/j !&+ @e3Դ bX I [`xQ4v. j(J %dP}HX(` <@ @4Lv (B!(3CB1eFAD )& 14AyJd,A蠁(V h(i.rBM\!`$2u(`k!}nbb!  A$@f`V=2@4)À7`)i@'&C?w 4@X f!@5@ (~ 54 @7: tӀ} zpZ ` @ 45 6j 5I0^hA`. db` a5//%m~ *p - R@@P\Ip] 0_ QJ`;`  a)RC|VMr6v t8 RBl8ŀa LI&1'_0xx bp `0 .QU "NL@b 3H &&TlP rHu) paHPC&&P04'dƷ9XUN  dB(.'  J&$ G`*0% J+@`8 @@! @\T `e h*g!Y$_'u G: F1D>CB\䱸w G'߻ @r @=h  ^;a!p y`S1 /Kmg @ @ 0@` (!A0 `  5H 9?^0 J ! JၥjJIG7L6`2 4 10@0&3 &vґɤ0 BYAV*1 db?.\)rER)JD\/j ` @/p '@t`< P҉`&`B! G` b &8ɩF#Д~*); t%HCt 3hr`1 ` ` An!Xie Q@'ZBJrpWw3Qiz@j @ 3 @ $w% @@rL% @85J;`@X 4TF &>!2Rr@ e aX` .\M"2p`r U=_̀%@b"z@@'!dx'C bIm8Y1Йx<4Œ)L&XSUd'(q @*f5@tx 7|% 蚄O:` 7M@  3D ;z:&HXbo8|48`;@i!CH` @xM/v 8 h .2# RP@qTEv4 (vOA5+>4&3ha` AYٗPY@{ `5p a g|@$TpP Rj=@`lP0`x @- ,O@C *(L I 7t$0 aJ1apbb!&A  ^ x32@QaA0c dkH  g.`1 ; D _ɠ05 VA'|* l H`P; Pa4LpZQPY".)\^ )h@ $ P `:$oXaecw㮇p@RAH KH İ j%3?^Ep'` v1 -&7b2LH+|> BH X6^q @64 f"h^P U(pj@RX@ # h @K @:D>@`'tC 4'0 'CQlJ` #  B,;7!L!d%`@}N@_2Aˀ'Nƒyd*o I@Qd05qd05$"j7&אxTl'a!@ Z lp  `0jXb&#mp @>`hATp@u@ >! rP^|Ɩa |p   @<4X` vxt,Ϲ/X0 k` @@2Jj)H P Cw: G- AT^Ŗ4tRK,vl"1@j 2`@0( n p(z jWY5E@r! 0pP@B @3 D lBBxda&@e 0 0 f7.@; (L %kѩt$ !,* gp@TA0`RBφ@ bXɥ ? PB0 %~B 4 Phen 0F+) $( QAA\h =j@Ԛ  J 1D2.[$-C*.@!Xa^"23ɀQ  4KH<!4 @< $q` `p8$(jҊQԨ1%3N j` \= &H 2%`@Q@g 2k2 i'+R!nzq?e&<L `@l @& i ` AP i0@.&d / /$O)0 8 /. A@  E50E@ @ ` `i@ww C k B4 , dҌL9ah!@ ("T 18`>!84 C@B2p @!|Q4:I\0Kj!rZS,C@` k\ R d"@PдZ4tIǂc nG.)BT$4 l=`@` zPL /j-:p* Qv@M @(gZ@/@LK"`Ybfoxx 0h e8 Zp@@J$lC&>0@NɌŤ͐V >@- Xh`@tX @`#X`% 64 d FM  R ,5P00h A4Kh8 @WN0 ŀ+0AᜐЂ !c&!f~ & ņ챌5% ,oTؠ&O`B t`4@@!. !M@ ?p A;Phv NmĀ@ @ +x$ )bb!/ @ @0 ]d(Cb4 d)( @!ztxx`@@@@\ `D C+0 ( 0H*.`@`@@" 5O+(#dB!:HA#8 pP:\0mgļLIxZx\ K@ &@8\` 3fB! ;+q |#<` %@ @6*Z @` @ ZC@vB-ؗ+1U@ 1`@T3!<8h0P* -)en / $H@j @10 HH%3 C@07nP@Wp  !CC C咐+W<_@@(4pXNLC0 d *QDD-eϻ&5!ҋ -r)H".RJR")Hvu蓼p@@j @ M p@E@4*30&P 4 ` @vMrhh ,0dD  @P(XbO€hbPKeo@~'$ @ @t`VrL1J! ʸa4& :9xx> bP 7,0wɡh A.(0 Ed ^5v@@aC Ԅɣ0!}g @ `h @'`np! Bp@< I@d’w`M,$%7%0 A0p j _@00@9@9 ! H`T3L +w8@ @=  * `@@L( L &H@LI\(l$ P*LIx)ЎX 7TJ @F$@ @p @ p]N`J Z(I A @`@, @V @@@LP @g b(DA@:@O3\@ @4 bh , `@Gb(d@ @4  $Ƿh @ "f@+A< h @1 !Q `;&,@g#@x4ɩزX()(?OBOP@- @ #pp@3!$ H@1tH@0H@NXok1 N P@*8@`@1DXA Z bRX`0(Xw&!Y(A_0d  a/LEL=  `D,f& $=y p 7  M/r@ m`L ɠ DX%6 OY`7bjRR[l\`» @L<!X& b @X: CId@4A@:L&f) P 2P 2 00@F  ` W;xA :vBAa?`D]` `?H `j d0x m 76 > \ Q '5Qdw@ځ@b AXo3,b@nH Sj@  @ Q Y 0 9!jLtlfh,    C`MC$4( 3i9Wz   C!%_$02<0 AINl,@  R @  Wldd!9@ !hűl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]2bb!Ba @1t@ PvZ I`Z`.`@ t2` P0@:)R1Om$T (ZZ Bs(Pp+R Rv&WZN  ( M @*p 4HPł`C$K-!°CVPЄ$@ PJ  Sp@/f@0(p(HP\A&@``0LB( I(03d!!) VY4vM&x` taa !KB/5fPOL + k F@&v A :0?;!@3&AY THdԍt0q@.P @=%@!8h 2Jh5ņh %Y0BI \7|ǡ ?o06&  7(& R   . (@h00<@@t tə%bKi: C|JJ@&  `P!0WH0 x`nBCWɀ0t000 4̢a ; ( :  eb&Bp`@1  P &A{( wA`$%(% ( ӷRY,SLJ` z@v\@w;a`M` T`  ݉Sϴ(l`D D@=P( )!`p B  @ @` {@i+X> L PL)AE! AH1Z p*C/ @oo n喾D,G~AX K j <2/n`@,n@bM& lp Y4Db%Sz&`0@P@M!h/b1pR4 b\8`LTY=򝶉) VX@@i`i0)ICrJK[ '_ @E @6j; p(P@0@` 3;z0a E M22Rp !,ᡄ"bKg$ B?# r\)rER)JD\)rER@4`@   b@)j  j@t?d /h3   A4 & 0@ 8|.w( H tq1 B O侏C)lL&0`_ZHj B @ A h @3 Bxtܔ^v`@F 0@@Lhp@.x X j) b0@J p2*oekq߉Y`N T`2L!a1H!a$?xG79dh @2+ @'!43b & @t`P 05#.pZJ7d05XĚ k&bb!K !@ x 4x0`0@`&!dVX ٽ_H~Q D@QHk*I VrƯaъ=}b @fH@'dL\x0Wr,H€ @Ʌ`+I2H%!CHe@W  _O뿁Mmzo|tuT:Dު7D~O4TJo}.zOө:gP}U?zyQ0y^˟z@= ru>={S\ψLӼ9Uso;bP̞̝&LM=ɋ/E[MblCSv$D^wpo_a&ō2t<'Su<U=u>O'\StY<~򣣩`4[×?qz@=}>|{;xsȪyZ:D꧑'Dz鞲u<:Rzη~Ss<:T]3t]o#ëOΞ:>ςt ;r<NҩG]=5>\{t*\TOOOu<@rwNP/J>uT᪎ycgT座l:!OZ[@W p #ph59F!D>L_ FvPv 8c *d.@ ҊExo`pCDN$\wɌg;v ^SBL:`$|: C 6l8 s r`ŏU05'{2BH@v4q?1Y@p_000~xbQʙ\`謑*a4 bP K#81,lxަP08[R_r)l-E 9)CF `50?0a/cʊ0@eU[z/G~ML~` d8)av?}a4x 4XdL4*o6@0$ *M @Ty>&x!a?;!@1!RB!وp`}S 4WepĴa@D||>ęĴYflIጯ+cTvVtc*q9@vP[,F|,@}(A8¬S0Hx*8^VgW l qLJdx`w(;O;l<%M-ۯXo]Ln'>70'7NϾK:۱gѝ e;|ﳡ-TäfFm[cBQxg^ao61=3u߰ǑV~Iݺ!J_QU1{v6I~V:>nn#8ͶvzͦQչ ͿGaR~Wcn37w;)pvKe9xq07Tgn=-adxs9؈fr 3Fg'``8:/;>|U߷wns6߷_پ~IS3`pX<yv&J=j7[03N.g#lN2I;q3XJL9m䐃>Rnx>qN~y(|aTvUDgF1A#Kc=NjWwqDž A"QTH09qÛ"OԠCȆRܝ`6xX3oen'fuPq3a8.jbm6Ӭr7=j$ O+˜?VƹA c m;m/Yֶx~_gdҗug>m7vیҕٲ3=YZ-Y_?<ѧAͷ;)'׹$Ǩ ςRX#;nu3e|4Xwvo0lIb=fun~l9?+)[j$q{Sܴt~)cǥ G$a찕}oH}ݻx?鑟}]e3o))#|#;֦FqDM$_?Yv~Xt|ƨpb{l9Fv69S^oݍN~m̎s`իI|O gj9WF9c}iqLZ2JPqqZFƊvs1l3:=39؜v7PFuC۞XǨ_*&$SO8/? YJbb!^ F(>HxZDpvSCˇb9x,j=PqSt}Q˝*GM~7I 6m6պNpCu|[';Co>Vk100I{;gTFdqR/{ϰN33T]lz?llb1φ|r ƚ>$wQ@d;Fel?: 0dK1y8#{g~'9l+THSfX{jkTKq$V)k w)u{p<%qd%'iUIƨ~an~:'?aV 9:֦4m*b\ s1([jAQ=ONߎ8;lzݖEC'b){7Q8-VaZ5q<,*Ft AzqgM0఺X#I)La;6JN;ԧoÉqKRWgat; ! $Ru"L5NJn([/,=Yrqu2y?7mqh9 Vp*=[[¿8R'ezj^q,[wcLa#Ehly$R֣a#S^ZFSa]49,/c?p8 A'Zp*fs,%8@gnm9?1ަ':Hv<ÇQE)fe `4uZ1]qN931B:JDPyaB&8j>18Su k==bW| v[r25yq, e{~Jn߯s8o~Y*KtN-g.uf3^ss SZ+<̿=CR0<9nF;W :3o9(e(~ږ9nN4. ' 9N9JZ;8pY?Ç5+7umIJ_sbpt$ @-?Jog #(IXڇp@ j{ķ`6Ng v;f1D8Jx^`jϾQ{(PxS6;qCI^N` <*a)G =.N@s0dcp s.{j:=xSsǼraHs>|bbPFjLK̳UM1ÅR5xzq b0xab*`,:?`Q:HՈzUQØ|vBCzf/3TC9SgÖvVCL"J;?>lRIsEQ;Ƭ=T'@p/Տ=G&<, $̣Vng8V T+ ;?Y xL ADxЧ}z'G¡1ڱ‚ë2(5#! 8 #Gp ÍÈDbxCHvͰ's0sEH7Sx [arLPx g9"Ex5NǁǬ#ea58Xp`D[MI="8 X,qTHbwS]Q}ߊ"SxbEAQq=Y j4M/%@Py=a 2zs>Pt&7 Q_1@v 'WbrC x8PTd|Np X\|4:H2(]Lm7x DR.f>@j'2rI #o+0 g<2HC#HUh㈭5YRR 819Ih|~ 3I< {|y85S/Ö1ҍc$R0OI.`uhs0umW#`h1F'1>Nn:`(u`Q@π?E7%3\)ŊuV@: WRR3I~EgFb ;AZG9!qomMx\> Px\Nq^ 0`FI: a^fLA g`@7F˪ #UA`xvB'x6qfAUx8c[}2iJ: 8(\3*YȰ;׉ #"Luyy:H"jE>,G17D &:x $]|&l @^`Pq1rx2=:@p<$'ytAn" טq2c7^( @s_; e`x<P x * 1(gxP D`xw߲p f+ĎfPUo8`a:T}x<uh\ c(:HSx:H@.W`5hP2 . y/!ټO`0qD'ˁ]~L*\O6LPc`3 `5q_36ML$E[ZftU8Uׅ 4su^rx@.kAG|p5ט5^(<p׃e((\EWa˃b ]Dpc-x@,n0?*, &{Wy? C:07¯ dd!qA@ !{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI xbb!z ! Axux@M`rY^ AgȎ&CGJ FW@GD@W@(t9TPګn _;(aJGW?-2Ƈ@/H(>^(j@3m ^ xx Lx N\}"}r?m^=@jPeb{yhטC@817A@#&[טq Yؠ &0OQ^aR)dPAy4h 1` h@; TAj}^b#8o#.H  3"&Ley$ا@ G@UEEIW8#@vڼ¤ !g>I oLP@uM݊ x`^ט [S\5",q>ň` 4,D yLP07pA,TP"AEj0dY 0q}yH!fPpΉzK=~k8|"t8:.0t\A;:uF P|@ k 6)ܑ re6}yfx*t'^4A8c?\FfArA" =WA#xhkĂuxێp`l= 0HP`` 2`WP\ ?z16]W0P O=^#G@?8:^f>>052 "#}xJQUB{0U4EHYcȈί 0FEW.xP0`r8* W06ig > Āi9 op 5`F P:-uQF>x 7ׂ8 =x N#㠢 5 pq@nÈ@@@oUx6#((kaP`Dl8?\* üXx0W[0!^$s2P3x1BŔN;<}UBphex#@?@žĎx @1@Jt*KGuOJoPpX|y$pp0x1׋ >\ F2fU| 1bhU c4<l|8ba"*O0P Jy®(Qࣕ@,@jt7;^ <D.(.D{"|;ױPF< @+T @0ߏv>pjdN:Gm"!.# >(pPFm J=V*P b$[:lbx(>:7^(10pUx!Ai:hj`` @,AvP%@(|U8 @\ 01ףX@v"¨x`:9A30[,@?B"*|#\TW#soĀ:d@tAP <`WV de6kx Py1ר(xlccBmSP2 8Dq0W:Tf22@B:" > Cx*ʇ_'Xuj}^DrP`.@ ܪ:ol^4:|AG%0CTE @o " p|^\XbJ&YEBB: A1?9uG-O4L !\Mϊ%H @,@^ (1%\IyՉ'!@T M!p.& 7ixRI ąT+hw2 HskS N _(<ĘV/ꁃc|^bb! ! ?t!j e2M o0"!c)<  ZOH|D HE!#Fh ,S.I,j 6,}L!\BD& CPL oSNf'5+01&F Hh(Pegb  I9e#*ae4`<@ ɥԱfO0 ",PɅ2D5j q  9} (Q,0 c +Mܸ2*G`\JIL[h43 D4 :C6z T'lp(wS5-Z &vITD(%REL4 F>45Oї^r7qU^9$JSb:\>(h2^Hy3I%"` J$ VZOJes(b[IҾJOLĢBU%'0 iC2֚̓68NXr >&RH /#~"Bƪ97!z  *L/bI BZPm*`T Dbri&~K4`0S P",r >,뀨jwrPcژ(lrnf2Бcy!n JQ)**̳ p273H"+` Єbg졐t2P x I()uO_jt'*$NBJ+ (7#7+zg@ M6m[6 @>^9!qomMDu@tu`B5Ađ㠡F& uA(\. |(uQ #UP O=P9:Ъ$Ogf`jeT _1 2iJ:UB{0Ux,0uGDQ[=c@MSE>P0`r8 p QL t:8 }@TH a` _d(tMP@t ?0(8 |`9wPa(#@@r@4pWP@p<$' N#㠢 5Bu0\$RG l<jxj.(p32fU'f=D ~6>0 0㇞pfML$EC@ҫ]BN9:pQʂU@AG|p5(.D{"|;ՊB5A`v6` I @5@t?;YTge gx:/je>tF` 2zp7Tk(XU`:99?PPF>/"81 Y`BXy` OPav<t _0D(uA@U7¯ xu@BmSʂYr#꠆( tDAC`:PCj bMz'pT(aJ@ ܪ:42-24:| 8,p1PBgP9  xQ0ahY8t(r F TUd`E_ ?` =Ɋ]` ouȿ'Ka< 2>/9 9 [Ek> U >_‰ww]]bb!a ! [<QWwF:. e 7=| 7Oq-u;ˑdxH㣮AQ2@^q̯zNx cGDu^i>H8*݃￐xɐ?4c@w^P@c,u<u_x Q Uׇ ?Tuyq j:#Ca ;@`{222 cD"xf>׼\ 5+@4 Q"@ ҁ6 M*;y~\ۯ, 5y"tux??W:UxT@^d9P2לWN e> 1 ?1r:P8+j@GѠחW ڽ dO`oN*::9ર̫m^0 7UT [v gPmxF5^((- ^ xx*t-.`U[hTy}zEAט2**P'$?e${\ @1mhUETRDT11uEUxy$?yP@kʝ{&:H t|uڽW\.Gqv _"xup}_"OAy<&U~u6^\H}xnP{^ 0 u{X9Ȳe^h }n=P *Fl.tffSJ_:6ŸrEp$ ~y^@EȠ^@n#=^0%WY:T 7uS$8ϯ_ @!O zDhUx|€6nX`7>"Jrb){*s*W@ x80y@݃g:h!bb! u[^5 eW D x =)dd!!@ !gwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZwwwwww{{{{wwwwwwwwwwwwwww[űlmoֵ{{{{{űl[m浭wwwwww{{{{{wwwwwwwwwwwwwwul[mk]{{{{l[űmkZ 33DfffffUUU$mI wwwwww{{{{wwwwwwwwwwwwwww[űlmoֵbb! ^bb! 1 ! w p}3hJF;L41|BlRKF %쪏toϯE$5H,5=02>[D2nϚ(hHCH+n$ؑXuӷJ&Ki~*` H]L;Tgd. k@&~8 1U0 S+N䉀a@ JbAS?? 1ʀw@D(bjy)ov-9G`vWh+ 0 6@H@HT$'Q`(&4Jc@W3i$L 8%!!1EKf0 hiDvhEY-a1_=b`LC;EvFe0i҈EmAA1$_Ԥ)0D¿%@jE2 x%10*HCy-efVN! #Ebp,95?3Dħm D,BŤ-SBl. , Tr >! /,b@ @6jg\@?'& Ov ɅQ0 ` y !mTW伿fY#$l~A0ae3@Q /1(PR@ @~1 C3c!J @'@jgQ07;@hK1$iW"HM/}ټB+.hh!| z0p H}X\ ʃC{Drj#f{h2ҹ Ll^}`jCK@13c@!(Rs"rLXnb@iS4SbF#_$NmtLJ8͠ @c~@@ņ2Ku$S1A#@s5ee°O| ҎQY ߊ0$D2&ah\XjrS9csp(߄)T T옔#w L1& #>1!S*LNۿԣx\b:>D$A#hz @vSb995vp o4n!Lg0R7+7td:K1X JHܵD @'%X D(P.b-GA ʢI)RQ\tRPCx1%bMD3RmPQ KP1"Az\ 4.::PqGG@lqA<"yP46 uTK 0 QGDODpP~ud;}H14dyU:x uH[Υ:hWxw 5Q a6` glʃO`9U#`0|5!͈W;kjjԭU+T.I4uJ@RDRGTH tW}'L2AW4\WN'M ><I5 ໕\oP0aQ.$ GT#Ca8 j 0 4Nr,T3\hp6p7P@4q-tf 2Uh`ѷQnjI @"wu"tuA #=Q*N( N"}I_C9\ 5r5z9Z4ڗV@/PnP@U"G*@T`n ?@@Ea x2-CThuª5 eTPP @  9bb!A Q bb!š ! _ x+t8??긿Oo@t2`1WzP&E#H#ǫqKRk 6D1FI=U&@&*E^Վw&CD!@2#ї!T"-`x1\"LUE&BHpRdk7#1.6ERd*LQ-"**_`bɯO$>  ˀ3ΰNOc "}<"ywWOQI^ Öx^+ _WyPfu]:xxUz򣣯Wuop?]S 9^/8 c//O o <GOo;%mU;[üXӀV^:5:T*SusnTPa'UyP៧W#o$N_޺x;Uo'W*xruypEGW(u؉_a@} ۯ$UU^:Dte{*Du:˺ח::@^2 1ҫr;y׏%@r/k:zUX]ם/UyNTu꯰gU:T@޾@>Wەt hup^Px2ʯ%@@}w! C ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?ETNFd``q@`:  SINFEND!NERO("libcdio-0.83/test/data/cdtext.toc0000644000175000017500000000173611114145233013666 00000000000000CD_DA // global CD-TEXT data CD_TEXT { // Mapping from language number (0..7) used in 'LANGUAGE' statements // to language code. /// LANGUAGE_MAP { /// 0 : EN // 9 is the code for ENGLISH, /// // I don't know any other language code, yet /// } // Language number should always start with 0 LANGUAGE 0 { // Required fields - at least all CD-TEXT CDs I've seen so far have them. TITLE "CD Title" PERFORMER "Performer" DISC_ID "XY12345" UPC_EAN "" // usually empty // Further possible items, all of them are optional ARRANGER "" SONGWRITER "" MESSAGE "" GENRE "" // I'm not sure if this should be really ascii data } } TRACK AUDIO // track specific CD-TEXT data CD_TEXT { LANGUAGE 0 { // if an item is defined for one track it should be defined for all tracks TITLE "Track Title" PERFORMER "Performer" ISRC "US-XX1-98-01234" ARRANGER "" SONGWRITER "" MESSAGE "" } } SILENCE 1:0:0 libcdio-0.83/test/data/bad-msf-1.cue0000644000175000017500000000026711114145233014027 00000000000000REM $Id: bad-msf-1.cue,v 1.1 2004/07/12 03:57:28 rocky Exp $ REM bad MSF in second field - frame should be less than 75 FILE "cdda.bin" BINARY TRACK 01 AUDIO INDEX 01 00:00:100 libcdio-0.83/test/data/data1.toc0000644000175000017500000000017411114145233013360 00000000000000// $Id: data1.toc,v 1.1 2004/05/08 20:36:02 rocky Exp $ // Just a single MODE1 track. CD_ROM TRACK MODE1 SILENCE 0:59:74 libcdio-0.83/test/data/bad-cat1.toc0000644000175000017500000000024611114145233013742 00000000000000// $Id: bad-cat1.toc,v 1.1 2004/05/08 20:36:02 rocky Exp $ // test catalog number - no catalog after word CATALOG CATALOG TRACK AUDIO NO COPY FILE "cdda.bin" 1:0:0 libcdio-0.83/test/data/t7.toc0000644000175000017500000000025611114145233012721 00000000000000// check two tracks with pre-gap and ISRC TRACK AUDIO NO COPY FILE "cdda.bin" 1:0:0 TRACK AUDIO NO COPY ISRC "DEMUA9800001" FILE "cdda.bin" 1:0:0 START 0:5:0 // pre-gap libcdio-0.83/test/data/bad-msf-1.toc0000644000175000017500000000031111114145233014026 00000000000000// $Id: bad-msf-1.toc,v 1.1 2004/05/07 10:57:50 rocky Exp $ // bad MSF in second field TRACK AUDIO NO COPY // so that all CTL flags are 0 FILE "cdda.bin" 0:0:75 // frame should be less than 75 libcdio-0.83/test/data/data5.toc0000644000175000017500000000032311114145233013360 00000000000000// $Id: data5.toc,v 1.2 2005/01/23 00:45:57 rocky Exp $ // XA disk // CD_ROM_XA TRACK MODE2_FORM2 FILE "isofs-m1.bin" 00:00:00 00:13:57 TRACK MODE2_FORM1 PREGAP 0:2:0 FILE "isofs-m1.bin" 00:20:71 00:00:00 libcdio-0.83/test/data/cdda.bin0000644000175000017500000255324011114153226013256 00000000000000    ( (   >#>#k1k1;;vBvBa6a6>+>+   nn>>llBB))mmq5q5ddYYGGKKqq\\<&<&UUyyddQQ_0_0 CCj0j0>>HH`/`/;;rrccyy++^2^2bbkkVVjCjC>">"ww99""\\u<u<ddEELL z z!!gg00EE0!0!$$OO``^^22H*H*!!  55@@F2F288\\ZZvJvJ`3`3NNPP@ @ **ff((ll&&MM**XXGG VV66QQQQ  __^^TTffQQqqEECC""44UUdWdW===%=%QQ ::H\H\xxv^v^||[[__ppV4V4I}I}!!aarrbb[,[,MMnnWWBBe/e/WW??vv44EE;;MMl7l7]]ee.1.1SQSQUUnnbbDDccU2U2lIlI55/!/!55NNzzaa9w9wnene++oJoJ    = X= Xd *d *ThThQQ}v}vqqxxq q 44CC`K`KHH@@ddgg[[**iitt@@b b TTeeCCVVYBYBnn""\E\E[[9*9* ``@@3%3%KhKhvv#Tk |    O <O <}+plkkkEEmm__HH??||XX>>cc11'Q'Q%%   + + B BgvgvnnUUHH}}33 W WZ Z  : : v v' ' NNii==JJ$F$FI)I) _ _**; ; $$EEJJkkK?K?j,j,MMXXii rr8+8+8877g2g2LL__$$WWllHH;;eeee''IIff ccCC  22%0%0''ssdd((nCnCllUUT1T1}I}IDD11CCXXooiiDDmmqqggBB88~~^^\:\:  !!vv44EE||;;,,eeee^^ss@@zz^^ s sFFkk{{   " "gpgpuuBB77ccrJrJL L c Zc Zl= l= P P   v v,|,|"",,88((bb      e+e+OO  33AAAuAuUUOOn4n4M-M-77__ 66  cScSbb%A%AKSKSoo%}%}  II| |   II33HHll#k#k[[ADAD55))""  !p !p m=m= A A - -{{$P$P>>bLbLNN__jjII*> *>   L L     {{LL   A A??rr+F+FyyJvJvTPTPWW  hh22**||VuVunnYY4X4X  dd  s\s\rr>>MMTT|(|(l$l$//  ((^[ ^[ g g w )w )uueeqqmm,,ZZxfxf  c|c|M M ? d? dnn4:4:x#x#pp??@@KK00 % %GG  11 y y33llVVFFhhOvOv99BBJJ\\PcPcff@@dd%%   @ @UUBB8 8   qq((,y,y "("(B B   Z0Z0LL     11[[GG@>@>~e~e*8*8  n n   kkPP**LLe e   p p } } M M r r [J[J$$ ^ ^[[MMJJ##y>y>}}tt&&VV>>--  #j#jXXBB= = wwx<x<\2\2C)C){{aa??BBPP88jju =u = ) ) X XaaGGiWiWFFqqJJ~~ ss * *C'C'ww  tjtjcc4T4TyfyfggGG88TT::==UU66ll##EEwwvv b bR -R -##@ @ qq77""99..;;9944""  ==  77 X X ffuu7 7 P P FF   @@2n2nII+=+=DDooZZy y p p ((  ]]IIRR""h`h`ccuuN$N$uuII~~>p>p%M%Mss0 0 MMiyiy..ii>55x jx jnn9911}}[3[3tt))::OO;;y y DwDwY Y   ~ ~ jjnnII!B!BLL M MMM<< 7 7 ) ) FFMDMD< < W W 7 7 nnhhKK))MMT T P P7*7***"Q"QNN  77 ((((111ۜ1ۜwQwQkk W W  hh. . e e   ::~4~4**ccZZBB? ?   ; ; t t uH uH + + v v F F   Y8Y8>>ߵߵ_D_DVqVqR R "W"W))<(<(ff  ''h&h&xx;;hQhQhh.. X XkkFUFU&&      Gq Gq F F qqppMMUU@ @   AnAnvv  z3z3FFooOO^^l\l\++E E     zzLLdd55uuvv44/"/"sDsDEyEyz z \\ wwQQBBssyy  KE KE        ##mm""LLY(Y(((s 3s 3    zzkkgSgSxxr Tr TB;B;||YYHHvv<>qqss&&KKpmpm  ' ' ll????11@M@Moo  xxook k hh;;: C: C  //  e.e.nnzzv(v(??ttKKqq    R!R!p p ttll..qWqWdddd//__p p #V#V..(.(.&_&_7f7frrgg 8181""+I+I88qqH H # #     ZZ2255NN//II22II<<    f f   ) )    xx]B]BUrUr|؅|؅6611YY7 7 ;;((..5+5+1#'1#'. . susuqqD)D)--] ]   | | MM;;==$$EEjpjpd d U U c c ?Z ?Z ''ffSS*~*~_C_C55886 6 dd. . > e> e{{UUxx55S S hhii X X   m mD@D@z^z^--H)H)l)l)P,P,XX1919YYjjKKmmF/F/ 11{{''    [[a-a-,^ ,^ y2y2UU?b?bNN77"""" MM T T  $ $  #T#TWWdd--vjvjVkVk::VVHHJJrrggGGPP88JJ==YY]]))==TT]]X cX cx Yx Y@ @ N N x x MM88;;ZZ11%%QQ   { {nTnTPPLLEEuuii ` `    tt i i5544zz  ODODaaOO' ' ""ffggmsms$I$IRV RV K K %9%9% % aa @@};};>>&&||CpCpjjccG[G[ ccwwoOoOvv    1n1nd ;d ;JJll55..hhTO TO BB~~y y F F vv(A(A( ( aaVRVR tt"@"@ZZiiC C &&""  $$/ z/ zRRccӊӊHyHyZZqqWWC C ;!;!$$!!V gV g44KK((xx**UU  qqJJ==::}}TT\\||FFCC!!A JA J  f f p p qwqw&&,V,V//u u 99!A!A""N N d d ''D^D^J۫J۫ l lJJ * *D2D2g-g-$$4 4 VV"Ԑ"ԐRyRyݡݡ88{{EE  {{((    ) )9966c~c~**DD||004141qq{{Q Q = =         wi wi E ERR]]ߔߔwDwDffLL  D2D2&&(( # #II" " f f f#f#7s7s    @ @ D6D6nOnO S S88YY  G G V V 6: 6:  qqffUU0F0FOOqq}}  > > HH--  E E gg]]ppp}p}??xxvvy (y (  DDkk,^,^**K)K)tstsyyllYYbbAAAABB+ |+ |3 3 **rrKK55//]] a ai6i6zzqq  R R    - -GAGAHH//# !# !( ( AAHwHwEXEXFF))((rJrJ,,UfUfvv : :  ` ` 9 9 P P ( (;;DD))DDQQ ++]]  i Yi Y: : ::AZAZqqqqeep=p=JJ  wx wx   r r p-p-llt{t{ q qPP..pp  uu--  nnSS[[<<445]5]@@  , , //g g ~ ~ ! ! *i*ibbnn ii``xxnnxx((&&$ $ MM  ''JJG`G`}}MMwcwcB B 8b8b}}    IIvv --++||@@WW[[d d ""J J   mKmKKKAA||bbn n EE##~b~b  $ /$ /**DDhhyyNNCC((??h Sh S--6)6) E Eff7w7wGGrrIILLvv  %%tQ tQ 00&&mmjj-F-FVl V uh h uu  " q8K oH  ))5050 Ѵ ѴDәDәa.a.]]  H H..o1o1#+#+ww] ] ""p@p@BB    88  9 9 ~ L~ L   ee33??CCbbwawa66yy99t t E E   q q ~Z ~Z Y Y q5 q5  f fjj((ffyy&&  **%%%%$$   %b%bYY / / * * 9 9%q%qTT[[V#V#hEhEm m   ; ; j j D D   PnPn))7W7Woo | | e e ll     //**kkJfJfJJ EzEz<<jj__YY;k;k{{xxWWcOcOSSGGuu ww''[[MM~~44w w I;I;r%r%  q q Y Y iihh,,kk//CCY1Y1 \ \  a a   --"{"{xxPPjNjNxxPP!!o`o`uuiieeeeMMMMww|X|X66UUd d ?dEobbXX D  u*  (   {n{nDDcULLGvGvA{ p{ < m< mY Y PPAA m mAkAk--( @( @ v v 8 8  QQVVAAN N SSWW$ $ iiXX55V V 3 3 [h[h>J >J   ~~IIttU}U}{{DDjj > >SbSbvv.q.qynyn m mz z t t    4V4V4J4J`%`%JJnnPPvvN(N(jj \ \&&4 4  h h..NNggddk k % % CCv jv j33''׋׋;;SSUU??  $$!!CC ^^++iiJJ{{   e eee>>FFuGuGx.x.AxAx 00rrLL ' '  **Cj Cj  ,6,6hhMMPPeeOO  eeR R t#pt#pK! K!   * * aa77885$5$MM 7 7  hh(&(&2< 2< /N/N%%  }}vvBBԩԩGGww--""  h3h3a~t j 8 |8 |ww'@o=ppxxRRWWW5W5^^//66;;^ @^ @  i v qL    ' ' J J H ARl\ 11nn6f6f  : : pp""!!774 4 LL 2y2yLLQQaa99SS    ppZZ|y|y@@``.. o o  ; ; y y..MpMpbb@@&&55BBGG  + + ((V V  p/p/6*tz5XX55qa8[7GG ~ ~W PW PGG  ##__ 99ZUZU  ||3J_w 66>>*Z-gGt66HH__22PP : :  ??aa66) ) dd~<~<[[WW77vvbbtt        ))??ACAC99mmzz3F3FKKddQQmm &&ffKKMMaa_}_}ddjj  b? b?   b b  @@ww''--BB3O3O        xxOhOhppLLkk  Au Au     00))CC``ssk k   RRp p jjL}L}DGDG..5 5 DPDPpp( ( ShShKK##22**ff2Y2Y<<*<*G>G__**bb''""  VV/ / * *  X X >; >; h h xt xt 33VzVzZZQ Q --JJ5ت5تڣڣ99: : Z)Z)G.G.,,$$kk++UUvvPPTTGdGd)) z z6 6 T {T {'k'kii C C  O O _ _   [[KKUU55؎؎C"C"jBjBll  LL  9% 9%  %%DSDSUUjj;;w w   e e     G G?-?-m]m]   { {, ,   -2 -2 | |      # D# D      ? U? Uee::ff""FF      f f d  d  GG00gg<<ee''5T5Tzzhh^^66,,;;qq''....``rrWW--xx<<VKVK;;DD" " hh  ?6?6iiݦʽۦʽ""00TT : :wW wW WW))y y ??~~ + +""ppZ Z   ++\~\~ssvbvb''WW         D D4 4 __KK!!!!$h$hxx b b TeTeI&I&F F 66?? KK}F}FEiEinn33{{jAjA[[~~tt܄܄RR : :?? II_2_2U8U8rr~~**CKCK   C C   M< M< r r r6 r6     p p   $ $     [ [  k kFFc c [[vvPP991v1vqqGGhh??2h2hgg  zGzG ||rr-4-4ppqq>>TT^^pp*-*-wwmm    T T   mm  ! ! ::'m'm}}{{U"U"ttss*I*IPPMMSS & &3%3%^^QQEE````$$NNtt/"/"eeNN88rraa// \\;;KK   3 3\? \? d'd' a a    ` ` ddjhjhTT>q>q t t> > ! !  ' "' "--NNCCjjRRr r  Y Y / /  tt$$ee!Z!Z~~FFgFgFII Q Q@ @ fD fD Pz Pz  ++OO^^??LLWWVLVL 22f0f0UUQQ33HHii33>=>=PP[[[[PP2W2W,,N N < <   99  55  3# 3# B FB F\\  L L   WW    7*7*/ / v v ~~<<II<><>KK6!6!'<'<""rrBB33VV11޶޶OoOo]q]q44߳'' ݿ ݿ``PP55aa^^00^^ ppaxax v v   ""%%~'~'*|*|++. . Y1"Y1"3c$3c$;6"&;6"&h7&h7&6&6&3$3$|/!|/!))m#m#BlBlZZ]]3"3"MMOZOZ}}   JJA(A(bbEE##ո]׸] ̪ ̪ҹҹ߫//>>FF{ߠ{ߠ}}~"~"[ѳ[ѳiɰiɰYY0B0B{¥{¥LLؿΪݿΪ > >II  ``]],,RRQ Q |Y |Y rr!!m&dm&d**<-<-. . |. |. m/h!m/h!0["0["1=#1=#F2#F2#%3$%3$ 3# 3#M0"M0"O-O-`'`' ! !cc  ~ ~   6 6 ' ' 88dd00HH$$22ooTT<Ϡ<ϠƩƩqq--Վڎr0r0ooIDIDX[X[{={=ZZ?l?lTT;;>>55( (   ffB\B\00  S S   K K C k C k     y Xy Xg~g~22BByy{/{/66CC99oommR3R3ooFFsjsjyyDD NNss44UUI I aaH"H"j j   XlXl##7a7ao / o / zh zh   3 3 t  t        DDffoo663d3d::hhffv)v)BBzz--izizyyVOVO]]ppB3B3==FF.:.:rrii44h h     %b%b]V]V  6 6 ]]33@2@2++ff F FN N aQ aQ n n  , , ZZDD2g2gcc66TT;;``44L L nn&&>ZZnn.b.bppbb~ ~ IISSll{s{s99YY;B;B YYZZ ""]&]&{{yy``h h       %7%7@'@'mmFF5!5!VV A A   ItItx1x1PQPQg g   l l 99aa==  bGbGjjtt{{ffGGDDq0q0s[s[& & zzPPܟܟssZ؎Z؎((ݎݎ__Q Q ,,QQxxNNuuX-X-  UU#5#5)U)U- !- !a1#a1#3%3%4&4&/6+'/6+'P7?(P7?(9@)9@) ;* ;*c=,c=,s@.s@.A/A/B/B/@.@.;+;+4&4&-C!-C!%%NNkmkm    *f *f     L L vv;Z;Z!!nnQ}Q}ҞHΞH'l'l*M*M7Ɔ7Ɔ8˞8˞ЋЋ;;ݧܧ2ͤ2ͤgɪgɪf>QAQA& &   $7 $7 +O+Oss  **3'3'>4.>4.*EJ3*EJ3E3E3Ci2Ci2=u-=u-4&4&*?*?jj    4 4 O O   K. K.  $$UU//wwhwhw}'}'IIٹٹKӛKӛXX_ɘ_ɘ/{/{mmggggnnғғagag}}hh'['[--cco o ==bb55vv  C C B}B}GG!!||iiFFaamm==FFDeDe-j-jkrkrO>O>G G      hJhJ   7 7 w1w1   <J<Jii66##==dd @@88 @~@~>>AA,ߑ,ߑާާb b <<001f1f!!jjhh~~oo8"8"88ll]] : :<<##      pX pX !!%%(=(=_)+_)+w(Ow(O(&(&##!!  l!gl!g>">"#|#|1$"1$"l$<l$<p#p#!!mm} } s s / / WW%%=M=Mg>g> eeAA B B==fڝfڝ--&&55}}(X(X@@_ފ_ ۱u^u^GG__rvrvRDRD8 8 ::``ddT T   y y   m- m-   8X 8X g g   Gk Gk ))ZZ66MMpp   EEF 5F 5_ _ aa+ + 22  ;;TTMM55@ @ dSdSOO W W  knkn  eeN N Zr>r - -## ## &&E)E) ," ,"@.#@.#R/B$R/B$s/$s/$.#.#-"-"+!+!); ); I(I(&&%%o#[o#[    @ @h6h6UzUz99))ff!!##((DDO԰O԰&&hYhYc8c8xxXX\\EE''LL%%kkAA  GG[[%%L pL p   G G } } [ [ < < 8 8   . . !5!5e e f f   >b>bfefeCC^^;;xxXX::;;GG::XXzFzFllaa%w%w. . ||cLcL tt  r!r!ss l l HH||>>,,rrq q 0u 0u   H2 H2 00]]PPWW==}}ll uu=A=AYYggzz2K2KCC>>]]qTqT$|$|__mm00I I }}WcWc   a a  MBMB?? t tv v w w kkraraMM     99S S **99aa~~!(!(s$s$77> > &&c"c"J J BBQQ??oo]K]KJJuJuJAaAarrAAUAUAWWff ffMM@@zz ..jj22,,`<`<KcKc**uAuA.. KK  /2/2GG \ \ 44II "t"tEESSnn$$+"+",S#,S#''''xxO4O444&C&CKKIIJBJBgg4 4 gg  i7i7hh SSmmXX::++00++33kk\\ ..ccvv>  >    . . N N ~E ~E   kk mmnn] Y] YCCa)a)/!/! ! !00 ||99}}))ZZhhPP55YXYXii55??@@ososooBBbb K K QzQz&&A dA d" q " q     +s +s  FF  QQ    ""n n yoyoMM@ @ T_ T_ 8 8   D D 3 3 v v h h __7-7-Y Y HH]]F\F\GG66#T#T..==??)q)q>>yy'a'aaa{{&&yyttMMff[[``KKOIOI::5p5pFgFg00DD O O % % # # z z g gpp^^))FFDDTSTS*T*TvvGGll       p p776F6Fpp/x/x\\<<==|y|y||MMxx22HAHA  O O > > g g 4  4  IIjTjT00\\C 7C 7   x x 88~-~-' I' I^^TPTP UU:5:5{{7L7LnnttWWV\V\'m'm&F&FSS((ee::$$:[:[66gg++aa m m    OO11##%%""{{  OO  ( (   ()()II::O O = =   nt nt GG9 ^9 ^5L5LSSvv\\nnXX``QQDD@@YY ] ]i+i+@E@E((bbjj2*2*AA]+]+gg;;}}00 bUbUGGoPoP[ [ ''gg0x0x``& & uu66--@@[[hh_q_qAAi i c c XX22:: a a  wwaaxx{{\\   KK}y}yX X //EE-4-4~~EE W W Y Y     a a tt$$9-9-uu_]_]__ AA--R9R9KKuupqpq##HHt!t!ff  <<--NN__P?P?++ppSSCC   y y B B NNuuVV%%|:|:55""  , , ]  ]  [ [ l  l   zSzS_1_1  \ \   --p p 4 4 nngg\Z\ZYY33bb,,nn W WNN E E=d=dUUzz++XXr}r}SSII))KaKa]]33pp3p3p{^{^@@SS0055r{r{YOYO  y~y~> >  "v  wPP  @ 2@ 2Jj#uI~\\..YY,""  K  K  Ij&EE;;XiXi00JJ[L[Lkk4s4s&&iiaaZZ22rree/R>11\\66~[ce+UURR7vI]$]jj?\?\**BBXnXn77TTL%L%,,i i    Z Z xxJnJnoo0077ccSSWWiYiY^^ JJ##ffAA  // F F H H _ _ > ?>0"c9c9y;Z9Fp2p2t t SSII;; >> jj~~tt,, ( (" j " j         & &I[I[++[[22))|3|3BB%%  %F%Fyy>>||KKssXX''33 @ @88`` ` K ` K m m WW11``DD  nnYY$$  uDuD$$:<:<~~ccnn||k k w # w #    _  _ : :  ]]  FFll22bbP|P|TT-n-n} } } i} iBB6600 ..++wwNN PP**  UU((nhnhOO] ]   a A a A G X G X  nn4.4.R&R&k k t t //NN    SS / /ee55  uuAhAhAAVV&&B:B:GG~]~]DD]]..{*{*gg44//cc}}  ::   d d H H mm\\      b b 4 4 "h"hKK  + l + l {  {    n n O O ` ` / /  cca a IIdd||vv!!vvKK0s0s  77[[8q8q[[00AARRddVVII..{{uuNNiiYY66--22popo GG!!11>S >S nnT@T@33,,HHGG++XX;; ~ ~r r dndnZj Zj  SSoaoaKKYY0 0  i i   H H     *8 *8  l  l h h k k H H ^r^rQMQM| 4 | 4   SSUU=}=}jj] ] ^  ^  (( ll}}ii XXGGp6p6 qMqMFF\\9]9]eeddQfQf@@==11;;r r \\<<``eePPQQ     3 3 Q Q P P - -     OOmm--llVV  dd!h!hVV88O{O{JJ||f$f$!!mm:: ododttQQ00 >>__YHYH6 '6 's y s y O O     |&|&##SdSd!!__rrllhhEE9a9aii2Y2Ymm Y YppVV\\&&00vv??[[dd]]FFEEz#z#cYcYLLEEE E   @ @ R R  [ [aa"'"'88II++jj1o1ojj>>/3/3}}MM||55pjpjPP   ) ) ( ( ((mm[[ddHH  g g V V l 0 l 0 qqzzQNQNRR=X=Xvv**ffIxIxb b ^ ^ ~Q~QcUcU11mm||o&o&PPAAdd--aa, ", "L  L  W W O j O j  PPkkWW##DXDX Q Q $$  i i g g %%rrj2j2  7X7X d d;;((``55qqAAvvEE222;2;RReeNNd4d4bb22qq!!SSC C xxhh&&==%%\ \  A A . .%%w%w%]$]${{  = =    k k   h h   x x *C*CF.F...PP''UqUq?y?yLޕLޕ}7}7xx"I"I{Y{YfBfB==26261717ޖ__ߞߞl\l\?[?[ii88vlvlhhEENxNx   9 9 ~N~N%%WWqq{|{|V1V1JHJH;-;-77]+]+   yyvv##~~DDuu kk==qq  xXxX--iidܯdܯtt޸KK""))ff  SSRR00 A A   7 7  o o     y y  tYtY^^DDIISS]]_F_F8i8iuXuXvvll!!UU- - 44DDRnRnJJggRRSS!!KKZZ!!; ; XXBB+C+Cx ` x ` ""ff__uu ` `   r r       ppPPOO``""KKkk%%lZlZPPZZ  3E3EOOppHzHzUU"  "  p p ! ! XXzz^^ ZZ{~{~ffJ)J)yyNNLL##II66**jdjd''jjjjvvUUGG=E=E{{v(v(;;AAUU"Q"QA$A$##[[GGwwLLRRoo    &&8811  QQ>>p[p[ewew;; ``RR((7u7u99qsqsVV;;UUeevvHH \\DDllEE++e e l c l c *  *  TOTO<<,,4%4%k[k[&_&_C`C`Y_Y_ImIm00""}} +"+" O OHHBB**;;EEkk##^5^5 77bbOOLMLMMM@@66EEhh??WWtKtKooe ~e ~3 3 eiei))$$jjYY""S#S##T #T # # _ _ uu[C[C R R nnh h   gygyK6rY5ލ5ލٸ܈ٸܕt٭m)߿l/I/I''zz?c?cHHGfGf664400>->-??   HHjjii,3,3uSuSyy0202,,0!0!))[ti@nFF   n0$7==+V+V66x#x# nnddVV\\88e3e3hhtt''HH{{""YYTT??)u)uYY bb''0 0 LL H P H P S S J T J T i i ""  ==DDPPaaj~j~ttuuD D GG.. 0404MMo;>;bb``scscrrc c 77LL$$oo ))QQ``/./.00 GG 5 5 V VVVIIUUPP44GGFF""55HH\\ D>D>  t B t B " "  PPUU;;u?u?NN L L ??SS$$&K&KXX] W ] W RR{ { ##hhz3z3NN m  m VV00ss4Q4Qw w /g/gLvLvHH((  vvss^b^b3~3~__f f @@XX}}ccSSFMFMttiwiwllm9m9??yy33008!8!77jqjq? ?  ss$#$#*)*)/I-/I-10100I/0I/,T+,T+'&'&2" 2" yyKK|}|}1414#)#)vv ,f,f^>^66 dddd  i - i - 88$$HeHe  4+4+ l l a a  7  7 ccDDQQffeoeo /N/N H H   X X W % W % <<ggp7p7++,,^^1B1BBJBJz6z6GtGt88MbMb~~/7/76Q6QaLaLQQ77gsgs22jMjM##TTss2 2  00pp<<:: mmSSpNpN:: z  z @@ll{{FF UU@@%%AA77??$$I;I;SSwwEnEn&9&9||mzmzaQaQ..7/7/EGEG` } ` }   \\(>  hhtt&&PaPa%%OO}}h.h. % %XkXk?N?NlqlqRRmm. .   ccnnuu??&&yy\\GGN9N9RTRTRR!!NNNN3333}c}cLLYY A%A%&&',',55EoEo:: & &,, 66CCDDeeEE!!L L n e n e ++ # # p  p  9 9 &l&l R9R9O O 22RRRBRB22ss%%ee11\\66HUHU~~ssj j ZZss vZvZfIfI?"?"wTwT{c{cXIXI  C5C5A+A+KKo o F F _v_vll  & = & = #R#RQQ//DKDK55IIcc S S Q 3 Q 3 <<d d  " "{{jjhh   [[   a a ;;rr;;UUkkJ%J% t t * * <<8r8ruNuNopop\\OO----yZyZqkqkkiki&@&@EGEGaaGGYY##55 * * X X 88MSMS00__TOTOnn}}/p/pkwkwSS""?I?I i  i l l Q Q ee\\ ??,,jjii 66SSss{t{t))116K6K_k_kuuAA||#2#2  rre0e0d)d)JJVV    d d 33  CCO O --00ll66\\RtRt1[1[uEuEvXvX<.<.CCttttGG<<vvJ4J4vv))KK88^^++/B/BDKDK|T|Trr""JJ%^%^))PrPr$x$x55cUcUyynOnOXXMMBB B B g g ''rrNENEX+X+ ]  ] rrbWbW $ $ ddxqxqeCeCKKsTsT''8 * 8 * i i ..--}[}[YYNN22{{<><>C C o@o@iiz z 88xmxmfUfUCC)){{/j/jejej~~oo==8 ~ 8 ~ i  i  C}C}RRBNBN DD^^$($(QQ\\ddOeOe@@2a2a{{zz ' ' vv__,1,15 5 U!U!;;11 [ [ //\\ s sz z JJvvKKZZJgJgAAyyg g 3 3   $$;o;olqlqvPvP}}//Y^Y^JJ~~wwAA  O)O)oowwoo[[~~::]g]g[[0 0 <<kk00,,N7N7igig__ oo 2  2 ))ZKZKK K WW@z@znn__z3z3'' m`m`EE^^&V&Vff<<}}H/H/wwv8v8f f HH``NN<<MM$I$IPPRR]]~~"";;brbrtt$`$`@@uuxxzz9 G9 GuuR0R0oo  MMUeUenn!!44hh,,..\\AAzzeehh77Z5Z5>>eeggPmPmDD++vvAA.F.F==mmlleqeq__..!!AAhhbbLlLl  eeQcQccc'J'JnnHHzzg g U U % % y y   22F F a a x x **{{tt44##E E J J   rrIMIM++jjllaa } }JJ]qUs:-XX;Rkg((33{FS j2SS||e'e')e,ll n<)){{ `pN^88+F+Fii   w'w'&&II\\}}m&m&dd??VV55  ,  ,    CC&&}}||CCggaa^^% % g g L L   ''\\ffttwwTT==@@3 3 ! ! ( y ( y u o u o %  %    LLGNGNDD??rr[[++[[t't'CC&&PP[[6633rrTfx1eeQw[t 5522aaTDTD]]::CC PP<< Y Y==rrkk==ff,,VVZZ??ddeeW!6=wcIIRR >>ii]"]" 7 7ffg.g.kklls s <<^L^L,?,?wwJ J H H ==FF1%1%J>|M|MXXss>>^^u]u]$$    66hhc' c' Q Q ] { ] { 6 6 IIww44wOwOII ||pp__;";"+2+2,z,zbbRR ! !qqgg::**4{4{##}}cAcA33JJ||66H&H&887!7! g g @ @  IIbb<<KKHH(e(e  __.. _ _ ,,bbC@C@w w q M q M 4 E 4 E 99JJ##&&==$$/M/M++JJe2e277TXTX<<,,$$<v>99LL$$""  hhQQ..Y.Y.ANANh3h3@9@9R-R-;A;A++]H]H6C6C>m>mi%i%ee77 ,^,^"~"~    p p = = aa``yyHHA/A/}}22  x x 5 5 UU..ZZ==1h1h((D+D+88hhggWW//@E@E - -7W7W33:.:.TT=:=: hh''XCXC    <> jj'r'r@f@fyy..wwnnRR!!KK:q:qWWss%%ww -f-fYYRRff``II::tTtT}E}Eoo ) ) M 7 M 7  # #XvXv"G"G77 j jKKgg++AA;;==YY!!  X X   LL^6^6zz66eemm))99//tt88UU^^ggm\m\LNLNnknk008&8&66<>^^99((\ \ A A K 6K 6  ||AA : :   Q Q   t t y y    %%!!##    , , A Ah:h:;;ee4242XXZZ||AAIIttOO22^^jj<0<0^^11>>ccWWSSKKEE&&33jjECECcscsvv9v: Zu;E;E::NNS n*J2B2B^[L_ cchhd'd'tK^#l/ZNNVVR R iiqqn n u u @ @ **IIJJ++I1I1==WWNN  R TR T.}.}E E L S L S 1^1^[{[{ees]s]zz33P0P0BBRRMYMYssxx]]CCQfQf_J_J**bby.y.44(( F F  >%>%.S.S++%P%P##""".". V V     +_+_@0@0/5/5 S S# # ;;99__{${$ Y Y&^&^TTrr<<ww4444RRp6p6nMnMZZ>> !!SSMM{{**22  //' ' J J r r p p ] ] l l | | g g t t \ \ ' ' A A mm99ww!!OSOSrr]]GG,,77(({{::YjYjn2n2wowovv--5N5N88!M!M[[ddWrWr2277GGFMFM,,]]]']'DDJJee  ssPP44|w|w,F,F. . R  R  p p V Y V Y " 2 " 2 ` ` q, q, b b ::BB          F F hhHHxfxf""hh(h(hLL7755ppE~E~$J$JRRRfRfgg::>W>Waavcvc::gg))ooyy__tt%%}s}s--]]JJyy//    e=e=~Z~ZDUDU%% k k)o)o,z,zXKXKUUrr55nnS.S.uuXXww~~ffmLmLe/e/i'i'\\;;ll8l8l#"#"  CCrr__bb PP#?#?XXSSOOX}X}55nn\Z\Zt t XX'&'& L L2q2q * *__UsUs__g@g@77W W JJrr88RXRXZZ;*;*  ``  ? ?    ww d dI I J  J  --rr99""     =m=m~ S~ S WW5r5reeXX,,/33JMcuu^^@@Ed7&`6uuZZ{R{R  __ZZ77zaza//##BB&O&Onnoo{{ZZNN""r'r'\\o o  p  p 11>">"    O O   7  7   q qq qQ wQ w  O [O [    @ @ 's'shhbbhh))OO^^vvRRuu``gg ,,dcdclldd66>>ddDHDH1:1:%%;;..cc33xxpSpSU U l l   v v s s F F ( (  h 6h 6     { {O   \p    ]  ] K p K p  ja  9 D4040GGDDNNmmH|H|CC;;ffNNG!G!II0044  66dd66BB66  77"{"{vvcc44##((  HuHuMMV/V/((,!,! E Ez6z6DD|W|WPPAA||wwqqffpp--""(2(2^^oo22RR t tQ{Q{FF    6 6 SScciGiG''lluuAAu>u>X'X'ccr>r>ddPPDDllkSkShUhU//ee-/-/JJ>>00ww,?,?..ieie]q]q66j j 2 2 ,9 ,9   ''^"^"))LL|q|q  YSYSooZZkkdd''ccFF(([[&&s7s7##ee''MMRR99BB  ee` ` ss[[ppJJ-]-]LeLe44""gg88))8<8<]:]:xxccUUQQRwRw{{vv\\YYYYzzYYeeii#k#k~~**77gngnWW    M M ] ] :g:gDDvvnn""kk*b*bII  u R u R   Z Z_ _ 7 7 ##&&ff__}}FFvv//EE--TTOO " "]]y"y"iinnt_t_mm tt!!99U&U&xx,?,?--&&N:N:YYGG]J]J))hhVV[y [y ; ;     ppBB7$7$ooO O \;\;EEy$y$y@y@ II33!!M7M7//vvnn]]mGmG>>JJee@@ wwzzggAAvv>> d d,},}LL  **  LLNN66SSRRGgGgppUU11  xxHH55GG``EERRhhmmH&H&B5B5,,..zyzyVV1k1kEE,,RR#z#z009&9&==bb**ooEE@@qAqA %%ppss:7:7z_z_%%aaoobpbp!!??ffooPP!!jjZZ$$qqyiyi``11\B\B$$-v-v 1 1 mm  nnYYsszzjj]]Y.Y.[[*b*bff  **iiNN77~~22cucuQYQY ..&&D1D188uu$9$9$r$r??</>AbAbp}p}zz~o~o$$!!qqGGddvveeQQ;;$$IZIZS!S![[ SS2233rrhh8R8R  XXQ*Q*zqzq##f}f}==ipipxxwwXXQQdd,,ppRR##<<{x{xmm77  qq  L_L_))ppUUttllKK>>]]}Y}Y !!11kk55<<_A_A&&GG..uu::SS,,uu66&&{{  ~~}}RR22$$~~OOMlMljMjM  dKdKqEqE ee444"4"[[KK33}}ghghXX;;NfNfPTPT r rwwRROOf(f(^^qqV V jujuFFIIVEVE!!99ee%%"Z"ZNN%%pp::;n;njXjX""""55mmuuuuVV&&e=e=LLbMbM%%))v(v(\J\Ju u //iiYJYJ##ccXX@@ggJ?J?  "T"TUUhhOOo_o_#>#>NN,x,x  !!eeLL77HHckckw?w?gg<4<4ZZ]]++~E~EnhnhtRtRffddg6g6  iiPP``44ll;;\\<>II((wLwL&&eeddii1d1dkknn!!DZDZ}}OOAAJJPPNNLL;1;133%%(l(lOOmmII{{  LpLp**m^m^88NdNd^^DD00     T TCC[[OOPqPqmmd>d>::,M,M''  dd  ::9977]a]a1166ZZddww Y Y{{XXSSEE```2`2rr ? ?ss[[ppAAttFFddB1B1. . ] ] bIbI5599<<% % ??  aa"h"hy`y`||PP))11*}*}  ''88  pp]]""UU--iikk((nlnlccxx++JJee&&zMzM>J>J88))dd+J+JiiYoYo44  ^^bb\\s s ))""&&ddBBzzQQuu!H!Hmmbbxxtt--FF"7"7yyvv..3;3;cc(( ~~**FFrr--__AAddBB-w-w#n#nRRuu%~%~`v`v;o;ott11[[==.#.#<^<^88//ii  ll\\DDaa``ssL8L8wwAAWW0"0"44((  bb77''  E E ##pp..K;K;&&66//ppcc\\>>CC::ZZ gg,,ggUU]]xx JJVVPPjjkk~~SSuu--%-%-ll}} qq]`]`// < <%%%%__44%%HH__ l lggX X tt^^l:l:';';wwAGAG-f-f::((00xx66//..SSNN]]//77  MoMog*g*ff:g:g}}]]GG^Y^Y**<> Y:--44 ll66]#]#bbqqQQ WWTT))QQGG##4499DDSS{L{L44llm_m_**^+^+RRjjdd``!g!gmmcc4499aa==22..(^(^yzyz``UUyyO1O1;;]]GGMMuur>r>hh9911ll1@1@SS22++ ""ffNNIIJJL L   RF RF       ;- ;- Z Z eeOO~~77||rr99QQJJ"Z"Z..ssgg##KK,,aallzqzqGGUU>>ZZ)) O OCC++66SS$6$6M}M}DDuu))?=?=]]))0 0 s s     3 3 ii  88>>nnEEPP44VV<>jojo22II  5544bb((    E E %r %r W W     [[JDJDccc c ||22MMAAQQ;;F*F*6622NNY:Y:K,K, iiHHbYbYiWiWttf=f==q=q**4b4bLLLLrr]]DD++))--CCdvdvaaww) ) ]];;XXUU++((T}T}..@@""hh==gg[[uu44#^#^::NNUUmm@2@2zKzK{{I$I$bbu(u(@@2J2JWW))r=r=SvSv""QQddgg0808|(|(  //yOyOa'a'II)=)=  00CCt_t_aa99<>ffGGww,X,X - -zzUU%*%*55}}hh__GG'3'3""nnrrj j bbIIGG GGOO+E+EggLL##ZZGGmm$O$O--LLkk77OOoo||44}}00mmz=z=  HnHn##**!/!/%2%2f f UUrrC_C_kk33e e gg  v!v!CC``(J(JGGnnccTTgg[[MMeeDSDS,A,A9O9Orr00@@x@x@gghhHHccLL ? ?ll8W8W\\JJ]]||\\:b:bDD__((w=w=  //ZZ//.N.N//eejjUUz>z>||** &&%%(K(K<<^^EE&&@@HH`` ::!!33}}^^ggEE?v?vOO77vv  r"r"RR!!  ::!!  "<"<++]]#P#P((3g3gooY Y hh 88``}B}BHHRR~~??!!66VV77<<vvRMRMK?K?\V\VggNNMZMZ%%II>e>ehhnnQQV V FF[[OTOT    / /   ^ ^ \ \   N N DDVV H H++,Z,Zuu==KK+{+{))||+C+CCC>>ffjj v v((ZZ >>%%&&ff__,,,,b_b_**??||tt--NNMMHH1~1~xx  jj<<..pfpfRR,,;;QQZZeeC\C\66+F+FFqFqzzcc##]|]|eeoo{{VV!!bbj~j~ffBLBL+(+(OdOdgg^ ^ \\}}__::PPyy((AAPPV$V$U%U%NNSSa)a)vv  h/h/ccJ_J_y>J,["'Y\\\\ ~o00XXXXWHWH_4_4sSsS"|"|55IIww**CC66kk00 @@nnYY#{#{kk @ @ZZ99`J`J1Oo)PP66.Q.Quull< < vvQQ<<NN2R2Raacc&=&=d8d833 E EhThTnn,G,G``oocc66 a akk||44rrKK66e3e3zzuutNtNxwxwb6b6TTmN<g*A,@,@,P,P;[;[Fb9T-F!2++3Y3YIIYVTQNyBj7\7\#C#C"-"- * *|"|"ueueAA=(=(;;zz  ##TT]]v#v#hh((gg>n>nooggppddxxyyN1N1CC  7Y7Ycctt55XX22}9}9 . .>f>fFaFa++CCEE++wawateteOOHH00]]~(~(``ZZww``(?(?``TTppaa//uuffxxMM==  ||ElEl''!>!>HHyyP1P16644!C!Cbb<<55&&yydd*F*FMMVV>>qq*S*S115Y5Y6X6X%%>>TThh}}77TTnn88JJ;;__>>nn''44 k k;;::&/&/XX))Y:Y:\P\Pff|1|1gg))vv:b:b;m;m$$N9N9J$J$SSbb7N7N3[3[nnJJ66SS^B^Bzz``aaJJbb=_=_tt]]??__ h huu((>>RRddeehhllqqw-w-ll@@CCaaWW|/|/ppll6 6 88  MMXX99 l lyyRR44}}hhIIrr$L$LuuYYzz""&&\\vv??||pppypy  ]]ll{"{"NN,?,?}}EE,,>>''qq,,PP F F>o>opp  EE??^^LL3300KKDD\\  RRyy66GG++X0X0oo 33LL4 4 KKt\t\ugug\\~~EE00AAwwccAiAi$K$K11wwVV]]  3T3TXXtt||uu..MMPP5X5XCCrr-z-z~~ccZZD%D%66:R:RqqJJOO  {{a;JmJm 59`Ndt^^>>jjHH 5Y-~tRRttw2__hh\%\%F F AAZZgg119[9[=[=[/9/9  5c5cttCC66e_e_uulplp_Y_Y>,>,//8)8)JEJESRSRUSUSQ:Q:((,,>1>1GLGLYXYX22'.'.KK \ \!t!tEEuunn99HH Z Z%%[[CCddqqmmllmmpp''UU}}rrII**iiXX<<88GG**0R0RWKWKvvvvYCYCXX^^gGgGyyhhTTC!5 (/`<TT==ccSS[[ii77  oo::  zztlemw  gg'78 :&  T1J }TT44==WWnn~~ffTTHHttFFdd|N|N``_4_4JJLL**#>#>  66VV//22WW44?k?kss22@OMLJI66##00=CJPWMDD!!uaNx=^-E!2!2<< Y!W"V"L#C"9#0#0  ttaaNN;;HHee# ! 44f[PPPar r nn26tY} Zjjjjjjjd,MMccss^TKBp:`2O+?+?,,;;JJ))ffccJJHHYYyy__,,0K0K9Z9Z?Y?Y2X2X&W&WVV55``??..]]PPVVgg5i5i  CC!!|%|%KK33'9'9aa{'{'zz33yy!K!KCaCa=g=g'='=ooUUKKqq  9c9cdd55++uuEmEm##  ,a,aUUttPP1A1A  !!    uuKKAAGGmm99DDff^^@m@m&0&0*R*RQQ;;NNAAzzNzNzee((ssYYVVffuu**==@@33wwLL+l+l//NNJJ|$|$%%&@&@++HHOO}}IItt  ))/'/'/2/2*-*-!!YYttffiiyy!!NN{{eeGG e eJJnn}}{{kk@@YYtt]]ffRREE&&  ::;t;tcc""LLffppzzzz44ccEE;l;l1f1f(`(` J J44  FF``ZZccQQ]]"?"?NNPPPP.M.M  11>}>}[[!!||kk[[LL>q>qAmAmByByAA?q?q<]<](9(9mmII55!!t t jjddaaqq55aaaaMM99EEqq 5u5ugg9955SS-5-5     EE>q>qWWyyyyeeSSSSQQ^^WWOyOy7U7U!! mmII55!!MMyy==*i*i<u<u9a9a%M%M  ]]IIee55+a+a:}:}EyEy<u<u#A#A    !!   !!==IIEEAA==II(U(U2Q2Q9M9M=I=I?U?U?a?a>}>}<<9u9u5a5a0M0M+I+I&E&E!1!1 )) 5 5$A$A--   - -!I!I2U2U/a/a+M+M'9'9}}yyeeaammyyAA&]&]?y?yRR``iinnppoollggqqwwzzzzxxttnngg__WWOmOm7Y7Y"E"E Q Q-]-]6Y6Y<U<U/Q/Q#M#M}}IIyyppz z %%AA]]yymmYYEE11zz  !!MMyy % %AA%]%].i.i4u4uHHWWaaggZZNNCC9u9u/a/a&M&M.I.I3U3U6a6a7}7}VVmmmmkkWWEE5a5a--uuaa]]yy  %%AA"-"-    % %AA(M(M1Y1Y7e7e;q;q=m=m=i=i,U,UAA--))%%      ! !==99%% ! !== Y Y'e'e<q<q<m<m;Y;Y)E)E!! 11=]=]VVXXXXFF6i6i(E(E  }}iieeaa]]YYee        %%11==IIEEAA==99&U&U/q/qEEUU``ggkkllkkXXGG8i8i*E*EAA==995511==IIUUAA--  qqmmiieeaammyy   - -99*E*E#A#A==99EE$Q$Q(M(M*I*I*E*E)Q)Q'M'M$I$I!E!EAA==))%%!!-- 9 9 5 5!!    ))%%!!  ))55   libcdio-0.83/test/data/vcd2.toc0000644000175000017500000000073411114145233013226 00000000000000// $Id: vcd2.toc,v 1.1 2005/01/16 04:34:20 rocky Exp $ // Taken from one of Steve Schultz's VCD collection. // The .bin has been changed and is wrong. CD_ROM_XA // Track 1 TRACK MODE2_FORM_MIX COPY DATAFILE "cdda.bin" 00:05:00 // length in bytes: 1051200 // Track 2 TRACK MODE2_FORM_MIX COPY DATAFILE "cdda.bin" #1051200 34:31:23 // length in bytes: 362892928 // Track 3 TRACK MODE2_FORM_MIX COPY DATAFILE "cdda.bin" #363944128 39:04:26 // length in bytes: 410729536 libcdio-0.83/test/data/copying.iso0000644000175000017500000040000011114145233014033 00000000000000CD001LINUX CDROM @@ "E  MKISOFS ISO 9660/HFS FILESYSTEM BUILDER & CDRECORD CD-R/DVD CREATOR (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING 2006010516501900200601051650190000000000000000002006010516501900 CD001MKI Thu Jan 5 16:50:19 2006 mkisofs 1.15a40 -o copying-new.iso COPYING"j2"j2,RFFRj. COPYING.;1 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. libcdio-0.83/test/data/isofs-m1.toc0000644000175000017500000000007611114145233014025 00000000000000CD_ROM TRACK MODE1_RAW FILE "isofs-m1.bin" 00:00:00 00:00:00 libcdio-0.83/test/data/Makefile.am0000644000175000017500000000152711325731567013735 00000000000000check_DATA = \ bad-cat1.cue \ bad-cat1.toc \ bad-cat2.cue \ bad-cat2.toc \ bad-cat3.cue \ bad-cat3.toc \ bad-file.toc \ bad-mode1.cue \ bad-mode1.toc \ bad-msf-1.cue \ bad-msf-1.toc \ bad-msf-2.cue \ bad-msf-2.toc \ bad-msf-3.cue \ bad-msf-3.toc \ cdda.bin \ cdda.cue \ cdda.toc \ copying-rr.iso \ copying.iso \ data1.toc \ data2.toc \ isofs-m1.bin \ isofs-m1.cue \ isofs-m1.toc \ joliet.iso \ p1.bin \ p1.cue \ p1.nrg \ t1.toc \ t2.toc \ t3.toc \ t4.toc \ t5.toc \ t6.toc \ t7.toc \ t8.toc \ t9.toc \ vcd2.toc \ videocd.nrg \ cdtext.toc \ data5.toc \ data6.toc \ data7.toc EXTRA_DIST = $(check_DATA) libcdio-0.83/test/data/t8.toc0000644000175000017500000000024511114145233012720 00000000000000// check index increments TRACK AUDIO NO COPY FILE "cdda.bin" 0:10:0 INDEX 1:0:0 INDEX 2:0:0 TRACK AUDIO NO COPY FILE "cdda.bin" 0:10:0 START 0:5:0 // pre-gap libcdio-0.83/test/data/bad-cat2.cue0000644000175000017500000000027511114145233013734 00000000000000REM $Id: bad-cat2.cue,v 1.1 2004/07/09 20:47:08 rocky Exp $ REM test catalog number. -- not enough digits CATALOG "167890123" FILE "cdda.bin" BINARY TRACK 01 AUDIO INDEX 01 00:00:00 libcdio-0.83/test/data/bad-mode1.cue0000644000175000017500000000025111114145233014102 00000000000000REM $Id: bad-mode1.cue,v 1.1 2004/07/10 01:18:02 rocky Exp $ REM "MODE1_FORM45" is not a valid mode. FILE "cdda.bin" BINARY TRACK 01 MODE3_FORM1 INDEX 01 00:00:00 libcdio-0.83/test/data/p1.bin0000644000175000017500000255324011114145233012702 00000000000000    ( (   >#>#k1k1;;vBvBa6a6>+>+   nn>>llBB))mmq5q5ddYYGGKKqq\\<&<&UUyyddQQ_0_0 CCj0j0>>HH`/`/;;rrccyy++^2^2bbkkVVjCjC>">"ww99""\\u<u<ddEELL z z!!gg00EE0!0!$$OO``^^22H*H*!!  55@@F2F288\\ZZvJvJ`3`3NNPP@ @ **ff((ll&&MM**XXGG VV66QQQQ  __^^TTffQQqqEECC""44UUdWdW===%=%QQ ::H\H\xxv^v^||[[__ppV4V4I}I}!!aarrbb[,[,MMnnWWBBe/e/WW??vv44EE;;MMl7l7]]ee.1.1SQSQUUnnbbDDccU2U2lIlI55/!/!55NNzzaa9w9wnene++oJoJ    = X= Xd *d *ThThQQ}v}vqqxxq q 44CC`K`KHH@@ddgg[[**iitt@@b b TTeeCCVVYBYBnn""\E\E[[9*9* ``@@3%3%KhKhvv#Tk |    O <O <}+plkkkEEmm__HH??||XX>>cc11'Q'Q%%   + + B BgvgvnnUUHH}}33 W WZ Z  : : v v' ' NNii==JJ$F$FI)I) _ _**; ; $$EEJJkkK?K?j,j,MMXXii rr8+8+8877g2g2LL__$$WWllHH;;eeee''IIff ccCC  22%0%0''ssdd((nCnCllUUT1T1}I}IDD11CCXXooiiDDmmqqggBB88~~^^\:\:  !!vv44EE||;;,,eeee^^ss@@zz^^ s sFFkk{{   " "gpgpuuBB77ccrJrJL L c Zc Zl= l= P P   v v,|,|"",,88((bb      e+e+OO  33AAAuAuUUOOn4n4M-M-77__ 66  cScSbb%A%AKSKSoo%}%}  II| |   II33HHll#k#k[[ADAD55))""  !p !p m=m= A A - -{{$P$P>>bLbLNN__jjII*> *>   L L     {{LL   A A??rr+F+FyyJvJvTPTPWW  hh22**||VuVunnYY4X4X  dd  s\s\rr>>MMTT|(|(l$l$//  ((^[ ^[ g g w )w )uueeqqmm,,ZZxfxf  c|c|M M ? d? dnn4:4:x#x#pp??@@KK00 % %GG  11 y y33llVVFFhhOvOv99BBJJ\\PcPcff@@dd%%   @ @UUBB8 8   qq((,y,y "("(B B   Z0Z0LL     11[[GG@>@>~e~e*8*8  n n   kkPP**LLe e   p p } } M M r r [J[J$$ ^ ^[[MMJJ##y>y>}}tt&&VV>>--  #j#jXXBB= = wwx<x<\2\2C)C){{aa??BBPP88jju =u = ) ) X XaaGGiWiWFFqqJJ~~ ss * *C'C'ww  tjtjcc4T4TyfyfggGG88TT::==UU66ll##EEwwvv b bR -R -##@ @ qq77""99..;;9944""  ==  77 X X ffuu7 7 P P FF   @@2n2nII+=+=DDooZZy y p p ((  ]]IIRR""h`h`ccuuN$N$uuII~~>p>p%M%Mss0 0 MMiyiy..ii>55x jx jnn9911}}[3[3tt))::OO;;y y DwDwY Y   ~ ~ jjnnII!B!BLL M MMM<< 7 7 ) ) FFMDMD< < W W 7 7 nnhhKK))MMT T P P7*7***"Q"QNN  77 ((((111ۜ1ۜwQwQkk W W  hh. . e e   ::~4~4**ccZZBB? ?   ; ; t t uH uH + + v v F F   Y8Y8>>ߵߵ_D_DVqVqR R "W"W))<(<(ff  ''h&h&xx;;hQhQhh.. X XkkFUFU&&      Gq Gq F F qqppMMUU@ @   AnAnvv  z3z3FFooOO^^l\l\++E E     zzLLdd55uuvv44/"/"sDsDEyEyz z \\ wwQQBBssyy  KE KE        ##mm""LLY(Y(((s 3s 3    zzkkgSgSxxr Tr TB;B;||YYHHvv<>qqss&&KKpmpm  ' ' ll????11@M@Moo  xxook k hh;;: C: C  //  e.e.nnzzv(v(??ttKKqq    R!R!p p ttll..qWqWdddd//__p p #V#V..(.(.&_&_7f7frrgg 8181""+I+I88qqH H # #     ZZ2255NN//II22II<<    f f   ) )    xx]B]BUrUr|؅|؅6611YY7 7 ;;((..5+5+1#'1#'. . susuqqD)D)--] ]   | | MM;;==$$EEjpjpd d U U c c ?Z ?Z ''ffSS*~*~_C_C55886 6 dd. . > e> e{{UUxx55S S hhii X X   m mD@D@z^z^--H)H)l)l)P,P,XX1919YYjjKKmmF/F/ 11{{''    [[a-a-,^ ,^ y2y2UU?b?bNN77"""" MM T T  $ $  #T#TWWdd--vjvjVkVk::VVHHJJrrggGGPP88JJ==YY]]))==TT]]X cX cx Yx Y@ @ N N x x MM88;;ZZ11%%QQ   { {nTnTPPLLEEuuii ` `    tt i i5544zz  ODODaaOO' ' ""ffggmsms$I$IRV RV K K %9%9% % aa @@};};>>&&||CpCpjjccG[G[ ccwwoOoOvv    1n1nd ;d ;JJll55..hhTO TO BB~~y y F F vv(A(A( ( aaVRVR tt"@"@ZZiiC C &&""  $$/ z/ zRRccӊӊHyHyZZqqWWC C ;!;!$$!!V gV g44KK((xx**UU  qqJJ==::}}TT\\||FFCC!!A JA J  f f p p qwqw&&,V,V//u u 99!A!A""N N d d ''D^D^J۫J۫ l lJJ * *D2D2g-g-$$4 4 VV"Ԑ"ԐRyRyݡݡ88{{EE  {{((    ) )9966c~c~**DD||004141qq{{Q Q = =         wi wi E ERR]]ߔߔwDwDffLL  D2D2&&(( # #II" " f f f#f#7s7s    @ @ D6D6nOnO S S88YY  G G V V 6: 6:  qqffUU0F0FOOqq}}  > > HH--  E E gg]]ppp}p}??xxvvy (y (  DDkk,^,^**K)K)tstsyyllYYbbAAAABB+ |+ |3 3 **rrKK55//]] a ai6i6zzqq  R R    - -GAGAHH//# !# !( ( AAHwHwEXEXFF))((rJrJ,,UfUfvv : :  ` ` 9 9 P P ( (;;DD))DDQQ ++]]  i Yi Y: : ::AZAZqqqqeep=p=JJ  wx wx   r r p-p-llt{t{ q qPP..pp  uu--  nnSS[[<<445]5]@@  , , //g g ~ ~ ! ! *i*ibbnn ii``xxnnxx((&&$ $ MM  ''JJG`G`}}MMwcwcB B 8b8b}}    IIvv --++||@@WW[[d d ""J J   mKmKKKAA||bbn n EE##~b~b  $ /$ /**DDhhyyNNCC((??h Sh S--6)6) E Eff7w7wGGrrIILLvv  %%tQ tQ 00&&mmjj-F-FVl V uh h uu  " q8K oH  ))5050 Ѵ ѴDәDәa.a.]]  H H..o1o1#+#+ww] ] ""p@p@BB    88  9 9 ~ L~ L   ee33??CCbbwawa66yy99t t E E   q q ~Z ~Z Y Y q5 q5  f fjj((ffyy&&  **%%%%$$   %b%bYY / / * * 9 9%q%qTT[[V#V#hEhEm m   ; ; j j D D   PnPn))7W7Woo | | e e ll     //**kkJfJfJJ EzEz<<jj__YY;k;k{{xxWWcOcOSSGGuu ww''[[MM~~44w w I;I;r%r%  q q Y Y iihh,,kk//CCY1Y1 \ \  a a   --"{"{xxPPjNjNxxPP!!o`o`uuiieeeeMMMMww|X|X66UUd d ?dEobbXX D  u*  (   {n{nDDcULLGvGvA{ p{ < m< mY Y PPAA m mAkAk--( @( @ v v 8 8  QQVVAAN N SSWW$ $ iiXX55V V 3 3 [h[h>J >J   ~~IIttU}U}{{DDjj > >SbSbvv.q.qynyn m mz z t t    4V4V4J4J`%`%JJnnPPvvN(N(jj \ \&&4 4  h h..NNggddk k % % CCv jv j33''׋׋;;SSUU??  $$!!CC ^^++iiJJ{{   e eee>>FFuGuGx.x.AxAx 00rrLL ' '  **Cj Cj  ,6,6hhMMPPeeOO  eeR R t#pt#pK! K!   * * aa77885$5$MM 7 7  hh(&(&2< 2< /N/N%%  }}vvBBԩԩGGww--""  h3h3a~t j 8 |8 |ww'@o=ppxxRRWWW5W5^^//66;;^ @^ @  i v qL    ' ' J J H ARl\ 11nn6f6f  : : pp""!!774 4 LL 2y2yLLQQaa99SS    ppZZ|y|y@@``.. o o  ; ; y y..MpMpbb@@&&55BBGG  + + ((V V  p/p/6*tz5XX55qa8[7GG ~ ~W PW PGG  ##__ 99ZUZU  ||3J_w 66>>*Z-gGt66HH__22PP : :  ??aa66) ) dd~<~<[[WW77vvbbtt        ))??ACAC99mmzz3F3FKKddQQmm &&ffKKMMaa_}_}ddjj  b? b?   b b  @@ww''--BB3O3O        xxOhOhppLLkk  Au Au     00))CC``ssk k   RRp p jjL}L}DGDG..5 5 DPDPpp( ( ShShKK##22**ff2Y2Y<<*<*G>G__**bb''""  VV/ / * *  X X >; >; h h xt xt 33VzVzZZQ Q --JJ5ت5تڣڣ99: : Z)Z)G.G.,,$$kk++UUvvPPTTGdGd)) z z6 6 T {T {'k'kii C C  O O _ _   [[KKUU55؎؎C"C"jBjBll  LL  9% 9%  %%DSDSUUjj;;w w   e e     G G?-?-m]m]   { {, ,   -2 -2 | |      # D# D      ? U? Uee::ff""FF      f f d  d  GG00gg<<ee''5T5Tzzhh^^66,,;;qq''....``rrWW--xx<<VKVK;;DD" " hh  ?6?6iiݦʽۦʽ""00TT : :wW wW WW))y y ??~~ + +""ppZ Z   ++\~\~ssvbvb''WW         D D4 4 __KK!!!!$h$hxx b b TeTeI&I&F F 66?? KK}F}FEiEinn33{{jAjA[[~~tt܄܄RR : :?? II_2_2U8U8rr~~**CKCK   C C   M< M< r r r6 r6     p p   $ $     [ [  k kFFc c [[vvPP991v1vqqGGhh??2h2hgg  zGzG ||rr-4-4ppqq>>TT^^pp*-*-wwmm    T T   mm  ! ! ::'m'm}}{{U"U"ttss*I*IPPMMSS & &3%3%^^QQEE````$$NNtt/"/"eeNN88rraa// \\;;KK   3 3\? \? d'd' a a    ` ` ddjhjhTT>q>q t t> > ! !  ' "' "--NNCCjjRRr r  Y Y / /  tt$$ee!Z!Z~~FFgFgFII Q Q@ @ fD fD Pz Pz  ++OO^^??LLWWVLVL 22f0f0UUQQ33HHii33>=>=PP[[[[PP2W2W,,N N < <   99  55  3# 3# B FB F\\  L L   WW    7*7*/ / v v ~~<<II<><>KK6!6!'<'<""rrBB33VV11޶޶OoOo]q]q44߳'' ݿ ݿ``PP55aa^^00^^ ppaxax v v   ""%%~'~'*|*|++. . Y1"Y1"3c$3c$;6"&;6"&h7&h7&6&6&3$3$|/!|/!))m#m#BlBlZZ]]3"3"MMOZOZ}}   JJA(A(bbEE##ո]׸] ̪ ̪ҹҹ߫//>>FF{ߠ{ߠ}}~"~"[ѳ[ѳiɰiɰYY0B0B{¥{¥LLؿΪݿΪ > >II  ``]],,RRQ Q |Y |Y rr!!m&dm&d**<-<-. . |. |. m/h!m/h!0["0["1=#1=#F2#F2#%3$%3$ 3# 3#M0"M0"O-O-`'`' ! !cc  ~ ~   6 6 ' ' 88dd00HH$$22ooTT<Ϡ<ϠƩƩqq--Վڎr0r0ooIDIDX[X[{={=ZZ?l?lTT;;>>55( (   ffB\B\00  S S   K K C k C k     y Xy Xg~g~22BByy{/{/66CC99oommR3R3ooFFsjsjyyDD NNss44UUI I aaH"H"j j   XlXl##7a7ao / o / zh zh   3 3 t  t        DDffoo663d3d::hhffv)v)BBzz--izizyyVOVO]]ppB3B3==FF.:.:rrii44h h     %b%b]V]V  6 6 ]]33@2@2++ff F FN N aQ aQ n n  , , ZZDD2g2gcc66TT;;``44L L nn&&>ZZnn.b.bppbb~ ~ IISSll{s{s99YY;B;B YYZZ ""]&]&{{yy``h h       %7%7@'@'mmFF5!5!VV A A   ItItx1x1PQPQg g   l l 99aa==  bGbGjjtt{{ffGGDDq0q0s[s[& & zzPPܟܟssZ؎Z؎((ݎݎ__Q Q ,,QQxxNNuuX-X-  UU#5#5)U)U- !- !a1#a1#3%3%4&4&/6+'/6+'P7?(P7?(9@)9@) ;* ;*c=,c=,s@.s@.A/A/B/B/@.@.;+;+4&4&-C!-C!%%NNkmkm    *f *f     L L vv;Z;Z!!nnQ}Q}ҞHΞH'l'l*M*M7Ɔ7Ɔ8˞8˞ЋЋ;;ݧܧ2ͤ2ͤgɪgɪf>QAQA& &   $7 $7 +O+Oss  **3'3'>4.>4.*EJ3*EJ3E3E3Ci2Ci2=u-=u-4&4&*?*?jj    4 4 O O   K. K.  $$UU//wwhwhw}'}'IIٹٹKӛKӛXX_ɘ_ɘ/{/{mmggggnnғғagag}}hh'['[--cco o ==bb55vv  C C B}B}GG!!||iiFFaamm==FFDeDe-j-jkrkrO>O>G G      hJhJ   7 7 w1w1   <J<Jii66##==dd @@88 @~@~>>AA,ߑ,ߑާާb b <<001f1f!!jjhh~~oo8"8"88ll]] : :<<##      pX pX !!%%(=(=_)+_)+w(Ow(O(&(&##!!  l!gl!g>">"#|#|1$"1$"l$<l$<p#p#!!mm} } s s / / WW%%=M=Mg>g> eeAA B B==fڝfڝ--&&55}}(X(X@@_ފ_ ۱u^u^GG__rvrvRDRD8 8 ::``ddT T   y y   m- m-   8X 8X g g   Gk Gk ))ZZ66MMpp   EEF 5F 5_ _ aa+ + 22  ;;TTMM55@ @ dSdSOO W W  knkn  eeN N Zr>r - -## ## &&E)E) ," ,"@.#@.#R/B$R/B$s/$s/$.#.#-"-"+!+!); ); I(I(&&%%o#[o#[    @ @h6h6UzUz99))ff!!##((DDO԰O԰&&hYhYc8c8xxXX\\EE''LL%%kkAA  GG[[%%L pL p   G G } } [ [ < < 8 8   . . !5!5e e f f   >b>bfefeCC^^;;xxXX::;;GG::XXzFzFllaa%w%w. . ||cLcL tt  r!r!ss l l HH||>>,,rrq q 0u 0u   H2 H2 00]]PPWW==}}ll uu=A=AYYggzz2K2KCC>>]]qTqT$|$|__mm00I I }}WcWc   a a  MBMB?? t tv v w w kkraraMM     99S S **99aa~~!(!(s$s$77> > &&c"c"J J BBQQ??oo]K]KJJuJuJAaAarrAAUAUAWWff ffMM@@zz ..jj22,,`<`<KcKc**uAuA.. KK  /2/2GG \ \ 44II "t"tEESSnn$$+"+",S#,S#''''xxO4O444&C&CKKIIJBJBgg4 4 gg  i7i7hh SSmmXX::++00++33kk\\ ..ccvv>  >    . . N N ~E ~E   kk mmnn] Y] YCCa)a)/!/! ! !00 ||99}}))ZZhhPP55YXYXii55??@@ososooBBbb K K QzQz&&A dA d" q " q     +s +s  FF  QQ    ""n n yoyoMM@ @ T_ T_ 8 8   D D 3 3 v v h h __7-7-Y Y HH]]F\F\GG66#T#T..==??)q)q>>yy'a'aaa{{&&yyttMMff[[``KKOIOI::5p5pFgFg00DD O O % % # # z z g gpp^^))FFDDTSTS*T*TvvGGll       p p776F6Fpp/x/x\\<<==|y|y||MMxx22HAHA  O O > > g g 4  4  IIjTjT00\\C 7C 7   x x 88~-~-' I' I^^TPTP UU:5:5{{7L7LnnttWWV\V\'m'm&F&FSS((ee::$$:[:[66gg++aa m m    OO11##%%""{{  OO  ( (   ()()II::O O = =   nt nt GG9 ^9 ^5L5LSSvv\\nnXX``QQDD@@YY ] ]i+i+@E@E((bbjj2*2*AA]+]+gg;;}}00 bUbUGGoPoP[ [ ''gg0x0x``& & uu66--@@[[hh_q_qAAi i c c XX22:: a a  wwaaxx{{\\   KK}y}yX X //EE-4-4~~EE W W Y Y     a a tt$$9-9-uu_]_]__ AA--R9R9KKuupqpq##HHt!t!ff  <<--NN__P?P?++ppSSCC   y y B B NNuuVV%%|:|:55""  , , ]  ]  [ [ l  l   zSzS_1_1  \ \   --p p 4 4 nngg\Z\ZYY33bb,,nn W WNN E E=d=dUUzz++XXr}r}SSII))KaKa]]33pp3p3p{^{^@@SS0055r{r{YOYO  y~y~> >  "v  wPP  @ 2@ 2Jj#uI~\\..YY,""  K  K  Ij&EE;;XiXi00JJ[L[Lkk4s4s&&iiaaZZ22rree/R>11\\66~[ce+UURR7vI]$]jj?\?\**BBXnXn77TTL%L%,,i i    Z Z xxJnJnoo0077ccSSWWiYiY^^ JJ##ffAA  // F F H H _ _ > ?>0"c9c9y;Z9Fp2p2t t SSII;; >> jj~~tt,, ( (" j " j         & &I[I[++[[22))|3|3BB%%  %F%Fyy>>||KKssXX''33 @ @88`` ` K ` K m m WW11``DD  nnYY$$  uDuD$$:<:<~~ccnn||k k w # w #    _  _ : :  ]]  FFll22bbP|P|TT-n-n} } } i} iBB6600 ..++wwNN PP**  UU((nhnhOO] ]   a A a A G X G X  nn4.4.R&R&k k t t //NN    SS / /ee55  uuAhAhAAVV&&B:B:GG~]~]DD]]..{*{*gg44//cc}}  ::   d d H H mm\\      b b 4 4 "h"hKK  + l + l {  {    n n O O ` ` / /  cca a IIdd||vv!!vvKK0s0s  77[[8q8q[[00AARRddVVII..{{uuNNiiYY66--22popo GG!!11>S >S nnT@T@33,,HHGG++XX;; ~ ~r r dndnZj Zj  SSoaoaKKYY0 0  i i   H H     *8 *8  l  l h h k k H H ^r^rQMQM| 4 | 4   SSUU=}=}jj] ] ^  ^  (( ll}}ii XXGGp6p6 qMqMFF\\9]9]eeddQfQf@@==11;;r r \\<<``eePPQQ     3 3 Q Q P P - -     OOmm--llVV  dd!h!hVV88O{O{JJ||f$f$!!mm:: ododttQQ00 >>__YHYH6 '6 's y s y O O     |&|&##SdSd!!__rrllhhEE9a9aii2Y2Ymm Y YppVV\\&&00vv??[[dd]]FFEEz#z#cYcYLLEEE E   @ @ R R  [ [aa"'"'88II++jj1o1ojj>>/3/3}}MM||55pjpjPP   ) ) ( ( ((mm[[ddHH  g g V V l 0 l 0 qqzzQNQNRR=X=Xvv**ffIxIxb b ^ ^ ~Q~QcUcU11mm||o&o&PPAAdd--aa, ", "L  L  W W O j O j  PPkkWW##DXDX Q Q $$  i i g g %%rrj2j2  7X7X d d;;((``55qqAAvvEE222;2;RReeNNd4d4bb22qq!!SSC C xxhh&&==%%\ \  A A . .%%w%w%]$]${{  = =    k k   h h   x x *C*CF.F...PP''UqUq?y?yLޕLޕ}7}7xx"I"I{Y{YfBfB==26261717ޖ__ߞߞl\l\?[?[ii88vlvlhhEENxNx   9 9 ~N~N%%WWqq{|{|V1V1JHJH;-;-77]+]+   yyvv##~~DDuu kk==qq  xXxX--iidܯdܯtt޸KK""))ff  SSRR00 A A   7 7  o o     y y  tYtY^^DDIISS]]_F_F8i8iuXuXvvll!!UU- - 44DDRnRnJJggRRSS!!KKZZ!!; ; XXBB+C+Cx ` x ` ""ff__uu ` `   r r       ppPPOO``""KKkk%%lZlZPPZZ  3E3EOOppHzHzUU"  "  p p ! ! XXzz^^ ZZ{~{~ffJ)J)yyNNLL##II66**jdjd''jjjjvvUUGG=E=E{{v(v(;;AAUU"Q"QA$A$##[[GGwwLLRRoo    &&8811  QQ>>p[p[ewew;; ``RR((7u7u99qsqsVV;;UUeevvHH \\DDllEE++e e l c l c *  *  TOTO<<,,4%4%k[k[&_&_C`C`Y_Y_ImIm00""}} +"+" O OHHBB**;;EEkk##^5^5 77bbOOLMLMMM@@66EEhh??WWtKtKooe ~e ~3 3 eiei))$$jjYY""S#S##T #T # # _ _ uu[C[C R R nnh h   gygyK6rY5ލ5ލٸ܈ٸܕt٭m)߿l/I/I''zz?c?cHHGfGf664400>->-??   HHjjii,3,3uSuSyy0202,,0!0!))[ti@nFF   n0$7==+V+V66x#x# nnddVV\\88e3e3hhtt''HH{{""YYTT??)u)uYY bb''0 0 LL H P H P S S J T J T i i ""  ==DDPPaaj~j~ttuuD D GG.. 0404MMo;>;bb``scscrrc c 77LL$$oo ))QQ``/./.00 GG 5 5 V VVVIIUUPP44GGFF""55HH\\ D>D>  t B t B " "  PPUU;;u?u?NN L L ??SS$$&K&KXX] W ] W RR{ { ##hhz3z3NN m  m VV00ss4Q4Qw w /g/gLvLvHH((  vvss^b^b3~3~__f f @@XX}}ccSSFMFMttiwiwllm9m9??yy33008!8!77jqjq? ?  ss$#$#*)*)/I-/I-10100I/0I/,T+,T+'&'&2" 2" yyKK|}|}1414#)#)vv ,f,f^>^66 dddd  i - i - 88$$HeHe  4+4+ l l a a  7  7 ccDDQQffeoeo /N/N H H   X X W % W % <<ggp7p7++,,^^1B1BBJBJz6z6GtGt88MbMb~~/7/76Q6QaLaLQQ77gsgs22jMjM##TTss2 2  00pp<<:: mmSSpNpN:: z  z @@ll{{FF UU@@%%AA77??$$I;I;SSwwEnEn&9&9||mzmzaQaQ..7/7/EGEG` } ` }   \\(>  hhtt&&PaPa%%OO}}h.h. % %XkXk?N?NlqlqRRmm. .   ccnnuu??&&yy\\GGN9N9RTRTRR!!NNNN3333}c}cLLYY A%A%&&',',55EoEo:: & &,, 66CCDDeeEE!!L L n e n e ++ # # p  p  9 9 &l&l R9R9O O 22RRRBRB22ss%%ee11\\66HUHU~~ssj j ZZss vZvZfIfI?"?"wTwT{c{cXIXI  C5C5A+A+KKo o F F _v_vll  & = & = #R#RQQ//DKDK55IIcc S S Q 3 Q 3 <<d d  " "{{jjhh   [[   a a ;;rr;;UUkkJ%J% t t * * <<8r8ruNuNopop\\OO----yZyZqkqkkiki&@&@EGEGaaGGYY##55 * * X X 88MSMS00__TOTOnn}}/p/pkwkwSS""?I?I i  i l l Q Q ee\\ ??,,jjii 66SSss{t{t))116K6K_k_kuuAA||#2#2  rre0e0d)d)JJVV    d d 33  CCO O --00ll66\\RtRt1[1[uEuEvXvX<.<.CCttttGG<<vvJ4J4vv))KK88^^++/B/BDKDK|T|Trr""JJ%^%^))PrPr$x$x55cUcUyynOnOXXMMBB B B g g ''rrNENEX+X+ ]  ] rrbWbW $ $ ddxqxqeCeCKKsTsT''8 * 8 * i i ..--}[}[YYNN22{{<><>C C o@o@iiz z 88xmxmfUfUCC)){{/j/jejej~~oo==8 ~ 8 ~ i  i  C}C}RRBNBN DD^^$($(QQ\\ddOeOe@@2a2a{{zz ' ' vv__,1,15 5 U!U!;;11 [ [ //\\ s sz z JJvvKKZZJgJgAAyyg g 3 3   $$;o;olqlqvPvP}}//Y^Y^JJ~~wwAA  O)O)oowwoo[[~~::]g]g[[0 0 <<kk00,,N7N7igig__ oo 2  2 ))ZKZKK K WW@z@znn__z3z3'' m`m`EE^^&V&Vff<<}}H/H/wwv8v8f f HH``NN<<MM$I$IPPRR]]~~"";;brbrtt$`$`@@uuxxzz9 G9 GuuR0R0oo  MMUeUenn!!44hh,,..\\AAzzeehh77Z5Z5>>eeggPmPmDD++vvAA.F.F==mmlleqeq__..!!AAhhbbLlLl  eeQcQccc'J'JnnHHzzg g U U % % y y   22F F a a x x **{{tt44##E E J J   rrIMIM++jjllaa } }JJ]qUs:-XX;Rkg((33{FS j2SS||e'e')e,ll n<)){{ `pN^88+F+Fii   w'w'&&II\\}}m&m&dd??VV55  ,  ,    CC&&}}||CCggaa^^% % g g L L   ''\\ffttwwTT==@@3 3 ! ! ( y ( y u o u o %  %    LLGNGNDD??rr[[++[[t't'CC&&PP[[6633rrTfx1eeQw[t 5522aaTDTD]]::CC PP<< Y Y==rrkk==ff,,VVZZ??ddeeW!6=wcIIRR >>ii]"]" 7 7ffg.g.kklls s <<^L^L,?,?wwJ J H H ==FF1%1%J>|M|MXXss>>^^u]u]$$    66hhc' c' Q Q ] { ] { 6 6 IIww44wOwOII ||pp__;";"+2+2,z,zbbRR ! !qqgg::**4{4{##}}cAcA33JJ||66H&H&887!7! g g @ @  IIbb<<KKHH(e(e  __.. _ _ ,,bbC@C@w w q M q M 4 E 4 E 99JJ##&&==$$/M/M++JJe2e277TXTX<<,,$$<v>99LL$$""  hhQQ..Y.Y.ANANh3h3@9@9R-R-;A;A++]H]H6C6C>m>mi%i%ee77 ,^,^"~"~    p p = = aa``yyHHA/A/}}22  x x 5 5 UU..ZZ==1h1h((D+D+88hhggWW//@E@E - -7W7W33:.:.TT=:=: hh''XCXC    <> jj'r'r@f@fyy..wwnnRR!!KK:q:qWWss%%ww -f-fYYRRff``II::tTtT}E}Eoo ) ) M 7 M 7  # #XvXv"G"G77 j jKKgg++AA;;==YY!!  X X   LL^6^6zz66eemm))99//tt88UU^^ggm\m\LNLNnknk008&8&66<>^^99((\ \ A A K 6K 6  ||AA : :   Q Q   t t y y    %%!!##    , , A Ah:h:;;ee4242XXZZ||AAIIttOO22^^jj<0<0^^11>>ccWWSSKKEE&&33jjECECcscsvv9v: Zu;E;E::NNS n*J2B2B^[L_ cchhd'd'tK^#l/ZNNVVR R iiqqn n u u @ @ **IIJJ++I1I1==WWNN  R TR T.}.}E E L S L S 1^1^[{[{ees]s]zz33P0P0BBRRMYMYssxx]]CCQfQf_J_J**bby.y.44(( F F  >%>%.S.S++%P%P##""".". V V     +_+_@0@0/5/5 S S# # ;;99__{${$ Y Y&^&^TTrr<<ww4444RRp6p6nMnMZZ>> !!SSMM{{**22  //' ' J J r r p p ] ] l l | | g g t t \ \ ' ' A A mm99ww!!OSOSrr]]GG,,77(({{::YjYjn2n2wowovv--5N5N88!M!M[[ddWrWr2277GGFMFM,,]]]']'DDJJee  ssPP44|w|w,F,F. . R  R  p p V Y V Y " 2 " 2 ` ` q, q, b b ::BB          F F hhHHxfxf""hh(h(hLL7755ppE~E~$J$JRRRfRfgg::>W>Waavcvc::gg))ooyy__tt%%}s}s--]]JJyy//    e=e=~Z~ZDUDU%% k k)o)o,z,zXKXKUUrr55nnS.S.uuXXww~~ffmLmLe/e/i'i'\\;;ll8l8l#"#"  CCrr__bb PP#?#?XXSSOOX}X}55nn\Z\Zt t XX'&'& L L2q2q * *__UsUs__g@g@77W W JJrr88RXRXZZ;*;*  ``  ? ?    ww d dI I J  J  --rr99""     =m=m~ S~ S WW5r5reeXX,,/33JMcuu^^@@Ed7&`6uuZZ{R{R  __ZZ77zaza//##BB&O&Onnoo{{ZZNN""r'r'\\o o  p  p 11>">"    O O   7  7   q qq qQ wQ w  O [O [    @ @ 's'shhbbhh))OO^^vvRRuu``gg ,,dcdclldd66>>ddDHDH1:1:%%;;..cc33xxpSpSU U l l   v v s s F F ( (  h 6h 6     { {O   \p    ]  ] K p K p  ja  9 D4040GGDDNNmmH|H|CC;;ffNNG!G!II0044  66dd66BB66  77"{"{vvcc44##((  HuHuMMV/V/((,!,! E Ez6z6DD|W|WPPAA||wwqqffpp--""(2(2^^oo22RR t tQ{Q{FF    6 6 SScciGiG''lluuAAu>u>X'X'ccr>r>ddPPDDllkSkShUhU//ee-/-/JJ>>00ww,?,?..ieie]q]q66j j 2 2 ,9 ,9   ''^"^"))LL|q|q  YSYSooZZkkdd''ccFF(([[&&s7s7##ee''MMRR99BB  ee` ` ss[[ppJJ-]-]LeLe44""gg88))8<8<]:]:xxccUUQQRwRw{{vv\\YYYYzzYYeeii#k#k~~**77gngnWW    M M ] ] :g:gDDvvnn""kk*b*bII  u R u R   Z Z_ _ 7 7 ##&&ff__}}FFvv//EE--TTOO " "]]y"y"iinnt_t_mm tt!!99U&U&xx,?,?--&&N:N:YYGG]J]J))hhVV[y [y ; ;     ppBB7$7$ooO O \;\;EEy$y$y@y@ II33!!M7M7//vvnn]]mGmG>>JJee@@ wwzzggAAvv>> d d,},}LL  **  LLNN66SSRRGgGgppUU11  xxHH55GG``EERRhhmmH&H&B5B5,,..zyzyVV1k1kEE,,RR#z#z009&9&==bb**ooEE@@qAqA %%ppss:7:7z_z_%%aaoobpbp!!??ffooPP!!jjZZ$$qqyiyi``11\B\B$$-v-v 1 1 mm  nnYYsszzjj]]Y.Y.[[*b*bff  **iiNN77~~22cucuQYQY ..&&D1D188uu$9$9$r$r??</>AbAbp}p}zz~o~o$$!!qqGGddvveeQQ;;$$IZIZS!S![[ SS2233rrhh8R8R  XXQ*Q*zqzq##f}f}==ipipxxwwXXQQdd,,ppRR##<<{x{xmm77  qq  L_L_))ppUUttllKK>>]]}Y}Y !!11kk55<<_A_A&&GG..uu::SS,,uu66&&{{  ~~}}RR22$$~~OOMlMljMjM  dKdKqEqE ee444"4"[[KK33}}ghghXX;;NfNfPTPT r rwwRROOf(f(^^qqV V jujuFFIIVEVE!!99ee%%"Z"ZNN%%pp::;n;njXjX""""55mmuuuuVV&&e=e=LLbMbM%%))v(v(\J\Ju u //iiYJYJ##ccXX@@ggJ?J?  "T"TUUhhOOo_o_#>#>NN,x,x  !!eeLL77HHckckw?w?gg<4<4ZZ]]++~E~EnhnhtRtRffddg6g6  iiPP``44ll;;\\<>II((wLwL&&eeddii1d1dkknn!!DZDZ}}OOAAJJPPNNLL;1;133%%(l(lOOmmII{{  LpLp**m^m^88NdNd^^DD00     T TCC[[OOPqPqmmd>d>::,M,M''  dd  ::9977]a]a1166ZZddww Y Y{{XXSSEE```2`2rr ? ?ss[[ppAAttFFddB1B1. . ] ] bIbI5599<<% % ??  aa"h"hy`y`||PP))11*}*}  ''88  pp]]""UU--iikk((nlnlccxx++JJee&&zMzM>J>J88))dd+J+JiiYoYo44  ^^bb\\s s ))""&&ddBBzzQQuu!H!Hmmbbxxtt--FF"7"7yyvv..3;3;cc(( ~~**FFrr--__AAddBB-w-w#n#nRRuu%~%~`v`v;o;ott11[[==.#.#<^<^88//ii  ll\\DDaa``ssL8L8wwAAWW0"0"44((  bb77''  E E ##pp..K;K;&&66//ppcc\\>>CC::ZZ gg,,ggUU]]xx JJVVPPjjkk~~SSuu--%-%-ll}} qq]`]`// < <%%%%__44%%HH__ l lggX X tt^^l:l:';';wwAGAG-f-f::((00xx66//..SSNN]]//77  MoMog*g*ff:g:g}}]]GG^Y^Y**<> Y:--44 ll66]#]#bbqqQQ WWTT))QQGG##4499DDSS{L{L44llm_m_**^+^+RRjjdd``!g!gmmcc4499aa==22..(^(^yzyz``UUyyO1O1;;]]GGMMuur>r>hh9911ll1@1@SS22++ ""ffNNIIJJL L   RF RF       ;- ;- Z Z eeOO~~77||rr99QQJJ"Z"Z..ssgg##KK,,aallzqzqGGUU>>ZZ)) O OCC++66SS$6$6M}M}DDuu))?=?=]]))0 0 s s     3 3 ii  88>>nnEEPP44VV<>jojo22II  5544bb((    E E %r %r W W     [[JDJDccc c ||22MMAAQQ;;F*F*6622NNY:Y:K,K, iiHHbYbYiWiWttf=f==q=q**4b4bLLLLrr]]DD++))--CCdvdvaaww) ) ]];;XXUU++((T}T}..@@""hh==gg[[uu44#^#^::NNUUmm@2@2zKzK{{I$I$bbu(u(@@2J2JWW))r=r=SvSv""QQddgg0808|(|(  //yOyOa'a'II)=)=  00CCt_t_aa99<>ffGGww,X,X - -zzUU%*%*55}}hh__GG'3'3""nnrrj j bbIIGG GGOO+E+EggLL##ZZGGmm$O$O--LLkk77OOoo||44}}00mmz=z=  HnHn##**!/!/%2%2f f UUrrC_C_kk33e e gg  v!v!CC``(J(JGGnnccTTgg[[MMeeDSDS,A,A9O9Orr00@@x@x@gghhHHccLL ? ?ll8W8W\\JJ]]||\\:b:bDD__((w=w=  //ZZ//.N.N//eejjUUz>z>||** &&%%(K(K<<^^EE&&@@HH`` ::!!33}}^^ggEE?v?vOO77vv  r"r"RR!!  ::!!  "<"<++]]#P#P((3g3gooY Y hh 88``}B}BHHRR~~??!!66VV77<<vvRMRMK?K?\V\VggNNMZMZ%%II>e>ehhnnQQV V FF[[OTOT    / /   ^ ^ \ \   N N DDVV H H++,Z,Zuu==KK+{+{))||+C+CCC>>ffjj v v((ZZ >>%%&&ff__,,,,b_b_**??||tt--NNMMHH1~1~xx  jj<<..pfpfRR,,;;QQZZeeC\C\66+F+FFqFqzzcc##]|]|eeoo{{VV!!bbj~j~ffBLBL+(+(OdOdgg^ ^ \\}}__::PPyy((AAPPV$V$U%U%NNSSa)a)vv  h/h/ccJ_J_y>J,["'Y\\\\ ~o00XXXXWHWH_4_4sSsS"|"|55IIww**CC66kk00 @@nnYY#{#{kk @ @ZZ99`J`J1Oo)PP66.Q.Quull< < vvQQ<<NN2R2Raacc&=&=d8d833 E EhThTnn,G,G``oocc66 a akk||44rrKK66e3e3zzuutNtNxwxwb6b6TTmN<g*A,@,@,P,P;[;[Fb9T-F!2++3Y3YIIYVTQNyBj7\7\#C#C"-"- * *|"|"ueueAA=(=(;;zz  ##TT]]v#v#hh((gg>n>nooggppddxxyyN1N1CC  7Y7Ycctt55XX22}9}9 . .>f>fFaFa++CCEE++wawateteOOHH00]]~(~(``ZZww``(?(?``TTppaa//uuffxxMM==  ||ElEl''!>!>HHyyP1P16644!C!Cbb<<55&&yydd*F*FMMVV>>qq*S*S115Y5Y6X6X%%>>TThh}}77TTnn88JJ;;__>>nn''44 k k;;::&/&/XX))Y:Y:\P\Pff|1|1gg))vv:b:b;m;m$$N9N9J$J$SSbb7N7N3[3[nnJJ66SS^B^Bzz``aaJJbb=_=_tt]]??__ h huu((>>RRddeehhllqqw-w-ll@@CCaaWW|/|/ppll6 6 88  MMXX99 l lyyRR44}}hhIIrr$L$LuuYYzz""&&\\vv??||pppypy  ]]ll{"{"NN,?,?}}EE,,>>''qq,,PP F F>o>opp  EE??^^LL3300KKDD\\  RRyy66GG++X0X0oo 33LL4 4 KKt\t\ugug\\~~EE00AAwwccAiAi$K$K11wwVV]]  3T3TXXtt||uu..MMPP5X5XCCrr-z-z~~ccZZD%D%66:R:RqqJJOO  {{a;JmJm 59`Ndt^^>>jjHH 5Y-~tRRttw2__hh\%\%F F AAZZgg119[9[=[=[/9/9  5c5cttCC66e_e_uulplp_Y_Y>,>,//8)8)JEJESRSRUSUSQ:Q:((,,>1>1GLGLYXYX22'.'.KK \ \!t!tEEuunn99HH Z Z%%[[CCddqqmmllmmpp''UU}}rrII**iiXX<<88GG**0R0RWKWKvvvvYCYCXX^^gGgGyyhhTTC!5 (/`<TT==ccSS[[ii77  oo::  zztlemw  gg'78 :&  T1J }TT44==WWnn~~ffTTHHttFFdd|N|N``_4_4JJLL**#>#>  66VV//22WW44?k?kss22@OMLJI66##00=CJPWMDD!!uaNx=^-E!2!2<< Y!W"V"L#C"9#0#0  ttaaNN;;HHee# ! 44f[PPPar r nn26tY} Zjjjjjjjd,MMccss^TKBp:`2O+?+?,,;;JJ))ffccJJHHYYyy__,,0K0K9Z9Z?Y?Y2X2X&W&WVV55``??..]]PPVVgg5i5i  CC!!|%|%KK33'9'9aa{'{'zz33yy!K!KCaCa=g=g'='=ooUUKKqq  9c9cdd55++uuEmEm##  ,a,aUUttPP1A1A  !!    uuKKAAGGmm99DDff^^@m@m&0&0*R*RQQ;;NNAAzzNzNzee((ssYYVVffuu**==@@33wwLL+l+l//NNJJ|$|$%%&@&@++HHOO}}IItt  ))/'/'/2/2*-*-!!YYttffiiyy!!NN{{eeGG e eJJnn}}{{kk@@YYtt]]ffRREE&&  ::;t;tcc""LLffppzzzz44ccEE;l;l1f1f(`(` J J44  FF``ZZccQQ]]"?"?NNPPPP.M.M  11>}>}[[!!||kk[[LL>q>qAmAmByByAA?q?q<]<](9(9mmII55!!t t jjddaaqq55aaaaMM99EEqq 5u5ugg9955SS-5-5     EE>q>qWWyyyyeeSSSSQQ^^WWOyOy7U7U!! mmII55!!MMyy==*i*i<u<u9a9a%M%M  ]]IIee55+a+a:}:}EyEy<u<u#A#A    !!   !!==IIEEAA==II(U(U2Q2Q9M9M=I=I?U?U?a?a>}>}<<9u9u5a5a0M0M+I+I&E&E!1!1 )) 5 5$A$A--   - -!I!I2U2U/a/a+M+M'9'9}}yyeeaammyyAA&]&]?y?yRR``iinnppoollggqqwwzzzzxxttnngg__WWOmOm7Y7Y"E"E Q Q-]-]6Y6Y<U<U/Q/Q#M#M}}IIyyppz z %%AA]]yymmYYEE11zz  !!MMyy % %AA%]%].i.i4u4uHHWWaaggZZNNCC9u9u/a/a&M&M.I.I3U3U6a6a7}7}VVmmmmkkWWEE5a5a--uuaa]]yy  %%AA"-"-    % %AA(M(M1Y1Y7e7e;q;q=m=m=i=i,U,UAA--))%%      ! !==99%% ! !== Y Y'e'e<q<q<m<m;Y;Y)E)E!! 11=]=]VVXXXXFF6i6i(E(E  }}iieeaa]]YYee        %%11==IIEEAA==99&U&U/q/qEEUU``ggkkllkkXXGG8i8i*E*EAA==995511==IIUUAA--  qqmmiieeaammyy   - -99*E*E#A#A==99EE$Q$Q(M(M*I*I*E*E)Q)Q'M'M$I$I!E!EAA==))%%!!-- 9 9 5 5!!    ))%%!!  ))55   libcdio-0.83/test/data/cdda.cue0000644000175000017500000000026011114153272013246 00000000000000TITLE "Join us now we have the software" CATALOG 0000010271955 PERFORMER "Richard Stallman" FILE "BOING.BIN" BINARY TRACK 01 AUDIO FLAGS DCP INDEX 01 00:00:00 libcdio-0.83/test/data/isofs-m1.cue0000644000175000017500000000011211114145233014003 00000000000000FILE "ISOFS-M1.BIN" BINARY TRACK 01 MODE1/2352 INDEX 01 00:00:00 libcdio-0.83/test/data/bad-cat2.toc0000644000175000017500000000027611114145233013746 00000000000000// $Id: bad-cat2.toc,v 1.2 2004/07/09 20:47:08 rocky Exp $ // test catalog number. -- not enough digits CATALOG 167890123 // Should be 13 digits TRACK AUDIO NO COPY FILE "cdda.bin" 1:0:0 libcdio-0.83/test/data/bad-msf-2.cue0000644000175000017500000000027011114145233014022 00000000000000REM $Id: bad-msf-2.cue,v 1.1 2004/07/10 01:18:02 rocky Exp $ REM bad MSF in second field - seconds should be less than 60 FILE "cdda.bin" BINARY TRACK 01 AUDIO INDEX 01 00:90:00 libcdio-0.83/test/data/t2.toc0000644000175000017500000000026411114145233012713 00000000000000// additional pre-gap for track 1 TRACK AUDIO NO COPY // so that all CTL flags are 0 FILE "cdda.bin" 0:59:0 // Seconds are just under 60 START 0:10:0 // 10 second pre-gap libcdio-0.83/test/data/data6.toc0000644000175000017500000000020611114145233013361 00000000000000// $Id: data6.toc,v 1.2 2005/01/23 00:45:57 rocky Exp $ // MODE2 track // CD_ROM TRACK MODE2 FILE "isofs-m1.bin" 00:00:00 00:13:57 libcdio-0.83/test/data/t9.toc0000644000175000017500000000060611114145233012722 00000000000000CD_DA // check mulitple tracks CATALOG "0724385356926" TRACK AUDIO ISRC "USEM39600078" COPY FILE "cdda.bin" 0:10:0 START 0:5:0 TRACK AUDIO NO COPY ISRC "USEM39600079" FILE "cdda.bin" 0:10:0 START 0:2:0 TRACK AUDIO COPY FILE "cdda.bin" 0:10:0 START 0:1:30 TRACK AUDIO NO COPY START 0:0:0 FILE "cdda.bin" 0:10:0 TRACK AUDIO ISRC "EDUMA9892346" NO COPY FILE "cdda.bin" 0:10:0 START 0:2:1 libcdio-0.83/test/data/t6.toc0000644000175000017500000000012211114145233012710 00000000000000// test ISRC code TRACK AUDIO NO COPY ISRC "DEMUA9800001" FILE "cdda.bin" 1:0:0 libcdio-0.83/test/data/t1.toc0000644000175000017500000000016611114145233012713 00000000000000// simplest cue sheet TRACK AUDIO NO COPY // so that all CTL flags are 0 SILENCE 0:0:74 // frames are just under 75 libcdio-0.83/test/data/bad-cat3.cue0000644000175000017500000000030311114145233013725 00000000000000REM $Id: bad-cat3.cue,v 1.2 2004/07/10 01:18:02 rocky Exp $ REM test catalog number. -- invalid decimal digit CATALOG 123456789b123 FILE "cdda.bin" BINARY TRACK 01 AUDIO INDEX 01 00:00:00 libcdio-0.83/test/data/bad-cat1.cue0000644000175000017500000000027311114145233013731 00000000000000REM $Id: bad-cat1.cue,v 1.1 2004/07/12 03:59:59 rocky Exp $ REM test catalog number - no catalog after word CATALOG CATALOG FILE "cdda.bin" BINARY TRACK 01 AUDIO INDEX 01 00:00:00 libcdio-0.83/test/data/data7.toc0000644000175000017500000000041511114145233013364 00000000000000// $Id: data7.toc,v 1.2 2005/01/23 00:45:57 rocky Exp $ // Video CD // CD_ROM_XA TRACK MODE1 // ISO filesystem FILE "isofs-m1.bin" 00:00:00 00:13:57 TRACK MODE2_FORM_MIX // XA track with form 1 and form 2 sectors PREGAP 0:2:0 FILE "isofs-m1.bin" 00:20:71 00:00:00 libcdio-0.83/test/data/bad-msf-2.toc0000644000175000017500000000031311114145233014031 00000000000000// $Id: bad-msf-2.toc,v 1.1 2004/05/07 10:57:50 rocky Exp $ // bad MSF in second field TRACK AUDIO NO COPY // so that all CTL flags are 0 FILE "cdda.bin" 0:60:0 // seconds should be less than 60 libcdio-0.83/test/data/p1.nrg0000755000175000017500000403505611114164253012730 00000000000000    ( (   >#>#k1k1;;vBvBa6a6>+>+   nn>>llBB))mmq5q5ddYYGGKKqq\\<&<&UUyyddQQ_0_0 CCj0j0>>HH`/`/;;rrccyy++^2^2bbkkVVjCjC>">"ww99""\\u<u<ddEELL z z!!gg00EE0!0!$$OO``^^22H*H*!!  55@@F2F288\\ZZvJvJ`3`3NNPP@ @ **ff((ll&&MM**XXGG VV66QQQQ  __^^TTffQQqqEECC""44UUdWdW===%=%QQ ::H\H\xxv^v^||[[__ppV4V4I}I}!!aarrbb[,[,MMnnWWBBe/e/WW??vv44EE;;MMl7l7]]ee.1.1SQSQUUnnbbDDccU2U2lIlI55/!/!55NNzzaa9w9wnene++oJoJ    = X= Xd *d *ThThQQ}v}vqqxxq q 44CC`K`KHH@@ddgg[[**iitt@@b b TTeeCCVVYBYBnn""\E\E[[9*9* ``@@3%3%KhKhvv#Tk |    O <O <}+plkkkEEmm__HH??||XX>>cc11'Q'Q%%   + + B BgvgvnnUUHH}}33 W WZ Z  : : v v' ' NNii==JJ$F$FI)I) _ _**; ; $$EEJJkkK?K?j,j,MMXXii rr8+8+8877g2g2LL__$$WWllHH;;eeee''IIff ccCC  22%0%0''ssdd((nCnCllUUT1T1}I}IDD11CCXXooiiDDmmqqggBB88~~^^\:\:  !!vv44EE||;;,,eeee^^ss@@zz^^ s sFFkk{{   " "gpgpuuBB77ccrJrJL L c Zc Zl= l= P P   v v,|,|"",,88((bb      e+e+OO  33AAAuAuUUOOn4n4M-M-77__ 66  cScSbb%A%AKSKSoo%}%}  II| |   II33HHll#k#k[[ADAD55))""  !p !p m=m= A A - -{{$P$P>>bLbLNN__jjII*> *>   L L     {{LL   A A??rr+F+FyyJvJvTPTPWW  hh22**||VuVunnYY4X4X  dd  s\s\rr>>MMTT|(|(l$l$//  ((^[ ^[ g g w )w )uueeqqmm,,ZZxfxf  c|c|M M ? d? dnn4:4:x#x#pp??@@KK00 % %GG  11 y y33llVVFFhhOvOv99BBJJ\\PcPcff@@dd%%   @ @UUBB8 8   qq((,y,y "("(B B   Z0Z0LL     11[[GG@>@>~e~e*8*8  n n   kkPP**LLe e   p p } } M M r r [J[J$$ ^ ^[[MMJJ##y>y>}}tt&&VV>>--  #j#jXXBB= = wwx<x<\2\2C)C){{aa??BBPP88jju =u = ) ) X XaaGGiWiWFFqqJJ~~ ss * *C'C'ww  tjtjcc4T4TyfyfggGG88TT::==UU66ll##EEwwvv b bR -R -##@ @ qq77""99..;;9944""  ==  77 X X ffuu7 7 P P FF   @@2n2nII+=+=DDooZZy y p p ((  ]]IIRR""h`h`ccuuN$N$uuII~~>p>p%M%Mss0 0 MMiyiy..ii>55x jx jnn9911}}[3[3tt))::OO;;y y DwDwY Y   ~ ~ jjnnII!B!BLL M MMM<< 7 7 ) ) FFMDMD< < W W 7 7 nnhhKK))MMT T P P7*7***"Q"QNN  77 ((((111ۜ1ۜwQwQkk W W  hh. . e e   ::~4~4**ccZZBB? ?   ; ; t t uH uH + + v v F F   Y8Y8>>ߵߵ_D_DVqVqR R "W"W))<(<(ff  ''h&h&xx;;hQhQhh.. X XkkFUFU&&      Gq Gq F F qqppMMUU@ @   AnAnvv  z3z3FFooOO^^l\l\++E E     zzLLdd55uuvv44/"/"sDsDEyEyz z \\ wwQQBBssyy  KE KE        ##mm""LLY(Y(((s 3s 3    zzkkgSgSxxr Tr TB;B;||YYHHvv<>qqss&&KKpmpm  ' ' ll????11@M@Moo  xxook k hh;;: C: C  //  e.e.nnzzv(v(??ttKKqq    R!R!p p ttll..qWqWdddd//__p p #V#V..(.(.&_&_7f7frrgg 8181""+I+I88qqH H # #     ZZ2255NN//II22II<<    f f   ) )    xx]B]BUrUr|؅|؅6611YY7 7 ;;((..5+5+1#'1#'. . susuqqD)D)--] ]   | | MM;;==$$EEjpjpd d U U c c ?Z ?Z ''ffSS*~*~_C_C55886 6 dd. . > e> e{{UUxx55S S hhii X X   m mD@D@z^z^--H)H)l)l)P,P,XX1919YYjjKKmmF/F/ 11{{''    [[a-a-,^ ,^ y2y2UU?b?bNN77"""" MM T T  $ $  #T#TWWdd--vjvjVkVk::VVHHJJrrggGGPP88JJ==YY]]))==TT]]X cX cx Yx Y@ @ N N x x MM88;;ZZ11%%QQ   { {nTnTPPLLEEuuii ` `    tt i i5544zz  ODODaaOO' ' ""ffggmsms$I$IRV RV K K %9%9% % aa @@};};>>&&||CpCpjjccG[G[ ccwwoOoOvv    1n1nd ;d ;JJll55..hhTO TO BB~~y y F F vv(A(A( ( aaVRVR tt"@"@ZZiiC C &&""  $$/ z/ zRRccӊӊHyHyZZqqWWC C ;!;!$$!!V gV g44KK((xx**UU  qqJJ==::}}TT\\||FFCC!!A JA J  f f p p qwqw&&,V,V//u u 99!A!A""N N d d ''D^D^J۫J۫ l lJJ * *D2D2g-g-$$4 4 VV"Ԑ"ԐRyRyݡݡ88{{EE  {{((    ) )9966c~c~**DD||004141qq{{Q Q = =         wi wi E ERR]]ߔߔwDwDffLL  D2D2&&(( # #II" " f f f#f#7s7s    @ @ D6D6nOnO S S88YY  G G V V 6: 6:  qqffUU0F0FOOqq}}  > > HH--  E E gg]]ppp}p}??xxvvy (y (  DDkk,^,^**K)K)tstsyyllYYbbAAAABB+ |+ |3 3 **rrKK55//]] a ai6i6zzqq  R R    - -GAGAHH//# !# !( ( AAHwHwEXEXFF))((rJrJ,,UfUfvv : :  ` ` 9 9 P P ( (;;DD))DDQQ ++]]  i Yi Y: : ::AZAZqqqqeep=p=JJ  wx wx   r r p-p-llt{t{ q qPP..pp  uu--  nnSS[[<<445]5]@@  , , //g g ~ ~ ! ! *i*ibbnn ii``xxnnxx((&&$ $ MM  ''JJG`G`}}MMwcwcB B 8b8b}}    IIvv --++||@@WW[[d d ""J J   mKmKKKAA||bbn n EE##~b~b  $ /$ /**DDhhyyNNCC((??h Sh S--6)6) E Eff7w7wGGrrIILLvv  %%tQ tQ 00&&mmjj-F-FVl V uh h uu  " q8K oH  ))5050 Ѵ ѴDәDәa.a.]]  H H..o1o1#+#+ww] ] ""p@p@BB    88  9 9 ~ L~ L   ee33??CCbbwawa66yy99t t E E   q q ~Z ~Z Y Y q5 q5  f fjj((ffyy&&  **%%%%$$   %b%bYY / / * * 9 9%q%qTT[[V#V#hEhEm m   ; ; j j D D   PnPn))7W7Woo | | e e ll     //**kkJfJfJJ EzEz<<jj__YY;k;k{{xxWWcOcOSSGGuu ww''[[MM~~44w w I;I;r%r%  q q Y Y iihh,,kk//CCY1Y1 \ \  a a   --"{"{xxPPjNjNxxPP!!o`o`uuiieeeeMMMMww|X|X66UUd d ?dEobbXX D  u*  (   {n{nDDcULLGvGvA{ p{ < m< mY Y PPAA m mAkAk--( @( @ v v 8 8  QQVVAAN N SSWW$ $ iiXX55V V 3 3 [h[h>J >J   ~~IIttU}U}{{DDjj > >SbSbvv.q.qynyn m mz z t t    4V4V4J4J`%`%JJnnPPvvN(N(jj \ \&&4 4  h h..NNggddk k % % CCv jv j33''׋׋;;SSUU??  $$!!CC ^^++iiJJ{{   e eee>>FFuGuGx.x.AxAx 00rrLL ' '  **Cj Cj  ,6,6hhMMPPeeOO  eeR R t#pt#pK! K!   * * aa77885$5$MM 7 7  hh(&(&2< 2< /N/N%%  }}vvBBԩԩGGww--""  h3h3a~t j 8 |8 |ww'@o=ppxxRRWWW5W5^^//66;;^ @^ @  i v qL    ' ' J J H ARl\ 11nn6f6f  : : pp""!!774 4 LL 2y2yLLQQaa99SS    ppZZ|y|y@@``.. o o  ; ; y y..MpMpbb@@&&55BBGG  + + ((V V  p/p/6*tz5XX55qa8[7GG ~ ~W PW PGG  ##__ 99ZUZU  ||3J_w 66>>*Z-gGt66HH__22PP : :  ??aa66) ) dd~<~<[[WW77vvbbtt        ))??ACAC99mmzz3F3FKKddQQmm &&ffKKMMaa_}_}ddjj  b? b?   b b  @@ww''--BB3O3O        xxOhOhppLLkk  Au Au     00))CC``ssk k   RRp p jjL}L}DGDG..5 5 DPDPpp( ( ShShKK##22**ff2Y2Y<<*<*G>G__**bb''""  VV/ / * *  X X >; >; h h xt xt 33VzVzZZQ Q --JJ5ت5تڣڣ99: : Z)Z)G.G.,,$$kk++UUvvPPTTGdGd)) z z6 6 T {T {'k'kii C C  O O _ _   [[KKUU55؎؎C"C"jBjBll  LL  9% 9%  %%DSDSUUjj;;w w   e e     G G?-?-m]m]   { {, ,   -2 -2 | |      # D# D      ? U? Uee::ff""FF      f f d  d  GG00gg<<ee''5T5Tzzhh^^66,,;;qq''....``rrWW--xx<<VKVK;;DD" " hh  ?6?6iiݦʽۦʽ""00TT : :wW wW WW))y y ??~~ + +""ppZ Z   ++\~\~ssvbvb''WW         D D4 4 __KK!!!!$h$hxx b b TeTeI&I&F F 66?? KK}F}FEiEinn33{{jAjA[[~~tt܄܄RR : :?? II_2_2U8U8rr~~**CKCK   C C   M< M< r r r6 r6     p p   $ $     [ [  k kFFc c [[vvPP991v1vqqGGhh??2h2hgg  zGzG ||rr-4-4ppqq>>TT^^pp*-*-wwmm    T T   mm  ! ! ::'m'm}}{{U"U"ttss*I*IPPMMSS & &3%3%^^QQEE````$$NNtt/"/"eeNN88rraa// \\;;KK   3 3\? \? d'd' a a    ` ` ddjhjhTT>q>q t t> > ! !  ' "' "--NNCCjjRRr r  Y Y / /  tt$$ee!Z!Z~~FFgFgFII Q Q@ @ fD fD Pz Pz  ++OO^^??LLWWVLVL 22f0f0UUQQ33HHii33>=>=PP[[[[PP2W2W,,N N < <   99  55  3# 3# B FB F\\  L L   WW    7*7*/ / v v ~~<<II<><>KK6!6!'<'<""rrBB33VV11޶޶OoOo]q]q44߳'' ݿ ݿ``PP55aa^^00^^ ppaxax v v   ""%%~'~'*|*|++. . Y1"Y1"3c$3c$;6"&;6"&h7&h7&6&6&3$3$|/!|/!))m#m#BlBlZZ]]3"3"MMOZOZ}}   JJA(A(bbEE##ո]׸] ̪ ̪ҹҹ߫//>>FF{ߠ{ߠ}}~"~"[ѳ[ѳiɰiɰYY0B0B{¥{¥LLؿΪݿΪ > >II  ``]],,RRQ Q |Y |Y rr!!m&dm&d**<-<-. . |. |. m/h!m/h!0["0["1=#1=#F2#F2#%3$%3$ 3# 3#M0"M0"O-O-`'`' ! !cc  ~ ~   6 6 ' ' 88dd00HH$$22ooTT<Ϡ<ϠƩƩqq--Վڎr0r0ooIDIDX[X[{={=ZZ?l?lTT;;>>55( (   ffB\B\00  S S   K K C k C k     y Xy Xg~g~22BByy{/{/66CC99oommR3R3ooFFsjsjyyDD NNss44UUI I aaH"H"j j   XlXl##7a7ao / o / zh zh   3 3 t  t        DDffoo663d3d::hhffv)v)BBzz--izizyyVOVO]]ppB3B3==FF.:.:rrii44h h     %b%b]V]V  6 6 ]]33@2@2++ff F FN N aQ aQ n n  , , ZZDD2g2gcc66TT;;``44L L nn&&>ZZnn.b.bppbb~ ~ IISSll{s{s99YY;B;B YYZZ ""]&]&{{yy``h h       %7%7@'@'mmFF5!5!VV A A   ItItx1x1PQPQg g   l l 99aa==  bGbGjjtt{{ffGGDDq0q0s[s[& & zzPPܟܟssZ؎Z؎((ݎݎ__Q Q ,,QQxxNNuuX-X-  UU#5#5)U)U- !- !a1#a1#3%3%4&4&/6+'/6+'P7?(P7?(9@)9@) ;* ;*c=,c=,s@.s@.A/A/B/B/@.@.;+;+4&4&-C!-C!%%NNkmkm    *f *f     L L vv;Z;Z!!nnQ}Q}ҞHΞH'l'l*M*M7Ɔ7Ɔ8˞8˞ЋЋ;;ݧܧ2ͤ2ͤgɪgɪf>QAQA& &   $7 $7 +O+Oss  **3'3'>4.>4.*EJ3*EJ3E3E3Ci2Ci2=u-=u-4&4&*?*?jj    4 4 O O   K. K.  $$UU//wwhwhw}'}'IIٹٹKӛKӛXX_ɘ_ɘ/{/{mmggggnnғғagag}}hh'['[--cco o ==bb55vv  C C B}B}GG!!||iiFFaamm==FFDeDe-j-jkrkrO>O>G G      hJhJ   7 7 w1w1   <J<Jii66##==dd @@88 @~@~>>AA,ߑ,ߑާާb b <<001f1f!!jjhh~~oo8"8"88ll]] : :<<##      pX pX !!%%(=(=_)+_)+w(Ow(O(&(&##!!  l!gl!g>">"#|#|1$"1$"l$<l$<p#p#!!mm} } s s / / WW%%=M=Mg>g> eeAA B B==fڝfڝ--&&55}}(X(X@@_ފ_ ۱u^u^GG__rvrvRDRD8 8 ::``ddT T   y y   m- m-   8X 8X g g   Gk Gk ))ZZ66MMpp   EEF 5F 5_ _ aa+ + 22  ;;TTMM55@ @ dSdSOO W W  knkn  eeN N Zr>r - -## ## &&E)E) ," ,"@.#@.#R/B$R/B$s/$s/$.#.#-"-"+!+!); ); I(I(&&%%o#[o#[    @ @h6h6UzUz99))ff!!##((DDO԰O԰&&hYhYc8c8xxXX\\EE''LL%%kkAA  GG[[%%L pL p   G G } } [ [ < < 8 8   . . !5!5e e f f   >b>bfefeCC^^;;xxXX::;;GG::XXzFzFllaa%w%w. . ||cLcL tt  r!r!ss l l HH||>>,,rrq q 0u 0u   H2 H2 00]]PPWW==}}ll uu=A=AYYggzz2K2KCC>>]]qTqT$|$|__mm00I I }}WcWc   a a  MBMB?? t tv v w w kkraraMM     99S S **99aa~~!(!(s$s$77> > &&c"c"J J BBQQ??oo]K]KJJuJuJAaAarrAAUAUAWWff ffMM@@zz ..jj22,,`<`<KcKc**uAuA.. KK  /2/2GG \ \ 44II "t"tEESSnn$$+"+",S#,S#''''xxO4O444&C&CKKIIJBJBgg4 4 gg  i7i7hh SSmmXX::++00++33kk\\ ..ccvv>  >    . . N N ~E ~E   kk mmnn] Y] YCCa)a)/!/! ! !00 ||99}}))ZZhhPP55YXYXii55??@@ososooBBbb K K QzQz&&A dA d" q " q     +s +s  FF  QQ    ""n n yoyoMM@ @ T_ T_ 8 8   D D 3 3 v v h h __7-7-Y Y HH]]F\F\GG66#T#T..==??)q)q>>yy'a'aaa{{&&yyttMMff[[``KKOIOI::5p5pFgFg00DD O O % % # # z z g gpp^^))FFDDTSTS*T*TvvGGll       p p776F6Fpp/x/x\\<<==|y|y||MMxx22HAHA  O O > > g g 4  4  IIjTjT00\\C 7C 7   x x 88~-~-' I' I^^TPTP UU:5:5{{7L7LnnttWWV\V\'m'm&F&FSS((ee::$$:[:[66gg++aa m m    OO11##%%""{{  OO  ( (   ()()II::O O = =   nt nt GG9 ^9 ^5L5LSSvv\\nnXX``QQDD@@YY ] ]i+i+@E@E((bbjj2*2*AA]+]+gg;;}}00 bUbUGGoPoP[ [ ''gg0x0x``& & uu66--@@[[hh_q_qAAi i c c XX22:: a a  wwaaxx{{\\   KK}y}yX X //EE-4-4~~EE W W Y Y     a a tt$$9-9-uu_]_]__ AA--R9R9KKuupqpq##HHt!t!ff  <<--NN__P?P?++ppSSCC   y y B B NNuuVV%%|:|:55""  , , ]  ]  [ [ l  l   zSzS_1_1  \ \   --p p 4 4 nngg\Z\ZYY33bb,,nn W WNN E E=d=dUUzz++XXr}r}SSII))KaKa]]33pp3p3p{^{^@@SS0055r{r{YOYO  y~y~> >  "v  wPP  @ 2@ 2Jj#uI~\\..YY,""  K  K  Ij&EE;;XiXi00JJ[L[Lkk4s4s&&iiaaZZ22rree/R>11\\66~[ce+UURR7vI]$]jj?\?\**BBXnXn77TTL%L%,,i i    Z Z xxJnJnoo0077ccSSWWiYiY^^ JJ##ffAA  // F F H H _ _ > ?>0"c9c9y;Z9Fp2p2t t SSII;; >> jj~~tt,, ( (" j " j         & &I[I[++[[22))|3|3BB%%  %F%Fyy>>||KKssXX''33 @ @88`` ` K ` K m m WW11``DD  nnYY$$  uDuD$$:<:<~~ccnn||k k w # w #    _  _ : :  ]]  FFll22bbP|P|TT-n-n} } } i} iBB6600 ..++wwNN PP**  UU((nhnhOO] ]   a A a A G X G X  nn4.4.R&R&k k t t //NN    SS / /ee55  uuAhAhAAVV&&B:B:GG~]~]DD]]..{*{*gg44//cc}}  ::   d d H H mm\\      b b 4 4 "h"hKK  + l + l {  {    n n O O ` ` / /  cca a IIdd||vv!!vvKK0s0s  77[[8q8q[[00AARRddVVII..{{uuNNiiYY66--22popo GG!!11>S >S nnT@T@33,,HHGG++XX;; ~ ~r r dndnZj Zj  SSoaoaKKYY0 0  i i   H H     *8 *8  l  l h h k k H H ^r^rQMQM| 4 | 4   SSUU=}=}jj] ] ^  ^  (( ll}}ii XXGGp6p6 qMqMFF\\9]9]eeddQfQf@@==11;;r r \\<<``eePPQQ     3 3 Q Q P P - -     OOmm--llVV  dd!h!hVV88O{O{JJ||f$f$!!mm:: ododttQQ00 >>__YHYH6 '6 's y s y O O     |&|&##SdSd!!__rrllhhEE9a9aii2Y2Ymm Y YppVV\\&&00vv??[[dd]]FFEEz#z#cYcYLLEEE E   @ @ R R  [ [aa"'"'88II++jj1o1ojj>>/3/3}}MM||55pjpjPP   ) ) ( ( ((mm[[ddHH  g g V V l 0 l 0 qqzzQNQNRR=X=Xvv**ffIxIxb b ^ ^ ~Q~QcUcU11mm||o&o&PPAAdd--aa, ", "L  L  W W O j O j  PPkkWW##DXDX Q Q $$  i i g g %%rrj2j2  7X7X d d;;((``55qqAAvvEE222;2;RReeNNd4d4bb22qq!!SSC C xxhh&&==%%\ \  A A . .%%w%w%]$]${{  = =    k k   h h   x x *C*CF.F...PP''UqUq?y?yLޕLޕ}7}7xx"I"I{Y{YfBfB==26261717ޖ__ߞߞl\l\?[?[ii88vlvlhhEENxNx   9 9 ~N~N%%WWqq{|{|V1V1JHJH;-;-77]+]+   yyvv##~~DDuu kk==qq  xXxX--iidܯdܯtt޸KK""))ff  SSRR00 A A   7 7  o o     y y  tYtY^^DDIISS]]_F_F8i8iuXuXvvll!!UU- - 44DDRnRnJJggRRSS!!KKZZ!!; ; XXBB+C+Cx ` x ` ""ff__uu ` `   r r       ppPPOO``""KKkk%%lZlZPPZZ  3E3EOOppHzHzUU"  "  p p ! ! XXzz^^ ZZ{~{~ffJ)J)yyNNLL##II66**jdjd''jjjjvvUUGG=E=E{{v(v(;;AAUU"Q"QA$A$##[[GGwwLLRRoo    &&8811  QQ>>p[p[ewew;; ``RR((7u7u99qsqsVV;;UUeevvHH \\DDllEE++e e l c l c *  *  TOTO<<,,4%4%k[k[&_&_C`C`Y_Y_ImIm00""}} +"+" O OHHBB**;;EEkk##^5^5 77bbOOLMLMMM@@66EEhh??WWtKtKooe ~e ~3 3 eiei))$$jjYY""S#S##T #T # # _ _ uu[C[C R R nnh h   gygyK6rY5ލ5ލٸ܈ٸܕt٭m)߿l/I/I''zz?c?cHHGfGf664400>->-??   HHjjii,3,3uSuSyy0202,,0!0!))[ti@nFF   n0$7==+V+V66x#x# nnddVV\\88e3e3hhtt''HH{{""YYTT??)u)uYY bb''0 0 LL H P H P S S J T J T i i ""  ==DDPPaaj~j~ttuuD D GG.. 0404MMo;>;bb``scscrrc c 77LL$$oo ))QQ``/./.00 GG 5 5 V VVVIIUUPP44GGFF""55HH\\ D>D>  t B t B " "  PPUU;;u?u?NN L L ??SS$$&K&KXX] W ] W RR{ { ##hhz3z3NN m  m VV00ss4Q4Qw w /g/gLvLvHH((  vvss^b^b3~3~__f f @@XX}}ccSSFMFMttiwiwllm9m9??yy33008!8!77jqjq? ?  ss$#$#*)*)/I-/I-10100I/0I/,T+,T+'&'&2" 2" yyKK|}|}1414#)#)vv ,f,f^>^66 dddd  i - i - 88$$HeHe  4+4+ l l a a  7  7 ccDDQQffeoeo /N/N H H   X X W % W % <<ggp7p7++,,^^1B1BBJBJz6z6GtGt88MbMb~~/7/76Q6QaLaLQQ77gsgs22jMjM##TTss2 2  00pp<<:: mmSSpNpN:: z  z @@ll{{FF UU@@%%AA77??$$I;I;SSwwEnEn&9&9||mzmzaQaQ..7/7/EGEG` } ` }   \\(>  hhtt&&PaPa%%OO}}h.h. % %XkXk?N?NlqlqRRmm. .   ccnnuu??&&yy\\GGN9N9RTRTRR!!NNNN3333}c}cLLYY A%A%&&',',55EoEo:: & &,, 66CCDDeeEE!!L L n e n e ++ # # p  p  9 9 &l&l R9R9O O 22RRRBRB22ss%%ee11\\66HUHU~~ssj j ZZss vZvZfIfI?"?"wTwT{c{cXIXI  C5C5A+A+KKo o F F _v_vll  & = & = #R#RQQ//DKDK55IIcc S S Q 3 Q 3 <<d d  " "{{jjhh   [[   a a ;;rr;;UUkkJ%J% t t * * <<8r8ruNuNopop\\OO----yZyZqkqkkiki&@&@EGEGaaGGYY##55 * * X X 88MSMS00__TOTOnn}}/p/pkwkwSS""?I?I i  i l l Q Q ee\\ ??,,jjii 66SSss{t{t))116K6K_k_kuuAA||#2#2  rre0e0d)d)JJVV    d d 33  CCO O --00ll66\\RtRt1[1[uEuEvXvX<.<.CCttttGG<<vvJ4J4vv))KK88^^++/B/BDKDK|T|Trr""JJ%^%^))PrPr$x$x55cUcUyynOnOXXMMBB B B g g ''rrNENEX+X+ ]  ] rrbWbW $ $ ddxqxqeCeCKKsTsT''8 * 8 * i i ..--}[}[YYNN22{{<><>C C o@o@iiz z 88xmxmfUfUCC)){{/j/jejej~~oo==8 ~ 8 ~ i  i  C}C}RRBNBN DD^^$($(QQ\\ddOeOe@@2a2a{{zz ' ' vv__,1,15 5 U!U!;;11 [ [ //\\ s sz z JJvvKKZZJgJgAAyyg g 3 3   $$;o;olqlqvPvP}}//Y^Y^JJ~~wwAA  O)O)oowwoo[[~~::]g]g[[0 0 <<kk00,,N7N7igig__ oo 2  2 ))ZKZKK K WW@z@znn__z3z3'' m`m`EE^^&V&Vff<<}}H/H/wwv8v8f f HH``NN<<MM$I$IPPRR]]~~"";;brbrtt$`$`@@uuxxzz9 G9 GuuR0R0oo  MMUeUenn!!44hh,,..\\AAzzeehh77Z5Z5>>eeggPmPmDD++vvAA.F.F==mmlleqeq__..!!AAhhbbLlLl  eeQcQccc'J'JnnHHzzg g U U % % y y   22F F a a x x **{{tt44##E E J J   rrIMIM++jjllaa } }JJ]qUs:-XX;Rkg((33{FS j2SS||e'e')e,ll n<)){{ `pN^88+F+Fii   w'w'&&II\\}}m&m&dd??VV55  ,  ,    CC&&}}||CCggaa^^% % g g L L   ''\\ffttwwTT==@@3 3 ! ! ( y ( y u o u o %  %    LLGNGNDD??rr[[++[[t't'CC&&PP[[6633rrTfx1eeQw[t 5522aaTDTD]]::CC PP<< Y Y==rrkk==ff,,VVZZ??ddeeW!6=wcIIRR >>ii]"]" 7 7ffg.g.kklls s <<^L^L,?,?wwJ J H H ==FF1%1%J>|M|MXXss>>^^u]u]$$    66hhc' c' Q Q ] { ] { 6 6 IIww44wOwOII ||pp__;";"+2+2,z,zbbRR ! !qqgg::**4{4{##}}cAcA33JJ||66H&H&887!7! g g @ @  IIbb<<KKHH(e(e  __.. _ _ ,,bbC@C@w w q M q M 4 E 4 E 99JJ##&&==$$/M/M++JJe2e277TXTX<<,,$$<v>99LL$$""  hhQQ..Y.Y.ANANh3h3@9@9R-R-;A;A++]H]H6C6C>m>mi%i%ee77 ,^,^"~"~    p p = = aa``yyHHA/A/}}22  x x 5 5 UU..ZZ==1h1h((D+D+88hhggWW//@E@E - -7W7W33:.:.TT=:=: hh''XCXC    <> jj'r'r@f@fyy..wwnnRR!!KK:q:qWWss%%ww -f-fYYRRff``II::tTtT}E}Eoo ) ) M 7 M 7  # #XvXv"G"G77 j jKKgg++AA;;==YY!!  X X   LL^6^6zz66eemm))99//tt88UU^^ggm\m\LNLNnknk008&8&66<>^^99((\ \ A A K 6K 6  ||AA : :   Q Q   t t y y    %%!!##    , , A Ah:h:;;ee4242XXZZ||AAIIttOO22^^jj<0<0^^11>>ccWWSSKKEE&&33jjECECcscsvv9v: Zu;E;E::NNS n*J2B2B^[L_ cchhd'd'tK^#l/ZNNVVR R iiqqn n u u @ @ **IIJJ++I1I1==WWNN  R TR T.}.}E E L S L S 1^1^[{[{ees]s]zz33P0P0BBRRMYMYssxx]]CCQfQf_J_J**bby.y.44(( F F  >%>%.S.S++%P%P##""".". V V     +_+_@0@0/5/5 S S# # ;;99__{${$ Y Y&^&^TTrr<<ww4444RRp6p6nMnMZZ>> !!SSMM{{**22  //' ' J J r r p p ] ] l l | | g g t t \ \ ' ' A A mm99ww!!OSOSrr]]GG,,77(({{::YjYjn2n2wowovv--5N5N88!M!M[[ddWrWr2277GGFMFM,,]]]']'DDJJee  ssPP44|w|w,F,F. . R  R  p p V Y V Y " 2 " 2 ` ` q, q, b b ::BB          F F hhHHxfxf""hh(h(hLL7755ppE~E~$J$JRRRfRfgg::>W>Waavcvc::gg))ooyy__tt%%}s}s--]]JJyy//    e=e=~Z~ZDUDU%% k k)o)o,z,zXKXKUUrr55nnS.S.uuXXww~~ffmLmLe/e/i'i'\\;;ll8l8l#"#"  CCrr__bb PP#?#?XXSSOOX}X}55nn\Z\Zt t XX'&'& L L2q2q * *__UsUs__g@g@77W W JJrr88RXRXZZ;*;*  ``  ? ?    ww d dI I J  J  --rr99""     =m=m~ S~ S WW5r5reeXX,,/33JMcuu^^@@Ed7&`6uuZZ{R{R  __ZZ77zaza//##BB&O&Onnoo{{ZZNN""r'r'\\o o  p  p 11>">"    O O   7  7   q qq qQ wQ w  O [O [    @ @ 's'shhbbhh))OO^^vvRRuu``gg ,,dcdclldd66>>ddDHDH1:1:%%;;..cc33xxpSpSU U l l   v v s s F F ( (  h 6h 6     { {O   \p    ]  ] K p K p  ja  9 D4040GGDDNNmmH|H|CC;;ffNNG!G!II0044  66dd66BB66  77"{"{vvcc44##((  HuHuMMV/V/((,!,! E Ez6z6DD|W|WPPAA||wwqqffpp--""(2(2^^oo22RR t tQ{Q{FF    6 6 SScciGiG''lluuAAu>u>X'X'ccr>r>ddPPDDllkSkShUhU//ee-/-/JJ>>00ww,?,?..ieie]q]q66j j 2 2 ,9 ,9   ''^"^"))LL|q|q  YSYSooZZkkdd''ccFF(([[&&s7s7##ee''MMRR99BB  ee` ` ss[[ppJJ-]-]LeLe44""gg88))8<8<]:]:xxccUUQQRwRw{{vv\\YYYYzzYYeeii#k#k~~**77gngnWW    M M ] ] :g:gDDvvnn""kk*b*bII  u R u R   Z Z_ _ 7 7 ##&&ff__}}FFvv//EE--TTOO " "]]y"y"iinnt_t_mm tt!!99U&U&xx,?,?--&&N:N:YYGG]J]J))hhVV[y [y ; ;     ppBB7$7$ooO O \;\;EEy$y$y@y@ II33!!M7M7//vvnn]]mGmG>>JJee@@ wwzzggAAvv>> d d,},}LL  **  LLNN66SSRRGgGgppUU11  xxHH55GG``EERRhhmmH&H&B5B5,,..zyzyVV1k1kEE,,RR#z#z009&9&==bb**ooEE@@qAqA %%ppss:7:7z_z_%%aaoobpbp!!??ffooPP!!jjZZ$$qqyiyi``11\B\B$$-v-v 1 1 mm  nnYYsszzjj]]Y.Y.[[*b*bff  **iiNN77~~22cucuQYQY ..&&D1D188uu$9$9$r$r??</>AbAbp}p}zz~o~o$$!!qqGGddvveeQQ;;$$IZIZS!S![[ SS2233rrhh8R8R  XXQ*Q*zqzq##f}f}==ipipxxwwXXQQdd,,ppRR##<<{x{xmm77  qq  L_L_))ppUUttllKK>>]]}Y}Y !!11kk55<<_A_A&&GG..uu::SS,,uu66&&{{  ~~}}RR22$$~~OOMlMljMjM  dKdKqEqE ee444"4"[[KK33}}ghghXX;;NfNfPTPT r rwwRROOf(f(^^qqV V jujuFFIIVEVE!!99ee%%"Z"ZNN%%pp::;n;njXjX""""55mmuuuuVV&&e=e=LLbMbM%%))v(v(\J\Ju u //iiYJYJ##ccXX@@ggJ?J?  "T"TUUhhOOo_o_#>#>NN,x,x  !!eeLL77HHckckw?w?gg<4<4ZZ]]++~E~EnhnhtRtRffddg6g6  iiPP``44ll;;\\<>II((wLwL&&eeddii1d1dkknn!!DZDZ}}OOAAJJPPNNLL;1;133%%(l(lOOmmII{{  LpLp**m^m^88NdNd^^DD00     T TCC[[OOPqPqmmd>d>::,M,M''  dd  ::9977]a]a1166ZZddww Y Y{{XXSSEE```2`2rr ? ?ss[[ppAAttFFddB1B1. . ] ] bIbI5599<<% % ??  aa"h"hy`y`||PP))11*}*}  ''88  pp]]""UU--iikk((nlnlccxx++JJee&&zMzM>J>J88))dd+J+JiiYoYo44  ^^bb\\s s ))""&&ddBBzzQQuu!H!Hmmbbxxtt--FF"7"7yyvv..3;3;cc(( ~~**FFrr--__AAddBB-w-w#n#nRRuu%~%~`v`v;o;ott11[[==.#.#<^<^88//ii  ll\\DDaa``ssL8L8wwAAWW0"0"44((  bb77''  E E ##pp..K;K;&&66//ppcc\\>>CC::ZZ gg,,ggUU]]xx JJVVPPjjkk~~SSuu--%-%-ll}} qq]`]`// < <%%%%__44%%HH__ l lggX X tt^^l:l:';';wwAGAG-f-f::((00xx66//..SSNN]]//77  MoMog*g*ff:g:g}}]]GG^Y^Y**<> Y:--44 ll66]#]#bbqqQQ WWTT))QQGG##4499DDSS{L{L44llm_m_**^+^+RRjjdd``!g!gmmcc4499aa==22..(^(^yzyz``UUyyO1O1;;]]GGMMuur>r>hh9911ll1@1@SS22++ ""ffNNIIJJL L   RF RF       ;- ;- Z Z eeOO~~77||rr99QQJJ"Z"Z..ssgg##KK,,aallzqzqGGUU>>ZZ)) O OCC++66SS$6$6M}M}DDuu))?=?=]]))0 0 s s     3 3 ii  88>>nnEEPP44VV<>jojo22II  5544bb((    E E %r %r W W     [[JDJDccc c ||22MMAAQQ;;F*F*6622NNY:Y:K,K, iiHHbYbYiWiWttf=f==q=q**4b4bLLLLrr]]DD++))--CCdvdvaaww) ) ]];;XXUU++((T}T}..@@""hh==gg[[uu44#^#^::NNUUmm@2@2zKzK{{I$I$bbu(u(@@2J2JWW))r=r=SvSv""QQddgg0808|(|(  //yOyOa'a'II)=)=  00CCt_t_aa99<>ffGGww,X,X - -zzUU%*%*55}}hh__GG'3'3""nnrrj j bbIIGG GGOO+E+EggLL##ZZGGmm$O$O--LLkk77OOoo||44}}00mmz=z=  HnHn##**!/!/%2%2f f UUrrC_C_kk33e e gg  v!v!CC``(J(JGGnnccTTgg[[MMeeDSDS,A,A9O9Orr00@@x@x@gghhHHccLL ? ?ll8W8W\\JJ]]||\\:b:bDD__((w=w=  //ZZ//.N.N//eejjUUz>z>||** &&%%(K(K<<^^EE&&@@HH`` ::!!33}}^^ggEE?v?vOO77vv  r"r"RR!!  ::!!  "<"<++]]#P#P((3g3gooY Y hh 88``}B}BHHRR~~??!!66VV77<<vvRMRMK?K?\V\VggNNMZMZ%%II>e>ehhnnQQV V FF[[OTOT    / /   ^ ^ \ \   N N DDVV H H++,Z,Zuu==KK+{+{))||+C+CCC>>ffjj v v((ZZ >>%%&&ff__,,,,b_b_**??||tt--NNMMHH1~1~xx  jj<<..pfpfRR,,;;QQZZeeC\C\66+F+FFqFqzzcc##]|]|eeoo{{VV!!bbj~j~ffBLBL+(+(OdOdgg^ ^ \\}}__::PPyy((AAPPV$V$U%U%NNSSa)a)vv  h/h/ccJ_J_y>J,["'Y\\\\ ~o00XXXXWHWH_4_4sSsS"|"|55IIww**CC66kk00 @@nnYY#{#{kk @ @ZZ99`J`J1Oo)PP66.Q.Quull< < vvQQ<<NN2R2Raacc&=&=d8d833 E EhThTnn,G,G``oocc66 a akk||44rrKK66e3e3zzuutNtNxwxwb6b6TTmN<g*A,@,@,P,P;[;[Fb9T-F!2++3Y3YIIYVTQNyBj7\7\#C#C"-"- * *|"|"ueueAA=(=(;;zz  ##TT]]v#v#hh((gg>n>nooggppddxxyyN1N1CC  7Y7Ycctt55XX22}9}9 . .>f>fFaFa++CCEE++wawateteOOHH00]]~(~(``ZZww``(?(?``TTppaa//uuffxxMM==  ||ElEl''!>!>HHyyP1P16644!C!Cbb<<55&&yydd*F*FMMVV>>qq*S*S115Y5Y6X6X%%>>TThh}}77TTnn88JJ;;__>>nn''44 k k;;::&/&/XX))Y:Y:\P\Pff|1|1gg))vv:b:b;m;m$$N9N9J$J$SSbb7N7N3[3[nnJJ66SS^B^Bzz``aaJJbb=_=_tt]]??__ h huu((>>RRddeehhllqqw-w-ll@@CCaaWW|/|/ppll6 6 88  MMXX99 l lyyRR44}}hhIIrr$L$LuuYYzz""&&\\vv??||pppypy  ]]ll{"{"NN,?,?}}EE,,>>''qq,,PP F F>o>opp  EE??^^LL3300KKDD\\  RRyy66GG++X0X0oo 33LL4 4 KKt\t\ugug\\~~EE00AAwwccAiAi$K$K11wwVV]]  3T3TXXtt||uu..MMPP5X5XCCrr-z-z~~ccZZD%D%66:R:RqqJJOO  {{a;JmJm 59`Ndt^^>>jjHH 5Y-~tRRttw2__hh\%\%F F AAZZgg119[9[=[=[/9/9  5c5cttCC66e_e_uulplp_Y_Y>,>,//8)8)JEJESRSRUSUSQ:Q:((,,>1>1GLGLYXYX22'.'.KK \ \!t!tEEuunn99HH Z Z%%[[CCddqqmmllmmpp''UU}}rrII**iiXX<<88GG**0R0RWKWKvvvvYCYCXX^^gGgGyyhhTTC!5 (/`<TT==ccSS[[ii77  oo::  zztlemw  gg'78 :&  T1J }TT44==WWnn~~ffTTHHttFFdd|N|N``_4_4JJLL**#>#>  66VV//22WW44?k?kss22@OMLJI66##00=CJPWMDD!!uaNx=^-E!2!2<< Y!W"V"L#C"9#0#0  ttaaNN;;HHee# ! 44f[PPPar r nn26tY} Zjjjjjjjd,MMccss^TKBp:`2O+?+?,,;;JJ))ffccJJHHYYyy__,,0K0K9Z9Z?Y?Y2X2X&W&WVV55``??..]]PPVVgg5i5i  CC!!|%|%KK33'9'9aa{'{'zz33yy!K!KCaCa=g=g'='=ooUUKKqq  9c9cdd55++uuEmEm##  ,a,aUUttPP1A1A  !!    uuKKAAGGmm99DDff^^@m@m&0&0*R*RQQ;;NNAAzzNzNzee((ssYYVVffuu**==@@33wwLL+l+l//NNJJ|$|$%%&@&@++HHOO}}IItt  ))/'/'/2/2*-*-!!YYttffiiyy!!NN{{eeGG e eJJnn}}{{kk@@YYtt]]ffRREE&&  ::;t;tcc""LLffppzzzz44ccEE;l;l1f1f(`(` J J44  FF``ZZccQQ]]"?"?NNPPPP.M.M  11>}>}[[!!||kk[[LL>q>qAmAmByByAA?q?q<]<](9(9mmII55!!t t jjddaaqq55aaaaMM99EEqq 5u5ugg9955SS-5-5     EE>q>qWWyyyyeeSSSSQQ^^WWOyOy7U7U!! mmII55!!MMyy==*i*i<u<u9a9a%M%M  ]]IIee55+a+a:}:}EyEy<u<u#A#A    !!   !!==IIEEAA==II(U(U2Q2Q9M9M=I=I?U?U?a?a>}>}<<9u9u5a5a0M0M+I+I&E&E!1!1 )) 5 5$A$A--   - -!I!I2U2U/a/a+M+M'9'9}}yyeeaammyyAA&]&]?y?yRR``iinnppoollggqqwwzzzzxxttnngg__WWOmOm7Y7Y"E"E Q Q-]-]6Y6Y<U<U/Q/Q#M#M}}IIyyppz z %%AA]]yymmYYEE11zz  !!MMyy % %AA%]%].i.i4u4uHHWWaaggZZNNCC9u9u/a/a&M&M.I.I3U3U6a6a7}7}VVmmmmkkWWEE5a5a--uuaa]]yy  %%AA"-"-    % %AA(M(M1Y1Y7e7e;q;q=m=m=i=i,U,UAA--))%%      ! !==99%% ! !== Y Y'e'e<q<q<m<m;Y;Y)E)E!! 11=]=]VVXXXXFF6i6i(E(E  }}iieeaa]]YYee        %%11==IIEEAA==99&U&U/q/qEEUU``ggkkllkkXXGG8i8i*E*EAA==995511==IIUUAA--  qqmmiieeaammyy   - -99*E*E#A#A==99EE$Q$Q(M(M*I*I*E*E)Q)Q'M'M$I$I!E!EAA==))%%!!-- 9 9 5 5!!    ))%%!!  ))55   CUEX0j!j!!!,.DAOXjj 0 @ uP 0 uP&`8CDTXJoin us now KC we have the software Richard Stalc lmancK BSINFMTYPEND!NER58libcdio-0.83/test/data/isofs-m1.bin0000644000175000017500000255324011114145233014020 00000000000000h+R5}&VA-.HDeCEC8kee¯C|6=v؅ugA5/evCgNu* ~TA(&`eCC+ z=Gh5=Ӹ&iA -9tD%evšCE(buN W]AgUTCeC$~ pG1+S}bV)[AT  &e5C ڇ!q\א2K?gA*~Au#͎e†CN[z Z}sA9~hje5_CD|S4J#d2VJbvަyA a3eC^|?:H/q d^AЈ{eCe0 BeByƋAn\ej¾CGSV=)Ȑdj1k$չ8A$Π2egCҡQ/X,t y` !@5A MI$eRCI$]Fo}ANcRey‹C"'}=CD001LINUX CDROM @@"g. MKISOFS ISO 9660/HFS FILESYSTEM BUILDER & CDRECORD CD-R/DVD CREATOR (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING 2003042012291800200304201229180000000000000000002003042012291800 E)5_,HʼnZ\qօ$tY{Y{}b޶kJ}K2 Nq8=x/T ־MJZy]'=EtKK 3{/-?O91TThOahY\La:|GO$*qY*< ]Env9r*0M¡Bh` ~ԻBDfh1 3]l# MafCD001x բ U<[?m7Aw23KGqL-t$CwDxOv`"943MKI Sun Apr 20 12:29:18 2003 mkisofs 1.15a22 -R -o cdimage.raw /tmp/cdio-test dvrb~\ ,., " NJD4&66JBNF4\ZXBUFX;91?.'%"%!'#.-,!5vӯ#,0cYLEOLym e2an:([&+9O^uj3D et^\(C\ۺr<^iH,NuRDOC_xE67 <$Ar]f]leVNCZҡZrZ)w{W _OAG6xe\  <FhALi+[?r9KH}eCqj1p8HOu"j_b<yԾA[ 8e{CfBQʐe#g.SPRRPX$AATFg.g g.CEfg.RRPX$AATFg.g g.|HFFHf'5 COPYING.;1RRNM COPYINGPX$TFf'5g g pg 5DOCRRNMdocPX$AATFg 5g g 5ԡ [?hPs凈RC09J ɴMTj&f$~p;*iQk:QbrPh߸J%d7/$Cs&<&4i0;y&9n :`‡jvb_xϹ,(,Pl:\(?KzdhUJ!9j5~iƮe}X]&JV nкy2Ӵ3!4o9!6V_&>CM$fg 5RRPX$AATFg 5g g 5fg.RRPX$AATFg.g g.##g 5 README.TXT;1RRNMreadme.txtPX$TFg 5g g 5FU5kq> Q5'4qrCZ ɀlb,U&;BVLEgky8!Nn%窠),) !FS,bX"Riƛ4%R&Dᠩ۰sN}5 zcKg@E%vVlEo@Hp'3ڭ/UN4)}V,=p$´oo*.KM%&e>%ER TRRIP_1991ATHE ROCK RIDGE INTERCHANGE PROTOCOL PROVIDES SUPPORT FOR POSIX FILE SYSTEM SEMANTICSPLEASE CONTACT DISC PUBLISHER FOR SPECIFICATION SOURCE. SEE PUBLISHER IDENTIFIER IN PRIMARY VOLUME DESCRIPTOR FOR CONTACT INFORMATION.47Q Ҙ5jKDɏMGi~v AN҂rĈiA K7+^{9>om}H4zz"2"Οv!4\"Jf71FI{Y̐2䖻2<_-y>aGpg&yN rI)e(]$ґC !i'GEwiOU)ʿX[K$gwMS_OO1P-; E 3M& GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for eacjxYu\k ~ %862L8Sn3IWpealqrX0-M  [CBWDdO01*mySU];o? #j2#>3&ÒMSIsPvt )Km3apO /5D`m81'y2VV@_ؐ>fG*K-E-a%çw% Q{995n;5Ҝ?Z`s_^9zE3T8jHQ3p@<'h author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuoua_xl3X8i$ ?8Lo^4c k)c\CƥxfQ\Y>x~S ̚D)]ΜP) ({o:ǧIz0k.*S loӐSv%ϨeDy`_'^IF{f8Q~L$$yX[H/mB~4jƃK',|NWm\r$$kNW\/jD ܩ 550"ڽaߋXyzaFZIP{tQ(sly and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute thJ?v77i֜:.sCȠ[ft)0^E {% `gu=;GU#g;aE5QQ9 cAT#6Ka%*AE&ƫ^ =qM6EWآq:wSKɁVO].Cڧܯ'4oq$%+v GvHU!F*NfpÑ7zP"G}թÓ߳8MHX B&)em as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executar|DL F$ J7lFK\kSۀx[Un(V cOJOu08WI^WCX^ܠ oHnJu(QxuC:/U b;ՊRƳJ0TifQL\cL\WݮX-nYWWBemҏʀĂ>zQ:M8शf<|qT"49dF|>>P0nPkjӮ!040mB0ble work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may n2 XQu҄.Fݱ 4 ;ڈ9v&b9W8:9h=Dfʫ=:mmR@t@Ua&]<}U;٪ +`y WA݀]W~cat+2[N.( yyFp݃Y!j!}I\A O\܉<3Ix0).'6*>E&J@m`32'c .^:`!o+V/j_4 )Q)QQ2LZ9t1+0K1ot impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents EM$W̖x 4  nUuπpx7;+,=ł(Ps;ӔKhn5/xYZd Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License alonvd> |1[i,QAtF5M ff$`iG []7 p&ո }8Lq3lڳPqZ .KWQ*ljf-/1/@9eZ5þrlbJ5O^XSr<(Q@nߘ+lOvY9(4j?"g~3f,&\jlj#7 ᕤ0 y*oO?k]}vn~^L:mZTƒuY4g with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. #.l$k e۫pK[x/W8,¢?`cai34D|VDLhK.'}i?w$DWĽgZ0hG*v) kI4Gb 0SN 2)aN3EWg{&忢MoM0[X7eRxJnKElqe;]WF8\4sAYMt뙘>&Ueu8+7'\5 5This library is to encapsulate CD-ROM reading and control. Applications wishing to be oblivious of the OS- and device-dependant properties of a CD-ROM can use this library. Some support for disk image types like BIN/CUE and NRG is available, so applications that use this library also have the ability to read disc images as though they were CD's. Immediate uses are VCDImager, a navigation-capable Video CD plugin and CD-DA plugin for the media player xine. A sample utility, cdinfo, is included which displayings CD info. If libcddb (http://libcddb.sourceforge.net) is available, the cdinfo program will display CDDB matches on CD-DA discs. @?8i?]T,՞Z1 XzkZ-,LAMN\MmdEu2Q^ṁܬQ4k*|G35OC a!U|AP^D?QyKk s4mIlO6MΔ6\G N1.>?]|nGV~OdxI; m[WX[~ϕ䍬AȨgW qʲu;npTm{2C=qf۱?ζD X;6$9zW.Aj|09"uaeC}]l1"E7:],mAKwa^OeeCKfIՐ18l|a صA-eµCzc{9`.Π+2A ;He$lCf{f3U@wD͙̼}#Ay\xe9eȨA4PpGdXseYCPNaΐgC1vSbA[)e2CjD:^/qDx> < oAH;eC9 MCEfy1AC UP+=eJC5˨5(F*&rb~jTLA1aqL;e¨Ce_^ZGDOz9=q.AjgϮ^e/qC}d0&$6H>[pB^h8|Af1pweCsȓU I>QBC|qA=h7pe C¦a[t RP.N`r 0E\ A0(+fe3UCRN$qmwQ=KcGzA=n*oeŒC꼀J1[KRn2J܇A]MeVCfaM~;Sb!1>MA%8e#CppT `m@AieCFQR|>BUzݜEfz3%A8'JeECj*vVs,dFt 2XA|e΃%e¹Cq9/;AeAWX:ُ,eAJHe@e `C7ˋ9Iѐ7X"Jf@DA)àWieC⪼MPyYg[/nȩq7{ζ^AA e CSNvkb1S`S@R' :AW^De"fC{|U%ax.X4]A9T!e¿C- JbsgOA^h? eGC-T?SF9c8kBH8!p{AӦۗsN{eC`x>sdS;I3M"vA<5e%C#װj~?Ae]6^FZ#lAseTCHsYwf1D/S "-bA[+RظeŠCj y7Cg_7AzE[be1SCw$vӐ4hQ&g ϱAؓ!xKeC‰+xiF4N\'5hA%f.e9C{*S`0PpY3%Av ('=yZe-wC/T1Jq^ F>/ AW朏>#?e®C[ w2arWyO\.wA#E.eHCl{YD̐fs$2*lV&~HdTA(~Zi eC 2X!h\.rt Xm-,6YAs;lJBe4Ch RuV@6_$%8rˏewT w0w P`#yӥ'\eewno:H wټ1vSeb[p)eew7j*:= w,T6t$eXPGdsevw uw7y=CU+=eCw]t(z= GwwN>ߜoH ;J\evwR Ou wOQ9.jkLCewp}r0ٌG wU*nr~TagL &e5we֡א 2w/>qB+^|2q +hpewh[ z w [ha,=f뒖je5_wUS d2 VwKcݧg10n*ew5*1[ w,.tr X\ +{ew$גwe w#qM]ejwZȐd w&2jJL1?MegwfMaX, twEza 駵sR-'6:sWYewh/|%g w"k<սmK{h%s{e{wJ`0xʐe w#);{MgRvئeTw܀SZ- ww$6^8zZFlWܧJeawGs4Y Ew%LSY;Mvvi< 5ehw/ w&&7EH[ew whvX w'ny: -+Ze w7  0w(40<\(hg3ewi*( w)Q&!F%xVe+}wԷ Tw0 >(=#"e3wH0[w w193.%" =GewI w22*V~Ud_Tz(E~Z etw2Xh? w35W1O"_Sjb[#eEwjl!D vw4o^XTޛ0Pmepwh9zx< Dw5P S&Y;?l*BegwRVt w6 $88Ur:aewGP:E w7rsi^^Rq}mew-{}Ր 1w8b Gc_գ-ew`^{ w9.͡E/}5h11VHe$lwI0IJrf3 Uw@vNa}.uxeg=!5C"/@eYwΐg wCgu=έ>ke2w#^/ qwDhx= <;-%eweEo CwEb &9n`eJw+ wF+ң}kV[$ O ;ew@8!\Z wG NBz`W=@Tg然^e/qwGɲ~p$ 6wHZZ5p_8j~hhwew|J wI?g@A~Wuا#/e w#7N RwP/`Eqd0^i :0fe3Uw0  wQYJ*~Ty(;aw3ew^?-ŧK wR#1$)8n2geVw 7/; wS{ yb1Š\ e#wV pwTo NWʁRew'@6=|> BwUhf"y3<5- IƴeEwEI] v wVr:duN2Gt.}%ewgȏA wW<H_D9x.yv@e `w֫4*ѐ 7wXF?A~+<Oiew*y wYfnd7C#}6  e wpA5b1 Sw`ħ@,QI ÕS6_FLDe"fw_X-  wa~7Y_nOٟ !ew6߮mJ wbJ K[eceGw̺cX}9 wc\jbB9!.j 8Vew}cBQ swdR2#Mwe%wOuhHo~? Awe97uFKY#rnܮ!wM-eTw!Cw wf!DRc" /BNlewZxgC wgUD-6媈oLbe1Sw:èCӐ 4wha"%fDD,49Kewv1 Kx wiN 2'y*~`.e9w^-g`0 PwpU'Gco"va;Ze-ww:@Vf wqb=0^GP/z`BdL&?ewTm0a wrV\n.!Fv6eHw]-)I̐f ws@3U'f:M8qewߍ¯\. rwt sX,,uf^¼t^мe4w-Z"v @wUoe@:7GQ qzRNraF]bee@٧)_!OHGQu|aiܦ,@!Mee@ry$=GQ+}2ViB Me@v6B\$GuQ߂9|9K.rjePe@C}z=GGQN\4K> nev@q=p6uGQI7Y nٗ- ,Ce@eY+GGQl,tXS3܅&e@5_ ^TbcאG2Q8S:Hm,pZR meNe@)@I>zGQ ]@6Zl{c-"je5@_;dѦ1d2GVQM_tkX=e@w*(iGQ(?xL8*P_oz{e@ȧLPEeGQMQG]jej@8;ȐdGQ7(Y8,xnPfV2y-:e@g~)|CX,GtQXp' :]EH5Čte@RWGFQRߊRaNG˒ey@]^wloGQ=k>0G zBl% []e@{YGQpu Gcgy8e@$iq |W"G3Q asC©B9e@KVGQJ +CTte:@N.pK.GWQ Bƺ[Q'VXkd$ jRB Ye@3ghgGQ"mbV<Ĭ.cEe{@xI9ʐeGQ#30 U f%6[e@TeH{Z-GwQ$081P`k6}ye@aBB/GEQ%uU=!=/ eh@k捤WGQ& pW`@@e@Χo+m<)XGQ'W:?!}*.$e @"D"D G0Q(-0wTnZ 0eJN:43e@3nGQ)W,eîunsFVe+@}FGTQ0H  c{xl"e@3j7lGQ1.aru\)G+Ge@g wIGQ24h\L'hЃ-{;2et@ECZ?GQ3 Q"I *Z|e@Et3dvGvQ4i "fDPPݚe@p0HxkvdeY@/ƉsΐgGQC^F W,jUe@24- ^/GqQD;x7M<IvV%e@]_GCQE;M%vKۘ(QeJ@ާJ3C&.'GQF-Fw- Z6s; A4;e@h:LnZGQGH#z+؀e=2 FRbB^e/@qlO4B$G6QHc\p48ƸaIfVwe@§ d QGQI9l Krш埰e @ 2fGRQP)s2`{V0Rd^|$fe3@U-(ƪ;GQQ`LW8ۮlԧ e@F4KGQRSh;٦37eV@;l;GQSBÜbƔX1%8Y]C"e@#g1GpQT1S<qcb([+{K 1le@j?ȴ@|>GBQU'ڡqfis3N_z %veE@ϧQll8#vGQVtd3|25"fC%e@ݱSAGQW3 "i 0k!@e @`HC 1+ѐG7QX~ kxLO!ie@ӧ4+yGQY`fn/-76Jsxp̸ e@ ,h5Zyb1GSQ`n)@g[{ RiΙrDe"@f@;uGGQaGLSbYf!e@p.Nv?JGQb N;@`G}]eG@ɧRRڿTO9GQcelއB!ء=K4e@.Y,cGsQdT,t?XXNGe@%WYUSx]~?GAQe1jFSپ#beSr 2eT@79YnqwGQf DȼQ"{#q#*Ue@0|kCGQg"fD%_8z퐂W<be1@SvӐG4QhXe/ yAjKe@qnI9yxGQiɋ{NF' /q^.e@9rAU`0GPQpʛdC+}4'_Ze-@wP"q}X.GQq[^b/tI3?e@L. aGQrPD{\%̍.͠T*eH@ا{RK̐fGQsy5_a"j<~e@r@3\.GrQt &Xj,L11c2`e@45gG@Q?O*_,zze6)$D0P4mp1SbK,[Ap_ Eee6)jJ֟|H4ށ ,~jUUee6)HƢ-=4O`3k",,ev6)P%؍u4И8%k,VeC6)3&z=G4*s~7T,^И2%ev6)-]'u4H#Xe/F,;bBCe6)O>BG4-SFwZ, 4&e56):nא24r9$KlrH,OaS}e6)k z4 \84۸u,nf:Vje5_6)d۶Qd2V4LW=ݘK,f% e6)JF4q);2{MVRvd,l$b{e6)(P+;e4‡[ %,R8YCr"ej6)٤g1Ȑd4S;-6,s37G5eg6)hÄX,t4qs& S, {% eR6) Ql0#ɍF46yZ܋<lc(,+K ley6)? 4ɺ3F"i,W ǂkå]e6)1ԇY4tY<| (貣,vة*C8e$6)/'׬"34n`.r-\6,sLxZe6)hP5,Z4~߂ a,xjO!te:N6)K+ƍW4 ǧLTSq,bS[j{LR,1iY|rYe6)@e;ʐg4"l<21,K]e{6)5̸^Ycʐe4#t  ; ,@4`}C]eT6)JReOZ-w4$1j8Sb,SNr2ea6)9ѵqȍE4%Td3",4Xeh6)PW=YS]4&ԡaY_,z#0ֵ<e6)r~X4'3D:UQf#,qUe 6)õ0E| 04(I30ۀU f,%y/pq,^3e6)eU4)eu/[, AkVe+}6)nyǍT40 pbe,IE3t"e36)7LP41J,ްt+X},t'3Ge6)"Jqk}.I425_"j%<,8׫#et6)̦?43hP {"Р,dTd*eE6)eRٍv44h%,c(dep6)p[pXx,r{e6)MiȬc4B|>KiG,cBZMeY6)6$ΐg4C:=N|Gatz,B,!e26)rb^/q4D\xO4L<Ӄ,յe>ne6)=r6ʍC4E__9Kr,PIeJ6)I4F,)t,X3,f7Y;e6) T͜Z4G}Izہ =,GƲ ,^e/q6)8e:+$64H]6p Z8l,Rcw-we6)Mdn4I8SH1p-, ߮Ne 6)\U@>ōR4P(`x807P,KBofe3U6)̜̯E4QM 9.,jt_ke6)}b*iK4R(8xsSP,Vˋ:eV6)_~|\;4S&7MbjY1Ln,]2ce#6)Mgۍp4TҾkRRa,NNH/G)e6)w|>B4UCUfp3],oEnteE6)::v4Vud 22,g%y~%e6)i| WA4Wauk0 ,l 9[@e `6)G{ѐ74X- 6C,~ie6)|b.Ky4YanC7 9,_N9 e 6)ܐb1S4`Ú@X y), RDe"f6) g4a# eFQ',ju,nJTFKe6)W.x4iNꃌn'G ,e:֠.e96)!`0P4paﳭA)=,!aZe-w6)γ4q?^A /~,Gx?e6)xjla4rQ\.}I,eH6)"tv̐f4s4 '\`L:h@,*{@2e6)W'CZ\.r4t GX&k,,$Pi x|e46)ҬIdˍ@4S :,aV5ee>KɓIs.i[r\Xhree>٘{1/eH؛libcdio-0.83/test/data/copying-rr.iso0000644000175000017500000135000011114145233014461 00000000000000CD001LINUX Rock Ridge Copy test """h  Rocky Bernstein K3b - Version 0.11.20 K3B THE CD KREATOR VERSION 0.11.20 (C) 2003 SEBASTIAN TRUEG AND THE K3B TEAM 2005030511122500200503051112250000000000000000002005030511122500 CD001MKI Sat Mar 5 11:12:25 2005 mkisofs 2.01a17 -gui -graft-points -volid Rock Ridge Copy test -volset -appid K3B THE CD KREATOR VERSION 0.11.20 (C) 2003 SEBASTIAN TRUEG AND THE K3B TEAM -publisher Rocky Bernstein -preparer K3b - Version 0.11.20 -sysid LINUX -volset-size 1 -volset-seqno 1 -sort .../k3bsESIfc.tmp -rational-rock -hide-list .../k3bZbi0Bb.tmp -full-iso9660-filenames -iso-level 1 -path-list .../k3bM5p0Sb.tmp .../dummydir0/COPYTMPCOPYTMPh SPRRPX$mAAmTFh i h CEfh RRPX$mAAmTFh i h ri COPYRRNM copyPX$mAAmTFi i i i 3COPY2.;1RRNM Copy2PX$mmSLCOPYINGTFi i i |HFFHi 3 COPYING.;1RRNM COPYINGPX$$$TFi 3i i ""$$i FD0.;1RRNMfd0PX$$aa$PNTFi i i /pi TMPRRNMtmpPX$mAAmTFi i i $$i *ZERO.;1RRNM zeroPX$$!!$PNTFi *i *i *fi RRPX$mAAmTFi i i fi RRPX$mAAmTFi i i $$i 3 COPYING.;1RRNM COPYINGPX$mmSLCOPYINGTFi i i fi RRPX$mAAmTFi i i fi RRPX$mAAmTFi i i $$i 3 COPYING.;1RRNM COPYINGPX$mmSLcopyingCOPYINGTFi 3i i 3ER TRRIP_1991ATHE ROCK RIDGE INTERCHANGE PROTOCOL PROVIDES SUPPORT FOR POSIX FILE SYSTEM SEMANTICSPLEASE CONTACT DISC PUBLISHER FOR SPECIFICATION SOURCE. SEE PUBLISHER IDENTIFIER IN PRIMARY VOLUME DESCRIPTOR FOR CONTACT INFORMATION. GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. libcdio-0.83/test/data/Makefile.in0000644000175000017500000002750511652210030013726 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = test/data DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDDA_PLAYER_LIBS = @CDDA_PLAYER_LIBS@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CDPARANOIA_NAME = @CDPARANOIA_NAME@ CFLAGS = @CFLAGS@ CMP = @CMP@ COS_LIB = @COS_LIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_PKG_LIB_HACK = @DARWIN_PKG_LIB_HACK@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ DIFF_OPTS = @DIFF_OPTS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GIT2CL = @GIT2CL@ GREP = @GREP@ HAVE_BSDI_CDROM = @HAVE_BSDI_CDROM@ HAVE_DARWIN_CDROM = @HAVE_DARWIN_CDROM@ HAVE_FREEBSD_CDROM = @HAVE_FREEBSD_CDROM@ HAVE_JOLIET = @HAVE_JOLIET@ HAVE_LINUX_CDROM = @HAVE_LINUX_CDROM@ HAVE_OS2_CDROM = @HAVE_OS2_CDROM@ HAVE_ROCK = @HAVE_ROCK@ HAVE_SOLARIS_CDROM = @HAVE_SOLARIS_CDROM@ HAVE_WIN32_CDROM = @HAVE_WIN32_CDROM@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDIOPP_LIBS = @LIBCDIOPP_LIBS@ LIBCDIO_CDDA_LIBS = @LIBCDIO_CDDA_LIBS@ LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ LIBCDIO_DEPS = @LIBCDIO_DEPS@ LIBCDIO_LIBS = @LIBCDIO_LIBS@ LIBCDIO_PARANOIA_LIBS = @LIBCDIO_PARANOIA_LIBS@ LIBCDIO_SOURCE_PATH = @LIBCDIO_SOURCE_PATH@ LIBCDIO_VERSION_NUM = @LIBCDIO_VERSION_NUM@ LIBICONV = @LIBICONV@ LIBISO9660PP_LIBS = @LIBISO9660PP_LIBS@ LIBISO9660_CFLAGS = @LIBISO9660_CFLAGS@ LIBISO9660_LIBS = @LIBISO9660_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBUDF_LIBS = @LIBUDF_LIBS@ LINUX_CDROM_TIMEOUT = @LINUX_CDROM_TIMEOUT@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_NO_UNDEFINED = @LT_NO_UNDEFINED@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OLD_CDPARANOIA = @OLD_CDPARANOIA@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SBPCD_H = @SBPCD_H@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TYPESIZES = @TYPESIZES@ UCDROM_H = @UCDROM_H@ VCDINFO_CFLAGS = @VCDINFO_CFLAGS@ VCDINFO_LIBS = @VCDINFO_LIBS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ check_DATA = \ bad-cat1.cue \ bad-cat1.toc \ bad-cat2.cue \ bad-cat2.toc \ bad-cat3.cue \ bad-cat3.toc \ bad-file.toc \ bad-mode1.cue \ bad-mode1.toc \ bad-msf-1.cue \ bad-msf-1.toc \ bad-msf-2.cue \ bad-msf-2.toc \ bad-msf-3.cue \ bad-msf-3.toc \ cdda.bin \ cdda.cue \ cdda.toc \ copying-rr.iso \ copying.iso \ data1.toc \ data2.toc \ isofs-m1.bin \ isofs-m1.cue \ isofs-m1.toc \ joliet.iso \ p1.bin \ p1.cue \ p1.nrg \ t1.toc \ t2.toc \ t3.toc \ t4.toc \ t5.toc \ t6.toc \ t7.toc \ t8.toc \ t9.toc \ vcd2.toc \ videocd.nrg \ cdtext.toc \ data5.toc \ data6.toc \ data7.toc EXTRA_DIST = $(check_DATA) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/data/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu test/data/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_DATA) check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libcdio-0.83/test/videocd.right0000644000175000017500000000642511642541561013441 00000000000000__________________________________ Disc mode is listed as: CD DATA (Mode 2) CD-ROM Track List (1 - 5) #: MSF LSN Type Green? Copy? 1: 00:02:00 000000 XA true no 2: 00:13:01 000826 XA true no 3: 00:16:01 001051 XA true no 4: 00:19:01 001276 XA true no 5: 00:22:01 001501 XA true no 170: 00:25:01 001726 leadout (3 MB raw, 3 MB formatted) Media Catalog Number (MCN): not available Last CD Session LSN: not supported by drive/driver __________________________________ CD Analysis Report CD-ROM with CD-RTOS and ISO 9660 filesystem ISO 9660: 676 blocks, label `SVIDEOCD ' Application: SVIDEOCD.APP;1 Preparer : GNU VCDIMAGER CHECK MODE Publisher : PUBL_ID System : CD-RTOS CD-BRIDGE Volume : SVIDEOCD Volume Set : ISO9660 filesystem /: d---1xrxrxr 0 0 [fn 00] [LSN 18] 2048 Jul 14 1978 00:00:00 . d---1xrxrxr 0 0 [fn 00] [LSN 18] 2048 Jul 14 1978 00:00:00 .. d---1xrxrxr 0 0 [fn 00] [LSN 19] 2048 Jul 14 1978 00:00:00 ext d---1xrxrxr 0 0 [fn 00] [LSN 20] 2048 Jul 14 1978 00:00:00 mpeg2 d---1xrxrxr 0 0 [fn 00] [LSN 21] 2048 Jul 14 1978 00:00:00 segment d---1xrxrxr 0 0 [fn 00] [LSN 22] 2048 Jul 14 1978 00:00:00 svcd /EXT/: d---1xrxrxr 0 0 [fn 00] [LSN 19] 2048 Jul 14 1978 00:00:00 . d---1xrxrxr 0 0 [fn 00] [LSN 18] 2048 Jul 14 1978 00:00:00 .. ----1xrxrxr 0 0 [fn 00] [LSN 675] 78 Jul 14 1978 00:00:00 scandata.dat /MPEG2/: d---1xrxrxr 0 0 [fn 00] [LSN 20] 2048 Jul 14 1978 00:00:00 . d---1xrxrxr 0 0 [fn 00] [LSN 18] 2048 Jul 14 1978 00:00:00 .. ---2-xrxrxr 0 0 [fn 00] [LSN 826] 174300 ( 153600) Jul 14 1978 00:00:00 avseq01.mpg ---2-xrxrxr 0 0 [fn 00] [LSN 1051] 174300 ( 153600) Jul 14 1978 00:00:00 avseq02.mpg ---2-xrxrxr 0 0 [fn 00] [LSN 1276] 174300 ( 153600) Jul 14 1978 00:00:00 avseq03.mpg ---2-xrxrxr 0 0 [fn 00] [LSN 1501] 174300 ( 153600) Jul 14 1978 00:00:00 avseq04.mpg /SEGMENT/: d---1xrxrxr 0 0 [fn 00] [LSN 21] 2048 Jul 14 1978 00:00:00 . d---1xrxrxr 0 0 [fn 00] [LSN 18] 2048 Jul 14 1978 00:00:00 .. ---2-xrxrxr 0 0 [fn 00] [LSN 225] 65072 ( 57344) Jul 14 1978 00:00:00 item0001.mpg ---2-xrxrxr 0 0 [fn 00] [LSN 375] 65072 ( 57344) Jul 14 1978 00:00:00 item0002.mpg ---2-xrxrxr 0 0 [fn 00] [LSN 525] 65072 ( 57344) Jul 14 1978 00:00:00 item0003.mpg /SVCD/: d---1xrxrxr 0 0 [fn 00] [LSN 22] 2048 Jul 14 1978 00:00:00 . d---1xrxrxr 0 0 [fn 00] [LSN 18] 2048 Jul 14 1978 00:00:00 .. ----1xrxrxr 0 0 [fn 00] [LSN 151] 2048 Jul 14 1978 00:00:00 entries.svd ----1xrxrxr 0 0 [fn 00] [LSN 150] 2048 Jul 14 1978 00:00:00 info.svd ----1xrxrxr 0 0 [fn 00] [LSN 152] 65536 Jul 14 1978 00:00:00 lot.svd ----1xrxrxr 0 0 [fn 00] [LSN 184] 112 Jul 14 1978 00:00:00 psd.svd ----1xrxrxr 0 0 [fn 00] [LSN 186] 40 Jul 14 1978 00:00:00 search.dat ----1xrxrxr 0 0 [fn 00] [LSN 185] 2048 Jul 14 1978 00:00:00 tracks.svd XA sectors Super Video CD (SVCD) or Chaoji Video CD (CVD) session #2 starts at track 2, LSN: 826, ISO 9660 blocks: 676 ISO 9660: 676 blocks, label `SVIDEOCD ' libcdio-0.83/test/check_legal.regex0000644000175000017500000000032211642541552014230 00000000000000cd-info version [0-9] ^Copyright (c) 2003 Bernstein ^This is free software; see the source for copying conditions\.$ ^There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A$ ^PARTICULAR PURPOSE\.$ libcdio-0.83/test/vcd_demo_vcdinfo.right0000644000175000017500000001146211642541561015311 00000000000000__________________________________ CD-ROM Track List (1 - 3) #: MSF LSN Type Green? Copy? 1: 00:02:00 000000 XA true yes 2: 00:17:57 001182 XA true yes 3: 00:24:71 001721 XA true yes 170: 00:30:10 002110 leadout (4 MB raw, 4 MB formatted) Media Catalog Number (MCN): not available Last CD Session LSN: not supported by drive/driver __________________________________ CD Analysis Report CD-ROM with CD-RTOS and ISO 9660 filesystem ISO 9660: 1032 blocks, label `V0469 ' Application: Preparer : LKVCDIMAGER 5.0.7.10(WIN32) Publisher : LAURENS KOEHOORN System : CD-RTOS CD-BRIDGE Volume : V0469 Volume Set : ISO9660 filesystem /: d---1xrxrxr 0 0 [fn 00] [LSN 18] 2048 Jul 14 1978 00:00:00 . d---1xrxrxr 0 0 [fn 00] [LSN 18] 2048 Jul 14 1978 00:00:00 .. d---1xrxrxr 0 0 [fn 00] [LSN 19] 2048 Jul 14 1978 00:00:00 ext d---1xrxrxr 0 0 [fn 00] [LSN 20] 2048 Jul 14 1978 00:00:00 mpegav d---1xrxrxr 0 0 [fn 00] [LSN 21] 2048 Jul 14 1978 00:00:00 segment d---1xrxrxr 0 0 [fn 00] [LSN 22] 2048 Jul 14 1978 00:00:00 sources d---1xrxrxr 0 0 [fn 00] [LSN 25] 2048 Jul 14 1978 00:00:00 vcd /EXT/: d---1xrxrxr 0 0 [fn 00] [LSN 19] 2048 Jul 14 1978 00:00:00 . d---1xrxrxr 0 0 [fn 00] [LSN 18] 2048 Jul 14 1978 00:00:00 .. ----1xrxrxr 0 0 [fn 01] [LSN 375] 65536 Jul 14 1978 00:00:00 lot_x.vcd ----1xrxrxr 0 0 [fn 01] [LSN 407] 144 Jul 14 1978 00:00:00 psd_x.vcd /MPEGAV/: d---1xrxrxr 0 0 [fn 00] [LSN 20] 2048 Jul 14 1978 00:00:00 . d---1xrxrxr 0 0 [fn 00] [LSN 18] 2048 Jul 14 1978 00:00:00 .. ---2-xrxrxr 0 0 [fn 01] [LSN 1182] 904036 ( 796672) Jul 14 1978 00:00:00 avseq01.dat ---2-xrxrxr 0 0 [fn 02] [LSN 1721] 904036 ( 796672) Jul 14 1978 00:00:00 avseq02.dat /SEGMENT/: d---1xrxrxr 0 0 [fn 00] [LSN 21] 2048 Jul 14 1978 00:00:00 . d---1xrxrxr 0 0 [fn 00] [LSN 18] 2048 Jul 14 1978 00:00:00 .. ---2-xrxrxr 0 0 [fn 01] [LSN 225] 220780 ( 194560) Jul 14 1978 00:00:00 item0001.dat /Sources/: d---1xrxrxr 0 0 [fn 00] [LSN 22] 2048 Jul 14 1978 00:00:00 . d---1xrxrxr 0 0 [fn 00] [LSN 18] 2048 Jul 14 1978 00:00:00 .. d---1xrxrxr 0 0 [fn 00] [LSN 23] 2048 Jul 14 1978 00:00:00 html ----1xrxrxr 0 0 [fn 01] [LSN 434] 842 Dec 11 2002 10:33:47 index.htm ----1xrxrxr 0 0 [fn 01] [LSN 435] 1216557 Jan 07 2003 18:01:37 menu.ppm ----1xrxrxr 0 0 [fn 01] [LSN 1030] 2793 Jan 07 2003 18:08:20 source.xml /Sources/HTML/: d---1xrxrxr 0 0 [fn 00] [LSN 23] 2048 Jul 14 1978 00:00:00 . d---1xrxrxr 0 0 [fn 00] [LSN 22] 2048 Jul 14 1978 00:00:00 .. ----1xrxrxr 0 0 [fn 01] [LSN 425] 1067 Jan 07 2003 17:51:17 0.xml ----1xrxrxr 0 0 [fn 01] [LSN 426] 1067 Jan 07 2003 17:51:17 1.xml d---1xrxrxr 0 0 [fn 00] [LSN 24] 2048 Jul 14 1978 00:00:00 img ----1xrxrxr 0 0 [fn 01] [LSN 427] 1327 Jan 07 2003 17:51:16 movies.css ----1xrxrxr 0 0 [fn 01] [LSN 428] 12024 Jan 07 2003 17:51:16 toc.xsl /Sources/HTML/img/: d---1xrxrxr 0 0 [fn 00] [LSN 24] 2048 Jul 14 1978 00:00:00 . d---1xrxrxr 0 0 [fn 00] [LSN 23] 2048 Jul 14 1978 00:00:00 .. ----1xrxrxr 0 0 [fn 01] [LSN 408] 1999 Nov 13 2002 07:27:30 al.gif ----1xrxrxr 0 0 [fn 01] [LSN 409] 7626 Jan 07 2003 17:42:53 loeki_groep_01.gif ----1xrxrxr 0 0 [fn 01] [LSN 413] 9986 Jan 07 2003 17:42:53 loeki_groep_02.gif ----1xrxrxr 0 0 [fn 01] [LSN 418] 207 Nov 14 2002 19:33:19 a_left.gif ----1xrxrxr 0 0 [fn 01] [LSN 419] 207 Nov 14 2002 19:33:19 a_right.gif ----1xrxrxr 0 0 [fn 01] [LSN 420] 441 Nov 13 2002 10:54:14 animatie.gif ----1xrxrxr 0 0 [fn 01] [LSN 421] 250 Nov 14 2002 11:44:14 face_up2.gif ----1xrxrxr 0 0 [fn 01] [LSN 422] 259 Nov 13 2002 11:09:06 familie.gif ----1xrxrxr 0 0 [fn 01] [LSN 423] 1010 Nov 14 2002 11:52:28 goldstar2.gif ----1xrxrxr 0 0 [fn 01] [LSN 424] 1783 Nov 13 2002 07:15:09 vcd.gif /VCD/: d---1xrxrxr 0 0 [fn 00] [LSN 25] 2048 Jul 14 1978 00:00:00 . d---1xrxrxr 0 0 [fn 00] [LSN 18] 2048 Jul 14 1978 00:00:00 .. ----1xrxrxr 0 0 [fn 00] [LSN 151] 2048 Jul 14 1978 00:00:00 entries.vcd ----1xrxrxr 0 0 [fn 00] [LSN 150] 2048 Jul 14 1978 00:00:00 info.vcd ----1xrxrxr 0 0 [fn 00] [LSN 152] 65536 Jul 14 1978 00:00:00 lot.vcd ----1xrxrxr 0 0 [fn 00] [LSN 184] 72 Jul 14 1978 00:00:00 psd.vcd XA sectors Video CD Format : VCD 2.0 Album : `LOEKI' Volume count: 1 volume number: 1 session #2 starts at track 2, LSN: 1182, ISO 9660 blocks: 1032 ISO 9660: 1032 blocks, label `V0469 ' libcdio-0.83/test/check_common_fn0000644000175000017500000000710211652140274014006 00000000000000# $Id: check_common_fn.in,v 1.14 2008/10/17 01:51:43 rocky Exp $ # # Copyright (C) 2003, 2004, 2005, 2006, 2008 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Common routines and setup for regression testing. SKIP_TEST_EXITCODE=77 # Some output changes depending on TZ and locale. Set this so we get known # results TZ=CUT LC_TIME='en_US' export TZ LC_TIME check_result() { RC=$1 shift msg=$1 shift cmdline=$* if test $RC -ne 0 ; then if test $RC -ne $SKIP_TEST_EXITCODE ; then echo "$0: $msg failed in comparing output." if test -n "$cmdline" ; then echo "$0: failed command:" echo " $cmdline" fi exit $RC else echo "$0: $msg skipped." fi else echo "$0: $msg ok." fi } test_common() { cmdname="$1" cmd="../src/${cmdname}" opts="$2" outfile="$3" rightfile="$4" if [ ! -x "${cmd}" ]; then echo "$0: No ${cmd}" return 1 fi cmdline="${cmd}" if "${cmd}" --no-header ${opts} >"${outfile}" 2>&1 ; then if test "/usr/bin/diff" != no; then if /usr/bin/diff -w --unified "${outfile}" "${rightfile}" ; then rm -f "${outfile}" return 0 else return 3 fi else echo "$0: No diff(1) or cmp(1) found - cannot test ${cmdname}" rm -f "${outfile}" return $SKIP_TEST_EXITCODE fi else echo "$0 failed running: ${cmdname} ${opts}" return 2 fi } test_cdinfo() { test_common cd-info "$@" } test_iso_info() { test_common iso-info "$@" } test_cd_read() { test_common cd-read "$@" } test_iso_read() { # not test_common, as we use an output file not stdout. opts="$1" outfile="$2" rightfile="$3" ISO_READ="../src/iso-read" if [ ! -x ${ISO_READ} ]; then echo "$0: No ${ISO_READ}" return 1 fi if "${ISO_READ}" ${opts} -o "${outfile}" 2>&1 ; then if test "/usr/bin/diff" != no; then if /usr/bin/diff -w --unified "${outfile}" "${rightfile}" ; then rm -f "${outfile}" return 0 else return 3 fi else echo "$0: No diff(1) or cmp(1) found - cannot test ${ISO_READ}" rm -f "${outfile}" return 77 fi else echo "$0 failed running: ${ISO_READ} ${opts} -o ${outfile}" return 2 fi } test_legal_header() { cmdname="$1" cmd="../src/${cmdname}" opts="$2" outfile="$3" if test "/bin/grep" = no; then echo "$0: No grep(1) found - cannot test ${cmd}." echo "$0: Legal header test skipped." exit $SKIP_TEST_EXITCODE fi "${cmd}" ${opts} > ${outfile} 2>&1 while read line; do if ! grep -q "${line}" ${outfile}; then echo "$0: Legal header test failed due to missing expected line:" echo " ${line}" echo "$0: Failed command:" echo " ${cmd} ${opts}" rm -f "${outfile}" exit 4 fi done < ${srcdir}/check_legal.regex rm -f ${outfile} echo "$0: Legal header of ${cmd} ${opts} ok." } #;;; Local Variables: *** #;;; mode:shell-script *** #;;; eval: (sh-set-shell "bash") *** #;;; End: *** libcdio-0.83/test/testpregap.c0000644000175000017500000000614611652140274013304 00000000000000/* Copyright (C) 2003, 2004, 2005, 2011 Rocky Bernstein Copyright (C) 2008 Robert W. Fuller This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Regression test for cdio_get_pregap_lsn() */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #include #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #include #ifndef DATA_DIR #define DATA_DIR "./data" #endif static void log_handler (cdio_log_level_t level, const char message[]) { switch(level) { case CDIO_LOG_DEBUG: case CDIO_LOG_INFO: return; default: printf("cdio %d message: %s\n", level, message); } } typedef struct _pregap_list_t { const char *image; track_t track; lsn_t pregap; } pregap_list_t; static pregap_list_t pregapList[] = { { "/src/external-vcs/libcdio/test/data/t2.toc", 1, 4425 }, { "/src/external-vcs/libcdio/test/data/t2.toc", 2, CDIO_INVALID_LSN }, { "/src/external-vcs/libcdio/test/data/p1.cue", 1, 0 }, { "/src/external-vcs/libcdio/test/data/p1.cue", 2, 150 }, { "/src/external-vcs/libcdio/test/data/p1.cue", 3, CDIO_INVALID_LSN }, /* { "p1.nrg", 1, 0 }, Nero did not create the proper pre-gap - bleh */ { "/src/external-vcs/libcdio/test/data/p1.nrg", 2, 225 }, { "/src/external-vcs/libcdio/test/data/p1.nrg", 3, CDIO_INVALID_LSN } }; #define NELEMS(v) (sizeof(v) / sizeof(v[0])) /* gcc -Wall -I../include testpregap.c ../lib/driver/.libs/libcdio.a */ int main(int argc, const char *argv[]) { CdIo_t *cdObj; const char *image; lsn_t pregap; int i; int rc = 0; cdio_log_set_handler (log_handler); if (! (cdio_have_driver(DRIVER_NRG) && cdio_have_driver(DRIVER_BINCUE) && cdio_have_driver(DRIVER_CDRDAO)) ) { printf("You don't have enough drivers for this test\n"); exit(77); } for (i = 0; i < NELEMS(pregapList); ++i) { image = pregapList[i].image; cdObj = cdio_open(image, DRIVER_UNKNOWN); if (!cdObj) { printf("unrecognized image: %s\n", image); return 50; } pregap = cdio_get_track_pregap_lsn(cdObj, pregapList[i].track); if (pregap != pregapList[i].pregap) { printf("%s should have had pregap of lsn=%d instead of lsn=%d\n", image, pregapList[i].pregap, pregap); rc = i + 1; } else { printf("%s had expected pregap\n", image); } cdio_destroy(cdObj); } return rc; } libcdio-0.83/test/testgetdevices.c.in0000644000175000017500000001100711650131024014534 00000000000000/* Copyright (C) 2008, 2009, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Regression test for cdio_get_devices, cdio_get_devices_with_cap(), and cdio_free_device_list() */ #ifdef HAVE_CONFIG_H # include "config.h" # define __CDIO_CONFIG_H__ 1 #endif #include #include #include #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_SYS_UTSNAME_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #include #ifndef DATA_DIR #define DATA_DIR "@abs_top_srcdir@/test/data/" #endif static void log_handler (cdio_log_level_t level, const char message[]) { switch(level) { case CDIO_LOG_DEBUG: case CDIO_LOG_INFO: return; default: printf("cdio %d message: %s\n", level, message); } } static bool is_in(char **file_list, const char *file) { char **p; for (p = file_list; p != NULL && *p != NULL; p++) { if (strcmp(*p, file) == 0) { printf("File %s found as expected\n", file); return true; } } printf("Can't find file %s in list\n", file); return false; } int main(int argc, const char *argv[]) { char **nrg_images=NULL; char **bincue_images=NULL; char **imgs; unsigned int i; int ret=0; const char *cue_files[2] = {"cdda.cue", "isofs-m1.cue"}; const char *nrg_files[1] = {"videocd.nrg"}; cdio_log_set_handler (log_handler); if (cdio_have_driver(-1) != false) { fprintf(stderr, "Bogus driver number -1 should be regexted\n"); return 5; } #ifdef HAVE_SYS_UTSNAME_H { struct utsname utsname; if (0 == uname(&utsname)) { if (0 == strncmp("Linux", utsname.sysname, sizeof("Linux"))) { if (!cdio_have_driver(DRIVER_LINUX)) { fprintf(stderr, "You should have been able to get GNU/Linux driver\n"); return 6; } else { printf("Good! You have the GNU/Linux driver installed.\n"); } } else if (0 == strncmp("CYGWIN", utsname.sysname, sizeof("CYGWIN"))) { if (!cdio_have_driver(DRIVER_WIN32)) { fprintf(stderr, "You should have been able to get Win32 driver\n"); return 6; } else { printf("Good! You have the Win32 driver installed.\n"); } } else if (0 == strncmp("Darwin", utsname.sysname, sizeof("Darwin"))) { if (!cdio_have_driver(DRIVER_OSX)) { fprintf(stderr, "You should have been able to get OS/X driver\n"); return 6; } else { printf("Good! You have the OS/X driver installed.\n"); } } else if (0 == strncmp("NetBSD", utsname.sysname, sizeof("NetBSD"))) { if (!cdio_have_driver(DRIVER_NETBSD)) { fprintf(stderr, "You should have been able to get NetBSD driver\n"); return 6; } else { printf("Good! You have the OS/X driver installed.\n"); } } } } #endif if (! (cdio_have_driver(DRIVER_NRG) && cdio_have_driver(DRIVER_BINCUE)) ) { printf("You don't have enough drivers for this test\n"); exit(77); } bincue_images = cdio_get_devices(DRIVER_BINCUE); for (imgs=bincue_images; *imgs != NULL; imgs++) { printf("bincue image %s\n", *imgs); } if (ret != 0) return ret; if (0 == chdir(DATA_DIR)) { nrg_images = cdio_get_devices(DRIVER_NRG); for (imgs=nrg_images; *imgs != NULL; imgs++) { printf("NRG image %s\n", *imgs); } if (!is_in(nrg_images, nrg_files[0])) { cdio_free_device_list(nrg_images); return 10; } for (i=0; i<2; i++) { if (is_in(bincue_images, cue_files[i])) { printf("%s parses as a CDRWIN BIN/CUE csheet.\n", cue_files[i]); } else { printf("%s doesn't parse as a CDRWIN BIN/CUE csheet.\n", cue_files[i]); ret = i+1; } } } cdio_free_device_list(nrg_images); cdio_free_device_list(bincue_images); return 0; } libcdio-0.83/test/Makefile.in0000644000175000017500000012206111652210030013006 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 2003, 2004, 2006, 2008, 2009, 2010 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . #################################################### # Things for regression testing #################################################### # # # There's a problem with doing make distcheck for testdefault. # A reminder of why I hate automake. VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ EXTRA_PROGRAMS = testdefault$(EXEEXT) check_PROGRAMS = $(am__EXEEXT_2) XFAIL_TESTS = testassert$(EXEEXT) subdir = test DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/check_common_fn.in $(srcdir)/check_cue.sh.in \ $(srcdir)/check_iso.sh.in $(srcdir)/check_nrg.sh.in \ $(srcdir)/check_paranoia.sh.in $(srcdir)/testgetdevices.c.in \ $(srcdir)/testisocd2.c.in $(srcdir)/testpregap.c.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = testgetdevices.c testisocd2.c testpregap.c \ check_common_fn check_cue.sh check_iso.sh check_nrg.sh \ check_paranoia.sh CONFIG_CLEAN_VPATH_FILES = @BUILD_CD_PARANOIA_TRUE@am__EXEEXT_1 = testparanoia$(EXEEXT) am__EXEEXT_2 = check_sizeof$(EXEEXT) testassert$(EXEEXT) \ testgetdevices$(EXEEXT) testischar$(EXEEXT) testisocd$(EXEEXT) \ testisocd2$(EXEEXT) testiso9660$(EXEEXT) \ test_lib_driver_util$(EXEEXT) $(am__EXEEXT_1) \ testpregap$(EXEEXT) testunconfig$(EXEEXT) check_sizeof_SOURCES = check_sizeof.c check_sizeof_OBJECTS = check_sizeof.$(OBJEXT) am__DEPENDENCIES_1 = check_sizeof_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) test_lib_driver_util_SOURCES = test_lib_driver_util.c test_lib_driver_util_OBJECTS = \ test_lib_driver_util-test_lib_driver_util.$(OBJEXT) test_lib_driver_util_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) test_lib_driver_util_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(test_lib_driver_util_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ testassert_SOURCES = testassert.c testassert_OBJECTS = testassert.$(OBJEXT) testassert_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) testdefault_SOURCES = testdefault.c testdefault_OBJECTS = testdefault.$(OBJEXT) testdefault_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) testgetdevices_SOURCES = testgetdevices.c testgetdevices_OBJECTS = testgetdevices-testgetdevices.$(OBJEXT) testgetdevices_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) testgetdevices_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testgetdevices_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ testischar_SOURCES = testischar.c testischar_OBJECTS = testischar.$(OBJEXT) testischar_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) testiso9660_SOURCES = testiso9660.c testiso9660_OBJECTS = testiso9660.$(OBJEXT) testiso9660_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) testisocd_SOURCES = testisocd.c testisocd_OBJECTS = testisocd.$(OBJEXT) testisocd_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) testisocd2_SOURCES = testisocd2.c testisocd2_OBJECTS = testisocd2.$(OBJEXT) testisocd2_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) testparanoia_SOURCES = testparanoia.c testparanoia_OBJECTS = testparanoia.$(OBJEXT) @BUILD_CD_PARANOIA_TRUE@testparanoia_DEPENDENCIES = \ @BUILD_CD_PARANOIA_TRUE@ $(am__DEPENDENCIES_1) \ @BUILD_CD_PARANOIA_TRUE@ $(am__DEPENDENCIES_1) \ @BUILD_CD_PARANOIA_TRUE@ $(am__DEPENDENCIES_1) \ @BUILD_CD_PARANOIA_TRUE@ $(am__DEPENDENCIES_1) testpregap_SOURCES = testpregap.c testpregap_OBJECTS = testpregap-testpregap.$(OBJEXT) testpregap_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) testpregap_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testpregap_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ testunconfig_SOURCES = testunconfig.c testunconfig_OBJECTS = testunconfig.$(OBJEXT) testunconfig_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = check_sizeof.c test_lib_driver_util.c testassert.c \ testdefault.c testgetdevices.c testischar.c testiso9660.c \ testisocd.c testisocd2.c testparanoia.c testpregap.c \ testunconfig.c DIST_SOURCES = check_sizeof.c test_lib_driver_util.c testassert.c \ testdefault.c testgetdevices.c testischar.c testiso9660.c \ testisocd.c testisocd2.c testparanoia.c testpregap.c \ testunconfig.c RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDDA_PLAYER_LIBS = @CDDA_PLAYER_LIBS@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CDPARANOIA_NAME = @CDPARANOIA_NAME@ CFLAGS = @CFLAGS@ CMP = @CMP@ COS_LIB = @COS_LIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_PKG_LIB_HACK = @DARWIN_PKG_LIB_HACK@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ DIFF_OPTS = @DIFF_OPTS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GIT2CL = @GIT2CL@ GREP = @GREP@ HAVE_BSDI_CDROM = @HAVE_BSDI_CDROM@ HAVE_DARWIN_CDROM = @HAVE_DARWIN_CDROM@ HAVE_FREEBSD_CDROM = @HAVE_FREEBSD_CDROM@ HAVE_JOLIET = @HAVE_JOLIET@ HAVE_LINUX_CDROM = @HAVE_LINUX_CDROM@ HAVE_OS2_CDROM = @HAVE_OS2_CDROM@ HAVE_ROCK = @HAVE_ROCK@ HAVE_SOLARIS_CDROM = @HAVE_SOLARIS_CDROM@ HAVE_WIN32_CDROM = @HAVE_WIN32_CDROM@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDIOPP_LIBS = @LIBCDIOPP_LIBS@ LIBCDIO_CDDA_LIBS = @LIBCDIO_CDDA_LIBS@ LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ LIBCDIO_DEPS = @LIBCDIO_DEPS@ LIBCDIO_LIBS = @LIBCDIO_LIBS@ LIBCDIO_PARANOIA_LIBS = @LIBCDIO_PARANOIA_LIBS@ LIBCDIO_SOURCE_PATH = @LIBCDIO_SOURCE_PATH@ LIBCDIO_VERSION_NUM = @LIBCDIO_VERSION_NUM@ LIBICONV = @LIBICONV@ LIBISO9660PP_LIBS = @LIBISO9660PP_LIBS@ LIBISO9660_CFLAGS = @LIBISO9660_CFLAGS@ LIBISO9660_LIBS = @LIBISO9660_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBUDF_LIBS = @LIBUDF_LIBS@ LINUX_CDROM_TIMEOUT = @LINUX_CDROM_TIMEOUT@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_NO_UNDEFINED = @LT_NO_UNDEFINED@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OLD_CDPARANOIA = @OLD_CDPARANOIA@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SBPCD_H = @SBPCD_H@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TYPESIZES = @TYPESIZES@ UCDROM_H = @UCDROM_H@ VCDINFO_CFLAGS = @VCDINFO_CFLAGS@ VCDINFO_LIBS = @VCDINFO_LIBS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = data driver @BUILD_CD_PARANOIA_TRUE@testparanoia = testparanoia @BUILD_CD_PARANOIA_TRUE@testparanoia_LDADD = $(LIBCDIO_PARANOIA_LIBS) $(LIBCDIO_CDDA_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) hack = check_sizeof testassert testgetdevices testischar \ testisocd testisocd2 testiso9660 test_lib_driver_util \ $(testparanoia) testpregap testunconfig DATA_DIR = @abs_top_srcdir@/test/data INCLUDES = -I$(top_srcdir) $(LIBCDIO_CFLAGS) $(LIBISO9660_CFLAGS) check_sizeof_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) testassert_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) testdefault_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) testgetdevices_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\" testgetdevices_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) testischar_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) testiso9660_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) testisocd_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) testisocd2_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LTLIBICONV) testunconfig_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) test_lib_driver_util_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) test_lib_driver_util_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\" testpregap_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV) testpregap_CFLAGS = -DDATA_DIR=\"$(DATA_DIR)\" check_SCRIPTS = check_nrg.sh check_cue.sh check_cd_read.sh \ check_iso.sh check_fuzzyiso.sh check_paranoia.sh check_opts.sh check_DATA = vcd_demo.right vcd_demo_vcdinfo.right \ videocd.right \ cdda.right \ isofs-m1.right isofs-m1-no-rr.right \ cd-paranoia-log.right \ check_opts0.right check_opts1.right check_opts2.right \ check_opts3.right check_opts4.right check_opts5.right \ check_opts6.right check_opts7.right \ isofs-m1-read.right cdda-read.right \ copying.right copying-rr.right \ joliet.right joliet-nojoliet.right \ udf102.iso copying.gpl copying-rr.gpl EXTRA_DIST = $(check_SCRIPTS) $(check_DATA) \ check_common_fn check_cue.sh.in check_nrg.sh.in \ testpregap.c.in check_legal.regex \ testgetdevices.c.in check_iso.sh.in TESTS = $(check_PROGRAMS) $(check_SCRIPTS) MOSTLYCLEANFILES = core core.* *.dump cdda-orig.wav cdda-try.wav *.raw all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu test/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): testgetdevices.c: $(top_builddir)/config.status $(srcdir)/testgetdevices.c.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ testisocd2.c: $(top_builddir)/config.status $(srcdir)/testisocd2.c.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ testpregap.c: $(top_builddir)/config.status $(srcdir)/testpregap.c.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ check_common_fn: $(top_builddir)/config.status $(srcdir)/check_common_fn.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ check_cue.sh: $(top_builddir)/config.status $(srcdir)/check_cue.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ check_iso.sh: $(top_builddir)/config.status $(srcdir)/check_iso.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ check_nrg.sh: $(top_builddir)/config.status $(srcdir)/check_nrg.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ check_paranoia.sh: $(top_builddir)/config.status $(srcdir)/check_paranoia.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list check_sizeof$(EXEEXT): $(check_sizeof_OBJECTS) $(check_sizeof_DEPENDENCIES) @rm -f check_sizeof$(EXEEXT) $(LINK) $(check_sizeof_OBJECTS) $(check_sizeof_LDADD) $(LIBS) test_lib_driver_util$(EXEEXT): $(test_lib_driver_util_OBJECTS) $(test_lib_driver_util_DEPENDENCIES) @rm -f test_lib_driver_util$(EXEEXT) $(test_lib_driver_util_LINK) $(test_lib_driver_util_OBJECTS) $(test_lib_driver_util_LDADD) $(LIBS) testassert$(EXEEXT): $(testassert_OBJECTS) $(testassert_DEPENDENCIES) @rm -f testassert$(EXEEXT) $(LINK) $(testassert_OBJECTS) $(testassert_LDADD) $(LIBS) testdefault$(EXEEXT): $(testdefault_OBJECTS) $(testdefault_DEPENDENCIES) @rm -f testdefault$(EXEEXT) $(LINK) $(testdefault_OBJECTS) $(testdefault_LDADD) $(LIBS) testgetdevices$(EXEEXT): $(testgetdevices_OBJECTS) $(testgetdevices_DEPENDENCIES) @rm -f testgetdevices$(EXEEXT) $(testgetdevices_LINK) $(testgetdevices_OBJECTS) $(testgetdevices_LDADD) $(LIBS) testischar$(EXEEXT): $(testischar_OBJECTS) $(testischar_DEPENDENCIES) @rm -f testischar$(EXEEXT) $(LINK) $(testischar_OBJECTS) $(testischar_LDADD) $(LIBS) testiso9660$(EXEEXT): $(testiso9660_OBJECTS) $(testiso9660_DEPENDENCIES) @rm -f testiso9660$(EXEEXT) $(LINK) $(testiso9660_OBJECTS) $(testiso9660_LDADD) $(LIBS) testisocd$(EXEEXT): $(testisocd_OBJECTS) $(testisocd_DEPENDENCIES) @rm -f testisocd$(EXEEXT) $(LINK) $(testisocd_OBJECTS) $(testisocd_LDADD) $(LIBS) testisocd2$(EXEEXT): $(testisocd2_OBJECTS) $(testisocd2_DEPENDENCIES) @rm -f testisocd2$(EXEEXT) $(LINK) $(testisocd2_OBJECTS) $(testisocd2_LDADD) $(LIBS) testparanoia$(EXEEXT): $(testparanoia_OBJECTS) $(testparanoia_DEPENDENCIES) @rm -f testparanoia$(EXEEXT) $(LINK) $(testparanoia_OBJECTS) $(testparanoia_LDADD) $(LIBS) testpregap$(EXEEXT): $(testpregap_OBJECTS) $(testpregap_DEPENDENCIES) @rm -f testpregap$(EXEEXT) $(testpregap_LINK) $(testpregap_OBJECTS) $(testpregap_LDADD) $(LIBS) testunconfig$(EXEEXT): $(testunconfig_OBJECTS) $(testunconfig_DEPENDENCIES) @rm -f testunconfig$(EXEEXT) $(LINK) $(testunconfig_OBJECTS) $(testunconfig_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_sizeof.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_lib_driver_util-test_lib_driver_util.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testassert.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testdefault.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testgetdevices-testgetdevices.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testischar.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testiso9660.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testisocd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testisocd2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testparanoia.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testpregap-testpregap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testunconfig.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< test_lib_driver_util-test_lib_driver_util.o: test_lib_driver_util.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_lib_driver_util_CFLAGS) $(CFLAGS) -MT test_lib_driver_util-test_lib_driver_util.o -MD -MP -MF $(DEPDIR)/test_lib_driver_util-test_lib_driver_util.Tpo -c -o test_lib_driver_util-test_lib_driver_util.o `test -f 'test_lib_driver_util.c' || echo '$(srcdir)/'`test_lib_driver_util.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/test_lib_driver_util-test_lib_driver_util.Tpo $(DEPDIR)/test_lib_driver_util-test_lib_driver_util.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test_lib_driver_util.c' object='test_lib_driver_util-test_lib_driver_util.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_lib_driver_util_CFLAGS) $(CFLAGS) -c -o test_lib_driver_util-test_lib_driver_util.o `test -f 'test_lib_driver_util.c' || echo '$(srcdir)/'`test_lib_driver_util.c test_lib_driver_util-test_lib_driver_util.obj: test_lib_driver_util.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_lib_driver_util_CFLAGS) $(CFLAGS) -MT test_lib_driver_util-test_lib_driver_util.obj -MD -MP -MF $(DEPDIR)/test_lib_driver_util-test_lib_driver_util.Tpo -c -o test_lib_driver_util-test_lib_driver_util.obj `if test -f 'test_lib_driver_util.c'; then $(CYGPATH_W) 'test_lib_driver_util.c'; else $(CYGPATH_W) '$(srcdir)/test_lib_driver_util.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/test_lib_driver_util-test_lib_driver_util.Tpo $(DEPDIR)/test_lib_driver_util-test_lib_driver_util.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test_lib_driver_util.c' object='test_lib_driver_util-test_lib_driver_util.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_lib_driver_util_CFLAGS) $(CFLAGS) -c -o test_lib_driver_util-test_lib_driver_util.obj `if test -f 'test_lib_driver_util.c'; then $(CYGPATH_W) 'test_lib_driver_util.c'; else $(CYGPATH_W) '$(srcdir)/test_lib_driver_util.c'; fi` testgetdevices-testgetdevices.o: testgetdevices.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testgetdevices_CFLAGS) $(CFLAGS) -MT testgetdevices-testgetdevices.o -MD -MP -MF $(DEPDIR)/testgetdevices-testgetdevices.Tpo -c -o testgetdevices-testgetdevices.o `test -f 'testgetdevices.c' || echo '$(srcdir)/'`testgetdevices.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testgetdevices-testgetdevices.Tpo $(DEPDIR)/testgetdevices-testgetdevices.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testgetdevices.c' object='testgetdevices-testgetdevices.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testgetdevices_CFLAGS) $(CFLAGS) -c -o testgetdevices-testgetdevices.o `test -f 'testgetdevices.c' || echo '$(srcdir)/'`testgetdevices.c testgetdevices-testgetdevices.obj: testgetdevices.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testgetdevices_CFLAGS) $(CFLAGS) -MT testgetdevices-testgetdevices.obj -MD -MP -MF $(DEPDIR)/testgetdevices-testgetdevices.Tpo -c -o testgetdevices-testgetdevices.obj `if test -f 'testgetdevices.c'; then $(CYGPATH_W) 'testgetdevices.c'; else $(CYGPATH_W) '$(srcdir)/testgetdevices.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testgetdevices-testgetdevices.Tpo $(DEPDIR)/testgetdevices-testgetdevices.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testgetdevices.c' object='testgetdevices-testgetdevices.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testgetdevices_CFLAGS) $(CFLAGS) -c -o testgetdevices-testgetdevices.obj `if test -f 'testgetdevices.c'; then $(CYGPATH_W) 'testgetdevices.c'; else $(CYGPATH_W) '$(srcdir)/testgetdevices.c'; fi` testpregap-testpregap.o: testpregap.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testpregap_CFLAGS) $(CFLAGS) -MT testpregap-testpregap.o -MD -MP -MF $(DEPDIR)/testpregap-testpregap.Tpo -c -o testpregap-testpregap.o `test -f 'testpregap.c' || echo '$(srcdir)/'`testpregap.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testpregap-testpregap.Tpo $(DEPDIR)/testpregap-testpregap.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testpregap.c' object='testpregap-testpregap.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testpregap_CFLAGS) $(CFLAGS) -c -o testpregap-testpregap.o `test -f 'testpregap.c' || echo '$(srcdir)/'`testpregap.c testpregap-testpregap.obj: testpregap.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testpregap_CFLAGS) $(CFLAGS) -MT testpregap-testpregap.obj -MD -MP -MF $(DEPDIR)/testpregap-testpregap.Tpo -c -o testpregap-testpregap.obj `if test -f 'testpregap.c'; then $(CYGPATH_W) 'testpregap.c'; else $(CYGPATH_W) '$(srcdir)/testpregap.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testpregap-testpregap.Tpo $(DEPDIR)/testpregap-testpregap.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testpregap.c' object='testpregap-testpregap.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testpregap_CFLAGS) $(CFLAGS) -c -o testpregap-testpregap.obj `if test -f 'testpregap.c'; then $(CYGPATH_W) 'testpregap.c'; else $(CYGPATH_W) '$(srcdir)/testpregap.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_SCRIPTS) \ $(check_DATA) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \ ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool ctags \ ctags-recursive distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am test: check-am # This is a really bad hack to make sure check_nrg and check_cue.sh # are executable. Automake will remake check_nrg.sh and check_cue.sh # but not run the configure default commands for them to make sure # they are executable. You know it would be nice one could just set # permissions and mode when it makes the files. I'm sure there's some # cleaner a way to do this, but frankly I've wasted far too much of my # life the crappy automess system that I've really lost interest in # learning any more of this awful system than I need to. check-am: make-executable make-executable: check_nrg.sh check_cue.sh check_paranoia.sh chmod +x *.sh if test ! -f cdda.bin ; then \ test -L cdda.bin && $(RM) cdda.bin ; \ $(LN_S) $(abs_top_srcdir)/test/data/cdda.bin cdda.bin ; \ fi if test ! -f isofs-m1.bin ; then \ test -L cdda.bin && $(RM) isofs-m1.bin ; \ $(LN_S) $(abs_top_srcdir)/test/data/isofs-m1.bin isofs-m1.bin ; \ fi # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libcdio-0.83/libiso9660++.pc.in0000644000175000017500000000046711126441340012662 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ libiconv=@LTLIBICONV@ Name: libiso9660++ Description: C++ OO ISO-9660 library of libcdio Version: @PACKAGE_VERSION@ Requires: libcdio Libs: -L${libdir} -liso9660++ -lcdio++ -liso9660 @LTLIBICONV@ -lcdio Cflags: -I${includedir} libcdio-0.83/include/0000755000175000017500000000000011652210413011470 500000000000000libcdio-0.83/include/cdio/0000755000175000017500000000000011652210413012406 500000000000000libcdio-0.83/include/cdio/disc.h0000644000175000017500000000707111333271206013431 00000000000000/* -*- c -*- Copyright (C) 2004, 2005, 2006, 2008, 2010 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** \file disc.h \brief The top-level header for disc-related libcdio calls. */ #ifndef __CDIO_DISC_H__ #define __CDIO_DISC_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** disc modes. The first combined from MMC-5 6.33.3.13 (Send CUESHEET), "DVD Book" from MMC-5 Table 400, page 419. and GNU/Linux /usr/include/linux/cdrom.h and we've added DVD. */ typedef enum { CDIO_DISC_MODE_CD_DA, /**< CD-DA */ CDIO_DISC_MODE_CD_DATA, /**< CD-ROM form 1 */ CDIO_DISC_MODE_CD_XA, /**< CD-ROM XA form2 */ CDIO_DISC_MODE_CD_MIXED, /**< Some combo of above. */ CDIO_DISC_MODE_DVD_ROM, /**< DVD ROM (e.g. movies) */ CDIO_DISC_MODE_DVD_RAM, /**< DVD-RAM */ CDIO_DISC_MODE_DVD_R, /**< DVD-R */ CDIO_DISC_MODE_DVD_RW, /**< DVD-RW */ CDIO_DISC_MODE_HD_DVD_ROM, /**< HD DVD-ROM */ CDIO_DISC_MODE_HD_DVD_RAM, /**< HD DVD-RAM */ CDIO_DISC_MODE_HD_DVD_R, /**< HD DVD-R */ CDIO_DISC_MODE_DVD_PR, /**< DVD+R */ CDIO_DISC_MODE_DVD_PRW, /**< DVD+RW */ CDIO_DISC_MODE_DVD_PRW_DL, /**< DVD+RW DL */ CDIO_DISC_MODE_DVD_PR_DL, /**< DVD+R DL */ CDIO_DISC_MODE_DVD_OTHER, /**< Unknown/unclassified DVD type */ CDIO_DISC_MODE_NO_INFO, CDIO_DISC_MODE_ERROR, CDIO_DISC_MODE_CD_I /**< CD-i. */ } discmode_t; extern const char *discmode2str[]; /** Get disc mode - the kind of CD (CD-DA, CD-ROM mode 1, CD-MIXED, etc. that we've got. The notion of "CD" is extended a little to include DVD's. */ discmode_t cdio_get_discmode (CdIo_t *p_cdio); /** Get the lsn of the end of the CD @return the lsn. On error 0 or CDIO_INVALD_LSN. */ lsn_t cdio_get_disc_last_lsn(const CdIo_t *p_cdio); /** Return the Joliet level recognized for p_cdio. */ uint8_t cdio_get_joliet_level(const CdIo_t *p_cdio); /** Get the media catalog number (MCN) from the CD. @return the media catalog number or NULL if there is none or we don't have the ability to get it. Note: string is malloc'd so caller has to free() the returned string when done with it. */ char * cdio_get_mcn (const CdIo_t *p_cdio); /** Get the number of tracks on the CD. @return the number of tracks, or CDIO_INVALID_TRACK if there is an error. */ track_t cdio_get_num_tracks (const CdIo_t *p_cdio); /** Return true if discmode is some sort of CD. */ bool cdio_is_discmode_cdrom (discmode_t discmode); /** Return true if discmode is some sort of DVD. */ bool cdio_is_discmode_dvd (discmode_t discmode); /** cdio_stat_size is deprecated. @see cdio_get_disc_last_lsn */ #define cdio_stat_size cdio_get_disc_last_lsn #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __CDIO_DISC_H__ */ libcdio-0.83/include/cdio/util.h0000644000175000017500000000542211324362721013465 00000000000000/* Copyright (C) 2004, 2005, 2006, 2008, 2010 Rocky Bernstein Copyright (C) 2000 Herbert Valerio Riedel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef __CDIO_UTIL_H__ #define __CDIO_UTIL_H__ /*! \file util.h \brief Miscellaneous utility functions. Warning: this will probably get removed/replaced by using glib.h */ #include #include #undef MAX #define MAX(a, b) (((a) > (b)) ? (a) : (b)) #undef MIN #define MIN(a, b) (((a) < (b)) ? (a) : (b)) #undef IN #define IN(x, low, high) ((x) >= (low) && (x) <= (high)) #undef CLAMP #define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x))) static inline uint32_t _cdio_len2blocks (uint32_t i_len, uint16_t i_blocksize) { uint32_t i_blocks; i_blocks = i_len / (uint32_t) i_blocksize; if (i_len % i_blocksize) i_blocks++; return i_blocks; } /* round up to next block boundary */ static inline unsigned _cdio_ceil2block (unsigned offset, uint16_t i_blocksize) { return _cdio_len2blocks (offset, i_blocksize) * i_blocksize; } static inline unsigned int _cdio_ofs_add (unsigned offset, unsigned length, uint16_t i_blocksize) { if (i_blocksize - (offset % i_blocksize) < length) offset = _cdio_ceil2block (offset, i_blocksize); offset += length; return offset; } static inline const char * _cdio_bool_str (bool b) { return b ? "yes" : "no"; } #ifdef __cplusplus extern "C" { #endif void * _cdio_memdup (const void *mem, size_t count); char * _cdio_strdup_upper (const char str[]); void _cdio_strfreev(char **strv); size_t _cdio_strlenv(char **str_array); char ** _cdio_strsplit(const char str[], char delim); uint8_t cdio_to_bcd8(uint8_t n); uint8_t cdio_from_bcd8(uint8_t p); /*! cdio_realpath() same as POSIX.1-2001 realpath if that's around. If not we do poor-man's simulation of that behavior. */ char *cdio_realpath (const char *psz_src, char *psz_dst); #ifdef WANT_FOLLOW_SYMLINK_COMPATIBILITY # define cdio_follow_symlink cdio_realpath #endif #ifdef __cplusplus } #endif #endif /* __CDIO_UTIL_H__ */ /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/include/cdio/cdtext.h0000644000175000017500000001006111114145233013770 00000000000000/* $Id: cdtext.h,v 1.14 2008/03/25 15:59:08 karl Exp $ Copyright (C) 2004, 2005, 2008 Rocky Bernstein adapted from cuetools Copyright (C) 2003 Svend Sanjay Sorensen This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /*! * \file cdtext.h * * \brief The top-level header for CD-Text information. Applications * include this for CD-Text access. */ #ifndef __CDIO_CDTEXT_H__ #define __CDIO_CDTEXT_H__ #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define MAX_CDTEXT_FIELDS 13 #define MIN_CDTEXT_FIELD 0 /*! \brief structure for holding CD-Text information @see cdtext_init, cdtext_destroy, cdtext_get, and cdtext_set. */ struct cdtext { char *field[MAX_CDTEXT_FIELDS]; }; /*! \brief A list of all of the CD-Text fields. Because the interval has no gaps, we can use ++ to iterate over fields. */ typedef enum { CDTEXT_ARRANGER = 0, /**< name(s) of the arranger(s) */ CDTEXT_COMPOSER = 1, /**< name(s) of the composer(s) */ CDTEXT_DISCID = 2, /**< disc identification information */ CDTEXT_GENRE = 3, /**< genre identification and genre information */ CDTEXT_MESSAGE = 4, /**< ISRC code of each track */ CDTEXT_ISRC = 5, /**< message(s) from the content provider or artist */ CDTEXT_PERFORMER = 6, /**< name(s) of the performer(s) */ CDTEXT_SIZE_INFO = 7, /**< size information of the block */ CDTEXT_SONGWRITER = 8, /**< name(s) of the songwriter(s) */ CDTEXT_TITLE = 9, /**< title of album name or track titles */ CDTEXT_TOC_INFO = 10, /**< table of contents information */ CDTEXT_TOC_INFO2 = 11, /**< second table of contents information */ CDTEXT_UPC_EAN = 12, CDTEXT_INVALID = MAX_CDTEXT_FIELDS } cdtext_field_t; /*! Return string representation of the enum values above */ const char *cdtext_field2str (cdtext_field_t i); /*! Initialize a new cdtext structure. When the structure is no longer needed, release the resources using cdtext_delete. */ void cdtext_init (cdtext_t *cdtext); /*! Free memory assocated with cdtext*/ void cdtext_destroy (cdtext_t *cdtext); /*! returns an allocated string associated with the given field. NULL is returned if key is CDTEXT_INVALID or the field is not set. The user needs to free the string when done with it. @see cdio_get_const to retrieve a constant string that doesn't have to be freed. */ char *cdtext_get (cdtext_field_t key, const cdtext_t *cdtext); /*! returns a const string associated with the given field. NULL is returned if key is CDTEXT_INVALID or the field is not set. Don't use the string when the cdtext object (i.e. the CdIo_t object you got it from) is no longer valid. @see cdio_get to retrieve an allocated string that persists past the cdtext object. */ const char *cdtext_get_const (cdtext_field_t key, const cdtext_t *cdtext); /*! returns enum of keyword if key is a CD-Text keyword, returns MAX_CDTEXT_FIELDS non-zero otherwise. */ cdtext_field_t cdtext_is_keyword (const char *key); /*! sets cdtext's keyword entry to field */ void cdtext_set (cdtext_field_t key, const char *value, cdtext_t *cdtext); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __CDIO_CDTEXT_H__ */ /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/include/cdio/device.h0000644000175000017500000011203711352222322013741 00000000000000/* -*- c -*- Copyright (C) 2005, 2006, 2008, 2009, 2010 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** * \file device.h * * \brief C header for driver- or device-related libcdio * calls. ("device" includes CD-image reading devices). */ #ifndef __CDIO_DEVICE_H__ #define __CDIO_DEVICE_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include #include /** The type of an drive capability bit mask. See below for values*/ typedef uint32_t cdio_drive_read_cap_t; typedef uint32_t cdio_drive_write_cap_t; typedef uint32_t cdio_drive_misc_cap_t; /** \brief Drive capability bits returned by cdio_get_drive_cap() NOTE: Setting a bit here means the presence of a capability. */ /** Miscellaneous capabilities. */ typedef enum { CDIO_DRIVE_CAP_ERROR = 0x40000, /**< Error */ CDIO_DRIVE_CAP_UNKNOWN = 0x80000, /**< Dunno. It can be on if we have only partial information or are not completely certain */ CDIO_DRIVE_CAP_MISC_CLOSE_TRAY = 0x00001, /**< caddy systems can't close... */ CDIO_DRIVE_CAP_MISC_EJECT = 0x00002, /**< but can eject. */ CDIO_DRIVE_CAP_MISC_LOCK = 0x00004, /**< disable manual eject */ CDIO_DRIVE_CAP_MISC_SELECT_SPEED = 0x00008, /**< programmable speed */ CDIO_DRIVE_CAP_MISC_SELECT_DISC = 0x00010, /**< select disc from juke-box */ CDIO_DRIVE_CAP_MISC_MULTI_SESSION= 0x00020, /**< read sessions>1 */ CDIO_DRIVE_CAP_MISC_MEDIA_CHANGED= 0x00080, /**< media changed */ CDIO_DRIVE_CAP_MISC_RESET = 0x00100, /**< hard reset device */ CDIO_DRIVE_CAP_MISC_FILE = 0x20000 /**< drive is really a file, i.e a CD file image */ } cdio_drive_cap_misc_t; /** Reading masks.. */ typedef enum { CDIO_DRIVE_CAP_READ_AUDIO = 0x00001, /**< drive can play CD audio */ CDIO_DRIVE_CAP_READ_CD_DA = 0x00002, /**< drive can read CD-DA */ CDIO_DRIVE_CAP_READ_CD_G = 0x00004, /**< drive can read CD+G */ CDIO_DRIVE_CAP_READ_CD_R = 0x00008, /**< drive can read CD-R */ CDIO_DRIVE_CAP_READ_CD_RW = 0x00010, /**< drive can read CD-RW */ CDIO_DRIVE_CAP_READ_DVD_R = 0x00020, /**< drive can read DVD-R */ CDIO_DRIVE_CAP_READ_DVD_PR = 0x00040, /**< drive can read DVD+R */ CDIO_DRIVE_CAP_READ_DVD_RAM = 0x00080, /**< drive can read DVD-RAM */ CDIO_DRIVE_CAP_READ_DVD_ROM = 0x00100, /**< drive can read DVD-ROM */ CDIO_DRIVE_CAP_READ_DVD_RW = 0x00200, /**< drive can read DVD-RW */ CDIO_DRIVE_CAP_READ_DVD_RPW = 0x00400, /**< drive can read DVD+RW */ CDIO_DRIVE_CAP_READ_C2_ERRS = 0x00800, /**< has C2 error correction */ CDIO_DRIVE_CAP_READ_MODE2_FORM1 = 0x01000, /**< can read mode 2 form 1 */ CDIO_DRIVE_CAP_READ_MODE2_FORM2 = 0x02000, /**< can read mode 2 form 2 */ CDIO_DRIVE_CAP_READ_MCN = 0x04000, /**< can read MCN */ CDIO_DRIVE_CAP_READ_ISRC = 0x08000 /**< can read ISRC */ } cdio_drive_cap_read_t; /** Writing masks.. */ typedef enum { CDIO_DRIVE_CAP_WRITE_CD_R = 0x00001, /**< drive can write CD-R */ CDIO_DRIVE_CAP_WRITE_CD_RW = 0x00002, /**< drive can write CD-RW */ CDIO_DRIVE_CAP_WRITE_DVD_R = 0x00004, /**< drive can write DVD-R */ CDIO_DRIVE_CAP_WRITE_DVD_PR = 0x00008, /**< drive can write DVD+R */ CDIO_DRIVE_CAP_WRITE_DVD_RAM = 0x00010, /**< drive can write DVD-RAM */ CDIO_DRIVE_CAP_WRITE_DVD_RW = 0x00020, /**< drive can write DVD-RW */ CDIO_DRIVE_CAP_WRITE_DVD_RPW = 0x00040, /**< drive can write DVD+RW */ CDIO_DRIVE_CAP_WRITE_MT_RAINIER = 0x00080, /**< Mount Rainier */ CDIO_DRIVE_CAP_WRITE_BURN_PROOF = 0x00100, /**< burn proof */ CDIO_DRIVE_CAP_WRITE_CD = (CDIO_DRIVE_CAP_WRITE_CD_R | CDIO_DRIVE_CAP_WRITE_CD_RW), /**< Has some sort of CD writer ability */ CDIO_DRIVE_CAP_WRITE_DVD = (CDIO_DRIVE_CAP_WRITE_DVD_R | CDIO_DRIVE_CAP_WRITE_DVD_PR | CDIO_DRIVE_CAP_WRITE_DVD_RAM | CDIO_DRIVE_CAP_WRITE_DVD_RW | CDIO_DRIVE_CAP_WRITE_DVD_RPW ), /**< Has some sort of DVD writer ability */ CDIO_DRIVE_CAP_WRITE = (CDIO_DRIVE_CAP_WRITE_CD | CDIO_DRIVE_CAP_WRITE_DVD) /**< Has some sort of DVD or CD writing ability */ } cdio_drive_cap_write_t; /** Size of fields returned by an INQUIRY command */ typedef enum { CDIO_MMC_HW_VENDOR_LEN = 8, /**< length of vendor field */ CDIO_MMC_HW_MODEL_LEN = 16, /**< length of model field */ CDIO_MMC_HW_REVISION_LEN = 4 /**< length of revision field */ } cdio_mmc_hw_len_t; /** \brief Structure to return CD vendor, model, and revision-level strings obtained via the INQUIRY command */ typedef struct cdio_hwinfo { char psz_vendor [CDIO_MMC_HW_VENDOR_LEN+1]; char psz_model [CDIO_MMC_HW_MODEL_LEN+1]; char psz_revision[CDIO_MMC_HW_REVISION_LEN+1]; } cdio_hwinfo_t; /** Flags specifying the category of device to open or is opened. */ typedef enum { CDIO_SRC_IS_DISK_IMAGE_MASK = 0x0001, /**< Read source is a CD image. */ CDIO_SRC_IS_DEVICE_MASK = 0x0002, /**< Read source is a CD device. */ CDIO_SRC_IS_SCSI_MASK = 0x0004, /**< Read source SCSI device. */ CDIO_SRC_IS_NATIVE_MASK = 0x0008 } cdio_src_category_mask_t; /** * The driver_id_t enumerations may be used to tag a specific driver * that is opened or is desired to be opened. Note that this is * different than what is available on a given host. * * Order should not be changed lightly because it breaks the ABI. * One is not supposed to iterate over the values, but iterate over the * cdio_drivers and cdio_device_drivers arrays. * * NOTE: IF YOU MODIFY ENUM MAKE SURE INITIALIZATION IN CDIO.C AGREES. * */ typedef enum { DRIVER_UNKNOWN, /**< Used as input when we don't care what kind of driver to use. */ DRIVER_AIX, /**< AIX driver */ DRIVER_BSDI, /**< BSDI driver */ DRIVER_FREEBSD, /**< FreeBSD driver - includes CAM and ioctl access */ DRIVER_NETBSD, /**< NetBSD Driver. */ DRIVER_LINUX, /**< GNU/Linux Driver */ DRIVER_SOLARIS, /**< Sun Solaris Driver */ DRIVER_OS2, /**< IBM OS/2 Driver */ DRIVER_OSX, /**< Apple OSX Driver */ DRIVER_WIN32, /**< Microsoft Windows Driver. Includes ASPI and ioctl access. */ DRIVER_CDRDAO, /**< cdrdao format CD image. This is listed before BIN/CUE, to make the code prefer cdrdao over BIN/CUE when both exist. */ DRIVER_BINCUE, /**< CDRWIN BIN/CUE format CD image. This is listed before NRG, to make the code prefer BIN/CUE over NRG when both exist. */ DRIVER_NRG, /**< Nero NRG format CD image. */ DRIVER_DEVICE /**< Is really a set of the above; should come last */ } driver_id_t; /** A null-terminated (that is DRIVER_UNKNOWN-terminated) ordered (in order of preference) array of drivers. */ extern const driver_id_t cdio_drivers[]; /** A null-terminated (that is DRIVER_UNKNOWN-terminated) ordered (in order of preference) array of device drivers. */ extern const driver_id_t cdio_device_drivers[]; /** There will generally be only one hardware for a given build/platform from the list above. You can use the variable below to determine which you've got. If the build doesn't make an hardware driver, then the value will be DRIVER_UNKNOWN. */ extern const driver_id_t cdio_os_driver; /** Those are deprecated; use cdio_drivers or cdio_device_drivers to iterate over all drivers or only the device drivers. Make sure what's listed for CDIO_MIN_DRIVER is the last enumeration in driver_id_t. Since we have a bogus (but useful) 0th entry above we don't have to add one. */ #define CDIO_MIN_DRIVER DRIVER_AIX #define CDIO_MIN_DEVICE_DRIVER CDIO_MIN_DRIVER #define CDIO_MAX_DRIVER DRIVER_NRG #define CDIO_MAX_DEVICE_DRIVER DRIVER_WIN32 /** The following are status codes for completion of a given cdio operation. By design 0 is successful completion and -1 is error completion. This is compatable with ioctl so those routines that call ioctl can just pass the value the get back (cast as this enum). Also, by using negative numbers for errors, the enumeration values below can be used in places where a positive value is expected when things complete successfully. For example, get_blocksize returns the blocksize, but on error uses the error codes below. So note that this enumeration is often cast to an integer. C seems to tolerate this. */ typedef enum { DRIVER_OP_SUCCESS = 0, /**< in cases where an int is returned, like cdio_set_speed, more the negative return codes are for errors and the positive ones for success. */ DRIVER_OP_ERROR = -1, /**< operation returned an error */ DRIVER_OP_UNSUPPORTED = -2, /**< returned when a particular driver doesn't support a particular operation. For example an image driver which doesn't really "eject" a CD. */ DRIVER_OP_UNINIT = -3, /**< returned when a particular driver hasn't been initialized or a null pointer has been passed. */ DRIVER_OP_NOT_PERMITTED = -4, /**< Operation not permitted. For example might be a permission problem. */ DRIVER_OP_BAD_PARAMETER = -5, /**< Bad parameter passed */ DRIVER_OP_BAD_POINTER = -6, /**< Bad pointer to memory area */ DRIVER_OP_NO_DRIVER = -7, /**< Operation called on a driver not available on this OS */ DRIVER_OP_MMC_SENSE_DATA = -8, /**< MMC operation returned sense data, but no other error above recorded. */ } driver_return_code_t; /** Close media tray in CD drive if there is a routine to do so. @param psz_drive the name of CD-ROM to be closed. If NULL, we will use the default device. @param p_driver_id is the driver to be used or that got used if it was DRIVER_UNKNOWN or DRIVER_DEVICE; If this is NULL, we won't report back the driver used. */ driver_return_code_t cdio_close_tray (const char *psz_drive, /*in/out*/ driver_id_t *p_driver_id); /** @param drc the return code you want interpreted. @return the string information about drc */ const char *cdio_driver_errmsg(driver_return_code_t drc); /** Eject media in CD drive if there is a routine to do so. @param p_cdio the CD object to be acted upon. If the CD is ejected *p_cdio is free'd and p_cdio set to NULL. */ driver_return_code_t cdio_eject_media (CdIo_t **p_cdio); /** Eject media in CD drive if there is a routine to do so. @param psz_drive the name of the device to be acted upon. If NULL is given as the drive, we'll use the default driver device. */ driver_return_code_t cdio_eject_media_drive (const char *psz_drive); /** Free device list returned by cdio_get_devices or cdio_get_devices_with_cap. @param device_list list returned by cdio_get_devices or cdio_get_devices_with_cap @see cdio_get_devices, cdio_get_devices_with_cap */ void cdio_free_device_list (char * device_list[]); /** Get the default CD device. if p_cdio is NULL (we haven't initialized a specific device driver), then find a suitable one and return the default device for that. @param p_cdio the CD object queried @return a string containing the default CD device or NULL is if we couldn't get a default device. In some situations of drivers or OS's we can't find a CD device if there is no media in it and it is possible for this routine to return NULL even though there may be a hardware CD-ROM. */ char * cdio_get_default_device (const CdIo_t *p_cdio); /** Return a string containing the default CD device if none is specified. if p_driver_id is DRIVER_UNKNOWN or DRIVER_DEVICE then find a suitable one set the default device for that. NULL is returned if we couldn't get a default device. */ char * cdio_get_default_device_driver (/*in/out*/ driver_id_t *p_driver_id); /** Return an array of device names. If you want a specific devices for a driver, give that device. If you want hardware devices, give DRIVER_DEVICE and if you want all possible devices, image drivers and hardware drivers give DRIVER_UNKNOWN. NULL is returned if we couldn't return a list of devices. In some situations of drivers or OS's we can't find a CD device if there is no media in it and it is possible for this routine to return NULL even though there may be a hardware CD-ROM. */ char ** cdio_get_devices (driver_id_t driver_id); /** Get an array of device names in search_devices that have at least the capabilities listed by the capabities parameter. If search_devices is NULL, then we'll search all possible CD drives. Capabilities have two parts to them, a "filesystem" part and an "analysis" part. The filesystem part is mutually exclusive. For example either the filesystem is at most one of the High-Sierra, UFS, or HFS, ISO9660, fileystems. Valid combinations of say HFS and ISO9660 are specified as a separate "filesystem". Capabilities on the other hand are not mutually exclusive. For example a filesystem may have none, either, or both of the XA or Rock-Ridge extension properties. If "b_any" is set false then every capability listed in the analysis portion of capabilities (i.e. not the basic filesystem) must be satisified. If no analysis capabilities are specified, that's a match. If "b_any" is set true, then if any of the analysis capabilities matches, we call that a success. In either case, in the filesystem portion different filesystem either specify 0 to match any filesystem or the specific filesystem type. To find a CD-drive of any type, use the mask CDIO_FS_MATCH_ALL. @return the array of device names or NULL if we couldn't get a default device. It is also possible to return a non NULL but after dereferencing the the value is NULL. This also means nothing was found. */ char ** cdio_get_devices_with_cap (/*in*/ char *ppsz_search_devices[], cdio_fs_anal_t capabilities, bool b_any); /** Like cdio_get_devices_with_cap but we return the driver we found as well. This is because often one wants to search for kind of drive and then *open* it afterwards. Giving the driver back facilitates this, and speeds things up for libcdio as well. */ char ** cdio_get_devices_with_cap_ret (/*in*/ char* ppsz_search_devices[], cdio_fs_anal_t capabilities, bool b_any, /*out*/ driver_id_t *p_driver_id); /** Like cdio_get_devices, but we may change the p_driver_id if we were given DRIVER_DEVICE or DRIVER_UNKNOWN. This is because often one wants to get a drive name and then *open* it afterwards. Giving the driver back facilitates this, and speeds things up for libcdio as well. */ char ** cdio_get_devices_ret (/*in/out*/ driver_id_t *p_driver_id); /** Get the what kind of device we've got. @param p_cdio the CD object queried @param p_read_cap pointer to return read capabilities @param p_write_cap pointer to return write capabilities @param p_misc_cap pointer to return miscellaneous other capabilities In some situations of drivers or OS's we can't find a CD device if there is no media in it. In this situation capabilities will show up as NULL even though there isa hardware CD-ROM. */ void cdio_get_drive_cap (const CdIo_t *p_cdio, cdio_drive_read_cap_t *p_read_cap, cdio_drive_write_cap_t *p_write_cap, cdio_drive_misc_cap_t *p_misc_cap); /** Get the drive capabilities for a specified device. Return a list of device capabilities. In some situations of drivers or OS's we can't find a CD device if there is no media in it. In this situation capabilities will show up as NULL even though there isa hardware CD-ROM. */ void cdio_get_drive_cap_dev (const char *device, cdio_drive_read_cap_t *p_read_cap, cdio_drive_write_cap_t *p_write_cap, cdio_drive_misc_cap_t *p_misc_cap); /** Get a string containing the name of the driver in use. @return a string with driver name or NULL if CdIo_t is NULL (we haven't initialized a specific device. */ const char * cdio_get_driver_name (const CdIo_t *p_cdio); /** Get the driver id. if CdIo_t is NULL (we haven't initialized a specific device driver), then return DRIVER_UNKNOWN. @return the driver id.. */ driver_id_t cdio_get_driver_id (const CdIo_t *p_cdio); /** Get the CD-ROM hardware info via a SCSI MMC INQUIRY command. False is returned if we had an error getting the information. */ bool cdio_get_hwinfo ( const CdIo_t *p_cdio, /*out*/ cdio_hwinfo_t *p_hw_info ); /** Get the LSN of the first track of the last session of on the CD. @param p_cdio the CD object to be acted upon. @param i_last_session pointer to the session number to be returned. */ driver_return_code_t cdio_get_last_session (CdIo_t *p_cdio, /*out*/ lsn_t *i_last_session); /** Find out if media has changed since the last call. @param p_cdio the CD object to be acted upon. @return 1 if media has changed since last call, 0 if not. Error return codes are the same as driver_return_code_t */ int cdio_get_media_changed(CdIo_t *p_cdio); /** True if CD-ROM understand ATAPI commands. */ bool_3way_t cdio_have_atapi (CdIo_t *p_cdio); /** Like cdio_have_xxx but uses an enumeration instead. */ bool cdio_have_driver (driver_id_t driver_id); /** Free any resources associated with p_cdio. Call this when done using p_cdio and using CD reading/control operations. @param p_cdio the CD object to eliminated. */ void cdio_destroy (CdIo_t *p_cdio); /** Get a string decribing driver_id. @param driver_id the driver you want the description for @return a string of driver description */ const char *cdio_driver_describe (driver_id_t driver_id); /** Sets up to read from place specified by psz_source and driver_id. This or cdio_open_* should be called before using any other routine, except cdio_init or any routine that accesses the CD-ROM drive by name. cdio_open will call cdio_init, if that hasn't been done previously. @return the cdio object or NULL on error or no device. If NULL is given as the source, we'll use the default driver device. */ CdIo_t * cdio_open (const char *psz_source, driver_id_t driver_id); /** Sets up to read from place specified by psz_source, driver_id and access mode. This or cdio_open* should be called before using any other routine, except cdio_init or any routine that accesses the CD-ROM drive by name. This will call cdio_init, if that hasn't been done previously. If NULL is given as the source, we'll use the default driver device. @return the cdio object or NULL on error or no device. */ CdIo_t * cdio_open_am (const char *psz_source, driver_id_t driver_id, const char *psz_access_mode); /** Set up BIN/CUE CD disk-image for reading. Source is the .bin or .cue file @return the cdio object or NULL on error or no device. */ CdIo_t * cdio_open_bincue (const char *psz_cue_name); /** Set up BIN/CUE CD disk-image for reading. Source is the .bin or .cue file @return the cdio object or NULL on error or no device.. */ CdIo_t * cdio_open_am_bincue (const char *psz_cue_name, const char *psz_access_mode); /** Set up cdrdao CD disk-image for reading. Source is the .toc file @return the cdio object or NULL on error or no device. */ CdIo_t * cdio_open_cdrdao (const char *psz_toc_name); /** Set up cdrdao CD disk-image for reading. Source is the .toc file @return the cdio object or NULL on error or no device.. */ CdIo_t * cdio_open_am_cdrdao (const char *psz_toc_name, const char *psz_access_mode); /** Return a string containing the default CUE file that would be used when none is specified. @return the cdio object or NULL on error or no device. */ char * cdio_get_default_device_bincue(void); char **cdio_get_devices_bincue(void); /** @return string containing the default CUE file that would be used when none is specified. NULL is returned on error or there is no device. */ char * cdio_get_default_device_cdrdao(void); char **cdio_get_devices_cdrdao(void); /** Set up CD-ROM for reading. The device_name is the some sort of device name. @return the cdio object for subsequent operations. NULL on error or there is no driver for a some sort of hardware CD-ROM. */ CdIo_t * cdio_open_cd (const char *device_name); /** Set up CD-ROM for reading. The device_name is the some sort of device name. @return the cdio object for subsequent operations. NULL on error or there is no driver for a some sort of hardware CD-ROM. */ CdIo_t * cdio_open_am_cd (const char *psz_device, const char *psz_access_mode); /** CDRWIN BIN/CUE CD disc-image routines. Source is the .cue file @return the cdio object for subsequent operations. NULL on error. */ CdIo_t * cdio_open_cue (const char *cue_name); /** Set up CD-ROM for reading using the AIX driver. The device_name is the some sort of device name. @return the cdio object for subsequent operations. NULL on error or there is no AIX driver. @see cdio_open */ CdIo_t * cdio_open_am_aix (const char *psz_source, const char *psz_access_mode); /** Set up CD-ROM for reading using the AIX driver. The device_name is the some sort of device name. @return the cdio object for subsequent operations. NULL on error or there is no AIX driver. @see cdio_open */ CdIo_t * cdio_open_aix (const char *psz_source); /** Return a string containing the default device name that the AIX driver would use when none is specified. @return the cdio object for subsequent operations. NULL on error or there is no AIX driver. @see cdio_open_cd, cdio_open */ char * cdio_get_default_device_aix(void); /** Return a list of all of the CD-ROM devices that the AIX driver can find. In some situations of drivers or OS's we can't find a CD device if there is no media in it and it is possible for this routine to return NULL even though there may be a hardware CD-ROM. */ char **cdio_get_devices_aix(void); /** Set up CD-ROM for reading using the BSDI driver. The device_name is the some sort of device name. @param psz_source the name of the device to open @return the cdio object for subsequent operations. NULL on error or there is no BSDI driver. @see cdio_open */ CdIo_t * cdio_open_bsdi (const char *psz_source); /** Set up CD-ROM for reading using the BSDI driver. The device_name is the some sort of device name. @return the cdio object for subsequent operations. NULL on error or there is no BSDI driver. @see cdio_open */ CdIo_t * cdio_open_am_bsdi (const char *psz_source, const char *psz_access_mode); /** Return a string containing the default device name that the BSDI driver would use when none is specified. @return the cdio object for subsequent operations. NULL on error or there is no BSDI driver. @see cdio_open_cd, cdio_open */ char * cdio_get_default_device_bsdi(void); /** Return a list of all of the CD-ROM devices that the BSDI driver can find. In some situations of drivers or OS's we can't find a CD device if there is no media in it and it is possible for this routine to return NULL even though there may be a hardware CD-ROM. */ char **cdio_get_devices_bsdi(void); /** Set up CD-ROM for reading using the FreeBSD driver. The device_name is the some sort of device name. NULL is returned on error or there is no FreeBSD driver. @see cdio_open_cd, cdio_open */ CdIo_t * cdio_open_freebsd (const char *paz_psz_source); /** Set up CD-ROM for reading using the FreeBSD driver. The device_name is the some sort of device name. NULL is returned on error or there is no FreeBSD driver. @see cdio_open_cd, cdio_open */ CdIo_t * cdio_open_am_freebsd (const char *psz_source, const char *psz_access_mode); /** Return a string containing the default device name that the FreeBSD driver would use when none is specified. NULL is returned on error or there is no CD-ROM device. */ char * cdio_get_default_device_freebsd(void); /** Return a list of all of the CD-ROM devices that the FreeBSD driver can find. */ char **cdio_get_devices_freebsd(void); /** Set up CD-ROM for reading using the GNU/Linux driver. The device_name is the some sort of device name. @return the cdio object for subsequent operations. NULL on error or there is no GNU/Linux driver. In some situations of drivers or OS's we can't find a CD device if there is no media in it and it is possible for this routine to return NULL even though there may be a hardware CD-ROM. */ CdIo_t * cdio_open_linux (const char *psz_source); /** Set up CD-ROM for reading using the GNU/Linux driver. The device_name is the some sort of device name. @return the cdio object for subsequent operations. NULL on error or there is no GNU/Linux driver. */ CdIo_t * cdio_open_am_linux (const char *psz_source, const char *access_mode); /** Return a string containing the default device name that the GNU/Linux driver would use when none is specified. A scan is made for CD-ROM drives with CDs in them. NULL is returned on error or there is no CD-ROM device. In some situations of drivers or OS's we can't find a CD device if there is no media in it and it is possible for this routine to return NULL even though there may be a hardware CD-ROM. @see cdio_open_cd, cdio_open */ char * cdio_get_default_device_linux(void); /** Return a list of all of the CD-ROM devices that the GNU/Linux driver can find. */ char **cdio_get_devices_linux(void); /** Set up CD-ROM for reading using the Sun Solaris driver. The device_name is the some sort of device name. @return the cdio object for subsequent operations. NULL on error or there is no Solaris driver. */ CdIo_t * cdio_open_solaris (const char *psz_source); /** Set up CD-ROM for reading using the Sun Solaris driver. The device_name is the some sort of device name. @return the cdio object for subsequent operations. NULL on error or there is no Solaris driver. */ CdIo_t * cdio_open_am_solaris (const char *psz_source, const char *psz_access_mode); /** Return a string containing the default device name that the Solaris driver would use when none is specified. A scan is made for CD-ROM drives with CDs in them. NULL is returned on error or there is no CD-ROM device. In some situations of drivers or OS's we can't find a CD device if there is no media in it and it is possible for this routine to return NULL even though there may be a hardware CD-ROM. @see cdio_open_cd, cdio_open */ char * cdio_get_default_device_solaris(void); /** Return a list of all of the CD-ROM devices that the Solaris driver can find. */ char **cdio_get_devices_solaris(void); /** Set up CD-ROM for reading using the Apple OSX driver. The device_name is the some sort of device name. NULL is returned on error or there is no OSX driver. In some situations of drivers or OS's we can't find a CD device if there is no media in it and it is possible for this routine to return NULL even though there may be a hardware CD-ROM. @see cdio_open_cd, cdio_open */ CdIo_t * cdio_open_osx (const char *psz_source); /** Set up CD-ROM for reading using the Apple OSX driver. The device_name is the some sort of device name. NULL is returned on error or there is no OSX driver. @see cdio_open_cd, cdio_open */ CdIo_t * cdio_open_am_osx (const char *psz_source, const char *psz_access_mode); /** Return a string containing the default device name that the OSX driver would use when none is specified. A scan is made for CD-ROM drives with CDs in them. In some situations of drivers or OS's we can't find a CD device if there is no media in it and it is possible for this routine to return NULL even though there may be a hardware CD-ROM. */ char * cdio_get_default_device_osx(void); /** Return a list of all of the CD-ROM devices that the OSX driver can find. */ char **cdio_get_devices_osx(void); /** Set up CD-ROM for reading using the Microsoft Windows driver. The device_name is the some sort of device name. In some situations of drivers or OS's we can't find a CD device if there is no media in it and it is possible for this routine to return NULL even though there may be a hardware CD-ROM. */ CdIo_t * cdio_open_win32 (const char *psz_source); /** Set up CD-ROM for reading using the Microsoft Windows driver. The device_name is the some sort of device name. NULL is returned on error or there is no Microsof Windows driver. */ CdIo_t * cdio_open_am_win32 (const char *psz_source, const char *psz_access_mode); /** Return a string containing the default device name that the Win32 driver would use when none is specified. A scan is made for CD-ROM drives with CDs in them. In some situations of drivers or OS's we can't find a CD device if there is no media in it and it is possible for this routine to return NULL even though there may be a hardware CD-ROM. @see cdio_open_cd, cdio_open */ char * cdio_get_default_device_win32(void); char **cdio_get_devices_win32(void); /** Set up CD-ROM for reading using the IBM OS/2 driver. The device_name is the some sort of device name. NULL is returned on error or there is no OS/2 driver. In some situations of drivers or OS's we can't find a CD device if there is no media in it and it is possible for this routine to return NULL even though there may be a hardware CD-ROM. @see cdio_open_cd, cdio_open */ CdIo_t * cdio_open_os2 (const char *psz_source); /** Set up CD-ROM for reading using the IBM OS/2 driver. The device_name is the some sort of device name. NULL is returned on error or there is no OS/2 driver. @see cdio_open_cd, cdio_open */ CdIo_t * cdio_open_am_os2 (const char *psz_source, const char *psz_access_mode); /** Return a string containing the default device name that the OS/2 driver would use when none is specified. A scan is made for CD-ROM drives with CDs in them. In some situations of drivers or OS's we can't find a CD device if there is no media in it and it is possible for this routine to return NULL even though there may be a hardware CD-ROM. */ char * cdio_get_default_device_os2(void); /** Return a list of all of the CD-ROM devices that the OS/2 driver can find. */ char **cdio_get_devices_os2(void); /** Set up CD-ROM for reading using the Nero driver. The device_name is the some sort of device name. @return true on success; NULL on error or there is no Nero driver. */ CdIo_t * cdio_open_nrg (const char *psz_source); /** Set up CD-ROM for reading using the Nero driver. The device_name is the some sort of device name. @return true on success; NULL on error or there is no Nero driver. */ CdIo_t * cdio_open_am_nrg (const char *psz_source, const char *psz_access_mode); /** Get a string containing the default device name that the NRG driver would use when none is specified. A scan is made for NRG disk images in the current directory. @return string containing the default device. NULL on error or there is no CD-ROM device. */ char * cdio_get_default_device_nrg(void); char **cdio_get_devices_nrg(void); /** Determine if bin_name is the bin file part of a CDRWIN CD disk image. @param bin_name location of presumed CDRWIN bin image file. @return the corresponding CUE file if bin_name is a BIN file or NULL if not a BIN file. */ char *cdio_is_binfile(const char *bin_name); /** Determine if cue_name is the cue sheet for a CDRWIN CD disk image. @return corresponding BIN file if cue_name is a CDRWIN cue file or NULL if not a CUE file. */ char *cdio_is_cuefile(const char *cue_name); /** Determine if psg_nrg is a Nero CD disc image. @param psz_nrg location of presumed NRG image file. @return true if psz_nrg is a Nero NRG image or false if not a NRG image. */ bool cdio_is_nrg(const char *psz_nrg); /** Determine if psz_toc is a TOC file for a cdrdao CD disc image. @param psz_toc location of presumed TOC image file. @return true if toc_name is a cdrdao TOC file or false if not a TOC file. */ bool cdio_is_tocfile(const char *psz_toc); /** Determine if psz_source refers to a real hardware CD-ROM. @param psz_source location name of object @param driver_id driver for reading object. Use DRIVER_UNKNOWN if you don't know what driver to use. @return true if psz_source is a device; If false is returned we could have a CD disk image. */ bool cdio_is_device(const char *psz_source, driver_id_t driver_id); /** Set the blocksize for subsequent reads. */ driver_return_code_t cdio_set_blocksize ( const CdIo_t *p_cdio, int i_blocksize ); /** Set the drive speed. @param p_cdio CD structure set by cdio_open(). @param i_drive_speed speed in CD-ROM speed units. Note this not Kbs as would be used in the MMC spec or in mmc_set_speed(). To convert CD-ROM speed units to Kbs, multiply the number by 176 (for raw data) and by 150 (for filesystem data). On many CD-ROM drives, specifying a value too large will result in using the fastest speed. @see mmc_set_speed and mmc_set_drive_speed */ driver_return_code_t cdio_set_speed ( const CdIo_t *p_cdio, int i_drive_speed ); /** Get the value associatied with key. @param p_cdio the CD object queried @param key the key to retrieve @return the value associatd with "key" or NULL if p_cdio is NULL or "key" does not exist. */ const char * cdio_get_arg (const CdIo_t *p_cdio, const char key[]); /** Set the arg "key" with "value" in "p_cdio". @param p_cdio the CD object to set @param key the key to set @param value the value to assocaiate with key */ driver_return_code_t cdio_set_arg (CdIo_t *p_cdio, const char key[], const char value[]); /** Initialize CD Reading and control routines. Should be called first. */ bool cdio_init(void); #ifdef __cplusplus } #endif /* __cplusplus */ /** The below variables are trickery to force the above enum symbol values to be recorded in debug symbol tables. They are used to allow one to refer to the enumeration value names in the typedefs above in a debugger and debugger expressions. */ extern cdio_drive_cap_misc_t debug_cdio_drive_cap_misc; extern cdio_drive_cap_read_t debug_cdio_drive_cap_read_t; extern cdio_drive_cap_write_t debug_drive_cap_write_t; extern cdio_mmc_hw_len_t debug_cdio_mmc_hw_len; extern cdio_src_category_mask_t debug_cdio_src_category_mask; #endif /* __CDIO_DEVICE_H__ */ libcdio-0.83/include/cdio/track.h0000644000175000017500000002231611114145233013607 00000000000000/* $Id: track.h,v 1.14 2008/03/25 15:59:09 karl Exp $ Copyright (C) 2005, 2006, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** \file track.h * \brief The top-level header for track-related libcdio calls. */ #ifndef __CDIO_TRACK_H__ #define __CDIO_TRACK_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /*! Printable tags for track_format_t enumeration. */ extern const char *track_format2str[6]; typedef enum { TRACK_FORMAT_AUDIO, /**< Audio track, e.g. CD-DA */ TRACK_FORMAT_CDI, /**< CD-i. How this is different from DATA below? */ TRACK_FORMAT_XA, /**< Mode2 of some sort */ TRACK_FORMAT_DATA, /**< Mode1 of some sort */ TRACK_FORMAT_PSX, /**< Playstation CD. Like audio but only 2336 bytes * of user data. */ TRACK_FORMAT_ERROR /**< Dunno what is, or some other error. */ } track_format_t; typedef enum { CDIO_TRACK_FLAG_FALSE, CDIO_TRACK_FLAG_TRUE, CDIO_TRACK_FLAG_ERROR, CDIO_TRACK_FLAG_UNKNOWN } track_flag_t; /*! \brief Structure containing attributes associated with a track */ typedef struct { track_flag_t preemphasis; /**< Linear preemphasis on an audio track */ track_flag_t copy_permit; /**< Whether copying is permitted */ int channels; /**< Number of audio channels, 2, 4. -2 if not implemented or -1 for error. */ } track_flags_t; /*! The leadout track is always 0xAA, regardless of # of tracks on disc, or what value may be used internally. For example although OS X uses a different value for the lead-out track internally than given below, programmers should use CDIO_CDROM_LEADOUT_TRACK and not worry about this. */ /*! An enumeration for some of the CDIO_CDROM_* \#defines below. This isn't really an enumeration one would really use in a program; it is to be helpful in debuggers where wants just to refer to the CDIO_CDROM_* names and get something. */ extern enum cdio_track_enums { CDIO_CDROM_LBA = 0x01, /**< "logical block": first frame is #0 */ CDIO_CDROM_MSF = 0x02, /**< "minute-second-frame": binary, not BCD here! */ CDIO_CDROM_DATA_TRACK = 0x04, CDIO_CDROM_CDI_TRACK = 0x10, CDIO_CDROM_XA_TRACK = 0x20, CDIO_CD_MAX_TRACKS = 99, /**< Largest CD track number */ CDIO_CDROM_LEADOUT_TRACK = 0xAA, /**< Lead-out track number */ CDIO_INVALID_TRACK = 0xFF, /**< Constant for invalid track number */ } cdio_track_enums; #define CDIO_CD_MIN_TRACK_NO 1 /**< Smallest CD track number */ /*! track modes (Table 350) reference: MMC-3 draft revsion - 10g */ typedef enum { AUDIO, /**< 2352 byte block length */ MODE1, /**< 2048 byte block length */ MODE1_RAW, /**< 2352 byte block length */ MODE2, /**< 2336 byte block length */ MODE2_FORM1, /**< 2048 byte block length */ MODE2_FORM2, /**< 2324 byte block length */ MODE2_FORM_MIX, /**< 2336 byte block length */ MODE2_RAW /**< 2352 byte block length */ } trackmode_t; /*! Get CD-Text information for a CdIo_t object. @param p_cdio the CD object that may contain CD-Text information. @param i_track track for which we are requesting CD-Text information. @return the CD-Text object or NULL if obj is NULL or CD-Text information does not exist. If i_track is 0 or CDIO_CDROM_LEADOUT_TRACK the track returned is the information assocated with the CD. */ cdtext_t *cdio_get_cdtext (CdIo_t *p_cdio, track_t i_track); /*! Get the number of the first track. @return the track number or CDIO_INVALID_TRACK on error. */ track_t cdio_get_first_track_num(const CdIo_t *p_cdio); /*! Return the last track number. CDIO_INVALID_TRACK is returned on error. */ track_t cdio_get_last_track_num (const CdIo_t *p_cdio); /*! Find the track which contains lsn. CDIO_INVALID_TRACK is returned if the lsn outside of the CD or if there was some error. If the lsn is before the pregap of the first track 0 is returned. Otherwise we return the track that spans the lsn. */ track_t cdio_get_track(const CdIo_t *p_cdio, lsn_t lsn); /*! Return number of channels in track: 2 or 4; -2 if not implemented or -1 for error. Not meaningful if track is not an audio track. */ int cdio_get_track_channels(const CdIo_t *p_cdio, track_t i_track); /*! Return copy protection status on a track. Is this meaningful if not an audio track? */ track_flag_t cdio_get_track_copy_permit(const CdIo_t *p_cdio, track_t i_track); /*! Get the format (audio, mode2, mode1) of track. */ track_format_t cdio_get_track_format(const CdIo_t *p_cdio, track_t i_track); /*! Return true if we have XA data (green, mode2 form1) or XA data (green, mode2 form2). That is track begins: sync - header - subheader 12 4 - 8 FIXME: there's gotta be a better design for this and get_track_format? */ bool cdio_get_track_green(const CdIo_t *p_cdio, track_t i_track); /*! Return the ending LSN for track number i_track in cdio. CDIO_INVALID_LSN is returned on error. */ lsn_t cdio_get_track_last_lsn(const CdIo_t *p_cdio, track_t i_track); /*! Get the starting LBA for track number i_track in p_cdio. Track numbers usually start at something greater than 0, usually 1. The "leadout" track is specified either by using i_track CDIO_CDROM_LEADOUT_TRACK or the total tracks+1. @param p_cdio object to get information from @param i_track the track number we want the LSN for @return the starting LBA or CDIO_INVALID_LBA on error. */ lba_t cdio_get_track_lba(const CdIo_t *p_cdio, track_t i_track); /*! Return the starting LSN for track number i_track in p_cdio. Track numbers usually start at something greater than 0, usually 1. The "leadout" track is specified either by using i_track CDIO_CDROM_LEADOUT_TRACK or the total tracks+1. @param p_cdio object to get information from @param i_track the track number we want the LSN for @return the starting LSN or CDIO_INVALID_LSN on error. */ lsn_t cdio_get_track_lsn(const CdIo_t *p_cdio, track_t i_track); /*! Return the starting LBA for the pregap for track number i_track in p_cdio. Track numbers usually start at something greater than 0, usually 1. @param p_cdio object to get information from @param i_track the track number we want the LBA for @return the starting LBA or CDIO_INVALID_LBA on error. */ lba_t cdio_get_track_pregap_lba(const CdIo_t *p_cdio, track_t i_track); /*! Return the starting LSN for the pregap for track number i_track in p_cdio. Track numbers usually start at something greater than 0, usually 1. @param p_cdio object to get information from @param i_track the track number we want the LSN for @return the starting LSN or CDIO_INVALID_LSN on error. */ lsn_t cdio_get_track_pregap_lsn(const CdIo_t *p_cdio, track_t i_track); /*! Get the International Standard Recording Code (ISRC) for track number i_track in p_cdio. Track numbers usually start at something greater than 0, usually 1. @return the International Standard Recording Code (ISRC) or NULL if there is none or we don't have the ability to get it. Note: string is malloc'd so caller has to free() the returned string when done with it. */ char * cdio_get_track_isrc (const CdIo_t *p_cdio, track_t i_track); /*! Return the starting MSF (minutes/secs/frames) for track number i_track in p_cdio. Track numbers usually start at something greater than 0, usually 1. The "leadout" track is specified either by using i_track CDIO_CDROM_LEADOUT_TRACK or the total tracks+1. @return true if things worked or false if there is no track entry. */ bool cdio_get_track_msf(const CdIo_t *p_cdio, track_t i_track, /*out*/ msf_t *msf); /*! Get linear preemphasis status on an audio track This is not meaningful if not an audio track? */ track_flag_t cdio_get_track_preemphasis(const CdIo_t *p_cdio, track_t i_track); /*! Get the number of sectors between this track an the next. This includes any pregap sectors before the start of the next track. Track numbers usually start at something greater than 0, usually 1. @return the number of sectors or 0 if there is an error. */ unsigned int cdio_get_track_sec_count(const CdIo_t *p_cdio, track_t i_track); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __CDIO_TRACK_H__ */ libcdio-0.83/include/cdio/ds.h0000644000175000017500000000550711114145233013114 00000000000000/* $Id: ds.h,v 1.5 2008/03/25 15:59:09 karl Exp $ Copyright (C) 2005, 2008 Rocky Bernstein Copyright (C) 2000, 2004 Herbert Valerio Riedel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** \file ds.h * \brief The top-level header for list-related data structures. Note: this header will is slated to get removed and libcdio will use glib.h routines instead. */ #ifndef __CDIO_DS_H__ #define __CDIO_DS_H__ #include /** opaque types... */ typedef struct _CdioList CdioList_t; typedef struct _CdioListNode CdioListNode_t; typedef int (*_cdio_list_cmp_func_t) (void *p_data1, void *p_data2); typedef int (*_cdio_list_iterfunc_t) (void *p_data, void *p_user_data); /** The below are given compatibility with old code. Please use the above type names, not these. */ #define CdioList CdioList_t #define CdioListNode CdioListNode_t #define _cdio_list_cmp_func _cdio_list_cmp_func_t #define _cdio_list_iterfunc _cdio_list_iterfunc_t #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** methods */ CdioList_t *_cdio_list_new (void); void _cdio_list_free (CdioList_t *p_list, int free_data); unsigned _cdio_list_length (const CdioList_t *list); void _cdio_list_prepend (CdioList_t *p_list, void *p_data); void _cdio_list_append (CdioList_t *p_list, void *p_data); void _cdio_list_foreach (CdioList_t *p_list, _cdio_list_iterfunc_t func, void *p_user_data); CdioListNode_t *_cdio_list_find (CdioList_t *p_list, _cdio_list_iterfunc_t cmp_func, void *p_user_data); #define _CDIO_LIST_FOREACH(node, list) \ for (node = _cdio_list_begin (list); node; node = _cdio_list_node_next (node)) /** node operations */ CdioListNode_t *_cdio_list_begin (const CdioList_t *p_list); CdioListNode_t *_cdio_list_end (CdioList_t *p_list); CdioListNode_t *_cdio_list_node_next (CdioListNode_t *p_node); void _cdio_list_node_free (CdioListNode_t *p_node, int i_free_data); void *_cdio_list_node_data (CdioListNode_t *p_node); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __CDIO_DS_H__ */ /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/include/cdio/udf.h0000644000175000017500000001366511460454705013303 00000000000000/* Copyright (C) 2005, 2006, 2008, 2010 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /*! * \file udf.h * * \brief The top-level interface header for libudf: UDF filesystem * library; applications include this. * */ #ifndef UDF_H #define UDF_H #include #include #include typedef uint16_t partition_num_t; /** Opaque structures. */ typedef struct udf_s udf_t; typedef struct udf_file_s udf_file_t; typedef struct udf_dirent_s { char *psz_name; bool b_dir; /* true if this entry is a directory. */ bool b_parent; /* True if has parent directory (e.g. not root directory). If not set b_dir will probably be true. */ udf_t *p_udf; uint32_t i_part_start; uint32_t i_loc, i_loc_end; uint64_t dir_left; uint8_t *sector; udf_fileid_desc_t *fid; /* This field has to come last because it is variable in length. */ udf_file_entry_t fe; } udf_dirent_t;; /** Imagine the below a \#define'd value rather than distinct values of an enum. */ typedef enum { UDF_BLOCKSIZE = 2048 } udf_enum1_t; /** This variable is trickery to force the above enum symbol value to be recorded in debug symbol tables. It is used to allow one refer to above enumeration values in a debugger and debugger expressions */ extern udf_enum1_t debug_udf_enum1; #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /*! Close UDF and free resources associated with p_udf. */ bool udf_close (udf_t *p_udf); /*! Seek to a position i_start and then read i_blocks. Number of blocks read is returned. One normally expects the return to be equal to i_blocks. */ driver_return_code_t udf_read_sectors (const udf_t *p_udf, void *ptr, lsn_t i_start, long int i_blocks); /*! Open an UDF for reading. Maybe in the future we will have a mode. NULL is returned on error. Caller must free result - use udf_close for that. */ udf_t *udf_open (const char *psz_path); /*! Return the partition number of the the opened udf handle. -1 Is returned if we have an error. */ int16_t udf_get_part_number(const udf_t *p_udf); /*! Get the root in p_udf. If b_any_partition is false then the root must be in the given partition. NULL is returned if the partition is not found or a root is not found or there is on error. Caller must free result - use udf_file_free for that. */ udf_dirent_t *udf_get_root (udf_t *p_udf, bool b_any_partition, partition_num_t i_partition); /** * Gets the Volume Identifier string, in 8bit unicode (latin-1) * psz_volid, place to put the string * i_volid_size, size of the buffer volid points to * returns the size of buffer needed for all data */ int udf_get_volume_id(udf_t *p_udf, /*out*/ char *psz_volid, unsigned int i_volid); /** * Gets the Volume Set Identifier, as a 128-byte dstring (not decoded) * WARNING This is not a null terminated string * volsetid, place to put the data * volsetid_size, size of the buffer volsetid points to * the buffer should be >=128 bytes to store the whole volumesetidentifier * returns the size of the available volsetid information (128) * or 0 on error */ int udf_get_volumeset_id(udf_t *p_udf, /*out*/ uint8_t *volsetid, unsigned int i_volsetid); /*! Return a file pointer matching psz_name. */ udf_dirent_t *udf_fopen(udf_dirent_t *p_udf_root, const char *psz_name); /*! udf_mode_string - fill in string PSZ_STR with an ls-style ASCII representation of the i_mode. PSZ_STR is returned. 10 characters are stored in PSZ_STR; a terminating null byte is added. The characters stored in PSZ_STR are: 0 File type. 'd' for directory, 'c' for character special, 'b' for block special, 'm' for multiplex, 'l' for symbolic link, 's' for socket, 'p' for fifo, '-' for regular, '?' for any other file type 1 'r' if the owner may read, '-' otherwise. 2 'w' if the owner may write, '-' otherwise. 3 'x' if the owner may execute, 's' if the file is set-user-id, '-' otherwise. 'S' if the file is set-user-id, but the execute bit isn't set. 4 'r' if group members may read, '-' otherwise. 5 'w' if group members may write, '-' otherwise. 6 'x' if group members may execute, 's' if the file is set-group-id, '-' otherwise. 'S' if it is set-group-id but not executable. 7 'r' if any user may read, '-' otherwise. 8 'w' if any user may write, '-' otherwise. 9 'x' if any user may execute, 't' if the file is "sticky" (will be retained in swap space after execution), '-' otherwise. 'T' if the file is sticky but not executable. */ char *udf_mode_string (mode_t i_mode, char *psz_str); bool udf_get_lba(const udf_file_entry_t *p_udf_fe, /*out*/ uint32_t *start, /*out*/ uint32_t *end); #ifdef __cplusplus } #endif /* __cplusplus */ #include #include #endif /*UDF_H*/ libcdio-0.83/include/cdio/read.h0000644000175000017500000001737711114145233013431 00000000000000/* $Id: read.h,v 1.15 2008/03/25 15:59:09 karl Exp $ Copyright (C) 2005, 2006, 2007, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** \file read.h * * \brief The top-level header for sector (block, frame)-related * libcdio calls. */ #ifndef __CDIO_READ_H__ #define __CDIO_READ_H__ #ifndef EXTERNAL_LIBCDIO_CONFIG_H #define EXTERNAL_LIBCDIO_CONFIG_H /* Need for HAVE_SYS_TYPES_H */ #include #endif #ifdef HAVE_SYS_TYPES_H /* Some systems need this for off_t and ssize. */ #include #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** All the different ways a block/sector can be read. */ typedef enum { CDIO_READ_MODE_AUDIO, /**< CD-DA, audio, Red Book */ CDIO_READ_MODE_M1F1, /**< Mode 1 Form 1 */ CDIO_READ_MODE_M1F2, /**< Mode 1 Form 2 */ CDIO_READ_MODE_M2F1, /**< Mode 2 Form 1 */ CDIO_READ_MODE_M2F2 /**< Mode 2 Form 2 */ } cdio_read_mode_t; /*! Reposition read offset Similar to (if not the same as) libc's fseek() @param p_cdio object which gets adjusted @param offset amount to seek @param whence like corresponding parameter in libc's fseek, e.g. SEEK_SET or SEEK_END. @return (off_t) -1 on error. */ off_t cdio_lseek(const CdIo_t *p_cdio, off_t offset, int whence); /*! Reads into buf the next size bytes. Similar to (if not the same as) libc's read(). This is a "cooked" read, or one handled by the OS. It probably won't work on audio data. For that use cdio_read_audio_sector(s). @param p_cdio object to read from @param p_buf place to read data into. The caller should make sure this location can store at least i_size bytes. @param i_size number of bytes to read @return (ssize_t) -1 on error. */ ssize_t cdio_read(const CdIo_t *p_cdio, void *p_buf, size_t i_size); /*! Read an audio sector @param p_cdio object to read from @param p_buf place to read data into. The caller should make sure this location can store at least CDIO_FRAMESIZE_RAW bytes. @param i_lsn sector to read */ driver_return_code_t cdio_read_audio_sector (const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn); /*! Reads audio sectors @param p_cdio object to read from @param p_buf place to read data into. The caller should make sure this location can store at least CDIO_FRAMESIZE_RAW * i_blocks bytes. @param i_lsn sector to read @param i_blocks number of sectors to read */ driver_return_code_t cdio_read_audio_sectors (const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn, uint32_t i_blocks); /*! Read data sectors @param p_cdio object to read from @param p_buf place to read data into. The caller should make sure this location can store at least ISO_BLOCKSIZE, M2RAW_SECTOR_SIZE, or M2F2_SECTOR_SIZE depending on the kind of sector getting read. If you don't know whether you have a Mode 1/2, Form 1/ Form 2/Formless sector best to reserve space for the maximum, M2RAW_SECTOR_SIZE. @param i_lsn sector to read @param i_blocksize size of block. Should be either CDIO_CD_FRAMESIZE, M2RAW_SECTOR_SIZE, or M2F2_SECTOR_SIZE. See comment above under p_buf. @param i_blocks number of blocks to read */ driver_return_code_t cdio_read_data_sectors ( const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn, uint16_t i_blocksize, uint32_t i_blocks ); /*! Reads a mode 1 sector @param p_cdio object to read from @param p_buf place to read data into. @param i_lsn sector to read @param b_form2 true for reading mode 1 form 2 sectors or false for mode 1 form 1 sectors. */ driver_return_code_t cdio_read_mode1_sector (const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn, bool b_form2); /*! Reads mode 1 sectors @param p_cdio object to read from @param p_buf place to read data into @param i_lsn sector to read @param b_form2 true for reading mode 1 form 2 sectors or false for mode 1 form 1 sectors. @param i_blocks number of sectors to read */ driver_return_code_t cdio_read_mode1_sectors (const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn, bool b_form2, uint32_t i_blocks); /*! Reads a mode 2 sector @param p_cdio object to read from @param p_buf place to read data into. The caller should make sure this location can store at least M2RAW_SECTOR_SIZE (for form 1) or CDIO_CD_FRAMESIZE (for form 2) bytes. @param i_lsn sector to read @param b_form2 true for reading mode 2 form 2 sectors or false for mode 2 form 1 sectors. @return 0 if no error, nonzero otherwise. */ driver_return_code_t cdio_read_mode2_sector (const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn, bool b_form2); /** The special case of reading a single block is a common one so we provide a routine for that as a convenience. */ driver_return_code_t cdio_read_sector(const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn, cdio_read_mode_t read_mode); /*! Reads mode 2 sectors @param p_cdio object to read from @param p_buf place to read data into. The caller should make sure this location can store at least M2RAW_SECTOR_SIZE (for form 1) or CDIO_CD_FRAMESIZE (for form 2) * i_blocks bytes. @param i_lsn sector to read @param b_form2 true for reading mode2 form 2 sectors or false for mode 2 form 1 sectors. @param i_blocks number of sectors to read @return 0 if no error, nonzero otherwise. */ driver_return_code_t cdio_read_mode2_sectors (const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn, bool b_form2, uint32_t i_blocks); /*! Reads a number of sectors (AKA blocks). @param p_cdio cdio object @param p_buf place to read data into. The caller should make sure this location is large enough. See below for size information. @param read_mode the kind of "mode" to use in reading. @param i_lsn sector to read @param i_blocks number of sectors to read @return DRIVER_OP_SUCCESS (0) if no error, other (negative) enumerations are returned on error. If read_mode is CDIO_MODE_AUDIO, *p_buf should hold at least CDIO_FRAMESIZE_RAW * i_blocks bytes. If read_mode is CDIO_MODE_DATA, *p_buf should hold at least i_blocks times either ISO_BLOCKSIZE, M1RAW_SECTOR_SIZE or M2F2_SECTOR_SIZE depending on the kind of sector getting read. If you don't know whether you have a Mode 1/2, Form 1/ Form 2/Formless sector best to reserve space for the maximum which is M2RAW_SECTOR_SIZE. If read_mode is CDIO_MODE_M2F1, *p_buf should hold at least M2RAW_SECTOR_SIZE * i_blocks bytes. If read_mode is CDIO_MODE_M2F2, *p_buf should hold at least CDIO_CD_FRAMESIZE * i_blocks bytes. */ driver_return_code_t cdio_read_sectors(const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn, cdio_read_mode_t read_mode, uint32_t i_blocks); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __CDIO_TRACK_H__ */ libcdio-0.83/include/cdio/mmc_ll_cmds.h0000644000175000017500000003170411652131105014755 00000000000000/* Copyright (C) 2010 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** \file mmc_ll_cmds.h \brief Wrappers for specific Multimedia Command (MMC) commands e.g., READ DISC, START/STOP UNIT. The documents we make use of are described in several specifications made by the SCSI committee T10 http://www.t10.org. In particular, SCSI Primary Commands (SPC), SCSI Block Commands (SBC), and Multi-Media Commands (MMC). These documents generally have a numeric level number appended. For example SPC-3 refers to ``SCSI Primary Commands - 3'. In year 2010 the current versions were SPC-3, SBC-2, MMC-5. */ #ifndef __CDIO_MMC_LL_CMDS_H__ #define __CDIO_MMC_LL_CMDS_H__ #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** Get drive capabilities vis SCSI-MMC GET CONFIGURATION @param p_cdio the CD object to be acted upon. @param p_buf pointer to location to store mode sense information @param i_size number of bytes allocated to p_buf @param i_timeout_ms value in milliseconds to use on timeout. Setting to 0 uses the default time-out value stored in mmc_timeout_ms. @return DRIVER_OP_SUCCESS (0) if we got the status. return codes are the same as driver_return_code_t */ driver_return_code_t mmc_get_configuration(const CdIo_t *p_cdio, void *p_buf, unsigned int i_size, unsigned int return_type, unsigned int i_starting_feature_number, unsigned int i_timeout_ms); /** Return results of media event status via SCSI-MMC GET EVENT STATUS @param p_cdio the CD object to be acted upon. @param out_buf media status code from operation @return DRIVER_OP_SUCCESS (0) if we got the status. Return codes are the same as driver_return_code_t */ driver_return_code_t mmc_get_event_status(const CdIo_t *p_cdio, uint8_t out_buf[2]); /** Run a SCSI-MMC MODE SELECT (10-byte) command and put the results in p_buf. @param p_cdio the CD object to be acted upon. @param p_buf pointer to location to store mode sense information @param i_size number of bytes allocated to p_buf @param page which "page" of the mode sense command we are interested in @param i_timeout_ms value in milliseconds to use on timeout. Setting to 0 uses the default time-out value stored in mmc_timeout_ms. @return DRIVER_OP_SUCCESS if we ran the command ok. */ driver_return_code_t mmc_mode_select_10(CdIo_t *p_cdio, /*out*/ void *p_buf, unsigned int i_size, int page, unsigned int i_timeout_ms); /** Run a SCSI-MMC MODE SENSE command (10-byte version) and put the results in p_buf @param p_cdio the CD object to be acted upon. @param p_buf pointer to location to store mode sense information @param i_size number of bytes allocated to p_buf @param i_page_code which "page" of the mode sense command we are interested in @return DRIVER_OP_SUCCESS if we ran the command ok. */ driver_return_code_t mmc_mode_sense_10( CdIo_t *p_cdio, /*out*/ void *p_buf, unsigned int i_size, unsigned int i_page_code); /** Run a SCSI-MMC MODE SENSE command (6-byte version) and put the results in p_buf @param p_cdio the CD object to be acted upon. @param p_buf pointer to location to store mode sense information @param i_size number of bytes allocated to p_buf @param page which "page" of the mode sense command we are interested in @return DRIVER_OP_SUCCESS if we ran the command ok. */ driver_return_code_t mmc_mode_sense_6( CdIo_t *p_cdio, /*out*/ void *p_buf, unsigned int i_size, int page); /** Request preventing/allowing medium removal on a drive via SCSI-MMC PREVENT/ALLOW MEDIUM REMOVAL. @param p_cdio the CD object to be acted upon. @param b_persisent make b_prevent state persistent @param b_prevent true of drive locked and false if unlocked @param i_timeout_ms value in milliseconds to use on timeout. Setting to 0 uses the default time-out value stored in mmc_timeout_ms. @return DRIVER_OP_SUCCESS (0) if we got the status. return codes are the same as driver_return_code_t */ driver_return_code_t mmc_prevent_allow_medium_removal(const CdIo_t *p_cdio, bool b_persistent, bool b_prevent, unsigned int i_timeout_ms); /** Issue a MMC READ_CD command. @param p_cdio object to read from @param p_buf Place to store data. The caller should ensure that p_buf can hold at least i_blocksize * i_blocks bytes. @param i_lsn sector to read @param expected_sector_type restricts reading to a specific CD sector type. Only 3 bits with values 1-5 are used: 0 all sector types 1 CD-DA sectors only 2 Mode 1 sectors only 3 Mode 2 formless sectors only. Note in contrast to all other values an MMC CD-ROM is not required to support this mode. 4 Mode 2 Form 1 sectors only 5 Mode 2 Form 2 sectors only @param b_digital_audio_play Control error concealment when the data being read is CD-DA. If the data being read is not CD-DA, this parameter is ignored. If the data being read is CD-DA and DAP is false zero, then the user data returned should not be modified by flaw obscuring mechanisms such as audio data mute and interpolate. If the data being read is CD-DA and DAP is true, then the user data returned should be modified by flaw obscuring mechanisms such as audio data mute and interpolate. b_sync_header return the sync header (which will probably have the same value as CDIO_SECTOR_SYNC_HEADER of size CDIO_CD_SYNC_SIZE). @param header_codes Header Codes refer to the sector header and the sub-header that is present in mode 2 formed sectors: 0 No header information is returned. 1 The 4-byte sector header of data sectors is be returned, 2 The 8-byte sector sub-header of mode 2 formed sectors is returned. 3 Both sector header and sub-header (12 bytes) is returned. The Header preceeds the rest of the bytes (e.g. user-data bytes) that might get returned. @param b_user_data Return user data if true. For CD-DA, the User Data is CDIO_CD_FRAMESIZE_RAW bytes. For Mode 1, The User Data is ISO_BLOCKSIZE bytes beginning at offset CDIO_CD_HEADER_SIZE+CDIO_CD_SUBHEADER_SIZE. For Mode 2 formless, The User Data is M2RAW_SECTOR_SIZE bytes beginning at offset CDIO_CD_HEADER_SIZE+CDIO_CD_SUBHEADER_SIZE. For data Mode 2, form 1, User Data is ISO_BLOCKSIZE bytes beginning at offset CDIO_CD_XA_SYNC_HEADER. For data Mode 2, form 2, User Data is 2 324 bytes beginning at offset CDIO_CD_XA_SYNC_HEADER. @param b_sync @param b_edc_ecc true if we return EDC/ECC error detection/correction bits. The presence and size of EDC redundancy or ECC parity is defined according to sector type: CD-DA sectors have neither EDC redundancy nor ECC parity. Data Mode 1 sectors have 288 bytes of EDC redundancy, Pad, and ECC parity beginning at offset 2064. Data Mode 2 formless sectors have neither EDC redundancy nor ECC parity Data Mode 2 form 1 sectors have 280 bytes of EDC redundancy and ECC parity beginning at offset 2072 Data Mode 2 form 2 sectors optionally have 4 bytes of EDC redundancy beginning at offset 2348. @param c2_error_information If true associate a bit with each sector for C2 error The resulting bit field is ordered exactly as the main channel bytes. Each 8-bit boundary defines a byte of flag bits. @param subchannel_selection subchannel-selection bits 0 No Sub-channel data shall be returned. (0 bytes) 1 RAW P-W Sub-channel data shall be returned. (96 byte) 2 Formatted Q sub-channel data shall be transferred (16 bytes) 3 Reserved 4 Corrected and de-interleaved R-W sub-channel (96 bytes) 5-7 Reserved @param i_blocksize size of the a block expected to be returned @param i_blocks number of blocks expected to be returned. @return DRIVER_OP_SUCCESS if we ran the command ok. */ driver_return_code_t mmc_read_cd(const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn, int expected_sector_type, bool b_digital_audio_play, bool b_sync, uint8_t header_codes, bool b_user_data, bool b_edc_ecc, uint8_t c2_error_information, uint8_t subchannel_selection, uint16_t i_blocksize, uint32_t i_blocks); /** Request information about et drive capabilities vis SCSI-MMC READ DISC INFORMATION @param p_cdio the CD object to be acted upon. @param p_buf pointer to location to store mode sense information @param i_size number of bytes allocated to p_buf @param data_type kind of information to retrieve. @return DRIVER_OP_SUCCESS (0) if we got the status. */ driver_return_code_t mmc_read_disc_information(const CdIo_t *p_cdio, /*out*/ void *p_buf, unsigned int i_size, cdio_mmc_read_disc_info_datatype_t data_type, unsigned int i_timeout_ms); /** Set the drive speed in K bytes per second using SCSI-MMC SET SPEED. . @param p_cdio CD structure set by cdio_open(). @param i_Kbs_speed speed in K bytes per second. Note this is not in standard CD-ROM speed units, e.g. 1x, 4x, 16x as it is in cdio_set_speed. To convert CD-ROM speed units to Kbs, multiply the number by 176 (for raw data) and by 150 (for filesystem data). Also note that ATAPI specs say that a value less than 176 will result in an error. On many CD-ROM drives, specifying a value too large will result in using the fastest speed. @param i_timeout_ms value in milliseconds to use on timeout. Setting to 0 uses the default time-out value stored in mmc_timeout_ms. @return the drive speed if greater than 0. -1 if we had an error. is -2 returned if this is not implemented for the current driver. @see cdio_set_speed and mmc_set_drive_speed */ driver_return_code_t mmc_set_speed( const CdIo_t *p_cdio, int i_Kbs_speed, unsigned int i_timeout_ms); /** Load or Unload media using a MMC START STOP UNIT command. @param p_cdio the CD object to be acted upon. @param b_eject eject if true and close tray if false @param b_immediate wait or don't wait for operation to complete @param power_condition Set CD-ROM to idle/standby/sleep. If nonzero, eject/load is ignored, so set to 0 if you want to eject or load. @return DRIVER_OP_SUCCESS if we ran the command ok. @see mmc_eject_media or mmc_close_tray */ driver_return_code_t mmc_start_stop_unit(const CdIo_t *p_cdio, bool b_eject, bool b_immediate, uint8_t power_condition, unsigned int i_timeout_ms); /** Check if drive is ready using SCSI-MMC TEST UNIT READY command. @param p_cdio the CD object to be acted upon. @param i_timeout_ms value in milliseconds to use on timeout. Setting to 0 uses the default time-out value stored in mmc_timeout_ms. @return DRIVER_OP_SUCCESS if we ran the command ok. */ driver_return_code_t mmc_test_unit_ready(const CdIo_t *p_cdio, unsigned int i_timeout_ms); #ifndef DO_NOT_WANT_OLD_MMC_COMPATIBILITY #define mmc_start_stop_media(c, e, i, p, t) \ mmc_start_stop_unit(c, e, i, p, t, 0) #endif /*DO_NOT_WANT_PARANOIA_COMPATIBILITY*/ #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __CDIO_MMC_HL_CMDS_H__ */ /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/include/cdio/cdio_unconfig.h0000644000175000017500000000502211650135753015317 00000000000000/* You can include this to remove any C preprocessor symbols created in cdio_config.h. For example, if your project has your own config.h which sets symbols do this: // for cdio: #include #include // for your program #include */ #undef EMPTY_ARRAY_SIZE #undef HAVE_BZERO #undef HAVE_CDDB #undef HAVE_CHDIR #undef HAVE_CURSES_H #undef HAVE_DAYLIGHT #undef HAVE_DLFCN_H #undef HAVE_DRAND48 #undef HAVE_ERRNO_H #undef HAVE_FCNTL_H #undef HAVE_FTRUNCATE #undef HAVE_GETEUID #undef HAVE_GETGID #undef HAVE_GETOPT_H #undef HAVE_GETPWUID #undef HAVE_GETTIMEOFDAY #undef HAVE_GETUID #undef HAVE_GLOB_H #undef HAVE_GMTIME_R #undef HAVE_ICONV #undef HAVE_INTTYPES_H #undef HAVE_ISOC99_PRAGMA #undef HAVE_JOLIET #undef HAVE_KEYPAD #undef HAVE_LANGINFO_CODESET #undef HAVE_LIMITS_H #undef HAVE_LINUX_CDROM #undef HAVE_LINUX_CDROM_H #undef HAVE_LINUX_MAJOR_H #undef HAVE_LINUX_VERSION_H #undef HAVE_LOCALTIME_R #undef HAVE_LSTAT #undef HAVE_MEMCPY #undef HAVE_MEMORY_H #undef HAVE_MEMSET #undef HAVE_NCURSES_H #undef HAVE_PWD_H #undef HAVE_RAND #undef HAVE_READLINK #undef HAVE_REALPATH #undef HAVE_ROCK #undef HAVE_SETEGID #undef HAVE_SETENV #undef HAVE_SETEUID #undef HAVE_SLEEP #undef HAVE_SNPRINTF #undef HAVE_SOLARIS_CDROM #undef HAVE_STDARG_H #undef HAVE_STDBOOL_H #undef HAVE_STDINT_H #undef HAVE_STDIO_H #undef HAVE_STDLIB_H #undef HAVE_STRINGS_H #undef HAVE_STRING_H #undef HAVE_STRUCT_TIMESPEC #undef HAVE_SYS_CDIO_H #undef HAVE_SYS_PARAM_H #undef HAVE_SYS_STAT_H #undef HAVE_SYS_TIMEB_H #undef HAVE_SYS_TIME_H #undef HAVE_SYS_TYPES_H #undef HAVE_SYS_UTSNAME_H #undef HAVE_S_ISLNK #undef HAVE_S_ISSOCK #undef HAVE_TIMEGM #undef HAVE_TIMEZONE_VAR #undef HAVE_TM_GMTOFF #undef HAVE_TZNAME #undef HAVE_TZSET #undef HAVE_UNISTD_H #undef HAVE_UNSETENV #undef HAVE_USLEEP #undef HAVE_VCDINFO #undef HAVE_VSNPRINTF #undef HAVE_WIN32_CDROM #undef HAVE_WINDOWS_H #undef ICONV_CONST #undef LIBCDIO_CONFIG_H #undef LIBCDIO_SOURCE_PATH #undef LT_OBJDIR #undef MINGW32 #undef NEED_TIMEZONEVAR #undef NO_MINUS_C_MINUS_O #undef PACKAGE #undef PACKAGE_BUGREPORT #undef PACKAGE_NAME #undef PACKAGE_STRING #undef PACKAGE_TARNAME #undef PACKAGE_URL #undef PACKAGE_VERSION #undef STDC_HEADERS #undef _ALL_SOURCE #undef _GNU_SOURCE #undef _POSIX_PTHREAD_SEMANTICS #undef _TANDEM_SOURCE #undef __EXTENSIONS__ #undef VERSION #undef AC_APPLE_UNIVERSAL_BUILD #undef __BIG_ENDIAN__ #undef WORDS_BIGENDIAN #undef _FILE_OFFSET_BITS #undef _LARGEFILE_SOURCE #undef _LARGE_FILES #undef _MINIX #undef _POSIX_1_SOURCE #undef _POSIX_SOURCE #undef const libcdio-0.83/include/cdio/mmc_util.h0000644000175000017500000001563311352222322014317 00000000000000/* Copyright (C) 2010 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** \file mmc_util.h \brief Multimedia Command (MMC) "helper" routines that don't depend on anything other than headers. */ #ifndef __CDIO_MMC_UTIL_H__ #define __CDIO_MMC_UTIL_H__ #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** Profile profile codes used in GET_CONFIGURATION - PROFILE LIST. */ typedef enum { CDIO_MMC_FEATURE_PROF_NON_REMOVABLE = 0x0001, /**< Re-writable disc, capable of changing behavior */ CDIO_MMC_FEATURE_PROF_REMOVABLE = 0x0002, /**< disk Re-writable; with removable media */ CDIO_MMC_FEATURE_PROF_MO_ERASABLE = 0x0003, /**< Erasable Magneto-Optical disk with sector erase capability */ CDIO_MMC_FEATURE_PROF_MO_WRITE_ONCE = 0x0004, /**< Write Once Magneto-Optical write once */ CDIO_MMC_FEATURE_PROF_AS_MO = 0x0005, /**< Advance Storage Magneto-Optical */ CDIO_MMC_FEATURE_PROF_CD_ROM = 0x0008, /**< Read only Compact Disc capable */ CDIO_MMC_FEATURE_PROF_CD_R = 0x0009, /**< Write once Compact Disc capable */ CDIO_MMC_FEATURE_PROF_CD_RW = 0x000A, /**< CD-RW Re-writable Compact Disc capable */ CDIO_MMC_FEATURE_PROF_DVD_ROM = 0x0010, /**< Read only DVD */ CDIO_MMC_FEATURE_PROF_DVD_R_SEQ = 0x0011, /**< Re-recordable DVD using Sequential recording */ CDIO_MMC_FEATURE_PROF_DVD_RAM = 0x0012, /**< Re-writable DVD */ CDIO_MMC_FEATURE_PROF_DVD_RW_RO = 0x0013, /**< Re-recordable DVD using Restricted Overwrite */ CDIO_MMC_FEATURE_PROF_DVD_RW_SEQ = 0x0014, /**< Re-recordable DVD using Sequential recording */ CDIO_MMC_FEATURE_PROF_DVD_R_DL_SEQ = 0x0015, /**< DVD-R/DL sequential recording */ CDIO_MMC_FEATURE_PROF_DVD_R_DL_JR = 0x0016, /**< DVD-R/DL layer jump recording */ CDIO_MMC_FEATURE_PROF_DVD_PRW = 0x001A, /**< DVD+RW - DVD ReWritable */ CDIO_MMC_FEATURE_PROF_DVD_PR = 0x001B, /**< DVD+R - DVD Recordable */ CDIO_MMC_FEATURE_PROF_DDCD_ROM = 0x0020, /**< Read only DDCD */ CDIO_MMC_FEATURE_PROF_DDCD_R = 0x0021, /**< DDCD-R Write only DDCD */ CDIO_MMC_FEATURE_PROF_DDCD_RW = 0x0022, /**< Re-Write only DDCD */ CDIO_MMC_FEATURE_PROF_DVD_PRW_DL = 0x002A, /**< "DVD+RW/DL */ CDIO_MMC_FEATURE_PROF_DVD_PR_DL = 0x002B, /**< DVD+R - DVD Recordable double layer */ CDIO_MMC_FEATURE_PROF_BD_ROM = 0x0040, /**< BD-ROM */ CDIO_MMC_FEATURE_PROF_BD_SEQ = 0x0041, /**< BD-R sequential recording */ CDIO_MMC_FEATURE_PROF_BD_R_RANDOM = 0x0042, /**< BD-R random recording */ CDIO_MMC_FEATURE_PROF_BD_RE = 0x0043, /**< BD-RE */ CDIO_MMC_FEATURE_PROF_HD_DVD_ROM = 0x0050, /**< HD-DVD-ROM */ CDIO_MMC_FEATURE_PROF_HD_DVD_R = 0x0051, /**< HD-DVD-R */ CDIO_MMC_FEATURE_PROF_HD_DVD_RAM = 0x0052, /**<"HD-DVD-RAM */ CDIO_MMC_FEATURE_PROF_NON_CONFORM = 0xFFFF, /**< The Logical Unit does not conform to any Profile. */ } cdio_mmc_feature_profile_t; /** @param i_feature MMC feature number @return string containing the name of the given feature */ const char *mmc_feature2str( int i_feature ); /** Get drive capabilities for a device. @param p_cdio the CD object to be acted upon. @param p_read_cap list of read capabilities that are set on return @param p_write_cap list of write capabilities that are set on return @param p_misc_cap list of miscellaneous capabilities (that are neither read nor write related) that are set on return */ void mmc_get_drive_cap ( CdIo_t *p_cdio, /*out*/ cdio_drive_read_cap_t *p_read_cap, /*out*/ cdio_drive_write_cap_t *p_write_cap, /*out*/ cdio_drive_misc_cap_t *p_misc_cap); /** Return a string containing the name of the given feature */ const char *mmc_feature_profile2str( int i_feature_profile ); bool mmc_is_disctype_bd(cdio_mmc_feature_profile_t disctype); bool mmc_is_disctype_cdrom(cdio_mmc_feature_profile_t disctype); bool mmc_is_disctype_dvd(cdio_mmc_feature_profile_t disctype); bool mmc_is_disctype_hd_dvd (cdio_mmc_feature_profile_t disctype); bool mmc_is_disctype_overwritable (cdio_mmc_feature_profile_t disctype); bool mmc_is_disctype_rewritable(cdio_mmc_feature_profile_t disctype); /** The default read timeout is 3 minutes. */ #define MMC_READ_TIMEOUT_DEFAULT 3*60*1000 /** Set this to the maximum value in milliseconds that we will wait on an MMC read command. */ extern uint32_t mmc_read_timeout_ms; /** Maps a mmc_sense_key_t into a string name. */ extern const char mmc_sense_key2str[16][40]; /** The default timeout (non-read) is 6 seconds. */ #define MMC_TIMEOUT_DEFAULT 6000 /** Set this to the maximum value in milliseconds that we will wait on an MMC command. */ extern uint32_t mmc_timeout_ms; #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __MMC_UTIL_H__ */ /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/include/cdio/Makefile.am0000644000175000017500000000346411650147110014372 00000000000000# Copyright (C) 2003, 2004, 2006, 2008, 2011 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ######################################################## # Things to make the install (public) libcdio headers ######################################################## # if BUILD_CD_PARANOIA paranoiaheaders = cdda.h cdtext.h endif cdio_config.h: $(top_srcdir)/config.h echo '#ifndef __CDIO_CONFIG_H__' > cdio_config.h echo '#define __CDIO_CONFIG_H__' >> cdio_config.h cat $(top_builddir)/config.h >>cdio_config.h echo '#endif /* #ifndef CDIO_CONFIG_H */' >>cdio_config.h libcdioincludedir=$(includedir)/cdio dist_libcdioinclude_HEADERS = \ audio.h \ bytesex.h \ bytesex_asm.h \ cdio.h \ cdio_unconfig.h \ cd_types.h \ device.h \ disc.h \ ds.h \ dvd.h \ ecma_167.h \ iso9660.h \ logging.h \ mmc.h \ mmc_cmds.h \ mmc_hl_cmds.h \ mmc_ll_cmds.h \ mmc_util.h \ paranoia.h \ posix.h \ read.h \ rock.h \ sector.h \ track.h \ types.h \ udf.h \ udf_file.h \ udf_time.h \ utf8.h \ util.h \ version.h \ xa.h \ $(paranoiaheaders) nodist_libcdioinclude_HEADERS = cdio_config.h EXTRA_DIST = version.h.in BUILT_SOURCES = version.h DISTCLEANFILES = cdio_config.h libcdio-0.83/include/cdio/types.h0000644000175000017500000002100711650121372013646 00000000000000/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2008 Rocky Bernstein Copyright (C) 2000 Herbert Valerio Riedel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** \file types.h * \brief Common type definitions used pervasively in libcdio. */ #ifndef __CDIO_TYPES_H__ #define __CDIO_TYPES_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #ifndef EXTERNAL_LIBCDIO_CONFIG_H #define EXTERNAL_LIBCDIO_CONFIG_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif /* provide some C99 definitions */ #if defined(HAVE_SYS_TYPES_H) #include #endif #if defined(HAVE_STDINT_H) # include #elif defined(HAVE_INTTYPES_H) # include #elif defined(AMIGA) || defined(__linux__) typedef u_int8_t uint8_t; typedef u_int16_t uint16_t; typedef u_int32_t uint32_t; typedef u_int64_t uint64_t; #else /* warning ISO/IEC 9899:1999 was missing and even */ /* fixme */ #endif /* HAVE_STDINT_H */ typedef uint8_t ubyte; /* default HP/UX macros are broken */ #if defined(__hpux__) # undef UINT16_C # undef UINT32_C # undef UINT64_C # undef INT64_C #endif /* if it's still not defined, take a good guess... should work for most 32bit and 64bit archs */ #ifndef UINT16_C # define UINT16_C(c) c ## U #endif #ifndef UINT32_C # if defined (SIZEOF_INT) && SIZEOF_INT == 4 # define UINT32_C(c) c ## U # elif defined (SIZEOF_LONG) && SIZEOF_LONG == 4 # define UINT32_C(c) c ## UL # else # define UINT32_C(c) c ## U # endif #endif #ifndef UINT64_C # if defined (SIZEOF_LONG) && SIZEOF_LONG == 8 # define UINT64_C(c) c ## UL # elif defined (SIZEOF_INT) && SIZEOF_INT == 8 # define UINT64_C(c) c ## U # else # define UINT64_C(c) c ## ULL # endif #endif #ifndef INT64_C # if defined (SIZEOF_LONG) && SIZEOF_LONG == 8 # define INT64_C(c) c ## L # elif defined (SIZEOF_INT) && SIZEOF_INT == 8 # define INT64_C(c) c # else # define INT64_C(c) c ## LL # endif #endif #ifndef __cplusplus # if defined(HAVE_STDBOOL_H) # include # else /* ISO/IEC 9899:1999 missing -- enabling workaround */ # define false 0 # define true 1 # define bool uint8_t # endif /*HAVE_STDBOOL_H*/ #endif /*C++*/ /* some GCC optimizations -- gcc 2.5+ */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) #define GNUC_PRINTF( format_idx, arg_idx ) \ __attribute__((format (printf, format_idx, arg_idx))) #define GNUC_SCANF( format_idx, arg_idx ) \ __attribute__((format (scanf, format_idx, arg_idx))) #define GNUC_FORMAT( arg_idx ) \ __attribute__((format_arg (arg_idx))) #define GNUC_NORETURN \ __attribute__((noreturn)) #define GNUC_CONST \ __attribute__((const)) #define GNUC_UNUSED \ __attribute__((unused)) #define GNUC_PACKED \ __attribute__((packed)) #else /* !__GNUC__ */ #define GNUC_PRINTF( format_idx, arg_idx ) #define GNUC_SCANF( format_idx, arg_idx ) #define GNUC_FORMAT( arg_idx ) #define GNUC_NORETURN #define GNUC_CONST #define GNUC_UNUSED #define GNUC_PACKED #endif /* !__GNUC__ */ #if defined(__GNUC__) /* for GCC we try to use GNUC_PACKED */ # define PRAGMA_BEGIN_PACKED # define PRAGMA_END_PACKED #elif defined(HAVE_ISOC99_PRAGMA) /* should work with most EDG-frontend based compilers */ # define PRAGMA_BEGIN_PACKED _Pragma("pack(1)") # define PRAGMA_END_PACKED _Pragma("pack()") #else /* neither gcc nor _Pragma() available... */ /* ...so let's be naive and hope the regression testsuite is run... */ # define PRAGMA_BEGIN_PACKED # define PRAGMA_END_PACKED #endif /* * user directed static branch prediction gcc 2.96+ */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 95) # define GNUC_LIKELY(x) __builtin_expect((x),true) # define GNUC_UNLIKELY(x) __builtin_expect((x),false) #else # define GNUC_LIKELY(x) (x) # define GNUC_UNLIKELY(x) (x) #endif #ifndef NULL # define NULL ((void*) 0) #endif /* our own offsetof()-like macro */ #define __cd_offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) /*! \brief MSF (minute/second/frame) structure One CD-ROMs addressing scheme especially used in audio formats (Red Book) is an address by minute, sector and frame which BCD-encoded in three bytes. An alternative format is an lba_t. Note: the fields in this structure are BCD encoded. Use cdio_to_bcd8() or cdio_from_bcd8() to convert an integer into or out of this format. The format specifier %x (not %d) can be used if you need to format or print values in this structure. @see lba_t */ PRAGMA_BEGIN_PACKED struct msf_s { uint8_t m, s, f; /* BCD encoded! */ } GNUC_PACKED; PRAGMA_END_PACKED typedef struct msf_s msf_t; #define msf_t_SIZEOF 3 /*! \brief UTF-8 char definition Type to denote UTF-8 strings. */ typedef char cdio_utf8_t; typedef enum { nope = 0, yep = 1, dunno = 2 } bool_3way_t; /* type used for bit-fields in structs (1 <= bits <= 8) */ #if defined(__GNUC__) /* this is strict ISO C99 which allows only 'unsigned int', 'signed int' and '_Bool' explicitly as bit-field type */ typedef unsigned int bitfield_t; #else /* other compilers might increase alignment requirements to match the 'unsigned int' type -- fixme: find out how unalignment accesses can be pragma'ed on non-gcc compilers */ typedef uint8_t bitfield_t; #endif /*! The type of a Logical Block Address. We allow for an lba to be negative to be consistent with an lba, although I'm not sure this this is possible. */ typedef int32_t lba_t; /*! The type of a Logical Sector Number. Note that an lba can be negative and the MMC3 specs allow for a conversion of a negative lba. @see msf_t */ typedef int32_t lsn_t; /* Address in either MSF or logical format */ union cdio_cdrom_addr { msf_t msf; lba_t lba; }; /*! The type of a track number 0..99. */ typedef uint8_t track_t; /*! The type of a session number 0..99. */ typedef uint8_t session_t; /*! Constant for invalid session number */ #define CDIO_INVALID_SESSION 0xFF /*! Constant for invalid LBA. It is 151 less than the most negative LBA -45150. This provide slack for the 150-frame offset in LBA to LSN 150 conversions */ #define CDIO_INVALID_LBA -45301 /*! Constant for invalid LSN */ #define CDIO_INVALID_LSN CDIO_INVALID_LBA /*! Number of ASCII bytes in a media catalog number (MCN). We include an extra 0 byte so these can be used as C strings. */ #define CDIO_MCN_SIZE 13 /*! Type to hold ASCII bytes in a media catalog number (MCN). We include an extra 0 byte so these can be used as C strings. */ typedef char cdio_mcn_t[CDIO_MCN_SIZE+1]; /*! Number of ASCII bytes in International Standard Recording Codes (ISRC) */ #define CDIO_ISRC_SIZE 12 /*! Type to hold ASCII bytes in a ISRC. We include an extra 0 byte so these can be used as C strings. */ typedef char cdio_isrc_t[CDIO_ISRC_SIZE+1]; typedef int cdio_fs_anal_t; /*! track flags Q Sub-channel Control Field (4.2.3.3) */ typedef enum { CDIO_TRACK_FLAG_NONE = 0x00, /**< no flags set */ CDIO_TRACK_FLAG_PRE_EMPHASIS = 0x01, /**< audio track recorded with pre-emphasis */ CDIO_TRACK_FLAG_COPY_PERMITTED = 0x02, /**< digital copy permitted */ CDIO_TRACK_FLAG_DATA = 0x04, /**< data track */ CDIO_TRACK_FLAG_FOUR_CHANNEL_AUDIO = 0x08, /**< 4 audio channels */ CDIO_TRACK_FLAG_SCMS = 0x10 /**< SCMS (5.29.2.7) */ } cdio_track_flag; #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __CDIO_TYPES_H__ */ /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/include/cdio/cdio.h0000644000175000017500000000415111313260160013414 00000000000000/* -*- c -*- Copyright (C) 2003, 2004, 2005, 2008, 2009 Rocky Bernstein Copyright (C) 2001 Herbert Valerio Riedel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** \file cdio.h * * \brief The top-level header for libcdio: the CD Input and Control * library. Applications include this for anything regarding libcdio. */ #ifndef __CDIO_H__ #define __CDIO_H__ /** Application Interface or Protocol version number. If the public * interface changes, we increase this number. */ #define CDIO_API_VERSION 5 #include #include #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* For compatibility. */ #define CdIo CdIo_t /** This is an opaque structure for the CD object. */ typedef struct _CdIo CdIo_t; /** This is an opaque structure for the CD-Text object. */ typedef struct cdtext cdtext_t; #ifdef __cplusplus } #endif /* __cplusplus */ /* Drive(r)/Device-related functions. Perhaps we should break out Driver from device? */ #include /* Disc-related functions. */ #include /* Sector (frame, or block)-related functions. Uses driver_return_code_t from so it should come after that. */ #include /* CD-Text-related functions. */ #include /* Track-related functions. */ #include #endif /* __CDIO_H__ */ libcdio-0.83/include/cdio/bytesex.h0000644000175000017500000001532211114145233014165 00000000000000/* $Id: bytesex.h,v 1.5 2008/03/25 15:59:08 karl Exp $ Copyright (C) 2000, 2004 Herbert Valerio Riedel Copyright (C) 2005, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** \file bytesex.h * \brief Generic Byte-swapping routines. * * Note: this header will is slated to get removed and libcdio will * use glib.h routines instead. */ #ifndef __CDIO_BYTESEX_H__ #define __CDIO_BYTESEX_H__ #include #include #include /** 16-bit big-endian to little-endian */ #define UINT16_SWAP_LE_BE_C(val) ((uint16_t) ( \ (((uint16_t) (val) & (uint16_t) 0x00ffU) << 8) | \ (((uint16_t) (val) & (uint16_t) 0xff00U) >> 8))) /** 32-bit big-endian to little-endian */ #define UINT32_SWAP_LE_BE_C(val) ((uint32_t) ( \ (((uint32_t) (val) & (uint32_t) 0x000000ffU) << 24) | \ (((uint32_t) (val) & (uint32_t) 0x0000ff00U) << 8) | \ (((uint32_t) (val) & (uint32_t) 0x00ff0000U) >> 8) | \ (((uint32_t) (val) & (uint32_t) 0xff000000U) >> 24))) /** 64-bit big-endian to little-endian */ #define UINT64_SWAP_LE_BE_C(val) ((uint64_t) ( \ (((uint64_t) (val) & (uint64_t) UINT64_C(0x00000000000000ff)) << 56) | \ (((uint64_t) (val) & (uint64_t) UINT64_C(0x000000000000ff00)) << 40) | \ (((uint64_t) (val) & (uint64_t) UINT64_C(0x0000000000ff0000)) << 24) | \ (((uint64_t) (val) & (uint64_t) UINT64_C(0x00000000ff000000)) << 8) | \ (((uint64_t) (val) & (uint64_t) UINT64_C(0x000000ff00000000)) >> 8) | \ (((uint64_t) (val) & (uint64_t) UINT64_C(0x0000ff0000000000)) >> 24) | \ (((uint64_t) (val) & (uint64_t) UINT64_C(0x00ff000000000000)) >> 40) | \ (((uint64_t) (val) & (uint64_t) UINT64_C(0xff00000000000000)) >> 56))) #ifndef UINT16_SWAP_LE_BE # define UINT16_SWAP_LE_BE UINT16_SWAP_LE_BE_C #endif #ifndef UINT32_SWAP_LE_BE # define UINT32_SWAP_LE_BE UINT32_SWAP_LE_BE_C #endif #ifndef UINT64_SWAP_LE_BE # define UINT64_SWAP_LE_BE UINT64_SWAP_LE_BE_C #endif inline static uint16_t uint16_swap_le_be (const uint16_t val) { return UINT16_SWAP_LE_BE (val); } inline static uint32_t uint32_swap_le_be (const uint32_t val) { return UINT32_SWAP_LE_BE (val); } inline static uint64_t uint64_swap_le_be (const uint64_t val) { return UINT64_SWAP_LE_BE (val); } # define UINT8_TO_BE(val) ((uint8_t) (val)) # define UINT8_TO_LE(val) ((uint8_t) (val)) #ifdef WORDS_BIGENDIAN # define UINT16_TO_BE(val) ((uint16_t) (val)) # define UINT16_TO_LE(val) ((uint16_t) UINT16_SWAP_LE_BE(val)) # define UINT32_TO_BE(val) ((uint32_t) (val)) # define UINT32_TO_LE(val) ((uint32_t) UINT32_SWAP_LE_BE(val)) # define UINT64_TO_BE(val) ((uint64_t) (val)) # define UINT64_TO_LE(val) ((uint64_t) UINT64_SWAP_LE_BE(val)) #else # define UINT16_TO_BE(val) ((uint16_t) UINT16_SWAP_LE_BE(val)) # define UINT16_TO_LE(val) ((uint16_t) (val)) # define UINT32_TO_BE(val) ((uint32_t) UINT32_SWAP_LE_BE(val)) # define UINT32_TO_LE(val) ((uint32_t) (val)) # define UINT64_TO_BE(val) ((uint64_t) UINT64_SWAP_LE_BE(val)) # define UINT64_TO_LE(val) ((uint64_t) (val)) #endif /** symmetric conversions */ #define UINT8_FROM_BE(val) (UINT8_TO_BE (val)) #define UINT8_FROM_LE(val) (UINT8_TO_LE (val)) #define UINT16_FROM_BE(val) (UINT16_TO_BE (val)) #define UINT16_FROM_LE(val) (UINT16_TO_LE (val)) #define UINT32_FROM_BE(val) (UINT32_TO_BE (val)) #define UINT32_FROM_LE(val) (UINT32_TO_LE (val)) #define UINT64_FROM_BE(val) (UINT64_TO_BE (val)) #define UINT64_FROM_LE(val) (UINT64_TO_LE (val)) /** converter function template */ #define CVT_TO_FUNC(bits) \ static inline uint ## bits ## _t \ uint ## bits ## _to_be (uint ## bits ## _t val) \ { return UINT ## bits ## _TO_BE (val); } \ static inline uint ## bits ## _t \ uint ## bits ## _to_le (uint ## bits ## _t val) \ { return UINT ## bits ## _TO_LE (val); } \ CVT_TO_FUNC(8) CVT_TO_FUNC(16) CVT_TO_FUNC(32) CVT_TO_FUNC(64) #undef CVT_TO_FUNC #define uint8_from_be(val) (uint8_to_be (val)) #define uint8_from_le(val) (uint8_to_le (val)) #define uint16_from_be(val) (uint16_to_be (val)) #define uint16_from_le(val) (uint16_to_le (val)) #define uint32_from_be(val) (uint32_to_be (val)) #define uint32_from_le(val) (uint32_to_le (val)) #define uint64_from_be(val) (uint64_to_be (val)) #define uint64_from_le(val) (uint64_to_le (val)) /** ISO9660-related field conversion routines */ /** Convert from uint8_t to ISO 9660 7.1.1 format */ #define to_711(i) uint8_to_le(i) /** Convert from ISO 9660 7.1.1 format to uint8_t */ #define from_711(i) uint8_from_le(i) /** Convert from uint16_t to ISO 9669 7.2.1 format */ #define to_721(i) uint16_to_le(i) /** Convert from ISO 9660 7.2.1 format to uint16_t */ #define from_721(i) uint16_from_le(i) /** Convert from uint16_t to ISO 9669 7.2.2 format */ #define to_722(i) uint16_to_be(i) /** Convert from ISO 9660 7.2.2 format to uint16_t */ #define from_722(i) uint16_from_be(i) /** Convert from uint16_t to ISO 9669 7.2.3 format */ static inline uint32_t to_723(uint16_t i) { return uint32_swap_le_be(i) | i; } /** Convert from ISO 9660 7.2.3 format to uint16_t */ static inline uint16_t from_723 (uint32_t p) { if (uint32_swap_le_be (p) != p) cdio_warn ("from_723: broken byte order"); return (0xFFFF & p); } /** Convert from uint16_t to ISO 9669 7.3.1 format */ #define to_731(i) uint32_to_le(i) /** Convert from ISO 9660 7.3.1 format to uint32_t */ #define from_731(i) uint32_from_le(i) /** Convert from uint32_t to ISO 9669 7.3.2 format */ #define to_732(i) uint32_to_be(i) /** Convert from ISO 9660 7.3.2 format to uint32_t */ #define from_732(i) uint32_from_be(i) /** Convert from uint16_t to ISO 9669 7.3.3 format */ static inline uint64_t to_733(uint32_t i) { return uint64_swap_le_be(i) | i; } /** Convert from ISO 9660 7.3.3 format to uint32_t */ static inline uint32_t from_733 (uint64_t p) { if (uint64_swap_le_be (p) != p) cdio_warn ("from_733: broken byte order"); return (UINT32_C(0xFFFFFFFF) & p); } #endif /* __CDIO_BYTESEX_H__ */ /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/include/cdio/cd_types.h0000644000175000017500000001471511114145233014321 00000000000000/* $Id: cd_types.h,v 1.18 2008/03/25 15:59:08 karl Exp $ Copyright (C) 2003, 2006, 2008 Rocky Bernstein Copyright (C) 1996,1997,1998 Gerd Knorr and Heiko Eifeldt This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** \file cd_types.h * \brief Header for routines which automatically determine the Compact Disc * format and possibly filesystem on the CD. * */ #ifndef __CDIO_CD_TYPES_H__ #define __CDIO_CD_TYPES_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** * Filesystem types we understand. The highest-numbered fs type should * be less than CDIO_FS_MASK defined below. */ typedef enum { CDIO_FS_AUDIO = 1, /**< audio only - not really a filesystem */ CDIO_FS_HIGH_SIERRA = 2, /**< High-Sierra Filesystem */ CDIO_FS_ISO_9660 = 3, /**< ISO 9660 filesystem */ CDIO_FS_INTERACTIVE = 4, CDIO_FS_HFS = 5, /**< file system used on the Macintosh system in MacOS 6 through MacOS 9 and deprecated in OSX. */ CDIO_FS_UFS = 6, /**< Generic Unix file system derived from the Berkeley fast file system. */ /**< * EXT2 was the GNU/Linux native filesystem for early kernels. Newer * GNU/Linux OS's may use EXT3 which is EXT2 with a journal. */ CDIO_FS_EXT2 = 7, CDIO_FS_ISO_HFS = 8, /**< both HFS & ISO-9660 filesystem */ CDIO_FS_ISO_9660_INTERACTIVE = 9, /**< both CD-RTOS and ISO filesystem */ /**< * The 3DO is, technically, a set of specifications created by the 3DO * company. These specs are for making a 3DO Interactive Multiplayer * which uses a CD-player. Panasonic in the early 90's was the first * company to manufacture and market a 3DO player. */ CDIO_FS_3DO = 10, /**< Microsoft X-BOX CD. */ CDIO_FS_XISO = 11, CDIO_FS_UDFX = 12, CDIO_FS_UDF = 13, CDIO_FS_ISO_UDF = 14 } cdio_fs_t; /** * Macro to extract just the FS type portion defined above */ #define CDIO_FSTYPE(fs) (fs & CDIO_FS_MASK) /** * Bit masks for the classes of CD-images. These are generally * higher-level than the fs-type information above and may be determined * based of the fs type information. This */ typedef enum { CDIO_FS_MASK = 0x000f, /**< Note: this should be 2**n-1 and and greater than the highest CDIO_FS number above */ CDIO_FS_ANAL_XA = 0x00010, /**< eXtended Architecture format */ CDIO_FS_ANAL_MULTISESSION = 0x00020, /**< CD has multisesion */ CDIO_FS_ANAL_PHOTO_CD = 0x00040, /**< Is a Kodak Photo CD */ CDIO_FS_ANAL_HIDDEN_TRACK = 0x00080, /**< Hidden track at the beginning of the CD */ CDIO_FS_ANAL_CDTV = 0x00100, CDIO_FS_ANAL_BOOTABLE = 0x00200, /**< CD is bootable */ CDIO_FS_ANAL_VIDEOCD = 0x00400, /**< VCD 1.1 */ CDIO_FS_ANAL_ROCKRIDGE = 0x00800, /**< Has Rock Ridge Extensions to ISO 9660, */ CDIO_FS_ANAL_JOLIET = 0x01000, /**< Microsoft Joliet extensions to ISO 9660, */ CDIO_FS_ANAL_SVCD = 0x02000, /**< Super VCD or Choiji Video CD */ CDIO_FS_ANAL_CVD = 0x04000, /**< Choiji Video CD */ CDIO_FS_ANAL_XISO = 0x08000, /**< XBOX CD */ CDIO_FS_ANAL_ISO9660_ANY = 0x10000, /**< Any sort fo ISO9660 FS */ CDIO_FS_ANAL_VCD_ANY = (CDIO_FS_ANAL_VIDEOCD|CDIO_FS_ANAL_SVCD| CDIO_FS_ANAL_CVD), CDIO_FS_MATCH_ALL = ~CDIO_FS_MASK /**< bitmask which can be used by cdio_get_devices to specify matching any sort of CD. */ } cdio_fs_cap_t; #define CDIO_FS_UNKNOWN CDIO_FS_MASK /** * */ #define CDIO_FS_MATCH_ALL (cdio_fs_anal_t) (~CDIO_FS_MASK) /*! \brief The type used to return analysis information from cdio_guess_cd_type. These fields make sense only for when an ISO-9660 filesystem is used. */ typedef struct { unsigned int joliet_level; /**< If has Joliet extensions, this is the associated level number (i.e. 1, 2, or 3). */ char iso_label[33]; /**< This is 32 + 1 for null byte at the end in formatting the string */ unsigned int isofs_size; uint8_t UDFVerMinor; /**< For UDF filesystems only */ uint8_t UDFVerMajor; /**< For UDF filesystems only */ } cdio_iso_analysis_t; /** * Try to determine what kind of CD-image and/or filesystem we * have at track track_num. Return information about the CD image * is returned in iso_analysis and the return value. */ cdio_fs_anal_t cdio_guess_cd_type(const CdIo_t *cdio, int start_session, track_t track_num, /*out*/ cdio_iso_analysis_t *iso_analysis); #ifdef __cplusplus } #endif /* __cplusplus */ /** The below variables are trickery to force the above enum symbol values to be recorded in debug symbol tables. They are used to allow one to refer to the enumeration value names in the typedefs above in a debugger and debugger expressions. */ extern cdio_fs_cap_t debug_cdio_fs_cap; extern cdio_fs_t debug_cdio_fs; #endif /* __CDIO_CD_TYPES_H__ */ /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/include/cdio/ecma_167.h0000644000175000017500000007270211114145233014011 00000000000000/* Copyright (c) 2005, 2006, 2008 Rocky Bernstein Copyright (c) 2001-2002 Ben Fennema This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* * Some portions taken from FreeBSD ecma167-udf.h which states: * Copyright (c) 2001, 2002 Scott Long * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /*! * \file ecma_167.h * * \brief Definitions based on ECMA-167 3rd edition (June 1997) * See http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-167.pdf */ #ifndef _ECMA_167_H #define _ECMA_167_H 1 #include /** Imagine the below enum values as \#define'd values rather than distinct values of an enum. */ typedef enum { VSD_STD_ID_SIZE = 5, /** Volume Structure Descriptor (ECMA 167r3 2/9.1) */ UDF_REGID_ID_SIZE = 23, /**< See identifier (ECMA 167r3 1/7.4) */ UDF_VOLID_SIZE = 32, UDF_FID_SIZE = 38, UDF_VOLSET_ID_SIZE = 128 } ecma_167_enum1_t ; /** Tag Identifier (ECMA 167r3 3/7.2.1) */ typedef enum { TAGID_PRI_VOL = 0x0001, TAGID_ANCHOR = 0x0002, TAGID_VOL = 0x0003, TAGID_IMP_VOL = 0x0004, TAGID_PARTITION = 0x0005, TAGID_LOGVOL = 0x0006, TAGID_UNALLOC_SPACE = 0x0007, TAGID_TERM = 0x0008, TAGID_LOGVOL_INTEGRITY = 0x0009, TAGID_FSD = 0x0100, TAGID_FID = 0x0101, TAGID_AED = 0x0102, TAGID_IE = 0x0103, TAGID_TE = 0x0104, TAGID_FILE_ENTRY = 0x0105, TAGID_EAHD = 0x0106, TAGID_USE = 0x0107, TAGID_SBD = 0x0108, TAGID_PIE = 0x0109, TAGID_EFE = 0x010A, } tag_id_t ; /** Character Set Type (ECMA 167r3 1/7.2.1.1) */ typedef enum { CHARSPEC_TYPE_CS0 = 0x00, /**< Section 1/7.2.2 */ CHARSPEC_TYPE_CS1 = 0x01, /**< Section 1/7.2.3 */ CHARSPEC_TYPE_CS2 = 0x02, /**< Section 1/7.2.4 */ CHARSPEC_TYPE_CS3 = 0x03, /**< Section 1/7.2.5 */ CHARSPEC_TYPE_CS4 = 0x04, /**< Section 1/7.2.6 */ CHARSPEC_TYPE_CS5 = 0x05, /**< Section 1/7.2.7 */ CHARSPEC_TYPE_CS6 = 0x06, /**< Section 1/7.2.8 */ CHARSPEC_TYPE_CS7 = 0x07, /**< Section 1/7.2.9 */ CHARSPEC_TYPE_CS8 = 0x08, /**< Section 1/7.2.10 */ } udf_charspec_enum_t; typedef uint8_t udf_Uint8_t; /*! Section 1/7/1.1 */ typedef uint16_t udf_Uint16_t; /*! Section 1/7.1.3 */ typedef uint32_t udf_Uint32_t; /*! Section 1/7.1.5 */ typedef uint64_t udf_Uint64_t; /*! Section 1/7.1.7 */ typedef char udf_dstring; /*! Section 1/7.1.12 */ #define UDF_LENGTH_MASK 0x3fffffff PRAGMA_BEGIN_PACKED /** Character set specification (ECMA 167r3 1/7.2.1) */ struct udf_charspec_s { udf_Uint8_t charset_type; udf_Uint8_t charset_info[63]; } GNUC_PACKED; typedef struct udf_charspec_s udf_charspec_t; /** Timestamp (ECMA 167r3 1/7.3) */ struct udf_timestamp_s { udf_Uint16_t type_tz; udf_Uint16_t year; udf_Uint8_t month; udf_Uint8_t day; udf_Uint8_t hour; udf_Uint8_t minute; udf_Uint8_t second; udf_Uint8_t centiseconds; udf_Uint8_t hundreds_of_microseconds; udf_Uint8_t microseconds; } GNUC_PACKED; typedef struct udf_timestamp_s udf_timestamp_t; /** Type and Time Zone (ECMA 167r3 1/7.3.1) Imagine the below enum values as \#define'd values rather than distinct values of an enum. */ typedef enum { TIMESTAMP_TYPE_CUT = 0x0000, TIMESTAMP_TYPE_LOCAL = 0x1000, TIMESTAMP_TYPE_AGREEMENT = 0x2000, TIMESTAMP_TYPE_MASK = 0xF000, TIMESTAMP_TIMEZONE_MASK = 0x0FFF, } ecma_167_timezone_enum_t ; #define TIMESTAMP_TYPE_MASK 0xF000 #define TIMESTAMP_TYPE_CUT 0x0000 #define TIMESTAMP_TYPE_LOCAL 0x1000 #define TIMESTAMP_TYPE_AGREEMENT 0x2000 #define TIMESTAMP_TIMEZONE_MASK 0x0FFF struct udf_id_suffix_s { udf_Uint16_t udf_revision; udf_Uint8_t os_class; udf_Uint8_t os_identifier; udf_Uint8_t reserved[4]; } GNUC_PACKED; typedef struct udf_id_suffix_s udf_id_suffix_t; /** Entity identifier (ECMA 167r3 1/7.4) */ struct udf_regid_s { udf_Uint8_t flags; udf_Uint8_t id[UDF_REGID_ID_SIZE]; udf_id_suffix_t id_suffix; } GNUC_PACKED; typedef struct udf_regid_s udf_regid_t; /** Flags (ECMA 167r3 1/7.4.1) */ #define ENTITYID_FLAGS_DIRTY 0x00 #define ENTITYID_FLAGS_PROTECTED 0x01 /** Volume Structure Descriptor (ECMA 167r3 2/9.1) */ struct vol_struct_desc_s { udf_Uint8_t struct_type; udf_Uint8_t std_id[VSD_STD_ID_SIZE]; udf_Uint8_t struct_version; udf_Uint8_t struct_data[2041]; } GNUC_PACKED; /** Standard Identifier (EMCA 167r2 2/9.1.2) */ #define VSD_STD_ID_NSR02 "NSR02" /* (3/9.1) */ /** Standard Identifier (ECMA 167r3 2/9.1.2) */ /* The below const definitions are to faciltate debugging of the values #define'd below. */ extern const char VSD_STD_ID_BEA01[sizeof("BEA01")-1]; extern const char VSD_STD_ID_BOOT2[sizeof("BOOT2")-1]; extern const char VSD_STD_ID_CD001[sizeof("CD001")-1]; extern const char VSD_STD_ID_CDW01[sizeof("CDW02")-1]; extern const char VSD_STD_ID_NSR03[sizeof("NSR03")-1]; extern const char VSD_STD_ID_TEA01[sizeof("TEA01")-1]; #define VSD_STD_ID_BEA01 "BEA01" /**< ECMA-167 2/9.2 */ #define VSD_STD_ID_BOOT2 "BOOT2" /**< ECMA-167 2/9.4 */ #define VSD_STD_ID_CD001 "CD001" /**< ECMA-119 */ #define VSD_STD_ID_CDW02 "CDW02" /**< ECMA-168 */ #define VSD_STD_ID_NSR02 "NSR02" /**< ECMA-167, 3/9.1 NOTE: ECMA-167, 2nd edition */ #define VSD_STD_ID_NSR03 "NSR03" /**< ECMA-167 3/9.1 */ #define VSD_STD_ID_TEA01 "TEA01" /**< ECMA-168 2/9.3 */ /** Beginning Extended Area Descriptor (ECMA 167r3 2/9.2) */ struct beginning_extended_area_desc_s { udf_Uint8_t struct_type; udf_Uint8_t std_id[VSD_STD_ID_SIZE]; udf_Uint8_t struct_version; udf_Uint8_t struct_data[2041]; } GNUC_PACKED; /** Terminating Extended Area Descriptor (ECMA 167r3 2/9.3) */ struct terminating_extended_area_desc_s { udf_Uint8_t struct_type; udf_Uint8_t std_id[VSD_STD_ID_SIZE]; udf_Uint8_t struct_version; udf_Uint8_t struct_data[2041]; } GNUC_PACKED; /** Boot Descriptor (ECMA 167r3 2/9.4) */ struct boot_desc_s { udf_Uint8_t struct_type; udf_Uint8_t std_ident[VSD_STD_ID_SIZE]; udf_Uint8_t struct_version; udf_Uint8_t reserved1; udf_regid_t arch_type; udf_regid_t boot_ident; udf_Uint32_t bool_ext_location; udf_Uint32_t bool_ext_length; udf_Uint64_t load_address; udf_Uint64_t start_address; udf_timestamp_t desc_creation_time; udf_Uint16_t flags; udf_Uint8_t reserved2[32]; udf_Uint8_t boot_use[1906]; } GNUC_PACKED; /** Flags (ECMA 167r3 2/9.4.12) */ #define BOOT_FLAGS_ERASE 0x01 /** Extent Descriptor (ECMA 167r3 3/7.1) */ struct udf_extent_ad_s { udf_Uint32_t len; udf_Uint32_t loc; } GNUC_PACKED; typedef struct udf_extent_ad_s udf_extent_ad_t; /** Descriptor Tag (ECMA 167r3 3/7.2) */ struct udf_tag_s { udf_Uint16_t id; udf_Uint16_t desc_version; udf_Uint8_t cksum; udf_Uint8_t reserved; udf_Uint16_t i_serial; udf_Uint16_t desc_CRC; udf_Uint16_t desc_CRC_len; udf_Uint32_t loc; } GNUC_PACKED; typedef struct udf_tag_s udf_tag_t; /** NSR Descriptor (ECMA 167r3 3/9.1) */ struct NSR_desc_s { udf_Uint8_t struct_type; udf_Uint8_t std_id[VSD_STD_ID_SIZE]; udf_Uint8_t struct_version; udf_Uint8_t reserved; udf_Uint8_t struct_data[2040]; } GNUC_PACKED; /** Primary Volume Descriptor (ECMA 167r3 3/10.1) */ struct udf_pvd_s { udf_tag_t tag; udf_Uint32_t vol_desc_seq_num; udf_Uint32_t primary_vol_desc_num; udf_dstring vol_ident[UDF_VOLID_SIZE]; udf_Uint16_t vol_seq_num; udf_Uint16_t max_vol_seqnum; udf_Uint16_t interchange_lvl; udf_Uint16_t max_interchange_lvl; udf_Uint32_t charset_list; udf_Uint32_t max_charset_list; udf_dstring volset_id[UDF_VOLSET_ID_SIZE]; udf_charspec_t desc_charset; udf_charspec_t explanatory_charset; udf_extent_ad_t vol_abstract; udf_extent_ad_t vol_copyright; udf_regid_t app_ident; udf_timestamp_t recording_time; udf_regid_t imp_ident; udf_Uint8_t imp_use[64]; udf_Uint32_t predecessor_vol_desc_seq_location; udf_Uint16_t flags; udf_Uint8_t reserved[22]; } GNUC_PACKED; typedef struct udf_pvd_s udf_pvd_t; /** Flags (ECMA 167r3 3/10.1.21) */ #define PVD_FLAGS_VSID_COMMON 0x0001 /** Anchor Volume Descriptor Pointer (ECMA 167r3 3/10.2) */ struct anchor_vol_desc_ptr_s { udf_tag_t tag; udf_extent_ad_t main_vol_desc_seq_ext; udf_extent_ad_t reserve_vol_desc_seq_ext; udf_Uint8_t reserved[480]; } GNUC_PACKED; typedef struct anchor_vol_desc_ptr_s anchor_vol_desc_ptr_t; /** Volume Descriptor Pointer (ECMA 167r3 3/10.3) */ struct vol_desc_ptr_s { udf_tag_t tag; udf_Uint32_t vol_desc_seq_num; udf_extent_ad_t next_vol_desc_set_ext; udf_Uint8_t reserved[484]; } GNUC_PACKED; /** Implementation Use Volume Descriptor (ECMA 167r3 3/10.4) */ struct imp_use_vol_desc_s { udf_tag_t tag; udf_Uint32_t vol_desc_seq_num; udf_regid_t imp_id; udf_Uint8_t imp_use[460]; } GNUC_PACKED; /** Partition Descriptor (ECMA 167r3 3/10.5) */ struct partition_desc_s { udf_tag_t tag; udf_Uint32_t vol_desc_seq_num; udf_Uint16_t flags; udf_Uint16_t number; /**< Partition number */ udf_regid_t contents; udf_Uint8_t contents_use[128]; udf_Uint32_t access_type; udf_Uint32_t start_loc; udf_Uint32_t part_len; udf_regid_t imp_id; udf_Uint8_t imp_use[128]; udf_Uint8_t reserved[156]; } GNUC_PACKED; typedef struct partition_desc_s partition_desc_t; /** Partition Flags (ECMA 167r3 3/10.5.3) */ #define PD_PARTITION_FLAGS_ALLOC 0x0001 /** Partition Contents (ECMA 167r2 3/10.5.3) */ #define PD_PARTITION_CONTENTS_NSR02 "+NSR02" /** Partition Contents (ECMA 167r3 3/10.5.5) */ #define PD_PARTITION_CONTENTS_FDC01 "+FDC01" #define PD_PARTITION_CONTENTS_CD001 "+CD001" #define PD_PARTITION_CONTENTS_CDW02 "+CDW02" #define PD_PARTITION_CONTENTS_NSR03 "+NSR03" /** Access Type (ECMA 167r3 3/10.5.7) */ #define PD_ACCESS_TYPE_NONE 0x00000000 #define PD_ACCESS_TYPE_READ_ONLY 0x00000001 #define PD_ACCESS_TYPE_WRITE_ONCE 0x00000002 #define PD_ACCESS_TYPE_REWRITABLE 0x00000003 #define PD_ACCESS_TYPE_OVERWRITABLE 0x00000004 /** Recorded Address (ECMA 167r3 4/7.1) */ struct udf_lb_addr_s { udf_Uint32_t lba; udf_Uint16_t partitionReferenceNum; } GNUC_PACKED; typedef struct udf_lb_addr_s udf_lb_addr_t; /** Short Allocation Descriptor (ECMA 167r3 4/14.14.1) */ struct udf_short_ad_s { udf_Uint32_t len; udf_Uint32_t pos; } GNUC_PACKED; typedef struct udf_short_ad_s udf_short_ad_t; /** Long Allocation Descriptor (ECMA 167r3 4/14.14.2) */ struct udf_long_ad_s { udf_Uint32_t len; udf_lb_addr_t loc; udf_Uint8_t imp_use[6]; } GNUC_PACKED; typedef struct udf_long_ad_s udf_long_ad_t; /** Logical Volume Descriptor (ECMA 167r3 3/10.6) */ struct logical_vol_desc_s { udf_tag_t tag; udf_Uint32_t seq_num; udf_charspec_t desc_charset; udf_dstring logvol_id[128]; udf_Uint32_t logical_blocksize; udf_regid_t domain_id; union { udf_long_ad_t fsd_loc; udf_Uint8_t logvol_content_use[16]; } lvd_use; udf_Uint8_t logvol_contents_use[16]; udf_Uint32_t maptable_len; udf_Uint32_t i_partition_maps; udf_regid_t imp_id; udf_Uint8_t imp_use[128]; udf_extent_ad_t integrity_seq_ext; udf_Uint8_t partition_maps[0]; } GNUC_PACKED; typedef struct logical_vol_desc_s logical_vol_desc_t; /** Generic Partition Map (ECMA 167r3 3/10.7.1) */ struct generic_partition_map { udf_Uint8_t partition_map_type; udf_Uint8_t partition_map_length; udf_Uint8_t partition_mapping[0]; } GNUC_PACKED; /** Partition Map Type (ECMA 167r3 3/10.7.1.1) */ #define GP_PARTITION_MAP_TYPE_UNDEF 0x00 #define GP_PARTIITON_MAP_TYPE_1 0x01 #define GP_PARTITION_MAP_TYPE_2 0x02 /** Type 1 Partition Map (ECMA 167r3 3/10.7.2) */ struct generic_partition_map1 { udf_Uint8_t partition_map_type; udf_Uint8_t partition_map_length; udf_Uint16_t vol_seq_num; udf_Uint16_t i_partition; } GNUC_PACKED; /** Type 2 Partition Map (ECMA 167r3 3/10.7.3) */ struct generic_partition_map2 { udf_Uint8_t partition_map_type; udf_Uint8_t partition_map_length; udf_Uint8_t partition_id[62]; } GNUC_PACKED; /** Unallocated Space Descriptor (ECMA 167r3 3/10.8) */ struct unalloc_space_desc_s { udf_tag_t tag; udf_Uint32_t vol_desc_seq_num; udf_Uint32_t i_alloc_descs; udf_extent_ad_t allocDescs[0]; } GNUC_PACKED; /** Terminating Descriptor (ECMA 167r3 3/10.9) */ struct terminating_desc_s { udf_tag_t tag; udf_Uint8_t reserved[496]; } GNUC_PACKED; /** Logical Volume Integrity Descriptor (ECMA 167r3 3/10.10) */ struct logvol_integrity_desc_s { udf_tag_t tag; udf_timestamp_t recording_time; udf_Uint32_t integrity_type; udf_extent_ad_t next_integrity_ext; udf_Uint8_t logvol_contents_use[32]; udf_Uint32_t i_partitions; udf_Uint32_t imp_use_len; udf_Uint32_t freespace_table[0]; udf_Uint32_t size_table[0]; udf_Uint8_t imp_use[0]; } GNUC_PACKED; /** Integrity Type (ECMA 167r3 3/10.10.3) */ #define LVID_INTEGRITY_TYPE_OPEN 0x00000000 #define LVID_INTEGRITY_TYPE_CLOSE 0x00000001 /** Extended Allocation Descriptor (ECMA 167r3 4/14.14.3) */ struct udf_ext_ad_s { udf_Uint32_t len; udf_Uint32_t recorded_len; udf_Uint32_t information_len; udf_lb_addr_t ext_loc; } GNUC_PACKED; typedef struct udf_ext_ad_s udf_ext_ad_t; /** Descriptor Tag (ECMA 167r3 4/7.2 - See 3/7.2) */ /** Tag Identifier (ECMA 167r3 4/7.2.1) */ /** File Set Descriptor (ECMA 167r3 4/14.1) */ struct udf_fsd_s { udf_tag_t tag; udf_timestamp_t recording_time; udf_Uint16_t interchange_lvl; udf_Uint16_t maxInterchange_lvl; udf_Uint32_t charset_list; udf_Uint32_t max_charset_list; udf_Uint32_t fileset_num; udf_Uint32_t udf_fsd_num; udf_charspec_t logical_vol_id_charset; udf_dstring logical_vol_id[128]; udf_charspec_t fileset_charset; udf_dstring fileSet_id[32]; udf_dstring copyright_file_id[32]; udf_dstring abstract_file_id[32]; udf_long_ad_t root_icb; udf_regid_t domain_id; udf_long_ad_t next_ext; udf_long_ad_t stream_directory_ICB; udf_Uint8_t reserved[32]; } GNUC_PACKED; typedef struct udf_fsd_s udf_fsd_t; /** Partition Header Descriptor (ECMA 167r3 4/14.3) */ struct partition_header_desc_s { udf_short_ad_t unalloc_space_table; udf_short_ad_t unalloc_space_bitmap; udf_short_ad_t partition_integrity_table; udf_short_ad_t freed_space_table; udf_short_ad_t freed_space_bitmap; udf_Uint8_t reserved[88]; } GNUC_PACKED; typedef struct partition_header_desc_s partition_header_desc_t; /** File Identifier Descriptor (ECMA 167r3 4/14.4) */ struct udf_fileid_desc_s { udf_tag_t tag; udf_Uint16_t file_version_num; udf_Uint8_t file_characteristics; udf_Uint8_t i_file_id; udf_long_ad_t icb; udf_Uint16_t i_imp_use; udf_Uint8_t imp_use[0]; udf_Uint8_t file_id[0]; udf_Uint8_t padding[0]; } GNUC_PACKED; typedef struct udf_fileid_desc_s udf_fileid_desc_t; /** File Characteristics (ECMA 167r3 4/14.4.3) Imagine the below enumeration values are \#defines to be used in a bitmask rather than distinct values of an enum. */ typedef enum { UDF_FILE_HIDDEN = (1 << 0), UDF_FILE_DIRECTORY = (1 << 1), UDF_FILE_DELETED = (1 << 2), UDF_FILE_PARENT = (1 << 3), UDF_FILE_METADATA = (1 << 4) } file_characteristics_t; /** Allocation Ext Descriptor (ECMA 167r3 4/14.5) */ struct allocExtDesc { udf_tag_t tag; udf_Uint32_t previous_alloc_ext_loc; udf_Uint32_t i_alloc_descs; } GNUC_PACKED; /** ICB Tag (ECMA 167r3 4/14.6) */ struct udf_icbtag_s { udf_Uint32_t prev_num_dirs; udf_Uint16_t strat_type; udf_Uint16_t strat_param; udf_Uint16_t max_num_entries; udf_Uint8_t reserved; udf_Uint8_t file_type; udf_lb_addr_t parent_ICB; udf_Uint16_t flags; } GNUC_PACKED; typedef struct udf_icbtag_s udf_icbtag_t; #define UDF_ICB_TAG_FLAGS_SETUID 0x40 #define UDF_ICB_TAG_FLAGS_SETGID 0x80 #define UDF_ICB_TAG_FLAGS_STICKY 0x100 /** Strategy Type (ECMA 167r3 4/14.6.2) which helpfully points largely to 4/A.x */ #define ICBTAG_STRATEGY_TYPE_UNDEF 0x0000 #define ICBTAG_STRATEGY_TYPE_1 0x0001 /**< 4/A.2 Direct entries Uint16 */ #define ICBTAG_STRATEGY_TYPE_2 0x0002 /**< 4/A.3 List of ICB direct entries */ #define ICBTAG_STRATEGY_TYPE_3 0x0003 /**< 4/A.4 */ #define ICBTAG_STRATEGY_TYPE_4 0x0004 /**< 4/A.5 Hierarchy having one single ICB with one direct entry. This is what's most often used. */ /** File Type (ECMA 167r3 4/14.6.6) Imagine the below enum values as \#define'd values rather than distinct values of an enum. */ typedef enum { ICBTAG_FILE_TYPE_UNDEF = 0x00, ICBTAG_FILE_TYPE_USE = 0x01, ICBTAG_FILE_TYPE_PIE = 0x02, ICBTAG_FILE_TYPE_IE = 0x03, ICBTAG_FILE_TYPE_DIRECTORY = 0x04, ICBTAG_FILE_TYPE_REGULAR = 0x05, ICBTAG_FILE_TYPE_BLOCK = 0x06, ICBTAG_FILE_TYPE_CHAR = 0x07, ICBTAG_FILE_TYPE_EA = 0x08, ICBTAG_FILE_TYPE_FIFO = 0x09, ICBTAG_FILE_TYPE_SOCKET = 0x0A, ICBTAG_FILE_TYPE_TE = 0x0B, ICBTAG_FILE_TYPE_SYMLINK = 0x0C, ICBTAG_FILE_TYPE_STREAMDIR = 0x0D } icbtag_file_type_enum_t; /** Flags (ECMA 167r3 4/14.6.8) */ typedef enum { ICBTAG_FLAG_AD_MASK = 0x0007, /**< "&" this to get below address flags */ ICBTAG_FLAG_AD_SHORT = 0x0000, /**< The allocation descriptor field is filled with short_ad's. If the offset is beyond the current extent, look for the next extent. */ ICBTAG_FLAG_AD_LONG = 0x0001, /**< The allocation descriptor field is filled with long_ad's If the offset is beyond the current extent, look for the next extent. */ ICBTAG_FLAG_AD_EXTENDED = 0x0002, ICBTAG_FLAG_AD_IN_ICB = 0x0003, /**< This type means that the file *data* is stored in the allocation descriptor field of the file entry. */ ICBTAG_FLAG_SORTED = 0x0008, ICBTAG_FLAG_NONRELOCATABLE = 0x0010, ICBTAG_FLAG_ARCHIVE = 0x0020, ICBTAG_FLAG_SETUID = 0x0040, ICBTAG_FLAG_SETGID = 0x0080, ICBTAG_FLAG_STICKY = 0x0100, ICBTAG_FLAG_CONTIGUOUS = 0x0200, ICBTAG_FLAG_SYSTEM = 0x0400, ICBTAG_FLAG_TRANSFORMED = 0x0800, ICBTAG_FLAG_MULTIVERSIONS = 0x1000, ICBTAG_FLAG_STREAM = 0x2000 } icbtag_flag_enum_t; /** Indirect Entry (ECMA 167r3 4/14.7) */ struct indirect_entry_s { udf_tag_t tag; udf_icbtag_t icb_tag; udf_long_ad_t indirect_ICB; } GNUC_PACKED; /** Terminal Entry (ECMA 167r3 4/14.8) */ struct terminal_entry_s { udf_tag_t tag; udf_icbtag_t icb_tag; } GNUC_PACKED; /** File Entry (ECMA 167r3 4/14.9) */ struct udf_file_entry_s { udf_tag_t tag; udf_icbtag_t icb_tag; /**< 4/14.9.2 */ udf_Uint32_t uid; /**< 4/14.9.3 */ udf_Uint32_t gid; /**< 4/14.9.4 */ udf_Uint32_t permissions; /**< 4/14.9.5 */ udf_Uint16_t link_count; /**< 4/14.9.6 */ udf_Uint8_t rec_format; /**< 4/14.9.7 */ udf_Uint8_t rec_disp_attr; /**< 4/14.9.8 */ udf_Uint32_t rec_len; /**< 4/14.9.9 */ udf_Uint64_t info_len; /**< 4/14.9.10 */ udf_Uint64_t logblks_recorded; /**< 4/14.9.11 */ udf_timestamp_t access_time; /**< 4/14.9.12 - last access to any stream of file prior to recording file entry */ udf_timestamp_t modification_time; /**< 4/14.9.13 - last access to modification to any stream of file */ udf_timestamp_t attribute_time; udf_Uint32_t checkpoint; udf_long_ad_t ext_attr_ICB; udf_regid_t imp_id; udf_Uint64_t unique_ID; udf_Uint32_t i_extended_attr; udf_Uint32_t i_alloc_descs; udf_Uint8_t ext_attr[0]; udf_Uint8_t alloc_descs[0]; } GNUC_PACKED; typedef struct udf_file_entry_s udf_file_entry_t; #define UDF_FENTRY_SIZE 176 #define UDF_FENTRY_PERM_USER_MASK 0x07 #define UDF_FENTRY_PERM_GRP_MASK 0xE0 #define UDF_FENTRY_PERM_OWNER_MASK 0x1C00 /** Permissions (ECMA 167r3 4/14.9.5) */ #define FE_PERM_O_EXEC 0x00000001U #define FE_PERM_O_WRITE 0x00000002U #define FE_PERM_O_READ 0x00000004U #define FE_PERM_O_CHATTR 0x00000008U #define FE_PERM_O_DELETE 0x00000010U #define FE_PERM_G_EXEC 0x00000020U #define FE_PERM_G_WRITE 0x00000040U #define FE_PERM_G_READ 0x00000080U #define FE_PERM_G_CHATTR 0x00000100U #define FE_PERM_G_DELETE 0x00000200U #define FE_PERM_U_EXEC 0x00000400U #define FE_PERM_U_WRITE 0x00000800U #define FE_PERM_U_READ 0x00001000U #define FE_PERM_U_CHATTR 0x00002000U #define FE_PERM_U_DELETE 0x00004000U /** Record Format (ECMA 167r3 4/14.9.7) */ #define FE_RECORD_FMT_UNDEF 0x00 #define FE_RECORD_FMT_FIXED_PAD 0x01 #define FE_RECORD_FMT_FIXED 0x02 #define FE_RECORD_FMT_VARIABLE8 0x03 #define FE_RECORD_FMT_VARIABLE16 0x04 #define FE_RECORD_FMT_VARIABLE16_MSB 0x05 #define FE_RECORD_FMT_VARIABLE32 0x06 #define FE_RECORD_FMT_PRINT 0x07 #define FE_RECORD_FMT_LF 0x08 #define FE_RECORD_FMT_CR 0x09 #define FE_RECORD_FMT_CRLF 0x0A #define FE_RECORD_FMT_LFCR 0x0B /** Record Display Attributes (ECMA 167r3 4/14.9.8) */ #define FE_RECORD_DISPLAY_ATTR_UNDEF 0x00 #define FE_RECORD_DISPLAY_ATTR_1 0x01 #define FE_RECORD_DISPLAY_ATTR_2 0x02 #define FE_RECORD_DISPLAY_ATTR_3 0x03 /** Extended Attribute Header Descriptor (ECMA 167r3 4/14.10.1) */ struct extended_attr_header_desc_s { udf_tag_t tag; udf_Uint32_t imp_attr_location; udf_Uint32_t app_attr_location; } GNUC_PACKED; /** Generic Format (ECMA 167r3 4/14.10.2) */ struct generic_format_s { udf_Uint32_t attr_type; udf_Uint8_t attr_subtype; udf_Uint8_t reserved[3]; udf_Uint32_t attrLength; udf_Uint8_t attrData[0]; } GNUC_PACKED; /** Character Set Information (ECMA 167r3 4/14.10.3) */ struct charSet_info_s { udf_Uint32_t attr_type; udf_Uint8_t attr_subtype; udf_Uint8_t reserved[3]; udf_Uint32_t attrLength; udf_Uint32_t escapeSeqLength; udf_Uint8_t charSetType; udf_Uint8_t escapeSeq[0]; } GNUC_PACKED; /* Alternate Permissions (ECMA 167r3 4/14.10.4) */ struct alt_perms_s { udf_Uint32_t attr_type; udf_Uint8_t attr_subtype; udf_Uint8_t reserved[3]; udf_Uint32_t attrLength; udf_Uint16_t owner_id; udf_Uint16_t group_id; udf_Uint16_t permission; } GNUC_PACKED; /** File Times Extended Attribute (ECMA 167r3 4/14.10.5) */ struct filetimes_ext_attr_s { udf_Uint32_t attr_type; udf_Uint8_t attr_subtype; udf_Uint8_t reserved[3]; udf_Uint32_t attrLength; udf_Uint32_t dataLength; udf_Uint32_t fileTimeExistence; udf_Uint8_t fileTimes; } GNUC_PACKED; /** FileTimeExistence (ECMA 167r3 4/14.10.5.6) */ #define FTE_CREATION 0x00000001 #define FTE_DELETION 0x00000004 #define FTE_EFFECTIVE 0x00000008 #define FTE_BACKUP 0x00000002 /** Information Times Extended Attribute (ECMA 167r3 4/14.10.6) */ struct infoTimesExtAttr { udf_Uint32_t attr_type; udf_Uint8_t attr_subtype; udf_Uint8_t reserved[3]; udf_Uint32_t attrLength; udf_Uint32_t dataLength; udf_Uint32_t infoTimeExistence; udf_Uint8_t infoTimes[0]; } GNUC_PACKED; /** Device Specification (ECMA 167r3 4/14.10.7) */ struct deviceSpec { udf_Uint32_t attr_type; udf_Uint8_t attr_subtype; udf_Uint8_t reserved[3]; udf_Uint32_t attrLength; udf_Uint32_t imp_useLength; udf_Uint32_t majorDevice_id; udf_Uint32_t minorDevice_id; udf_Uint8_t imp_use[0]; } GNUC_PACKED; /** Implementation Use Extended Attr (ECMA 167r3 4/14.10.8) */ struct impUseExtAttr { udf_Uint32_t attr_type; udf_Uint8_t attr_subtype; udf_Uint8_t reserved[3]; udf_Uint32_t attrLength; udf_Uint32_t imp_useLength; udf_regid_t imp_id; udf_Uint8_t imp_use[0]; } GNUC_PACKED; /** Application Use Extended Attribute (ECMA 167r3 4/14.10.9) */ struct appUseExtAttr { udf_Uint32_t attr_type; udf_Uint8_t attr_subtype; udf_Uint8_t reserved[3]; udf_Uint32_t attrLength; udf_Uint32_t appUseLength; udf_regid_t app_id; udf_Uint8_t appUse[0]; } GNUC_PACKED; #define EXTATTR_CHAR_SET 1 #define EXTATTR_ALT_PERMS 3 #define EXTATTR_FILE_TIMES 5 #define EXTATTR_INFO_TIMES 6 #define EXTATTR_DEV_SPEC 12 #define EXTATTR_IMP_USE 2048 #define EXTATTR_APP_USE 65536 /** Unallocated Space Entry (ECMA 167r3 4/14.11) */ struct unallocSpaceEntry { udf_tag_t tag; udf_icbtag_t icb_tag; udf_Uint32_t lengthAllocDescs; udf_Uint8_t allocDescs[0]; } GNUC_PACKED; /** Space Bitmap Descriptor (ECMA 167r3 4/14.12) */ struct spaceBitmapDesc { udf_tag_t tag; udf_Uint32_t i_bits; udf_Uint32_t i_bytes; udf_Uint8_t bitmap[0]; } GNUC_PACKED; /** Partition Integrity Entry (ECMA 167r3 4/14.13) */ struct partitionIntegrityEntry { udf_tag_t tag; udf_icbtag_t icb_tag; udf_timestamp_t recording_time; udf_Uint8_t integrityType; udf_Uint8_t reserved[175]; udf_regid_t imp_id; udf_Uint8_t imp_use[256]; } GNUC_PACKED; /** Short Allocation Descriptor (ECMA 167r3 4/14.14.1) */ /** Extent Length (ECMA 167r3 4/14.14.1.1) */ #define EXT_RECORDED_ALLOCATED 0x00000000 #define EXT_NOT_RECORDED_ALLOCATED 0x40000000 #define EXT_NOT_RECORDED_NOT_ALLOCATED 0x80000000 #define EXT_NEXT_EXTENT_ALLOCDECS 0xC0000000 /** Long Allocation Descriptor (ECMA 167r3 4/14.14.2) */ /** Extended Allocation Descriptor (ECMA 167r3 4/14.14.3) */ /** Logical Volume Header Descriptor (ECMA 167r3 4/14.15) */ struct logical_vol_header_desc_s { udf_Uint64_t uniqueID; udf_Uint8_t reserved[24]; } GNUC_PACKED; typedef struct logical_vol_header_desc_s logical_vol_header_desc_t; /** Path Component (ECMA 167r3 4/14.16.1) */ struct pathComponent { udf_Uint8_t component_type; udf_Uint8_t lengthComponent_id; udf_Uint16_t componentFileVersionNum; udf_dstring component_id[0]; } GNUC_PACKED; /** File Entry (ECMA 167r3 4/14.17) */ struct extended_file_entry { udf_tag_t tag; /**< 4/14.17.1 - id = 266 */ udf_icbtag_t icb_tag; /**< 4/14.17.2 & 4/14.9.2 */ udf_Uint32_t uid; /**< 4/14.17.3 & 4/14.9.3 */ udf_Uint32_t gid; /**< 4/14.17.4 & 4/14.9.4 */ udf_Uint32_t permissions; /**< 4/14.17.5 & 4/14.9.5 */ udf_Uint16_t link_count; /**< 4/14.17.6 & 4/14.9.6 */ udf_Uint8_t rec_format; /**< 4/14.17.7 & 4/14.9.7 */ udf_Uint8_t rec_display_attr; /**< 4/14.17.8 & 4/14.9.8 */ udf_Uint32_t record_len; /**< 4/14.17.9 & 4/14.9.9 */ udf_Uint64_t info_len; /**< 4/14.17.10 & 4/14.9.10 */ udf_Uint64_t object_size; /**< 4/14.17.11 */ udf_Uint64_t logblks_recorded; /**< 4/14.17.12 & 4/14.9.11 */ udf_timestamp_t access_time; /**< 4/14.17.13 & 4/14.9.12 - last access to any stream of file */ udf_timestamp_t modification_time; /**< 4/14.17.14 & 4/14.9.13 - last modification to any stream of file*/ udf_timestamp_t create_time; /**< 4/14.17.15 */ udf_timestamp_t attribute_time; /**< 4/14.17.16 & 4/14.9.14 - most recent create or modify time */ udf_Uint32_t checkpoint; udf_Uint32_t reserved; /**< #00 bytes */ udf_long_ad_t ext_attr_ICB; udf_long_ad_t stream_directory_ICB; udf_regid_t imp_id; udf_Uint64_t unique_ID; udf_Uint32_t length_extended_attr; udf_Uint32_t length_alloc_descs; udf_Uint8_t ext_attr[0]; udf_Uint8_t alloc_descs[0]; } GNUC_PACKED; PRAGMA_END_PACKED /** The below variables are trickery to force the above enum symbol values to be recorded in debug symbol tables. They are used to allow one refer to the enumeration value names in the typedefs above in a debugger and in debugger expressions. */ extern tag_id_t debug_tagid; extern file_characteristics_t debug_file_characteristics; extern icbtag_file_type_enum_t debug_icbtag_file_type_enum; extern icbtag_flag_enum_t debug_flag_enum; extern ecma_167_enum1_t debug_ecma_167_enum1; extern ecma_167_timezone_enum_t debug_ecma_167_timezone_enum; #endif /* _ECMA_167_H */ libcdio-0.83/include/cdio/dvd.h0000644000175000017500000000661411400373302013261 00000000000000/* Copyright (C) 2004, 2010 Rocky Bernstein Modeled after GNU/Linux definitions in linux/cdrom.h This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** \file dvd.h \brief Definitions for DVD access. The documents we make use of are described Multi-Media Commands (MMC). This document generally has a numeric level number appended. For example MMC-5 refers to ``Multi-Media Commands - 5' which is the current version in 2010. */ #ifndef __CDIO_DVD_H__ #define __CDIO_DVD_H__ #include /** Values used in a READ DVD STRUCTURE */ #define CDIO_DVD_STRUCT_PHYSICAL 0x00 #define CDIO_DVD_STRUCT_COPYRIGHT 0x01 #define CDIO_DVD_STRUCT_DISCKEY 0x02 #define CDIO_DVD_STRUCT_BCA 0x03 #define CDIO_DVD_STRUCT_MANUFACT 0x04 /** Media definitions for "DVD Book" from MMC-5 Table 400, page 419. */ #define CDIO_DVD_BOOK_DVD_ROM 0x0 /**< DVD-ROM */ #define CDIO_DVD_BOOK_DVD_RAM 0x1 /**< DVD-RAM */ #define CDIO_DVD_BOOK_DVD_R 0x2 /**< DVD-R */ #define CDIO_DVD_BOOK_DVD_RW 0x3 /**< DVD-RW */ #define CDIO_DVD_BOOK_HD_DVD_ROM 0x4 /**< HD DVD-ROM */ #define CDIO_DVD_BOOK_HD_DVD_RAM 0x5 /**< HD DVD-RAM */ #define CDIO_DVD_BOOK_HD_DVD_R 0x6 /**< HD DVD-R */ #define CDIO_DVD_BOOK_DVD_PRW 0x9 /**< DVD+RW */ #define CDIO_DVD_BOOK_DVD_PR 0xa /**< DVD+R */ #define CDIO_DVD_BOOK_DVD_PRW_DL 0xd /**< DVD+RW DL */ #define CDIO_DVD_BOOK_DVD_PR_DL 0xe /**< DVD+R DL */ typedef struct cdio_dvd_layer { unsigned int book_version : 4; unsigned int book_type : 4; unsigned int min_rate : 4; unsigned int disc_size : 4; unsigned int layer_type : 4; unsigned int track_path : 1; unsigned int nlayers : 2; unsigned int track_density : 4; unsigned int linear_density : 4; unsigned int bca : 1; uint32_t start_sector; uint32_t end_sector; uint32_t end_sector_l0; } cdio_dvd_layer_t; /** Maximum number of layers in a DVD. */ #define CDIO_DVD_MAX_LAYERS 4 typedef struct cdio_dvd_physical { uint8_t type; uint8_t layer_num; cdio_dvd_layer_t layer[CDIO_DVD_MAX_LAYERS]; } cdio_dvd_physical_t; typedef struct cdio_dvd_copyright { uint8_t type; uint8_t layer_num; uint8_t cpst; uint8_t rmi; } cdio_dvd_copyright_t; typedef struct cdio_dvd_disckey { uint8_t type; unsigned agid : 2; uint8_t value[2048]; } cdio_dvd_disckey_t; typedef struct cdio_dvd_bca { uint8_t type; int len; uint8_t value[188]; } cdio_dvd_bca_t; typedef struct cdio_dvd_manufact { uint8_t type; uint8_t layer_num; int len; uint8_t value[2048]; } cdio_dvd_manufact_t; typedef union { uint8_t type; cdio_dvd_physical_t physical; cdio_dvd_copyright_t copyright; cdio_dvd_disckey_t disckey; cdio_dvd_bca_t bca; cdio_dvd_manufact_t manufact; } cdio_dvd_struct_t; #endif /* __CDIO_DVD_H__ */ libcdio-0.83/include/cdio/udf_file.h0000644000175000017500000000664011565047723014301 00000000000000/* Copyright (C) 2005, 2006, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** * \file udf_file.h * * \brief Routines involving UDF file operations * */ #ifndef UDF_FILE_H #define UDF_FILE_H #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** Return the file id descriptor of the given file. */ bool udf_get_fileid_descriptor(const udf_dirent_t *p_udf_dirent, /*out*/ udf_fileid_desc_t *p_udf_fid); /** Return the name of the file */ const char *udf_get_filename(const udf_dirent_t *p_udf_dirent); /** Return the name of the file */ bool udf_get_file_entry(const udf_dirent_t *p_udf_dirent, /*out*/ udf_file_entry_t *p_udf_fe); /** Return the number of hard links of the file. Return 0 if error. */ uint16_t udf_get_link_count(const udf_dirent_t *p_udf_dirent); /** Return the file length the file. Return 2147483647L if error. */ uint64_t udf_get_file_length(const udf_dirent_t *p_udf_dirent); /** Returns a POSIX mode for a given p_udf_dirent. */ mode_t udf_get_posix_filemode(const udf_dirent_t *p_udf_dirent); /** Return the next subdirectory. */ udf_dirent_t *udf_opendir(const udf_dirent_t *p_udf_dirent); /** Attempts to read up to count bytes from UDF directory entry p_udf_dirent into the buffer starting at buf. buf should be a multiple of UDF_BLOCKSIZE bytes. Reading continues after the point at which we last read or from the beginning the first time. If count is zero, read() returns zero and has no other results. If count is greater than SSIZE_MAX, the result is unspecified. If there is an error, cast the result to driver_return_code_t for the specific error code. */ /** Attempts to read up to count bytes from file descriptor fd into the buffer starting at buf. If count is zero, read() returns zero and has no other results. If count is greater than SSIZE_MAX, the result is unspecified. */ ssize_t udf_read_block(const udf_dirent_t *p_udf_dirent, void * buf, size_t count); /** Advances p_udf_direct to the the next directory entry in the pointed to by p_udf_dir. It also returns this as the value. NULL is returned on reaching the end-of-file or if an error. Also p_udf_dirent is free'd. If the end of is not reached the caller must call udf_dirent_free() with p_udf_dirent when done with it to release resources. */ udf_dirent_t *udf_readdir(udf_dirent_t *p_udf_dirent); /** free free resources associated with p_udf_dirent. */ bool udf_dirent_free(udf_dirent_t *p_udf_dirent); /** Return true if the file is a directory. */ bool udf_is_dir(const udf_dirent_t *p_udf_dirent); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /*UDF_FILE_H*/ libcdio-0.83/include/cdio/audio.h0000644000175000017500000001001211565047723013611 00000000000000/* -*- c -*- Copyright (C) 2005, 2007, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** \file audio.h * * \brief The top-level header for CD audio-related libcdio * calls. These control playing of the CD-ROM through its * line-out jack. */ #ifndef __CDIO_AUDIO_H__ #define __CDIO_AUDIO_H__ #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /*! This struct is used by the cdio_audio_read_subchannel */ typedef struct cdio_subchannel_s { uint8_t format; uint8_t audio_status; uint8_t address: 4; uint8_t control: 4; uint8_t track; uint8_t index; msf_t abs_addr; msf_t rel_addr; } cdio_subchannel_t; /*! This struct is used by cdio_audio_get_volume and cdio_audio_set_volume */ typedef struct cdio_audio_volume_s { uint8_t level[4]; } cdio_audio_volume_t; /*! This struct is used by the CDROMPLAYTRKIND ioctl */ typedef struct cdio_track_index_s { uint8_t i_start_track; /**< start track */ uint8_t i_start_index; /**< start index */ uint8_t i_end_track; /**< end track */ uint8_t i_end_index; /**< end index */ } cdio_track_index_t; /*! Get volume of an audio CD. @param p_cdio the CD object to be acted upon. @param p_volume place to put the list of volume outputs levels p_volume can be NULL in which case we return only whether the driver has the ability to get the volume or not. */ driver_return_code_t cdio_audio_get_volume (CdIo_t *p_cdio, /*out*/ cdio_audio_volume_t *p_volume); /*! Return the number of seconds (discarding frame portion) of an MSF */ uint32_t cdio_audio_get_msf_seconds(msf_t *p_msf); /*! Pause playing CD through analog output @param p_cdio the CD object to be acted upon. */ driver_return_code_t cdio_audio_pause (CdIo_t *p_cdio); /*! Playing CD through analog output at the given MSF. @param p_cdio the CD object to be acted upon. @param p_start_msf pointer to staring MSF @param p_end_msf pointer to ending MSF */ driver_return_code_t cdio_audio_play_msf (CdIo_t *p_cdio, /*in*/msf_t *p_start_msf, /*in*/ msf_t *p_end_msf); /*! Playing CD through analog output at the desired track and index @param p_cdio the CD object to be acted upon. @param p_track_index location to start/end. */ driver_return_code_t cdio_audio_play_track_index ( CdIo_t *p_cdio, cdio_track_index_t *p_track_index); /*! Get subchannel information. @param p_cdio the CD object to be acted upon. @param p_subchannel place for returned subchannel information */ driver_return_code_t cdio_audio_read_subchannel (CdIo_t *p_cdio, /*out*/ cdio_subchannel_t *p_subchannel); /*! Resume playing an audio CD. @param p_cdio the CD object to be acted upon. */ driver_return_code_t cdio_audio_resume (CdIo_t *p_cdio); /*! Set volume of an audio CD. @param p_cdio the CD object to be acted upon. @param p_volume place for returned volume-level information */ driver_return_code_t cdio_audio_set_volume (CdIo_t *p_cdio, /*out*/ cdio_audio_volume_t *p_volume); /*! Stop playing an audio CD. @param p_cdio the CD object to be acted upon. */ driver_return_code_t cdio_audio_stop (CdIo_t *p_cdio); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __CDIO_AUDIO_H__ */ libcdio-0.83/include/cdio/bytesex_asm.h0000644000175000017500000000603711114145233015030 00000000000000/* $Id: bytesex_asm.h,v 1.3 2008/03/25 15:59:08 karl Exp $ Copyright (C) 2008 Rocky Bernstein 2001, 2004, 2005 Herbert Valerio Riedel 2001 Sven Ottemann This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** \file bytesex_asm.h * \brief Assembly code to handle byte-swapping. Note: this header will is slated to get removed and libcdio will use glib.h routines instead. */ #ifndef __CDIO_BYTESEX_ASM_H__ #define __CDIO_BYTESEX_ASM_H__ #if !defined(DISABLE_ASM_OPTIMIZE) #include #if defined(__powerpc__) && defined(__GNUC__) inline static uint32_t uint32_swap_le_be_asm(const uint32_t a) { uint32_t b; __asm__ ("lwbrx %0,0,%1" :"=r"(b) :"r"(&a), "m"(a)); return b; } inline static uint16_t uint16_swap_le_be_asm(const uint16_t a) { uint32_t b; __asm__ ("lhbrx %0,0,%1" :"=r"(b) :"r"(&a), "m"(a)); return b; } #define UINT16_SWAP_LE_BE uint16_swap_le_be_asm #define UINT32_SWAP_LE_BE uint32_swap_le_be_asm #elif defined(__mc68000__) && defined(__STORMGCC__) inline static uint32_t uint32_swap_le_be_asm(uint32_t a __asm__("d0")) { /* __asm__("rolw #8,%0; swap %0; rolw #8,%0" : "=d" (val) : "0" (val)); */ __asm__("move.l %1,d0;rol.w #8,d0;swap d0;rol.w #8,d0;move.l d0,%0" :"=r"(a) :"r"(a)); return(a); } inline static uint16_t uint16_swap_le_be_asm(uint16_t a __asm__("d0")) { __asm__("move.l %1,d0;rol.w #8,d0;move.l d0,%0" :"=r"(a) :"r"(a)); return(a); } #define UINT16_SWAP_LE_BE uint16_swap_le_be_asm #define UINT32_SWAP_LE_BE uint32_swap_le_be_asm #elif 0 && defined(__i386__) && defined(__GNUC__) inline static uint32_t uint32_swap_le_be_asm(uint32_t a) { __asm__("xchgb %b0,%h0\n\t" /* swap lower bytes */ "rorl $16,%0\n\t" /* swap words */ "xchgb %b0,%h0" /* swap higher bytes */ :"=q" (a) : "0" (a)); return(a); } inline static uint16_t uint16_swap_le_be_asm(uint16_t a) { __asm__("xchgb %b0,%h0" /* swap bytes */ : "=q" (a) : "0" (a)); return(a); } #define UINT16_SWAP_LE_BE uint16_swap_le_be_asm #define UINT32_SWAP_LE_BE uint32_swap_le_be_asm #endif #endif /* !defined(DISABLE_ASM_OPTIMIZE) */ #endif /* __CDIO_BYTESEX_ASM_H__ */ /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/include/cdio/mmc_hl_cmds.h0000644000175000017500000001065711652130572014764 00000000000000/* Copyright (C) 2010 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** \file mmc_hl_cmds.h \brief Higher-level MMC commands which build on top of the lower-level MMC commands. */ #ifndef __CDIO_MMC_HL_CMDS_H__ #define __CDIO_MMC_HL_CMDS_H__ #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** Close tray using a MMC START STOP UNIT command. @param p_cdio the CD object to be acted upon. @return DRIVER_OP_SUCCESS (0) if we got the status. return codes are the same as driver_return_code_t */ driver_return_code_t mmc_close_tray( CdIo_t *p_cdio ); /** Detects if a disc (CD or DVD) is erasable or not. @param p_cdio the CD object to be acted upon. @param b_erasable, if not NULL, on return will be set indicate whether the operation was a success (DRIVER_OP_SUCCESS) or if not to some other value. @return true if the disc is detected as erasable (rewritable), false otherwise. */ driver_return_code_t mmc_get_disc_erasable(const CdIo_t *p_cdio, bool *b_erasable); /** Eject using MMC commands. If CD-ROM is "locked" we'll unlock it. Command is not "immediate" -- we'll wait for the command to complete. For a more general (and lower-level) routine, @see mmc_start_stop_unit. @param p_cdio the CD object to be acted upon. @return DRIVER_OP_SUCCESS (0) if we got the status. return codes are the same as driver_return_code_t */ driver_return_code_t mmc_eject_media( const CdIo_t *p_cdio ); /** Detects the disc type using the SCSI-MMC GET CONFIGURATION command. @param p_cdio the CD object to be acted upon. @param i_timeout_ms, number of millisections to wait before timeout @param p_disctype the disc type set on success. @return DRIVER_OP_SUCCESS (0) if we got the status. return codes are the same as driver_return_code_t */ driver_return_code_t mmc_get_disctype(const CdIo_t *p_cdio, unsigned int i_timeout_ms, cdio_mmc_feature_profile_t *p_disctype); /** Run a SCSI-MMC MODE_SENSE command (6- or 10-byte version) and put the results in p_buf @param p_cdio the CD object to be acted upon. @param p_buf pointer to location to store mode sense information @param i_size number of bytes allocated to p_buf @param page which "page" of the mode sense command we are interested in @return DRIVER_OP_SUCCESS if we ran the command ok. */ driver_return_code_t mmc_mode_sense( CdIo_t *p_cdio, /*out*/ void *p_buf, unsigned int i_size, int page); /** Set the drive speed in CD-ROM speed units. @param p_cdio CD structure set by cdio_open(). @param i_drive_speed speed in CD-ROM speed units. Note this not Kbs as would be used in the MMC spec or in mmc_set_speed(). To convert CD-ROM speed units to Kbs, multiply the number by 176 (for raw data) and by 150 (for filesystem data). On many CD-ROM drives, specifying a value too large will result in using the fastest speed. @return the drive speed if greater than 0. -1 if we had an error. is -2 returned if this is not implemented for the current driver. @see cdio_set_speed and mmc_set_speed */ driver_return_code_t mmc_set_drive_speed( const CdIo_t *p_cdio, int i_drive_speed ); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __CDIO_MMC_HL_CMDS_H__ */ /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/include/cdio/iso9660.h0000644000175000017500000013706211314417631013635 00000000000000/* $Id: iso9660.h,v 1.102 2008/07/16 00:28:54 rocky Exp $ Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Rocky Bernstein Copyright (C) 2000 Herbert Valerio Riedel See also iso9660.h by Eric Youngdale (1993). Copyright 1993 Yggdrasil Computing, Incorporated This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /*! * \file iso9660.h * * \brief The top-level interface header for libiso9660: the ISO-9660 * filesystem library; applications include this. * * See also the ISO-9660 specification. The freely available European * equivalant standard is called ECMA-119. */ #ifndef __CDIO_ISO9660_H__ #define __CDIO_ISO9660_H__ #include #include #include #include /** \brief ISO 9660 Integer and Character types These are described in the section 7 of the ISO 9660 (or ECMA 119) specification. */ typedef uint8_t iso711_t; /*! See section 7.1.1 */ typedef int8_t iso712_t; /*! See section 7.1.2 */ typedef uint16_t iso721_t; /*! See section 7.2.1 */ typedef uint16_t iso722_t; /*! See section 7.2.2 */ typedef uint32_t iso723_t; /*! See section 7.2.3 */ typedef uint32_t iso731_t; /*! See section 7.3.1 */ typedef uint32_t iso732_t; /*! See section 7.3.2 */ typedef uint64_t iso733_t; /*! See section 7.3.3 */ typedef char achar_t; /*! See section 7.4.1 */ typedef char dchar_t; /*! See section 7.4.1 */ #ifndef EMPTY_ARRAY_SIZE #define EMPTY_ARRAY_SIZE 0 #endif #include #include #ifdef ISODCL #undef ISODCL #endif /* This part borrowed from the bsd386 isofs */ #define ISODCL(from, to) ((to) - (from) + 1) #define MIN_TRACK_SIZE 4*75 #define MIN_ISO_SIZE MIN_TRACK_SIZE /*! The below isn't really an enumeration one would really use in a program; things are done this way so that in a debugger one can to refer to the enumeration value names such as in a debugger expression and get something. With the more common a \#define mechanism, the name/value assocation is lost at run time. */ extern enum iso_enum1_s { ISO_PVD_SECTOR = 16, /**< Sector of Primary Volume Descriptor. */ ISO_EVD_SECTOR = 17, /**< Sector of End Volume Descriptor. */ LEN_ISONAME = 31, /**< Size in bytes of the filename portion + null byte. */ ISO_MAX_SYSTEM_ID = 32, /**< Maximum number of characters in a system id. */ MAX_ISONAME = 37, /**< Size in bytes of the filename portion + null byte. */ ISO_MAX_PREPARER_ID = 128, /**< Maximum number of characters in a preparer id. */ MAX_ISOPATHNAME = 255, /**< Maximum number of characters in the entire ISO 9660 filename. */ ISO_BLOCKSIZE = 2048 /**< Number of bytes in an ISO 9660 block. */ } iso_enums1; /*! An enumeration for some of the ISO_* \#defines below. This isn't really an enumeration one would really use in a program it is here to be helpful in debuggers where wants just to refer to the ISO_*_ names and get something. */ /*! ISO 9660 directory flags. */ extern enum iso_flag_enum_s { ISO_FILE = 0, /**< Not really a flag... */ ISO_EXISTENCE = 1, /**< Do not make existence known (hidden) */ ISO_DIRECTORY = 2, /**< This file is a directory */ ISO_ASSOCIATED = 4, /**< This file is an associated file */ ISO_RECORD = 8, /**< Record format in extended attr. != 0 */ ISO_PROTECTION = 16, /**< No read/execute perm. in ext. attr. */ ISO_DRESERVED1 = 32, /**<, Reserved bit 5 */ ISO_DRESERVED2 = 64, /**<, Reserved bit 6 */ ISO_MULTIEXTENT = 128, /**< Not final entry of a mult. ext. file */ } iso_flag_enums; /*! Volume descriptor types */ extern enum iso_vd_enum_s { ISO_VD_BOOT_RECORD = 0, /**< CD is bootable */ ISO_VD_PRIMARY = 1, /**< Is in any ISO-9660 */ ISO_VD_SUPPLEMENTARY = 2, /**< Used by Joliet, for example */ ISO_VD_PARITION = 3, /**< Indicates a partition of a CD */ ISO_VD_END = 255 } iso_vd_enums; /*! An ISO filename is: abcd.eee -> filename.ext;version# For ISO-9660 Level 1, the maximum needed string length is: @code 30 chars (filename + ext) + 2 chars ('.' + ';') + 5 chars (strlen("32767")) + 1 null byte ================================ = 38 chars @endcode */ /*! \brief Maximum number of characters in a publisher id. */ #define ISO_MAX_PUBLISHER_ID 128 /*! \brief Maximum number of characters in an application id. */ #define ISO_MAX_APPLICATION_ID 128 /*! \brief Maximum number of characters in a volume id. */ #define ISO_MAX_VOLUME_ID 32 /*! \brief Maximum number of characters in a volume-set id. */ #define ISO_MAX_VOLUMESET_ID 128 /*! String inside frame which identifies an ISO 9660 filesystem. This string is the "id" field of an iso9660_pvd_t or an iso9660_svd_t. */ extern const char ISO_STANDARD_ID[sizeof("CD001")-1]; #define ISO_STANDARD_ID "CD001" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef enum strncpy_pad_check { ISO9660_NOCHECK = 0, ISO9660_7BIT, ISO9660_ACHARS, ISO9660_DCHARS } strncpy_pad_check_t; PRAGMA_BEGIN_PACKED /*! \brief ISO-9660 shorter-format time structure. See ECMA 9.1.5. @see iso9660_dtime */ struct iso9660_dtime_s { iso711_t dt_year; /**< Number of years since 1900 */ iso711_t dt_month; /**< Has value in range 1..12. Note starts at 1, not 0 like a tm struct. */ iso711_t dt_day; /**< Day of the month from 1 to 31 */ iso711_t dt_hour; /**< Hour of the day from 0 to 23 */ iso711_t dt_minute; /**< Minute of the hour from 0 to 59 */ iso711_t dt_second; /**< Second of the minute from 0 to 59 */ iso712_t dt_gmtoff; /**< GMT values -48 .. + 52 in 15 minute intervals */ } GNUC_PACKED; typedef struct iso9660_dtime_s iso9660_dtime_t; /*! \brief ISO-9660 longer-format time structure. Section 8.4.26.1 of ECMA 119. All values are encoded as character arrays, eg. '1', '9', '5', '5' for the year 1955 (no null terminated byte). @see iso9660_ltime */ struct iso9660_ltime_s { char lt_year [ISODCL( 1, 4)]; /**< Add 1900 to value for the Julian year */ char lt_month [ISODCL( 5, 6)]; /**< Has value in range 1..12. Note starts at 1, not 0 like a tm struct. */ char lt_day [ISODCL( 7, 8)]; /**< Day of month: 1..31 */ char lt_hour [ISODCL( 9, 10)]; /**< hour: 0..23 */ char lt_minute [ISODCL( 11, 12)]; /**< minute: 0..59 */ char lt_second [ISODCL( 13, 14)]; /**< second: 0..59 */ char lt_hsecond [ISODCL( 15, 16)]; /**< The value is in units of 1/100's of a second */ iso712_t lt_gmtoff; /**< Offset from Greenwich Mean Time in number of 15 min intervals from -48 (West) to +52 (East) recorded according to 7.1.2 numerical value */ } GNUC_PACKED; typedef struct iso9660_ltime_s iso9660_ltime_t; typedef struct iso9660_dir_s iso9660_dir_t; typedef struct iso9660_stat_s iso9660_stat_t; #include /*! \brief Format of an ISO-9660 directory record Section 9.1 of ECMA 119. This structure may have an odd length depending on how many characters there are in the filename! Some compilers (e.g. on Sun3/mc68020) pad the structures to an even length. For this reason, we cannot use sizeof (struct iso_path_table) or sizeof (struct iso_directory_record) to compute on disk sizes. Instead, we use offsetof(..., name) and add the name size. See mkisofs.h of the cdrtools package. @see iso9660_stat */ struct iso9660_dir_s { iso711_t length; /*! Length of Directory record (9.1.1) */ iso711_t xa_length; /*! XA length if XA is used. Otherwise zero. (9.1.2) */ iso733_t extent; /*! LBA of first local block allocated to the extent */ iso733_t size; /*! data length of File Section. This does not include the length of any XA Records. (9.1.2) */ iso9660_dtime_t recording_time; /*! Recording date and time (9.1.3) */ uint8_t file_flags; /*! If no XA then zero. If a directory, then bits 2,3 and 7 are zero. (9.1.6) */ iso711_t file_unit_size; /*! File Unit size for the File Section if the File Section is recorded in interleaved mode. Otherwise zero. (9.1.7) */ iso711_t interleave_gap; /*! Interleave Gap size for the File Section if the File Section is interleaved. Otherwise zero. (9.1.8) */ iso723_t volume_sequence_number; /*! Ordinal number of the volume in the Volume Set on which the Extent described by this Directory Record is recorded. (9.1.9) */ iso711_t filename_len; /*! number of bytes in filename field */ char filename[EMPTY_ARRAY_SIZE]; } GNUC_PACKED; /*! \brief ISO-9660 Primary Volume Descriptor. */ struct iso9660_pvd_s { iso711_t type; /**< ISO_VD_PRIMARY - 1 */ char id[5]; /**< ISO_STANDARD_ID "CD001" */ iso711_t version; /**< value 1 for ECMA 119 */ char unused1[1]; /**< unused - value 0 */ achar_t system_id[ISO_MAX_SYSTEM_ID]; /**< each char is an achar */ dchar_t volume_id[ISO_MAX_VOLUME_ID]; /**< each char is a dchar */ uint8_t unused2[8]; /**< unused - value 0 */ iso733_t volume_space_size; /**< total number of sectors */ uint8_t unused3[32]; /**< unused - value 0 */ iso723_t volume_set_size; /**< often 1 */ iso723_t volume_sequence_number; /**< often 1 */ iso723_t logical_block_size; /**< sector size, e.g. 2048 */ iso733_t path_table_size; /**< bytes in path table */ iso731_t type_l_path_table; /**< first sector of L Path Table */ iso731_t opt_type_l_path_table; /**< first sector of optional L Path Table */ iso732_t type_m_path_table; /**< first sector of M Path table */ iso732_t opt_type_m_path_table; /**< first sector of optional M Path table */ iso9660_dir_t root_directory_record; /**< See 8.4.18 and section 9.1 of ISO 9660 spec. */ char root_directory_filename; /**< Is '\\0' or root directory. Also pads previous field to 34 bytes */ dchar_t volume_set_id[ISO_MAX_VOLUMESET_ID]; /**< Volume Set of which the volume is a member. See section 8.4.19 */ achar_t publisher_id[ISO_MAX_PUBLISHER_ID]; /**< Publisher of volume. If the first character is '_' 0x5F, the remaining bytes specify a file containing the user. If all bytes are " " (0x20) no publisher is specified. See section 8.4.20 of ECMA 119 */ achar_t preparer_id[ISO_MAX_PREPARER_ID]; /**< preparer of volume. If the first character is '_' 0x5F, the remaining bytes specify a file containing the user. If all bytes are " " (0x20) no preparer is specified. See section 8.4.21 of ECMA 119 */ achar_t application_id[ISO_MAX_APPLICATION_ID]; /**< application use to create the volume. If the first character is '_' 0x5F, the remaining bytes specify a file containing the user. If all bytes are " " (0x20) no application is specified. See section of 8.4.22 of ECMA 119 */ dchar_t copyright_file_id[37]; /**< Name of file for copyright info. If all bytes are " " (0x20), then no file is identified. See section 8.4.23 of ECMA 119 9660 spec. */ dchar_t abstract_file_id[37]; /**< See section 8.4.24 of ECMA 119. */ dchar_t bibliographic_file_id[37]; /**< See section 7.5 of ISO 9660 spec. */ iso9660_ltime_t creation_date; /**< date and time of volume creation. See section 8.4.26.1 of the ISO 9660 spec. */ iso9660_ltime_t modification_date; /**< date and time of the most recent modification. See section 8.4.27 of the ISO 9660 spec. */ iso9660_ltime_t expiration_date; /**< date and time when volume expires. See section 8.4.28 of the ISO 9660 spec. */ iso9660_ltime_t effective_date; /**< date and time when volume is effective. See section 8.4.29 of the ISO 9660 spec. */ iso711_t file_structure_version; /**< value 1 for ECMA 119 */ uint8_t unused4[1]; /**< unused - value 0 */ char application_data[512]; /**< Application can put whatever it wants here. */ uint8_t unused5[653]; /**< Unused - value 0 */ } GNUC_PACKED; typedef struct iso9660_pvd_s iso9660_pvd_t; /*! \brief ISO-9660 Supplementary Volume Descriptor. This is used for Joliet Extentions and is almost the same as the the primary descriptor but two unused fields, "unused1" and "unused3 become "flags and "escape_sequences" respectively. */ struct iso9660_svd_s { iso711_t type; /**< ISO_VD_SUPPLEMENTARY - 2 */ char id[5]; /**< ISO_STANDARD_ID "CD001" */ iso711_t version; /**< value 1 */ char flags; /**< Section 8.5.3 */ achar_t system_id[ISO_MAX_SYSTEM_ID]; /**< Section 8.5.4; each char is an achar */ dchar_t volume_id[ISO_MAX_VOLUME_ID]; /**< Section 8.5.5; each char is a dchar */ char unused2[8]; iso733_t volume_space_size; /**< total number of sectors */ char escape_sequences[32]; /**< Section 8.5.6 */ iso723_t volume_set_size; /**< often 1 */ iso723_t volume_sequence_number; /**< often 1 */ iso723_t logical_block_size; /**< sector size, e.g. 2048 */ iso733_t path_table_size; /**< 8.5.7; bytes in path table */ iso731_t type_l_path_table; /**< 8.5.8; first sector of little-endian path table */ iso731_t opt_type_l_path_table; /**< 8.5.9; first sector of optional little-endian path table */ iso732_t type_m_path_table; /**< 8.5.10; first sector of big-endian path table */ iso732_t opt_type_m_path_table; /**< 8.5.11; first sector of optional big-endian path table */ iso9660_dir_t root_directory_record; /**< See section 8.5.12 and 9.1 of ISO 9660 spec. */ char root_directory_filename; /**< Is '\\0' or root directory. Also pads previous field to 34 bytes */ dchar_t volume_set_id[ISO_MAX_VOLUMESET_ID]; /**< 8.5.13; dchars */ achar_t publisher_id[ISO_MAX_PUBLISHER_ID]; /**< Publisher of volume. If the first char- aracter is '_' 0x5F, the remaining bytes specify a file containing the user. If all bytes are " " (0x20) no publisher is specified. See section 8.5.14 of ECMA 119 */ achar_t preparer_id[ISO_MAX_PREPARER_ID]; /**< Data preparer of volume. If the first character is '_' 0x5F, the remaining bytes specify a file containing the user. If all bytes are " " (0x20) no preparer is specified. See section 8.5.15 of ECMA 119 */ achar_t application_id[ISO_MAX_APPLICATION_ID]; /**< application use to create the volume. If the first character is '_' 0x5F, the remaining bytes specify a file containing the user. If all bytes are " " (0x20) no application is specified. See section of 8.5.16 of ECMA 119 */ dchar_t copyright_file_id[37]; /**< Name of file for copyright info. If all bytes are " " (0x20), then no file is identified. See section 8.5.17 of ECMA 119 9660 spec. */ dchar_t abstract_file_id[37]; /**< See section 8.5.18 of ECMA 119. */ dchar_t bibliographic_file_id[37]; /**< See section 8.5.19 of ECMA 119. */ iso9660_ltime_t creation_date; /**< date and time of volume creation. See section 8.4.26.1 of the ECMA 119 spec. */ iso9660_ltime_t modification_date; /**< date and time of the most recent modification. See section 8.4.27 of the ECMA 119 spec. */ iso9660_ltime_t expiration_date; /**< date and time when volume expires. See section 8.4.28 of the ECMA 119 spec. */ iso9660_ltime_t effective_date; /**< date and time when volume is effective. See section 8.4.29 of the ECMA 119 spec. */ iso711_t file_structure_version; /**< value 1 for ECMA 119 */ uint8_t unused4[1]; /**< unused - value 0 */ char application_data[512]; /**< 8.5.20 Application can put whatever it wants here. */ uint8_t unused5[653]; /**< Unused - value 0 */ } GNUC_PACKED; typedef struct iso9660_svd_s iso9660_svd_t; PRAGMA_END_PACKED /*! \brief Unix stat-like version of iso9660_dir The iso9660_stat structure is not part of the ISO-9660 specification. We use it for our to communicate information in a C-library friendly way, e.g struct tm time structures and a C-style filename string. @see iso9660_dir */ struct iso9660_stat_s { /* big endian!! */ iso_rock_statbuf_t rr; /**< Rock Ridge-specific fields */ struct tm tm; /**< time on entry - FIXME merge with one of entries above, like ctime? */ lsn_t lsn; /**< start logical sector number */ uint32_t size; /**< total size in bytes */ uint32_t secsize; /**< number of sectors allocated */ iso9660_xa_t xa; /**< XA attributes */ enum { _STAT_FILE = 1, _STAT_DIR = 2 } type; bool b_xa; char filename[EMPTY_ARRAY_SIZE]; /**< filename */ }; /** A mask used in iso9660_ifs_read_vd which allows what kinds of extensions we allow, eg. Joliet, Rock Ridge, etc. */ typedef uint8_t iso_extension_mask_t; /*! An enumeration for some of the ISO_EXTENSION_* \#defines below. This isn't really an enumeration one would really use in a program it is here to be helpful in debuggers where wants just to refer to the ISO_EXTENSION_*_ names and get something. */ extern enum iso_extension_enum_s { ISO_EXTENSION_JOLIET_LEVEL1 = 0x01, ISO_EXTENSION_JOLIET_LEVEL2 = 0x02, ISO_EXTENSION_JOLIET_LEVEL3 = 0x04, ISO_EXTENSION_ROCK_RIDGE = 0x08, ISO_EXTENSION_HIGH_SIERRA = 0x10 } iso_extension_enums; #define ISO_EXTENSION_ALL 0xFF #define ISO_EXTENSION_NONE 0x00 #define ISO_EXTENSION_JOLIET \ (ISO_EXTENSION_JOLIET_LEVEL1 | \ ISO_EXTENSION_JOLIET_LEVEL2 | \ ISO_EXTENSION_JOLIET_LEVEL3 ) /** This is an opaque structure. */ typedef struct _iso9660_s iso9660_t; /*! Close previously opened ISO 9660 image and free resources associated with the image. Call this when done using using an ISO 9660 image. @return true is unconditionally returned. If there was an error false would be returned. */ bool iso9660_close (iso9660_t * p_iso); /*! Open an ISO 9660 image for reading. Maybe in the future we will have a mode. NULL is returned on error. */ iso9660_t *iso9660_open (const char *psz_path /*flags, mode */); /*! Open an ISO 9660 image for reading allowing various ISO 9660 extensions. Maybe in the future we will have a mode. NULL is returned on error. @see iso9660_open_fuzzy */ iso9660_t *iso9660_open_ext (const char *psz_path, iso_extension_mask_t iso_extension_mask); /*! Open an ISO 9660 image for "fuzzy" reading. This means that we will try to guess various internal offset based on internal checks. This may be useful when trying to read an ISO 9660 image contained in a file format that libiso9660 doesn't know natively (or knows imperfectly.) Some tolerence allowed for positioning the ISO 9660 image. We scan for STANDARD_ID and use that to set the eventual offset to adjust by (as long as that is <= i_fuzz). Maybe in the future we will have a mode. NULL is returned on error. @see iso9660_open, @see iso9660_fuzzy_ext */ iso9660_t *iso9660_open_fuzzy (const char *psz_path /*flags, mode */, uint16_t i_fuzz); /*! Open an ISO 9660 image for reading with some tolerence for positioning of the ISO9660 image. We scan for ISO_STANDARD_ID and use that to set the eventual offset to adjust by (as long as that is <= i_fuzz). Maybe in the future we will have a mode. NULL is returned on error. @see iso9660_open_ext @see iso9660_open_fuzzy */ iso9660_t *iso9660_open_fuzzy_ext (const char *psz_path, iso_extension_mask_t iso_extension_mask, uint16_t i_fuzz /*flags, mode */); /*! Read the Super block of an ISO 9660 image but determine framesize and datastart and a possible additional offset. Generally here we are not reading an ISO 9660 image but a CD-Image which contains an ISO 9660 filesystem. */ bool iso9660_ifs_fuzzy_read_superblock (iso9660_t *p_iso, iso_extension_mask_t iso_extension_mask, uint16_t i_fuzz); /*! Seek to a position and then read i_size blocks. @param p_iso the ISO-9660 file image to get data from @param ptr place to put returned data. It should be able to store a least i_size bytes @param start location to start reading from @param i_size number of blocks to read. Each block is ISO_BLOCKSIZE bytes long. @return number of bytes (not blocks) read */ long int iso9660_iso_seek_read (const iso9660_t *p_iso, /*out*/ void *ptr, lsn_t start, long int i_size); /*! Read the Primary Volume Descriptor for a CD. True is returned if read, and false if there was an error. */ bool iso9660_fs_read_pvd ( const CdIo_t *p_cdio, /*out*/ iso9660_pvd_t *p_pvd ); /*! Read the Primary Volume Descriptor for an ISO 9660 image. True is returned if read, and false if there was an error. */ bool iso9660_ifs_read_pvd (const iso9660_t *p_iso, /*out*/ iso9660_pvd_t *p_pvd); /*! Read the Super block of an ISO 9660 image. This is the Primary Volume Descriptor (PVD) and perhaps a Supplemental Volume Descriptor if (Joliet) extensions are acceptable. */ bool iso9660_fs_read_superblock (CdIo_t *p_cdio, iso_extension_mask_t iso_extension_mask); /*! Read the Super block of an ISO 9660 image. This is the Primary Volume Descriptor (PVD) and perhaps a Supplemental Volume Descriptor if (Joliet) extensions are acceptable. */ bool iso9660_ifs_read_superblock (iso9660_t *p_iso, iso_extension_mask_t iso_extension_mask); /*==================================================== Time conversion ====================================================*/ /*! Set time in format used in ISO 9660 directory index record from a Unix time structure. */ void iso9660_set_dtime (const struct tm *tm, /*out*/ iso9660_dtime_t *idr_date); /*! Set time in format used in ISO 9660 directory index record from a Unix time structure. timezone is given as an offset correction in minutes. */ void iso9660_set_dtime_with_timezone (const struct tm *p_tm, int timezone, /*out*/ iso9660_dtime_t *p_idr_date); /*! Set "long" time in format used in ISO 9660 primary volume descriptor from a Unix time structure. */ void iso9660_set_ltime (const struct tm *_tm, /*out*/ iso9660_ltime_t *p_pvd_date); /*! Set "long" time in format used in ISO 9660 primary volume descriptor from a Unix time structure. */ void iso9660_set_ltime_with_timezone (const struct tm *_tm, int timezone, /*out*/ iso9660_ltime_t *p_pvd_date); /*! Get Unix time structure from format use in an ISO 9660 directory index record. Even though tm_wday and tm_yday fields are not explicitly in idr_date, they are calculated from the other fields. If tm is to reflect the localtime, set "b_localtime" true, otherwise tm will reported in GMT. */ bool iso9660_get_dtime (const iso9660_dtime_t *idr_date, bool b_localtime, /*out*/ struct tm *tm); /*! Get "long" time in format used in ISO 9660 primary volume descriptor from a Unix time structure. */ bool iso9660_get_ltime (const iso9660_ltime_t *p_ldate, /*out*/ struct tm *p_tm); /*==================================================== Character Classification and String Manipulation ====================================================*/ /*! Return true if c is a DCHAR - a character that can appear in an an ISO-9600 level 1 directory name. These are the ASCII capital letters A-Z, the digits 0-9 and an underscore. */ bool iso9660_is_dchar (int c); /*! Return true if c is an ACHAR - These are the DCHAR's plus some ASCII symbols including the space symbol. */ bool iso9660_is_achar (int c); /*! Convert an ISO-9660 file name which is in the format usually stored in a ISO 9660 directory entry into what's usually listed as the file name in a listing. Lowercase name, and remove trailing ;1's or .;1's and turn the other ;'s into version numbers. @param psz_oldname the ISO-9660 filename to be translated. @param psz_newname returned string. The caller allocates this and it should be at least the size of psz_oldname. @return length of the translated string is returned. */ int iso9660_name_translate(const char *psz_oldname, /*out*/ char *psz_newname); /*! Convert an ISO-9660 file name which is in the format usually stored in a ISO 9660 directory entry into what's usually listed as the file name in a listing. Lowercase name if no Joliet Extension interpretation. Remove trailing ;1's or .;1's and turn the other ;'s into version numbers. @param psz_oldname the ISO-9660 filename to be translated. @param psz_newname returned string. The caller allocates this and it should be at least the size of psz_oldname. @param i_joliet_level 0 if not using Joliet Extension. Otherwise the Joliet level. @return length of the translated string is returned. It will be no greater than the length of psz_oldname. */ int iso9660_name_translate_ext(const char *psz_oldname, char *psz_newname, uint8_t i_joliet_level); /*! Pad string src with spaces to size len and copy this to dst. If len is less than the length of src, dst will be truncated to the first len characters of src. src can also be scanned to see if it contains only ACHARs, DCHARs, 7-bit ASCII chars depending on the enumeration _check. In addition to getting changed, dst is the return value. Note: this string might not be NULL terminated. */ char *iso9660_strncpy_pad(char dst[], const char src[], size_t len, enum strncpy_pad_check _check); /*===================================================================== File and Directory Names ======================================================================*/ /*! Check that psz_path is a valid ISO-9660 directory name. A valid directory name should not start out with a slash (/), dot (.) or null byte, should be less than 37 characters long, have no more than 8 characters in a directory component which is separated by a /, and consist of only DCHARs. True is returned if psz_path is valid. */ bool iso9660_dirname_valid_p (const char psz_path[]); /*! Take psz_path and a version number and turn that into a ISO-9660 pathname. (That's just the pathname followd by ";" and the version number. For example, mydir/file.ext -> MYDIR/FILE.EXT;1 for version 1. The resulting ISO-9660 pathname is returned. */ char *iso9660_pathname_isofy (const char psz_path[], uint16_t i_version); /*! Check that psz_path is a valid ISO-9660 pathname. A valid pathname contains a valid directory name, if one appears and the filename portion should be no more than 8 characters for the file prefix and 3 characters in the extension (or portion after a dot). There should be exactly one dot somewhere in the filename portion and the filename should be composed of only DCHARs. True is returned if psz_path is valid. */ bool iso9660_pathname_valid_p (const char psz_path[]); /*===================================================================== directory tree ======================================================================*/ void iso9660_dir_init_new (void *dir, uint32_t self, uint32_t ssize, uint32_t parent, uint32_t psize, const time_t *dir_time); void iso9660_dir_init_new_su (void *dir, uint32_t self, uint32_t ssize, const void *ssu_data, unsigned int ssu_size, uint32_t parent, uint32_t psize, const void *psu_data, unsigned int psu_size, const time_t *dir_time); void iso9660_dir_add_entry_su (void *dir, const char filename[], uint32_t extent, uint32_t size, uint8_t file_flags, const void *su_data, unsigned int su_size, const time_t *entry_time); unsigned int iso9660_dir_calc_record_size (unsigned int namelen, unsigned int su_len); /*! Given a directory pointer, find the filesystem entry that contains lsn and return information about it. @return stat_t of entry if we found lsn, or NULL otherwise. Caller must free return value. */ #define iso9660_fs_find_lsn iso9660_find_fs_lsn iso9660_stat_t *iso9660_fs_find_lsn(CdIo_t *p_cdio, lsn_t i_lsn); /*! Given a directory pointer, find the filesystem entry that contains lsn and return information about it. @return stat_t of entry if we found lsn, or NULL otherwise. Caller must free return value. */ iso9660_stat_t *iso9660_fs_find_lsn_with_path(CdIo_t *p_cdio, lsn_t i_lsn, /*out*/ char **ppsz_path); /*! Given a directory pointer, find the filesystem entry that contains lsn and return information about it. @return stat_t of entry if we found lsn, or NULL otherwise. Caller must free return value. */ iso9660_stat_t *iso9660_ifs_find_lsn(iso9660_t *p_iso, lsn_t i_lsn); /*! Given a directory pointer, find the filesystem entry that contains lsn and return information about it. @param p_iso pointer to iso_t @param i_lsn LSN to find @param ppsz_path full path of lsn filename. On entry *ppsz_path should be NULL. On return it will be allocated an point to the full path of the file at lsn or NULL if the lsn is not found. You should deallocate *ppsz_path when you are done using it. @return stat_t of entry if we found lsn, or NULL otherwise. Caller must free return value. */ iso9660_stat_t *iso9660_ifs_find_lsn_with_path(iso9660_t *p_iso, lsn_t i_lsn, /*out*/ char **ppsz_path); /*! Return file status for psz_path. NULL is returned on error. @param p_cdio the CD object to read from @param psz_path filename path to look up and get information about @return ISO 9660 file information Important note: You make get different results looking up "/" versus "/." and the latter may give more complete information. "/" will take information from the PVD only, whereas "/." will force a directory read of "/" and find "." and in that Rock-Ridge information might be found which fills in more stat information. Ideally iso9660_fs_stat should be fixed. Patches anyone? */ iso9660_stat_t *iso9660_fs_stat (CdIo_t *p_cdio, const char psz_path[]); /*! Return file status for path name psz_path. NULL is returned on error. pathname version numbers in the ISO 9660 name are dropped, i.e. ;1 is removed and if level 1 ISO-9660 names are lowercased. b_mode2 is historical. It is not used. */ iso9660_stat_t *iso9660_fs_stat_translate (CdIo_t *p_cdio, const char psz_path[], bool b_mode2); /*! Return file status for pathname. NULL is returned on error. */ iso9660_stat_t *iso9660_ifs_stat (iso9660_t *p_iso, const char psz_path[]); /*! Return file status for path name psz_path. NULL is returned on error. pathname version numbers in the ISO 9660 name are dropped, i.e. ;1 is removed and if level 1 ISO-9660 names are lowercased. */ iso9660_stat_t *iso9660_ifs_stat_translate (iso9660_t *p_iso, const char psz_path[]); /*! Read psz_path (a directory) and return a list of iso9660_stat_t pointers for the files inside that directory. The caller must free the returned result. b_mode2 is historical. It is not used. */ CdioList_t * iso9660_fs_readdir (CdIo_t *p_cdio, const char psz_path[], bool b_mode2); /*! Read psz_path (a directory) and return a list of iso9660_stat_t pointers for the files inside that directory. The caller must free the returned result. */ CdioList_t * iso9660_ifs_readdir (iso9660_t *p_iso, const char psz_path[]); /*! Return the PVD's application ID. NULL is returned if there is some problem in getting this. */ char * iso9660_get_application_id(iso9660_pvd_t *p_pvd); /*! Get the application ID. psz_app_id is set to NULL if there is some problem in getting this and false is returned. */ bool iso9660_ifs_get_application_id(iso9660_t *p_iso, /*out*/ cdio_utf8_t **p_psz_app_id); /*! Return the Joliet level recognized for p_iso. */ uint8_t iso9660_ifs_get_joliet_level(iso9660_t *p_iso); uint8_t iso9660_get_dir_len(const iso9660_dir_t *p_idr); #if FIXME uint8_t iso9660_get_dir_size(const iso9660_dir_t *p_idr); lsn_t iso9660_get_dir_extent(const iso9660_dir_t *p_idr); #endif /*! Return the directory name stored in the iso9660_dir_t A string is allocated: the caller must deallocate. This routine can return NULL if memory allocation fails. */ char * iso9660_dir_to_name (const iso9660_dir_t *p_iso9660_dir); /*! Returns a POSIX mode for a given p_iso_dirent. */ mode_t iso9660_get_posix_filemode(const iso9660_stat_t *p_iso_dirent); /*! Return a string containing the preparer id with trailing blanks removed. */ char *iso9660_get_preparer_id(const iso9660_pvd_t *p_pvd); /*! Get the preparer ID. psz_preparer_id is set to NULL if there is some problem in getting this and false is returned. */ bool iso9660_ifs_get_preparer_id(iso9660_t *p_iso, /*out*/ cdio_utf8_t **p_psz_preparer_id); /*! Return a string containing the PVD's publisher id with trailing blanks removed. */ char *iso9660_get_publisher_id(const iso9660_pvd_t *p_pvd); /*! Get the publisher ID. psz_publisher_id is set to NULL if there is some problem in getting this and false is returned. */ bool iso9660_ifs_get_publisher_id(iso9660_t *p_iso, /*out*/ cdio_utf8_t **p_psz_publisher_id); uint8_t iso9660_get_pvd_type(const iso9660_pvd_t *p_pvd); const char * iso9660_get_pvd_id(const iso9660_pvd_t *p_pvd); int iso9660_get_pvd_space_size(const iso9660_pvd_t *p_pvd); int iso9660_get_pvd_block_size(const iso9660_pvd_t *p_pvd) ; /*! Return the primary volume id version number (of pvd). If there is an error 0 is returned. */ int iso9660_get_pvd_version(const iso9660_pvd_t *pvd) ; /*! Return a string containing the PVD's system id with trailing blanks removed. */ char *iso9660_get_system_id(const iso9660_pvd_t *p_pvd); /*! Get the system ID. psz_system_id is set to NULL if there is some problem in getting this and false is returned. */ bool iso9660_ifs_get_system_id(iso9660_t *p_iso, /*out*/ cdio_utf8_t **p_psz_system_id); /*! Return the LSN of the root directory for pvd. If there is an error CDIO_INVALID_LSN is returned. */ lsn_t iso9660_get_root_lsn(const iso9660_pvd_t *p_pvd); /*! Get the volume ID in the PVD. psz_volume_id is set to NULL if there is some problem in getting this and false is returned. */ char *iso9660_get_volume_id(const iso9660_pvd_t *p_pvd); /*! Get the volume ID in the PVD. psz_volume_id is set to NULL if there is some problem in getting this and false is returned. */ bool iso9660_ifs_get_volume_id(iso9660_t *p_iso, /*out*/ cdio_utf8_t **p_psz_volume_id); /*! Return the volumeset ID in the PVD. NULL is returned if there is some problem in getting this. */ char *iso9660_get_volumeset_id(const iso9660_pvd_t *p_pvd); /*! Get the volumeset ID. psz_systemset_id is set to NULL if there is some problem in getting this and false is returned. */ bool iso9660_ifs_get_volumeset_id(iso9660_t *p_iso, /*out*/ cdio_utf8_t **p_psz_volumeset_id); /* pathtable */ /*! Zero's out pathable. Do this first. */ void iso9660_pathtable_init (void *pt); unsigned int iso9660_pathtable_get_size (const void *pt); uint16_t iso9660_pathtable_l_add_entry (void *pt, const char name[], uint32_t extent, uint16_t parent); uint16_t iso9660_pathtable_m_add_entry (void *pt, const char name[], uint32_t extent, uint16_t parent); /**===================================================================== Volume Descriptors ======================================================================*/ void iso9660_set_pvd (void *pd, const char volume_id[], const char application_id[], const char publisher_id[], const char preparer_id[], uint32_t iso_size, const void *root_dir, uint32_t path_table_l_extent, uint32_t path_table_m_extent, uint32_t path_table_size, const time_t *pvd_time); void iso9660_set_evd (void *pd); /*! Return true if ISO 9660 image has extended attrributes (XA). */ bool iso9660_ifs_is_xa (const iso9660_t * p_iso); #ifndef DO_NOT_WANT_COMPATIBILITY /** For compatibility with < 0.77 */ #define iso9660_isdchar iso9660_is_dchar #define iso9660_isachar iso9660_is_achar #endif /*DO_NOT_WANT_COMPATIBILITY*/ #ifdef __cplusplus } #endif /* __cplusplus */ #undef ISODCL #endif /* __CDIO_ISO9660_H__ */ /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/include/cdio/sector.h0000644000175000017500000002647211126441340014012 00000000000000/* $Id: sector.h,v 1.38 2008/03/25 15:59:09 karl Exp $ Copyright (C) 2003, 2004, 2005, 2006, 2008 Rocky Bernstein Copyright (C) 2000 Herbert Valerio Riedel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /*! \file sector.h \brief Things related to CD-ROM layout: tracks, sector sizes, MSFs, LBAs. A CD-ROM physical sector size is 2048, 2052, 2056, 2324, 2332, 2336, 2340, or 2352 bytes long. Sector types of the standard CD-ROM data formats: \verbatim format sector type user data size (bytes) ----------------------------------------------------------------------------- 1 (Red Book) CD-DA 2352 (CDIO_CD_FRAMESIZE_RAW) 2 (Yellow Book) Mode1 Form1 2048 (CDIO_CD_FRAMESIZE) 3 (Yellow Book) Mode1 Form2 2336 (M2RAW_SECTOR_SIZE) 4 (Green Book) Mode2 Form1 2048 (CDIO_CD_FRAMESIZE) 5 (Green Book) Mode2 Form2 2328 (2324+4 spare bytes) The layout of the standard CD-ROM data formats: ----------------------------------------------------------------------------- - audio (red): | audio_sample_bytes | | 2352 | - data (yellow, mode1): | sync - head - data - EDC - zero - ECC | | 12 - 4 - 2048 - 4 - 8 - 276 | - data (yellow, mode2): | sync - head - data | | 12 - 4 - 2336 | - XA data (green, mode2 form1): | sync - head - sub - data - EDC - ECC | | 12 - 4 - 8 - 2048 - 4 - 276 | - XA data (green, mode2 form2): | sync - head - sub - data - Spare | | 12 - 4 - 8 - 2324 - 4 | \endverbatim */ #ifndef _CDIO_SECTOR_H_ #define _CDIO_SECTOR_H_ #ifdef __cplusplus extern "C" { #endif #include /*! Information that can be obtained through a Read Subchannel command. */ #define CDIO_SUBCHANNEL_SUBQ_DATA 0 #define CDIO_SUBCHANNEL_CURRENT_POSITION 1 #define CDIO_SUBCHANNEL_MEDIA_CATALOG 2 #define CDIO_SUBCHANNEL_TRACK_ISRC 3 /*! track flags * Q Sub-channel Control Field (4.2.3.3) */ typedef enum { NONE = 0x00, /* no flags set */ PRE_EMPHASIS = 0x01, /* audio track recorded with pre-emphasis */ COPY_PERMITTED = 0x02, /* digital copy permitted */ DATA = 0x04, /* data track */ FOUR_CHANNEL_AUDIO = 0x08, /* 4 audio channels */ SCMS = 0x10 /* SCMS (5.29.2.7) */ } flag_t; #define CDIO_PREGAP_SECTORS 150 #define CDIO_POSTGAP_SECTORS 150 /*! An enumeration for some of the CDIO_CD \#defines below. This isn't really an enumeration one would really use in a program it is to be helpful in debuggers where wants just to refer to the CDIO_CD_ names and get something. */ extern enum cdio_cd_enums { CDIO_CD_MINS = 74, /**< max. minutes per CD, not really a limit */ CDIO_CD_SECS_PER_MIN = 60, /**< seconds per minute */ CDIO_CD_FRAMES_PER_SEC = 75, /**< frames per second */ CDIO_CD_SYNC_SIZE = 12, /**< 12 sync bytes per raw data frame */ CDIO_CD_CHUNK_SIZE = 24, /**< lowest-level "data bytes piece" */ CDIO_CD_NUM_OF_CHUNKS = 98, /**< chunks per frame */ CDIO_CD_FRAMESIZE_SUB = 96, /**< subchannel data "frame" size */ CDIO_CD_HEADER_SIZE = 4, /**< header (address) bytes per raw frame */ CDIO_CD_SUBHEADER_SIZE = 8, /**< subheader bytes per raw XA data frame */ CDIO_CD_ECC_SIZE = 276, /**< bytes ECC per most raw data frame types */ CDIO_CD_FRAMESIZE = 2048, /**< bytes per frame, "cooked" mode */ CDIO_CD_FRAMESIZE_RAW = 2352, /**< bytes per frame, "raw" mode */ CDIO_CD_FRAMESIZE_RAWER = 2646, /**< The maximum possible returned */ CDIO_CD_FRAMESIZE_RAW1 = 2340, CDIO_CD_FRAMESIZE_RAW0 = 2336, CDIO_CD_MAX_SESSIONS = 99, CDIO_CD_MIN_SESSION_NO = 1, /**<, Smallest CD session number */ CDIO_CD_MAX_LSN = 450150, /**< Largest LSN in a CD */ CDIO_CD_MIN_LSN = -450150, /**< Smallest LSN in a CD */ } cdio_cd_enums; /*! Some generally useful CD-ROM information -- mostly based on the above. This is from linux.h - not to slight other OS's. This was the first place I came across such useful stuff. */ #define CDIO_CD_MINS 74 /**< max. minutes per CD, not really a limit */ #define CDIO_CD_SECS_PER_MIN 60 /**< seconds per minute */ #define CDIO_CD_FRAMES_PER_SEC 75 /**< frames per second */ #define CDIO_CD_SYNC_SIZE 12 /**< 12 sync bytes per raw data frame */ #define CDIO_CD_CHUNK_SIZE 24 /**< lowest-level "data bytes piece" */ #define CDIO_CD_NUM_OF_CHUNKS 98 /**< chunks per frame */ #define CDIO_CD_FRAMESIZE_SUB 96 /**< subchannel data "frame" size */ #define CDIO_CD_HEADER_SIZE 4 /**< header (address) bytes per raw data frame */ #define CDIO_CD_SUBHEADER_SIZE 8 /**< subheader bytes per raw XA data frame */ #define CDIO_CD_EDC_SIZE 4 /**< bytes EDC per most raw data frame types */ #define CDIO_CD_M1F1_ZERO_SIZE 8 /**< bytes zero per yellow book mode 1 frame */ #define CDIO_CD_ECC_SIZE 276 /**< bytes ECC per most raw data frame types */ #define CDIO_CD_FRAMESIZE 2048 /**< bytes per frame, "cooked" mode */ #define CDIO_CD_FRAMESIZE_RAW 2352 /**< bytes per frame, "raw" mode */ #define CDIO_CD_FRAMESIZE_RAWER 2646 /**< The maximum possible returned bytes */ #define CDIO_CD_FRAMESIZE_RAW1 (CDIO_CD_CD_FRAMESIZE_RAW-CDIO_CD_SYNC_SIZE) /*2340*/ #define CDIO_CD_FRAMESIZE_RAW0 (CDIO_CD_FRAMESIZE_RAW-CDIO_CD_SYNC_SIZE-CDIO_CD_HEADER_SIZE) /*2336*/ /*! "before data" part of raw XA (green, mode2) frame */ #define CDIO_CD_XA_HEADER (CDIO_CD_HEADER_SIZE+CDIO_CD_SUBHEADER_SIZE) /*! "after data" part of raw XA (green, mode2 form1) frame */ #define CDIO_CD_XA_TAIL (CDIO_CD_EDC_SIZE+CDIO_CD_ECC_SIZE) /*! "before data" sync bytes + header of XA (green, mode2) frame */ #define CDIO_CD_XA_SYNC_HEADER (CDIO_CD_SYNC_SIZE+CDIO_CD_XA_HEADER) /*! String of bytes used to identify the beginning of a Mode 1 or Mode 2 sector. */ extern const uint8_t CDIO_SECTOR_SYNC_HEADER[CDIO_CD_SYNC_SIZE]; /**< {0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0}; */ /*! An enumeration for some of the M2*_SECTOR_SIZE \#defines below. This isn't really an enumeration one would really use in a program it is to be helpful in debuggers where wants just to refer to the M2*_SECTOR_SIZE names and get something. */ extern enum m2_sector_enums { M2F2_SECTOR_SIZE = 2324, M2SUB_SECTOR_SIZE = 2332, M2RAW_SECTOR_SIZE = 2336 } m2_sector_enums; #define M2F2_SECTOR_SIZE 2324 #define M2SUB_SECTOR_SIZE 2332 #define M2RAW_SECTOR_SIZE 2336 /*! Largest CD session number */ #define CDIO_CD_MAX_SESSIONS 99 /*! Smallest CD session number */ #define CDIO_CD_MIN_SESSION_NO 1 /*! Largest LSN in a CD */ #define CDIO_CD_MAX_LSN 450150 /*! Smallest LSN in a CD */ #define CDIO_CD_MIN_LSN -450150 #define CDIO_CD_FRAMES_PER_MIN \ (CDIO_CD_FRAMES_PER_SEC*CDIO_CD_SECS_PER_MIN) #define CDIO_CD_74MIN_SECTORS (UINT32_C(74)*CDIO_CD_FRAMES_PER_MIN) #define CDIO_CD_80MIN_SECTORS (UINT32_C(80)*CDIO_CD_FRAMES_PER_MIN) #define CDIO_CD_90MIN_SECTORS (UINT32_C(90)*CDIO_CD_FRAMES_PER_MIN) #define CDIO_CD_MAX_SECTORS \ (UINT32_C(100)*CDIO_CD_FRAMES_PER_MIN-CDIO_PREGAP_SECTORS) #define msf_t_SIZEOF 3 /*! Convert an LBA into a string representation of the MSF. \warning cdio_lba_to_msf_str returns new allocated string */ char *cdio_lba_to_msf_str (lba_t i_lba); /*! Convert an MSF into a string representation of the MSF. \warning cdio_msf_to_msf_str returns new allocated string */ char *cdio_msf_to_str (const msf_t *p_msf); /*! Convert an LBA into the corresponding LSN. */ lba_t cdio_lba_to_lsn (lba_t i_lba); /*! Convert an LBA into the corresponding MSF. */ void cdio_lba_to_msf(lba_t i_lba, msf_t *p_msf); /*! Convert an LSN into the corresponding LBA. CDIO_INVALID_LBA is returned if there is an error. */ lba_t cdio_lsn_to_lba (lsn_t i_lsn); /*! Convert an LSN into the corresponding MSF. */ void cdio_lsn_to_msf (lsn_t i_lsn, msf_t *p_msf); /*! Convert a MSF into the corresponding LBA. CDIO_INVALID_LBA is returned if there is an error. */ lba_t cdio_msf_to_lba (const msf_t *p_msf); /*! Convert a MSF into the corresponding LSN. CDIO_INVALID_LSN is returned if there is an error. */ lsn_t cdio_msf_to_lsn (const msf_t *p_msf); /*! Convert a MSF - broken out as 3 integer components into the corresponding LBA. CDIO_INVALID_LBA is returned if there is an error. */ lba_t cdio_msf3_to_lba (unsigned int minutes, unsigned int seconds, unsigned int frames); /*! Convert a string of the form MM:SS:FF into the corresponding LBA. CDIO_INVALID_LBA is returned if there is an error. */ lba_t cdio_mmssff_to_lba (const char *psz_mmssff); #ifdef __cplusplus } #endif #ifndef DO_NOT_WANT_PARANOIA_COMPATIBILITY /** For compatibility with good ol' paranoia */ #define CD_FRAMESIZE_RAW CDIO_CD_FRAMESIZE_RAW #endif /*DO_NOT_WANT_PARANOIA_COMPATIBILITY*/ #endif /* _CDIO_SECTOR_H_ */ /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/include/cdio/mmc_cmds.h0000644000175000017500000000174111334421414014266 00000000000000/* Copyright (C) 2010 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef __CDIO_MMC_CMDS_H__ #define __CDIO_MMC_CMDS_H__ #include #include #include #endif /* __CDIO_MMC_CMDS_H__ */ /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/include/cdio/rock.h0000644000175000017500000003613511565177122013461 00000000000000/* Copyright (C) 2005, 2006 2008 Rocky Bernstein See also rock.c by Eric Youngdale (1993) from GNU/Linux This is Copyright 1993 Yggdrasil Computing, Incorporated This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /*! \file rock.h \brief Things related to the Rock Ridge Interchange Protocol (RRIP) Applications will probably not include this directly but via the iso9660.h header. */ #ifndef __CDIO_ROCK_H__ #define __CDIO_ROCK_H__ #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* MSYS 1.0.10 with MinGW 3.4.2 (and perhaps others) don't have S_ISSOCK() or S_ISLNK() macros, so we'll roll our own. */ #if !defined(HAVE_S_ISSOCK) && !defined(S_ISSOCK) #define S_ISSOCK(st_mode) ((((st_mode)) & 0170000) == (0140000)) #endif #if !defined(HAVE_S_ISLNK) && !defined(S_ISLNK) #define S_ISLNK(st_mode) ((((st_mode)) & 0170000) == (0010000)) #endif /*! An enumeration for some of the ISO_ROCK_* \#defines below. This isn't really an enumeration one would really use in a program it is to be helpful in debuggers where wants just to refer to the ISO_ROCK_* names and get something. */ extern enum iso_rock_enums { ISO_ROCK_IRUSR = 000400, /**< read permission (owner) */ ISO_ROCK_IWUSR = 000200, /**< write permission (owner) */ ISO_ROCK_IXUSR = 000100, /**< execute permission (owner) */ ISO_ROCK_IRGRP = 000040, /**< read permission (group) */ ISO_ROCK_IWGRP = 000020, /**< write permission (group) */ ISO_ROCK_IXGRP = 000010, /**< execute permission (group) */ ISO_ROCK_IROTH = 000004, /**< read permission (other) */ ISO_ROCK_IWOTH = 000002, /**< write permission (other) */ ISO_ROCK_IXOTH = 000001, /**< execute permission (other) */ ISO_ROCK_ISUID = 004000, /**< set user ID on execution */ ISO_ROCK_ISGID = 002000, /**< set group ID on execution */ ISO_ROCK_ISVTX = 001000, /**< save swapped text even after use */ ISO_ROCK_ISSOCK = 0140000, /**< socket */ ISO_ROCK_ISLNK = 0120000, /**< symbolic link */ ISO_ROCK_ISREG = 0100000, /**< regular */ ISO_ROCK_ISBLK = 060000, /**< block special */ ISO_ROCK_ISCHR = 020000, /**< character special */ ISO_ROCK_ISDIR = 040000, /**< directory */ ISO_ROCK_ISFIFO = 010000 /**< pipe or FIFO */ } iso_rock_enums; #define ISO_ROCK_IRUSR 000400 /** read permission (owner) */ #define ISO_ROCK_IWUSR 000200 /** write permission (owner) */ #define ISO_ROCK_IXUSR 000100 /** execute permission (owner) */ #define ISO_ROCK_IRGRP 000040 /** read permission (group) */ #define ISO_ROCK_IWGRP 000020 /** write permission (group) */ #define ISO_ROCK_IXGRP 000010 /** execute permission (group) */ #define ISO_ROCK_IROTH 000004 /** read permission (other) */ #define ISO_ROCK_IWOTH 000002 /** write permission (other) */ #define ISO_ROCK_IXOTH 000001 /** execute permission (other) */ #define ISO_ROCK_ISUID 004000 /** set user ID on execution */ #define ISO_ROCK_ISGID 002000 /** set group ID on execution */ #define ISO_ROCK_ISVTX 001000 /** save swapped text even after use */ #define ISO_ROCK_ISSOCK 0140000 /** socket */ #define ISO_ROCK_ISLNK 0120000 /** symbolic link */ #define ISO_ROCK_ISREG 0100000 /** regular */ #define ISO_ROCK_ISBLK 060000 /** block special */ #define ISO_ROCK_ISCHR 020000 /** character special */ #define ISO_ROCK_ISDIR 040000 /** directory */ #define ISO_ROCK_ISFIFO 010000 /** pipe or FIFO */ /** Enforced file locking (shared w/set group ID) */ #define ISO_ROCK_ENFMT ISO_ROCK_ISGID PRAGMA_BEGIN_PACKED /*! The next two structs are used by the system-use-sharing protocol (SUSP), in which the Rock Ridge extensions are embedded. It is quite possible that other extensions are present on the disk, and this is fine as long as they all use SUSP. */ /*! system-use-sharing protocol */ typedef struct iso_su_sp_s{ unsigned char magic[2]; uint8_t skip; } GNUC_PACKED iso_su_sp_t; /*! system-use extension record */ typedef struct iso_su_er_s { iso711_t len_id; /**< Identifier length. Value 10?. */ unsigned char len_des; unsigned char len_src; iso711_t ext_ver; /**< Extension version. Value 1? */ char data[EMPTY_ARRAY_SIZE]; } GNUC_PACKED iso_su_er_t; typedef struct iso_su_ce_s { char extent[8]; char offset[8]; char size[8]; } iso_su_ce_t; /*! POSIX file attributes, PX. See Rock Ridge Section 4.1.2 */ typedef struct iso_rock_px_s { iso733_t st_mode; /*! file mode permissions; same as st_mode of POSIX:5.6.1 */ iso733_t st_nlinks; /*! number of links to file; same as st_nlinks of POSIX:5.6.1 */ iso733_t st_uid; /*! user id owner of file; same as st_uid of POSIX:5.6.1 */ iso733_t st_gid; /*! group id of file; same as st_gid of of POSIX:5.6.1 */ } GNUC_PACKED iso_rock_px_t ; /*! POSIX device number, PN. A PN is mandatory if the file type recorded in the "PX" File Mode field for a Directory Record indicates a character or block device (ISO_ROCK_ISCHR | ISO_ROCK_ISBLK). This entry is ignored for other (non-Direcotry) file types. No more than one "PN" is recorded in the System Use Area of a Directory Record. See Rock Ridge Section 4.1.2 */ typedef struct iso_rock_pn_s { iso733_t dev_high; /**< high-order 32 bits of the 64 bit device number. 7.2.3 encoded */ iso733_t dev_low; /**< low-order 32 bits of the 64 bit device number. 7.2.3 encoded */ } GNUC_PACKED iso_rock_pn_t ; /*! These are the bits and their meanings for flags in the SL structure. */ typedef enum { ISO_ROCK_SL_CONTINUE = 1, ISO_ROCK_SL_CURRENT = 2, ISO_ROCK_SL_PARENT = 4, ISO_ROCK_SL_ROOT = 8 } iso_rock_sl_flag_t; #define ISO_ROCK_SL_CONTINUE 1 #define ISO_ROCK_SL_CURRENT 2 #define ISO_ROCK_SL_PARENT 4 #define ISO_ROCK_SL_ROOT 8 typedef struct iso_rock_sl_part_s { uint8_t flags; uint8_t len; char text[EMPTY_ARRAY_SIZE]; } GNUC_PACKED iso_rock_sl_part_t ; /*! Symbolic link. See Rock Ridge Section 4.1.3 */ typedef struct iso_rock_sl_s { unsigned char flags; iso_rock_sl_part_t link; } GNUC_PACKED iso_rock_sl_t ; /*! Alternate name. See Rock Ridge Section 4.1.4 */ /*! These are the bits and their meanings for flags in the NM structure. */ typedef enum { ISO_ROCK_NM_CONTINUE = 1, ISO_ROCK_NM_CURRENT = 2, ISO_ROCK_NM_PARENT = 4, } iso_rock_nm_flag_t; #define ISO_ROCK_NM_CONTINUE 1 #define ISO_ROCK_NM_CURRENT 2 #define ISO_ROCK_NM_PARENT 4 typedef struct iso_rock_nm_s { unsigned char flags; char name[EMPTY_ARRAY_SIZE]; } GNUC_PACKED iso_rock_nm_t ; /*! Child link. See Section 4.1.5.1 */ typedef struct iso_rock_cl_s { char location[1]; } GNUC_PACKED iso_rock_cl_t ; /*! Parent link. See Section 4.1.5.2 */ typedef struct iso_rock_pl_s { char location[1]; } GNUC_PACKED iso_rock_pl_t ; /*! These are the bits and their meanings for flags in the TF structure. */ typedef enum { ISO_ROCK_TF_CREATE = 1, ISO_ROCK_TF_MODIFY = 2, ISO_ROCK_TF_ACCESS = 4, ISO_ROCK_TF_ATTRIBUTES = 8, ISO_ROCK_TF_BACKUP = 16, ISO_ROCK_TF_EXPIRATION = 32, ISO_ROCK_TF_EFFECTIVE = 64, ISO_ROCK_TF_LONG_FORM = 128 } iso_rock_tf_flag_t; /* These are the bits and their meanings for flags in the TF structure. */ #define ISO_ROCK_TF_CREATE 1 #define ISO_ROCK_TF_MODIFY 2 #define ISO_ROCK_TF_ACCESS 4 #define ISO_ROCK_TF_ATTRIBUTES 8 #define ISO_ROCK_TF_BACKUP 16 #define ISO_ROCK_TF_EXPIRATION 32 #define ISO_ROCK_TF_EFFECTIVE 64 #define ISO_ROCK_TF_LONG_FORM 128 /*! Time stamp(s) for a file. See Rock Ridge Section 4.1.6 */ typedef struct iso_rock_tf_s { uint8_t flags; /**< See ISO_ROCK_TF_* bits above. */ uint8_t time_bytes[EMPTY_ARRAY_SIZE]; /**< A homogenious array of iso9660_ltime_t or iso9660_dtime_t entries depending on flags & ISO_ROCK_TF_LONG_FORM. Lacking a better method, we store this as an array of bytes and a cast to the appropriate type will have to be made before extraction. */ } GNUC_PACKED iso_rock_tf_t ; /*! File data in sparse format. See Rock Ridge Section 4.1.7 */ typedef struct iso_rock_sf_s { iso733_t virtual_size_high; /**< high-order 32 bits of virtual size */ iso733_t virtual_size_low; /**< low-order 32 bits of virtual size */ uint8_t table_depth; } GNUC_PACKED iso_rock_sf_t ; typedef struct iso_extension_record_s { char signature[2]; /**< signature word; either 'SP', 'CE', 'ER', 'RR', 'PX', 'PN', 'SL', 'NM', 'CL', 'PL', 'TF', or 'ZF' */ iso711_t len; /**< length of system-user area - 44 for PX 20 for PN, 5+strlen(text) for SL, 21 for SF, etc. */ iso711_t version; /**< version number - value 1 */ union { iso_su_sp_t SP; /**< system-use-sharing protocol - not strictly part of Rock Ridge */ iso_su_er_t ER; /**< system-use extension packet - not strictly part of Rock Ridge */ iso_su_ce_t CE; /**< system-use - strictly part of Rock Ridge */ iso_rock_px_t PX; /**< Rock Ridge POSIX file attributes */ iso_rock_pn_t PN; /**< Rock Ridge POSIX device number */ iso_rock_sl_t SL; /**< Rock Ridge symbolic link */ iso_rock_nm_t NM; /**< Rock Ridge alternate name */ iso_rock_cl_t CL; /**< Rock Ridge child link */ iso_rock_pl_t PL; /**< Rock Ridge parent link */ iso_rock_tf_t TF; /**< Rock Ridge timestamp(s) for a file */ } u; } GNUC_PACKED iso_extension_record_t; typedef struct iso_rock_time_s { bool b_used; /**< If true, field has been set and is valid. Otherwise remaning fields are meaningless. */ bool b_longdate; /**< If true date format is a iso9660_ltime_t. Otherwise date is iso9660_dtime_t */ union { iso9660_ltime_t ltime; iso9660_dtime_t dtime; } t; } GNUC_PACKED iso_rock_time_t; typedef struct iso_rock_statbuf_s { bool_3way_t b3_rock; /**< has Rock Ridge extension. If "yep", then the fields are used. */ posix_mode_t st_mode; /**< protection */ posix_nlink_t st_nlinks; /**< number of hard links */ posix_uid_t st_uid; /**< user ID of owner */ posix_gid_t st_gid; /**< group ID of owner */ uint8_t s_rock_offset; int i_symlink; /**< size of psz_symlink */ int i_symlink_max; /**< max allocated to psz_symlink */ char *psz_symlink; /**< if symbolic link, name of pointed to file. */ iso_rock_time_t create; /**< create time See ISO 9660:9.5.4. */ iso_rock_time_t modify; /**< time of last modification ISO 9660:9.5.5. st_mtime field of POSIX:5.6.1. */ iso_rock_time_t access; /**< time of last file access st_atime field of POSIX:5.6.1. */ iso_rock_time_t attributes; /**< time of last attribute change. st_ctime field of POSIX:5.6.1. */ iso_rock_time_t backup; /**< time of last backup. */ iso_rock_time_t expiration; /**< time of expiration; See ISO 9660:9.5.6. */ iso_rock_time_t effective; /**< Effective time; See ISO 9660:9.5.7. */ uint32_t i_rdev; /**< the upper 16-bits is major device number, the lower 16-bits is the minor device number */ } iso_rock_statbuf_t; PRAGMA_END_PACKED /*! return length of name field; 0: not found, -1: to be ignored */ int get_rock_ridge_filename(iso9660_dir_t * de, /*out*/ char * retname, /*out*/ iso9660_stat_t *p_stat); int parse_rock_ridge_stat(iso9660_dir_t *de, /*out*/ iso9660_stat_t *p_stat); /*! Returns POSIX mode bitstring for a given file. */ mode_t iso9660_get_posix_filemode_from_rock(const iso_rock_statbuf_t *rr); /*! Returns a string which interpreting the POSIX mode st_mode. For example: \verbatim drwxrws--- -rw---Sr-- lrwxrwxrwx \endverbatim A description of the characters in the string follows The 1st character is either "d" if the entry is a directory, "l" is a symbolic link or "-" if neither. The 2nd to 4th characters refer to permissions for a user while the the 5th to 7th characters refer to permissions for a group while, and the 8th to 10h characters refer to permissions for everyone. In each of these triplets the first character (2, 5, 8) is "r" if the entry is allowed to be read. The second character of a triplet (3, 6, 9) is "w" if the entry is allowed to be written. The third character of a triplet (4, 7, 10) is "x" if the entry is executable but not user (for character 4) or group (for characters 6) settable and "s" if the item has the corresponding user/group set. For a directory having an executable property on ("x" or "s") means the directory is allowed to be listed or "searched". If the execute property is not allowed for a group or user but the corresponding group/user is set "S" indicates this. If none of these properties holds the "-" indicates this. */ const char *iso9660_get_rock_attr_str(posix_mode_t st_mode); /** These variables are not used, but are defined to facilatate debugging by letting us use enumerations values (which also correspond to \#define's inside a debugged program. */ extern iso_rock_nm_flag_t iso_rock_nm_flag; extern iso_rock_sl_flag_t iso_rock_sl_flag; extern iso_rock_tf_flag_t iso_rock_tf_flag; #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ISO_ROCK_H__ */ /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/include/cdio/udf_time.h0000644000175000017500000000423011114145233014272 00000000000000/* $Id: udf_time.h,v 1.5 2008/03/25 15:59:09 karl Exp $ Copyright (C) 2005, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /*! * \file udf_time.h * * \brief UDF time conversion and access files. * */ #ifndef UDF_TIME_H #define UDF_TIME_H #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /*! Return the access time of the file. */ time_t udf_get_access_time(const udf_dirent_t *p_udf_dirent); /*! Return the attribute (most recent create or access) time of the file */ time_t udf_get_attribute_time(const udf_dirent_t *p_udf_dirent); /*! Return the modification time of the file. */ time_t udf_get_modification_time(const udf_dirent_t *p_udf_dirent); /*! Return the access timestamp of the file */ udf_timestamp_t *udf_get_access_timestamp(const udf_dirent_t *p_udf_dirent); /*! Return the modification timestamp of the file */ udf_timestamp_t *udf_get_modification_timestamp(const udf_dirent_t *p_udf_dirent); /*! Return the attr timestamp of the file */ udf_timestamp_t *udf_get_attr_timestamp(const udf_dirent_t *p_udf_dirent); /*! Convert a UDF timestamp to a time_t. If microseconds are desired, use dest_usec. The return value is the same as dest. */ time_t *udf_stamp_to_time(time_t *dest, long int *dest_usec, const udf_timestamp_t src); udf_timestamp_t *udf_timespec_to_stamp(const struct timespec ts, udf_timestamp_t *dest); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /*UDF_TIME_H*/ libcdio-0.83/include/cdio/version.h0000644000175000017500000000147511652140273014201 00000000000000/* $Id: version.h.in,v 1.6 2005/01/29 20:54:20 rocky Exp $ */ /** \file version.h * * \brief A file containing the libcdio package version * number (83) and OS build name. */ /*! CDIO_VERSION is a C-Preprocessor macro of a string that shows what version is used. cdio_version_string has the same value, but it is a constant variable that can be accessed at run time. */ #define CDIO_VERSION "0.83 i686-pc-linux-gnu" extern const char *cdio_version_string; /**< = CDIO_VERSION */ /*! LIBCDIO_VERSION_NUM is a C-Preprocessor macro that can be used for testing in the C preprocessor. libcdio_version_num has the same value, but it is a constant variable that can be accessed at run time. */ #define LIBCDIO_VERSION_NUM 83 extern const unsigned int libcdio_version_num; /**< = LIBCDIO_VERSION_NUM */ libcdio-0.83/include/cdio/posix.h0000644000175000017500000000223611114145233013644 00000000000000/* $Id: posix.h,v 1.2 2008/03/25 15:59:09 karl Exp $ Copyright (C) 2005, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /*! * \file posix.h * * \brief various POSIX definitions. */ #ifndef __CDIO_POSIX_H__ #define __CDIO_POSIX_H__ typedef uint32_t posix_mode_t; typedef uint32_t posix_nlink_t; typedef uint32_t posix_uid_t; typedef uint32_t posix_gid_t; typedef uint16_t unicode16_t; #endif /* __CDIO_POSIX_H__ */ /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/include/cdio/xa.h0000644000175000017500000001435611114145233013120 00000000000000/* $Id: xa.h,v 1.19 2008/03/25 15:59:10 karl Exp $ Copyright (C) 2003, 2004, 2005, 2006, 2008 Rocky Bernstein Copyright (C) 2000 Herbert Valerio Riedel See also iso9660.h by Eric Youngdale (1993) and in cdrtools. These are Copyright 1993 Yggdrasil Computing, Incorporated Copyright (c) 1999,2000 J. Schilling This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /*! \file xa.h \brief Things related to the ISO-9660 XA (Extended Attributes) format Applications will probably not include this directly but via the iso9660.h header. */ #ifndef __CDIO_XA_H__ #define __CDIO_XA_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /*! An enumeration for some of the XA_* \#defines below. This isn't really an enumeration one would really use in a program it is to be helpful in debuggers where wants just to refer to the XA_* names and get something. */ typedef enum { ISO_XA_MARKER_OFFSET = 1024, XA_PERM_RSYS = 0x0001, /**< System Group Read */ XA_PERM_XSYS = 0x0004, /**< System Group Execute */ XA_PERM_RUSR = 0x0010, /**< User (owner) Read */ XA_PERM_XUSR = 0x0040, /**< User (owner) Execute */ XA_PERM_RGRP = 0x0100, /**< Group Read */ XA_PERM_XGRP = 0x0400, /**< Group Execute */ XA_PERM_ROTH = 0x1000, /**< Other (world) Read */ XA_PERM_XOTH = 0x4000, /**< Other (world) Execute */ XA_ATTR_MODE2FORM1 = (1 << 11), XA_ATTR_MODE2FORM2 = (1 << 12), XA_ATTR_INTERLEAVED = (1 << 13), XA_ATTR_CDDA = (1 << 14), XA_ATTR_DIRECTORY = (1 << 15), XA_PERM_ALL_READ = (XA_PERM_RUSR | XA_PERM_RSYS | XA_PERM_RGRP), XA_PERM_ALL_EXEC = (XA_PERM_XUSR | XA_PERM_XSYS | XA_PERM_XGRP), XA_PERM_ALL_ALL = (XA_PERM_ALL_READ | XA_PERM_ALL_EXEC), XA_FORM1_DIR = (XA_ATTR_DIRECTORY | XA_ATTR_MODE2FORM1 | XA_PERM_ALL_ALL), XA_FORM1_FILE = (XA_ATTR_MODE2FORM1 | XA_PERM_ALL_ALL), XA_FORM2_FILE = (XA_ATTR_MODE2FORM2 | XA_PERM_ALL_ALL) } xa_misc_enum_t; extern const char ISO_XA_MARKER_STRING[sizeof("CD-XA001")-1]; #define ISO_XA_MARKER_STRING "CD-XA001" /*! \brief "Extended Architecture" according to the Philips Yellow Book. CD-ROM EXtended Architecture is a modification to the CD-ROM specification that defines two new types of sectors. CD-ROM XA was developed jointly by Sony, Philips, and Microsoft, and announced in August 1988. Its specifications were published in an extension to the Yellow Book. CD-i, Photo CD, Video CD and CD-EXTRA have all subsequently been based on CD-ROM XA. CD-XA defines another way of formatting sectors on a CD-ROM, including headers in the sectors that describe the type (audio, video, data) and some additional info (markers, resolution in case of a video or audio sector, file numbers, etc). The data written on a CD-XA is consistent with and can be in ISO-9660 file system format and therefore be readable by ISO-9660 file system translators. But also a CD-I player can also read CD-XA discs even if its own `Green Book' file system only resembles ISO 9660 and isn't fully compatible. Note structure is big-endian. */ typedef struct iso9660_xa_s { uint16_t group_id; /**< 0 */ uint16_t user_id; /**< 0 */ uint16_t attributes; /**< XA_ATTR_ */ char signature[2]; /**< { 'X', 'A' } */ uint8_t filenum; /**< file number, see also XA subheader */ uint8_t reserved[5]; /**< zero */ } GNUC_PACKED iso9660_xa_t; /*! Returns POSIX mode bitstring for a given file. */ posix_mode_t iso9660_get_posix_filemode_from_xa(uint16_t i_perms); /*! Returns a string interpreting the extended attribute xa_attr. For example: \verbatim d---1xrxrxr ---2--r-r-r -a--1xrxrxr \endverbatim A description of the characters in the string follows. The 1st character is either "d" if the entry is a directory, or "-" if not The 2nd character is either "a" if the entry is CDDA (audio), or "-" if not The 3rd character is either "i" if the entry is interleaved, or "-" if not The 4th character is either "2" if the entry is mode2 form2 or "-" if not The 5th character is either "1" if the entry is mode2 form1 or "-" if not Note that an entry will either be in mode2 form1 or mode form2. That is you will either see "2-" or "-1" in the 4th & 5th positions. The 6th and 7th characters refer to permissions for a user while the the 8th and 9th characters refer to permissions for a group while, and the 10th and 11th characters refer to permissions for everyone. In each of these pairs the first character (6, 8, 10) is "x" if the entry is executable. For a directory this means the directory is allowed to be listed or "searched". The second character of a pair (7, 9, 11) is "r" if the entry is allowed to be read. */ const char * iso9660_get_xa_attr_str (uint16_t xa_attr); /*! Allocates and initalizes a new iso9600_xa_t variable and returns it. The caller should free the returned result. @see iso9660_xa */ iso9660_xa_t * iso9660_xa_init (iso9660_xa_t *_xa, uint16_t uid, uint16_t gid, uint16_t attr, uint8_t filenum); #ifdef __cplusplus } /** The below variables are trickery to force the above enum symbol values to be recorded in debug symbol tables. They are used to allow one to refer to the enumeration value names in the typedefs above in a debugger and debugger expressions. */ extern xa_misc_enum_t debugger_xa_misc_enum; #endif /* __cplusplus */ #endif /* __CDIO_XA_H__ */ /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/include/cdio/cdda.h0000644000175000017500000003341211114145233013375 00000000000000/* $Id: cdda.h,v 1.30 2008/03/25 15:59:08 karl Exp $ Copyright (C) 2004, 2005, 2006, 2008 Rocky Bernstein Copyright (C) 2001 Xiph.org and Heiko Eissfeldt heiko@escape.colossus.de This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** \file cdda.h * * \brief The top-level interface header for libcdio_cdda. * Applications include this for paranoia access. * ******************************************************************/ #ifndef _CDDA_INTERFACE_H_ #define _CDDA_INTERFACE_H_ #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** cdrom_paranoia is an opaque structure which is used in all of the library operations. */ typedef struct cdrom_paranoia_s cdrom_paranoia_t; typedef struct cdrom_drive_s cdrom_drive_t; /** For compatibility. cdrom_drive_t is deprecated, use cdrom_drive_t instead. */ /** Flags for simulating jitter used in testing. The enumeration type one probably wouldn't really use in a program. It is here instead of defines to give symbolic names that can be helpful in debuggers where wants just to say refer to CDDA_TEST_JITTER_SMALL and get the correct value. */ typedef enum { CDDA_MESSAGE_FORGETIT = 0, CDDA_MESSAGE_PRINTIT = 1, CDDA_MESSAGE_LOGIT = 2, CD_FRAMESAMPLES = CDIO_CD_FRAMESIZE_RAW / 4, MAXTRK = (CDIO_CD_MAX_TRACKS+1) } paranoia_cdda_enums_t; #include /** We keep MAXTRK since this header is exposed publicly and other programs may have used this. */ #define MAXTRK (CDIO_CD_MAX_TRACKS+1) /** \brief Structure for cdparanoia's CD Table of Contents */ typedef struct TOC_s { unsigned char bTrack; int32_t dwStartSector; } TOC_t; /** For compatibility. TOC is deprecated, use TOC_t instead. */ #define TOC TOC_t /** \brief Structure for cdparanoia's CD-ROM access */ struct cdrom_drive_s { CdIo_t *p_cdio; int opened; /**< This struct may just represent a candidate for opening */ char *cdda_device_name; char *drive_model; int drive_type; int bigendianp; /**< Whether data returned on the CDDA is bigendian or not. 1 if big endian, 0 if little endian and -1 if we don't know. */ int nsectors; /**< Number of sectors use in reading. Multiply by CDIO_CD_FRAMESIZE_RAW to get number of bytes used in the read buffer. */ int cd_extra; /**< -1 if we can't get multisession info, 0 if there is one session only or the multi-session LBA is less than or 100 (don't ask me why -- I don't know), and 1 if the multi-session lba is greater than 100. */ bool b_swap_bytes; /**< Swap bytes if Endian-ness of drive mismatches the endian-ness of the computer? */ track_t tracks; TOC_t disc_toc[MAXTRK]; /**< info here starts origin 0 rather than the first track number (usually 1). So to take a track number and use it here, subtract off cdio_get_first_track_num() beforehand. */ lsn_t audio_first_sector; lsn_t audio_last_sector; int errordest; int messagedest; char *errorbuf; char *messagebuf; /* functions specific to particular drives/interfaces */ int (*enable_cdda) (cdrom_drive_t *d, int onoff); int (*read_toc) (cdrom_drive_t *d); long (*read_audio) (cdrom_drive_t *d, void *p, lsn_t begin, long sectors); int (*set_speed) (cdrom_drive_t *d, int speed); int error_retry; int report_all; int is_atapi; int is_mmc; int i_test_flags; /**< Normally set 0. But if we are testing paranoia operation this can be set to one of the flag masks to simulate a particular kind of failure. */ }; /** Flags for simulating jitter used in testing. The enumeration type one probably wouldn't really use in a program. It is here instead of defines to give symbolic names that can be helpful in debuggers where wants just to say refer to CDDA_TEST_JITTER_SMALL and get the correct value. */ typedef enum { CDDA_TEST_JITTER_SMALL = 1, CDDA_TEST_JITTER_LARGE = 2, CDDA_TEST_JITTER_MASSIVE = 3, CDDA_TEST_FRAG_SMALL = (1<<3), CDDA_TEST_FRAG_LARGE = (2<<3), CDDA_TEST_FRAG_MASSIVE = (3<<3), CDDA_TEST_UNDERRUN = 64 } paranoia_jitter_t; /** jitter testing. The first two bits are set to determine the byte-distance we will jitter the data; 0 is no shifting. */ /**< jitter testing. Set the below bit to always cause jittering on reads. The below bit only has any effect if the first two (above) bits are nonzero. If the above bits are set, but the below bit isn't we'll jitter 90% of the time. */ #define CDDA_TEST_ALWAYS_JITTER 4 /** fragment testing */ #define CDDA_TEST_FRAG_SMALL (1<<3) #define CDDA_TEST_FRAG_LARGE (2<<3) #define CDDA_TEST_FRAG_MASSIVE (3<<3) /**< under-run testing. The below bit is set for testing. */ #define CDDA_TEST_UNDERRUN 64 #if TESTING_IS_FINISHED /** scratch testing */ #define CDDA_TEST_SCRATCH 128 #undef CDDA_TEST_BOGUS_BYTES 256 #undef CDDA_TEST_DROPDUPE_BYTES 512 #endif /* TESTING_IS_FINISHED */ /** autosense functions */ /** Get a CD-ROM drive with a CD-DA in it. If mesagedest is 1, then any messages in the process will be stored in message. */ extern cdrom_drive_t *cdio_cddap_find_a_cdrom(int messagedest, char **ppsz_message); /** Returns a paranoia CD-ROM drive object with a CD-DA in it or NULL if there was an error. @see cdio_cddap_identify_cdio */ extern cdrom_drive_t *cdio_cddap_identify(const char *psz_device, int messagedest, char **ppsz_message); /** Returns a paranoia CD-ROM drive object with a CD-DA in it or NULL if there was an error. In contrast to cdio_cddap_identify, we start out with an initialized p_cdio object. For example you may have used that for other purposes such as to get CDDB/CD-Text information. @see cdio_cddap_identify */ cdrom_drive_t *cdio_cddap_identify_cdio(CdIo_t *p_cdio, int messagedest, char **ppsz_messages); /** drive-oriented functions */ extern int cdio_cddap_speed_set(cdrom_drive_t *d, int speed); extern void cdio_cddap_verbose_set(cdrom_drive_t *d, int err_action, int mes_action); extern char *cdio_cddap_messages(cdrom_drive_t *d); extern char *cdio_cddap_errors(cdrom_drive_t *d); /*! Closes d and releases all storage associated with it except the internal p_cdio pointer. @param d cdrom_drive_t object to be closed. @return 0 if passed a null pointer and 1 if not in which case some work was probably done. @see cdio_cddap_close */ bool cdio_cddap_close_no_free_cdio(cdrom_drive_t *d); /*! Closes d and releases all storage associated with it. Doubles as "cdrom_drive_free()". @param d cdrom_drive_t object to be closed. @return 0 if passed a null pointer and 1 if not in which case some work was probably done. @see cdio_cddap_close_no_free_cdio */ extern int cdio_cddap_close(cdrom_drive_t *d); extern int cdio_cddap_open(cdrom_drive_t *d); extern long cdio_cddap_read(cdrom_drive_t *d, void *p_buffer, lsn_t beginsector, long sectors); /*! Return the lsn for the start of track i_track */ extern lsn_t cdio_cddap_track_firstsector(cdrom_drive_t *d, track_t i_track); /*! Get last lsn of the track. This generally one less than the start of the next track. -1 is returned on error. */ extern lsn_t cdio_cddap_track_lastsector(cdrom_drive_t *d, track_t i_track); /*! Return the number of tracks on the CD. */ extern track_t cdio_cddap_tracks(cdrom_drive_t *d); /*! Return the track containing the given LSN. If the LSN is before the first track (in the pregap), 0 is returned. If there was an error or the LSN after the LEADOUT (beyond the end of the CD), then CDIO_INVALID_TRACK is returned. */ extern int cdio_cddap_sector_gettrack(cdrom_drive_t *d, lsn_t lsn); /*! Return the number of channels in track: 2 or 4; -2 if not implemented or -1 for error. Not meaningful if track is not an audio track. */ extern int cdio_cddap_track_channels(cdrom_drive_t *d, track_t i_track); /*! Return 1 is track is an audio track, 0 otherwise. */ extern int cdio_cddap_track_audiop(cdrom_drive_t *d, track_t i_track); /*! Return 1 is track has copy permit set, 0 otherwise. */ extern int cdio_cddap_track_copyp(cdrom_drive_t *d, track_t i_track); /*! Return 1 is audio track has linear preemphasis set, 0 otherwise. Only makes sense for audio tracks. */ extern int cdio_cddap_track_preemp(cdrom_drive_t *d, track_t i_track); /*! Get first lsn of the first audio track. -1 is returned on error. */ extern lsn_t cdio_cddap_disc_firstsector(cdrom_drive_t *d); /*! Get last lsn of the last audio track. The last lsn is generally one less than the start of the next track after the audio track. -1 is returned on error. */ extern lsn_t cdio_cddap_disc_lastsector(cdrom_drive_t *d); /*! Determine Endian-ness of the CD-drive based on reading data from it. Some drives return audio data Big Endian while some (most) return data Little Endian. Drives known to return data bigendian are SCSI drives from Kodak, Ricoh, HP, Philips, Plasmon, Grundig CDR100IPW, and Mitsumi CD-R. ATAPI and MMC drives are little endian. rocky: As someone who didn't write the code, I have to say this is nothing less than brilliant. An FFT is done both ways and the the transform is looked at to see which has data in the FFT (or audible) portion. (Or so that's how I understand it.) @return 1 if big-endian, 0 if little-endian, -1 if we couldn't figure things out or some error. */ extern int data_bigendianp(cdrom_drive_t *d); /** transport errors: */ typedef enum { TR_OK = 0, TR_EWRITE = 1 /**< Error writing packet command (transport) */, TR_EREAD = 2 /**< Error reading packet data (transport) */, TR_UNDERRUN = 3 /**< Read underrun */, TR_OVERRUN = 4 /**< Read overrun */, TR_ILLEGAL = 5 /**< Illegal/rejected request */, TR_MEDIUM = 6 /**< Medium error */, TR_BUSY = 7 /**< Device busy */, TR_NOTREADY = 8 /**< Device not ready */, TR_FAULT = 9 /**< Device failure */, TR_UNKNOWN = 10 /**< Unspecified error */, TR_STREAMING = 11 /**< loss of streaming */, } transport_error_t; #ifdef NEED_STRERROR_TR const char *strerror_tr[]={ "Success", "Error writing packet command to device", "Error reading command from device", "SCSI packet data underrun (too little data)", "SCSI packet data overrun (too much data)", "Illegal SCSI request (rejected by target)", "Medium reading data from medium", "Device busy", "Device not ready", "Target hardware fault", "Unspecified error", "Drive lost streaming" }; #endif /*NEED_STERROR_TR*/ /** Errors returned by lib: \verbatim 001: Unable to set CDROM to read audio mode 002: Unable to read table of contents lead-out 003: CDROM reporting illegal number of tracks 004: Unable to read table of contents header 005: Unable to read table of contents entry 006: Could not read any data from drive 007: Unknown, unrecoverable error reading data 008: Unable to identify CDROM model 009: CDROM reporting illegal table of contents 010: Unaddressable sector 100: Interface not supported 101: Drive is neither a CDROM nor a WORM device 102: Permision denied on cdrom (ioctl) device 103: Permision denied on cdrom (data) device 300: Kernel memory error 400: Device not open 401: Invalid track number 402: Track not audio data 403: No audio tracks on disc \endverbatim */ #ifndef DO_NOT_WANT_PARANOIA_COMPATIBILITY /** For compatibility with good ol' paranoia */ #define cdda_find_a_cdrom cdio_cddap_find_a_cdrom #define cdda_identify cdio_cddap_identify #define cdda_speed_set cdio_cddap_speed_set #define cdda_verbose_set cdio_cddap_verbose_set #define cdda_messages cdio_cddap_messages #define cdda_errors cdio_cddap_errors #define cdda_close cdio_cddap_close #define cdda_open cdio_cddap_open #define cdda_read cdio_cddap_read #define cdda_track_firstsector cdio_cddap_track_firstsector #define cdda_track_lastsector cdio_cddap_track_lastsector #define cdda_tracks cdio_cddap_tracks #define cdda_sector_gettrack cdio_cddap_sector_gettrack #define cdda_track_channels cdio_cddap_track_channels #define cdda_track_audiop cdio_cddap_track_audiop #define cdda_track_copyp cdio_cddap_track_copyp #define cdda_track_preemp cdio_cddap_track_preemp #define cdda_disc_firstsector cdio_cddap_disc_firstsector #define cdda_disc_lastsector cdio_cddap_disc_lastsector #define cdrom_drive cdrom_drive_t #endif /*DO_NOT_WANT_PARANOIA_COMPATIBILITY*/ #ifdef __cplusplus } #endif /* __cplusplus */ /** The below variables are trickery to force the above enum symbol values to be recorded in debug symbol tables. They are used to allow one to refer to the enumeration value names in the typedefs above in a debugger and debugger expressions */ extern paranoia_jitter_t debug_paranoia_jitter; extern paranoia_cdda_enums_t debug_paranoia_cdda_enums; #endif /*_CDDA_INTERFACE_H_*/ libcdio-0.83/include/cdio/version.h.in0000644000175000017500000000153611315256363014610 00000000000000/* $Id: version.h.in,v 1.6 2005/01/29 20:54:20 rocky Exp $ */ /** \file version.h * * \brief A file containing the libcdio package version * number (@LIBCDIO_VERSION_NUM@) and OS build name. */ /*! CDIO_VERSION is a C-Preprocessor macro of a string that shows what version is used. cdio_version_string has the same value, but it is a constant variable that can be accessed at run time. */ #define CDIO_VERSION "@VERSION@ @build@" extern const char *cdio_version_string; /**< = CDIO_VERSION */ /*! LIBCDIO_VERSION_NUM is a C-Preprocessor macro that can be used for testing in the C preprocessor. libcdio_version_num has the same value, but it is a constant variable that can be accessed at run time. */ #define LIBCDIO_VERSION_NUM @LIBCDIO_VERSION_NUM@ extern const unsigned int libcdio_version_num; /**< = LIBCDIO_VERSION_NUM */ libcdio-0.83/include/cdio/mmc.h0000644000175000017500000010074111652130431013257 00000000000000/* Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** \file mmc.h \brief Common definitions for MMC (Multimedia Commands). Applications include this for direct MMC access. The documents we make use of are described in several specifications made by the SCSI committee T10 http://www.t10.org. In particular, SCSI Primary Commands (SPC), SCSI Block Commands (SBC), and Multi-Media Commands (MMC). These documents generally have a numeric level number appended. For example SPC-3 refers to ``SCSI Primary Commands - 3'. In year 2010 the current versions were SPC-3, SBC-2, MMC-5. */ #ifndef __CDIO_MMC_H__ #define __CDIO_MMC_H__ #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* On GNU/Linux see and */ #ifdef WORDS_BIGENDIAN # if !defined(__LITTLE_ENDIAN_BITFIELD) && !defined(__BIG_ENDIAN_BITFIELD) # define __MMC_BIG_ENDIAN_BITFIELD # endif #else # if !defined(__LITTLE_ENDIAN_BITFIELD) && !defined(__BIG_ENDIAN_BITFIELD) # define __MMC_LITTLE_ENDIAN_BITFIELD # endif #endif /** Structure of a SCSI/MMC sense reply. This has been adapted from GNU/Linux request_sense of include this for direct MMC access. See SCSI Primary Commands-2 (SPC-3) table 26 page 38. */ typedef struct cdio_mmc_request_sense { #if defined(__MMC_BIG_ENDIAN_BITFIELD) uint8_t valid : 1; /**< valid bit is 1 if info is valid */ uint8_t error_code : 7; #else uint8_t error_code : 7; uint8_t valid : 1; /**< valid bit is 1 if info is valid */ #endif uint8_t segment_number; #if defined(__MMC_BIG_ENDIAN_BITFIELD) uint8_t filemark : 1; /**< manditory in sequential * access devices */ uint8_t eom : 1; /**< end of medium. manditory in * sequential access and * printer devices */ uint8_t ili : 1; /**< incorrect length indicator */ uint8_t reserved1 : 1; uint8_t sense_key : 4; #else uint8_t sense_key : 4; uint8_t reserved1 : 1; uint8_t ili : 1; /**< incorrect length indicator */ uint8_t eom : 1; /**< end of medium. manditory in * sequential access and * printer devices */ uint8_t filemark : 1; /**< manditory in sequential * access devices */ #endif uint8_t information[4]; uint8_t additional_sense_len; /**< Additional sense length (n-7) */ uint8_t command_info[4]; /**< Command-specific information */ uint8_t asc; /**< Additional sense code */ uint8_t ascq; /**< Additional sense code qualifier */ uint8_t fruc; /**< Field replaceable unit code */ uint8_t sks[3]; /**< Sense-key specific */ uint8_t asb[46]; /**< Additional sense bytes */ } cdio_mmc_request_sense_t; /** Meanings of the values of mmc_request_sense.sense_key */ typedef enum { CDIO_MMC_SENSE_KEY_NO_SENSE = 0, CDIO_MMC_SENSE_KEY_RECOVERED_ERROR = 1, CDIO_MMC_SENSE_KEY_NOT_READY = 2, CDIO_MMC_SENSE_KEY_MEDIUM_ERROR = 3, CDIO_MMC_SENSE_KEY_HARDWARE_ERROR = 4, CDIO_MMC_SENSE_KEY_ILLEGAL_REQUEST = 5, CDIO_MMC_SENSE_KEY_UNIT_ATTENTION = 6, CDIO_MMC_SENSE_KEY_DATA_PROTECT = 7, CDIO_MMC_SENSE_KEY_BLANK_CHECK = 8, CDIO_MMC_SENSE_KEY_VENDOR_SPECIFIC = 9, CDIO_MMC_SENSE_KEY_COPY_ABORTED = 10, CDIO_MMC_SENSE_KEY_ABORTED_COMMAND = 11, CDIO_MMC_SENSE_KEY_OBSOLETE = 12, } cdio_mmc_sense_key_t; /** \brief The opcode-portion (generic packet commands) of an MMC command. In general, those opcodes that end in 6 take a 6-byte command descriptor, those that end in 10 take a 10-byte descriptor and those that in in 12 take a 12-byte descriptor. (Not that you need to know that, but it seems to be a big deal in the MMC specification.) */ typedef enum { CDIO_MMC_GPCMD_TEST_UNIT_READY = 0x00, /**< test if drive ready. */ CDIO_MMC_GPCMD_INQUIRY = 0x12, /**< Request drive information. */ CDIO_MMC_GPCMD_MODE_SELECT_6 = 0x15, /**< Select medium (6 bytes). */ CDIO_MMC_GPCMD_MODE_SENSE_6 = 0x1a, /**< Get medium or device information. Should be issued before MODE SELECT to get mode support or save current settings. (6 bytes). */ CDIO_MMC_GPCMD_START_STOP_UNIT = 0x1b, /**< Enable/disable Disc operations. (6 bytes). */ CDIO_MMC_GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL = 0x1e, /**< Enable/disable Disc removal. (6 bytes). */ /** Group 2 Commands (CDB's here are 10-bytes) */ CDIO_MMC_GPCMD_READ_10 = 0x28, /**< Read data from drive (10 bytes). */ CDIO_MMC_GPCMD_READ_SUBCHANNEL = 0x42, /**< Read Sub-Channel data. (10 bytes). */ CDIO_MMC_GPCMD_READ_TOC = 0x43, /**< READ TOC/PMA/ATIP. (10 bytes). */ CDIO_MMC_GPCMD_READ_HEADER = 0x44, CDIO_MMC_GPCMD_PLAY_AUDIO_10 = 0x45, /**< Begin audio playing at current position (10 bytes). */ CDIO_MMC_GPCMD_GET_CONFIGURATION = 0x46, /**< Get drive Capabilities (10 bytes) */ CDIO_MMC_GPCMD_PLAY_AUDIO_MSF = 0x47, /**< Begin audio playing at specified MSF (10 bytes). */ CDIO_MMC_GPCMD_PLAY_AUDIO_TI = 0x48, CDIO_MMC_GPCMD_PLAY_TRACK_REL_10 = 0x49, /**< Play audio at the track relative LBA. (10 bytes). Doesn't seem to be part of MMC standards but is handled by Plextor drives. */ CDIO_MMC_GPCMD_GET_EVENT_STATUS = 0x4a, /**< Report events and Status. */ CDIO_MMC_GPCMD_PAUSE_RESUME = 0x4b, /**< Stop or restart audio playback. (10 bytes). Used with a PLAY command. */ CDIO_MMC_GPCMD_READ_DISC_INFO = 0x51, /**< Get CD information. (10 bytes). */ CDIO_MMC_GPCMD_READ_TRACK_INFORMATION = 0x52, /**< Information about a logical track. */ CDIO_MMC_GPCMD_MODE_SELECT_10 = 0x55, /**< Select medium (10-bytes). */ CDIO_MMC_GPCMD_MODE_SENSE_10 = 0x5a, /**< Get medium or device information. Should be issued before MODE SELECT to get mode support or save current settings. (6 bytes). */ /** Group 5 Commands (CDB's here are 12-bytes) */ CDIO_MMC_GPCMD_PLAY_AUDIO_12 = 0xa5, /**< Begin audio playing at current position (12 bytes) */ CDIO_MMC_GPCMD_LOAD_UNLOAD = 0xa6, /**< Load/unload a Disc (12 bytes) */ CDIO_MMC_GPCMD_READ_12 = 0xa8, /**< Read data from drive (12 bytes). */ CDIO_MMC_GPCMD_PLAY_TRACK_REL_12 = 0xa9, /**< Play audio at the track relative LBA. (12 bytes). Doesn't seem to be part of MMC standards but is handled by Plextor drives. */ CDIO_MMC_GPCMD_READ_DVD_STRUCTURE = 0xad, /**< Get DVD structure info from media (12 bytes). */ CDIO_MMC_GPCMD_READ_MSF = 0xb9, /**< Read almost any field of a CD sector at specified MSF. (12 bytes). */ CDIO_MMC_GPCMD_SET_SPEED = 0xbb, /**< Set drive speed (12 bytes). This is listed as optional in ATAPI 2.6, but is (curiously) missing from Mt. Fuji, Table 57. It is mentioned in Mt. Fuji Table 377 as an MMC command for SCSI devices though... Most ATAPI drives support it. */ CDIO_MMC_GPCMD_READ_CD = 0xbe, /**< Read almost any field of a CD sector at current location. (12 bytes). */ /** Vendor-unique Commands */ CDIO_MMC_GPCMD_CD_PLAYBACK_STATUS = 0xc4 /**< SONY unique = command */, CDIO_MMC_GPCMD_PLAYBACK_CONTROL = 0xc9 /**< SONY unique = command */, CDIO_MMC_GPCMD_READ_CDDA = 0xd8 /**< Vendor unique = command */, CDIO_MMC_GPCMD_READ_CDXA = 0xdb /**< Vendor unique = command */, CDIO_MMC_GPCMD_READ_ALL_SUBCODES = 0xdf /**< Vendor unique = command */ } cdio_mmc_gpcmd_t; /** Read Subchannel states */ typedef enum { CDIO_MMC_READ_SUB_ST_INVALID = 0x00, /**< audio status not supported */ CDIO_MMC_READ_SUB_ST_PLAY = 0x11, /**< audio play operation in progress */ CDIO_MMC_READ_SUB_ST_PAUSED = 0x12, /**< audio play operation paused */ CDIO_MMC_READ_SUB_ST_COMPLETED = 0x13, /**< audio play successfully completed */ CDIO_MMC_READ_SUB_ST_ERROR = 0x14, /**< audio play stopped due to error */ CDIO_MMC_READ_SUB_ST_NO_STATUS = 0x15, /**< no current audio status to return */ } cdio_mmc_read_sub_state_t; /** Level values that can go into READ_CD */ typedef enum { CDIO_MMC_READ_TYPE_ANY = 0, /**< All types */ CDIO_MMC_READ_TYPE_CDDA = 1, /**< Only CD-DA sectors */ CDIO_MMC_READ_TYPE_MODE1 = 2, /**< mode1 sectors (user data = 2048) */ CDIO_MMC_READ_TYPE_MODE2 = 3, /**< mode2 sectors form1 or form2 */ CDIO_MMC_READ_TYPE_M2F1 = 4, /**< mode2 sectors form1 */ CDIO_MMC_READ_TYPE_M2F2 = 5 /**< mode2 sectors form2 */ } cdio_mmc_read_cd_type_t; /** Format values for READ_TOC */ typedef enum { CDIO_MMC_READTOC_FMT_TOC = 0, CDIO_MMC_READTOC_FMT_SESSION = 1, CDIO_MMC_READTOC_FMT_FULTOC = 2, CDIO_MMC_READTOC_FMT_PMA = 3, /**< Q subcode data */ CDIO_MMC_READTOC_FMT_ATIP = 4, /**< includes media type */ CDIO_MMC_READTOC_FMT_CDTEXT = 5 /**< CD-TEXT info */ } cdio_mmc_readtoc_t; /** Page codes for MODE SENSE and MODE SET. */ typedef enum { CDIO_MMC_R_W_ERROR_PAGE = 0x01, CDIO_MMC_WRITE_PARMS_PAGE = 0x05, CDIO_MMC_CDR_PARMS_PAGE = 0x0d, CDIO_MMC_AUDIO_CTL_PAGE = 0x0e, CDIO_MMC_POWER_PAGE = 0x1a, CDIO_MMC_FAULT_FAIL_PAGE = 0x1c, CDIO_MMC_TO_PROTECT_PAGE = 0x1d, CDIO_MMC_CAPABILITIES_PAGE = 0x2a, CDIO_MMC_ALL_PAGES = 0x3f, } cdio_mmc_mode_page_t; /** READ DISC INFORMATION Data Types */ typedef enum { CDIO_MMC_READ_DISC_INFO_STANDARD = 0x0, CDIO_MMC_READ_DISC_INFO_TRACK = 0x1, CDIO_MMC_READ_DISC_INFO_POW = 0x2, } cdio_mmc_read_disc_info_datatype_t; PRAGMA_BEGIN_PACKED struct mmc_audio_volume_entry_s { uint8_t selection; /* Only the lower 4 bits are used. */ uint8_t volume; } GNUC_PACKED; typedef struct mmc_audio_volume_entry_s mmc_audio_volume_entry_t; /** This struct is used by cdio_audio_get_volume and cdio_audio_set_volume */ struct mmc_audio_volume_s { mmc_audio_volume_entry_t port[4]; } GNUC_PACKED; typedef struct mmc_audio_volume_s mmc_audio_volume_t; PRAGMA_END_PACKED /** Return type codes for GET_CONFIGURATION. */ typedef enum { CDIO_MMC_GET_CONF_ALL_FEATURES = 0, /**< all features without regard to currency. */ CDIO_MMC_GET_CONF_CURRENT_FEATURES = 1, /**< features which are currently in effect (e.g. based on medium inserted). */ CDIO_MMC_GET_CONF_NAMED_FEATURE = 2 /**< just the feature named in the GET_CONFIGURATION cdb. */ } cdio_mmc_get_conf_t; /** FEATURE codes used in GET CONFIGURATION. */ typedef enum { CDIO_MMC_FEATURE_PROFILE_LIST = 0x000, /**< Profile List Feature */ CDIO_MMC_FEATURE_CORE = 0x001, CDIO_MMC_FEATURE_MORPHING = 0x002, /**< Report/prevent operational changes */ CDIO_MMC_FEATURE_REMOVABLE_MEDIUM = 0x003, /**< Removable Medium Feature */ CDIO_MMC_FEATURE_WRITE_PROTECT = 0x004, /**< Write Protect Feature */ CDIO_MMC_FEATURE_RANDOM_READABLE = 0x010, /**< Random Readable Feature */ CDIO_MMC_FEATURE_MULTI_READ = 0x01D, /**< Multi-Read Feature */ CDIO_MMC_FEATURE_CD_READ = 0x01E, /**< CD Read Feature */ CDIO_MMC_FEATURE_DVD_READ = 0x01F, /**< DVD Read Feature */ CDIO_MMC_FEATURE_RANDOM_WRITABLE = 0x020, /**< Random Writable Feature */ CDIO_MMC_FEATURE_INCR_WRITE = 0x021, /**< Incremental Streaming Writable Feature */ CDIO_MMC_FEATURE_SECTOR_ERASE = 0x022, /**< Sector Erasable Feature */ CDIO_MMC_FEATURE_FORMATABLE = 0x023, /**< Formattable Feature */ CDIO_MMC_FEATURE_DEFECT_MGMT = 0x024, /**< Management Ability of the Logical Unit/media system to provide an apparently defect-free space.*/ CDIO_MMC_FEATURE_WRITE_ONCE = 0x025, /**< Write Once Feature */ CDIO_MMC_FEATURE_RESTRICT_OVERW = 0x026, /**< Restricted Overwrite Feature */ CDIO_MMC_FEATURE_CD_RW_CAV = 0x027, /**< CD-RW CAV Write Feature */ CDIO_MMC_FEATURE_MRW = 0x028, /**< MRW Feature */ CDIO_MMC_FEATURE_ENHANCED_DEFECT = 0x029, /**< Enhanced Defect Reporting */ CDIO_MMC_FEATURE_DVD_PRW = 0x02A, /**< DVD+RW Feature */ CDIO_MMC_FEATURE_DVD_PR = 0x02B, /**< DVD+R Feature */ CDIO_MMC_FEATURE_RIGID_RES_OVERW = 0x02C, /**< Rigid Restricted Overwrite */ CDIO_MMC_FEATURE_CD_TAO = 0x02D, /**< CD Track at Once */ CDIO_MMC_FEATURE_CD_SAO = 0x02E, /**< CD Mastering (Session at Once) */ CDIO_MMC_FEATURE_DVD_R_RW_WRITE = 0x02F, /**< DVD-R/RW Write */ CDIO_MMC_FEATURE_CD_RW_MEDIA_WRITE= 0x037, /**< CD-RW Media Write Support */ CDIO_MMC_FEATURE_DVD_PR_2_LAYER = 0x03B, /**< DVD+R Double Layer */ CDIO_MMC_FEATURE_POWER_MGMT = 0x100, /**< Initiator and device directed power management */ CDIO_MMC_FEATURE_CDDA_EXT_PLAY = 0x103, /**< Ability to play audio CDs via the Logical Unit's own analog output */ CDIO_MMC_FEATURE_MCODE_UPGRADE = 0x104, /* Ability for the device to accept new microcode via the interface */ CDIO_MMC_FEATURE_TIME_OUT = 0x105, /**< Ability to respond to all commands within a specific time */ CDIO_MMC_FEATURE_DVD_CSS = 0x106, /**< Ability to perform DVD CSS/CPPM authentication and RPC */ CDIO_MMC_FEATURE_RT_STREAMING = 0x107, /**< Ability to read and write using Initiator requested performance parameters */ CDIO_MMC_FEATURE_LU_SN = 0x108, /**< The Logical Unit has a unique identifier. */ CDIO_MMC_FEATURE_FIRMWARE_DATE = 0x1FF, /**< Firmware creation date report */ } cdio_mmc_feature_t; typedef enum { CDIO_MMC_FEATURE_INTERFACE_UNSPECIFIED = 0, CDIO_MMC_FEATURE_INTERFACE_SCSI = 1, CDIO_MMC_FEATURE_INTERFACE_ATAPI = 2, CDIO_MMC_FEATURE_INTERFACE_IEEE_1394 = 3, CDIO_MMC_FEATURE_INTERFACE_IEEE_1394A = 4, CDIO_MMC_FEATURE_INTERFACE_FIBRE_CH = 5 } cdio_mmc_feature_interface_t; /** The largest Command Descriptor Block (CDB) size. The possible sizes are 6, 10, and 12 bytes. */ #define MAX_CDB_LEN 12 /** \brief A Command Descriptor Block (CDB) used in sending MMC commands. */ typedef struct mmc_cdb_s { uint8_t field[MAX_CDB_LEN]; } mmc_cdb_t; /** \brief Format of header block in data returned from an MMC GET_CONFIGURATION command. */ typedef struct mmc_feature_list_header_s { unsigned char length_msb; unsigned char length_1sb; unsigned char length_2sb; unsigned char length_lsb; unsigned char reserved1; unsigned char reserved2; unsigned char profile_msb; unsigned char profile_lsb; } cdio_mmc_feature_list_header_t; /** An enumeration indicating whether an MMC command is sending data, or getting data, or does none of both. */ typedef enum mmc_direction_s { SCSI_MMC_DATA_READ, SCSI_MMC_DATA_WRITE, SCSI_MMC_DATA_NONE } cdio_mmc_direction_t; /** Indicate to applications that SCSI_MMC_DATA_NONE is available. It has been added after version 0.82 and should be used with commands that neither read nor write payload bytes. (At least on Linux such commands did work with SCSI_MMC_DATA_READ or SCSI_MMC_DATA_WRITE, too.) */ #define SCSI_MMC_HAS_DIR_NONE 1 typedef struct mmc_subchannel_s { uint8_t reserved; uint8_t audio_status; uint16_t data_length; /**< Really ISO 9660 7.2.2 */ uint8_t format; uint8_t address: 4; uint8_t control: 4; uint8_t track; uint8_t index; uint8_t abs_addr[4]; uint8_t rel_addr[4]; } cdio_mmc_subchannel_t; #define CDIO_MMC_SET_COMMAND(cdb, command) \ cdb[0] = command #define CDIO_MMC_SET_READ_TYPE(cdb, sector_type) \ cdb[1] = (sector_type << 2) #define CDIO_MMC_GETPOS_LEN16(p, pos) \ (p[pos]<<8) + p[pos+1] #define CDIO_MMC_GET_LEN16(p) \ (p[0]<<8) + p[1] #define CDIO_MMC_GET_LEN32(p) \ (p[0] << 24) + (p[1] << 16) + (p[2] << 8) + p[3]; #define CDIO_MMC_SET_LEN16(cdb, pos, len) \ cdb[pos ] = (len >> 8) & 0xff; \ cdb[pos+1] = (len ) & 0xff #define CDIO_MMC_SET_READ_LBA(cdb, lba) \ cdb[2] = (lba >> 24) & 0xff; \ cdb[3] = (lba >> 16) & 0xff; \ cdb[4] = (lba >> 8) & 0xff; \ cdb[5] = (lba ) & 0xff #define CDIO_MMC_SET_START_TRACK(cdb, command) \ cdb[6] = command #define CDIO_MMC_SET_READ_LENGTH24(cdb, len) \ cdb[6] = (len >> 16) & 0xff; \ cdb[7] = (len >> 8) & 0xff; \ cdb[8] = (len ) & 0xff #define CDIO_MMC_SET_READ_LENGTH16(cdb, len) \ CDIO_MMC_SET_LEN16(cdb, 7, len) #define CDIO_MMC_SET_READ_LENGTH8(cdb, len) \ cdb[8] = (len ) & 0xff #define CDIO_MMC_MCSB_ALL_HEADERS 0xf #define CDIO_MMC_SET_MAIN_CHANNEL_SELECTION_BITS(cdb, val) \ cdb[9] = val << 3; /** Get the output port volumes and port selections used on AUDIO PLAY commands via a MMC MODE SENSE command using the CD Audio Control Page. @param p_cdio the CD object to be acted upon. @param p_volume volume parameters retrieved @return DRIVER_OP_SUCCESS if we ran the command ok. */ driver_return_code_t mmc_audio_get_volume (CdIo_t *p_cdio, /*out*/ mmc_audio_volume_t *p_volume); /** Read Audio Subchannel information @param p_cdio the CD object to be acted upon. @param p_subchannel place for returned subchannel information */ driver_return_code_t mmc_audio_read_subchannel (CdIo_t *p_cdio, /*out*/ cdio_subchannel_t *p_subchannel); /** Read ISRC Subchannel information. Contributed by Scot C. Bontrager (scot@indievisible.org) May 15, 2011 - @param p_cdio the CD object to be acted upon. @param track the track you to get ISRC info @param p_isrc place to put ISRC info */ driver_return_code_t mmc_isrc_track_read_subchannel (CdIo_t *p_cdio, /*in*/ const track_t track, /*out*/ char *p_isrc); /** Return a string containing the name of the audio state as returned from the Q_SUBCHANNEL. */ const char *mmc_audio_state2str( uint8_t i_audio_state ); /** Get the block size used in read requests, via MMC (e.g. READ_10, READ_MSF, ...) @param p_cdio the CD object to be acted upon. @return the blocksize if > 0; error if <= 0 */ int mmc_get_blocksize ( CdIo_t *p_cdio ); /** Return the length in bytes of the Command Descriptor Buffer (CDB) for a given MMC command. The length will be either 6, 10, or 12. */ uint8_t mmc_get_cmd_len(uint8_t mmc_cmd); /** Get the lsn of the end of the CD @param p_cdio the CD object to be acted upon. @return the lsn. On error return CDIO_INVALID_LSN. */ lsn_t mmc_get_disc_last_lsn( const CdIo_t *p_cdio ); /** Return the discmode as reported by the MMC Read (FULL) TOC command. Information was obtained from Section 5.1.13 (Read TOC/PMA/ATIP) pages 56-62 from the MMC draft specification, revision 10a at http://www.t10.org/ftp/t10/drafts/mmc/mmc-r10a.pdf See especially tables 72, 73 and 75. */ discmode_t mmc_get_discmode( const CdIo_t *p_cdio ); typedef enum { CDIO_MMC_LEVEL_WEIRD, CDIO_MMC_LEVEL_1, CDIO_MMC_LEVEL_2, CDIO_MMC_LEVEL_3, CDIO_MMC_LEVEL_NONE } cdio_mmc_level_t; /** Get the MMC level supported by the device. @param p_cdio the CD object to be acted upon. @return MMC level supported by the device. */ cdio_mmc_level_t mmc_get_drive_mmc_cap(CdIo_t *p_cdio); /** Get the DVD type associated with cd object. @param p_cdio the CD object to be acted upon. @param s location to store DVD information. @return the DVD discmode. */ discmode_t mmc_get_dvd_struct_physical ( const CdIo_t *p_cdio, cdio_dvd_struct_t *s); /** Find out if media tray is open or closed. @param p_cdio the CD object to be acted upon. @return 1 if media is open, 0 if closed. Error return codes are the same as driver_return_code_t */ int mmc_get_tray_status ( const CdIo_t *p_cdio ); /** Get the CD-ROM hardware info via an MMC INQUIRY command. @param p_cdio the CD object to be acted upon. @param p_hw_info place to store hardware information retrieved @return true if we were able to get hardware info, false if we had an error. */ bool mmc_get_hwinfo ( const CdIo_t *p_cdio, /* out*/ cdio_hwinfo_t *p_hw_info ); /** Find out if media has changed since the last call. @param p_cdio the CD object to be acted upon. @return 1 if media has changed since last call, 0 if not. Error return codes are the same as driver_return_code_t */ int mmc_get_media_changed(const CdIo_t *p_cdio); /** Get the media catalog number (MCN) from the CD via MMC. @param p_cdio the CD object to be acted upon. @return the media catalog number r NULL if there is none or we don't have the ability to get it. Note: string is malloc'd so caller has to free() the returned string when done with it. */ char * mmc_get_mcn(const CdIo_t *p_cdio); /** Report if CD-ROM has a particular kind of interface (ATAPI, SCSCI, ...) Is it possible for an interface to have several? If not this routine could probably return the single mmc_feature_interface_t. @param p_cdio the CD object to be acted upon. @param e_interface @return true if we have the interface and false if not. */ bool_3way_t mmc_have_interface(CdIo_t *p_cdio, cdio_mmc_feature_interface_t e_interface ); /** Read just the user data part of some sort of data sector (via mmc_read_cd). @param p_cdio object to read from @param p_buf place to read data into. The caller should make sure this location can store at least CDIO_CD_FRAMESIZE, M2RAW_SECTOR_SIZE, or M2F2_SECTOR_SIZE depending on the kind of sector getting read. If you don't know whether you have a Mode 1/2, Form 1/ Form 2/Formless sector best to reserve space for the maximum, M2RAW_SECTOR_SIZE. @param i_lsn sector to read @param i_blocksize size of each block @param i_blocks number of blocks to read */ driver_return_code_t mmc_read_data_sectors ( CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn, uint16_t i_blocksize, uint32_t i_blocks ); /** Read sectors using SCSI-MMC GPCMD_READ_CD. Can read only up to 25 blocks. */ driver_return_code_t mmc_read_sectors ( const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn, int read_sector_type, uint32_t i_blocks); /** Run a Multimedia command (MMC). @param p_cdio CD structure set by cdio_open(). @param i_timeout_ms time in milliseconds we will wait for the command to complete. @param p_cdb CDB bytes. All values that are needed should be set on input. We'll figure out what the right CDB length should be. @param e_direction direction the transfer is to go. @param i_buf Size of buffer @param p_buf Buffer for data, both sending and receiving. @return 0 if command completed successfully. */ driver_return_code_t mmc_run_cmd( const CdIo_t *p_cdio, unsigned int i_timeout_ms, const mmc_cdb_t *p_cdb, cdio_mmc_direction_t e_direction, unsigned int i_buf, /*in/out*/ void *p_buf ); /** Run a Multimedia command (MMC) specifying the CDB length. The motivation here is for example ot use in is an undocumented debug command for LG drives (namely E7), whose length is being miscalculated by mmc_get_cmd_len(); it doesn't follow the usual code number to length conventions. Patch supplied by SukkoPera. @param p_cdio CD structure set by cdio_open(). @param i_timeout_ms time in milliseconds we will wait for the command to complete. @param p_cdb CDB bytes. All values that are needed should be set on input. @param i_cdb number of CDB bytes. @param e_direction direction the transfer is to go. @param i_buf Size of buffer @param p_buf Buffer for data, both sending and receiving. @return 0 if command completed successfully. */ driver_return_code_t mmc_run_cmd_len( const CdIo_t *p_cdio, unsigned int i_timeout_ms, const mmc_cdb_t *p_cdb, unsigned int i_cdb, cdio_mmc_direction_t e_direction, unsigned int i_buf, /*in/out*/ void *p_buf ); /** Obtain the SCSI sense reply of the most-recently-performed MMC command. These bytes give an indication of possible problems which occured in the drive while the command was performed. With some commands they tell about the current state of the drive (e.g. 00h TEST UNIT READY). @param p_cdio CD structure set by cdio_open(). @param pp_sense returns the sense bytes received from the drive. This is allocated memory or NULL if no sense bytes are available. Dispose non-NULL pointers by free() when no longer needed. See SPC-3 4.5.3 Fixed format sense data. SCSI error codes as of SPC-3 Annex D, MMC-5 Annex F: sense[2]&15 = Key , sense[12] = ASC , sense[13] = ASCQ @return number of valid bytes in sense, 0 in case of no sense bytes available, <0 in case of internal error. */ int mmc_last_cmd_sense ( const CdIo_t *p_cdio, cdio_mmc_request_sense_t **pp_sense); /** Set the block size for subsequest read requests, via MMC. */ driver_return_code_t mmc_set_blocksize ( const CdIo_t *p_cdio, uint16_t i_blocksize); #ifdef __cplusplus } #endif /* __cplusplus */ /** The below variables are trickery to force the above enum symbol values to be recorded in debug symbol tables. They are used to allow one to refer to the enumeration value names in the typedefs above in a debugger and debugger expressions */ extern cdio_mmc_feature_t debug_cdio_mmc_feature; extern cdio_mmc_feature_interface_t debug_cdio_mmc_feature_interface; extern cdio_mmc_feature_profile_t debug_cdio_mmc_feature_profile; extern cdio_mmc_get_conf_t debug_cdio_mmc_get_conf; extern cdio_mmc_gpcmd_t debug_cdio_mmc_gpcmd; extern cdio_mmc_read_sub_state_t debug_cdio_mmc_read_sub_state; extern cdio_mmc_read_cd_type_t debug_cdio_mmc_read_cd_type; extern cdio_mmc_readtoc_t debug_cdio_mmc_readtoc; extern cdio_mmc_mode_page_t debug_cdio_mmc_mode_page; #ifndef DO_NOT_WANT_OLD_MMC_COMPATIBILITY #define CDIO_MMC_GPCMD_START_STOP CDIO_MMC_GPCMD_START_STOP_UNIT #define CDIO_MMC_GPCMD_ALLOW_MEDIUM_REMOVAL \ CDIO_MMC_GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL #endif /*DO_NOT_WANT_PARANOIA_COMPATIBILITY*/ #endif /* __MMC_H__ */ /* * Local variables: * c-file-style: "ruby" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/include/cdio/paranoia.h0000644000175000017500000001556111625346407014316 00000000000000/* Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Rocky Bernstein Copyright (C) 1998 Monty xiphmont@mit.edu This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** \file paranoia.h * * \brief The top-level header for libcdda_paranoia: a device- and OS- * independent library for reading CD-DA with error tolerance and * repair. Applications include this for paranoia access. */ #ifndef _CDIO_PARANOIA_H_ #define _CDIO_PARANOIA_H_ #include /*! Paranoia likes to work with 16-bit numbers rather than (possibly byte-swapped) bytes. So there are this many 16-bit numbers block (frame, or sector) read. */ #define CD_FRAMEWORDS (CDIO_CD_FRAMESIZE_RAW/2) /** Flags used in paranoia_modeset. The enumeration type one probably wouldn't really use in a program. It is here instead of defines to give symbolic names that can be helpful in debuggers where wants just to say refer to PARANOIA_MODE_DISABLE and get the correct value. */ typedef enum { PARANOIA_MODE_DISABLE = 0x00, /**< No fixups */ PARANOIA_MODE_VERIFY = 0x01, /**< Verify data integrety in overlap area*/ PARANOIA_MODE_FRAGMENT = 0x02, /**< unsupported */ PARANOIA_MODE_OVERLAP = 0x04, /**< Perform overlapped reads */ PARANOIA_MODE_SCRATCH = 0x08, /**< unsupported */ PARANOIA_MODE_REPAIR = 0x10, /**< unsupported */ PARANOIA_MODE_NEVERSKIP = 0x20, /**< Do not skip failed reads (retry maxretries) */ PARANOIA_MODE_FULL = 0xff, /**< Maximum paranoia - all of the above (except disable) */ } paranoia_mode_t; /** Flags set in a callback. The enumeration type one probably wouldn't really use in a program. It is here instead of defines to give symbolic names that can be helpful in debuggers where wants just to say refer to PARANOIA_CB_READ and get the correct value. */ typedef enum { PARANOIA_CB_READ, /**< Read off adjust ??? */ PARANOIA_CB_VERIFY, /**< Verifying jitter */ PARANOIA_CB_FIXUP_EDGE, /**< Fixed edge jitter */ PARANOIA_CB_FIXUP_ATOM, /**< Fixed atom jitter */ PARANOIA_CB_SCRATCH, /**< Unsupported */ PARANOIA_CB_REPAIR, /**< Unsupported */ PARANOIA_CB_SKIP, /**< Skip exhausted retry */ PARANOIA_CB_DRIFT, /**< Skip exhausted retry */ PARANOIA_CB_BACKOFF, /**< Unsupported */ PARANOIA_CB_OVERLAP, /**< Dynamic overlap adjust */ PARANOIA_CB_FIXUP_DROPPED, /**< Fixed dropped bytes */ PARANOIA_CB_FIXUP_DUPED, /**< Fixed duplicate bytes */ PARANOIA_CB_READERR /**< Hard read error */ } paranoia_cb_mode_t; extern const char *paranoia_cb_mode2str[]; #ifdef __cplusplus extern "C" { #endif /*! Get and initialize a new cdrom_paranoia object from cdrom_drive. Run this before calling any of the other paranoia routines below. @return new cdrom_paranoia object Call paranoia_free() when you are done with it */ extern cdrom_paranoia_t *cdio_paranoia_init(cdrom_drive_t *d); /*! Free any resources associated with p. @param p paranoia object to for which resources are to be freed. @see paranoia_init. */ extern void cdio_paranoia_free(cdrom_paranoia_t *p); /*! Set the kind of repair you want to on for reading. The modes are listed above @param p paranoia type @param mode_flags paranoia mode flags built from values in paranoia_mode_t, e.g. PARANOIA_MODE_FULL^PARANOIA_MODE_NEVERSKIP */ extern void cdio_paranoia_modeset(cdrom_paranoia_t *p, int mode_flags); /*! reposition reading offset. @param p paranoia type @param seek byte offset to seek to @param whence like corresponding parameter in libc's lseek, e.g. SEEK_SET or SEEK_END. */ extern lsn_t cdio_paranoia_seek(cdrom_paranoia_t *p, int32_t seek, int whence); /*! Reads the next sector of audio data and returns a pointer to a full sector of verified samples. @param p paranoia object. @param callback callback routine which gets called with the status on each read. @return the audio data read, CDIO_CD_FRAMESIZE_RAW (2352) bytes. This data is not to be freed by the caller. It will persist only until the next call to paranoia_read() for this p. */ extern int16_t *cdio_paranoia_read(cdrom_paranoia_t *p, void(*callback)(long int, paranoia_cb_mode_t)); /*! The same as cdio_paranoia_read but the number of retries is set. @param p paranoia object. @param callback callback routine which gets called with the status on each read. @param max_retries number of times to try re-reading a block before failing. @return the block of CDIO_FRAMEIZE_RAW bytes (or CDIO_FRAMESIZE_RAW / 2 16-bit integers). Unless byte-swapping has been turned off the 16-bit integers Endian independent order. @see cdio_paranoia_read. */ extern int16_t *cdio_paranoia_read_limited(cdrom_paranoia_t *p, void(*callback)(long int, paranoia_cb_mode_t), int max_retries); /*! a temporary hack */ extern void cdio_paranoia_overlapset(cdrom_paranoia_t *p,long overlap); extern void cdio_paranoia_set_range(cdrom_paranoia_t *p, long int start, long int end); #ifndef DO_NOT_WANT_PARANOIA_COMPATIBILITY /** For compatibility with good ol' paranoia */ #define cdrom_paranoia cdrom_paranoia_t #define paranoia_init cdio_paranoia_init #define paranoia_free cdio_paranoia_free #define paranoia_modeset cdio_paranoia_modeset #define paranoia_seek cdio_paranoia_seek #define paranoia_read cdio_paranoia_read #define paranoia_read_limited cdio_paranoia_read_limited #define paranoia_overlapset cdio_paranoia_overlapset #define paranoia_set_range cdio_paranoia_set_range #endif /*DO_NOT_WANT_PARANOIA_COMPATIBILITY*/ #ifdef __cplusplus } #endif /** The below variables are trickery to force the above enum symbol values to be recorded in debug symbol tables. They are used to allow one to refer to the enumeration value names in the typedefs above in a debugger and debugger expressions */ extern paranoia_mode_t debug_paranoia_mode; extern paranoia_cb_mode_t debug_paranoia_cb_mode; #endif /*_CDIO_PARANOIA_H_*/ libcdio-0.83/include/cdio/utf8.h0000644000175000017500000000641411114145233013372 00000000000000/* $Id: utf8.h,v 1.2 2008/03/25 15:59:09 karl Exp $ Copyright (C) 2008 Rocky Bernstein Copyright (C) 2006 Burkhard Plaum This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* UTF-8 support */ #include /** \brief Opaque characterset converter */ typedef struct cdio_charset_coverter_s cdio_charset_coverter_t; /** \brief Create a charset converter * \param src_charset Source charset * \param dst_charset Destination charset * \returns A newly allocated charset converter */ cdio_charset_coverter_t * cdio_charset_converter_create(const char * src_charset, const char * dst_charset); /** \brief Destroy a characterset converter * \param cnv A characterset converter */ void cdio_charset_converter_destroy(cdio_charset_coverter_t*cnv); /** \brief Convert a string from one character set to another * \param cnv A charset converter * \param src Source string * \param src_len Length of source string * \param dst Returns destination string * \param dst_len If non NULL, returns the length of the destination string * \returns true if conversion was sucessful, false else. * * The destination string must be freed by the caller with free(). * If you pass -1 for src_len, strlen() will be used. */ bool cdio_charset_convert(cdio_charset_coverter_t*cnv, char * src, int src_len, char ** dst, int * dst_len); /** \brief Convert a string from UTF-8 to another charset * \param src Source string (0 terminated) * \param dst Returns destination string * \param dst_len If non NULL, returns the length of the destination string * \param dst_charset The characterset to convert to * \returns true if conversion was sucessful, false else. * * This is a convenience function, which creates a charset converter, * converts one string and destroys the charset converter. */ bool cdio_charset_from_utf8(cdio_utf8_t * src, char ** dst, int * dst_len, const char * dst_charset); /** \brief Convert a string from another charset to UTF-8 * \param src Source string * \param src_len Length of the source string * \param dst Returns destination string (0 terminated) * \param src_charset The characterset to convert from * \returns true if conversion was sucessful, false else. * * This is a convenience function, which creates a charset converter, * converts one string and destroys the charset converter. If you pass -1 * for src_len, strlen() will be used. */ bool cdio_charset_to_utf8(char *src, size_t src_len, cdio_utf8_t **dst, const char * src_charset); libcdio-0.83/include/cdio/logging.h0000644000175000017500000000730011114145233014125 00000000000000/* $Id: logging.h,v 1.11 2008/03/25 15:59:09 karl Exp $ Copyright (C) 2003, 2004, 2008 Rocky Bernstein Copyright (C) 2000 Herbert Valerio Riedel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** \file logging.h * \brief Header to control logging and level of detail of output. * */ #ifndef __LOGGING_H__ #define __LOGGING_H__ #include #ifdef __cplusplus extern "C" { #endif /** * The different log levels supported. */ typedef enum { CDIO_LOG_DEBUG = 1, /**< Debug-level messages - helps debug what's up. */ CDIO_LOG_INFO, /**< Informational - indicates perhaps something of interest. */ CDIO_LOG_WARN, /**< Warning conditions - something that looks funny. */ CDIO_LOG_ERROR, /**< Error conditions - may terminate program. */ CDIO_LOG_ASSERT /**< Critical conditions - may abort program. */ } cdio_log_level_t; /** * The place to save the preference concerning how much verbosity * is desired. This is used by the internal default log handler, but * it could be use by applications which provide their own log handler. */ extern cdio_log_level_t cdio_loglevel_default; /** * This type defines the signature of a log handler. For every * message being logged, the handler will receive the log level and * the message string. * * @see cdio_log_set_handler * @see cdio_log_level_t * * @param level The log level. * @param message The log message. */ typedef void (*cdio_log_handler_t) (cdio_log_level_t level, const char message[]); /** * Set a custom log handler for libcdio. The return value is the log * handler being replaced. If the provided parameter is NULL, then * the handler will be reset to the default handler. * * @see cdio_log_handler_t * * @param new_handler The new log handler. * @return The previous log handler. */ cdio_log_handler_t cdio_log_set_handler (cdio_log_handler_t new_handler); /** * Handle an message with the given log level. * * @see cdio_debug * @see cdio_info * @see cdio_warn * @see cdio_error * @param level The log level. * @param format printf-style format string * @param ... remaining arguments needed by format string */ void cdio_log (cdio_log_level_t level, const char format[], ...) GNUC_PRINTF(2, 3); /** * Handle a debugging message. * * @see cdio_log for a more generic routine */ void cdio_debug (const char format[], ...) GNUC_PRINTF(1,2); /** * Handle an informative message. * * @see cdio_log for a more generic routine */ void cdio_info (const char format[], ...) GNUC_PRINTF(1,2); /** * Handle a warning message. * * @see cdio_log for a more generic routine */ void cdio_warn (const char format[], ...) GNUC_PRINTF(1,2); /** * Handle an error message. Execution is terminated. * * @see cdio_log for a more generic routine. */ void cdio_error (const char format[], ...) GNUC_PRINTF(1,2); #ifdef __cplusplus } #endif #endif /* __LOGGING_H__ */ /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/include/cdio/Makefile.in0000644000175000017500000004523411652210027014404 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 2003, 2004, 2006, 2008, 2011 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ######################################################## # Things to make the install (public) libcdio headers ######################################################## # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = include/cdio DIST_COMMON = $(am__dist_libcdioinclude_HEADERS_DIST) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/version.h.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = version.h CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__dist_libcdioinclude_HEADERS_DIST = audio.h bytesex.h bytesex_asm.h \ cdio.h cdio_unconfig.h cd_types.h device.h disc.h ds.h dvd.h \ ecma_167.h iso9660.h logging.h mmc.h mmc_cmds.h mmc_hl_cmds.h \ mmc_ll_cmds.h mmc_util.h paranoia.h posix.h read.h rock.h \ sector.h track.h types.h udf.h udf_file.h udf_time.h utf8.h \ util.h version.h xa.h cdda.h cdtext.h am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libcdioincludedir)" \ "$(DESTDIR)$(libcdioincludedir)" HEADERS = $(dist_libcdioinclude_HEADERS) \ $(nodist_libcdioinclude_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDDA_PLAYER_LIBS = @CDDA_PLAYER_LIBS@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CDPARANOIA_NAME = @CDPARANOIA_NAME@ CFLAGS = @CFLAGS@ CMP = @CMP@ COS_LIB = @COS_LIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_PKG_LIB_HACK = @DARWIN_PKG_LIB_HACK@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ DIFF_OPTS = @DIFF_OPTS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GIT2CL = @GIT2CL@ GREP = @GREP@ HAVE_BSDI_CDROM = @HAVE_BSDI_CDROM@ HAVE_DARWIN_CDROM = @HAVE_DARWIN_CDROM@ HAVE_FREEBSD_CDROM = @HAVE_FREEBSD_CDROM@ HAVE_JOLIET = @HAVE_JOLIET@ HAVE_LINUX_CDROM = @HAVE_LINUX_CDROM@ HAVE_OS2_CDROM = @HAVE_OS2_CDROM@ HAVE_ROCK = @HAVE_ROCK@ HAVE_SOLARIS_CDROM = @HAVE_SOLARIS_CDROM@ HAVE_WIN32_CDROM = @HAVE_WIN32_CDROM@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDIOPP_LIBS = @LIBCDIOPP_LIBS@ LIBCDIO_CDDA_LIBS = @LIBCDIO_CDDA_LIBS@ LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ LIBCDIO_DEPS = @LIBCDIO_DEPS@ LIBCDIO_LIBS = @LIBCDIO_LIBS@ LIBCDIO_PARANOIA_LIBS = @LIBCDIO_PARANOIA_LIBS@ LIBCDIO_SOURCE_PATH = @LIBCDIO_SOURCE_PATH@ LIBCDIO_VERSION_NUM = @LIBCDIO_VERSION_NUM@ LIBICONV = @LIBICONV@ LIBISO9660PP_LIBS = @LIBISO9660PP_LIBS@ LIBISO9660_CFLAGS = @LIBISO9660_CFLAGS@ LIBISO9660_LIBS = @LIBISO9660_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBUDF_LIBS = @LIBUDF_LIBS@ LINUX_CDROM_TIMEOUT = @LINUX_CDROM_TIMEOUT@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_NO_UNDEFINED = @LT_NO_UNDEFINED@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OLD_CDPARANOIA = @OLD_CDPARANOIA@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SBPCD_H = @SBPCD_H@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TYPESIZES = @TYPESIZES@ UCDROM_H = @UCDROM_H@ VCDINFO_CFLAGS = @VCDINFO_CFLAGS@ VCDINFO_LIBS = @VCDINFO_LIBS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @BUILD_CD_PARANOIA_TRUE@paranoiaheaders = cdda.h cdtext.h libcdioincludedir = $(includedir)/cdio dist_libcdioinclude_HEADERS = \ audio.h \ bytesex.h \ bytesex_asm.h \ cdio.h \ cdio_unconfig.h \ cd_types.h \ device.h \ disc.h \ ds.h \ dvd.h \ ecma_167.h \ iso9660.h \ logging.h \ mmc.h \ mmc_cmds.h \ mmc_hl_cmds.h \ mmc_ll_cmds.h \ mmc_util.h \ paranoia.h \ posix.h \ read.h \ rock.h \ sector.h \ track.h \ types.h \ udf.h \ udf_file.h \ udf_time.h \ utf8.h \ util.h \ version.h \ xa.h \ $(paranoiaheaders) nodist_libcdioinclude_HEADERS = cdio_config.h EXTRA_DIST = version.h.in BUILT_SOURCES = version.h DISTCLEANFILES = cdio_config.h all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/cdio/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu include/cdio/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): version.h: $(top_builddir)/config.status $(srcdir)/version.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-dist_libcdioincludeHEADERS: $(dist_libcdioinclude_HEADERS) @$(NORMAL_INSTALL) test -z "$(libcdioincludedir)" || $(MKDIR_P) "$(DESTDIR)$(libcdioincludedir)" @list='$(dist_libcdioinclude_HEADERS)'; test -n "$(libcdioincludedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libcdioincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(libcdioincludedir)" || exit $$?; \ done uninstall-dist_libcdioincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(dist_libcdioinclude_HEADERS)'; test -n "$(libcdioincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(libcdioincludedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(libcdioincludedir)" && rm -f $$files install-nodist_libcdioincludeHEADERS: $(nodist_libcdioinclude_HEADERS) @$(NORMAL_INSTALL) test -z "$(libcdioincludedir)" || $(MKDIR_P) "$(DESTDIR)$(libcdioincludedir)" @list='$(nodist_libcdioinclude_HEADERS)'; test -n "$(libcdioincludedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libcdioincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(libcdioincludedir)" || exit $$?; \ done uninstall-nodist_libcdioincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(nodist_libcdioinclude_HEADERS)'; test -n "$(libcdioincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(libcdioincludedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(libcdioincludedir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libcdioincludedir)" "$(DESTDIR)$(libcdioincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dist_libcdioincludeHEADERS \ install-nodist_libcdioincludeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dist_libcdioincludeHEADERS \ uninstall-nodist_libcdioincludeHEADERS .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dist_libcdioincludeHEADERS install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-nodist_libcdioincludeHEADERS install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-dist_libcdioincludeHEADERS \ uninstall-nodist_libcdioincludeHEADERS cdio_config.h: $(top_srcdir)/config.h echo '#ifndef __CDIO_CONFIG_H__' > cdio_config.h echo '#define __CDIO_CONFIG_H__' >> cdio_config.h cat $(top_builddir)/config.h >>cdio_config.h echo '#endif /* #ifndef CDIO_CONFIG_H */' >>cdio_config.h # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libcdio-0.83/include/Makefile.am0000644000175000017500000000154211114145233013446 00000000000000# $Id: Makefile.am,v 1.4 2008/03/20 19:02:37 karl Exp $ # # Copyright (C) 2003, 2004, 2006, 2008 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . if ENABLE_CXX_BINDINGS cxxdirs = cdio++ endif SUBDIRS = cdio $(cxxdirs) libcdio-0.83/include/cdio++/0000755000175000017500000000000011652210413012534 500000000000000libcdio-0.83/include/cdio++/cdio.hpp0000644000175000017500000000767011333310443014115 00000000000000/* Copyright (C) 2005, 2006, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** \file cdio.hpp * * \brief C++ class for libcdio: the CD Input and Control * library. Applications use this for anything regarding libcdio. */ #ifndef __CDIO_HPP__ #define __CDIO_HPP__ #include #include #include #include #include // Make pre- and post-increment operators for enums in libcdio where it // makes sense. #include /** Class for driver exceptions. **/ class DriverOpException { public: driver_return_code_t driver_return_code; DriverOpException( void ) { }; DriverOpException( driver_return_code_t drc ) { driver_return_code = drc; }; driver_return_code_t get_code(void) { return driver_return_code; }; const char *get_msg(void) { return cdio_driver_errmsg(driver_return_code); }; }; class DriverOpError: public DriverOpException { public: DriverOpError(void) { driver_return_code = DRIVER_OP_ERROR; } }; class DriverOpUnsupported: public DriverOpException { public: DriverOpUnsupported(void) { driver_return_code = DRIVER_OP_UNSUPPORTED; } }; class DriverOpUninit: public DriverOpException { public: DriverOpUninit(void) { driver_return_code = DRIVER_OP_UNINIT; } }; class DriverOpNotPermitted: public DriverOpException { public: DriverOpNotPermitted(void) {driver_return_code = DRIVER_OP_NOT_PERMITTED;} }; class DriverOpBadParameter: public DriverOpException { public: DriverOpBadParameter(void) {driver_return_code = DRIVER_OP_BAD_PARAMETER;} }; class DriverOpBadPointer: public DriverOpException { public: DriverOpBadPointer(void) {driver_return_code = DRIVER_OP_BAD_POINTER;} }; class DriverOpNoDriver: public DriverOpException { public: DriverOpNoDriver(void) {driver_return_code = DRIVER_OP_NO_DRIVER;} }; void possible_throw_device_exception(driver_return_code_t drc); /** A class relating to CD-Text. Use invalid track number 0 to specify CD-Text for the CD (as opposed to a specific track). */ class CdioCDText { public: CdioCDText(cdtext_t *p) { p_cdtext = p; cdtext_init(p); // make sure we're initialized on the C side } ~CdioCDText() { cdtext_destroy(p_cdtext); p_cdtext = (cdtext_t *) NULL; } // Other member functions #include "cdtext.hpp" private: cdtext_t *p_cdtext; }; /** A class relating to tracks. A track object basically saves device and track number information so that in track operations these don't have be specified. */ class CdioTrack { public: CdioTrack(CdIo_t *p, track_t t) { i_track = t; p_cdio = p; } // Other member functions #include "track.hpp" private: track_t i_track; CdIo_t *p_cdio; }; /** A class relating to a CD-ROM device or pseudo CD-ROM device with has a particular CD image. A device basically saves the libcdio "object" (of type CdIo *). */ class CdioDevice { protected: CdIo_t *p_cdio; public: CdioDevice() { p_cdio = (CdIo_t *) NULL; }; ~CdioDevice() { cdio_destroy(p_cdio); p_cdio = (CdIo_t *) NULL; }; // Other member functions #include "device.hpp" #include "disc.hpp" #include "mmc.hpp" #include "read.hpp" }; /* Things related to devices. No class or object is needed. */ #include "devices.hpp" #endif /* __CDIO_HPP__ */ libcdio-0.83/include/cdio++/enum.hpp0000644000175000017500000000256011565200163014140 00000000000000/* Copyright (C) 2005, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** \file enum.hpp * * \brief C++ header for pre- and post-increment operators for * enumerations defined in libcdio that it makes sense to iterate over. */ #define ENUM_ITERATE_FNS(type) \ inline \ type &operator++(type &t) \ { \ return t = type(t + 1); \ } \ inline \ type &operator++(type &t, int) \ { \ return t = type(t + 1); \ } \ inline \ type &operator--(type &t) \ { \ return t = type(t - 1); \ } \ inline \ type &operator--(type &t, int) \ { \ return t = type(t - 1); \ } ENUM_ITERATE_FNS(cdtext_field_t) ENUM_ITERATE_FNS(driver_id_t) libcdio-0.83/include/cdio++/track.hpp0000644000175000017500000000646011114145233014277 00000000000000/* $Id: track.hpp,v 1.2 2008/03/25 15:59:10 karl Exp $ Copyright (C) 2005, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** \file track.hpp * \brief methods relating to getting Compact Discs. This file * should not be #included directly. */ /*! Return an opaque CdIo_t pointer for the given track object. */ CdIo_t *getCdIo() { return p_cdio; } /*! Get CD-Text information for a CdIo_t object. @return the CD-Text object or NULL if obj is NULL or CD-Text information does not exist. */ cdtext_t *getCdtext () { return cdio_get_cdtext (p_cdio, i_track); } /*! Return number of channels in track: 2 or 4; -2 if not implemented or -1 for error. Not meaningful if track is not an audio track. */ int getChannels() { return cdio_get_track_channels(p_cdio, i_track); } /*! Return copy protection status on a track. Is this meaningful if not an audio track? */ track_flag_t getCopyPermit() { return cdio_get_track_copy_permit(p_cdio, i_track); } /*! Get the format (audio, mode2, mode1) of track. */ track_format_t getFormat() { return cdio_get_track_format(p_cdio, i_track); } /*! Return true if we have XA data (green, mode2 form1) or XA data (green, mode2 form2). That is track begins: sync - header - subheader 12 4 - 8 FIXME: there's gotta be a better design for this and get_track_format? */ bool getGreen() { return cdio_get_track_green(p_cdio, i_track); } /*! Return the ending LSN. CDIO_INVALID_LSN is returned on error. */ lsn_t getLastLsn() { return cdio_get_track_last_lsn(p_cdio, i_track); } /*! Get the starting LBA. @return the starting LBA or CDIO_INVALID_LBA on error. */ lba_t getLba() { return cdio_get_track_lba(p_cdio, i_track); } /*! @return the starting LSN or CDIO_INVALID_LSN on error. */ lsn_t getLsn() { return cdio_get_track_lsn(p_cdio, i_track); } /*! Return the starting MSF (minutes/secs/frames) for track number i_track in p_cdio. @return true if things worked or false if there is no track entry. */ bool getMsf(/*out*/ msf_t &msf) { return cdio_get_track_msf(p_cdio, i_track,/*out*/ &msf); } /*! Return the track number of the track object. */ track_t getTrackNum() { return i_track; } /*! Get linear preemphasis status on an audio track This is not meaningful if not an audio track? */ track_flag_t getPreemphasis() { return cdio_get_track_preemphasis(p_cdio, i_track); } /*! Get the number of sectors between this track an the next. This includes any pregap sectors before the start of the next track. @return the number of sectors or 0 if there is an error. */ unsigned int getSecCount() { return cdio_get_track_sec_count(p_cdio, i_track); } libcdio-0.83/include/cdio++/iso9660.hpp0000644000175000017500000002717311647772515014342 00000000000000/* Copyright (C) 2006, 2008, 2011 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** \file iso9660.hpp * * \brief C++ class for libcdio: the CD Input and Control * library. Applications use this for anything regarding libcdio. */ #ifndef __ISO9660_HPP__ #define __ISO9660_HPP__ #include #include #include // vector class library #include #include using namespace std; /** ISO 9660 class. */ class ISO9660 { public: class PVD // Primary Volume ID { public: iso9660_pvd_t pvd; // Make private? PVD() { memset(&pvd, 0, sizeof(pvd)); } PVD(iso9660_pvd_t *p_new_pvd) { memcpy(&pvd, p_new_pvd, sizeof(pvd)); }; /*! Return the PVD's application ID. NULL is returned if there is some problem in getting this. */ char * get_application_id(); int get_pvd_block_size(); /*! Return the PVD's preparer ID. NULL is returned if there is some problem in getting this. */ char * get_preparer_id(); /*! Return the PVD's publisher ID. NULL is returned if there is some problem in getting this. */ char * get_publisher_id(); const char *get_pvd_id(); int get_pvd_space_size(); uint8_t get_pvd_type(); /*! Return the primary volume id version number (of pvd). If there is an error 0 is returned. */ int get_pvd_version(); /*! Return the LSN of the root directory for pvd. If there is an error CDIO_INVALID_LSN is returned. */ lsn_t get_root_lsn(); /*! Return the PVD's system ID. NULL is returned if there is some problem in getting this. */ char * get_system_id(); /*! Return the PVD's volume ID. NULL is returned if there is some problem in getting this. */ char * get_volume_id(); /*! Return the PVD's volumeset ID. NULL is returned if there is some problem in getting this. */ char * get_volumeset_id(); }; class Stat // ISO 9660 file information { public: iso9660_stat_t *p_stat; typedef vector< ISO9660::Stat *> stat_vector_t; Stat(iso9660_stat_t *p_new_stat) { p_stat = p_new_stat; }; Stat(const Stat& copy_in) { free(p_stat); p_stat = (iso9660_stat_t *) calloc( 1, sizeof(iso9660_stat_t) + strlen(copy_in.p_stat->filename)+1 ); p_stat = copy_in.p_stat; } const Stat& operator= (const Stat& right) { free(p_stat); this->p_stat = right.p_stat; return right; } ~Stat() { free(p_stat); p_stat = NULL; } }; #ifdef FS #undef FS #endif class FS : public CdioDevice // ISO 9660 Filesystem on a CD or CD-image { public: typedef vector< ISO9660::Stat *> stat_vector_t; /*! Given a directory pointer, find the filesystem entry that contains lsn and return information about it. @return Stat * of entry if we found lsn, or NULL otherwise. Caller must free return value. */ Stat *find_lsn(lsn_t i_lsn); /*! Read the Primary Volume Descriptor for a CD. A PVD object is returned if read, and NULL if there was an error. */ PVD *read_pvd (); /*! Read the Super block of an ISO 9660 image. This is the Primary Volume Descriptor (PVD) and perhaps a Supplemental Volume Descriptor if (Joliet) extensions are acceptable. */ bool read_superblock (iso_extension_mask_t iso_extension_mask); /*! Read psz_path (a directory) and return a vector of iso9660_stat_t pointers for the files inside that directory. The caller must free the returned result. */ bool readdir (const char psz_path[], stat_vector_t& stat_vector, bool b_mode2=false); /*! Return file status for path name psz_path. NULL is returned on error. If translate is true, version numbers in the ISO 9660 name are dropped, i.e. ;1 is removed and if level 1 ISO-9660 names are lowercased. Mode2 is used only if translate is true and is a hack that really should go away in libcdio sometime. If set use mode 2 reading, otherwise use mode 1 reading. @return file status object for psz_path. NULL is returned on error. */ Stat * stat (const char psz_path[], bool b_translate=false, bool b_mode2=false) { if (b_translate) return new Stat(iso9660_fs_stat_translate (p_cdio, psz_path, b_mode2)); else return new Stat(iso9660_fs_stat (p_cdio, psz_path)); } }; class IFS // ISO 9660 filesystem image { public: typedef vector< ISO9660::Stat *> stat_vector_t; IFS() { p_iso9660=NULL; }; ~IFS() { iso9660_close(p_iso9660); p_iso9660 = (iso9660_t *) NULL; }; /*! Close previously opened ISO 9660 image and free resources associated with the image. Call this when done using using an ISO 9660 image. @return true is unconditionally returned. If there was an error false would be returned. */ bool close(); /*! Given a directory pointer, find the filesystem entry that contains lsn and return information about it. Returns Stat* of entry if we found lsn, or NULL otherwise. */ Stat *find_lsn(lsn_t i_lsn); /*! Get the application ID. psz_app_id is set to NULL if there is some problem in getting this and false is returned. */ bool get_application_id(/*out*/ char * &psz_app_id) { return iso9660_ifs_get_application_id(p_iso9660, &psz_app_id); } /*! Return the Joliet level recognized. */ uint8_t get_joliet_level(); /*! Get the preparer ID. psz_preparer_id is set to NULL if there is some problem in getting this and false is returned. */ bool get_preparer_id(/*out*/ char * &psz_preparer_id) { return iso9660_ifs_get_preparer_id(p_iso9660, &psz_preparer_id); } /*! Get the publisher ID. psz_publisher_id is set to NULL if there is some problem in getting this and false is returned. */ bool get_publisher_id(/*out*/ char * &psz_publisher_id) { return iso9660_ifs_get_publisher_id(p_iso9660, &psz_publisher_id); } /*! Get the system ID. psz_system_id is set to NULL if there is some problem in getting this and false is returned. */ bool get_system_id(/*out*/ char * &psz_system_id) { return iso9660_ifs_get_system_id(p_iso9660, &psz_system_id); } /*! Return the volume ID in the PVD. psz_volume_id is set to NULL if there is some problem in getting this and false is returned. */ bool get_volume_id(/*out*/ char * &psz_volume_id) { return iso9660_ifs_get_volume_id(p_iso9660, &psz_volume_id); } /*! Return the volumeset ID in the PVD. psz_volumeset_id is set to NULL if there is some problem in getting this and false is returned. */ bool get_volumeset_id(/*out*/ char * &psz_volumeset_id) { return iso9660_ifs_get_volumeset_id(p_iso9660, &psz_volumeset_id); } /*! Return true if ISO 9660 image has extended attrributes (XA). */ bool is_xa (); /*! Open an ISO 9660 image for reading. Maybe in the future we will have a mode. NULL is returned on error. An open routine should be called before using any read routine. If device object was previously opened it is closed first. @param psz_path location of ISO 9660 image @param iso_extension_mask the kinds of ISO 9660 extensions will be considered on access. @return true if open succeeded or false if error. @see open_fuzzy */ bool open(const char *psz_path, iso_extension_mask_t iso_extension_mask=ISO_EXTENSION_NONE) { if (p_iso9660) iso9660_close(p_iso9660); p_iso9660 = iso9660_open_ext(psz_path, iso_extension_mask); return NULL != (iso9660_t *) p_iso9660 ; } /*! Open an ISO 9660 image for "fuzzy" reading. This means that we will try to guess various internal offset based on internal checks. This may be useful when trying to read an ISO 9660 image contained in a file format that libiso9660 doesn't know natively (or knows imperfectly.) Maybe in the future we will have a mode. NULL is returned on error. @see open */ bool open_fuzzy (const char *psz_path, iso_extension_mask_t iso_extension_mask =ISO_EXTENSION_NONE, uint16_t i_fuzz=20); /*! Read the Primary Volume Descriptor for an ISO 9660 image. A PVD object is returned if read, and NULL if there was an error. */ PVD *read_pvd (); /*! Read the Super block of an ISO 9660 image but determine framesize and datastart and a possible additional offset. Generally here we are not reading an ISO 9660 image but a CD-Image which contains an ISO 9660 filesystem. @see read_superblock */ bool read_superblock (iso_extension_mask_t iso_extension_mask =ISO_EXTENSION_NONE, uint16_t i_fuzz=20); /*! Read the Super block of an ISO 9660 image but determine framesize and datastart and a possible additional offset. Generally here we are not reading an ISO 9660 image but a CD-Image which contains an ISO 9660 filesystem. @see read_superblock */ bool read_superblock_fuzzy (iso_extension_mask_t iso_extension_mask =ISO_EXTENSION_NONE, uint16_t i_fuzz=20); /*! Read psz_path (a directory) and return a list of iso9660_stat_t pointers for the files inside that directory. The caller must free the returned result. */ bool readdir (const char psz_path[], stat_vector_t& stat_vector) { CdioList_t *p_stat_list = iso9660_ifs_readdir (p_iso9660, psz_path); if (p_stat_list) { CdioListNode_t *p_entnode; _CDIO_LIST_FOREACH (p_entnode, p_stat_list) { iso9660_stat_t *p_statbuf = (iso9660_stat_t *) _cdio_list_node_data (p_entnode); stat_vector.push_back(new ISO9660::Stat(p_statbuf)); } _cdio_list_free (p_stat_list, false); return true; } else { return false; } } /*! Seek to a position and then read n bytes. Size read is returned. */ long int seek_read (void *ptr, lsn_t start, long int i_size=1) { return iso9660_iso_seek_read (p_iso9660, ptr, start, i_size); } /*! Return file status for pathname. NULL is returned on error. */ Stat * stat (const char psz_path[], bool b_translate=false) { if (b_translate) return new Stat(iso9660_ifs_stat_translate (p_iso9660, psz_path)); else return new Stat(iso9660_ifs_stat (p_iso9660, psz_path)); } private: iso9660_t *p_iso9660; }; }; typedef vector< ISO9660::Stat *> stat_vector_t; typedef vector ::iterator stat_vector_iterator_t; #endif /* __ISO9660_HPP__ */ libcdio-0.83/include/cdio++/devices.hpp0000644000175000017500000001357111114145233014616 00000000000000/* $Id: devices.hpp,v 1.5 2008/03/25 15:59:10 karl Exp $ Copyright (C) 2005, 2006, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** \file devices.hpp * * \brief methods relating to devices. It is *not* part of a class. * This file should not be #included directly. */ /*! Close media tray in CD drive if there is a routine to do so. @param psz_drive the name of CD-ROM to be closed. @param driver_id is the driver to be used or that got used if it was DRIVER_UNKNOWN or DRIVER_DEVICE; If this is NULL, we won't report back the driver used. */ void closeTray (const char *psz_drive, /*in/out*/ driver_id_t &driver_id); /*! Close media tray in CD drive if there is a routine to do so. @param psz_drive the name of CD-ROM to be closed. If omitted or NULL, we'll scan for a suitable CD-ROM. */ void closeTray (const char *psz_drive=(const char *)NULL); /*! Get a string decribing driver_id. @param driver_id the driver you want the description for @return a sring of driver description */ const char *driverDescribe (driver_id_t driver_id); /*! Eject media in CD drive if there is a routine to do so. If the CD is ejected, object is destroyed. */ void ejectMedia (const char *psz_drive); /*! Free device list returned by GetDevices @param device_list list returned by GetDevices @see GetDevices */ void freeDeviceList (char * device_list[]); /*! Return a string containing the default CD device if none is specified. if p_driver_id is DRIVER_UNKNOWN or DRIVER_DEVICE then find a suitable one set the default device for that. NULL is returned if we couldn't get a default device. */ char * getDefaultDevice(/*in/out*/ driver_id_t &driver_id); /*! Return an array of device names. If you want a specific devices for a driver, give that device. If you want hardware devices, give DRIVER_DEVICE and if you want all possible devices, image drivers and hardware drivers give DRIVER_UNKNOWN. NULL is returned if we couldn't return a list of devices. In some situations of drivers or OS's we can't find a CD device if there is no media in it and it is possible for this routine to return NULL even though there may be a hardware CD-ROM. */ char ** getDevices(driver_id_t driver_id=DRIVER_DEVICE); /*! Like GetDevices above, but we may change the p_driver_id if we were given DRIVER_DEVICE or DRIVER_UNKNOWN. This is because often one wants to get a drive name and then *open* it afterwards. Giving the driver back facilitates this, and speeds things up for libcdio as well. */ char **getDevices (driver_id_t &driver_id); /*! Get an array of device names in search_devices that have at least the capabilities listed by the capabities parameter. If search_devices is NULL, then we'll search all possible CD drives. If "b_any" is set false then every capability listed in the extended portion of capabilities (i.e. not the basic filesystem) must be satisified. If "any" is set true, then if any of the capabilities matches, we call that a success. To find a CD-drive of any type, use the mask CDIO_FS_MATCH_ALL. @return the array of device names or NULL if we couldn't get a default device. It is also possible to return a non NULL but after dereferencing the the value is NULL. This also means nothing was found. */ char ** getDevices(/*in*/ char *ppsz_search_devices[], cdio_fs_anal_t capabilities, bool b_any=false); /*! Like GetDevices above but we return the driver we found as well. This is because often one wants to search for kind of drive and then *open* it afterwards. Giving the driver back facilitates this, and speeds things up for libcdio as well. */ char ** getDevices(/*in*/ char* ppsz_search_devices[], cdio_fs_anal_t capabilities, /*out*/ driver_id_t &driver_id, bool b_any=false); /*! Return true if we Have driver for driver_id */ bool haveDriver (driver_id_t driver_id); /*! Determine if bin_name is the bin file part of a CDRWIN CD disk image. @param bin_name location of presumed CDRWIN bin image file. @return the corresponding CUE file if bin_name is a BIN file or NULL if not a BIN file. */ char *isBinFile(const char *psz_bin_name); /*! Determine if cue_name is the cue sheet for a CDRWIN CD disk image. @return corresponding BIN file if cue_name is a CDRWIN cue file or NULL if not a CUE file. */ char *isCueFile(const char *psz_cue_name); /*! Determine if psz_source refers to a real hardware CD-ROM. @param psz_source location name of object @param driver_id driver for reading object. Use DRIVER_UNKNOWN if you don't know what driver to use. @return true if psz_source is a device; If false is returned we could have a CD disk image. */ bool isDevice(const char *psz_source, driver_id_t driver_id); /*! Determine if psz_nrg is a Nero CD disk image. @param psz_nrg location of presumed NRG image file. @return true if psz_nrg is a Nero NRG image or false if not a NRG image. */ bool isNero(const char *psz_nrg); /*! Determine if psz_toc is a TOC file for a cdrdao CD disk image. @param psz_toc location of presumed TOC image file. @return true if toc_name is a cdrdao TOC file or false if not a TOC file. */ bool isTocFile(const char *psz_toc); libcdio-0.83/include/cdio++/read.hpp0000644000175000017500000000742511565177142014126 00000000000000/* Copyright (C) 2005, 2006, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** \file read.hpp * * \brief methods relating to reading blocks of Compact Discs. This file * should not be #included directly. */ /*! Reposition read offset Similar to (if not the same as) libc's lseek() @param offset amount to seek @param whence like corresponding parameter in libc's lseek, e.g. SEEK_SET or SEEK_END. @return (off_t) -1 on error. */ off_t lseek(off_t offset, int whence) { return cdio_lseek(p_cdio, offset, whence); } /*! Reads into buf the next size bytes. Similar to (if not the same as) libc's read() @param p_buf place to read data into. The caller should make sure this location can store at least i_size bytes. @param i_size number of bytes to read @return (ssize_t) -1 on error. */ ssize_t read(void *p_buf, size_t i_size) { return cdio_read(p_cdio, p_buf, i_size); } /*! Reads a number of sectors (AKA blocks). @param p_buf place to read data into. The caller should make sure this location is large enough. See below for size information. @param read_mode the kind of "mode" to use in reading. @param i_lsn sector to read @param i_blocks number of sectors to read If read_mode is CDIO_MODE_AUDIO, *p_buf should hold at least CDIO_FRAMESIZE_RAW * i_blocks bytes. If read_mode is CDIO_MODE_DATA, *p_buf should hold at least i_blocks times either ISO_BLOCKSIZE, M1RAW_SECTOR_SIZE or M2F2_SECTOR_SIZE depending on the kind of sector getting read. If you don't know whether you have a Mode 1/2, Form 1/ Form 2/Formless sector best to reserve space for the maximum which is M2RAW_SECTOR_SIZE. If read_mode is CDIO_MODE_M2F1, *p_buf should hold at least M2RAW_SECTOR_SIZE * i_blocks bytes. If read_mode is CDIO_MODE_M2F2, *p_buf should hold at least CDIO_CD_FRAMESIZE * i_blocks bytes. A DriverOpException is raised on error. */ void readSectors(void *p_buf, lsn_t i_lsn, cdio_read_mode_t read_mode, uint32_t i_blocks=1) { driver_return_code_t drc = cdio_read_sectors(p_cdio, p_buf, i_lsn, read_mode, i_blocks); possible_throw_device_exception(drc); } /*! Reads a number of data sectors (AKA blocks). @param p_buf place to read data into. The caller should make sure this location is large enough. See below for size information. *p_buf should hold at least i_blocks times either ISO_BLOCKSIZE, M1RAW_SECTOR_SIZE or M2F2_SECTOR_SIZE depending on the kind of sector getting read. If you don't know whether you have a Mode 1/2, Form 1/ Form 2/Formless sector best to reserve space for the maximum which is M2RAW_SECTOR_SIZE. @param i_lsn sector to read @param i_blocksize size of block. Should be either CDIO_CD_FRAMESIZE, M2RAW_SECTOR_SIZE, or M2F2_SECTOR_SIZE. See comment above under p_buf. @param i_blocks number of sectors to read A DriverOpException is raised on error. */ void readDataBlocks(void *p_buf, lsn_t i_lsn, uint16_t i_blocksize, uint32_t i_blocks=1) { driver_return_code_t drc = cdio_read_data_sectors (p_cdio, p_buf, i_lsn, i_blocksize, i_blocks); possible_throw_device_exception(drc); } libcdio-0.83/include/cdio++/Makefile.am0000644000175000017500000000217111114145233014511 00000000000000# $Id: Makefile.am,v 1.5 2008/03/20 19:02:38 karl Exp $ # # Copyright (C) 2005, 2008 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ######################################################## # Things to make the install (public) libcdio++ headers ######################################################## # libcdioincludedir=$(includedir)/cdio++ libcdioinclude_HEADERS = \ cdio.hpp \ cdtext.hpp \ device.hpp \ devices.hpp \ disc.hpp \ enum.hpp \ iso9660.hpp \ mmc.hpp \ read.hpp \ track.hpp libcdio-0.83/include/cdio++/mmc.hpp0000644000175000017500000003234011333655550013756 00000000000000/* Copyright (C) 2005, 2006, 2008, 2010 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** * \file mmc.hpp * \brief methods relating to MMC (Multimedia Commands). This file * should not be #included directly. */ /** Read Audio Subchannel information @param p_cdio the CD object to be acted upon. @param p_subchannel place for returned subchannel information A DriverOpException is raised on error. */ void mmcAudioReadSubchannel (/*out*/ cdio_subchannel_t *p_subchannel) { driver_return_code_t drc = mmc_audio_read_subchannel (p_cdio, p_subchannel); possible_throw_device_exception(drc); } /** Eject using MMC commands. If CD-ROM is "locked" we'll unlock it. Command is not "immediate" -- we'll wait for the command to complete. For a more general (and lower-level) routine, @see mmc_start_stop_unit. A DriverOpException is raised on error. */ void mmcEjectMedia() { driver_return_code_t drc = mmc_eject_media( p_cdio ); possible_throw_device_exception(drc); } /** Get the lsn of the end of the CD @return the lsn. On error return CDIO_INVALID_LSN. */ lsn_t mmcGetDiscLastLsn() { return mmc_get_disc_last_lsn( p_cdio ); } /** Return the discmode as reported by the MMC Read (FULL) TOC command. Information was obtained from Section 5.1.13 (Read TOC/PMA/ATIP) pages 56-62 from the MMC draft specification, revision 10a at http://www.t10.org/ftp/t10/drafts/mmc/mmc-r10a.pdf See especially tables 72, 73 and 75. */ discmode_t mmcGetDiscmode() { return mmc_get_discmode( p_cdio ); } /** Get drive capabilities for a device. @return the drive capabilities. */ void mmcGetDriveCap ( /*out*/ cdio_drive_read_cap_t *p_read_cap, /*out*/ cdio_drive_write_cap_t *p_write_cap, /*out*/ cdio_drive_misc_cap_t *p_misc_cap) { mmc_get_drive_cap ( p_cdio, p_read_cap, p_write_cap, p_misc_cap); } /** Get the MMC level supported by the device. */ cdio_mmc_level_t mmcGetDriveMmcCap() { return mmc_get_drive_mmc_cap(p_cdio); } /** Get the DVD type associated with cd object. @return the DVD discmode. */ discmode_t mmcGetDvdStructPhysical (cdio_dvd_struct_t *s) { return mmc_get_dvd_struct_physical (p_cdio, s); } /** Get the CD-ROM hardware info via an MMC INQUIRY command. @return true if we were able to get hardware info, false if we had an error. */ bool mmcGetHwinfo ( /* out*/ cdio_hwinfo_t *p_hw_info ) { return mmc_get_hwinfo ( p_cdio, p_hw_info ); } /** Find out if media has changed since the last call. @param p_cdio the CD object to be acted upon. @return 1 if media has changed since last call, 0 if not. Error return codes are the same as driver_return_code_t */ int mmcGetMediaChanged() { return mmc_get_media_changed(p_cdio); } /** Get the media catalog number (MCN) from the CD via MMC. @return the media catalog number r NULL if there is none or we don't have the ability to get it. Note: string is malloc'd so caller has to free() the returned string when done with it. */ char * mmcGetMcn () { return mmc_get_mcn ( p_cdio ); } /** Get the output port volumes and port selections used on AUDIO PLAY commands via a MMC MODE SENSE command using the CD Audio Control Page. A DriverOpException is raised on error. */ void mmcAudioGetVolume (mmc_audio_volume_t *p_volume) { driver_return_code_t drc = mmc_audio_get_volume (p_cdio, p_volume); possible_throw_device_exception(drc); } /** Report if CD-ROM has a praticular kind of interface (ATAPI, SCSCI, ...) Is it possible for an interface to have serveral? If not this routine could probably return the single mmc_feature_interface_t. @return true if we have the interface and false if not. */ bool_3way_t mmcHaveInterface( cdio_mmc_feature_interface_t e_interface ) { return mmc_have_interface( p_cdio, e_interface ); } /** Run a MODE_SENSE command (6- or 10-byte version) and put the results in p_buf @return DRIVER_OP_SUCCESS if we ran the command ok. */ int mmcModeSense( /*out*/ void *p_buf, int i_size, int page) { return mmc_mode_sense( p_cdio, /*out*/ p_buf, i_size, page); } /** Run a MODE_SENSE command (10-byte version) and put the results in p_buf @return DRIVER_OP_SUCCESS if we ran the command ok. */ int mmcModeSense10( /*out*/ void *p_buf, int i_size, int page) { return mmc_mode_sense_10( p_cdio, /*out*/ p_buf, i_size, page); } /** Run a MODE_SENSE command (6-byte version) and put the results in p_buf @return DRIVER_OP_SUCCESS if we ran the command ok. */ int mmcModeSense6( /*out*/ void *p_buf, int i_size, int page) { return mmc_mode_sense_6( p_cdio, /*out*/ p_buf, i_size, page); } /** Issue a MMC READ_CD command. @param p_cdio object to read from @param p_buf Place to store data. The caller should ensure that p_buf can hold at least i_blocksize * i_blocks bytes. @param i_lsn sector to read @param expected_sector_type restricts reading to a specific CD sector type. Only 3 bits with values 1-5 are used: 0 all sector types 1 CD-DA sectors only 2 Mode 1 sectors only 3 Mode 2 formless sectors only. Note in contrast to all other values an MMC CD-ROM is not required to support this mode. 4 Mode 2 Form 1 sectors only 5 Mode 2 Form 2 sectors only @param b_digital_audio_play Control error concealment when the data being read is CD-DA. If the data being read is not CD-DA, this parameter is ignored. If the data being read is CD-DA and DAP is false zero, then the user data returned should not be modified by flaw obscuring mechanisms such as audio data mute and interpolate. If the data being read is CD-DA and DAP is true, then the user data returned should be modified by flaw obscuring mechanisms such as audio data mute and interpolate. b_sync_header return the sync header (which will probably have the same value as CDIO_SECTOR_SYNC_HEADER of size CDIO_CD_SYNC_SIZE). @param header_codes Header Codes refer to the sector header and the sub-header that is present in mode 2 formed sectors: 0 No header information is returned. 1 The 4-byte sector header of data sectors is be returned, 2 The 8-byte sector sub-header of mode 2 formed sectors is returned. 3 Both sector header and sub-header (12 bytes) is returned. The Header preceeds the rest of the bytes (e.g. user-data bytes) that might get returned. @param b_user_data Return user data if true. For CD-DA, the User Data is CDIO_CD_FRAMESIZE_RAW bytes. For Mode 1, The User Data is ISO_BLOCKSIZE bytes beginning at offset CDIO_CD_HEADER_SIZE+CDIO_CD_SUBHEADER_SIZE. For Mode 2 formless, The User Data is M2RAW_SECTOR_SIZE bytes beginning at offset CDIO_CD_HEADER_SIZE+CDIO_CD_SUBHEADER_SIZE. For data Mode 2, form 1, User Data is ISO_BLOCKSIZE bytes beginning at offset CDIO_CD_XA_SYNC_HEADER. For data Mode 2, form 2, User Data is 2 324 bytes beginning at offset CDIO_CD_XA_SYNC_HEADER. @param b_sync @param b_edc_ecc true if we return EDC/ECC error detection/correction bits. The presence and size of EDC redundancy or ECC parity is defined according to sector type: CD-DA sectors have neither EDC redundancy nor ECC parity. Data Mode 1 sectors have 288 bytes of EDC redundancy, Pad, and ECC parity beginning at offset 2064. Data Mode 2 formless sectors have neither EDC redundancy nor ECC parity Data Mode 2 form 1 sectors have 280 bytes of EDC redundancy and ECC parity beginning at offset 2072 Data Mode 2 form 2 sectors optionally have 4 bytes of EDC redundancy beginning at offset 2348. @param c2_error_information If true associate a bit with each sector for C2 error The resulting bit field is ordered exactly as the main channel bytes. Each 8-bit boundary defines a byte of flag bits. @param subchannel_selection subchannel-selection bits 0 No Sub-channel data shall be returned. (0 bytes) 1 RAW P-W Sub-channel data shall be returned. (96 byte) 2 Formatted Q sub-channel data shall be transferred (16 bytes) 3 Reserved 4 Corrected and de-interleaved R-W sub-channel (96 bytes) 5-7 Reserved @param i_blocksize size of the a block expected to be returned @param i_blocks number of blocks expected to be returned. A DriverOpException is raised on error. */ void mmcReadCd ( void *p_buf, lsn_t i_lsn, int expected_sector_type, bool b_digital_audio_play, bool b_sync, uint8_t header_codes, bool b_user_data, bool b_edc_ecc, uint8_t c2_error_information, uint8_t subchannel_selection, uint16_t i_blocksize, uint32_t i_blocks ) { driver_return_code_t drc = mmc_read_cd ( p_cdio, p_buf, i_lsn, expected_sector_type, b_digital_audio_play, b_sync, header_codes, b_user_data, b_edc_ecc, c2_error_information, subchannel_selection, i_blocksize, i_blocks ); possible_throw_device_exception(drc); } /** Read just the user data part of some sort of data sector (via mmc_read_cd). @param p_cdio object to read from @param p_buf place to read data into. The caller should make sure this location can store at least CDIO_CD_FRAMESIZE, M2RAW_SECTOR_SIZE, or M2F2_SECTOR_SIZE depending on the kind of sector getting read. If you don't know whether you have a Mode 1/2, Form 1/ Form 2/Formless sector best to reserve space for the maximum, M2RAW_SECTOR_SIZE. @param i_lsn sector to read @param i_blocksize size of each block @param i_blocks number of blocks to read */ void mmcReadDataSectors ( void *p_buf, lsn_t i_lsn, uint16_t i_blocksize, uint32_t i_blocks=1) { driver_return_code_t drc = mmc_read_data_sectors ( p_cdio, p_buf, i_lsn, i_blocksize, i_blocks ); possible_throw_device_exception(drc); } /** Read MMC read mode2 sectors A DriverOpException is raised on error. */ void mmcReadSectors ( void *p_buf, lsn_t i_lsn, int read_sector_type, uint32_t i_blocks=1) { driver_return_code_t drc = mmc_read_sectors ( p_cdio, p_buf, i_lsn, read_sector_type, i_blocks); possible_throw_device_exception(drc); } /** Run an MMC command. @param p_cdio CD structure set by cdio_open(). @param i_timeout_ms time in milliseconds we will wait for the command to complete. @param p_cdb CDB bytes. All values that are needed should be set on input. We'll figure out what the right CDB length should be. @param e_direction direction the transfer is to go. @param i_buf Size of buffer @param p_buf Buffer for data, both sending and receiving. @return 0 if command completed successfully. */ int mmcRunCmd( unsigned int i_timeout_ms, const mmc_cdb_t *p_cdb, cdio_mmc_direction_t e_direction, unsigned int i_buf, /*in/out*/ void *p_buf ) { return mmc_run_cmd( p_cdio, i_timeout_ms, p_cdb, e_direction, i_buf, p_buf ); } /** Set the block size for subsequent read requests, via MMC. @param i_blocksize size to set for subsequent requests A DriverOpException is raised on error. */ void mmcSetBlocksize ( uint16_t i_blocksize) { driver_return_code_t drc = mmc_set_blocksize ( p_cdio, i_blocksize); possible_throw_device_exception(drc); } /** Set the drive speed via MMC. @param i_speed speed to set drive to. A DriverOpException is raised on error. */ void mmcSetSpeed( int i_speed ) { driver_return_code_t drc = mmc_set_speed( p_cdio, i_speed, 0); possible_throw_device_exception(drc); } /** Load or Unload media using a MMC START STOP command. @param p_cdio the CD object to be acted upon. @param b_eject eject if true and close tray if false @param b_immediate wait or don't wait for operation to complete @param power_condition Set CD-ROM to idle/standby/sleep. If nonzero eject/load is ignored, so set to 0 if you want to eject or load. @see mmc_eject_media or mmc_close_tray A DriverOpException is raised on error. */ void mmcStartStopMedia(bool b_eject, bool b_immediate, uint8_t power_condition) { driver_return_code_t drc = mmc_start_stop_unit(p_cdio, b_eject, b_immediate, power_condition, 0); possible_throw_device_exception(drc); } /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/include/cdio++/disc.hpp0000644000175000017500000000761411114145233014117 00000000000000/* $Id: disc.hpp,v 1.2 2008/03/25 15:59:10 karl Exp $ Copyright (C) 2005, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** \file disc.hpp * \brief methods relating to getting Compact Disc information. This file * should not be #included directly. */ /*! Get disc mode - the kind of CD (CD-DA, CD-ROM mode 1, CD-MIXED, etc. that we've got. The notion of "CD" is extended a little to include DVD's. */ discmode_t getDiscmode () { return cdio_get_discmode(p_cdio); } /*! Get the lsn of the end of the CD @return the lsn. On error 0 or CDIO_INVALD_LSN. */ lsn_t getDiscLastLsn() { return cdio_get_disc_last_lsn(p_cdio); } /*! Get the number of the first track. @return a track object or NULL; on error. */ CdioTrack *getFirstTrack() { track_t i_track = cdio_get_first_track_num(p_cdio); return (CDIO_INVALID_TRACK != i_track) ? new CdioTrack(p_cdio, i_track) : (CdioTrack *) NULL; } /*! Get the number of the first track. @return the track number or CDIO_INVALID_TRACK on error. */ track_t getFirstTrackNum() { return cdio_get_first_track_num(p_cdio); } /*! Get the number of the first track. @return a track object or NULL; on error. */ CdioTrack *getLastTrack() { track_t i_track = cdio_get_last_track_num(p_cdio); return (CDIO_INVALID_TRACK != i_track) ? new CdioTrack(p_cdio, i_track) : (CdioTrack *) NULL; } /*! Get the number of the first track. @return the track number or CDIO_INVALID_TRACK on error. */ track_t getLastTrackNum() { return cdio_get_last_track_num(p_cdio); } /*! Return the Joliet level recognized for p_cdio. */ uint8_t getJolietLevel() { return cdio_get_joliet_level(p_cdio); } /*! Get the media catalog number (MCN) from the CD. @return the media catalog number r NULL if there is none or we don't have the ability to get it. Note: string is malloc'd so caller has to free() the returned string when done with it. */ char * getMcn () { return cdio_get_mcn (p_cdio); } /*! Get the number of tracks on the CD. @return the number of tracks, or CDIO_INVALID_TRACK if there is an error. */ track_t getNumTracks () { return cdio_get_num_tracks(p_cdio); } /*! Find the track which contans lsn. CDIO_INVALID_TRACK is returned if the lsn outside of the CD or if there was some error. If the lsn is before the pregap of the first track 0 is returned. Otherwise we return the track that spans the lsn. */ CdioTrack *getTrackFromNum(track_t i_track) { return new CdioTrack(p_cdio, i_track); } /*! Find the track which contans lsn. CDIO_INVALID_TRACK is returned if the lsn outside of the CD or if there was some error. If the lsn is before the pregap of the first track 0 is returned. Otherwise we return the track that spans the lsn. */ CdioTrack *getTrackFromLsn(lsn_t lsn) { track_t i_track = cdio_get_track(p_cdio, lsn); return (CDIO_INVALID_TRACK != i_track) ? new CdioTrack(p_cdio, i_track) : (CdioTrack *) NULL; } /*! Return true if discmode is some sort of CD. */ bool isDiscmodeCdrom (discmode_t discmode) { return cdio_is_discmode_cdrom(discmode); } /*! Return true if discmode is some sort of DVD. */ bool isDiscmodeDvd (discmode_t discmode) { return cdio_is_discmode_dvd (discmode) ; } libcdio-0.83/include/cdio++/cdtext.hpp0000644000175000017500000000450311114145233014462 00000000000000/* $Id: cdtext.hpp,v 1.2 2008/03/25 15:59:10 karl Exp $ Copyright (C) 2005, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** \file cdtext.hpp * \brief methods relating to CD-Text information. This file * should not be #included directly. */ /*! Return string representation of the enum values above */ const char *field2str (cdtext_field_t i) { return cdtext_field2str (i); } /*! returns an allocated string associated with the given field. NULL is returned if key is CDTEXT_INVALID or the field is not set. The user needs to free the string when done with it. @see getConst to retrieve a constant string that doesn't have to be freed. */ char *get (cdtext_field_t key) { return cdtext_get (key, p_cdtext); } /*! returns the C cdtext_t pointer associated with this object. */ cdtext_t *get () { return p_cdtext; } /*! returns a const string associated with the given field. NULL is returned if key is CDTEXT_INVALID or the field is not set. Don't use the string when the cdtext object (i.e. the CdIo_t object you got it from) is no longer valid. @see cdio_get to retrieve an allocated string that persists past the cdtext object. */ const char *getConst (cdtext_field_t key) { return cdtext_get_const (key, p_cdtext); } /*! returns enum of keyword if key is a CD-Text keyword, returns MAX_CDTEXT_FIELDS non-zero otherwise. */ cdtext_field_t isKeyword (const char *key) { return cdtext_is_keyword (key); } /*! sets cdtext's keyword entry to field */ void set (cdtext_field_t key, const char *value) { cdtext_set (key, value, p_cdtext); } /* * Local variables: * c-file-style: "gnu" * tab-width: 8 * indent-tabs-mode: nil * End: */ libcdio-0.83/include/cdio++/device.hpp0000644000175000017500000001416311114145233014431 00000000000000/* $Id: device.hpp,v 1.7 2008/03/25 15:59:10 karl Exp $ Copyright (C) 2005, 2006, 2008 Rocky Bernstein This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** \file device.hpp * * \brief C++ header for driver- or device-related libcdio calls. * ("device" includes CD-image reading devices.) */ /*! Free resources associated with CD-ROM Device/Image. After this we must do another open before any more reading. */ bool close() { cdio_destroy(p_cdio); p_cdio = (CdIo_t *) NULL; return true; } /*! Eject media in CD drive if there is a routine to do so. If the CD is ejected, object is destroyed. */ void ejectMedia () { driver_return_code_t drc = cdio_eject_media(&p_cdio); possible_throw_device_exception(drc); } /*! Free device list returned by GetDevices @param device_list list returned by GetDevices @see GetDevices */ void freeDeviceList (char * device_list[]) { cdio_free_device_list(device_list); } /*! Get the value associatied with key. @param key the key to retrieve @return the value associatd with "key" or NULL if p_cdio is NULL or "key" does not exist. */ const char * getArg (const char key[]) { return cdio_get_arg (p_cdio, key); } /*! Return an opaque CdIo_t pointer for the given track object. */ CdIo_t *getCdIo() { return p_cdio; } /*! Return an opaque CdIo_t pointer for the given track object. */ cdtext_t *getCdtext(track_t i_track) { return cdio_get_cdtext (p_cdio, i_track); } /*! Get the CD device name for the object. @return a string containing the CD device for this object or NULL is if we couldn't get a device anme. In some situations of drivers or OS's we can't find a CD device if there is no media in it and it is possible for this routine to return NULL even though there may be a hardware CD-ROM. */ char * getDevice () { return cdio_get_default_device(p_cdio); } /*! Get the what kind of device we've got. @param p_read_cap pointer to return read capabilities @param p_write_cap pointer to return write capabilities @param p_misc_cap pointer to return miscellaneous other capabilities In some situations of drivers or OS's we can't find a CD device if there is no media in it and it is possible for this routine to return NULL even though there may be a hardware CD-ROM. */ void getDriveCap (cdio_drive_read_cap_t &read_cap, cdio_drive_write_cap_t &write_cap, cdio_drive_misc_cap_t &misc_cap) { cdio_get_drive_cap(p_cdio, &read_cap, &write_cap, &misc_cap); } /*! Get a string containing the name of the driver in use. @return a string with driver name or NULL if CdIo_t is NULL (we haven't initialized a specific device. */ const char * getDriverName () { return cdio_get_driver_name(p_cdio); } /*! Get the driver id. if CdIo_t is NULL (we haven't initialized a specific device driver), then return DRIVER_UNKNOWN. @return the driver id.. */ driver_id_t getDriverId () { return cdio_get_driver_id(p_cdio); } /*! Get the CD-ROM hardware info via a SCSI MMC INQUIRY command. False is returned if we had an error getting the information. */ bool getHWinfo ( /*out*/ cdio_hwinfo_t &hw_info ) { return cdio_get_hwinfo(p_cdio, &hw_info); } /*! Get the LSN of the first track of the last session of on the CD. @param i_last_session pointer to the session number to be returned. */ void getLastSession (/*out*/ lsn_t &i_last_session) { driver_return_code_t drc = cdio_get_last_session(p_cdio, &i_last_session); possible_throw_device_exception(drc); } /*! Find out if media has changed since the last call. @return 1 if media has changed since last call, 0 if not. Error return codes are the same as driver_return_code_t */ int getMediaChanged() { return cdio_get_media_changed(p_cdio); } /*! True if CD-ROM understand ATAPI commands. */ bool_3way_t haveATAPI () { return cdio_have_atapi(p_cdio); } /*! Sets up to read from the device specified by psz_source. An open routine should be called before using any read routine. If device object was previously opened it is closed first. @return true if open succeeded or false if error. */ bool open(const char *psz_source) { if (p_cdio) cdio_destroy(p_cdio); p_cdio = cdio_open_cd(psz_source); return NULL != p_cdio ; } /*! Sets up to read from the device specified by psz_source and access mode. An open routine should be called before using any read routine. If device object was previously opened it is "closed". @return true if open succeeded or false if error. */ bool open (const char *psz_source, driver_id_t driver_id, const char *psz_access_mode = (const char *) NULL) { if (p_cdio) cdio_destroy(p_cdio); if (psz_access_mode) p_cdio = cdio_open_am(psz_source, driver_id, psz_access_mode); else p_cdio = cdio_open(psz_source, driver_id); return NULL != p_cdio ; } /*! Set the blocksize for subsequent reads. */ void setBlocksize ( int i_blocksize ) { driver_return_code_t drc = cdio_set_blocksize ( p_cdio, i_blocksize ); possible_throw_device_exception(drc); } /*! Set the drive speed. */ void setSpeed ( int i_speed ) { driver_return_code_t drc = cdio_set_speed ( p_cdio, i_speed ); possible_throw_device_exception(drc); } /*! Set the arg "key" with "value" in "p_cdio". @param key the key to set @param value the value to assocaiate with key */ void setArg (const char key[], const char value[]) { driver_return_code_t drc = cdio_set_arg (p_cdio, key, value); possible_throw_device_exception(drc); } libcdio-0.83/include/cdio++/Makefile.in0000644000175000017500000003775111652210027014537 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Id: Makefile.am,v 1.5 2008/03/20 19:02:38 karl Exp $ # # Copyright (C) 2005, 2008 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ######################################################## # Things to make the install (public) libcdio++ headers ######################################################## # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = include/cdio++ DIST_COMMON = $(libcdioinclude_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libcdioincludedir)" HEADERS = $(libcdioinclude_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDDA_PLAYER_LIBS = @CDDA_PLAYER_LIBS@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CDPARANOIA_NAME = @CDPARANOIA_NAME@ CFLAGS = @CFLAGS@ CMP = @CMP@ COS_LIB = @COS_LIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_PKG_LIB_HACK = @DARWIN_PKG_LIB_HACK@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ DIFF_OPTS = @DIFF_OPTS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GIT2CL = @GIT2CL@ GREP = @GREP@ HAVE_BSDI_CDROM = @HAVE_BSDI_CDROM@ HAVE_DARWIN_CDROM = @HAVE_DARWIN_CDROM@ HAVE_FREEBSD_CDROM = @HAVE_FREEBSD_CDROM@ HAVE_JOLIET = @HAVE_JOLIET@ HAVE_LINUX_CDROM = @HAVE_LINUX_CDROM@ HAVE_OS2_CDROM = @HAVE_OS2_CDROM@ HAVE_ROCK = @HAVE_ROCK@ HAVE_SOLARIS_CDROM = @HAVE_SOLARIS_CDROM@ HAVE_WIN32_CDROM = @HAVE_WIN32_CDROM@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDIOPP_LIBS = @LIBCDIOPP_LIBS@ LIBCDIO_CDDA_LIBS = @LIBCDIO_CDDA_LIBS@ LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ LIBCDIO_DEPS = @LIBCDIO_DEPS@ LIBCDIO_LIBS = @LIBCDIO_LIBS@ LIBCDIO_PARANOIA_LIBS = @LIBCDIO_PARANOIA_LIBS@ LIBCDIO_SOURCE_PATH = @LIBCDIO_SOURCE_PATH@ LIBCDIO_VERSION_NUM = @LIBCDIO_VERSION_NUM@ LIBICONV = @LIBICONV@ LIBISO9660PP_LIBS = @LIBISO9660PP_LIBS@ LIBISO9660_CFLAGS = @LIBISO9660_CFLAGS@ LIBISO9660_LIBS = @LIBISO9660_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBUDF_LIBS = @LIBUDF_LIBS@ LINUX_CDROM_TIMEOUT = @LINUX_CDROM_TIMEOUT@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_NO_UNDEFINED = @LT_NO_UNDEFINED@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OLD_CDPARANOIA = @OLD_CDPARANOIA@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SBPCD_H = @SBPCD_H@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TYPESIZES = @TYPESIZES@ UCDROM_H = @UCDROM_H@ VCDINFO_CFLAGS = @VCDINFO_CFLAGS@ VCDINFO_LIBS = @VCDINFO_LIBS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ libcdioincludedir = $(includedir)/cdio++ libcdioinclude_HEADERS = \ cdio.hpp \ cdtext.hpp \ device.hpp \ devices.hpp \ disc.hpp \ enum.hpp \ iso9660.hpp \ mmc.hpp \ read.hpp \ track.hpp all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/cdio++/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu include/cdio++/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-libcdioincludeHEADERS: $(libcdioinclude_HEADERS) @$(NORMAL_INSTALL) test -z "$(libcdioincludedir)" || $(MKDIR_P) "$(DESTDIR)$(libcdioincludedir)" @list='$(libcdioinclude_HEADERS)'; test -n "$(libcdioincludedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libcdioincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(libcdioincludedir)" || exit $$?; \ done uninstall-libcdioincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(libcdioinclude_HEADERS)'; test -n "$(libcdioincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(libcdioincludedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(libcdioincludedir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libcdioincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-libcdioincludeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libcdioincludeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libcdioincludeHEADERS install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libcdioincludeHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libcdio-0.83/include/Makefile.in0000644000175000017500000004554511652210027013473 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Id: Makefile.am,v 1.4 2008/03/20 19:02:37 karl Exp $ # # Copyright (C) 2003, 2004, 2006, 2008 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = include DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = cdio cdio++ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDDA_PLAYER_LIBS = @CDDA_PLAYER_LIBS@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CDPARANOIA_NAME = @CDPARANOIA_NAME@ CFLAGS = @CFLAGS@ CMP = @CMP@ COS_LIB = @COS_LIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_PKG_LIB_HACK = @DARWIN_PKG_LIB_HACK@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ DIFF_OPTS = @DIFF_OPTS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GIT2CL = @GIT2CL@ GREP = @GREP@ HAVE_BSDI_CDROM = @HAVE_BSDI_CDROM@ HAVE_DARWIN_CDROM = @HAVE_DARWIN_CDROM@ HAVE_FREEBSD_CDROM = @HAVE_FREEBSD_CDROM@ HAVE_JOLIET = @HAVE_JOLIET@ HAVE_LINUX_CDROM = @HAVE_LINUX_CDROM@ HAVE_OS2_CDROM = @HAVE_OS2_CDROM@ HAVE_ROCK = @HAVE_ROCK@ HAVE_SOLARIS_CDROM = @HAVE_SOLARIS_CDROM@ HAVE_WIN32_CDROM = @HAVE_WIN32_CDROM@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDIOPP_LIBS = @LIBCDIOPP_LIBS@ LIBCDIO_CDDA_LIBS = @LIBCDIO_CDDA_LIBS@ LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ LIBCDIO_DEPS = @LIBCDIO_DEPS@ LIBCDIO_LIBS = @LIBCDIO_LIBS@ LIBCDIO_PARANOIA_LIBS = @LIBCDIO_PARANOIA_LIBS@ LIBCDIO_SOURCE_PATH = @LIBCDIO_SOURCE_PATH@ LIBCDIO_VERSION_NUM = @LIBCDIO_VERSION_NUM@ LIBICONV = @LIBICONV@ LIBISO9660PP_LIBS = @LIBISO9660PP_LIBS@ LIBISO9660_CFLAGS = @LIBISO9660_CFLAGS@ LIBISO9660_LIBS = @LIBISO9660_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBUDF_LIBS = @LIBUDF_LIBS@ LINUX_CDROM_TIMEOUT = @LINUX_CDROM_TIMEOUT@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_NO_UNDEFINED = @LT_NO_UNDEFINED@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OLD_CDPARANOIA = @OLD_CDPARANOIA@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SBPCD_H = @SBPCD_H@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TYPESIZES = @TYPESIZES@ UCDROM_H = @UCDROM_H@ VCDINFO_CFLAGS = @VCDINFO_CFLAGS@ VCDINFO_LIBS = @VCDINFO_LIBS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @ENABLE_CXX_BINDINGS_TRUE@cxxdirs = cdio++ SUBDIRS = cdio $(cxxdirs) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu include/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libcdio-0.83/configure0000755000175000017500000236447711652140254011730 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.67 for libcdio 0.83. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: libcdio-help@gnu.org about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac ECHO=${lt_ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then # Yippee, $ECHO works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <<_LT_EOF $* _LT_EOF exit 0 fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$lt_ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if { echo_test_string=`eval $cmd`; } 2>/dev/null && { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null then break fi done fi if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$ECHO" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. ECHO='print -r' elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. ECHO='printf %s\n' if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL ECHO="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. ECHO=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. lt_ECHO=$ECHO if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libcdio' PACKAGE_TARNAME='libcdio' PACKAGE_VERSION='0.83' PACKAGE_STRING='libcdio 0.83' PACKAGE_BUGREPORT='libcdio-help@gnu.org' PACKAGE_URL='' ac_unique_file="src/cd-info.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS VCDINFO_LIBS VCDINFO_CFLAGS CDDA_PLAYER_LIBS BUILD_CDDA_PLAYER_FALSE BUILD_CDDA_PLAYER_TRUE CDDB_LIBS CDDB_CFLAGS PKG_CONFIG ENABLE_ROCK_FALSE ENABLE_ROCK_TRUE HAVE_ROCK HAVE_JOLIET LTLIBICONV LIBICONV LIBCDIO_SOURCE_PATH HAVE_OS2_CDROM HAVE_WIN32_CDROM HAVE_SOLARIS_CDROM HAVE_LINUX_CDROM HAVE_FREEBSD_CDROM HAVE_DARWIN_CDROM HAVE_BSDI_CDROM LINUX_CDROM_TIMEOUT LT_NO_UNDEFINED DARWIN_PKG_LIB_HACK LIBUDF_LIBS LIBISO9660_LIBS LIBCDIO_PARANOIA_LIBS LIBCDIO_DEPS LIBCDIOPP_LIBS LIBCDIO_LIBS LIBISO9660PP_LIBS LIBISO9660_CFLAGS LIBCDIO_CFLAGS LIBCDIO_CDDA_LIBS DISABLE_CPP_FALSE DISABLE_CPP_TRUE BUILD_VERSIONED_LIBS_FALSE BUILD_VERSIONED_LIBS_TRUE BUILD_CDIOTEST_FALSE BUILD_CDIOTEST_TRUE BUILD_CDINFO_LINUX_FALSE BUILD_CDINFO_LINUX_TRUE BUILD_ISO_READ_FALSE BUILD_ISO_READ_TRUE BUILD_ISO_INFO_FALSE BUILD_ISO_INFO_TRUE BUILD_CD_PARANOIA_FALSE BUILD_CD_PARANOIA_TRUE BUILD_CD_READ_FALSE BUILD_CD_READ_TRUE BUILD_CDINFO_FALSE BUILD_CDINFO_TRUE BUILD_CD_DRIVE_FALSE BUILD_CD_DRIVE_TRUE CYGWIN_FALSE CYGWIN_TRUE COS_LIB CXXCPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL lt_ECHO RANLIB AR LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP SED LIBTOOL OBJDUMP DLLTOOL AS TYPESIZES UCDROM_H SBPCD_H OLD_CDPARANOIA CMP DIFF_OPTS DIFF HAVE_PERL_FALSE HAVE_PERL_TRUE PERL EGREP GREP CPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC BUILD_EXAMPLES_FALSE BUILD_EXAMPLES_TRUE ENABLE_CPP_FALSE ENABLE_CPP_TRUE ENABLE_CXX_BINDINGS_FALSE ENABLE_CXX_BINDINGS_TRUE CDPARANOIA_NAME MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE GIT2CL HELP2MAN LIBCDIO_VERSION_NUM host_os host_vendor host_cpu host build_os build_vendor build_cpu build am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_maintainer_mode with_cd_drive with_cd_info with_cd_paranoia with_cdda_player with_cd_paranoia_name with_cd_read with_iso_info with_iso_read with_versioned_libs enable_cxx enable_cpp_progs enable_example_progs enable_dependency_tracking enable_largefile enable_shared enable_static with_pic enable_fast_install with_gnu_ld enable_libtool_lock enable_joliet enable_rpath with_libiconv_prefix enable_rock enable_cddb enable_vcd_info ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CXX CXXFLAGS CCC CPP CXXCPP PKG_CONFIG CDDB_CFLAGS CDDB_LIBS VCDINFO_CFLAGS VCDINFO_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures libcdio 0.83 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/libcdio] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of libcdio 0.83:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --disable-cxx Disable C++ bindings (default enabled) --enable-cpp-progs make C++ example programs (default enabled) --disable-example-progs Don't build libcdio sample programs --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-largefile omit support for large files --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-joliet don't include Joliet extension support (default enabled) --disable-rpath do not hardcode runtime library paths --enable-rock include Rock-Ridge extension support (default enabled) --enable-cddb include CDDB lookups in cd_info (default enabled) --enable-vcd-info include Video CD Info from libvcd Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --without-cd-drive don't build program cd-drive (default with) --without-cd-info don't build program cd-info (default with) --without-cd-paranoia don't build program cd-paranoia and paranoia libraries (default with) --without-cdda-player don't build program cdda-player (default with) --with-cd-paranoia-name name to use as the cd-paranoia program name (default cd-paranoia) --without-cd-read don't build program cd-read (default with) --without-iso-info don't build program iso-info (default with) --without-iso-read don't build program iso-read (default with) --without-versioned-libs build versioned library symbols (default enabled if you have GNU ld) --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-gnu-ld assume the C compiler uses GNU ld default=no --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CXX C++ compiler command CXXFLAGS C++ compiler flags CPP C preprocessor CXXCPP C++ preprocessor PKG_CONFIG path to pkg-config utility CDDB_CFLAGS C compiler flags for CDDB, overriding pkg-config CDDB_LIBS linker flags for CDDB, overriding pkg-config VCDINFO_CFLAGS C compiler flags for VCDINFO, overriding pkg-config VCDINFO_LIBS linker flags for VCDINFO, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF libcdio configure 0.83 generated by GNU Autoconf 2.67 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval "test \"\${$3+set}\"" = set; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ----------------------------------- ## ## Report this to libcdio-help@gnu.org ## ## ----------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_func # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES # ---------------------------------------------------- # Tries to find if the field MEMBER exists in type AGGR, after including # INCLUDES, setting cache variable VAR accordingly. ac_fn_c_check_member () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 $as_echo_n "checking for $2.$3... " >&6; } if eval "test \"\${$4+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int main () { static $2 ac_aggr; if (ac_aggr.$3) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$4=yes" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int main () { static $2 ac_aggr; if (sizeof ac_aggr.$3) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$4=yes" else eval "$4=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$4 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_member cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by libcdio $as_me 0.83, which was generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5 ; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='libcdio' VERSION='0.83' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if test "${ac_cv_build+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac ac_config_headers="$ac_config_headers config.h" LIBCDIO_VERSION_NUM=`echo 83 | cut -d . -f 1 | tr -d a-z` HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"} GIT2CL=${GIT2CL-"${am_missing_run}git2cl"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # Check whether --with-cd-drive was given. if test "${with_cd_drive+set}" = set; then : withval=$with_cd_drive; enable_cd_drive="${withval}" else enable_cd_drive=yes fi # Check whether --with-cd-info was given. if test "${with_cd_info+set}" = set; then : withval=$with_cd_info; enable_cd_info="${withval}" else enable_cd_info=yes fi # Check whether --with-cd-paranoia was given. if test "${with_cd_paranoia+set}" = set; then : withval=$with_cd_paranoia; enable_cd_paranoia="${withval}" else enable_cd_paranoia=yes fi # Check whether --with-cdda-player was given. if test "${with_cdda_player+set}" = set; then : withval=$with_cdda_player; enable_cdda_player="${withval}" else enable_cdda_player=yes fi # Check whether --with-cd-paranoia-name was given. if test "${with_cd_paranoia_name+set}" = set; then : withval=$with_cd_paranoia_name; cd_paranoia_name="${withval}" else cd_paranoia_name="cd-paranoia" fi CDPARANOIA_NAME="$cd_paranoia_name" # Check whether --with-cd-read was given. if test "${with_cd_read+set}" = set; then : withval=$with_cd_read; enable_cd_read="${withval}" else enable_cd_read=yes fi # Check whether --with-iso-info was given. if test "${with_iso_info+set}" = set; then : withval=$with_iso_info; enable_iso_info="${withval}" else enable_iso_info=yes fi # Check whether --with-iso-read was given. if test "${with_iso_read+set}" = set; then : withval=$with_iso_read; enable_iso_read="${withval}" else enable_iso_read=yes fi # Check whether --with-versioned-libs was given. if test "${with_versioned_libs+set}" = set; then : withval=$with_versioned_libs; enable_versioned_libs="${withval}" else enable_versioned_libs=yes fi # Check whether --enable-cxx was given. if test "${enable_cxx+set}" = set; then : enableval=$enable_cxx; fi if test "x$enable_cxx" != "xno"; then ENABLE_CXX_BINDINGS_TRUE= ENABLE_CXX_BINDINGS_FALSE='#' else ENABLE_CXX_BINDINGS_TRUE='#' ENABLE_CXX_BINDINGS_FALSE= fi # Check whether --enable-cpp-progs was given. if test "${enable_cpp_progs+set}" = set; then : enableval=$enable_cpp_progs; fi if test x"$enable_cpp_progs" = "xyes"; then ENABLE_CPP_TRUE= ENABLE_CPP_FALSE='#' else ENABLE_CPP_TRUE='#' ENABLE_CPP_FALSE= fi # Check whether --enable-example-progs was given. if test "${enable_example_progs+set}" = set; then : enableval=$enable_example_progs; fi if test "x$enable_example_progs" != "xno"; then BUILD_EXAMPLES_TRUE= BUILD_EXAMPLES_FALSE='#' else BUILD_EXAMPLES_TRUE='#' BUILD_EXAMPLES_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5 ; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5 ; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5 ; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5 ; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5 ; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if test "x$CC" != xcc; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 $as_echo_n "checking whether cc understands -c and -o together... " >&6; } fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -f conftest2.$ac_objext && { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. if { ac_try='cc -c conftest.$ac_ext >&5' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -f conftest2.$ac_objext && { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # cc works too. : else # cc exists but doesn't like -o. eval ac_cv_prog_cc_${ac_cc}_c_o=no fi fi fi else eval ac_cv_prog_cc_${ac_cc}_c_o=no fi rm -f core conftest* fi if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h fi # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5 ; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" if test "x$ac_cv_header_minix_config_h" = x""yes; then : MINIX=yes else MINIX= fi if test "$MINIX" = yes; then $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h $as_echo "#define _MINIX 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_safe_to_define___extensions__=yes else ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h $as_echo "#define _ALL_SOURCE 1" >>confdefs.h $as_echo "#define _GNU_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h cd_drivers='cdrdao, BIN/CUE, NRG' if test "x$GCC" != "xyes" then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** non GNU CC compiler detected. *** This package has not been tested very well with non GNU compilers *** you should try to use 'gcc' for compiling this package." >&5 $as_echo "$as_me: WARNING: *** non GNU CC compiler detected. *** This package has not been tested very well with non GNU compilers *** you should try to use 'gcc' for compiling this package." >&2;} else WARN_CFLAGS="-Wall -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations -Wunused -Wpointer-arith -Wwrite-strings -Wnested-externs -Wno-sign-compare" for WOPT in $WARN_CFLAGS; do SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $WOPT" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands $WOPT" >&5 $as_echo_n "checking whether $CC understands $WOPT... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : has_option=yes else has_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$SAVE_CFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 $as_echo "$has_option" >&6; } if test $has_option = yes; then warning_flags="$warning_flags $option" fi unset has_option unset SAVE_CFLAGS done WARNING_FLAGS="$warning_flags" unset warning_flags fi # We use Perl for documentation and regression tests # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PERL+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PERL in [\\/]* | ?:[\\/]*) ac_cv_path_PERL="$PERL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="false" ;; esac fi PERL=$ac_cv_path_PERL if test -n "$PERL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 $as_echo "$PERL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$PERL" != "false"; then HAVE_PERL_TRUE= HAVE_PERL_FALSE='#' else HAVE_PERL_TRUE='#' HAVE_PERL_FALSE= fi # We use a diff in regression testing # Extract the first word of "diff", so it can be a program name with args. set dummy diff; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_DIFF+set}" = set; then : $as_echo_n "(cached) " >&6 else case $DIFF in [\\/]* | ?:[\\/]*) ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_DIFF" && ac_cv_path_DIFF="no" ;; esac fi DIFF=$ac_cv_path_DIFF if test -n "$DIFF"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5 $as_echo "$DIFF" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi DIFF_OPTS= if test "$DIFF" = no ; then # Extract the first word of "cmp", so it can be a program name with args. set dummy cmp; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_DIFF+set}" = set; then : $as_echo_n "(cached) " >&6 else case $DIFF in [\\/]* | ?:[\\/]*) ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_DIFF" && ac_cv_path_DIFF="no" ;; esac fi DIFF=$ac_cv_path_DIFF if test -n "$DIFF"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5 $as_echo "$DIFF" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else # Try for GNU diff options. # MSDOG output uses \r\n rather than \n in tests for diff_opt in -w --unified ; do if $DIFF $diff_opt ./configure ./configure > /dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: adding $diff_opt to diff in regression tests" >&5 $as_echo "adding $diff_opt to diff in regression tests" >&6; } DIFF_OPTS="$DIFF_OPTS $diff_opt" fi done fi # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } if test "${ac_cv_sys_largefile_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : break fi rm -f core conftest.err conftest.$ac_objext CC="$CC -n32" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 $as_echo "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } if test "${ac_cv_sys_file_offset_bits+set}" = set; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=64; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 $as_echo "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF ;; esac rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } if test "${ac_cv_sys_large_files+set}" = set; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=1; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 $as_echo "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF ;; esac rm -rf conftest* fi fi if test "x$ac_cv_sys_largefiles" = "xyes"; then if test "x$ac_cv_sys_file_offset_bits" = "x64"; then LIBCDIO_LARGEFILE_FLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES" else LIBCDIO_LARGEFILE_FLAGS="-D_LARGE_FILES" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } if test "${ac_cv_sys_largefile_source+set}" = set; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* for off_t */ #include int main () { int (*fp) (FILE *, off_t, int) = fseeko; return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_sys_largefile_source=no; break fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGEFILE_SOURCE 1 #include /* for off_t */ #include int main () { int (*fp) (FILE *, off_t, int) = fseeko; return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_sys_largefile_source=1; break fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_cv_sys_largefile_source=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 $as_echo "$ac_cv_sys_largefile_source" >&6; } case $ac_cv_sys_largefile_source in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source _ACEOF ;; esac rm -rf conftest* # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug # in glibc 2.1.3, but that breaks too many other things. # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. if test $ac_cv_sys_largefile_source != unknown; then $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h fi if test "$ac_cv_sys_largefile_source" != no; then LIBCDIO_LARGEFILE_FLAGS="$LIBDDIO_LARGEFILE_FLAGS -D_LARGEFILE_SOURCE=$ac_cv_sys_largefile_source" fi CPPFLAGS="$CPPFLAGS $LIBCDIO_LARGEFILE_FLAGS" fi # We use cmp and cdparanoia in cd-paranoia regression testing # Extract the first word of "cmp", so it can be a program name with args. set dummy cmp; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_CMP+set}" = set; then : $as_echo_n "(cached) " >&6 else case $CMP in [\\/]* | ?:[\\/]*) ac_cv_path_CMP="$CMP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_CMP" && ac_cv_path_CMP="no" ;; esac fi CMP=$ac_cv_path_CMP if test -n "$CMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5 $as_echo "$CMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "cdparanoia", so it can be a program name with args. set dummy cdparanoia; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_OLD_CDPARANOIA+set}" = set; then : $as_echo_n "(cached) " >&6 else case $OLD_CDPARANOIA in [\\/]* | ?:[\\/]*) ac_cv_path_OLD_CDPARANOIA="$OLD_CDPARANOIA" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_OLD_CDPARANOIA="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_OLD_CDPARANOIA" && ac_cv_path_OLD_CDPARANOIA="no" ;; esac fi OLD_CDPARANOIA=$ac_cv_path_OLD_CDPARANOIA if test -n "$OLD_CDPARANOIA"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OLD_CDPARANOIA" >&5 $as_echo "$OLD_CDPARANOIA" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi $as_echo "#define LIBCDIO_CONFIG_H 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi for ac_header in errno.h fcntl.h glob.h limits.h pwd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in stdarg.h stdbool.h stdio.h sys/cdio.h sys/param.h \ sys/time.h sys/timeb.h sys/utsname.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # We have to disable cdda_player unless we have either ncurses.h or # curses.h if test $enable_cdda_player = 'yes' ; then enable_cdda_player='no' for ac_header in ncurses.h curses.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF enable_cdda_player='yes' fi done fi # FreeBSD 4 has getopt in unistd.h. So we include that before # getopt.h for ac_header in unistd.h getopt.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if test "${ac_cv_c_bigendian+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h ;; #( no) ;; #( universal) $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if test "${ac_cv_c_const+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if test "${ac_cv_c_inline+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports ISOC99 _Pragma()" >&5 $as_echo_n "checking whether $CC supports ISOC99 _Pragma()... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { _Pragma("pack(1)") ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ISOC99_PRAGMA=yes $as_echo "#define HAVE_ISOC99_PRAGMA /**/" >>confdefs.h else ISOC99_PRAGMA=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ISOC99_PRAGMA" >&5 $as_echo "$ISOC99_PRAGMA" >&6; } ## ## Check for S_ISSOCK() and S_ISLNK() macros ## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for S_ISLNK() macro" >&5 $as_echo_n "checking for S_ISLNK() macro... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_SYS_STAT_H # include #endif int main () { return S_ISLNK(0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; }; $as_echo "#define HAVE_S_ISLNK /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking for S_ISSOCK() macro" >&5 $as_echo_n "checking for S_ISSOCK() macro... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_SYS_STAT_H # include #endif int main () { return S_ISSOCK(0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; }; $as_echo "#define HAVE_S_ISSOCK /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec" >&5 $as_echo_n "checking for struct timespec... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_SYS_TIME_H #include #endif int main () { struct timespec ts; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; }; $as_echo "#define HAVE_STRUCT_TIMESPEC /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create empty arrays" >&5 $as_echo_n "checking how to create empty arrays... " >&6; } empty_array_size="xxxx" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { struct { int foo; int bar[]; } doo; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : empty_array_size="" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "x$empty_array_size" = "xxxx";then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { struct { int foo; int bar[0]; } doo; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : empty_array_size="0" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x$empty_array_size" = "xxxx" then as_fn_error $? "compiler is unable to creaty empty arrays" "$LINENO" 5 else cat >>confdefs.h <<_ACEOF #define EMPTY_ARRAY_SIZE $empty_array_size _ACEOF msg="[${empty_array_size}]" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5 $as_echo "$msg" >&6; } fi enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AS+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AS="${ac_tool_prefix}as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 $as_echo "$AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AS+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AS="as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 $as_echo "$ac_ct_AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AS" = x; then AS="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AS=$ac_ct_AS fi else AS="$ac_cv_prog_AS" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DLLTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi ;; esac test -z "$AS" && AS=as test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$OBJDUMP" && OBJDUMP=objdump case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.2.6b' macro_revision='1.3017' ltmain="$ac_aux_dir/ltmain.sh" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if test "${ac_cv_path_SED+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if test "${ac_cv_path_FGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if test "${lt_cv_path_NM+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$ac_tool_prefix"; then for ac_prog in "dumpbin -symbols" "link -dump -symbols" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DUMPBIN+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in "dumpbin -symbols" "link -dump -symbols" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if test "${lt_cv_nm_interface+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:7438: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:7441: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:7444: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ = "XX$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ const struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line 8646 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_LIPO+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL64+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if test "${lt_cv_apple_cc_single_mod+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} _lt_caught_CXX_error=yes; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu else _lt_caught_CXX_error=yes fi # Set options enable_dlopen=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if test "${lt_cv_objdir+set}" = set; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:10433: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:10437: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl*) # IBM XL C 8.0/Fortran 10.1 on PPC lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 $as_echo "$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:10772: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:10776: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:10877: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:10881: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:10932: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:10936: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu) link_all_deplibs=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag= tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo(void) {} _ACEOF if ac_fn_c_try_link "$LINENO"; then : archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 $as_echo "$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line 13316 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line 13412 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec_CXX='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty # executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared # libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='' link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else ld_shlibs_CXX=no fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5]* | *pgcpp\ [1-5]*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 will use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; xl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) ld_shlibs_CXX=yes ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=echo else ld_shlibs_CXX=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $RM -f confest.$objext # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; xlc* | xlC*) # IBM XL 8.0 on PPC lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5 $as_echo "$lt_prog_compiler_pic_CXX" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:15368: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:15372: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:15467: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:15471: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:15519: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:15523: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) link_all_deplibs_CXX=no ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then archive_cmds_need_lc_CXX=no else archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_CXX" >&5 $as_echo "$archive_cmds_need_lc_CXX" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink || test "$inherit_rpath_CXX" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi fi # test -n "$compiler" CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_commands="$ac_config_commands libtool" # Only expand once: # FIXME: # I believe some OS's require -lm, but I don't recall for what function # When we find it, put it in below instead of "cos". { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 $as_echo_n "checking for cos in -lm... " >&6; } if test "${ac_cv_lib_m_cos+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cos (); int main () { return cos (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_cos=yes else ac_cv_lib_m_cos=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 $as_echo "$ac_cv_lib_m_cos" >&6; } if test "x$ac_cv_lib_m_cos" = x""yes; then : LIBS="$LIBS -lm"; COS_LIB="-lm" fi CFLAGS="$CFLAGS $WARN_CFLAGS" # Do we have GNU ld? If we don't, we can't build versioned symbols. if test "$with_gnu_ld" != yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: I don't see GNU ld. I'm going to assume --without-versioned-libs" >&5 $as_echo "$as_me: WARNING: I don't see GNU ld. I'm going to assume --without-versioned-libs" >&2;} enable_versioned_libs='no' fi # We also need GNU make to build versioned symbols. if test "x$enable_versioned_libs" = "xyes" ; then if test -n "$MAKE" ; then $MAKE --version 2>/dev/null >/dev/null if test "$?" -ne 0 ; then as_fn_error $? "Either set MAKE variable to GNU make or use --without-versioned-libs option" "$LINENO" 5 fi else make --version 2>/dev/null >/dev/null if test "$?" -ne 0 ; then as_fn_error $? "Either set MAKE variable to GNU make or use --without-versioned-libs option" "$LINENO" 5 fi fi fi if test "x$CYGWIN" = "xyes"; then CYGWIN_TRUE= CYGWIN_FALSE='#' else CYGWIN_TRUE='#' CYGWIN_FALSE= fi if test "x$enable_cd_drive" = "xyes"; then BUILD_CD_DRIVE_TRUE= BUILD_CD_DRIVE_FALSE='#' else BUILD_CD_DRIVE_TRUE='#' BUILD_CD_DRIVE_FALSE= fi if test "x$enable_cd_info" = "xyes"; then BUILD_CDINFO_TRUE= BUILD_CDINFO_FALSE='#' else BUILD_CDINFO_TRUE='#' BUILD_CDINFO_FALSE= fi if test "x$enable_cd_read" = "xyes"; then BUILD_CD_READ_TRUE= BUILD_CD_READ_FALSE='#' else BUILD_CD_READ_TRUE='#' BUILD_CD_READ_FALSE= fi if test "x$enable_cd_paranoia" = "xyes"; then BUILD_CD_PARANOIA_TRUE= BUILD_CD_PARANOIA_FALSE='#' else BUILD_CD_PARANOIA_TRUE='#' BUILD_CD_PARANOIA_FALSE= fi if test "x$enable_iso_info" = "xyes"; then BUILD_ISO_INFO_TRUE= BUILD_ISO_INFO_FALSE='#' else BUILD_ISO_INFO_TRUE='#' BUILD_ISO_INFO_FALSE= fi if test "x$enable_iso_read" = "xyes"; then BUILD_ISO_READ_TRUE= BUILD_ISO_READ_FALSE='#' else BUILD_ISO_READ_TRUE='#' BUILD_ISO_READ_FALSE= fi if test "x$enable_cd_info_linux" = "xyes"; then BUILD_CDINFO_LINUX_TRUE= BUILD_CDINFO_LINUX_FALSE='#' else BUILD_CDINFO_LINUX_TRUE='#' BUILD_CDINFO_LINUX_FALSE= fi if test "x$enable_cdiotest" = "xyes"; then BUILD_CDIOTEST_TRUE= BUILD_CDIOTEST_FALSE='#' else BUILD_CDIOTEST_TRUE='#' BUILD_CDIOTEST_FALSE= fi if test "x$enable_versioned_libs" = "xyes"; then BUILD_VERSIONED_LIBS_TRUE= BUILD_VERSIONED_LIBS_FALSE='#' else BUILD_VERSIONED_LIBS_TRUE='#' BUILD_VERSIONED_LIBS_FALSE= fi if test "x$disable_cpp" = "xyes"; then DISABLE_CPP_TRUE= DISABLE_CPP_FALSE='#' else DISABLE_CPP_TRUE='#' DISABLE_CPP_FALSE= fi LIBCDIO_CDDA_LIBS='$(top_builddir)/lib/cdda_interface/libcdio_cdda.la' LIBCDIO_CFLAGS='-I$(top_srcdir)/lib/driver -I$(top_builddir)/include -I$(top_srcdir)/include/' LIBCDIO_LIBS='$(top_builddir)/lib/driver/libcdio.la' LIBCDIO_DEPS="$LIBCDIO_LIBS" LIBCDIOPP_LIBS='$(top_builddir)/lib/cdio++/libcdio++.la' LIBISO9660PP_LIBS='$(top_builddir)/lib/cdio++/libiso9660++.la' LIBCDIO_PARANOIA_LIBS='$(top_builddir)/lib/paranoia/libcdio_paranoia.la' LIBISO9660_CFLAGS='-I$(top_srcdir)/lib/iso9660/' LIBISO9660_LIBS='$(top_builddir)/lib/iso9660/libiso9660.la' LIBUDF_CFLAGS='-I$(top_srcdir)/lib/udf/' LIBUDF_LIBS='$(top_builddir)/lib/udf/libudf.la' LT_NO_UNDEFINED= case $host_os in aix*) ## Don't use AIX driver until starts to really work ## cd_drivers="${cd_drivers}, AIX" ## AC_DEFINE([HAVE_AIX_CDROM], [1], ## [Define 1 if you have AIX CD-ROM support]) ;; darwin6*|darwin7*|darwin8*|darwin9*) for ac_header in IOKit/IOKitLib.h CoreFoundation/CFBase.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF have_iokit_h="yes" fi done if test "x$have_iokit_h" = "xyes" ; then $as_echo "#define HAVE_DARWIN_CDROM 1" >>confdefs.h DARWIN_PKG_LIB_HACK="-Wl,-framework,CoreFoundation -Wl,-framework,IOKit" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DiskArbitration framework" >&5 $as_echo_n "checking for DiskArbitration framework... " >&6; } ac_save_LIBS="$LIBS" LIBS="$LIBS -framework CoreFoundation -framework DiskArbitration" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_diskarbitration_framework=yes else have_diskarbitration_framework=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_save_LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_diskarbitration_framework" >&5 $as_echo "$have_diskarbitration_framework" >&6; } if test x"$have_diskarbitration_framework" = x"yes"; then $as_echo "#define HAVE_DISKARBITRATION 1" >>confdefs.h DARWIN_PKG_LIB_HACK="$DARWIN_PKG_LIB_HACK -Wl,-framework,DiskArbitration" fi LIBCDIO_LIBS="$LIBCDIO_LIBS $DARWIN_PKG_LIB_HACK" cd_drivers="${cd_drivers}, Darwin" fi ;; linux*|uclinux) for ac_header in linux/version.h linux/major.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in linux/cdrom.h do : ac_fn_c_check_header_mongrel "$LINENO" "linux/cdrom.h" "ac_cv_header_linux_cdrom_h" "$ac_includes_default" if test "x$ac_cv_header_linux_cdrom_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LINUX_CDROM_H 1 _ACEOF have_linux_cdrom_h="yes" fi done if test "x$have_linux_cdrom_h" = "xyes" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #include struct cdrom_generic_command test; int has_timeout=sizeof(test.timeout); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_LINUX_CDROM_TIMEOUT 1" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext $as_echo "#define HAVE_LINUX_CDROM 1" >>confdefs.h cd_drivers="${cd_drivers}, GNU/Linux" fi ;; bsdi*) for ac_header in dvd.h do : ac_fn_c_check_header_mongrel "$LINENO" "dvd.h" "ac_cv_header_dvd_h" "$ac_includes_default" if test "x$ac_cv_header_dvd_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DVD_H 1 _ACEOF have_bsdi_dvd_h="yes" fi done if test "x$have_bsdi_dvd_h" = "xyes" ; then $as_echo "#define HAVE_BSDI_CDROM 1" >>confdefs.h LIBS="$LIBS -ldvd -lcdrom" LIBCDIO_LIBS="$LIBCDIO_LIBS -lcdrom" cd_drivers="${cd_drivers}, BSDI" fi ;; sunos*|sun*|solaris*) $as_echo "#define HAVE_SOLARIS_CDROM 1" >>confdefs.h cd_drivers="${cd_drivers}, Solaris" ;; cygwin*) $as_echo "#define CYGWIN 1" >>confdefs.h $as_echo "#define HAVE_WIN32_CDROM 1" >>confdefs.h LIBS="$LIBS -lwinmm" LT_NO_UNDEFINED="-no-undefined" cd_drivers="${cd_drivers}, MinGW" $as_echo "#define NEED_TIMEZONEVAR 1" >>confdefs.h ;; mingw*) for ac_header in windows.h do : ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" if test "x$ac_cv_header_windows_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_WINDOWS_H 1 _ACEOF fi done $as_echo "#define MINGW32 1" >>confdefs.h $as_echo "#define HAVE_WIN32_CDROM 1" >>confdefs.h LIBS="$LIBS -lwinmm -mwindows" LT_NO_UNDEFINED="-no-undefined" cd_drivers="${cd_drivers}, MinGW " ;; freebsd4.*|freebsd5.*|freebsd6*|freebsd7*|freebsd8*|dragonfly*|kfreebsd*) $as_echo "#define HAVE_FREEBSD_CDROM 1" >>confdefs.h LIBS="$LIBS -lcam" cd_drivers="${cd_drivers}, FreeBSD " ;; netbsd*) $as_echo "#define HAVE_NETBSD_CDROM 1" >>confdefs.h # LIBS="$LIBS -lcam" cd_drivers="${cd_drivers}, NetBSD " ;; os2*) $as_echo "#define HAVE_OS2_CDROM 1" >>confdefs.h LT_NO_UNDEFINED="-no-undefined" LDFLAGS="$LDFLAGS -Zbin-files" cd_drivers="${cd_drivers}, OS2 " ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Don't have OS CD-reading support for ${host_os}..." >&5 $as_echo "$as_me: WARNING: Don't have OS CD-reading support for ${host_os}..." >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Will use generic support." >&5 $as_echo "$as_me: WARNING: Will use generic support." >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking extern long timezone variable" >&5 $as_echo_n "checking extern long timezone variable... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef NEED_TIMEZONEVAR #define timezonevar 1 #endif #include extern long timezone; int main(int argc, char **argv) { long test_timezone = timezone; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; }; $as_echo "#define HAVE_TIMEZONE_VAR 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBCDIO_SOURCE_PATH="`pwd`" cat >>confdefs.h <<_ACEOF #define LIBCDIO_SOURCE_PATH "$LIBCDIO_SOURCE_PATH" _ACEOF for ac_func in bzero chdir drand48 ftruncate geteuid getgid \ getuid getpwuid gettimeofday lstat memcpy memset \ rand seteuid setegid snprintf setenv unsetenv tzset \ sleep usleep vsnprintf readlink realpath gmtime_r localtime_r do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # check for timegm() support ac_fn_c_check_func "$LINENO" "timegm" "ac_cv_func_timegm" if test "x$ac_cv_func_timegm" = x""yes; then : $as_echo "#define HAVE_TIMEGM 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include " if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then : $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h fi if test $ac_cv_member_struct_tm_tm_gmtoff = yes ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h defines daylight and timezone variables" >&5 $as_echo_n "checking whether time.h defines daylight and timezone variables... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return (timezone != 0) + daylight; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_DAYLIGHT 1" >>confdefs.h has_daylight=yes else has_daylight=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_daylight" >&5 $as_echo "$has_daylight" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h defines tzname variable" >&5 $as_echo_n "checking whether time.h defines tzname variable... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return (tzname != NULL); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_TZNAME 1" >>confdefs.h has_tzname=yes else has_tzname=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_tzname" >&5 $as_echo "$has_tzname" >&6; } fi # Check whether --enable-joliet was given. if test "${enable_joliet+set}" = set; then : enableval=$enable_joliet; enable_joliet=$enableval else enable_joliet=yes fi if test "${enable_joliet}" != "no" ; then if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 $as_echo_n "checking for ld used by GCC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${acl_cv_path_LD+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi fi LD="$acl_cv_path_LD" if test -n "$LD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${acl_cv_prog_gnu_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 &5 $as_echo "$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 $as_echo_n "checking for shared library run path origin... " >&6; } if test "${acl_cv_rpath+set}" = set; then : $as_echo_n "(cached) " >&6 else CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 $as_echo "$acl_cv_rpath" >&6; } wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then : enableval=$enable_rpath; : else enable_rpath=yes fi acl_libdirstem=lib searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libiconv-prefix was given. if test "${with_libiconv_prefix+set}" = set; then : withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi fi LIBICONV= LTLIBICONV= INCICONV= LIBICONV_PREFIX= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='iconv ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" else LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` LIBICONV_PREFIX="$basedir" additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" ;; esac done fi else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" done fi am_save_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 $as_echo_n "checking for iconv... " >&6; } if test "${am_cv_func_iconv+set}" = set; then : $as_echo_n "(cached) " >&6 else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_lib_iconv=yes am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 $as_echo "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 $as_echo_n "checking for working iconv... " >&6; } if test "${am_cv_func_iconv_works+set}" = set; then : $as_echo_n "(cached) " >&6 else am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi if test "$cross_compiling" = yes; then : case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static const char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) return 1; } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) return 1; } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) return 1; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : am_cv_func_iconv_works=yes else am_cv_func_iconv_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi LIBS="$am_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 $as_echo "$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then $as_echo "#define HAVE_ICONV 1" >>confdefs.h fi if test "$am_cv_lib_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 $as_echo_n "checking how to link with libiconv... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 $as_echo "$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi if test "$am_cv_func_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 $as_echo_n "checking for iconv declaration... " >&6; } if test "${am_cv_proto_iconv+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : am_cv_proto_iconv_arg1="" else am_cv_proto_iconv_arg1="const" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" fi am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- }$am_cv_proto_iconv" >&5 $as_echo "${ac_t:- }$am_cv_proto_iconv" >&6; } cat >>confdefs.h <<_ACEOF #define ICONV_CONST $am_cv_proto_iconv_arg1 _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } if test "${am_cv_langinfo_codeset+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char* cs = nl_langinfo(CODESET); return !cs; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_langinfo_codeset=yes else am_cv_langinfo_codeset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 $as_echo "$am_cv_langinfo_codeset" >&6; } if test $am_cv_langinfo_codeset = yes; then $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h fi if test "$am_cv_func_iconv" = yes ; then $as_echo "#define HAVE_JOLIET 1" >>confdefs.h HAVE_JOLIET=1 else as_fn_error $? "You must have iconv installed." "$LINENO" 5 fi fi # Check whether --enable-rock was given. if test "${enable_rock+set}" = set; then : enableval=$enable_rock; enable_rock=$enableval else enable_rock=no fi if test "${enable_rock}" != "no" ; then $as_echo "#define HAVE_ROCK 1" >>confdefs.h HAVE_ROCK=1 fi if test x"$enable_rock" = "xyes"; then ENABLE_ROCK_TRUE= ENABLE_ROCK_FALSE='#' else ENABLE_ROCK_TRUE='#' ENABLE_ROCK_FALSE= fi # Check whether --enable-cddb was given. if test "${enable_cddb+set}" = set; then : enableval=$enable_cddb; enable_cddb=$enableval else enable_cddb=check fi if test x"$enable_cddb" != x"no" ; then if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CDDB" >&5 $as_echo_n "checking for CDDB... " >&6; } if test -n "$CDDB_CFLAGS"; then pkg_cv_CDDB_CFLAGS="$CDDB_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcddb >= 1.0.1\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcddb >= 1.0.1") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CDDB_CFLAGS=`$PKG_CONFIG --cflags "libcddb >= 1.0.1" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$CDDB_LIBS"; then pkg_cv_CDDB_LIBS="$CDDB_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcddb >= 1.0.1\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcddb >= 1.0.1") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CDDB_LIBS=`$PKG_CONFIG --libs "libcddb >= 1.0.1" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then CDDB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libcddb >= 1.0.1" 2>&1` else CDDB_PKG_ERRORS=`$PKG_CONFIG --print-errors "libcddb >= 1.0.1" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$CDDB_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: new enough libcddb not found. CDDB access disabled. Get libcddb from http://libcddb.sourceforge.net" >&5 $as_echo "$as_me: WARNING: new enough libcddb not found. CDDB access disabled. Get libcddb from http://libcddb.sourceforge.net" >&2;} HAVE_CDDB=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: new enough libcddb not found. CDDB access disabled. Get libcddb from http://libcddb.sourceforge.net" >&5 $as_echo "$as_me: WARNING: new enough libcddb not found. CDDB access disabled. Get libcddb from http://libcddb.sourceforge.net" >&2;} HAVE_CDDB=no else CDDB_CFLAGS=$pkg_cv_CDDB_CFLAGS CDDB_LIBS=$pkg_cv_CDDB_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } HAVE_CDDB=yes $as_echo "#define HAVE_CDDB /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 $as_echo_n "checking for connect in -lsocket... " >&6; } if test "${ac_cv_lib_socket_connect+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char connect (); int main () { return connect (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_connect=yes else ac_cv_lib_socket_connect=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 $as_echo "$ac_cv_lib_socket_connect" >&6; } if test "x$ac_cv_lib_socket_connect" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSOCKET 1 _ACEOF LIBS="-lsocket $LIBS" fi ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" if test "x$ac_cv_func_gethostbyname" = x""yes; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_gethostbyname=yes else ac_cv_lib_nsl_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBNSL 1 _ACEOF LIBS="-lnsl $LIBS" fi fi fi $as_echo "#define HAVE_KEYPAD /**/" >>confdefs.h if test x"$enable_cdda_player" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mvprintw in -lncurses" >&5 $as_echo_n "checking for mvprintw in -lncurses... " >&6; } if test "${ac_cv_lib_ncurses_mvprintw+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lncurses $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char mvprintw (); int main () { return mvprintw (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ncurses_mvprintw=yes else ac_cv_lib_ncurses_mvprintw=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_mvprintw" >&5 $as_echo "$ac_cv_lib_ncurses_mvprintw" >&6; } if test "x$ac_cv_lib_ncurses_mvprintw" = x""yes; then : LIBCURSES=ncurses; CDDA_PLAYER_LIBS="$CDDA_PLAYER_LIBS -lncurses" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mvprintw in -lcurses" >&5 $as_echo_n "checking for mvprintw in -lcurses... " >&6; } if test "${ac_cv_lib_curses_mvprintw+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcurses $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char mvprintw (); int main () { return mvprintw (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_curses_mvprintw=yes else ac_cv_lib_curses_mvprintw=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_mvprintw" >&5 $as_echo "$ac_cv_lib_curses_mvprintw" >&6; } if test "x$ac_cv_lib_curses_mvprintw" = x""yes; then : LIBCURSES=curses; CDDA_PLAYER_LIBS="$CDDA_PLAYER_LIBS -lcurses" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Will not build cdda-player - did not find libcurses or libncurses" >&5 $as_echo "$as_me: WARNING: Will not build cdda-player - did not find libcurses or libncurses" >&2;} enable_cdda_player=no fi fi if test x"$enable_cdda_player" = xyes; then as_ac_Lib=`$as_echo "ac_cv_lib_$LIBCURSES''_keypad" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for keypad in -l$LIBCURSES" >&5 $as_echo_n "checking for keypad in -l$LIBCURSES... " >&6; } if eval "test \"\${$as_ac_Lib+set}\"" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$LIBCURSES $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char keypad (); int main () { return keypad (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : HAVE_KEYPAD=yes fi fi fi if test "x$enable_cdda_player" = "xyes"; then BUILD_CDDA_PLAYER_TRUE= BUILD_CDDA_PLAYER_FALSE='#' else BUILD_CDDA_PLAYER_TRUE='#' BUILD_CDDA_PLAYER_FALSE= fi # Check whether --enable-vcd_info was given. if test "${enable_vcd_info+set}" = set; then : enableval=$enable_vcd_info; enable_vcd_info=${enableval} else enable_vcd_info=no fi if test "x$enable_vcd_info" = xyes; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for VCDINFO" >&5 $as_echo_n "checking for VCDINFO... " >&6; } if test -n "$VCDINFO_CFLAGS"; then pkg_cv_VCDINFO_CFLAGS="$VCDINFO_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libvcdinfo >= 0.7.21\""; } >&5 ($PKG_CONFIG --exists --print-errors "libvcdinfo >= 0.7.21") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_VCDINFO_CFLAGS=`$PKG_CONFIG --cflags "libvcdinfo >= 0.7.21" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$VCDINFO_LIBS"; then pkg_cv_VCDINFO_LIBS="$VCDINFO_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libvcdinfo >= 0.7.21\""; } >&5 ($PKG_CONFIG --exists --print-errors "libvcdinfo >= 0.7.21") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_VCDINFO_LIBS=`$PKG_CONFIG --libs "libvcdinfo >= 0.7.21" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then VCDINFO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libvcdinfo >= 0.7.21" 2>&1` else VCDINFO_PKG_ERRORS=`$PKG_CONFIG --print-errors "libvcdinfo >= 0.7.21" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$VCDINFO_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: a new enough libvcdinfo not found. VCD info display in cd-info disabled. libvcdinfo is part of vcdimager. Get it from http://vcdimager.org" >&5 $as_echo "$as_me: WARNING: a new enough libvcdinfo not found. VCD info display in cd-info disabled. libvcdinfo is part of vcdimager. Get it from http://vcdimager.org" >&2;} enable_vcd_info=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: a new enough libvcdinfo not found. VCD info display in cd-info disabled. libvcdinfo is part of vcdimager. Get it from http://vcdimager.org" >&5 $as_echo "$as_me: WARNING: a new enough libvcdinfo not found. VCD info display in cd-info disabled. libvcdinfo is part of vcdimager. Get it from http://vcdimager.org" >&2;} enable_vcd_info=no else VCDINFO_CFLAGS=$pkg_cv_VCDINFO_CFLAGS VCDINFO_LIBS=$pkg_cv_VCDINFO_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_VCDINFO 1" >>confdefs.h fi fi ac_config_commands="$ac_config_commands checks" ## AC_CONFIG_FILES([ po/Makefile.in\ ac_config_files="$ac_config_files Makefile example/C++/Makefile example/C++/OO/Makefile example/Makefile include/Makefile include/cdio/Makefile include/cdio++/Makefile include/cdio/version.h doc/doxygen/Doxyfile doc/Makefile lib/Makefile lib/cdda_interface/Makefile lib/cdio++/Makefile lib/driver/Makefile lib/iso9660/Makefile lib/paranoia/Makefile lib/udf/Makefile libcdio.pc libcdio++.pc libcdio_cdda.pc libcdio_paranoia.pc libiso9660.pc libiso9660++.pc libudf.pc package/libcdio.spec src/cd-paranoia/Makefile src/cd-paranoia/usage.txt src/cd-paranoia/doc/Makefile src/cd-paranoia/doc/en/cd-paranoia.1 src/cd-paranoia/doc/en/Makefile src/cd-paranoia/doc/ja/cd-paranoia.1 src/cd-paranoia/doc/ja/Makefile src/Makefile test/data/Makefile test/driver/Makefile test/driver/bincue.c test/driver/cdrdao.c test/driver/nrg.c test/testgetdevices.c test/testisocd2.c test/testpregap.c test/check_common_fn test/Makefile" # AC_CONFIG_FILES([po/Makefile]) ac_config_files="$ac_config_files test/check_cue.sh" ac_config_files="$ac_config_files test/check_iso.sh" ac_config_files="$ac_config_files test/check_nrg.sh" ac_config_files="$ac_config_files test/check_paranoia.sh" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_CXX_BINDINGS_TRUE}" && test -z "${ENABLE_CXX_BINDINGS_FALSE}"; then as_fn_error $? "conditional \"ENABLE_CXX_BINDINGS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_CPP_TRUE}" && test -z "${ENABLE_CPP_FALSE}"; then as_fn_error $? "conditional \"ENABLE_CPP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_EXAMPLES_TRUE}" && test -z "${BUILD_EXAMPLES_FALSE}"; then as_fn_error $? "conditional \"BUILD_EXAMPLES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_PERL_TRUE}" && test -z "${HAVE_PERL_FALSE}"; then as_fn_error $? "conditional \"HAVE_PERL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CYGWIN_TRUE}" && test -z "${CYGWIN_FALSE}"; then as_fn_error $? "conditional \"CYGWIN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_CD_DRIVE_TRUE}" && test -z "${BUILD_CD_DRIVE_FALSE}"; then as_fn_error $? "conditional \"BUILD_CD_DRIVE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_CDINFO_TRUE}" && test -z "${BUILD_CDINFO_FALSE}"; then as_fn_error $? "conditional \"BUILD_CDINFO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_CD_READ_TRUE}" && test -z "${BUILD_CD_READ_FALSE}"; then as_fn_error $? "conditional \"BUILD_CD_READ\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_CD_PARANOIA_TRUE}" && test -z "${BUILD_CD_PARANOIA_FALSE}"; then as_fn_error $? "conditional \"BUILD_CD_PARANOIA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ISO_INFO_TRUE}" && test -z "${BUILD_ISO_INFO_FALSE}"; then as_fn_error $? "conditional \"BUILD_ISO_INFO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ISO_READ_TRUE}" && test -z "${BUILD_ISO_READ_FALSE}"; then as_fn_error $? "conditional \"BUILD_ISO_READ\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_CDINFO_LINUX_TRUE}" && test -z "${BUILD_CDINFO_LINUX_FALSE}"; then as_fn_error $? "conditional \"BUILD_CDINFO_LINUX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_CDIOTEST_TRUE}" && test -z "${BUILD_CDIOTEST_FALSE}"; then as_fn_error $? "conditional \"BUILD_CDIOTEST\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_VERSIONED_LIBS_TRUE}" && test -z "${BUILD_VERSIONED_LIBS_FALSE}"; then as_fn_error $? "conditional \"BUILD_VERSIONED_LIBS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DISABLE_CPP_TRUE}" && test -z "${DISABLE_CPP_FALSE}"; then as_fn_error $? "conditional \"DISABLE_CPP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_ROCK_TRUE}" && test -z "${ENABLE_ROCK_FALSE}"; then as_fn_error $? "conditional \"ENABLE_ROCK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_CDDA_PLAYER_TRUE}" && test -z "${BUILD_CDDA_PLAYER_FALSE}"; then as_fn_error $? "conditional \"BUILD_CDDA_PLAYER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by libcdio $as_me 0.83, which was generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ libcdio config.status 0.83 configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' AS='`$ECHO "X$AS" | $Xsed -e "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "X$DLLTOOL" | $Xsed -e "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`' predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`' postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`' predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`' postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`' LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`' fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # Quote evaled strings. for var in SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ deplibs_check_method \ file_magic_cmd \ AR \ AR_FLAGS \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ SHELL \ ECHO \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_CXX \ compiler_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_cv_prog_compiler_c_o_CXX \ export_dynamic_flag_spec_CXX \ whole_archive_flag_spec_CXX \ compiler_needs_object_CXX \ with_gnu_ld_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ fix_srcfile_path_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ file_list_spec_CXX \ compiler_lib_search_dirs_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ export_symbols_cmds_CXX \ prelink_cmds_CXX; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Fix-up fallback echo if it was mangled by the above quoting rules. case \$lt_ECHO in *'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` ;; esac ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "checks") CONFIG_COMMANDS="$CONFIG_COMMANDS checks" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "example/C++/Makefile") CONFIG_FILES="$CONFIG_FILES example/C++/Makefile" ;; "example/C++/OO/Makefile") CONFIG_FILES="$CONFIG_FILES example/C++/OO/Makefile" ;; "example/Makefile") CONFIG_FILES="$CONFIG_FILES example/Makefile" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "include/cdio/Makefile") CONFIG_FILES="$CONFIG_FILES include/cdio/Makefile" ;; "include/cdio++/Makefile") CONFIG_FILES="$CONFIG_FILES include/cdio++/Makefile" ;; "include/cdio/version.h") CONFIG_FILES="$CONFIG_FILES include/cdio/version.h" ;; "doc/doxygen/Doxyfile") CONFIG_FILES="$CONFIG_FILES doc/doxygen/Doxyfile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "lib/cdda_interface/Makefile") CONFIG_FILES="$CONFIG_FILES lib/cdda_interface/Makefile" ;; "lib/cdio++/Makefile") CONFIG_FILES="$CONFIG_FILES lib/cdio++/Makefile" ;; "lib/driver/Makefile") CONFIG_FILES="$CONFIG_FILES lib/driver/Makefile" ;; "lib/iso9660/Makefile") CONFIG_FILES="$CONFIG_FILES lib/iso9660/Makefile" ;; "lib/paranoia/Makefile") CONFIG_FILES="$CONFIG_FILES lib/paranoia/Makefile" ;; "lib/udf/Makefile") CONFIG_FILES="$CONFIG_FILES lib/udf/Makefile" ;; "libcdio.pc") CONFIG_FILES="$CONFIG_FILES libcdio.pc" ;; "libcdio++.pc") CONFIG_FILES="$CONFIG_FILES libcdio++.pc" ;; "libcdio_cdda.pc") CONFIG_FILES="$CONFIG_FILES libcdio_cdda.pc" ;; "libcdio_paranoia.pc") CONFIG_FILES="$CONFIG_FILES libcdio_paranoia.pc" ;; "libiso9660.pc") CONFIG_FILES="$CONFIG_FILES libiso9660.pc" ;; "libiso9660++.pc") CONFIG_FILES="$CONFIG_FILES libiso9660++.pc" ;; "libudf.pc") CONFIG_FILES="$CONFIG_FILES libudf.pc" ;; "package/libcdio.spec") CONFIG_FILES="$CONFIG_FILES package/libcdio.spec" ;; "src/cd-paranoia/Makefile") CONFIG_FILES="$CONFIG_FILES src/cd-paranoia/Makefile" ;; "src/cd-paranoia/usage.txt") CONFIG_FILES="$CONFIG_FILES src/cd-paranoia/usage.txt" ;; "src/cd-paranoia/doc/Makefile") CONFIG_FILES="$CONFIG_FILES src/cd-paranoia/doc/Makefile" ;; "src/cd-paranoia/doc/en/cd-paranoia.1") CONFIG_FILES="$CONFIG_FILES src/cd-paranoia/doc/en/cd-paranoia.1" ;; "src/cd-paranoia/doc/en/Makefile") CONFIG_FILES="$CONFIG_FILES src/cd-paranoia/doc/en/Makefile" ;; "src/cd-paranoia/doc/ja/cd-paranoia.1") CONFIG_FILES="$CONFIG_FILES src/cd-paranoia/doc/ja/cd-paranoia.1" ;; "src/cd-paranoia/doc/ja/Makefile") CONFIG_FILES="$CONFIG_FILES src/cd-paranoia/doc/ja/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "test/data/Makefile") CONFIG_FILES="$CONFIG_FILES test/data/Makefile" ;; "test/driver/Makefile") CONFIG_FILES="$CONFIG_FILES test/driver/Makefile" ;; "test/driver/bincue.c") CONFIG_FILES="$CONFIG_FILES test/driver/bincue.c" ;; "test/driver/cdrdao.c") CONFIG_FILES="$CONFIG_FILES test/driver/cdrdao.c" ;; "test/driver/nrg.c") CONFIG_FILES="$CONFIG_FILES test/driver/nrg.c" ;; "test/testgetdevices.c") CONFIG_FILES="$CONFIG_FILES test/testgetdevices.c" ;; "test/testisocd2.c") CONFIG_FILES="$CONFIG_FILES test/testisocd2.c" ;; "test/testpregap.c") CONFIG_FILES="$CONFIG_FILES test/testpregap.c" ;; "test/check_common_fn") CONFIG_FILES="$CONFIG_FILES test/check_common_fn" ;; "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; "test/check_cue.sh") CONFIG_FILES="$CONFIG_FILES test/check_cue.sh" ;; "test/check_iso.sh") CONFIG_FILES="$CONFIG_FILES test/check_iso.sh" ;; "test/check_nrg.sh") CONFIG_FILES="$CONFIG_FILES test/check_nrg.sh" ;; "test/check_paranoia.sh") CONFIG_FILES="$CONFIG_FILES test/check_paranoia.sh" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="CXX " # ### BEGIN LIBTOOL CONFIG # Assembler program. AS=$AS # DLL creation program. DLLTOOL=$DLLTOOL # Object dumper program. OBJDUMP=$OBJDUMP # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == "file_magic". file_magic_cmd=$lt_file_magic_cmd # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name of the directory that contains temporary libtool files. objdir=$objdir # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that does not interpret backslashes. ECHO=$lt_ECHO # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). func_stripname () { # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $* )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_basename file func_basename () { func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[^=]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$@"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1+=\$2" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1=\$$1\$2" } _LT_EOF ;; esac sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_CXX # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path_CXX # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF ;; "checks":C) chmod +x test/check_cue.sh; chmod +x test/check_nrg.sh ;; "test/check_cue.sh":F) chmod +x test/check_cue.sh ;; "test/check_iso.sh":F) chmod +x test/check_iso.sh ;; "test/check_nrg.sh":F) chmod +x test/check_nrg.sh ;; "test/check_paranoia.sh":F) chmod +x test/check_paranoia.sh ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi { $as_echo "$as_me:${as_lineno-$LINENO}: Using CD-ROM drivers : $cd_drivers Building cd-paranoia : $(test \"x$enable_cd_paranoia\" = \"xyes\" && echo yes || echo no) Building cd-info : $(test \"x$enable_cd_info\" = \"xyes\" && echo yes || echo no) Building cd-read : $(test \"x$enable_cd_read\" = \"xyes\" && echo yes || echo no) Building cdda-player : $(test \"x$enable_cdda_player\" = \"xyes\" && echo yes || echo no) Building iso-info : $(test \"x$enable_iso_info\" = \"xyes\" && echo yes || echo no) Building iso-read : $(test \"x$enable_iso_read\" = \"xyes\" && echo yes || echo no) Building C++ programs: $(test \"x$enable_cxx\" != \"xno\" && echo yes || echo no)" >&5 $as_echo "$as_me: Using CD-ROM drivers : $cd_drivers Building cd-paranoia : $(test \"x$enable_cd_paranoia\" = \"xyes\" && echo yes || echo no) Building cd-info : $(test \"x$enable_cd_info\" = \"xyes\" && echo yes || echo no) Building cd-read : $(test \"x$enable_cd_read\" = \"xyes\" && echo yes || echo no) Building cdda-player : $(test \"x$enable_cdda_player\" = \"xyes\" && echo yes || echo no) Building iso-info : $(test \"x$enable_iso_info\" = \"xyes\" && echo yes || echo no) Building iso-read : $(test \"x$enable_iso_read\" = \"xyes\" && echo yes || echo no) Building C++ programs: $(test \"x$enable_cxx\" != \"xno\" && echo yes || echo no)" >&6;} libcdio-0.83/TODO0000644000175000017500000000771611114145233010470 00000000000000It isn't look hard to find a gap in libcdio or libiso9660 or think of something you'd like added. Here are some of the many known problems and feature requests. * UDF support. * API overhaul. hvr has expressed interest but it's unlikely he'll ever have the time to do. It could be done in conjunction with a wrappers for C++, Perl, Python, ... The idea is that those interfaces would not show the ugliness of the current C interface. For example instead of read_mode2, read_mode1, read_audio, there might be a read(mode, ...). - Address static loglevel variable (nboullis at debian.org) * All of the API should be finished on all OS's (or the API adjusted). * Fix the current gaps: - SCSI-MMC on OSX, - CD-Text support working more often? wide character support (Burkhard Plaum has indicated he might do) - more accurate drive capabilities - wxwindows interface to cd-drive - more accurate CD track classification (Form 1/2, Mode 1/2) - complete the image readers, e.g. "silence" and ability to use more than one file in cdrdao. - multi-session CDs * mmc_read_cd often doesn't work when request reading a large number of blocks. * Is paranoia correct? Get a better handle on it. Ensure more of the drive and OS-specific features that work on GNU/Linux work elsewhere. Regression tests over more kinds of failures. * Exclusive access of CD-ROM versus non-exclusive? * Adjusting operations based on known models. Via MMC, We often have the ability to find out what drive is in use. That could be used (as it was in cdparanoia) to customize the method used for various operations. Alternatively it could be read from a configuration file, but right now there's no internal structure for holding all of the capabilities. * Combine iso-read and iso-info into an "iso-tar" for listing or extracting files". Ideally something matching the relevant command set of "tar" would be nice, as that is widely used and probably fairly complete in thing that might be desired for listing/extracting. * Add something to show what kind of CD media is in a drive. Ideally: CD (purchased), CD Write Once, CD Read/Write, but what is there is probably something like Cyanine, PhthaloCyanine, Metallized Azo, Advanced PhthaloCyanine, Formazan. See http://www.cdmediaworld.com/hardware/cdrom/cd_dye.shtml or http://www.cd-info.com/CDIC/History/Commentary/Parker/stcroix.html The discmode type can be used to classify DVD media and it also classifies for CD track formats (in addition to CD *content* classification). Note there is nothing for DVD content; see the below list of things which probably won't get added. Given the mismatch between DVD and CD meanings in discmode, the discmode type probably needs to be redone. * Write a real cue parser and TOC parser using bison. A pcct grammar is given in cdrdao's trackdb TocParser.g and CueParser.g The parsing is pretty much done, need to fold in semantic routines and improve error reporting. * conversion tools. Assuming parser done, it should be simple to use write simple conversion routines: - CD images's to iso9660 .iso's - TOC <=> CUE * Test more disc image types in regression testing, like CD-I. * Convert to use glib, removing ds.h (Revise vcdimager too) * Delete and rename files in an iso9660 image (mephisto75 at web.de) * Some things where libcdio will probably not expand in: - DVD things, especially DVD-ROM (use libdvdread) - writing applications (use cdrdao or cdrtools) - more proprietary undocumented image format (unless someone else is willing to do the work). But the fuzzy ISO 9660 detection may help here. If there is something you really want done on the above list or have something else you want done, it will go a lot faster if you attempt to undertake doing it. Patches are always welcome (and CVS write access is available for those who have demonstrated reasonable ability through contributions.) $Id: TODO,v 1.11 2005/07/11 11:51:07 rocky Exp $ libcdio-0.83/aclocal.m40000644000175000017500000011272011652140253011634 00000000000000# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, [m4_warning([this file was generated for autoconf 2.67. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 10 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless `enable' is passed literally. # For symmetry, `disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful (and sometimes confusing) to the casual installer], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_PROG_CC_C_O # -------------- # Like AC_PROG_CC_C_O, but changed for automake. AC_DEFUN([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi dnl Make sure AC_PROG_CC is never called again, or it will override our dnl setting of CC. m4_define([AC_PROG_CC], [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/codeset.m4]) m4_include([m4/iconv.m4]) m4_include([m4/lib-ld.m4]) m4_include([m4/lib-link.m4]) m4_include([m4/lib-prefix.m4]) m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) m4_include([m4/pkg.m4]) libcdio-0.83/libudf.pc.in0000644000175000017500000000035111114145233012162 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: libudf Description: UDF library of libcdio Version: @PACKAGE_VERSION@ Requires: libcdio Libs: -L${libdir} -ludf -lcdio Cflags: -I${includedir} libcdio-0.83/depcomp0000755000175000017500000004426711652140257011367 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2009-04-28.21; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free # Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u="sed s,\\\\\\\\,/,g" depmode=msvisualcpp fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: libcdio-0.83/package/0000755000175000017500000000000011652210413011440 500000000000000libcdio-0.83/package/libcdio.spec.in0000644000175000017500000000737711565177211014277 00000000000000### $Id: libcdio.spec.in,v 1.2 2006/03/28 14:11:56 rocky Exp $ ### autogenerated---edit *.spec.in %define name @PACKAGE@ %define ver @VERSION@ %define rel 0 Name: %{name} Summary: CD-ROM access library Summary(de): CD-ROM Zugriffsbibliothek Version: %{ver} Release: %{rel} Copyright: GPL Group: Development/Libraries URL: http://www.gnu.org/software/libcdio/ Source0: %{name}-%{version}.tar.gz Packager: Manfred Tremmel Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root %description The libcdio package contains a library for CD-ROM and CD image access. Applications wishing to be oblivious of the OS- and device-dependent properties of a CD-ROM or of the specific details of various CD-image formats may benefit from using this library. A library for working with ISO-9660 filesystems libiso9660 is included. A generic interface for issuing MMC (multimedia commands) is also part of the libcdio library. %description -l de Diese Bibliothek dient zur Kapselung von CD-ROM Zugriffen und dessen Kontrolle. Anwendungen brauchen sich nicht um die Betriebssystemspezifischen oder Device-Abh¤ngigen Eigenschaften des CD-ROM zu k¼mmern, dies erledigt die Bibliothek. %package devel Summary: libcdio development package Summary(de): libcdio Entwicklerpaket Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel libcdio development package %description devel -l de libcdio Entwicklerpaket %package -n cdinfo Summary: cd-info Summary(de): cd-info Group: Applications/Multimedia Requires: %{name} = %{version}-%{release} #Requires: libvcd >= 0.7.20 Requires: libcddb BuildRequires: libcddb-devel #BuildRequires: libvcd-devel >= 0.7.20 %description -n cdinfo cd-info prints various information about a CD or CD image, analyzes and gives information about each of the tracks, and tries to detect the type of CD (e.g. VCD, Audio CD, PhotoCD, a bootable CD, etc.). For audio CD's more information is given if libcddb is installed. For Video CD's more information is given if the libvcdinfo library is installed. %description -n cdinfo -l de cd-info gibt verschiedene informationen ber eine CD oder ein CD-Image aus, analysiert und informiert ber jeden der Tracks und versucht, den Typ der CD zu ermitteln (z.B. VCD, Audio-CD, PhotoCD, eine bootbare CD usw.). Zu Audio-CDs werden weitere Informationen ausgegeben, wenn die libcddb installiert ist. Zu Video-CDs werden mehr Informationen ausgegeben, wenn die libvcdinfo installiert ist. %prep %setup %build %configure %__make %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %makeinstall rm -rf ${RPM_BUILD_ROOT}/%{_mandir} %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %post /sbin/ldconfig %postun /sbin/ldconfig %files %defattr(-,root,root) %doc AUTHORS INSTALL NEWS THANKS TODO %{_libdir}/lib*.so.* %files devel %defattr(-, root, root) %doc ChangeLog COPYING README %{_libdir}/lib*.so %{_libdir}/*.*a %{_includedir}/cdio/* %{_infodir}/* %{_libdir}/pkgconfig/*.pc %files -n cdinfo %defattr(-,root,root) %{_bindir}/* %changelog * Sun Feb 15 2004 Manfred Tremmel - some little changes * Sat Feb 14 2004 Rocky Bernstein - require vcdimager 0.7.20, small rpm fixes * Tue Sep 9 2003 Rocky Bernstein - small fixes really from Frantisek Dvorak * Sun Aug 30 2003 Frantisek Dvorak - two files added * Wed Aug 06 2003 Rocky Bernstein - fixes really Manfred Tremmel at http://www.iiv.de/schwinde/buerger/tremmel/ * Fri Apr 25 2003 Manfred Tremmel - first spec file libcdio-0.83/libcdio_cdda.pc.in0000644000175000017500000000042111114145233013273 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: libcdio_cdda Description: CD paranoia CD-DA library from libcdio Version: @PACKAGE_VERSION@ #Requires: glib-2.0 Libs: -L${libdir} -lcdio_cdda -lcdio @COS_LIB@ Cflags: -I${includedir} libcdio-0.83/README0000644000175000017500000000565011650150763010664 00000000000000See README.libcdio for installation instructions. The libcdio package contains a library for CD-ROM and CD image access. Applications wishing to be oblivious of the OS- and device-dependent properties of a CD-ROM or of the specific details of various CD-image formats may benefit from using this library. A library for working with ISO-9660 filesystems libiso9660 is included. A generic interface for issuing MMC (multimedia commands) is also part of the libcdio library. Also included is a library for working with ISO-9660 filesystems as is also the CD-DA error/jitter correction library from cdparanoia (http://www.xiph.org/paranoia). Some support for disk image types like CDRWin's BIN/CUE format, cdrdao's TOC format, and Nero's NRG format are available. Therefore, applications that use this library also have the ability to read disc images as though they were CD's. The library is written in C, however there are OO C++, Perl, Python and Ruby wrappers to interface to the library. However C++ is the only one that is bundled with this package, and the interfaces provide only a subset of the full features of the library. Also included in the libcdio package are a number of utility programs: * cd-info - displays CD information: number of tracks, CD-format and if possible basic information about the format. If libcddb (http://libcddb.sourceforge.net) is available, the cd-info program will display CDDB matches on CD-DA discs. And if a new enough version of libvcdinfo is available (from the vcdimager project), then cd-info shows basic VCD information. * cd-read - performs low-level block reading of a CD or CD image, * iso-info - displays ISO-9660 information from an ISO-9660 image, * iso-read - extracting files from an ISO-9660 image, a version of the CD-DA extraction tool cdparanoia which corrects for CD-ROM jitter, and a simple curses-based CD player, cdda-player using the analog CD-ROM output. * cd-paranoia - port of cdparanoia (CD-DA jitter and error correction) using libcdio back-end CD-reading. There is very limited low-level support for MMC commands on some platforms. Using MMC writing can be done. However there is currently little higher level-support for writing. Other libraries like libburn, libdi, libscg, or libdvdread may be helpful. Some of the projects using libcdio are the Video CD authoring and ripping tools VCDImager (http://vcdimager.org), a navigation-capable Video CD plugin and CD-DA plugins for the media players xine (http://xinehq.de), videolan's vlc (http://videolan.org), media players mplayerxp (http://mplayerxp.sourceforge.net/) and gmerlin (http://gmerlin.sourceforge.net), kiso, a KDE GUI for creating, extracting and editing ISO-9600 images (http://kiso.sourceforge.net), and a Samba vfs module that allows exporting a CD without mounting it (http://ontologistics.net/OpenSource/Samba/index.php). libcdio-0.83/Makefile.in0000644000175000017500000007652711652210030012046 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 2003, 2004, 2006, 2008, 2011 # Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @ENABLE_CXX_BINDINGS_TRUE@am__append_1 = \ @ENABLE_CXX_BINDINGS_TRUE@ libcdio++.pc \ @ENABLE_CXX_BINDINGS_TRUE@ libiso9660++.pc subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/libcdio++.pc.in $(srcdir)/libcdio.pc.in \ $(srcdir)/libcdio_cdda.pc.in $(srcdir)/libcdio_paranoia.pc.in \ $(srcdir)/libiso9660++.pc.in $(srcdir)/libiso9660.pc.in \ $(srcdir)/libudf.pc.in $(top_srcdir)/configure \ $(top_srcdir)/doc/doxygen/Doxyfile.in \ $(top_srcdir)/package/libcdio.spec.in AUTHORS COPYING \ ChangeLog INSTALL NEWS THANKS TODO compile config.guess \ config.rpath config.sub depcomp install-sh ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = doc/doxygen/Doxyfile libcdio.pc libcdio++.pc \ libcdio_cdda.pc libcdio_paranoia.pc libiso9660.pc \ libiso9660++.pc libudf.pc package/libcdio.spec CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(pkgconfigdir)" DATA = $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDDA_PLAYER_LIBS = @CDDA_PLAYER_LIBS@ CDDB_CFLAGS = @CDDB_CFLAGS@ CDDB_LIBS = @CDDB_LIBS@ CDPARANOIA_NAME = @CDPARANOIA_NAME@ CFLAGS = @CFLAGS@ CMP = @CMP@ COS_LIB = @COS_LIB@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_PKG_LIB_HACK = @DARWIN_PKG_LIB_HACK@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIFF = @DIFF@ DIFF_OPTS = @DIFF_OPTS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GIT2CL = @GIT2CL@ GREP = @GREP@ HAVE_BSDI_CDROM = @HAVE_BSDI_CDROM@ HAVE_DARWIN_CDROM = @HAVE_DARWIN_CDROM@ HAVE_FREEBSD_CDROM = @HAVE_FREEBSD_CDROM@ HAVE_JOLIET = @HAVE_JOLIET@ HAVE_LINUX_CDROM = @HAVE_LINUX_CDROM@ HAVE_OS2_CDROM = @HAVE_OS2_CDROM@ HAVE_ROCK = @HAVE_ROCK@ HAVE_SOLARIS_CDROM = @HAVE_SOLARIS_CDROM@ HAVE_WIN32_CDROM = @HAVE_WIN32_CDROM@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDIOPP_LIBS = @LIBCDIOPP_LIBS@ LIBCDIO_CDDA_LIBS = @LIBCDIO_CDDA_LIBS@ LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ LIBCDIO_DEPS = @LIBCDIO_DEPS@ LIBCDIO_LIBS = @LIBCDIO_LIBS@ LIBCDIO_PARANOIA_LIBS = @LIBCDIO_PARANOIA_LIBS@ LIBCDIO_SOURCE_PATH = @LIBCDIO_SOURCE_PATH@ LIBCDIO_VERSION_NUM = @LIBCDIO_VERSION_NUM@ LIBICONV = @LIBICONV@ LIBISO9660PP_LIBS = @LIBISO9660PP_LIBS@ LIBISO9660_CFLAGS = @LIBISO9660_CFLAGS@ LIBISO9660_LIBS = @LIBISO9660_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBUDF_LIBS = @LIBUDF_LIBS@ LINUX_CDROM_TIMEOUT = @LINUX_CDROM_TIMEOUT@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_NO_UNDEFINED = @LT_NO_UNDEFINED@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OLD_CDPARANOIA = @OLD_CDPARANOIA@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SBPCD_H = @SBPCD_H@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TYPESIZES = @TYPESIZES@ UCDROM_H = @UCDROM_H@ VCDINFO_CFLAGS = @VCDINFO_CFLAGS@ VCDINFO_LIBS = @VCDINFO_LIBS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = dist-bzip2 EXTRA_DIST = \ MSVC/README MSVC/cd-info.vcproj \ MSVC/config.h \ MSVC/libcdio.sln \ MSVC/libcdio.vcproj \ README.libcdio \ THANKS \ example/README \ libcdio.pc.in \ libcdio++.pc.in \ libcdio_cdda.pc.in \ libiso9660.pc.in \ libiso9660++.pc.in \ libudf.pc.in \ package/libcdio.spec.in SUBDIRS = doc include lib src test example @BUILD_CD_PARANOIA_TRUE@paranoiapcs = libcdio_paranoia.pc libcdio_cdda.pc # pkg-config(1) related rules pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libcdio.pc libiso9660.pc libudf.pc $(paranoiapcs) \ $(am__append_1) # List of additional files for expanded regression tests DISTFILES_REGRESSION = tests/monvoisin.nrg tests/monvoisin.right \ tests/svcdgs.nrg tests/svcdgs.nrg \ tests/svcd_ogt_test_ntsc.bin \ tests/svcd_ogt_test_ntsc.cue \ tests/svcd_ogt_test_ntsc.right \ tests/vcd_demo.bin tests/vcd_demo.cue \ tests/vcd_demo.right REGRESSION_VERSION = 1.1 distdir_regression = ../$(PACKAGE)-$(REGRESSION_VERSION)-tests # cvs2cl MAINTAINERCLEANFILES = ChangeLog *.rej *.orig @MAINTAINER_MODE_TRUE@ACLOCAL_AMFLAGS = -I m4 all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 doc/doxygen/Doxyfile: $(top_builddir)/config.status $(top_srcdir)/doc/doxygen/Doxyfile.in cd $(top_builddir) && $(SHELL) ./config.status $@ libcdio.pc: $(top_builddir)/config.status $(srcdir)/libcdio.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ libcdio++.pc: $(top_builddir)/config.status $(srcdir)/libcdio++.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ libcdio_cdda.pc: $(top_builddir)/config.status $(srcdir)/libcdio_cdda.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ libcdio_paranoia.pc: $(top_builddir)/config.status $(srcdir)/libcdio_paranoia.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ libiso9660.pc: $(top_builddir)/config.status $(srcdir)/libiso9660.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ libiso9660++.pc: $(top_builddir)/config.status $(srcdir)/libiso9660++.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ libudf.pc: $(top_builddir)/config.status $(srcdir)/libudf.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ package/libcdio.spec: $(top_builddir)/config.status $(top_srcdir)/package/libcdio.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-pkgconfigDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-pkgconfigDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-generic distclean-hdr \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-pkgconfigDATA install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-pkgconfigDATA $(pkgconfig_DATA): config.status #: run regression tests test: check #: Make documentation via Doxygen http://www.stack.nl/~dimitri/doxygen/ doxygen: -( cd ${top_srcdir}/doc/doxygen && /bin/sh ${srcdir}/run_doxygen ) dist-regression: distdir-regression cd $(distdir) && $(AMTAR) chof - tests | GZIP=$(GZIP_ENV) gzip -c >$(distdir_regression).tar.gz $(am__remove_distdir) distdir-regression: $(DISTFILES_REGRESSION) $(am__remove_distdir) mkdir $(distdir) @list='$(DISTFILES_REGRESSION)'; for file in $$list; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir_regression)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -755 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) check_nrg.sh: $(top_builddir)/config.status check_nrg.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ chmod +x config_nrg.sh check_cue.sh: $(top_builddir)/config.status check_cue.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ chmod +x config_cue.sh check_iso.sh: $(top_builddir)/config.status check_iso.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ chmod +x config_iso.sh @MAINTAINER_MODE_TRUE@.PHONY: ChangeLog #: Create ChangeLog from version control @MAINTAINER_MODE_TRUE@ChangeLog: @MAINTAINER_MODE_TRUE@ git log --pretty --numstat --summary | $(GIT2CL) >$@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: