Wez Furlong avatar Wez Furlong committed 65a5f08

tidy up system include use a little

Comments (0)

Files changed (14)

 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
 AC_CHECK_HEADERS([\
-stdio.h \
-string.h \
-stdlib.h \
-time.h \
+fcntl.h \
+getopt.h \
+linux/cdrom.h \
 math.h \
 signal.h \
-wchar.h \
 stddef.h \
+stdio.h \
+stdlib.h \
+string.h \
+sys/ioctl.h \
+sys/param.h \
+sys/mount.h \
+sys/stat.h \
 sys/types.h \
-sys/stat.h \
+sys/time.h \
+time.h \
 errno.h  \
 zlib.h \
 linux/cdrom.h \
+unistd.h \
+wchar.h \
+windows.h \
 ])
 
 AC_CHECK_HEADERS(getopt.h, [HAVE_GETOPT_H=1; AC_SUBST(HAVE_GETOPT_H)])

src/AP_AtomExtracts.cpp

 																																		*/
 //==================================================================//
 
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <time.h>
-#include <math.h>
-
 #include "AtomicParsley.h"
 #include "AP_ID3v2_tags.h"
 #include "AP_MetadataListings.h"
 //currently only Mac OS X is implemented - using IOKit framework.
 //another avenue (applicable to other *nix platforms): ioctl
 
-#if defined HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include "AtomicParsley.h"
+#include "AP_CDTOC.h"
 
-#if defined (HAVE_LINUX_CDROM_H)
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/ioctl.h>
-#include <linux/cdrom.h>
-#include <fcntl.h>
-
-/* From <linux/cdrom.h>: */
-//#define	CDROM_LEADOUT		0xAA
-#elif defined (DARWIN_PLATFORM)
-
-#include <stdio.h>
-#include <sys/mount.h>
-#include <sys/param.h>
+#if defined (DARWIN_PLATFORM)
 #include <CoreFoundation/CoreFoundation.h>
 #include <IOKit/IOKitLib.h>
 #include <IOKit/storage/IOCDTypes.h>
 #include <IOKit/IOBSD.h>
 
 const uint8_t MACOSX_LEADOUT_TRACK = 0xA2;
-
-#elif defined (WIN32)
-#include <string.h>
-#include <windows.h>
-
 #endif
 
-#include "AP_CDTOC.h"
 
 const uint8_t CDOBJECT_DATACD = 0;
 const uint8_t CDOBJECT_AUDIOCD = 1;

src/AP_ID3v2_tags.cpp

                                                                    */
 //==================================================================//
 
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
 #include "AtomicParsley.h"
 #include "AP_commons.h"
 #include "AP_ID3v2_tags.h"
 
 #include "AP_ID3v2_FrameDefinitions.h"
 
-#if defined HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 ID3v2Tag* GlobalID3Tag = NULL;
 
 //prefs

src/AP_MetadataListings.cpp

                                                                    */
 //==================================================================//
 
-#include <string.h>
-#include <stdlib.h>
-
-#if defined (WIN32)
-#include <wchar.h> 
-#endif
-
+#include "AtomicParsley.h"
 #include "AP_commons.h"
 #include "AP_iconv.h"
-#include "AtomicParsley.h"
 #include "AP_ID3v2_tags.h"
 #include "AP_arrays.h"
 #include "APar_uuid.h"

src/AP_arrays.cpp

                                                                    */
 //==================================================================//
 
-//#include <sys/types.h>
-//#include <sys/stat.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
+#include "AtomicParsley.h"
 #include "AP_commons.h"     //just so win32/msvc can get uint8_t defined
-#include "AtomicParsley.h"  //for stiks & sfIDs
 
 //////////////
 

src/AP_commons.cpp

 																																		*/
 //==================================================================//
 
-#include <string.h>
-#include <stdlib.h>
-#include <time.h>
-#include <wchar.h>
-#include <errno.h>
-
-#if defined (WIN32)
-#include <windows.h>
-#else
-#include <sys/time.h>
-#endif
-
+#include "AtomicParsley.h"
 #include "AP_commons.h"
 #include "AP_iconv.h"
-#include "AtomicParsley.h"
 
 
 ///////////////////////////////////////////////////////////////////////////////////////
 */
 //==================================================================//
 
-#include <string.h>
-#include <stdlib.h>
-
+#include "AtomicParsley.h"
 #if defined (WIN32)
-#include <windows.h>
 #include "AP_iconv.h"
 #endif
 

src/APar_sha1.cpp

                       alignment macros (for msvc)
 */
 
+#include "AtomicParsley.h"
 #include "APar_sha1.h"
 
