Harmonize source headers: C examples (Patch 4/5)
This commit is contained in:
@@ -22,36 +22,35 @@
|
||||
CDDA player program using curses display see cdda-player in this
|
||||
distribution.
|
||||
*/
|
||||
#include <cdio/cdio.h>
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#define __CDIO_CONFIG_H__ 1
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
#endif
|
||||
#ifdef HAVE_GETOPT_H
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ERRNO_H
|
||||
#include <errno.h>
|
||||
#endif
|
||||
#include <signal.h>
|
||||
|
||||
#include <cdio/cdio.h>
|
||||
#include <cdio/mmc.h>
|
||||
#include <cdio/util.h>
|
||||
#include <cdio/cd_types.h>
|
||||
|
||||
@@ -16,16 +16,12 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* config.h has to come first else _FILE_OFFSET_BITS are redefined in
|
||||
say opensolaris. */
|
||||
/* Test media changed */
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
# define __CDIO_CONFIG_H__ 1
|
||||
#endif
|
||||
|
||||
#include <cdio/cdio.h>
|
||||
|
||||
/* Test media changed */
|
||||
#ifdef HAVE_STDIO_H
|
||||
# include <stdio.h>
|
||||
#endif
|
||||
@@ -58,6 +54,8 @@
|
||||
#define sleep(s) Sleep(1000*s)
|
||||
#endif
|
||||
|
||||
#include <cdio/cdio.h>
|
||||
|
||||
int
|
||||
main(int argc, const char *argv[])
|
||||
{
|
||||
|
||||
@@ -14,10 +14,19 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#define __CDIO_CONFIG_H__ 1
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include <cdio/cdio.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
static void usage(char * progname)
|
||||
{
|
||||
|
||||
@@ -18,17 +18,20 @@
|
||||
|
||||
/* Simple program to list CD-Text info of a Compact Disc using
|
||||
libcdio. See also corresponding C++ programs of similar names. */
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#define __CDIO_CONFIG_H__ 1
|
||||
#endif
|
||||
|
||||
#include <cdio/cdio.h>
|
||||
#ifdef HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#include <cdio/cdtext.h>
|
||||
|
||||
#include <cdio/cdio.h>
|
||||
#include <cdio/cdtext.h>
|
||||
|
||||
static void
|
||||
print_cdtext_track_info(cdtext_t *cdtext, track_t i_track, const char *psz_msg) {
|
||||
|
||||
@@ -18,7 +18,11 @@
|
||||
/* Simple program to show drivers installed and what the default
|
||||
CD-ROM drive is. See also corresponding C++ programs of similar
|
||||
names .*/
|
||||
#include <cdio/cdio.h>
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#define __CDIO_CONFIG_H__ 1
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
@@ -29,6 +33,8 @@
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include <cdio/cdio.h>
|
||||
|
||||
#define _(x) x
|
||||
|
||||
/* Prints out drive capabilities */
|
||||
|
||||
@@ -22,11 +22,18 @@
|
||||
discs. The disc-ID can be used to query info (tracks, title,
|
||||
interpret) about compact audio discs from a CDDB-Server.
|
||||
*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#define __CDIO_CONFIG_H__ 1
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include <cdio/cdio.h>
|
||||
|
||||
static int cddb_sum(int n)
|
||||
|
||||
@@ -17,7 +17,11 @@
|
||||
|
||||
/* Simple program to show drivers installed and what the default
|
||||
CD-ROM drive is and what CD drives are available. */
|
||||
#include <cdio/cdio.h>
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#define __CDIO_CONFIG_H__ 1
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
@@ -27,6 +31,8 @@
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include <cdio/cdio.h>
|
||||
#include <cdio/cd_types.h>
|
||||
#include <cdio/logging.h>
|
||||
|
||||
|
||||
@@ -24,7 +24,11 @@
|
||||
|
||||
See also corresponding C++ program of a similar name.
|
||||
*/
|
||||
#include <cdio/cdio.h>
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#define __CDIO_CONFIG_H__ 1
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
@@ -35,6 +39,8 @@
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include <cdio/cdio.h>
|
||||
|
||||
int
|
||||
main(int argc, const char *argv[])
|
||||
{
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
say opensolaris. */
|
||||
#include "portable.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <cdio/cdio.h>
|
||||
#include <cdio/iso9660.h>
|
||||
|
||||
|
||||
@@ -39,9 +39,6 @@
|
||||
say opensolaris. */
|
||||
#include "portable.h"
|
||||
|
||||
#include <cdio/cdio.h>
|
||||
#include <cdio/iso9660.h>
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
@@ -64,6 +61,9 @@
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include <cdio/cdio.h>
|
||||
#include <cdio/iso9660.h>
|
||||
|
||||
#define CEILING(x, y) ((x+(y-1))/y)
|
||||
|
||||
#define my_exit(rc) \
|
||||
|
||||
@@ -30,12 +30,9 @@
|
||||
say opensolaris. */
|
||||
#include "portable.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <cdio/cdio.h>
|
||||
#include <cdio/iso9660.h>
|
||||
|
||||
#ifdef HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
|
||||
#endif
|
||||
#ifdef HAVE_ERRNO_H
|
||||
#include <errno.h>
|
||||
#endif
|
||||
@@ -52,6 +49,9 @@
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include <cdio/cdio.h>
|
||||
#include <cdio/iso9660.h>
|
||||
|
||||
int
|
||||
main(int argc, const char *argv[])
|
||||
{
|
||||
|
||||
@@ -30,15 +30,13 @@
|
||||
#define ISO9660_IMAGE ISO9660_IMAGE_PATH "copying.iso"
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
# define __CDIO_CONFIG_H__ 1
|
||||
#include "config.h"
|
||||
#define __CDIO_CONFIG_H__ 1
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <cdio/cdio.h>
|
||||
#include <cdio/iso9660.h>
|
||||
|
||||
#ifdef HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
|
||||
#endif
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
@@ -52,6 +50,9 @@
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include <cdio/cdio.h>
|
||||
#include <cdio/iso9660.h>
|
||||
|
||||
#define print_vd_info(title, fn) \
|
||||
if (fn(p_iso, &psz_str)) { \
|
||||
printf(title ": %s\n", psz_str); \
|
||||
|
||||
@@ -32,15 +32,13 @@
|
||||
#define ISO9660_IMAGE ISO9660_IMAGE_PATH "copying.iso"
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
# define __CDIO_CONFIG_H__ 1
|
||||
#include "config.h"
|
||||
#define __CDIO_CONFIG_H__ 1
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <cdio/cdio.h>
|
||||
#include <cdio/iso9660.h>
|
||||
|
||||
#ifdef HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
|
||||
#endif
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
@@ -54,6 +52,9 @@
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include <cdio/cdio.h>
|
||||
#include <cdio/iso9660.h>
|
||||
|
||||
#define print_vd_info(title, fn) \
|
||||
if (fn(p_iso, &psz_str)) { \
|
||||
printf(title ": %s\n", psz_str); \
|
||||
|
||||
@@ -22,16 +22,20 @@
|
||||
See also corresponding C++ programs.
|
||||
*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
# define __CDIO_CONFIG_H__ 1
|
||||
#include "config.h"
|
||||
#define __CDIO_CONFIG_H__ 1
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include <cdio/cdio.h>
|
||||
#include <cdio/mmc.h>
|
||||
#include <cdio/mmc_cmds.h>
|
||||
|
||||
@@ -18,16 +18,20 @@
|
||||
/* 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
|
||||
#include "config.h"
|
||||
#define __CDIO_CONFIG_H__ 1
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include <cdio/cdio.h>
|
||||
#include <cdio/mmc.h>
|
||||
|
||||
|
||||
@@ -22,10 +22,13 @@
|
||||
routines.
|
||||
*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
# define __CDIO_CONFIG_H__ 1
|
||||
#include "config.h"
|
||||
#define __CDIO_CONFIG_H__ 1
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
@@ -19,17 +19,25 @@
|
||||
the libdio scsi_mmc_get_hwinfo() routine.
|
||||
*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
# define __CDIO_CONFIG_H__ 1
|
||||
#include "config.h"
|
||||
#define __CDIO_CONFIG_H__ 1
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include <cdio/cdio.h>
|
||||
#include <cdio/mmc.h>
|
||||
#include <string.h>
|
||||
|
||||
/* Set how long to wait for MMC commands to complete */
|
||||
#define DEFAULT_TIMEOUT_MS 10000
|
||||
|
||||
@@ -19,9 +19,21 @@
|
||||
A somewhat simplified program to show the use of cdio_guess_cd_type().
|
||||
Figure out the kind of CD image we've got.
|
||||
*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#define __CDIO_CONFIG_H__ 1
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include <cdio/cdio.h>
|
||||
#include <cdio/cd_types.h>
|
||||
|
||||
|
||||
@@ -19,9 +19,21 @@
|
||||
A slightly improved sample3 program: we handle cdio logging and
|
||||
take an optional CD-location.
|
||||
*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#define __CDIO_CONFIG_H__ 1
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include <cdio/cdio.h>
|
||||
#include <cdio/cd_types.h>
|
||||
#include <cdio/logging.h>
|
||||
|
||||
@@ -18,11 +18,20 @@
|
||||
|
||||
/* Simple program to list track numbers and logical sector numbers of
|
||||
a Compact Disc using libcdio. */
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#define __CDIO_CONFIG_H__ 1
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include <cdio/cdio.h>
|
||||
|
||||
int
|
||||
main(int argc, const char *argv[])
|
||||
{
|
||||
|
||||
@@ -25,12 +25,14 @@
|
||||
#define UDF_IMAGE_PATH "../"
|
||||
#define UDF_IMAGE "/src2/cd-images/udf/UDF102ISO.iso"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <cdio/cdio.h>
|
||||
#include <cdio/udf.h>
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#define __CDIO_CONFIG_H__ 1
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
|
||||
#endif
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
@@ -44,6 +46,9 @@
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include <cdio/cdio.h>
|
||||
#include <cdio/udf.h>
|
||||
|
||||
#define udf_PATH_DELIMITERS "/\\"
|
||||
|
||||
static void
|
||||
|
||||
@@ -27,12 +27,14 @@
|
||||
#define UDF_IMAGE "/src2/cd-images/udf/test2.iso"
|
||||
#define UDF_FILENAME "/parse/cue.L"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <cdio/cdio.h>
|
||||
#include <cdio/udf.h>
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#define __CDIO_CONFIG_H__ 1
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
|
||||
#endif
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
@@ -46,6 +48,9 @@
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include <cdio/cdio.h>
|
||||
#include <cdio/udf.h>
|
||||
|
||||
#define CEILING(x, y) ((x+(y-1))/y)
|
||||
|
||||
#define udf_PATH_DELIMITERS "/\\"
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
/* 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
|
||||
#include "config.h"
|
||||
#define __CDIO_CONFIG_H__ 1
|
||||
#endif
|
||||
|
||||
/* This is the UDF image. */
|
||||
@@ -36,12 +36,9 @@
|
||||
#define UDF_FILENAME "/COPYING"
|
||||
#define LOCAL_FILENAME "copying"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <cdio/cdio.h>
|
||||
#include <cdio/udf.h>
|
||||
|
||||
#ifdef HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
|
||||
#endif
|
||||
#ifdef HAVE_ERRNO_H
|
||||
#include <errno.h>
|
||||
#endif
|
||||
@@ -58,6 +55,9 @@
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include <cdio/cdio.h>
|
||||
#include <cdio/udf.h>
|
||||
|
||||
#define CEILING(x, y) ((x+(y-1))/y)
|
||||
|
||||
#define udf_PATH_DELIMITERS "/\\"
|
||||
|
||||
Reference in New Issue
Block a user