More source headers harmonization

* fix missing #ifdefs
* remove spaces and page feeds
* follow same set of rules everywhere, with cdio includes coming
  after standard C includes.
This commit is contained in:
Pete Batard
2012-03-05 17:58:56 +00:00
parent 9b0a90d4ae
commit 0074e54f97
25 changed files with 149 additions and 130 deletions

View File

@@ -1,6 +1,6 @@
#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

View File

@@ -19,21 +19,21 @@
Unit test for lib/driver/freebsd.c
*/
#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>
#include <stdio.h>
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#include <sys/types.h>
#endif
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#include <stdlib.h>
#endif
#ifdef HAVE_STRING_H
# include <string.h>
#include <string.h>
#endif
#include <cdio/cdio.h>

View File

@@ -19,8 +19,8 @@
Unit test for lib/driver/gnu_linux.c
*/
#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

View File

@@ -15,9 +15,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#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

View File

@@ -20,12 +20,9 @@
Regression test for MMC commands which don't involve write access.
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
# define __CDIO_CONFIG_H__ 1
#include "config.h"
#define __CDIO_CONFIG_H__ 1
#endif
#include <cdio/cdio.h>
#include <cdio/logging.h>
#include <cdio/mmc_cmds.h>
#ifdef HAVE_STDIO_H
#include <stdio.h>
@@ -47,6 +44,10 @@
#define sleep(s) Sleep(1000*s)
#endif
#include <cdio/cdio.h>
#include <cdio/logging.h>
#include <cdio/mmc_cmds.h>
#define SKIP_TEST 77
/* gcc may warn if no prototypes are given before function definition */

View File

@@ -25,19 +25,19 @@
#endif
#ifdef HAVE_STDIO_H
# include <stdio.h>
#include <stdio.h>
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#include <sys/types.h>
#endif
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#include <stdlib.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#include <unistd.h>
#endif
#ifdef HAVE_STRING_H
# include <string.h>
#include <string.h>
#endif
#if !defined(HAVE_SLEEP) && defined(_WIN32)
#include <windows.h>

View File

@@ -19,11 +19,9 @@
Unit test for lib/driver/osx.c
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
# define __CDIO_CONFIG_H__ 1
#include "config.h"
#define __CDIO_CONFIG_H__ 1
#endif
#include <cdio/cdio.h>
#include <cdio/logging.h>
#ifdef HAVE_STDIO_H
#include <stdio.h>
@@ -34,7 +32,12 @@
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#include <cdio/cdio.h>
#include <cdio/logging.h>
int
main(int argc, const char *argv[])

View File

@@ -19,33 +19,33 @@
Unit test for lib/driver/gnu_linux.c
*/
#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>
#include <stdio.h>
#endif
#ifdef HAVE_STRING_H
# include <string.h>
#include <string.h>
#endif
#ifdef HAVE_LIMITS_H
# include <limits.h>
#include <limits.h>
#endif
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#include <stdlib.h>
#endif
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#include <sys/stat.h>
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#include <sys/types.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#include <unistd.h>
#endif
#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
#if defined(_WIN32) && !defined(__CYGWIN__)
#include <windows.h>
@@ -56,10 +56,6 @@
#define _mkdir(a) mkdir(a, S_IRWXU)
#endif
#ifdef HAVE_ERRNO_H
# include <errno.h>
#endif
#include <cdio/util.h>
#define MY_DIR_SEPARATOR '/'

View File

@@ -19,11 +19,9 @@
Unit test for lib/driver/solaris.c
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
# define __CDIO_CONFIG_H__ 1
#include "config.h"
#define __CDIO_CONFIG_H__ 1
#endif
#include <cdio/cdio.h>
#include <cdio/logging.h>
#ifdef HAVE_STDIO_H
#include <stdio.h>
@@ -34,7 +32,12 @@
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#include <cdio/cdio.h>
#include <cdio/logging.h>
int
main(int argc, const char *argv[])

View File

@@ -19,11 +19,9 @@
Unit test for lib/driver/MSWindows/win32.c
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
# define __CDIO_CONFIG_H__ 1
#include "config.h"
#define __CDIO_CONFIG_H__ 1
#endif
#include <cdio/cdio.h>
#include <cdio/logging.h>
#ifdef HAVE_STDIO_H
#include <stdio.h>
@@ -34,7 +32,12 @@
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#include <cdio/cdio.h>
#include <cdio/logging.h>
int
main(int argc, const char *argv[])