-#include <stddef.h>
-#include <string.h>
-
 /* SWAP does an endian swap on architectures that are little-endian,
    as SHA1 needs some data in a big-endian form.  */
 /*

src/APar_uuid.cpp

                                                                    */
 //==================================================================//
 
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
+#include "AtomicParsley.h"
 #include "AP_commons.h"
 #include "APar_sha1.h"
 #include "APar_uuid.h"

src/APar_zlib.cpp

                                                                    */
 //==================================================================//
 
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
+#include "AtomicParsley.h"
 #include "AP_commons.h"
-
-#if defined HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#if defined HAVE_ZLIB_H
-
-#if defined (WIN32) || defined (__CYGWIN__)
-#include "zlib.h"   //QT 
-#else
-#include <zlib.h>   //QT 
-#endif
+#include <zlib.h>
 
 #if defined (WIN32)
 #include <windows.h>
 
 #endif
 
-#endif //HAVE_ZLIB_H
-
 static void* zalloc(void *opaque, unsigned int items, unsigned int size) {
 	return calloc(items, size);
 }
     fill
 ----------------------*/
 void APar_zlib_inflate(char* in_buffer, uint32_t in_buf_len, char* out_buffer, uint32_t out_buf_len) {
-#if defined HAVE_ZLIB_H
 	z_stream zlib;
 
 	// Decompress to another buffer
 	inflateInit(&zlib);
 	inflate(&zlib, Z_PARTIAL_FLUSH);
 	inflateEnd(&zlib);
-#endif
 	return ;
 }
 
 uint32_t APar_zlib_deflate(char* in_buffer, uint32_t in_buf_len, char* out_buffer, uint32_t out_buf_len) {
 	uint32_t compressed_bytes = 0;
 	
-#if defined HAVE_ZLIB_H
 	z_stream zlib;
 
 	// Compress(default level 6) to another buffer
 		compressed_bytes = zlib.total_out;
 		deflateEnd(&zlib);
 	}
-#endif
 	return compressed_bytes;
 }

src/AtomicParsley.cpp

                                                                    */
 //==================================================================//
 
-#if defined HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <time.h>
-#include <math.h>
-#include <wchar.h>
-
-#if defined (HAVE_UNISTD_H)
-#include <unistd.h>
-#elif defined (_MSC_VER)
-#include <io.h>
-#endif
-
 #include "AtomicParsley.h"
 #include "AP_AtomDefinitions.h"
 #include "AP_iconv.h"

src/AtomicParsley.h

+#ifndef ATOMIC_PARSLEY_H
+#define ATOMIC_PARSLEY_H
+
 //==================================================================//
 /*
     AtomicParsley - AtomicParsley.h
                                                                    */
 //==================================================================//
 
+#include "config.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#if HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
+#include <time.h>
+#include <math.h>
+#include <errno.h>
+
+#if HAVE_STDDEF_H
+# include <stddef.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+#if HAVE_SYS_IOCTL_H
+# include <sys/ioctl.h>
+#endif
+#if HAVE_LINUX_CDROM_H
+# include <linux/cdrom.h>
+#endif
+#if HAVE_SYS_MOUNT_H
+# include <sys/mount.h>
+#endif
+#if HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+#if HAVE_WINDOWS_H
+# include <windows.h>
+#endif
+#if HAVE_WCHAR_H
+# include <wchar.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#if HAVE_IO_H
+# include <io.h>
+#endif
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+#if HAVE_GETOPT_H
+# include <getopt.h>
+#else
+# include "extras/getopt.h"
+#endif
+
+
 #if defined (_WIN32) || defined (_MSC_VER)
 #define MAXPATHLEN 255
-#else
-#include <sys/param.h>
 #endif
 
 #if defined (_MSC_VER)
 #define _UNICODE
 #define strncasecmp strnicmp
-
-#include <windows.h>  /* for WriteConsoleW */
 #endif
 
 #include "AP_commons.h"
 void APar_DetermineAtomLengths();
 void APar_WriteFile(const char* ISObasemediafile, const char* outfile, bool rewrite_original);
 
+#endif
+
                                                                    */
 //==================================================================//
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <signal.h>
-#include <wchar.h>
-
-#if defined HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#if defined HAVE_GETOPT_H
-#include <getopt.h>
-#else
-#include "./extras/getopt.h"
-#endif
+#include "AtomicParsley.h"
 
 #include "AP_commons.h"
-#include "AtomicParsley.h"
 #include "AP_AtomExtracts.h"
 #include "AP_iconv.h"                 /* for xmlInitEndianDetection used in endian utf16 conversion */
 #include "AP_arrays.h"
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.