diff --git a/example/audio.c b/example/audio.c index 57c187b5..6951bd51 100644 --- a/example/audio.c +++ b/example/audio.c @@ -22,36 +22,35 @@ CDDA player program using curses display see cdda-player in this distribution. */ -#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 - #ifdef HAVE_UNISTD_H #include #endif - #ifdef HAVE_STRING_H #include #endif - +#ifdef HAVE_SYS_TIME_H #include - -#include - +#endif #ifdef HAVE_GETOPT_H #include #endif - #ifdef HAVE_ERRNO_H #include #endif +#include +#include #include #include #include diff --git a/example/cdchange.c b/example/cdchange.c index 320633c5..091900e3 100644 --- a/example/cdchange.c +++ b/example/cdchange.c @@ -16,16 +16,12 @@ along with this program. If not, see . */ -/* 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 - -/* Test media changed */ #ifdef HAVE_STDIO_H # include #endif @@ -58,6 +54,8 @@ #define sleep(s) Sleep(1000*s) #endif +#include + int main(int argc, const char *argv[]) { diff --git a/example/cdio-eject.c b/example/cdio-eject.c index 5db25b55..e7e8bdd6 100644 --- a/example/cdio-eject.c +++ b/example/cdio-eject.c @@ -14,10 +14,19 @@ 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 #include -#include -#include static void usage(char * progname) { diff --git a/example/cdtext.c b/example/cdtext.c index 7e99ad0b..6374c869 100644 --- a/example/cdtext.c +++ b/example/cdtext.c @@ -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 #ifdef HAVE_STDIO_H #include #endif - #ifdef HAVE_SYS_TYPES_H #include #endif -#include +#include +#include static void print_cdtext_track_info(cdtext_t *cdtext, track_t i_track, const char *psz_msg) { diff --git a/example/device.c b/example/device.c index 23b7a39f..0fd005ea 100644 --- a/example/device.c +++ b/example/device.c @@ -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 +#ifdef HAVE_CONFIG_H +#include "config.h" +#define __CDIO_CONFIG_H__ 1 +#endif + #ifdef HAVE_STDIO_H #include #endif @@ -29,6 +33,8 @@ #include #endif +#include + #define _(x) x /* Prints out drive capabilities */ diff --git a/example/discid.c b/example/discid.c index 0075be97..3375ad13 100644 --- a/example/discid.c +++ b/example/discid.c @@ -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 +#endif #ifdef HAVE_SYS_TYPES_H #include #endif + #include static int cddb_sum(int n) diff --git a/example/drives.c b/example/drives.c index b06f30c9..b28d2797 100644 --- a/example/drives.c +++ b/example/drives.c @@ -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 +#ifdef HAVE_CONFIG_H +#include "config.h" +#define __CDIO_CONFIG_H__ 1 +#endif + #ifdef HAVE_STDIO_H #include #endif @@ -27,6 +31,8 @@ #ifdef HAVE_SYS_TYPES_H #include #endif + +#include #include #include diff --git a/example/eject.c b/example/eject.c index d239ef25..b278b019 100644 --- a/example/eject.c +++ b/example/eject.c @@ -24,7 +24,11 @@ See also corresponding C++ program of a similar name. */ -#include +#ifdef HAVE_CONFIG_H +#include "config.h" +#define __CDIO_CONFIG_H__ 1 +#endif + #ifdef HAVE_STDIO_H #include #endif @@ -35,6 +39,8 @@ #include #endif +#include + int main(int argc, const char *argv[]) { diff --git a/example/isofile.c b/example/isofile.c index 281408d6..bcfe06a5 100644 --- a/example/isofile.c +++ b/example/isofile.c @@ -33,7 +33,6 @@ say opensolaris. */ #include "portable.h" -#include #include #include diff --git a/example/isofile2.c b/example/isofile2.c index 753fe557..474f0c1f 100644 --- a/example/isofile2.c +++ b/example/isofile2.c @@ -39,9 +39,6 @@ say opensolaris. */ #include "portable.h" -#include -#include - #ifdef HAVE_SYS_TYPES_H #include #endif @@ -64,6 +61,9 @@ #include #endif +#include +#include + #define CEILING(x, y) ((x+(y-1))/y) #define my_exit(rc) \ diff --git a/example/isofuzzy.c b/example/isofuzzy.c index 15e81efd..138e1fcf 100644 --- a/example/isofuzzy.c +++ b/example/isofuzzy.c @@ -30,12 +30,9 @@ say opensolaris. */ #include "portable.h" -#include -#include -#include - +#ifdef HAVE_STDIO_H #include - +#endif #ifdef HAVE_ERRNO_H #include #endif @@ -52,6 +49,9 @@ #include #endif +#include +#include + int main(int argc, const char *argv[]) { diff --git a/example/isolist.c b/example/isolist.c index 0cb86b96..9233d2e8 100644 --- a/example/isolist.c +++ b/example/isolist.c @@ -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 -#include -#include +#ifdef HAVE_STDIO_H #include - +#endif #ifdef HAVE_STDLIB_H #include #endif @@ -52,6 +50,9 @@ #include #endif +#include +#include + #define print_vd_info(title, fn) \ if (fn(p_iso, &psz_str)) { \ printf(title ": %s\n", psz_str); \ diff --git a/example/isolsn.c b/example/isolsn.c index cdcfa06c..d3046aca 100644 --- a/example/isolsn.c +++ b/example/isolsn.c @@ -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 -#include -#include +#ifdef HAVE_STDIO_H #include - +#endif #ifdef HAVE_STDLIB_H #include #endif @@ -54,6 +52,9 @@ #include #endif +#include +#include + #define print_vd_info(title, fn) \ if (fn(p_iso, &psz_str)) { \ printf(title ": %s\n", psz_str); \ diff --git a/example/mmc1.c b/example/mmc1.c index 84fb470e..08bfddc8 100644 --- a/example/mmc1.c +++ b/example/mmc1.c @@ -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 +#endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_STRING_H #include #endif + #include #include #include diff --git a/example/mmc2.c b/example/mmc2.c index 46eb1db2..e98cd0fd 100644 --- a/example/mmc2.c +++ b/example/mmc2.c @@ -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 +#endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_STRING_H #include #endif + #include #include diff --git a/example/mmc2a.c b/example/mmc2a.c index 1a4848d8..b90a87be 100644 --- a/example/mmc2a.c +++ b/example/mmc2a.c @@ -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 +#endif #ifdef HAVE_SYS_TYPES_H #include #endif diff --git a/example/mmc3.c b/example/mmc3.c index 135a99eb..033593ad 100644 --- a/example/mmc3.c +++ b/example/mmc3.c @@ -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 +#endif +#ifdef HAVE_SYS_TYPES_H #include +#endif #ifdef HAVE_STDLIB_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 diff --git a/example/sample3.c b/example/sample3.c index aff0b57c..e5bf96e9 100644 --- a/example/sample3.c +++ b/example/sample3.c @@ -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 +#endif +#ifdef HAVE_STRING_H #include +#endif +#ifdef HAVE_SYS_TYPES_H #include +#endif + #include #include diff --git a/example/sample4.c b/example/sample4.c index 21826c5d..4e75f5c4 100644 --- a/example/sample4.c +++ b/example/sample4.c @@ -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 +#endif +#ifdef HAVE_STRING_H #include +#endif +#ifdef HAVE_SYS_TYPES_H #include +#endif + #include #include #include diff --git a/example/tracks.c b/example/tracks.c index 8422735e..8a2e6334 100644 --- a/example/tracks.c +++ b/example/tracks.c @@ -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 +#endif #ifdef HAVE_SYS_TYPES_H #include #endif + #include + int main(int argc, const char *argv[]) { diff --git a/example/udf1.c b/example/udf1.c index 52f7077b..2da6f8f1 100644 --- a/example/udf1.c +++ b/example/udf1.c @@ -25,12 +25,14 @@ #define UDF_IMAGE_PATH "../" #define UDF_IMAGE "/src2/cd-images/udf/UDF102ISO.iso" -#include -#include -#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 @@ -44,6 +46,9 @@ #include #endif +#include +#include + #define udf_PATH_DELIMITERS "/\\" static void diff --git a/example/udf2.c b/example/udf2.c index 2cd5ef19..1c0cd4e6 100644 --- a/example/udf2.c +++ b/example/udf2.c @@ -27,12 +27,14 @@ #define UDF_IMAGE "/src2/cd-images/udf/test2.iso" #define UDF_FILENAME "/parse/cue.L" -#include -#include -#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 @@ -46,6 +48,9 @@ #include #endif +#include +#include + #define CEILING(x, y) ((x+(y-1))/y) #define udf_PATH_DELIMITERS "/\\" diff --git a/example/udffile.c b/example/udffile.c index 2f19916c..8f3d09b5 100644 --- a/example/udffile.c +++ b/example/udffile.c @@ -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 -#include -#include - +#ifdef HAVE_STDIO_H #include - +#endif #ifdef HAVE_ERRNO_H #include #endif @@ -58,6 +55,9 @@ #include #endif +#include +#include + #define CEILING(x, y) ((x+(y-1))/y) #define udf_PATH_DELIMITERS "/\\"