Commit 4738cd9e authored by gates's avatar gates

Reorder header inclusion so that internal headers are included first before system headers.

This ensures header files have the proper system header inclusions
parent 8a0b5fbd
......@@ -30,6 +30,12 @@
#include "config.h"
#endif
#include "util/macro.h"
#include "util/strutl.h"
#include "libbluray/bdnav/clpi_parse.h"
#include "libbluray/bdnav/mpls_parse.h"
#include "libbluray/bdnav/navigation.h"
#if HAVE_MALLOC_H
#include <malloc.h>
#endif
......@@ -45,11 +51,6 @@
#include <libgen.h>
#include <string.h>
#include <inttypes.h>
#include "util/macro.h"
#include "util/strutl.h"
#include "libbluray/bdnav/clpi_parse.h"
#include "libbluray/bdnav/mpls_parse.h"
#include "libbluray/bdnav/navigation.h"
#define PKT_SIZE 192
#define MIN(a,b) (((a) < (b)) ? a : b)
......
......@@ -27,14 +27,15 @@
*/
#include "config.h"
#include "libbluray/bdnav/clpi_parse.h"
#include "util.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
#include "libbluray/bdnav/clpi_parse.h"
#include "util.h"
static int verbose;
......
......@@ -26,14 +26,13 @@
* so, delete this exception statement from your version.
*/
#include "libbluray/bdnav/index_parse.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include "libbluray/bdnav/index_parse.h"
static void _indx_print_app_info(INDX_APP_INFO *app_info)
{
const char video_format_str[16][8] = {
......
......@@ -2,6 +2,9 @@
#include "config.h"
#endif
#include "libbluray/bluray.h"
#include "util/logging.h"
#include <stdio.h>
#if HAVE_MALLOC_H
#include <malloc.h>
......@@ -12,9 +15,6 @@
#include <inttypes.h>
#endif
#include "libbluray/bluray.h"
#include "util/logging.h"
#define HEX_PRINT(X,Y) { int zz; for(zz = 0; zz < Y; zz++) fprintf(stderr, "%02X", X[zz]); fprintf(stderr, "\n"); }
int main(int argc, char *argv[])
......
......@@ -30,6 +30,9 @@
#include "config.h"
#endif
#include "libbluray/bluray.h"
#include "util/logging.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
......@@ -38,9 +41,6 @@
#endif
#include <unistd.h>
#include "libbluray/bluray.h"
#include "util/logging.h"
#define OPTS "hs:"
static void _usage(char *cmd)
......
......@@ -26,16 +26,15 @@
* so, delete this exception statement from your version.
*/
#include "util/macro.h"
#include "libbluray/bdnav/mobj_parse.h"
#include "libbluray/bdnav/hdmv_insn.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include "util/macro.h"
#include "libbluray/bdnav/mobj_parse.h"
#include "libbluray/bdnav/hdmv_insn.h"
const char * const psr_info[128] = {
"/* PSR0: Interactive graphics stream number */",
"/* PSR1: Primary audio stream number */",
......
......@@ -26,6 +26,11 @@
* so, delete this exception statement from your version.
*/
#include "util/strutl.h"
#include "libbluray/bdnav/mpls_parse.h"
#include "libbluray/bdnav/navigation.h"
#include "util.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
......@@ -35,10 +40,6 @@
#include <unistd.h>
#include <string.h>
#include <libgen.h>
#include "util/strutl.h"
#include "libbluray/bdnav/mpls_parse.h"
#include "libbluray/bdnav/navigation.h"
#include "util.h"
static int verbose;
......
......@@ -26,12 +26,13 @@
* so, delete this exception statement from your version.
*/
#include "util.h"
#include <stdio.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "util.h"
void
hex_dump(uint8_t *buf, int count)
......
......@@ -2,6 +2,11 @@
#include "config.h"
#endif
#include "configfile.h"
#include "file.h"
#include "util/macro.h"
#include "util/logging.h"
#if HAVE_MALLOC_H
#include <malloc.h>
#endif
......@@ -10,11 +15,6 @@
#include <stdlib.h>
#endif
#include "configfile.h"
#include "file.h"
#include "util/macro.h"
#include "util/logging.h"
uint8_t *configfile_record(CONFIGFILE *kf, enum configfile_types type, uint16_t *entries, size_t *entry_len)
{
size_t pos = 0, len = 0;
......
......@@ -30,6 +30,10 @@
#include "config.h"
#endif
#include "dir.h"
#include "util/macro.h"
#include "util/logging.h"
#if HAVE_MALLOC_H
#include <malloc.h>
#endif
......@@ -40,10 +44,6 @@
#include <dirent.h>
#include "dir.h"
#include "util/macro.h"
#include "util/logging.h"
DIR_H *dir_open_posix(const char* dirname);
void dir_close_posix(DIR_H *dir);
int dir_read_posix(DIR_H *dir, DIRENT *ent);
......
......@@ -2,6 +2,10 @@
#include "config.h"
#endif
#include "dl.h"
#include "util/macro.h"
#include "util/logging.h"
#if HAVE_MALLOC_H
#include <malloc.h>
#endif
......@@ -18,12 +22,6 @@
#include <dlfcn.h>
#endif
#include "dl.h"
#include "util/macro.h"
#include "util/logging.h"
// Note the dlopen takes just the name part. "aacs", internally we
// translate to "libaacs.so" "libaacs.dylib" or "aacs.dll".
void *dl_dlopen ( const char* name )
......
......@@ -2,6 +2,10 @@
#include "config.h"
#endif
#include "file.h"
#include "util/macro.h"
#include "util/logging.h"
#if HAVE_MALLOC_H
#include <malloc.h>
#endif
......@@ -12,10 +16,6 @@
#include <stdio.h>
#include "file.h"
#include "util/macro.h"
#include "util/logging.h"
FILE_H *file_open_linux(const char* filename, const char *mode);
void file_close_linux(FILE_H *file);
int64_t file_seek_linux(FILE_H *file, int64_t offset, int32_t origin);
......
......@@ -26,6 +26,11 @@
* so, delete this exception statement from your version.
*/
#include "util/macro.h"
#include "file/file.h"
#include "util/bits.h"
#include "clpi_parse.h"
#include <stdio.h>
#include <stdarg.h>
#include <stdint.h>
......@@ -33,10 +38,6 @@
#include <unistd.h>
#include <string.h>
#include <libgen.h>
#include "util/macro.h"
#include "file/file.h"
#include "util/bits.h"
#include "clpi_parse.h"
#define CLPI_SIG1 ('H' << 24 | 'D' << 16 | 'M' << 8 | 'V')
#define CLPI_SIG2A ('0' << 24 | '2' << 16 | '0' << 8 | '0')
......
......@@ -29,6 +29,8 @@
#if !defined(_CLPI_PARSE_H_)
#define _CLPI_PARSE_H_
#include <inttypes.h>
typedef struct
{
uint16_t pcr_pid;
......
......@@ -26,17 +26,16 @@
* so, delete this exception statement from your version.
*/
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include "file/file.h"
#include "util/bits.h"
#include "util/logging.h"
#include "util/macro.h"
#include "index_parse.h"
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
static int _parse_hdmv_obj(BITSTREAM *bs, INDX_HDMV_OBJ *hdmv)
{
hdmv->playback_type = bs_read(bs, 2);
......
......@@ -26,17 +26,15 @@
* so, delete this exception statement from your version.
*/
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include "file/file.h"
#include "util/bits.h"
#include "util/logging.h"
#include "util/macro.h"
#include "mobj_parse.h"
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#define MOBJ_SIG1 ('M' << 24 | 'O' << 16 | 'B' << 8 | 'J')
#define MOBJ_SIG2A ('0' << 24 | '2' << 16 | '0' << 8 | '0')
......
......@@ -26,6 +26,11 @@
* so, delete this exception statement from your version.
*/
#include "util/macro.h"
#include "file/file.h"
#include "util/bits.h"
#include "mpls_parse.h"
#include <stdio.h>
#include <stdarg.h>
#include <stdint.h>
......@@ -33,10 +38,6 @@
#include <unistd.h>
#include <string.h>
#include <libgen.h>
#include "util/macro.h"
#include "file/file.h"
#include "util/bits.h"
#include "mpls_parse.h"
#define MPLS_SIG1 ('M' << 24 | 'P' << 16 | 'L' << 8 | 'S')
#define MPLS_SIG2A ('0' << 24 | '2' << 16 | '0' << 8 | '0')
......
......@@ -30,6 +30,14 @@
#include "config.h"
#endif
#include "util/macro.h"
#include "util/logging.h"
#include "util/strutl.h"
#include "file/dir.h"
#include "file/file.h"
#include "mpls_parse.h"
#include "navigation.h"
#if HAVE_MALLOC_H
#include <malloc.h>
#endif
......@@ -40,13 +48,6 @@
#include <stdint.h>
#include <string.h>
#include "util/macro.h"
#include "util/logging.h"
#include "util/strutl.h"
#include "file/dir.h"
#include "file/file.h"
#include "mpls_parse.h"
#include "navigation.h"
static int _filter_dup(MPLS_PL *pl_list[], int count, MPLS_PL *pl)
{
......
......@@ -29,10 +29,11 @@
#if !defined(_NAVIGATION_H_)
#define _NAVIGATION_H_
#include <stdint.h>
#include "mpls_parse.h"
#include "clpi_parse.h"
#include <stdint.h>
#define CONNECT_NON_SEAMLESS 0
#define CONNECT_SEAMLESS 1
......
......@@ -2,6 +2,14 @@
#include "config.h"
#endif
#include "bluray.h"
#include "util/macro.h"
#include "util/logging.h"
#include "util/strutl.h"
#include "file/dl.h"
#include "bdnav/navigation.h"
#include "bdnav/index_parse.h"
#if HAVE_MALLOC_H
#include <malloc.h>
#endif
......@@ -16,15 +24,6 @@
#include <stdio.h>
#include "bluray.h"
#include "util/macro.h"
#include "util/logging.h"
#include "util/strutl.h"
#include "file/dl.h"
#include "bdnav/navigation.h"
#include "bdnav/index_parse.h"
#ifndef USING_DLOPEN
#include <libaacs/aacs.h>
#include <libbdplus/bdplus.h>
......
......@@ -2,12 +2,12 @@
#ifndef BLURAY_H_
#define BLURAY_H_
#include <stdint.h>
#include <unistd.h>
#include "file/file.h"
#include "bdnav/navigation.h"
#include <stdint.h>
#include <unistd.h>
struct indx_root_s;
typedef int (*fptr_int)();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment