Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 512744 Details for
Bug 638646
media-video/vcdimager-0.7.24 Build fail after upgrading to dev-libs/libcdio-1.0.0 - info.lo] Error 1
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Addtional patch for libcdio-2.0.0
vcdimager-0.7.24-libcdio2.patch (text/plain), 402.63 KB, created by
Helmut Jarausch
on 2018-01-02 16:48:28 UTC
(
hide
)
Description:
Addtional patch for libcdio-2.0.0
Filename:
MIME Type:
Creator:
Helmut Jarausch
Created:
2018-01-02 16:48:28 UTC
Size:
402.63 KB
patch
obsolete
>diff -ur vcdimager-0.7.24.ORIG/amiga/rint.c vcdimager-0.7.24/amiga/rint.c >--- vcdimager-0.7.24.ORIG/amiga/rint.c 2001-07-28 17:32:41.000000000 +0200 >+++ vcdimager-0.7.24/amiga/rint.c 2018-01-02 16:27:31.297936067 +0100 >@@ -51,7 +51,7 @@ > #endif /* defined(vax)||defined(tahoe) */ > > >-double >+double > copysign (double x, double y) > { > #ifdef national >diff -ur vcdimager-0.7.24.ORIG/example/info1.c vcdimager-0.7.24/example/info1.c >--- vcdimager-0.7.24.ORIG/example/info1.c 2005-04-29 05:42:19.000000000 +0200 >+++ vcdimager-0.7.24/example/info1.c 2018-01-02 16:27:31.298936066 +0100 >@@ -18,7 +18,7 @@ > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ > /* Simple example of using the libvcdinfo library. */ >- >+ > > #include <stdio.h> > #ifdef HAVE_CONFIG_H >@@ -43,7 +43,7 @@ > char *psz = NULL; > > /* Set to give only errors on open, not warnings. */ >- vcd_loglevel_default = VCD_LOG_ERROR; >+ vcd_loglevel_default = VCD_LOG_ERROR; > > if ( vcdinfo_open(&p_vcdinfo, &psz_source, DRIVER_DEVICE, > NULL) != VCDINFO_OPEN_VCD) { >@@ -63,7 +63,7 @@ > psz = vcdinfo_get_preparer_id(p_vcdinfo); > printf ("Preparer id: `%s'\n", psz); > free(psz); >- >+ > psz = vcdinfo_get_publisher_id(p_vcdinfo); > printf ("Publisher id: `%s'\n", psz); > free(psz); >@@ -75,17 +75,17 @@ > psz = vcdinfo_get_application_id(p_vcdinfo); > printf ("Application id: `%s'\n", psz); > free(psz); >- >- { >+ >+ { > const iso9660_pvd_t *p_pvd = vcdinfo_get_pvd(p_vcdinfo); > > if (iso9660_get_pvd_type(p_pvd) != ISO_VD_PRIMARY) > printf ("Unexpected descriptor type\n"); >- >- if (strncmp (iso9660_get_pvd_id(p_pvd), ISO_STANDARD_ID, >+ >+ if (strncmp (iso9660_get_pvd_id(p_pvd), ISO_STANDARD_ID, > strlen (ISO_STANDARD_ID))) > printf ("Unexpected ID encountered (expected `" ISO_STANDARD_ID "'"); >- >+ > printf("PVD ID: `%.5s'\n", iso9660_get_pvd_id(p_pvd)); > printf("PVD version: %d\n", iso9660_get_pvd_version(p_pvd)); > } >diff -ur vcdimager-0.7.24.ORIG/frontends/cli/cdxa2mpeg.c vcdimager-0.7.24/frontends/cli/cdxa2mpeg.c >--- vcdimager-0.7.24.ORIG/frontends/cli/cdxa2mpeg.c 2005-02-02 01:37:37.000000000 +0100 >+++ vcdimager-0.7.24/frontends/cli/cdxa2mpeg.c 2018-01-02 16:27:31.290936067 +0100 >@@ -1,4 +1,4 @@ >-/* -*- c -*- >+/* -*- c -*- > $Id: cdxa2mpeg.c,v 1.10 2005/02/02 00:37:37 rocky Exp $ > > Copyright (C) 2001, 2004, 2005 Herbert Valerio Riedel <hvr@gnu.org> >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > /* quick'n'dirty RIFF CD-XA 2 MPEG converter */ > > #ifdef HAVE_CONFIG_H >@@ -127,7 +127,7 @@ > vcd_warn ("size not a multiple of %u bytes!!", CDIO_CD_FRAMESIZE_RAW); > sectors = size / CDIO_CD_FRAMESIZE_RAW; > >- vcd_info ("CD-XA data[%u] (%u sectors)", (unsigned int) size, >+ vcd_info ("CD-XA data[%u] (%u sectors)", (unsigned int) size, > (unsigned int) sectors); > > if (ctxt->fd_out) >@@ -351,13 +351,13 @@ > } > > if (args[1]) { >- if ( strcmp(args[0], args[1]) == 0 ) >+ if ( strcmp(args[0], args[1]) == 0 ) > { > vcd_error ("input and output can't refer to the same file"); > poptFreeContext(optCon); > exit (EXIT_FAILURE); > } >- >+ > out = fopen (args[1], "wb"); > if (!out) > { >diff -ur vcdimager-0.7.24.ORIG/frontends/cli/vcdimager.c vcdimager-0.7.24/frontends/cli/vcdimager.c >--- vcdimager-0.7.24.ORIG/frontends/cli/vcdimager.c 2005-06-09 02:53:23.000000000 +0200 >+++ vcdimager-0.7.24/frontends/cli/vcdimager.c 2018-01-02 16:27:31.286936067 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > /* Private includes */ > #include "vcd.h" > #include "vcd_assert.h" >@@ -51,7 +51,7 @@ > #define DEFAULT_ALBUM_ID "" > #define DEFAULT_TYPE "vcd2" > >-/* global stuff kept as a singleton makes for less typing effort :-) >+/* global stuff kept as a singleton makes for less typing effort :-) > */ > > struct add_files_t { >@@ -111,7 +111,7 @@ > > static VcdObj_t *gl_vcd_obj = NULL; > >-static void >+static void > _vcd_log_handler (vcd_log_level_t level, const char message[]) > { > if (level == VCD_LOG_DEBUG && !gl.verbose_flag) >@@ -119,7 +119,7 @@ > > if (level == VCD_LOG_INFO && gl.quiet_flag) > return; >- >+ > gl.default_vcd_log_handler (level, message); > } > >@@ -136,13 +136,13 @@ > *fname1 = strdup (tmp); > else > rc = -1; >- >+ > tmp = strtok(NULL, ","); > if (tmp) > *fname2 = strdup (tmp); > else > rc = -1; >- >+ > tmp = strtok(NULL, ","); > if (tmp) > rc = -1; >@@ -180,7 +180,7 @@ > gl.volume_label = DEFAULT_VOLUME_ID; > gl.application_id = DEFAULT_APPLICATION_ID; > gl.album_id = DEFAULT_ALBUM_ID; >- >+ > gl.volume_count = 1; > gl.volume_number = 1; > >@@ -199,7 +199,7 @@ > CL_ADD_FILE_RAW > }; > >- struct poptOption optionsTable[] = >+ struct poptOption optionsTable[] = > { > {"type", 't', POPT_ARG_STRING, &gl.type, 0, > "select VideoCD type ('vcd11', 'vcd2', 'svcd' or 'hqvcd')" >@@ -208,7 +208,7 @@ > {"cue-file", 'c', POPT_ARG_STRING, &gl.cue_fname, 0, > "specify cue file for output (default: '" DEFAULT_CUE_FILE "')", > "FILE"}, >- >+ > {"bin-file", 'b', POPT_ARG_STRING, &gl.image_fname, 0, > "specify bin file for output (default: '" DEFAULT_BIN_FILE "')", > "FILE"}, >@@ -218,7 +218,7 @@ > "')", "LABEL"}, > > {"iso-application-id", '\0', POPT_ARG_STRING, &gl.application_id, 0, >- "specify ISO application id for video cd (default: '" >+ "specify ISO application id for video cd (default: '" > DEFAULT_APPLICATION_ID "')", "LABEL"}, > > {"info-album-id", '\0', POPT_ARG_STRING, &gl.album_id, 0, >@@ -236,47 +236,47 @@ > > {"update-scan-offsets", '\0', POPT_ARG_NONE, &gl.update_scan_offsets, 0, > "update scan data offsets in video mpeg2 stream"}, >- >+ > {"sector-2336", '\0', POPT_ARG_NONE, &gl.sector_2336_flag, 0, > "use 2336 byte sectors for output"}, > >- {"add-dir", '\0', POPT_ARG_STRING, NULL, CL_ADD_DIR, >+ {"add-dir", '\0', POPT_ARG_STRING, NULL, CL_ADD_DIR, > "add empty dir to ISO fs", "ISO_DIRNAME"}, > >- {"add-file", '\0', POPT_ARG_STRING, NULL, CL_ADD_FILE, >+ {"add-file", '\0', POPT_ARG_STRING, NULL, CL_ADD_FILE, > "add single file to ISO fs", "FILE,ISO_FILENAME"}, > >- {"add-file-2336", '\0', POPT_ARG_STRING, NULL, CL_ADD_FILE_RAW, >+ {"add-file-2336", '\0', POPT_ARG_STRING, NULL, CL_ADD_FILE_RAW, > "add file containing full 2336 byte sectors to ISO fs", > "FILE,ISO_FILENAME"}, > > {"create-time", 'T', POPT_ARG_STRING, &gl.create_timestr, 0, > "specify creation date on files in CD image (default: current date)"}, >- >+ > {"progress", 'p', POPT_ARG_NONE | POPT_ARGFLAG_DOC_HIDDEN, > NULL, 0, "show progress"}, > >- {"check", '\0', POPT_ARG_NONE | POPT_ARGFLAG_DOC_HIDDEN, >+ {"check", '\0', POPT_ARG_NONE | POPT_ARGFLAG_DOC_HIDDEN, > &gl.check_flag, 0, "enabled check mode"}, > > {"verbose", 'v', POPT_ARG_NONE, &gl.verbose_flag, 0, "be verbose"}, > >- {"quiet", 'q', POPT_ARG_NONE, &gl.quiet_flag, 0, >+ {"quiet", 'q', POPT_ARG_NONE, &gl.quiet_flag, 0, > "show only critical messages"}, > > {"version", 'V', POPT_ARG_NONE, NULL, CL_VERSION, > "display version and copyright information and exit"}, > >- POPT_AUTOHELP >+ POPT_AUTOHELP > > {NULL, 0, 0, NULL, 0} > }; >- >+ > poptContext optCon = poptGetContext ("vcdimager", argc, argv, optionsTable, 0); > poptSetOtherOptionHelp (optCon, "[OPTION...] <mpeg-tracks...>"); > >- if (poptReadDefaultConfig (optCon, 0)) >- fprintf (stderr, "warning, reading popt configuration failed\n"); >+ if (poptReadDefaultConfig (optCon, 0)) >+ fprintf (stderr, "warning, reading popt configuration failed\n"); > > while ((opt = poptGetNextOpt (optCon)) != -1) > switch (opt) >@@ -296,7 +296,7 @@ > gl_add_dir (strdup (arg)); > } > break; >- >+ > case CL_ADD_FILE: > case CL_ADD_FILE_RAW: > { >@@ -305,7 +305,7 @@ > > vcd_assert (arg != NULL); > >- if(!_parse_file_arg (arg, &fname1, &fname2)) >+ if(!_parse_file_arg (arg, &fname1, &fname2)) > gl_add_file (fname1, fname2, (opt == CL_ADD_FILE_RAW)); > else > { >@@ -323,7 +323,7 @@ > > if (gl.verbose_flag && gl.quiet_flag) > vcd_error ("I can't be both, quiet and verbose... either one or another ;-)"); >- >+ > if ((args = poptGetArgs (optCon)) == NULL) > vcd_error ("error: need at least one data track as argument " > "-- try --help"); >@@ -343,7 +343,7 @@ > struct { > const char *str; > vcd_type_t id; >- } type_str[] = >+ } type_str[] = > { > { "vcd10", VCD_TYPE_VCD }, > { "vcd11", VCD_TYPE_VCD11 }, >@@ -353,10 +353,10 @@ > { "hqvcd", VCD_TYPE_HQVCD }, > { NULL, } > }; >- >+ > int i = 0; > >- while (type_str[i].str) >+ while (type_str[i].str) > if (strcasecmp(gl.type, type_str[i].str)) > i++; > else >@@ -364,7 +364,7 @@ > > if (!type_str[i].str) > vcd_error ("invalid type given"); >- >+ > type_id = type_str[i].id; > } > >@@ -383,12 +383,12 @@ > vcd_obj_set_param_str (gl_vcd_obj, VCD_PARM_PREPARER_ID, "GNU VCDIMAGER CHECK MODE"); > > vcd_obj_set_param_str (gl_vcd_obj, VCD_PARM_VOLUME_ID, gl.volume_label); >- vcd_obj_set_param_str (gl_vcd_obj, VCD_PARM_APPLICATION_ID, >+ vcd_obj_set_param_str (gl_vcd_obj, VCD_PARM_APPLICATION_ID, > gl.application_id); > vcd_obj_set_param_str (gl_vcd_obj, VCD_PARM_ALBUM_ID, gl.album_id); > > vcd_obj_set_param_uint (gl_vcd_obj, VCD_PARM_VOLUME_COUNT, gl.volume_count); >- vcd_obj_set_param_uint (gl_vcd_obj, VCD_PARM_VOLUME_NUMBER, >+ vcd_obj_set_param_uint (gl_vcd_obj, VCD_PARM_VOLUME_NUMBER, > gl.volume_number); > > if (type_id == VCD_TYPE_SVCD) >@@ -398,26 +398,26 @@ > vcd_obj_set_param_bool (gl_vcd_obj, VCD_PARM_SVCD_VCD3_ENTRYSVD, > gl.broken_svcd_mode_flag); > >- vcd_obj_set_param_bool (gl_vcd_obj, VCD_PARM_UPDATE_SCAN_OFFSETS, >+ vcd_obj_set_param_bool (gl_vcd_obj, VCD_PARM_UPDATE_SCAN_OFFSETS, > gl.update_scan_offsets); > } > > create_time = time(NULL); > if (gl.create_timestr != NULL) { >- if (!strcmp (gl.create_timestr, "TESTING")) >+ if (!strcmp (gl.create_timestr, "TESTING")) > create_time = 269236800L; > else { > #ifdef HAVE_STRPTIME > struct tm tm; >- >+ > if (NULL == strptime(gl.create_timestr, "%Y-%m-%d %H:%M:%S", &tm)) { >- vcd_warn("Trouble converting date string %s using strptime.", >+ vcd_warn("Trouble converting date string %s using strptime.", > gl.create_timestr); > vcd_warn("String should match %%Y-%%m-%%d %%H:%%M:%%S"); > } else { > create_time = mktime(&tm); > } >-#else >+#else > create_time = 269236800L; > #endif > } >@@ -429,14 +429,14 @@ > > if (p->fname) > { >- fprintf (stdout, "debug: adding [%s] as [%s] (raw=%d)\n", >+ fprintf (stdout, "debug: adding [%s] as [%s] (raw=%d)\n", > p->fname, p->iso_fname, p->raw_flag); >- >+ > if (vcd_obj_add_file(gl_vcd_obj, p->iso_fname, > vcd_data_source_new_stdio (p->fname), > p->raw_flag)) > { >- fprintf (stderr, >+ fprintf (stderr, > "error while adding file `%s' as `%s' to (S)VCD\n", > p->fname, p->iso_fname); > exit (EXIT_FAILURE); >@@ -448,7 +448,7 @@ > > if (vcd_obj_add_dir(gl_vcd_obj, p->iso_fname)) > { >- fprintf (stderr, >+ fprintf (stderr, > "error while adding dir `%s' to (S)VCD\n", p->iso_fname); > exit (EXIT_FAILURE); > } >@@ -458,7 +458,7 @@ > for (n = 0; gl.track_fnames[n] != NULL; n++) > { > VcdDataSource_t *data_source; >- >+ > data_source = vcd_data_source_new_stdio (gl.track_fnames[n]); > > vcd_assert (data_source != NULL); >@@ -477,9 +477,9 @@ > > vcd_image_sink_set_arg (p_image_sink, "bin", gl.image_fname); > vcd_image_sink_set_arg (p_image_sink, "cue", gl.cue_fname); >- vcd_image_sink_set_arg (p_image_sink, "sector", >+ vcd_image_sink_set_arg (p_image_sink, "sector", > gl.sector_2336_flag ? "2336" : "2352"); >- >+ > if (!p_image_sink) > { > vcd_error ("failed to create image object"); >@@ -493,23 +493,23 @@ > vcd_obj_end_output (gl_vcd_obj); > > { >- unsigned _bytes = sectors * >+ unsigned _bytes = sectors * > (gl.sector_2336_flag ? M2RAW_SECTOR_SIZE : CDIO_CD_FRAMESIZE_RAW); > char *_msfstr = cdio_lba_to_msf_str (sectors); > >- fprintf (stdout, >+ fprintf (stdout, > "finished ok, image created with %d sectors [%s] (%d bytes)\n", > sectors, _msfstr, _bytes); >- >+ > free (_msfstr); > } > } > > return EXIT_SUCCESS; > } >- > >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/frontends/cli/vcd-info.c vcdimager-0.7.24/frontends/cli/vcd-info.c >--- vcdimager-0.7.24.ORIG/frontends/cli/vcd-info.c 2011-03-17 22:26:34.000000000 +0100 >+++ vcdimager-0.7.24/frontends/cli/vcd-info.c 2018-01-02 17:27:38.326617336 +0100 >@@ -19,7 +19,7 @@ > along with this program; if not, write to the Free Foundation > Software, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >@@ -39,6 +39,8 @@ > #define POPT_ARGFLAG_OPTIONAL 0 > #endif > >+/* We don't want to pull in cdio's config */ >+#define __CDIO_CONFIG_H__ > #include <cdio/cdio.h> > #include <cdio/bytesex.h> > #include <cdio/iso9660.h> >@@ -67,8 +69,8 @@ > char *access_mode; > > /* Boolean values set by command-line options to reduce output. >- Note: because these are used by popt, the datatype here has to be >- int, not bool. >+ Note: because these are used by popt, the datatype here has to be >+ int, not bool. > */ > uint32_t debug_level; > int no_ext_psd_flag; /* Ignore information in /EXT/PSD_X.VCD */ >@@ -85,7 +87,7 @@ > int delimiter; /* True supresses delimiters between sections */ > int header; /* True supresses the section headers */ > } no; >- >+ > struct entries_t /* Switches for the ENTRIES section. */ > { > int any; /* True if any of the below variables are set true. */ >@@ -101,7 +103,7 @@ > { > int any; > int all; >- int album; /* Show album description info. */ >+ int album; /* Show album description info. */ > int cc; /* Show data cc. */ > int count; /* Show volume count */ > int id; /* Show ID */ >@@ -122,7 +124,7 @@ > int vers; /* Show INFO version. */ > int vol; /* Show volume number */ > } info; >- >+ > struct pvd_t /* Switches for the PVD section. */ > { > int any; /* True if any of the below variables are set true. */ >@@ -146,7 +148,7 @@ > int scandata; /* Show scan data group -- needs to broken out. */ > int search; > int source; /* Show image source and size. */ >- int tracks; >+ int tracks; > } show; > > } >@@ -164,7 +166,7 @@ > _bitset_get_bit (const uint8_t bitvec[], int bit) > { > bool result = false; >- >+ > if (_vcd_bit_set_p (bitvec[bit / 8], (bit % 8))) > result = true; > >@@ -201,7 +203,7 @@ > iso9660_stat_t *statbuf; > CdIo_t *p_cdio; > vcd2_ext_pbc_status_t ret_status; >- >+ > if (!vcdinfo_has_pbc(p_vcdinfo)) > return PBC_VCD2_NO_PBC; > >@@ -232,22 +234,22 @@ > static void > dump_lot (const vcdinfo_obj_t *p_vcdinfo, bool ext) > { >- const LotVcd_t *lot = ext >+ const LotVcd_t *lot = ext > ? vcdinfo_get_lot_x(p_vcdinfo) : vcdinfo_get_lot(p_vcdinfo); >- >+ > unsigned n, tmp; > const uint16_t max_lid = vcdinfo_get_num_LIDs(p_vcdinfo); > unsigned int mult = vcdinfo_get_offset_mult(p_vcdinfo); > > if (!gl.show.no.header) >- fprintf (stdout, >- (vcdinfo_get_VCD_type(p_vcdinfo) == VCD_TYPE_SVCD >+ fprintf (stdout, >+ (vcdinfo_get_VCD_type(p_vcdinfo) == VCD_TYPE_SVCD > || vcdinfo_get_VCD_type(p_vcdinfo) == VCD_TYPE_HQVCD) > ? "SVCD/LOT.SVD\n" > : (ext ? "EXT/LOT_X.VCD\n": "VCD/LOT.VCD\n")); > > if (lot->reserved) >- fprintf (stdout, " RESERVED = 0x%4.4x (should be 0x0000)\n", >+ fprintf (stdout, " RESERVED = 0x%4.4x (should be 0x0000)\n", > uint16_from_be (lot->reserved)); > > for (n = 0; n < LOT_VCD_OFFSETS; n++) >@@ -258,9 +260,9 @@ > fprintf (stdout, "warning, LID[1] should have offset = 0!\n"); > > if (n >= max_lid) >- fprintf (stdout, >+ fprintf (stdout, > "warning, the following entry is greater than the maximum lid field in info\n"); >- fprintf (stdout, " LID[%d]: offset = %d (0x%4.4x)\n", >+ fprintf (stdout, " LID[%d]: offset = %d (0x%4.4x)\n", > n + 1, tmp * mult, tmp); > } > else if (n < max_lid) >@@ -278,15 +280,15 @@ > CdioList_t *offset_list; > > if (!p_vcdinfo) return; >- >+ > mult = vcdinfo_get_offset_mult(p_vcdinfo); > psd = ext ? vcdinfo_get_psd_x(p_vcdinfo) : vcdinfo_get_psd(p_vcdinfo); >- offset_list = ext >- ? vcdinfo_get_offset_x_list(p_vcdinfo) >+ offset_list = ext >+ ? vcdinfo_get_offset_x_list(p_vcdinfo) > : vcdinfo_get_offset_list(p_vcdinfo); > >- fprintf (stdout, >- (vcdinfo_get_VCD_type(p_vcdinfo) == VCD_TYPE_SVCD >+ fprintf (stdout, >+ (vcdinfo_get_VCD_type(p_vcdinfo) == VCD_TYPE_SVCD > || vcdinfo_get_VCD_type(p_vcdinfo) == VCD_TYPE_HQVCD) > ? "SVCD/PSD.SVD\n" > : (ext ? "EXT/PSD_X.VCD\n": "VCD/PSD.VCD\n")); >@@ -297,7 +299,7 @@ > unsigned _rofs = ofs->offset * mult; > > uint8_t type; >- >+ > type = psd[_rofs]; > > switch (type) >@@ -305,7 +307,7 @@ > case PSD_TYPE_PLAY_LIST: > { > const PsdPlayListDescriptor_t *pld = (const void *) (psd + _rofs); >- >+ > int i; > uint16_t lid = vcdinf_pld_get_lid(pld); > >@@ -315,13 +317,13 @@ > " prev: %s | next: %s | return: %s\n" > " playtime: %d/15s | wait: %ds | autowait: %ds\n", > n, vcdinfo_ofs2str (p_vcdinfo, ofs->offset, ext), >- pld->noi, lid, >+ pld->noi, lid, > _vcd_bool_str(vcdinfo_is_rejected(uint16_from_be(pld->lid))), >- vcdinfo_ofs2str(p_vcdinfo, >+ vcdinfo_ofs2str(p_vcdinfo, > vcdinf_pld_get_prev_offset(pld), ext), >- vcdinfo_ofs2str(p_vcdinfo, >+ vcdinfo_ofs2str(p_vcdinfo, > vcdinf_pld_get_next_offset(pld), ext), >- vcdinfo_ofs2str(p_vcdinfo, >+ vcdinfo_ofs2str(p_vcdinfo, > vcdinf_pld_get_return_offset(pld), > ext), > vcdinf_get_play_time(pld), vcdinf_get_wait_time (pld), >@@ -338,15 +340,15 @@ > case PSD_TYPE_END_LIST: > { > const PsdEndListDescriptor_t *d = (const void *) (psd + _rofs); >- fprintf (stdout, " PSD[%.2d] (%s): end list descriptor\n", n, >+ fprintf (stdout, " PSD[%.2d] (%s): end list descriptor\n", n, > vcdinfo_ofs2str (p_vcdinfo, ofs->offset, ext)); > if (vcdinfo_get_VCD_type(p_vcdinfo) != VCD_TYPE_VCD2) > { >- fprintf (stdout, >- " next disc number: %d (if 0 stop PBC handling)\n", >+ fprintf (stdout, >+ " next disc number: %d (if 0 stop PBC handling)\n", > d->next_disc); >- fprintf (stdout, >- " change picture item: %s\n", >+ fprintf (stdout, >+ " change picture item: %s\n", > vcdinfo_pin2str (uint16_from_be (d->change_pic))); > } > fprintf (stdout, "\n"); >@@ -373,30 +375,30 @@ > *(uint8_t *) &d->flags, > vcdinf_get_num_selections(d), > vcdinf_get_bsn(d), >- lid, >+ lid, > _vcd_bool_str (vcdinf_psd_get_lid_rejected(d)), >- vcdinfo_ofs2str(p_vcdinfo, >+ vcdinfo_ofs2str(p_vcdinfo, > vcdinf_psd_get_prev_offset(d), ext), >- vcdinfo_ofs2str(p_vcdinfo, >+ vcdinfo_ofs2str(p_vcdinfo, > vcdinf_psd_get_next_offset(d), ext), >- vcdinfo_ofs2str(p_vcdinfo, >+ vcdinfo_ofs2str(p_vcdinfo, > vcdinf_psd_get_return_offset(d), ext), >- vcdinfo_ofs2str(p_vcdinfo, >+ vcdinfo_ofs2str(p_vcdinfo, > vcdinf_psd_get_default_offset(d),ext), > vcdinfo_ofs2str(p_vcdinfo, vcdinf_get_timeout_offset(d), > ext), > vcdinf_get_timeout_time(d), >- vcdinf_get_loop_count(d), >+ vcdinf_get_loop_count(d), > _vcd_bool_str (vcdinf_has_jump_delay(d)), > vcdinfo_pin2str (vcdinf_psd_get_itemid(d))); > > for (i = 0; i < vcdinf_get_num_selections(d); i++) > fprintf (stdout, " ofs[%d]: %s\n", i, >- vcdinfo_ofs2str (p_vcdinfo, >- vcdinf_psd_get_offset(d, i), >+ vcdinfo_ofs2str (p_vcdinfo, >+ vcdinf_psd_get_offset(d, i), > ext)); > >- if (type == PSD_TYPE_EXT_SELECTION_LIST >+ if (type == PSD_TYPE_EXT_SELECTION_LIST > || d->flags.SelectionAreaFlag) > { > const PsdSelectionListDescriptorExtended_t *d2 = >@@ -420,7 +422,7 @@ > } > break; > default: >- fprintf (stdout, " PSD[%2d] (%s): unkown descriptor type (0x%2.2x)\n", >+ fprintf (stdout, " PSD[%2d] (%s): unkown descriptor type (0x%2.2x)\n", > n, vcdinfo_ofs2str (p_vcdinfo, ofs->offset, ext), type); > > fprintf (stdout, " hexdump: "); >@@ -441,13 +443,13 @@ > int n; > > if (!gl.show.no.header) >- fprintf (stdout, >- (vcdinfo_get_VCD_type(p_vcdinfo) == VCD_TYPE_SVCD >+ fprintf (stdout, >+ (vcdinfo_get_VCD_type(p_vcdinfo) == VCD_TYPE_SVCD > || vcdinfo_get_VCD_type(p_vcdinfo) == VCD_TYPE_HQVCD) >- ? "SVCD/INFO.SVD\n" >+ ? "SVCD/INFO.SVD\n" > : "VCD/INFO.VCD\n"); > >- if (gl.show.info.id) >+ if (gl.show.info.id) > fprintf (stdout, " ID: `%.8s'\n", info->ID); > if (gl.show.info.vers) > fprintf (stdout, " version: 0x%2.2x\n", info->version); >@@ -456,10 +458,10 @@ > if (gl.show.info.album) > fprintf (stdout, " album id: `%.16s'\n", vcdinfo_get_album_id(p_vcdinfo)); > if (gl.show.info.count) >- fprintf (stdout, " volume count: %d\n", >+ fprintf (stdout, " volume count: %d\n", > vcdinfo_get_volume_count(p_vcdinfo)); > if (gl.show.info.vol) >- fprintf (stdout, " volume number: %d\n", >+ fprintf (stdout, " volume number: %d\n", > vcdinfo_get_volume_num(p_vcdinfo)); > > if (gl.show.info.pal) >@@ -469,16 +471,16 @@ > { > if (n == 48) > fprintf (stdout, "\n (bslbf) "); >- >+ > fprintf (stdout, n % 8 ? "%d" : " %d", > _bitset_get_bit (info->pal_flags, n)); > } > fprintf (stdout, "\n"); >- >+ > fprintf (stdout, " flags:\n"); >- fprintf (stdout, >- ((vcdinfo_get_VCD_type(p_vcdinfo) == VCD_TYPE_SVCD >- || vcdinfo_get_VCD_type(p_vcdinfo) == VCD_TYPE_HQVCD) >+ fprintf (stdout, >+ ((vcdinfo_get_VCD_type(p_vcdinfo) == VCD_TYPE_SVCD >+ || vcdinfo_get_VCD_type(p_vcdinfo) == VCD_TYPE_HQVCD) > ? " reserved1: %s\n" > : " karaoke area: %s\n"), > _vcd_bool_str (info->flags.reserved1)); >@@ -495,9 +497,9 @@ > if (gl.show.info.st2) > fprintf (stdout, " start track #2: %s\n", _vcd_bool_str (info->flags.use_track3)); > if (gl.show.info.pbc) { >- fprintf (stdout, >- ((vcdinfo_get_VCD_type(p_vcdinfo) == VCD_TYPE_SVCD >- || vcdinfo_get_VCD_type(p_vcdinfo) == VCD_TYPE_HQVCD) >+ fprintf (stdout, >+ ((vcdinfo_get_VCD_type(p_vcdinfo) == VCD_TYPE_SVCD >+ || vcdinfo_get_VCD_type(p_vcdinfo) == VCD_TYPE_HQVCD) > ? " reserved2: %s\n" > : " extended pbc: %s\n"), > _vcd_bool_str (info->flags.pbc_x)); >@@ -513,20 +515,20 @@ > fprintf(stdout, " Missing EXT/PSD_X.VCD for extended PBC info.\n"); > break; > case PBC_VCD2_BAD_LOT_SIZE: >- fprintf(stdout, >+ fprintf(stdout, > " Size of EXT/LOT_X.VCD != LOT_VCD_SIZE*ISO_BLOCKSIZE\n"); > break; > case PBC_VCD2_EXT: > fprintf(stdout, " Detected extended VCD2.0 PBC files.\n"); > break; >- case PBC_VCD2_NOPE: >+ case PBC_VCD2_NOPE: > break; > } > } >- >+ > > if (gl.show.info.psds) >- fprintf (stdout, " psd size: %u\n", >+ fprintf (stdout, " psd size: %u\n", > (unsigned int) uint32_from_be (info->psd_size)); > > if (gl.show.info.seg) { >@@ -534,9 +536,9 @@ > fprintf (stdout, " first segment addr: %s\n", psz_msf); > free(psz_msf); > } >- >+ > if (gl.show.info.ofm) >- fprintf (stdout, " offset multiplier: 0x%2.2x\n", >+ fprintf (stdout, " offset multiplier: 0x%2.2x\n", > vcdinfo_get_offset_mult(p_vcdinfo)); > > if (gl.show.info.lidn) >@@ -545,7 +547,7 @@ > > if (gl.show.info.segn) > fprintf (stdout, " number of segments: %d\n", num_segments); >- >+ > if (gl.show.info.segs) > for (n = 0; n < num_segments; n++) > { >@@ -557,7 +559,7 @@ > psz_msf = cdio_msf_to_str(&msf); > fprintf (stdout, " SEGMENT[%4.4d]: track# 0, LSN %6u " > "(MSF %s), %2u sectors\n", >- n, (unsigned int) lsn, psz_msf, >+ n, (unsigned int) lsn, psz_msf, > (unsigned int) vcdinfo_get_seg_sector_count(p_vcdinfo, n)); > free(psz_msf); > >@@ -566,17 +568,17 @@ > vcdinfo_get_seg_audio_type(p_vcdinfo, n)), > vcdinfo_video_type2str(p_vcdinfo, n), > _vcd_bool_str (info->spi_contents[n].item_cont), >- (vcdinfo_get_VCD_type(p_vcdinfo) == VCD_TYPE_VCD2) >+ (vcdinfo_get_VCD_type(p_vcdinfo) == VCD_TYPE_VCD2) > ? "" : ",\n SVCD subtitle (OGT) substream:", >- (vcdinfo_get_VCD_type(p_vcdinfo) == VCD_TYPE_VCD2) >+ (vcdinfo_get_VCD_type(p_vcdinfo) == VCD_TYPE_VCD2) > ? "" : vcdinfo_ogt2str(p_vcdinfo, n)); > } >- >+ > if (gl.show.info.start) > if (vcdinfo_get_VCD_type(p_vcdinfo) == VCD_TYPE_SVCD > || vcdinfo_get_VCD_type(p_vcdinfo) == VCD_TYPE_HQVCD) > for (n = 0; n < 5; n++) >- fprintf (stdout, " volume start time[%d]: %d secs\n", >+ fprintf (stdout, " volume start time[%d]: %d secs\n", > n, uint16_from_be (info->playing_time[n])); > } > >@@ -588,9 +590,9 @@ > > num_entries = vcdinfo_get_num_entries(obj); > >- if (!gl.show.no.header) >- fprintf (stdout, >- (vcdinfo_get_VCD_type(obj) == VCD_TYPE_SVCD >+ if (!gl.show.no.header) >+ fprintf (stdout, >+ (vcdinfo_get_VCD_type(obj) == VCD_TYPE_SVCD > || vcdinfo_get_VCD_type(obj) == VCD_TYPE_HQVCD) > ? "SVCD/ENTRIES.SVD\n" > : "VCD/ENTRIES.VCD\n"); >@@ -602,7 +604,7 @@ > else > vcd_warn ("unexpected ID signature encountered"); > >- if (gl.show.entries.id) >+ if (gl.show.entries.id) > fprintf (stdout, " ID: `%.8s'\n", entries->ID); > if (gl.show.entries.vers) > fprintf (stdout, " version: 0x%2.2x\n", entries->version); >@@ -612,7 +614,7 @@ > if (gl.show.entries.count) > fprintf (stdout, " entries: %d\n", num_entries); > >- if (gl.show.entries.data) >+ if (gl.show.entries.data) > for (n = 0; n < num_entries; n++) > { > const lsn_t lsn = vcdinfo_get_entry_lsn(obj, n); >@@ -630,9 +632,9 @@ > } > } > >-/* >+/* > Dump the track contents using information from TRACKS.SVCD. >- See also dump_tracks which gives similar information but doesn't >+ See also dump_tracks which gives similar information but doesn't > need TRACKS.SVCD > */ > static void >@@ -649,9 +651,9 @@ > > fprintf (stdout, " ID: `%.8s'\n", tracks->file_id); > fprintf (stdout, " version: 0x%2.2x\n", tracks->version); >- >+ > fprintf (stdout, " tracks: %d\n", tracks->tracks); >- >+ > for (j = 0; j < tracks->tracks; j++) > { > const char *video_types[] = >@@ -675,12 +677,12 @@ > }; > char *psz_msf = cdio_msf_to_str(&(tracks->playing_time[j])); > >- fprintf (stdout, >+ fprintf (stdout, > " track[%.2d]: %s," > " audio: %s, video: %s,\n" > " SVCD subtitle (OGT) stream: %s\n", > j, psz_msf, >- vcdinfo_audio_type2str(obj, >+ vcdinfo_audio_type2str(obj, > vcdinfo_get_track_audio_type(obj, j+1)), > video_types[tracks2->contents[j].video], > ogt_str[tracks2->contents[j].ogt]); >@@ -698,11 +700,11 @@ > tracks_v30->track[j].audio_info, > tracks_v30->track[j].ogt_info); > free(psz_msf); >- >+ > } > } > >-/* >+/* > Dump the track contents based on low-level CD datas. > See also dump_tracks which gives more information but requires > TRACKS.SVCD to exist on the medium. >@@ -723,12 +725,12 @@ > for (i = first_track_num; i <= CDIO_CDROM_LEADOUT_TRACK; i++) { > msf_t msf; > char *psz_msf; >- >+ > if (!cdio_get_track_msf(cdio, i, &msf)) { > vcd_error("Error getting information for track %i.\n", i); > continue; > } >- >+ > psz_msf = cdio_msf_to_str(&msf); > if (i == CDIO_CDROM_LEADOUT_TRACK) { > printf("%3d: %s %06u leadout\n", >@@ -741,7 +743,7 @@ > (int) i, psz_msf, > (unsigned int) cdio_msf_to_lsn(&msf), > track_format2str[cdio_get_track_format(cdio, i)]); >- >+ > } > free(psz_msf); > /* skip to leadout? */ >@@ -776,7 +778,7 @@ > const uint32_t lsn = cdio_msf_to_lsn(msf); > char *psz_msf; > >- if (!gl.debug_level >= 1 >+ if (!(gl.debug_level >= 1) > && n > PRINTED_POINTS > && n < scandata_count - PRINTED_POINTS) > continue; >@@ -787,7 +789,7 @@ > > free(psz_msf); > >- if (!gl.debug_level >= 1 >+ if (!(gl.debug_level >= 1) > && n == PRINTED_POINTS > && scandata_count > (PRINTED_POINTS * 2)) > fprintf (stdout, " [..skipping...]\n"); >@@ -795,16 +797,16 @@ > } > else if (_sd1->version == SCANDATA_VERSION_SVCD) > { >- const ScandataDat2_t *_sd2 = >+ const ScandataDat2_t *_sd2 = > (const void *) &_sd1->cum_playtimes[track_count]; > >- const ScandataDat3_t *_sd3 = >+ const ScandataDat3_t *_sd3 = > (const void *) &_sd2->spi_indexes[spi_count]; > >- const ScandataDat4_t *_sd4 = >+ const ScandataDat4_t *_sd4 = > (const void *) &_sd3->mpeg_track_offsets[track_count]; > >- const int scandata_ofs0 = >+ const int scandata_ofs0 = > __cd_offsetof (ScandataDat3_t, mpeg_track_offsets[track_count]) > - __cd_offsetof (ScandataDat3_t, mpeg_track_offsets); > >@@ -821,27 +823,27 @@ > fprintf (stdout, " cumulative_playingtime[%d]: %s\n", n, psz_msf); > free(psz_msf); > } >- >+ > for (n = 0; n < spi_count; n++) > { > const int _ofs = uint16_from_be (_sd2->spi_indexes[n]); > > fprintf (stdout, " segment scandata ofs[n]: %d\n", _ofs); > } >- >+ > fprintf (stdout, " sequence scandata ofs: %d\n", > uint16_from_be (_sd3->mpegtrack_start_index)); > > for (n = 0; n < track_count; n++) > { >- const int _ofs = >+ const int _ofs = > uint16_from_be (_sd3->mpeg_track_offsets[n].table_offset); > const int _toc = _sd3->mpeg_track_offsets[n].track_num; > > fprintf (stdout, " track [%d]: TOC num: %d, sd offset: %d\n", > n, _toc, _ofs); > } >- >+ > fprintf (stdout, " (scanpoint[0] offset = %d)\n", scandata_ofs0); > > for (n = 0; n < scandata_count; n++) >@@ -850,21 +852,21 @@ > const uint32_t lsn = cdio_msf_to_lsn(msf); > char *psz_msf = cdio_msf_to_str(msf); > >- if (!gl.debug_level >= 1 >+ if (!(gl.debug_level >= 1) > && n > PRINTED_POINTS > && n < scandata_count - PRINTED_POINTS) { > free(psz_msf); > continue; > } >- > >- fprintf (stdout, >+ >+ fprintf (stdout, > " scanpoint[%.4d] (ofs:%5d): LSN %lu (MSF %s)\n", >- n, scandata_ofs0 + (n * 3), (unsigned long int) lsn, >+ n, scandata_ofs0 + (n * 3), (unsigned long int) lsn, > psz_msf); > free(psz_msf); > >- if (!gl.debug_level >= 1 >+ if (!(gl.debug_level >= 1) > && n == PRINTED_POINTS > && scandata_count > (PRINTED_POINTS * 2)) > fprintf (stdout, " [..skipping...]\n"); >@@ -885,7 +887,7 @@ > fprintf (stdout, " ID: `%.8s'\n", searchdat->file_id); > fprintf (stdout, " version: 0x%2.2x\n", searchdat->version); > fprintf (stdout, " scanpoints: %u\n", (unsigned int) scan_points); >- fprintf (stdout, " scaninterval: %lu (in 0.5sec units -- must be `1')\n", >+ fprintf (stdout, " scaninterval: %lu (in 0.5sec units -- must be `1')\n", > (unsigned long int) searchdat->time_interval); > > for (m = 0; m < scan_points;m++) >@@ -895,11 +897,11 @@ > const uint32_t lsn = cdio_msf_to_lsn(msf); > char *psz_msf; > >- if (!gl.debug_level >= 1 >- && m > PRINTED_POINTS >+ if (!(gl.debug_level >= 1) >+ && m > PRINTED_POINTS > && m < (scan_points - PRINTED_POINTS)) > continue; >- >+ > psz_msf = cdio_msf_to_str(msf); > ss2 = m * searchdat->time_interval; > >@@ -912,8 +914,8 @@ > " sector: LSN %lu (MSF %s)\n", m, hh, mm, ss, ss2, > (unsigned long int) lsn, psz_msf); > free(psz_msf); >- >- if (!gl.debug_level >= 1 >+ >+ if (!(gl.debug_level >= 1) > && m == PRINTED_POINTS && scan_points > (PRINTED_POINTS * 2)) > fprintf (stdout, " [..skipping...]\n"); > } >@@ -928,14 +930,14 @@ > CdioListNode_t *entnode; > CdIo_t *cdio = vcdinfo_get_cd_image(obj); > >- entlist = iso9660_fs_readdir (cdio, pathname, true); >- >+ entlist = iso9660_fs_readdir (cdio, pathname); >+ > fprintf (stdout, " %s:\n", pathname); > > vcd_assert (entlist != NULL); > > /* just iterate */ >- >+ > _CDIO_LIST_FOREACH (entnode, entlist) > { > iso9660_stat_t *statbuf = _cdio_list_node_data (entnode); >@@ -943,15 +945,15 @@ > char _fullname[4096] = { 0, }; > > snprintf (_fullname, sizeof (_fullname), "%s%s", pathname, _name); >- >+ > strncat (_fullname, "/", sizeof (_fullname)-strlen(_fullname)-1); > > if (statbuf->type == _STAT_DIR >- && strcmp (_name, ".") >+ && strcmp (_name, ".") > && strcmp (_name, "..")) > _cdio_list_append (dirlist, strdup (_fullname)); > >- fprintf (stdout, >+ fprintf (stdout, > " %c %s %d %d [fn %.2d] [LSN %6lu] ", > (statbuf->type == _STAT_DIR) ? 'd' : '-', > iso9660_get_xa_attr_str (statbuf->xa.attributes), >@@ -971,7 +973,7 @@ > > } > >- _cdio_list_free (entlist, true); >+ _cdio_list_free (entlist, true, NULL); > > fprintf (stdout, "\n"); > >@@ -984,7 +986,7 @@ > _dump_fs_recurse (obj, _fullname); > } > >- _cdio_list_free (dirlist, true); >+ _cdio_list_free (dirlist, true, NULL); > } > > static void >@@ -994,7 +996,7 @@ > const lsn_t extent = iso9660_get_root_lsn(pvd); > > fprintf (stdout, "ISO9660 filesystem dump\n"); >- fprintf (stdout, " root directory in PVD set to LSN %lu\n\n", >+ fprintf (stdout, " root directory in PVD set to LSN %lu\n\n", > (unsigned long int) extent); > > _dump_fs_recurse (obj, "/"); >@@ -1008,14 +1010,14 @@ > if (!gl.show.no.header) > fprintf (stdout, "ISO9660 primary volume descriptor\n"); > >- >+ > if (iso9660_get_pvd_type(pvd) != ISO_VD_PRIMARY) > vcd_warn ("unexpected descriptor type"); > >- if (strncmp (iso9660_get_pvd_id(pvd), ISO_STANDARD_ID, >+ if (strncmp (iso9660_get_pvd_id(pvd), ISO_STANDARD_ID, > strlen (ISO_STANDARD_ID))) > vcd_warn ("unexpected ID encountered (expected `" ISO_STANDARD_ID "'"); >- >+ > if (gl.show.pvd.id) > fprintf (stdout, " ID: `%.5s'\n", iso9660_get_pvd_id(pvd)); > >@@ -1027,7 +1029,7 @@ > fprintf (stdout, " system id: `%s'\n", psz); > free(psz); > } >- >+ > > if (gl.show.pvd.vol) > fprintf (stdout, " volume id: `%s'\n", >@@ -1054,14 +1056,14 @@ > fprintf (stdout, " application id: `%s'\n", psz); > free(psz); > } >- >+ > if (gl.show.pvd.iso) >- fprintf (stdout, " ISO size: %d blocks (logical blocksize: %d bytes)\n", >- iso9660_get_pvd_space_size(pvd), >+ fprintf (stdout, " ISO size: %d blocks (logical blocksize: %d bytes)\n", >+ iso9660_get_pvd_space_size(pvd), > iso9660_get_pvd_block_size(pvd)); > >- if (gl.show.pvd.xa) >- fprintf (stdout, " XA marker present: %s\n", >+ if (gl.show.pvd.xa) >+ fprintf (stdout, " XA marker present: %s\n", > _vcd_bool_str (vcdinfo_has_xa(p_vcdinfo))); > } > >@@ -1071,34 +1073,34 @@ > CdIo_t *p_cdio; > > if (!p_vcdinfo) return; >- >+ > p_cdio = vcdinfo_get_cd_image(p_vcdinfo); > >- if (gl.show.pvd.any) >+ if (gl.show.pvd.any) > { > if (!gl.show.no.delimiter) fprintf (stdout, DELIM); > dump_pvd (p_vcdinfo); > } >- >- if (gl.show.fs) >+ >+ if (gl.show.fs) > { > if (!gl.show.no.delimiter) fprintf (stdout, DELIM); > dump_fs (p_vcdinfo); > } > >- if (gl.show.info.any) >+ if (gl.show.info.any) > { > if (!gl.show.no.delimiter) fprintf (stdout, DELIM); > dump_info (p_vcdinfo); > } >- >- if (gl.show.entries.any) >+ >+ if (gl.show.entries.any) > { > if (!gl.show.no.delimiter) fprintf (stdout, DELIM); > dump_entries (p_vcdinfo); > } > >- if (gl.show.psd) >+ if (gl.show.psd) > { > if (vcdinfo_get_psd_size (p_vcdinfo)) > { >@@ -1108,15 +1110,15 @@ > if (!gl.show.no.delimiter) fprintf (stdout, DELIM); > dump_lot (p_vcdinfo, false); > } >- >+ > if (!gl.show.no.delimiter) fprintf (stdout, DELIM); > dump_psd (p_vcdinfo, false); > } >- >+ > if (vcdinfo_get_psd_x_size(p_vcdinfo) && ! gl.no_ext_psd_flag ) > { > vcdinfo_visit_lot (p_vcdinfo, true); >- if (gl.show.lot) >+ if (gl.show.lot) > { > if (!gl.show.no.delimiter) fprintf (stdout, DELIM); > dump_lot (p_vcdinfo, true); >@@ -1126,18 +1128,18 @@ > } > } > >- if (gl.show.tracks) >+ if (gl.show.tracks) > { > if (vcdinfo_get_tracksSVD(p_vcdinfo)) > { > if (!gl.show.no.delimiter) fprintf (stdout, DELIM); > dump_tracks_svd (p_vcdinfo); >- } >+ } > if (!gl.show.no.delimiter) fprintf (stdout, DELIM); > dump_tracks (p_cdio); > } >- >- if (gl.show.search) >+ >+ if (gl.show.search) > { > if (vcdinfo_get_searchDat(p_vcdinfo)) > { >@@ -1145,16 +1147,16 @@ > dump_search_dat (p_vcdinfo); > } > } >- > >- if (gl.show.scandata) >+ >+ if (gl.show.scandata) > { > if (vcdinfo_get_scandata(p_vcdinfo)) > { > if (!gl.show.no.delimiter) fprintf (stdout, DELIM); > dump_scandata_dat (p_vcdinfo); > } >- >+ > } > if (!gl.show.no.delimiter) fprintf (stdout, DELIM); > >@@ -1168,7 +1170,7 @@ > CdIo_t *p_cdio; > iso9660_stat_t *p_statbuf; > vcdinfo_open_return_t open_rc; >- >+ > if (!gl.show.no.banner) > { > if (!gl.show.no.delimiter) >@@ -1201,7 +1203,7 @@ > > size = cdio_get_disc_last_lsn (p_cdio); > >- if (gl.show.source) >+ if (gl.show.source) > { > if (NULL == *image_fname) { > *image_fname = vcdinfo_get_default_device(obj); >@@ -1211,10 +1213,10 @@ > } > fprintf (stdout, "Image size: %d sectors\n", size); > } >- >+ > if (open_rc == VCDINFO_OPEN_OTHER) { > vcd_warn ("Medium is not VCD image"); >- if (gl.show.fs) >+ if (gl.show.fs) > { > if (vcdinfo_has_xa(obj)) > { >@@ -1246,10 +1248,10 @@ > if (vcdinfo_read_psd (obj)) > { > /* ISO9660 crosscheck */ >- p_statbuf = iso9660_fs_stat (p_cdio, >- ((vcdinfo_get_VCD_type(obj) == VCD_TYPE_SVCD >+ p_statbuf = iso9660_fs_stat (p_cdio, >+ ((vcdinfo_get_VCD_type(obj) == VCD_TYPE_SVCD > || vcdinfo_get_VCD_type(obj) == VCD_TYPE_HQVCD) >- ? "/SVCD/PSD.SVD;1" >+ ? "/SVCD/PSD.SVD;1" > : "/VCD/PSD.VCD;1")); > if (!p_statbuf) > vcd_warn ("no PSD file entry found in ISO9660 fs"); >@@ -1260,13 +1262,13 @@ > vcd_warn ("psd file entry in ISO9660 not at fixed LSN"); > free(p_statbuf); > } >- >+ > } > > dump_all (obj); > vcdinfo_close(obj); > return; >- >+ > err_exit: > poptFreeContext(optCon); > exit (EXIT_FAILURE); >@@ -1275,18 +1277,18 @@ > static vcd_log_handler_t gl_default_vcd_log_handler = NULL; > static cdio_log_handler_t gl_default_cdio_log_handler = NULL; > >-static void >+static void > _vcd_log_handler (vcd_log_level_t level, const char message[]) > { >- if (level == VCD_LOG_DEBUG && !gl.debug_level >= 1) >+ if (level == VCD_LOG_DEBUG && !(gl.debug_level >= 1)) > return; > > if (level == VCD_LOG_INFO && gl.quiet_flag) > return; >- >+ > if (level == VCD_LOG_WARN && gl.suppress_warnings) > return; >- >+ > gl_default_vcd_log_handler (level, message); > } > >@@ -1302,14 +1304,14 @@ > OP_SOURCE_SECTOR_2336, > > /* These are the remaining configuration options */ >- OP_VERSION, OP_ENTRIES, OP_INFO, OP_PVD, OP_SHOW, >+ OP_VERSION, OP_ENTRIES, OP_INFO, OP_PVD, OP_SHOW, > OP_ACCESS_MODE > > }; > > /* Initialize global variables. */ >-static void >-init() >+static void >+init() > { > gl.debug_level = 0; > gl.quiet_flag = false; >@@ -1334,23 +1336,23 @@ > > /* Comparison function called by bearch() to find sub-option record. */ > static int >-compare_subopts(const void *key1, const void *key2) >+compare_subopts(const void *key1, const void *key2) > { > subopt_entry_t *a = (subopt_entry_t *) key1; > subopt_entry_t *b = (subopt_entry_t *) key2; > return (strncmp(a->name, b->name, 30)); > } > >-/* Do processing of a --show-xxx sub option. >+/* Do processing of a --show-xxx sub option. > Basically we find the option in the array, set it's corresponding >- flag variable to true as well as the "show.all" false. >+ flag variable to true as well as the "show.all" false. > */ > static void > process_suboption(const char *subopt, subopt_entry_t *sublist, const int num, >- const char *subopt_name, int *any_flag) >+ const char *subopt_name, int *any_flag) > { >- subopt_entry_t *subopt_rec = >- bsearch(subopt, sublist, num, sizeof(subopt_entry_t), >+ subopt_entry_t *subopt_rec = >+ bsearch(subopt, sublist, num, sizeof(subopt_entry_t), > &compare_subopts); > if (subopt_rec != NULL) { > if (strcmp(subopt_name, "help") != 0) { >@@ -1363,10 +1365,10 @@ > unsigned int i; > bool is_help=strcmp(subopt, "help")==0; > if (is_help) { >- fprintf (stderr, "The list of sub options for \"%s\" are:\n", >+ fprintf (stderr, "The list of sub options for \"%s\" are:\n", > subopt_name); > } else { >- fprintf (stderr, "Invalid option following \"%s\": %s.\n", >+ fprintf (stderr, "Invalid option following \"%s\": %s.\n", > subopt_name, subopt); > fprintf (stderr, "Should be one of: "); > } >@@ -1393,98 +1395,98 @@ > /* Command-line options */ > struct poptOption optionsTable[] = { > >- {"access-mode", 'a', >- POPT_ARG_STRING, &gl.access_mode, >+ {"access-mode", 'a', >+ POPT_ARG_STRING, &gl.access_mode, > OP_ACCESS_MODE, > "set CD-ROM access mode (IOCTL, READ_10, READ_CD)", "ACCESS"}, > >- {"bin-file", 'b', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, >+ {"bin-file", 'b', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, > OP_SOURCE_BINCUE, "set \"bin\" CD-ROM disk image file as source", "FILE"}, > >- {"cue-file", 'c', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, >+ {"cue-file", 'c', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, > OP_SOURCE_BINCUE, "set \"cue\" CD-ROM disk image file as source", "FILE"}, > >- {"nrg-file", 'N', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, >+ {"nrg-file", 'N', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, > OP_SOURCE_NRG, "set Nero CD-ROM disk image file as source", "FILE"}, > >- {"toc-file", '\0', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, >+ {"toc-file", '\0', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, > OP_SOURCE_CDRDAO, "set \"toc\" CD-ROM disk image file as source", "FILE"}, > >- {"input", 'i', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, >+ {"input", 'i', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, > OP_SOURCE_UNDEF, > "set source and determine if \"bin\" image or device", "FILE"}, > > {"no-ext-psd", '\0', POPT_ARG_NONE, &gl.no_ext_psd_flag, 0, > "ignore information in /EXT/PSD_X.VCD"}, > >- {"sector-2336", '\0', >- POPT_ARG_NONE, §or_2336_flag, >+ {"sector-2336", '\0', >+ POPT_ARG_NONE, §or_2336_flag, > OP_SOURCE_SECTOR_2336, > "use 2336 byte sector mode for image file"}, > >- {"cdrom-device", 'C', >- POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, >+ {"cdrom-device", 'C', >+ POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, > OP_SOURCE_DEVICE, > "set CD-ROM device as source", "DEVICE"}, > >- {"debug", 'd', POPT_ARG_INT, &gl.debug_level, 0, >+ {"debug", 'd', POPT_ARG_INT, &gl.debug_level, 0, > "Set debugging output to LEVEL"}, > >- {"terse", 't', POPT_ARG_NONE, &terse_flag, 0, >+ {"terse", 't', POPT_ARG_NONE, &terse_flag, 0, > "same as --no-header --no-banner --no-delimiter"}, > > {"no-banner", 'B', POPT_ARG_NONE, &gl.show.no.banner, 0, > "do not show program banner header and RCS version string"}, >- >+ > {"no-delimiter", 'D', POPT_ARG_NONE, &gl.show.no.delimiter, 0, > "do not show delimiter lines around various sections of output"}, >- >+ > {"no-header", 'H', POPT_ARG_NONE, &gl.show.no.header, 0, > "do not show section header titles"}, >- >- {"show-entries", '\0', POPT_ARG_STRING, &opt_arg, OP_ENTRIES, >+ >+ {"show-entries", '\0', POPT_ARG_STRING, &opt_arg, OP_ENTRIES, > "show specific entry of the ENTRIES section "}, >- >- {"show-entries-all", 'E', POPT_ARG_NONE, &gl.show.entries.all, OP_SHOW, >+ >+ {"show-entries-all", 'E', POPT_ARG_NONE, &gl.show.entries.all, OP_SHOW, > "show ENTRIES section"}, >- >- {"show-filesystem", 'F', POPT_ARG_NONE, &gl.show.fs, OP_SHOW, >+ >+ {"show-filesystem", 'F', POPT_ARG_NONE, &gl.show.fs, OP_SHOW, > "show filesystem info"}, >- >- {"show-info", '\0', POPT_ARG_STRING, &opt_arg, OP_INFO, >+ >+ {"show-info", '\0', POPT_ARG_STRING, &opt_arg, OP_INFO, > "show specific entry of the INFO section "}, >- >- {"show-info-all", 'I', POPT_ARG_NONE, &gl.show.info.all, OP_SHOW, >+ >+ {"show-info-all", 'I', POPT_ARG_NONE, &gl.show.info.all, OP_SHOW, > "show INFO section"}, >- >- {"show-lot", 'L', POPT_ARG_NONE, &gl.show.lot, OP_SHOW, >+ >+ {"show-lot", 'L', POPT_ARG_NONE, &gl.show.lot, OP_SHOW, > "show LOT section"}, >- >- {"show-psd", 'p', POPT_ARG_NONE, &gl.show.psd, OP_SHOW, >+ >+ {"show-psd", 'p', POPT_ARG_NONE, &gl.show.psd, OP_SHOW, > "show PSD section(s)"}, >- >- {"show-pvd-all", 'P', POPT_ARG_NONE, &gl.show.pvd.all, OP_SHOW, >+ >+ {"show-pvd-all", 'P', POPT_ARG_NONE, &gl.show.pvd.all, OP_SHOW, > "show PVD section(s)"}, >- >- {"show-pvd", '\0', POPT_ARG_STRING, &opt_arg, OP_PVD, >+ >+ {"show-pvd", '\0', POPT_ARG_STRING, &opt_arg, OP_PVD, > "show a specific entry of the Primary Volume Descriptor (PVD) section"}, >- >- {"show-scandata", 's', POPT_ARG_NONE, &gl.show.scandata, OP_SHOW, >+ >+ {"show-scandata", 's', POPT_ARG_NONE, &gl.show.scandata, OP_SHOW, > "show scan data"}, > >- {"show-search", 'X', POPT_ARG_NONE, &gl.show.search, OP_SHOW, >+ {"show-search", 'X', POPT_ARG_NONE, &gl.show.search, OP_SHOW, > "show search data"}, > >- {"show-source", 'S', POPT_ARG_NONE, &gl.show.source, OP_SHOW, >+ {"show-source", 'S', POPT_ARG_NONE, &gl.show.source, OP_SHOW, > "show source image filename and size"}, > >- {"show-tracks", 'T', POPT_ARG_NONE, &gl.show.tracks, OP_SHOW, >+ {"show-tracks", 'T', POPT_ARG_NONE, &gl.show.tracks, OP_SHOW, > "show tracks"}, > >- {"show-format", 'f', POPT_ARG_NONE, &gl.show.format, OP_SHOW, >+ {"show-format", 'f', POPT_ARG_NONE, &gl.show.format, OP_SHOW, > "show VCD format (VCD 1.1, VCD 2.0, SVCD, ...)"}, >- >- {"quiet", 'q', POPT_ARG_NONE, &gl.quiet_flag, 0, >+ >+ {"quiet", 'q', POPT_ARG_NONE, &gl.quiet_flag, 0, > "show only critical messages"}, > > {"version", 'V', POPT_ARG_NONE, NULL, OP_VERSION, >@@ -1550,21 +1552,21 @@ > { > case OP_ENTRIES: > { >- process_suboption(opt_arg, entries_sublist, >+ process_suboption(opt_arg, entries_sublist, > sizeof(entries_sublist) / sizeof(subopt_entry_t), > "--show-entries", &gl.show.entries.any); > break; > } > case OP_INFO: > { >- process_suboption(opt_arg, info_sublist, >+ process_suboption(opt_arg, info_sublist, > sizeof(info_sublist) / sizeof(subopt_entry_t), > "--show-info", &gl.show.info.any); > break; > } > case OP_PVD: > { >- process_suboption(opt_arg, pvd_sublist, >+ process_suboption(opt_arg, pvd_sublist, > sizeof(pvd_sublist) / sizeof(subopt_entry_t), > "--show-pvd", &gl.show.pvd.any); > break; >@@ -1584,10 +1586,10 @@ > break; > > case OP_SOURCE_UNDEF: >- case OP_SOURCE_BINCUE: >- case OP_SOURCE_CDRDAO: >- case OP_SOURCE_NRG: >- case OP_SOURCE_DEVICE: >+ case OP_SOURCE_BINCUE: >+ case OP_SOURCE_CDRDAO: >+ case OP_SOURCE_NRG: >+ case OP_SOURCE_DEVICE: > case OP_SOURCE_SECTOR_2336: > { > /* Check that we didn't speciy both DEVICE and SECTOR */ >@@ -1601,24 +1603,24 @@ > case OP_SOURCE_BINCUE: > /* Going from 2352 (default) to 2336 is okay. */ > okay = OP_SOURCE_SECTOR_2336 == opt; >- if (okay) >+ if (okay) > gl.source_type = OP_SOURCE_SECTOR_2336; > break; > case OP_SOURCE_SECTOR_2336: >- /* Make sure a we didn't do a second device. FIX: >+ /* Make sure a we didn't do a second device. FIX: > This also allows two -bin options if we had -2336 in the middle > */ > okay = OP_SOURCE_DEVICE != opt; > break; >- case OP_SOURCE_NRG: >- case OP_SOURCE_CDRDAO: >+ case OP_SOURCE_NRG: >+ case OP_SOURCE_CDRDAO: > case OP_SOURCE_DEVICE: > /* This case is implied, but we'll make it explicit anyway. */ > okay = false; > break; > } > >- if (!okay) >+ if (!okay) > { > fprintf (stderr, "only one source allowed! - try --help\n"); > poptFreeContext(optCon); >@@ -1628,7 +1630,7 @@ > } > > default: >- fprintf (stderr, "%s: %s\n", >+ fprintf (stderr, "%s: %s\n", > poptBadOption(optCon, POPT_BADOPTION_NOALIAS), > poptStrerror(opt)); > fprintf (stderr, "error while parsing command line - try --help\n"); >@@ -1645,13 +1647,13 @@ > } > > if (source_name) { >- fprintf ( stderr, >+ fprintf ( stderr, > "source file specified as an option and without " > " - try --help\n"); > poptFreeContext(optCon); > exit (EXIT_FAILURE); > } >- >+ > source_name = strdup(args[0]); > gl.source_type = OP_SOURCE_UNDEF; > } >@@ -1666,26 +1668,26 @@ > > /* Handle massive show flag reversals below. */ > if (gl.show.all) { >- gl.show.entries.all = gl.show.pvd.all = gl.show.info.all >+ gl.show.entries.all = gl.show.pvd.all = gl.show.info.all > = gl.show.format = gl.show.fs = gl.show.lot = gl.show.psd >- = gl.show.scandata = gl.show.scandata = gl.show.search = gl.show.source >+ = gl.show.scandata = gl.show.scandata = gl.show.search = gl.show.source > = gl.show.tracks = true; >- } >+ } > >- if (gl.show.entries.all) >+ if (gl.show.entries.all) > memset(&gl.show.entries, true, sizeof(gl.show.entries)); >- >- if (gl.show.pvd.all) >+ >+ if (gl.show.pvd.all) > memset(&gl.show.pvd, true, sizeof(gl.show.pvd)); >- >- if (gl.show.info.all) >+ >+ if (gl.show.info.all) > memset(&gl.show.info, true, sizeof(gl.show.info)); >- >- if (terse_flag) >+ >+ if (terse_flag) > memset(&gl.show.no, true, sizeof(gl.show.no)); >- >+ > gl_default_vcd_log_handler = vcd_log_set_handler (_vcd_log_handler); >- gl_default_cdio_log_handler = >+ gl_default_cdio_log_handler = > cdio_log_set_handler ( (cdio_log_handler_t) _vcd_log_handler); > > dump (&source_name); >@@ -1694,8 +1696,8 @@ > poptFreeContext(optCon); > return EXIT_SUCCESS; > } >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/frontends/xml/vcd_xml_build.c vcdimager-0.7.24/frontends/xml/vcd_xml_build.c >--- vcdimager-0.7.24.ORIG/frontends/xml/vcd_xml_build.c 2011-03-17 22:26:34.000000000 +0100 >+++ vcdimager-0.7.24/frontends/xml/vcd_xml_build.c 2018-01-02 17:30:49.840606783 +0100 >@@ -7,7 +7,7 @@ > it under the terms of the GNU General Public License as published by > the Free Software Foundation; either version 2 of the License, or > (at your option) any later version. >- >+ > This program is distributed in the hope that it will be useful, > but WITHOUT ANY WARRANTY; without even the implied warranty of > MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >@@ -27,8 +27,15 @@ > #include <string.h> > #include <errno.h> > >+#ifdef HAVE_TIME_H >+#define __USE_XOPEN >+#include <time.h> >+#endif >+ > #include <popt.h> > >+/* We don't want to pull in cdio's config */ >+#define __CDIO_CONFIG_H__ > #include <libxml/parserInternals.h> > #include <libxml/parser.h> > #include <libxml/valid.h> >@@ -60,7 +67,7 @@ > _init_done = true; > > xmlKeepBlanksDefaultValue = false; >- xmlIndentTreeOutput = true; >+ xmlIndentTreeOutput = true; > > vcd_xml_dtd_init (); > } >@@ -83,12 +90,12 @@ > /* assert (_init_done == true); */ > > ctxt = xmlCreateFileParserCtxt (filename); >- >+ > if (!ctxt) > return NULL; > > /* ctxt->keepBlanks = false; */ >- ctxt->pedantic = true; >+ ctxt->pedantic = true; > ctxt->validate = true; > > if (ctxt->sax) >@@ -102,10 +109,10 @@ > > ctxt->vctxt.nodeMax = 0; > >- if (!ctxt->directory >+ if (!ctxt->directory > && (directory = xmlParserGetDirectory(filename))) > ctxt->directory = (char *) xmlStrdup((xmlChar *) directory); >- >+ > xmlParseDocument(ctxt); > > if (ctxt->wellFormed && ctxt->valid) >@@ -117,7 +124,7 @@ > } > > xmlFreeParserCtxt(ctxt); >- >+ > return(ret); > } > >@@ -171,7 +178,7 @@ > { > const char **args = NULL; > int n, opt = 0; >- enum { >+ enum { > CL_VERSION = 1, > CL_IMG_TYPE, > CL_IMG_OPT, >@@ -183,7 +190,7 @@ > CL_DUMP_DTD > }; > poptContext optCon = NULL; >- struct poptOption optionsTable[] = >+ struct poptOption optionsTable[] = > { > {"image-type", 'i', POPT_ARG_STRING, NULL, CL_IMG_TYPE, > "specify image type for output (default: '" DEFAULT_IMG_TYPE "')", >@@ -195,7 +202,7 @@ > {"cue-file", 'c', POPT_ARG_STRING, NULL, CL_CUE_FILE, > "specify cue file for output (default: '" DEFAULT_CUE_FILE "')", > "FILE"}, >- >+ > {"bin-file", 'b', POPT_ARG_STRING, NULL, CL_BIN_FILE, > "specify bin file for output (default: '" DEFAULT_BIN_FILE "')", > "FILE"}, >@@ -212,25 +219,25 @@ > {"create-time", 'T', POPT_ARG_STRING, &gl.create_timestr, 0, > "specify creation date on files in CD image (default: current date)"}, > >- {"progress", 'p', POPT_ARG_NONE, &gl.progress_flag, 0, >- "show progress"}, >+ {"progress", 'p', POPT_ARG_NONE, &gl.progress_flag, 0, >+ "show progress"}, > > {"dump-dtd", '\0', POPT_ARG_NONE, NULL, CL_DUMP_DTD, > "dump internal DTD to stdout"}, > >- {"check", '\0', POPT_ARG_NONE | POPT_ARGFLAG_DOC_HIDDEN, >+ {"check", '\0', POPT_ARG_NONE | POPT_ARGFLAG_DOC_HIDDEN, > &gl.check_flag, 0, "enable check mode (undocumented)"}, > > {"file-prefix", '\0', POPT_ARG_STRING | POPT_ARGFLAG_DOC_HIDDEN, >- &gl.file_prefix, 0, "add prefix string to all filenames (undocumented)"}, >+ &gl.file_prefix, 0, "add prefix string to all filenames (undocumented)"}, > > { "filename-encoding", '\0', POPT_ARG_STRING, &vcd_xml_filename_charset, 0, > "use given charset encoding for filenames instead of UTF8" }, > >- {"verbose", 'v', POPT_ARG_NONE, &gl.verbose_flag, 0, >+ {"verbose", 'v', POPT_ARG_NONE, &gl.verbose_flag, 0, > "be verbose"}, >- >- {"quiet", 'q', POPT_ARG_NONE, &gl.quiet_flag, 0, >+ >+ {"quiet", 'q', POPT_ARG_NONE, &gl.quiet_flag, 0, > "show only critical messages"}, > > {"gui", '\0', POPT_ARG_NONE, &gl.gui_flag, 0, "enable GUI mode"}, >@@ -238,7 +245,7 @@ > {"version", 'V', POPT_ARG_NONE, NULL, CL_VERSION, > "display version and copyright information and exit"}, > >- POPT_AUTOHELP >+ POPT_AUTOHELP > > {NULL, 0, 0, NULL, 0} > }; >@@ -246,8 +253,8 @@ > optCon = poptGetContext ("vcdimager", argc, argv, optionsTable, 0); > poptSetOtherOptionHelp (optCon, "[OPTION...] <xml-control-file>"); > >- if (poptReadDefaultConfig (optCon, 0)) >- fprintf (stderr, "warning, reading popt configuration failed\n"); >+ if (poptReadDefaultConfig (optCon, 0)) >+ fprintf (stderr, "warning, reading popt configuration failed\n"); > > while ((opt = poptGetNextOpt (optCon)) != -1) > switch (opt) >@@ -302,7 +309,7 @@ > > case CL_IMG_TYPE: > opt_arg = poptGetOptArg (optCon); >- >+ > if (!strcmp (opt_arg, "bincue")) > gl.img_type = IMG_TYPE_BINCUE; > else if (!strcmp (opt_arg, "cdrdao")) >@@ -317,9 +324,9 @@ > { > char buf[1024] = { 0, }, *buf2; > opt_arg = poptGetOptArg (optCon); >- >+ > strncpy (buf, opt_arg, sizeof (buf)); >- >+ > if ((buf2 = strchr (buf, '='))) > { > *buf2 = '\0'; >@@ -337,7 +344,7 @@ > > if (gl.verbose_flag && gl.quiet_flag) > vcd_error ("I can't be both, quiet and verbose... either one or another ;-)"); >- >+ > if ((args = poptGetArgs (optCon)) == NULL) > vcd_error ("xml input file argument missing -- try --help"); > >@@ -380,23 +387,23 @@ > _CDIO_LIST_FOREACH (node, gl.img_options) > { > struct key_val_t *_cons = _cdio_list_node_data (node); >- >+ > if (vcd_image_sink_set_arg (image_sink, _cons->key, _cons->val)) >- vcd_error ("error while setting image option '%s' (key='%s')", >+ vcd_error ("error while setting image option '%s' (key='%s')", > _cons->key, _cons->val); > } >- >+ > return image_sink; > } > >-int >+int > main (int argc, const char *argv[]) > { > time_t create_time; > xmlDocPtr vcd_doc; > > memset(&gl, 0, sizeof(gl)); >- >+ > vcd_xml_progname = "vcdxbuild"; > > _init_xml (); >@@ -449,13 +456,13 @@ > VcdImageSink_t *image_sink; > > vcd_xml_init (&vcdxml); >- >+ > if (!(root = xmlDocGetRootElement (vcd_doc))) > vcd_error ("XML document seems to be empty (no root node found)"); > > if (!(ns = xmlSearchNsByHref (vcd_doc, root, (const xmlChar *) VIDEOCD_DTD_XMLNS))) > vcd_error ("Namespace not found in document"); >- >+ > if (vcd_xml_parse (&vcdxml, vcd_doc, root, ns)) > vcd_error ("parsing tree failed"); > >@@ -466,43 +473,43 @@ > } > > vcdxml.file_prefix = gl.file_prefix; >- >+ > create_time = time(NULL); > if (gl.create_timestr != NULL) { >- if (!strcmp (gl.create_timestr, "TESTING")) >+ if (!strcmp (gl.create_timestr, "TESTING")) > create_time = 269236800L; > else { > #ifdef HAVE_STRPTIME > struct tm tm; >- >+ > if (NULL == strptime(gl.create_timestr, "%Y-%m-%d %H:%M:%S", &tm)) { >- vcd_warn("Trouble converting date string %s using strptime.", >+ vcd_warn("Trouble converting date string %s using strptime.", > gl.create_timestr); > vcd_warn("String should match %%Y-%%m-%%d %%H:%%M:%%S"); > } else { > create_time = mktime(&tm); > } >-#else >+#else > create_time = 269236800L; > #endif > } > } >- >+ > if (vcd_xml_master (&vcdxml, image_sink, &create_time)) { > vcd_warn ("building videocd failed"); > goto err_exit; > } >- >- >+ >+ > vcd_xml_destroy(&vcdxml); >- } >+ } > > xmlFreeDoc (vcd_doc); > free(gl.xml_fname); >- _cdio_list_free (gl.img_options, true); >+ _cdio_list_free (gl.img_options, true, NULL); > return EXIT_SUCCESS; >- err_exit: >+ err_exit: > free(gl.xml_fname); >- _cdio_list_free (gl.img_options, true); >+ _cdio_list_free (gl.img_options, true, NULL); > return EXIT_FAILURE; > } >diff -ur vcdimager-0.7.24.ORIG/frontends/xml/vcd_xml_common.c vcdimager-0.7.24/frontends/xml/vcd_xml_common.c >--- vcdimager-0.7.24.ORIG/frontends/xml/vcd_xml_common.c 2005-02-09 09:50:31.000000000 +0100 >+++ vcdimager-0.7.24/frontends/xml/vcd_xml_common.c 2018-01-02 17:31:01.132606161 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >@@ -25,6 +25,9 @@ > #include <stdio.h> > #include <stdlib.h> > >+/* We don't want to pull in cdio's config */ >+#define __CDIO_CONFIG_H__ >+ > /* Private includes */ > #include "vcd_assert.h" > #include "vcd.h" >@@ -48,7 +51,7 @@ > > static vcd_log_handler_t __default_vcd_log_handler = 0; > >-static void >+static void > _vcd_xml_log_handler (vcd_log_level_t level, const char message[]) > { > >@@ -96,7 +99,7 @@ > __default_vcd_log_handler = vcd_log_set_handler (_vcd_xml_log_handler); > } > >-int >+int > vcd_xml_scan_progress_cb (const vcd_mpeg_prog_info_t *info, void *user_data) > { > const bool _last = info->current_pos == info->length; >@@ -133,7 +136,7 @@ > > if (!vcd_xml_show_progress) > return 0; >- >+ > if (vcd_xml_gui_mode) > fprintf (stdout, "<progress operation=\"extract\" id=\"%s\" position=\"%ld\" size=\"%ld\" />\n", > (char *) user_data, info->done, info->total); >@@ -142,7 +145,7 @@ > fprintf (stdout, "#extract[%s]: %ld/%ld (%2.0f%%) \r", > (char *) user_data, info->done, info->total, > (double) info->done / info->total * 100); >- >+ > if (_last) > { > fflush (stdout); >@@ -173,7 +176,7 @@ > info->in_track, info->total_tracks, info->sectors_written, > info->total_sectors, > (double) info->sectors_written / info->total_sectors * 100); >- >+ > if (_last) > { > fflush (stdout); >@@ -243,12 +246,12 @@ > > temp = size - 1; > if (from) { >- if (NULL != handler->output) >+ if (NULL != handler->output) > ret = handler->output (out, &out_size, (const unsigned char *) in, &temp); > else > return strdup(in); > } else { >- if (NULL != handler->input) >+ if (NULL != handler->input) > ret = handler->input (out, &out_size, (const unsigned char *) in, &temp); > else > return strdup(in); >diff -ur vcdimager-0.7.24.ORIG/frontends/xml/vcd_xml_common.h vcdimager-0.7.24/frontends/xml/vcd_xml_common.h >--- vcdimager-0.7.24.ORIG/frontends/xml/vcd_xml_common.h 2003-11-10 12:57:48.000000000 +0100 >+++ vcdimager-0.7.24/frontends/xml/vcd_xml_common.h 2018-01-02 16:27:31.277936068 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifndef __VCD_XML_COMMON_H__ > #define __VCD_XML_COMMON_H__ > >diff -ur vcdimager-0.7.24.ORIG/frontends/xml/vcd_xml_dtd.c vcdimager-0.7.24/frontends/xml/vcd_xml_dtd.c >--- vcdimager-0.7.24.ORIG/frontends/xml/vcd_xml_dtd.c 2003-11-10 12:57:48.000000000 +0100 >+++ vcdimager-0.7.24/frontends/xml/vcd_xml_dtd.c 2018-01-02 16:27:31.283936067 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >@@ -43,13 +43,13 @@ > > static xmlExternalEntityLoader _xmlExternalEntityLoaderDefault = 0; > >-static xmlParserInputPtr >-_xmlExternalEntityLoader (const char *sysid, const char *pubid, >+static xmlParserInputPtr >+_xmlExternalEntityLoader (const char *sysid, const char *pubid, > xmlParserCtxtPtr context) > { > vcd_assert (vcd_xml_dtd_loaded >= 0); > >- vcd_debug ("EEL sysid=[%s] pubid=[%s]", >+ vcd_debug ("EEL sysid=[%s] pubid=[%s]", > sysid ? sysid : "NULL", pubid ? pubid : "NULL"); > > if ((pubid && !strcmp (pubid, VIDEOCD_DTD_PUBID)) >@@ -57,30 +57,30 @@ > { > xmlParserInputBufferPtr _input_buf; > >- _input_buf = xmlParserInputBufferCreateMem (videocd_dtd, >+ _input_buf = xmlParserInputBufferCreateMem (videocd_dtd, > strlen (videocd_dtd), > XML_CHAR_ENCODING_8859_1); >- >+ > vcd_xml_dtd_loaded++; > >- return xmlNewIOInputStream (context, _input_buf, >+ return xmlNewIOInputStream (context, _input_buf, > XML_CHAR_ENCODING_8859_1); > } >- >+ > /* fprintf (stderr, "unsupported doctype (pubid: %s, sysid: %s) encountered\n", */ > /* pubid, sysid); */ >- >+ > /* exit (EXIT_FAILURE); */ > >- return _xmlExternalEntityLoaderDefault (sysid, pubid, context); >+ return _xmlExternalEntityLoaderDefault (sysid, pubid, context); > } > >-void >+void > vcd_xml_dtd_init (void) > { > vcd_assert (vcd_xml_dtd_loaded == -1); >- >- _xmlExternalEntityLoaderDefault = xmlGetExternalEntityLoader (); >+ >+ _xmlExternalEntityLoaderDefault = xmlGetExternalEntityLoader (); > xmlSetExternalEntityLoader (_xmlExternalEntityLoader); > > vcd_xml_dtd_loaded++; >diff -ur vcdimager-0.7.24.ORIG/frontends/xml/vcd_xml_dtd.h vcdimager-0.7.24/frontends/xml/vcd_xml_dtd.h >--- vcdimager-0.7.24.ORIG/frontends/xml/vcd_xml_dtd.h 2003-03-04 15:49:39.000000000 +0100 >+++ vcdimager-0.7.24/frontends/xml/vcd_xml_dtd.h 2018-01-02 16:27:31.283936067 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifndef __VCD_XML_DTD_H__ > #define __VCD_XML_DTD_H__ > >diff -ur vcdimager-0.7.24.ORIG/frontends/xml/vcd_xml_dump.c vcdimager-0.7.24/frontends/xml/vcd_xml_dump.c >--- vcdimager-0.7.24.ORIG/frontends/xml/vcd_xml_dump.c 2005-07-07 09:03:12.000000000 +0200 >+++ vcdimager-0.7.24/frontends/xml/vcd_xml_dump.c 2018-01-02 16:27:31.281936067 +0100 >@@ -18,7 +18,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >@@ -40,8 +40,8 @@ > > static const char _rcsid[] = "$Id: vcd_xml_dump.c,v 1.29 2005/07/07 07:03:12 rocky Exp $"; > >-static xmlNodePtr >-_get_node (xmlDocPtr doc, xmlNodePtr cur, xmlNsPtr ns, >+static xmlNodePtr >+_get_node (xmlDocPtr doc, xmlNodePtr cur, xmlNsPtr ns, > const char nodename[], bool folder) > { > xmlNodePtr n = NULL; >@@ -55,13 +55,13 @@ > continue; > > vcd_assert (!xmlStrcmp (n->children->name, (const xmlChar *) "name")); >- >+ > tmp = xmlNodeListGetString (doc, n->children->children, 1); >- >+ > if (!xmlStrcmp (tmp, (const xmlChar *) nodename)) > break; > } >- >+ > if (!n) > { > n = xmlNewNode (ns, _node_id); >@@ -84,7 +84,7 @@ > return n; > } > >-static xmlNodePtr >+static xmlNodePtr > _get_node_pathname (xmlDocPtr doc, xmlNodePtr cur, xmlNsPtr ns, const char pathname[], bool folder) > { > char *_dir, *c; >@@ -126,9 +126,9 @@ > > if (!pbc_id) > return; >- >+ > node = xmlNewChild (cur, ns, (const xmlChar *) tag_id, NULL); >- >+ > xmlSetProp (node, (const xmlChar *) "ref", (const xmlChar *) pbc_id); > > if (_area) >@@ -162,9 +162,9 @@ > xmlKeepBlanksDefault(0); > > doc = xmlNewDoc ((const xmlChar *) "1.0"); >- >- dtd = xmlNewDtd (doc, (const xmlChar *) "videocd", >- (const xmlChar *) VIDEOCD_DTD_PUBID, >+ >+ dtd = xmlNewDtd (doc, (const xmlChar *) "videocd", >+ (const xmlChar *) VIDEOCD_DTD_PUBID, > (const xmlChar *) VIDEOCD_DTD_SYSID); > xmlAddChild ((xmlNodePtr) doc, (xmlNodePtr) dtd); > >@@ -177,7 +177,7 @@ > ns = xmlNewNs (vcd_node, (const xmlChar *) VIDEOCD_DTD_XMLNS, NULL); > xmlSetNs (vcd_node, ns); > >- switch (obj->vcd_type) >+ switch (obj->vcd_type) > { > case VCD_TYPE_VCD: > xmlSetProp (vcd_node, (const xmlChar *) "class", (const xmlChar *) "vcd"); >@@ -214,7 +214,7 @@ > _CDIO_LIST_FOREACH (node, obj->option_list) > { > struct option_t *_option = _cdio_list_node_data (node); >- >+ > section = xmlNewChild (vcd_node, ns, (const xmlChar *) "option", NULL); > xmlSetProp (section, (const xmlChar *) "name", (const xmlChar *) _option->name); > xmlSetProp (section, (const xmlChar *) "value", (const xmlChar *) _option->value); >@@ -225,7 +225,7 @@ > section = xmlNewChild (vcd_node, ns, (const xmlChar *) "info", NULL); > > xmlNewChild (section, ns, (const xmlChar *) "album-id", (const xmlChar *) obj->info.album_id); >- >+ > snprintf (buf, sizeof (buf), "%d", obj->info.volume_count); > xmlNewChild (section, ns, (const xmlChar *) "volume-count", (const xmlChar *) buf); > >@@ -260,7 +260,7 @@ > _CDIO_LIST_FOREACH (node, obj->filesystem) > { > struct filesystem_t *p = _cdio_list_node_data (node); >- >+ > if (p->file_src) > { /* file */ > unsigned char *psz_fname_utf8 = vcd_xml_filename_to_utf8 (p->file_src); >@@ -288,7 +288,7 @@ > struct segment_t *_segment = _cdio_list_node_data (node); > xmlNodePtr seg_node; > CdioListNode_t *node2; >- >+ > seg_node = xmlNewChild (section, ns, (const xmlChar *) "segment-item", NULL); > xmlSetProp (seg_node, (const xmlChar *) "src", vcd_xml_filename_to_utf8 (_segment->src)); > xmlSetProp (seg_node, (const xmlChar *) "id", (const xmlChar *) _segment->id); >@@ -305,7 +305,7 @@ > } > > /* sequences */ >- >+ > section = xmlNewChild (vcd_node, ns, (const xmlChar *) "sequence-items", NULL); > > _CDIO_LIST_FOREACH (node, obj->sequence_list) >@@ -313,24 +313,24 @@ > struct sequence_t *p_sequence = _cdio_list_node_data (node); > xmlNodePtr seq_node; > CdioListNode_t *node2; >- unsigned char *psz_xml_fname_utf8 = >+ unsigned char *psz_xml_fname_utf8 = > vcd_xml_filename_to_utf8 (p_sequence->src); > >- seq_node = xmlNewChild (section, ns, (const xmlChar *) "sequence-item", >+ seq_node = xmlNewChild (section, ns, (const xmlChar *) "sequence-item", > NULL); > xmlSetProp (seq_node, (const xmlChar *) "src", psz_xml_fname_utf8); > free(psz_xml_fname_utf8); >- >- xmlSetProp (seq_node, (const xmlChar *) "id", >+ >+ xmlSetProp (seq_node, (const xmlChar *) "id", > (const xmlChar *) p_sequence->id); > > if (p_sequence->default_entry_id) > { > xmlNodePtr ent_node; > >- ent_node = xmlNewChild (seq_node, ns, >+ ent_node = xmlNewChild (seq_node, ns, > (const xmlChar *) "default-entry", NULL); >- xmlSetProp (ent_node, (const xmlChar *) "id", >+ xmlSetProp (ent_node, (const xmlChar *) "id", > (const xmlChar *) p_sequence->default_entry_id); > } > >@@ -341,9 +341,9 @@ > char buf[80]; > > snprintf (buf, sizeof (buf), "%f", p_entry->timestamp); >- ent_node = xmlNewChild (seq_node, ns, (const xmlChar *) "entry", >+ ent_node = xmlNewChild (seq_node, ns, (const xmlChar *) "entry", > (const xmlChar *) buf); >- xmlSetProp (ent_node, (const xmlChar *) "id", >+ xmlSetProp (ent_node, (const xmlChar *) "id", > (const xmlChar *) p_entry->id); > } > >@@ -353,7 +353,7 @@ > char buf[80]; > > snprintf (buf, sizeof (buf), "%f", *_ap_ts); >- xmlNewChild (seq_node, ns, (const xmlChar *) "auto-pause", >+ xmlNewChild (seq_node, ns, (const xmlChar *) "auto-pause", > (const xmlChar *) buf); > } > } >@@ -368,7 +368,7 @@ > { > pbc_t *_pbc = _cdio_list_node_data (node); > xmlNodePtr pl = NULL; >- >+ > switch (_pbc->type) > { > char buf[80]; >@@ -396,9 +396,9 @@ > _CDIO_LIST_FOREACH (node2, _pbc->item_id_list) > { > const char *_id = _cdio_list_node_data (node2); >- >+ > if (_id) >- xmlSetProp (xmlNewChild (pl, ns, (const xmlChar *) "play-item", NULL), >+ xmlSetProp (xmlNewChild (pl, ns, (const xmlChar *) "play-item", NULL), > (const xmlChar *) "ref", (const xmlChar *) _id); > else > xmlNewChild (pl, ns, (const xmlChar *) "play-item", NULL); >@@ -423,18 +423,18 @@ > break; > > case _SEL_MULTI_DEF: >- xmlSetProp (xmlNewChild (pl, ns, (const xmlChar *) "multi-default", NULL), >+ xmlSetProp (xmlNewChild (pl, ns, (const xmlChar *) "multi-default", NULL), > (const xmlChar *) "numeric", (const xmlChar *) "enabled"); > break; > > case _SEL_MULTI_DEF_NO_NUM: >- xmlSetProp (xmlNewChild (pl, ns, (const xmlChar *) "multi-default", NULL), >+ xmlSetProp (xmlNewChild (pl, ns, (const xmlChar *) "multi-default", NULL), > (const xmlChar *) "numeric", (const xmlChar *) "disabled"); > break; > } > > if (_pbc->timeout_id) >- xmlSetProp (xmlNewChild (pl, ns, (const xmlChar *) "timeout", NULL), >+ xmlSetProp (xmlNewChild (pl, ns, (const xmlChar *) "timeout", NULL), > (const xmlChar *) "ref", (const xmlChar *) _pbc->timeout_id); > > snprintf (buf, sizeof (buf), "%d", _pbc->timeout_time); >@@ -442,17 +442,17 @@ > > snprintf (buf, sizeof (buf), "%d", _pbc->loop_count); > xmlSetProp (xmlNewChild (pl, ns, (const xmlChar *) "loop", (const xmlChar *) buf), >- (const xmlChar *) "jump-timing", >+ (const xmlChar *) "jump-timing", > (_pbc->jump_delayed ? (const xmlChar *) "delayed" : (const xmlChar *) "immediate")); > > if (_pbc->item_id) >- xmlSetProp (xmlNewChild (pl, ns, >- (const xmlChar *) "play-item", NULL), >- (const xmlChar *) "ref", >+ xmlSetProp (xmlNewChild (pl, ns, >+ (const xmlChar *) "play-item", NULL), >+ (const xmlChar *) "ref", > (const xmlChar *) _pbc->item_id); > > { >- CdioListNode_t *node3 = >+ CdioListNode_t *node3 = > _cdio_list_begin (_pbc->select_area_list); > > _CDIO_LIST_FOREACH (node2, _pbc->select_id_list) >@@ -470,7 +470,7 @@ > } > } > break; >- >+ > case PBC_END: > pl = xmlNewChild (section, ns, (const xmlChar *) "endlist", NULL); > >@@ -488,7 +488,7 @@ > default: > vcd_assert_not_reached (); > } >- >+ > xmlSetProp (pl, (const xmlChar *) "id", (const xmlChar *) _pbc->id); > if (_pbc->rejected) > xmlSetProp (pl, (const xmlChar *) "rejected", (const xmlChar *) "true"); >@@ -504,12 +504,12 @@ > vcd_xml_dump (vcdxml_t *obj, const char xml_fname[]) > { > _make_xml (obj, xml_fname); >- >+ > return 0; > } > >-/* >- Print command line used as a XML comment. Start is either 0 or >+/* >+ Print command line used as a XML comment. Start is either 0 or > 1. The program might be invoked either from a binary or a libtool > wrapper script to invoke the module. > */ >@@ -528,18 +528,18 @@ > retval = strdup (" command arguments used: "); > break; > default: >- fprintf (stderr, "internal error: expecting start=0 or start=1\n"); >+ fprintf (stderr, "internal error: expecting start=0 or start=1\n"); > retval = strdup (" command line used: "); > start=0; > } >- >+ > > len = strlen (retval); > > for (idx = start; idx < argc; idx++) > { > len += strlen (argv[idx]) + 1; >- >+ > retval = realloc (retval, len + 1); > > strcat (retval, argv[idx]); >diff -ur vcdimager-0.7.24.ORIG/frontends/xml/vcd_xml_dump.h vcdimager-0.7.24/frontends/xml/vcd_xml_dump.h >--- vcdimager-0.7.24.ORIG/frontends/xml/vcd_xml_dump.h 2005-05-07 21:53:21.000000000 +0200 >+++ vcdimager-0.7.24/frontends/xml/vcd_xml_dump.h 2018-01-02 16:27:31.278936068 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifndef __VCD_XML_DUMP_H__ > #define __VCD_XML_DUMP_H__ > >@@ -26,7 +26,7 @@ > int vcd_xml_dump (vcdxml_t *obj, const char xml_fname[]); > > /*! >- Print command line used as a XML comment. Start is either 0 or >+ Print command line used as a XML comment. Start is either 0 or > 1. The program might be invoked either from a binary or a libtool > wrapper script to invoke the module. > */ >diff -ur vcdimager-0.7.24.ORIG/frontends/xml/vcd_xml_gen.c vcdimager-0.7.24/frontends/xml/vcd_xml_gen.c >--- vcdimager-0.7.24.ORIG/frontends/xml/vcd_xml_gen.c 2005-05-07 21:53:21.000000000 +0200 >+++ vcdimager-0.7.24/frontends/xml/vcd_xml_gen.c 2018-01-02 16:27:31.279936068 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >@@ -71,7 +71,7 @@ > struct { > const char *str; > vcd_type_t id; >- } type_str[] = >+ } type_str[] = > { > { "vcd10", VCD_TYPE_VCD }, > { "vcd11", VCD_TYPE_VCD11 }, >@@ -81,10 +81,10 @@ > { "hqvcd", VCD_TYPE_HQVCD }, > { NULL, VCD_TYPE_INVALID } > }; >- >+ > int i = 0; > >- while (type_str[i].str) >+ while (type_str[i].str) > if (strcasecmp(arg, type_str[i].str)) > i++; > else >@@ -92,7 +92,7 @@ > > if (!type_str[i].str) > fprintf (stderr, "invalid type given\n"); >- >+ > return type_str[i].id; > } > >@@ -109,13 +109,13 @@ > *fname1 = strdup (tmp); > else > rc = -1; >- >+ > tmp = strtok(NULL, ","); > if (tmp) > *fname2 = strdup (tmp); > else > rc = -1; >- >+ > tmp = strtok(NULL, ","); > if (tmp) > rc = -1; >@@ -140,7 +140,7 @@ > > { > struct filesystem_t *_file = calloc(1, sizeof (struct filesystem_t)); >- >+ > _file->name = strdup (pathname); > _file->file_src = NULL; > _file->file_raw = false; >@@ -150,7 +150,7 @@ > } > > static void >-_add_dirtree (vcdxml_t *obj, const char pathname[], >+_add_dirtree (vcdxml_t *obj, const char pathname[], > const char iso_pathname[]) > { > DIR *dir = NULL; >@@ -235,7 +235,7 @@ > { > vcdxml_t obj; > int n; >- >+ > char *xml_fname = strdup (DEFAULT_XML_FNAME); > char *type_str = strdup (DEFAULT_TYPE); > int broken_svcd_mode_flag = 0; >@@ -252,7 +252,7 @@ > obj.pvd.volume_id = strdup (DEFAULT_VOLUME_ID); > obj.pvd.application_id = strdup (DEFAULT_APPLICATION_ID); > obj.info.album_id = strdup (DEFAULT_ALBUM_ID); >- >+ > obj.info.volume_count = 1; > obj.info.volume_number = 1; > >@@ -268,7 +268,7 @@ > CL_ADD_FILE_RAW > }; > >- struct poptOption optionsTable[] = >+ struct poptOption optionsTable[] = > { > {"output-file", 'o', POPT_ARG_STRING, &xml_fname, 0, > "specify xml file for output (default: '" DEFAULT_XML_FNAME "')", >@@ -303,17 +303,17 @@ > "update scan data offsets in video mpeg2 stream"}, > > {"nopbc", '\0', POPT_ARG_NONE, &nopbc_flag, 0, "don't create PBC"}, >- >+ > {"add-dirtree", '\0', POPT_ARG_STRING, NULL, CL_ADD_DIRTREE, > "add directory contents recursively to ISO fs root", "DIR"}, > >- {"add-dir", '\0', POPT_ARG_STRING, NULL, CL_ADD_DIR, >+ {"add-dir", '\0', POPT_ARG_STRING, NULL, CL_ADD_DIR, > "add empty dir to ISO fs", "ISO_DIRNAME"}, > >- {"add-file", '\0', POPT_ARG_STRING, NULL, CL_ADD_FILE, >+ {"add-file", '\0', POPT_ARG_STRING, NULL, CL_ADD_FILE, > "add single file to ISO fs", "FILE,ISO_FILENAME"}, > >- {"add-file-2336", '\0', POPT_ARG_STRING, NULL, CL_ADD_FILE_RAW, >+ {"add-file-2336", '\0', POPT_ARG_STRING, NULL, CL_ADD_FILE_RAW, > "add file containing full 2336 byte sectors to ISO fs", > "FILE,ISO_FILENAME"}, > >@@ -327,16 +327,16 @@ > {"version", 'V', POPT_ARG_NONE, NULL, CL_VERSION, > "display version and copyright information and exit"}, > >- POPT_AUTOHELP >+ POPT_AUTOHELP > > {NULL, 0, 0, NULL, 0} > }; >- >+ > poptContext optCon = poptGetContext ("vcdimager", argc, argv, optionsTable, 0); > poptSetOtherOptionHelp (optCon, "mpeg-track1 [mpeg-track2...]"); > >- if (poptReadDefaultConfig (optCon, 0)) >- fprintf (stderr, "warning, reading popt configuration failed\n"); >+ if (poptReadDefaultConfig (optCon, 0)) >+ fprintf (stderr, "warning, reading popt configuration failed\n"); > > while ((opt = poptGetNextOpt (optCon)) != -1) > switch (opt) >@@ -352,7 +352,7 @@ > const char *arg = poptGetOptArg (optCon); > > vcd_assert (arg != NULL); >- >+ > _add_dirtree (&obj, arg, ""); > } > break; >@@ -362,7 +362,7 @@ > const char *arg = poptGetOptArg (optCon); > > vcd_assert (arg != NULL); >- >+ > _add_dir (&obj, arg); > } > break; >@@ -375,7 +375,7 @@ > > vcd_assert (arg != NULL); > >- if(!_parse_file_arg (arg, &fname1, &fname2)) >+ if(!_parse_file_arg (arg, &fname1, &fname2)) > { > struct filesystem_t *_file = calloc(1, sizeof (struct filesystem_t)); > >@@ -401,7 +401,7 @@ > > if (_verbose_flag && _quiet_flag) > fprintf (stderr, "I can't be both, quiet and verbose... either one or another ;-)"); >- >+ > if ((args = poptGetArgs (optCon)) == NULL) > { > fprintf (stderr, "error: need at least one data track as argument " >@@ -427,7 +427,7 @@ > CDIO_CD_MAX_TRACKS - 1); > exit (EXIT_FAILURE); > } >- >+ > if ((obj.vcd_type = _parse_type_arg (type_str)) == VCD_TYPE_INVALID) > exit (EXIT_FAILURE); > >@@ -447,7 +447,7 @@ > || obj.vcd_type == VCD_TYPE_VCD) > nopbc_flag = true; > >- if (!nopbc_flag) >+ if (!nopbc_flag) > { > pbc_t *_pbc; > CdioListNode_t *node; >@@ -474,7 +474,7 @@ > _pbc->wait_time = 5; > > _cdio_list_append (_pbc->item_id_list, strdup (_sequence->id)); >- >+ > _cdio_list_append (obj.pbc_list, _pbc); > > n++; >@@ -489,30 +489,30 @@ > _cdio_list_append (obj.pbc_list, _pbc); > } > >- if ((obj.vcd_type == VCD_TYPE_SVCD >+ if ((obj.vcd_type == VCD_TYPE_SVCD > || obj.vcd_type == VCD_TYPE_HQVCD) > && update_scan_offsets_flag) > { > struct option_t *_opt = calloc(1, sizeof (struct option_t)); >- >+ > _opt->name = strdup (OPT_UPDATE_SCAN_OFFSETS); > _opt->value = strdup ("true"); > > _cdio_list_append (obj.option_list, _opt); > } > >- if (obj.vcd_type == VCD_TYPE_SVCD >+ if (obj.vcd_type == VCD_TYPE_SVCD > && broken_svcd_mode_flag) > { > struct option_t *_opt = calloc(1, sizeof (struct option_t)); >- >+ > _opt->name = strdup (OPT_SVCD_VCD3_MPEGAV); > _opt->value = strdup ("true"); > > _cdio_list_append (obj.option_list, _opt); > > _opt = calloc(1, sizeof (struct option_t)); >- >+ > _opt->name = strdup (OPT_SVCD_VCD3_ENTRYSVD); > _opt->value = strdup ("true"); > >@@ -526,9 +526,9 @@ > > return EXIT_SUCCESS; > } >- > >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/frontends/xml/vcdxml.h vcdimager-0.7.24/frontends/xml/vcdxml.h >--- vcdimager-0.7.24.ORIG/frontends/xml/vcdxml.h 2005-05-15 02:12:02.000000000 +0200 >+++ vcdimager-0.7.24/frontends/xml/vcdxml.h 2018-01-02 17:31:56.296603121 +0100 >@@ -18,7 +18,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifndef __VCDXML_H__ > #define __VCDXML_H__ > >@@ -103,7 +103,7 @@ > struct entry_point_t { > char *id; > double timestamp; >- >+ > /* used for restoring */ > uint32_t extent; > }; >@@ -112,7 +112,7 @@ > { > char *id; > char *src; >- >+ > CdioList_t *autopause_list; /* double * */ > > /* used for restoring vcds */ >@@ -151,15 +151,15 @@ > > vcd_assert (p_vcdxml != NULL); > >- _cdio_list_free (p_vcdxml->option_list, true); >- _cdio_list_free (p_vcdxml->segment_list, true); >+ _cdio_list_free (p_vcdxml->option_list, true, NULL); >+ _cdio_list_free (p_vcdxml->segment_list, true, NULL); > > _CDIO_LIST_FOREACH (p_node, p_vcdxml->pbc_list) > { > pbc_t *p_pbc = _cdio_list_node_data(p_node); > vcd_pbc_destroy(p_pbc); > } >- >+ > _CDIO_LIST_FOREACH (p_node, p_vcdxml->sequence_list) > { > struct sequence_t *p_sequence = _cdio_list_node_data(p_node); >@@ -172,10 +172,10 @@ > struct entry_point_t *p_entry = _cdio_list_node_data(p_node2); > free(p_entry->id); > } >- _cdio_list_free (p_sequence->entry_point_list, true); >- _cdio_list_free (p_sequence->autopause_list, true); >+ _cdio_list_free (p_sequence->entry_point_list, true, NULL); >+ _cdio_list_free (p_sequence->autopause_list, true, NULL); > } >- >+ > _CDIO_LIST_FOREACH (p_node, p_vcdxml->filesystem) > { > struct filesystem_t *p_fs = _cdio_list_node_data(p_node); >@@ -183,9 +183,9 @@ > free(p_fs->file_src); > } > >- _cdio_list_free (p_vcdxml->filesystem, true); >- _cdio_list_free (p_vcdxml->pbc_list, true); >- _cdio_list_free (p_vcdxml->sequence_list, true); >+ _cdio_list_free (p_vcdxml->filesystem, true, NULL); >+ _cdio_list_free (p_vcdxml->pbc_list, true, NULL); >+ _cdio_list_free (p_vcdxml->sequence_list, true, NULL); > free (p_vcdxml->comment); > free (p_vcdxml->info.album_id); > free (p_vcdxml->pvd.volume_id); >diff -ur vcdimager-0.7.24.ORIG/frontends/xml/vcd_xml_master.c vcdimager-0.7.24/frontends/xml/vcd_xml_master.c >--- vcdimager-0.7.24.ORIG/frontends/xml/vcd_xml_master.c 2005-06-09 02:53:23.000000000 +0200 >+++ vcdimager-0.7.24/frontends/xml/vcd_xml_master.c 2018-01-02 16:27:31.278936068 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > /* Private headers */ > #include "image_sink.h" > #include "stream_stdio.h" >@@ -49,7 +49,7 @@ > { > vcd_assert (pathname != 0); > >- if (prefix) >+ if (prefix) > { > VcdDataSource_t *retval = 0; > char *tmp = calloc(1, strlen (prefix) + strlen (pathname) + 1); >@@ -63,8 +63,8 @@ > return vcd_data_source_new_stdio (pathname); > } > >-bool >-vcd_xml_master (const vcdxml_t *p_vcdxml, VcdImageSink_t *p_image_sink, >+bool >+vcd_xml_master (const vcdxml_t *p_vcdxml, VcdImageSink_t *p_image_sink, > time_t *create_time) > { > VcdObj_t *_vcd; >@@ -78,33 +78,33 @@ > _vcd = vcd_obj_new (p_vcdxml->vcd_type); > > if (vcd_xml_check_mode) >- vcd_obj_set_param_str (_vcd, VCD_PARM_PREPARER_ID, >+ vcd_obj_set_param_str (_vcd, VCD_PARM_PREPARER_ID, > "GNU VCDIMAGER CHECK MODE"); > > if (p_vcdxml->info.album_id) > vcd_obj_set_param_str (_vcd, VCD_PARM_ALBUM_ID, p_vcdxml->info.album_id); > >- vcd_obj_set_param_uint (_vcd, VCD_PARM_VOLUME_NUMBER, >+ vcd_obj_set_param_uint (_vcd, VCD_PARM_VOLUME_NUMBER, > p_vcdxml->info.volume_number); >- vcd_obj_set_param_uint (_vcd, VCD_PARM_VOLUME_COUNT, >+ vcd_obj_set_param_uint (_vcd, VCD_PARM_VOLUME_COUNT, > p_vcdxml->info.volume_count); >- vcd_obj_set_param_uint (_vcd, VCD_PARM_RESTRICTION, >+ vcd_obj_set_param_uint (_vcd, VCD_PARM_RESTRICTION, > p_vcdxml->info.restriction); >- vcd_obj_set_param_bool (_vcd, VCD_PARM_NEXT_VOL_SEQ2, >+ vcd_obj_set_param_bool (_vcd, VCD_PARM_NEXT_VOL_SEQ2, > p_vcdxml->info.use_sequence2); >- vcd_obj_set_param_bool (_vcd, VCD_PARM_NEXT_VOL_LID2, >+ vcd_obj_set_param_bool (_vcd, VCD_PARM_NEXT_VOL_LID2, > p_vcdxml->info.use_lid2); > > if (p_vcdxml->pvd.volume_id) >- vcd_obj_set_param_str (_vcd, VCD_PARM_VOLUME_ID, >+ vcd_obj_set_param_str (_vcd, VCD_PARM_VOLUME_ID, > p_vcdxml->pvd.volume_id); > > if (p_vcdxml->pvd.publisher_id) >- vcd_obj_set_param_str (_vcd, VCD_PARM_PUBLISHER_ID, >+ vcd_obj_set_param_str (_vcd, VCD_PARM_PUBLISHER_ID, > p_vcdxml->pvd.publisher_id); > > if (p_vcdxml->pvd.application_id) >- vcd_obj_set_param_str (_vcd, VCD_PARM_APPLICATION_ID, >+ vcd_obj_set_param_str (_vcd, VCD_PARM_APPLICATION_ID, > p_vcdxml->pvd.application_id); > > _CDIO_LIST_FOREACH (node, p_vcdxml->option_list) >@@ -156,7 +156,7 @@ > continue; > } > >- switch (_opt_cfg_p->val_type) >+ switch (_opt_cfg_p->val_type) > { > case OPT_BOOL: > { >@@ -187,14 +187,14 @@ > char *endptr; > > _value = strtol (_option->value, &endptr, 10); >- >+ > if (*endptr) > { >- vcd_error ("error while converting string '%s' to integer", >+ vcd_error ("error while converting string '%s' to integer", > _option->value); > _value = 0; > } >- >+ > vcd_obj_set_param_uint (_vcd, _opt_cfg_p->parm_id, _value); > } > break; >@@ -203,7 +203,7 @@ > vcd_assert_not_reached (); > break; > } >- } >+ } > > _CDIO_LIST_FOREACH (node, p_vcdxml->pbc_list) > { >@@ -217,26 +217,26 @@ > _CDIO_LIST_FOREACH (node, p_vcdxml->filesystem) > { > struct filesystem_t *dentry = _cdio_list_node_data (node); >- >- if (dentry->file_src) >+ >+ if (dentry->file_src) > { >- VcdDataSource_t *_source = mk_dsource (p_vcdxml->file_prefix, >+ VcdDataSource_t *_source = mk_dsource (p_vcdxml->file_prefix, > dentry->file_src); >- >+ > vcd_assert (_source != NULL); > > vcd_obj_add_file (_vcd, dentry->name, _source, dentry->file_raw); > } > else > vcd_obj_add_dir (_vcd, dentry->name); >- >+ > } > > idx = 0; > _CDIO_LIST_FOREACH (node, p_vcdxml->segment_list) > { > struct segment_t *p_segment = _cdio_list_node_data (node); >- VcdDataSource_t *_source = mk_dsource (p_vcdxml->file_prefix, >+ VcdDataSource_t *_source = mk_dsource (p_vcdxml->file_prefix, > p_segment->src); > CdioListNode_t *p_node2; > VcdMpegSource_t *_mpeg_src; >@@ -248,12 +248,12 @@ > _mpeg_src = vcd_mpeg_source_new (_source); > > vcd_mpeg_source_scan (_mpeg_src, !_relaxed_aps, _update_scan_offsets, >- vcd_xml_show_progress >+ vcd_xml_show_progress > ? vcd_xml_scan_progress_cb : NULL, > p_segment->id); > > vcd_obj_append_segment_play_item (_vcd, _mpeg_src, p_segment->id); >- >+ > _CDIO_LIST_FOREACH (p_node2, p_segment->autopause_list) > { > double *_ap_ts = _cdio_list_node_data (p_node2); >@@ -265,7 +265,7 @@ > } > > vcd_debug ("sequence count %d", _cdio_list_length (p_vcdxml->sequence_list)); >- >+ > idx = 0; > _CDIO_LIST_FOREACH (node, p_vcdxml->sequence_list) > { >@@ -286,14 +286,14 @@ > ? vcd_xml_scan_progress_cb : NULL, > sequence->id); > >- vcd_obj_append_sequence_play_item (_vcd, _mpeg_src, sequence->id, >+ vcd_obj_append_sequence_play_item (_vcd, _mpeg_src, sequence->id, > sequence->default_entry_id); > > _CDIO_LIST_FOREACH (node2, sequence->entry_point_list) > { > struct entry_point_t *entry = _cdio_list_node_data (node2); > >- vcd_obj_add_sequence_entry (_vcd, sequence->id, entry->timestamp, >+ vcd_obj_add_sequence_entry (_vcd, sequence->id, entry->timestamp, > entry->id); > } > >@@ -315,8 +315,8 @@ > > sectors = vcd_obj_begin_output (_vcd); > >- vcd_obj_write_image (_vcd, p_image_sink, vcd_xml_show_progress >- ? vcd_xml_write_progress_cb : NULL, >+ vcd_obj_write_image (_vcd, p_image_sink, vcd_xml_show_progress >+ ? vcd_xml_write_progress_cb : NULL, > NULL, &_vcd_time); > > vcd_obj_end_output (_vcd); >diff -ur vcdimager-0.7.24.ORIG/frontends/xml/vcd_xml_master.h vcdimager-0.7.24/frontends/xml/vcd_xml_master.h >--- vcdimager-0.7.24.ORIG/frontends/xml/vcd_xml_master.h 2005-06-09 02:53:23.000000000 +0200 >+++ vcdimager-0.7.24/frontends/xml/vcd_xml_master.h 2018-01-02 16:27:31.282936067 +0100 >@@ -17,14 +17,14 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifndef __VCD_XML_MASTER_H__ > #define __VCD_XML_MASTER_H__ > #include "vcdxml.h" > > #include <time.h> > >-bool vcd_xml_master (const vcdxml_t *p_vcdxml, >+bool vcd_xml_master (const vcdxml_t *p_vcdxml, > VcdImageSink_t *p_image_sink, time_t *p_create_time); > > #endif /* __VCD_XML_MASTER_H__ */ >diff -ur vcdimager-0.7.24.ORIG/frontends/xml/vcd_xml_minfo.c vcdimager-0.7.24/frontends/xml/vcd_xml_minfo.c >--- vcdimager-0.7.24.ORIG/frontends/xml/vcd_xml_minfo.c 2005-05-08 05:48:55.000000000 +0200 >+++ vcdimager-0.7.24/frontends/xml/vcd_xml_minfo.c 2018-01-02 16:27:31.280936067 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >@@ -56,8 +56,8 @@ > { > int _i; > >- for (_i = 0; _i < _TAG_LEVEL; _i++) >- fputs (" ", _TAG_FD); >+ for (_i = 0; _i < _TAG_LEVEL; _i++) >+ fputs (" ", _TAG_FD); > } > > static void >@@ -99,14 +99,14 @@ > } > > static void >-_TAG_COMMENT (const char fmt[]) >+_TAG_COMMENT (const char fmt[]) > { > _TAG_INDENT (); > fprintf (_TAG_FD, " <!-- %s -->\n", fmt); > } > > static void >-_TAG_PRINT (const char tag[], const char fmt[], ...) >+_TAG_PRINT (const char tag[], const char fmt[], ...) > { > va_list args; > va_start (args, fmt); >@@ -168,13 +168,13 @@ > {"output-file", 'o', POPT_ARG_STRING, &_output_file, OP_NONE, > "file for XML output", "FILE"}, > >- {"progress", 'p', POPT_ARG_NONE, &_progress_flag, 0, >- "show progress"}, >- >- {"verbose", 'v', POPT_ARG_NONE, &_verbose_flag, OP_NONE, >+ {"progress", 'p', POPT_ARG_NONE, &_progress_flag, 0, >+ "show progress"}, >+ >+ {"verbose", 'v', POPT_ARG_NONE, &_verbose_flag, OP_NONE, > "be verbose"}, >- >- {"quiet", 'q', POPT_ARG_NONE, &_quiet_flag, OP_NONE, >+ >+ {"quiet", 'q', POPT_ARG_NONE, &_quiet_flag, OP_NONE, > "show only critical messages"}, > > {"gui", '\0', POPT_ARG_NONE, &_gui_flag, 0, "enable GUI mode"}, >@@ -266,7 +266,7 @@ > _TAG_OPEN ("mpeg-info", "src=\"%s\"", _mpeg_fname); > > if (_generic_info) >- { >+ { > const struct vcd_mpeg_stream_info *_info = vcd_mpeg_source_get_info (src); > int i; > >@@ -302,7 +302,7 @@ > _TAG_PRINT ("horizontal-size", "%d", _vinfo->hsize); > _TAG_PRINT ("vertical-size", "%d", _vinfo->vsize); > _TAG_PRINT ("frame-rate", "%f", _vinfo->frate); >- >+ > _TAG_PRINT ("bit-rate", "%d", _vinfo->bitrate); > > if (_dump_aps && _vinfo->aps_list) >@@ -314,10 +314,10 @@ > _CDIO_LIST_FOREACH (n, _vinfo->aps_list) > { > struct aps_data *_data = _cdio_list_node_data (n); >- >+ > _TAG_INDENT (); > fprintf (_TAG_FD, "<aps packet-no=\"%u\">%f</aps>\n", >- (unsigned int) _data->packet_no, >+ (unsigned int) _data->packet_no, > _data->timestamp); > } > >@@ -345,7 +345,7 @@ > > _TAG_COMMENT (_str[i]); > } >- >+ > _TAG_PRINT ("layer", "%d", _ainfo->layer); > _TAG_PRINT ("sampling-frequency", "%d", _ainfo->sampfreq); > _TAG_PRINT ("bit-rate", "%d", _ainfo->bitrate); >@@ -394,8 +394,8 @@ > > return EXIT_SUCCESS; > } >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/frontends/xml/vcd_xml_parse.c vcdimager-0.7.24/frontends/xml/vcd_xml_parse.c >--- vcdimager-0.7.24.ORIG/frontends/xml/vcd_xml_parse.c 2005-07-10 14:34:36.000000000 +0200 >+++ vcdimager-0.7.24/frontends/xml/vcd_xml_parse.c 2018-01-02 16:27:31.283936067 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >@@ -50,7 +50,7 @@ > } handlers_t; > > #define GET_ELEM_(id, doc, node, ns) \ >- if ((!xmlStrcmp (node->name, (const xmlChar *) id)) && (node->ns == ns)) >+ if ((!xmlStrcmp (node->name, (const xmlChar *) id)) && (node->ns == ns)) > > #define GET_ELEM_STR(str, id, doc, node, ns) \ > if ((!xmlStrcmp (node->name, (const xmlChar *) id)) && (node->ns == ns)) \ >@@ -76,7 +76,7 @@ > long retval = 0; > char *_tmp = NULL; > char *endptr; >- >+ > GET_ELEM_STR (_tmp, id, doc, node, ns); > > if (!_tmp) >@@ -100,7 +100,7 @@ > double retval = 0; > char *_tmp = NULL; > char *endptr; >- >+ > GET_ELEM_STR (_tmp, id, doc, node, ns); > > if (!_tmp) >@@ -113,7 +113,7 @@ > retval = strtod (_tmp, &endptr); > > if (*endptr) >- vcd_error ("XML: error while converting string '%s' to floating point.", >+ vcd_error ("XML: error while converting string '%s' to floating point.", > _tmp); > > return retval; >@@ -121,16 +121,16 @@ > > > /* >- * options >+ * options > */ > > static bool > _parse_option (vcdxml_t *obj, xmlDocPtr doc, xmlNodePtr node, xmlNsPtr ns) > { >- if (!xmlStrcmp (node->name, (const xmlChar *) "option")) >+ if (!xmlStrcmp (node->name, (const xmlChar *) "option")) > { > struct option_t *_option = calloc(1, sizeof (struct option_t)); >- >+ > GET_PROP_STR (_option->name, "name", doc, node, ns); > GET_PROP_STR (_option->value, "value", doc, node, ns); > >@@ -197,7 +197,7 @@ > } > > /* >- * segment items block >+ * segment items block > */ > > static bool >@@ -226,7 +226,7 @@ > { > double *_ap_ts = calloc(1, sizeof (double)); > *_ap_ts = 0; >- >+ > GET_ELEM_DOUBLE (*_ap_ts, "auto-pause", doc, cur, ns); > > _cdio_list_append (segment->autopause_list, _ap_ts); >@@ -250,7 +250,7 @@ > if (cur->ns != ns) > continue; > >- if (!xmlStrcmp (cur->name, (const xmlChar *) "segment-item")) >+ if (!xmlStrcmp (cur->name, (const xmlChar *) "segment-item")) > rc = _parse_mpeg_segment (obj, doc, cur, ns); > else > vcd_assert_not_reached (); >@@ -263,11 +263,11 @@ > } > > /* >- * PBC block >+ * PBC block > */ > > static void >-_parse_common_pbcattrs (pbc_t *pbc, xmlDocPtr doc, xmlNodePtr node, >+_parse_common_pbcattrs (pbc_t *pbc, xmlDocPtr doc, xmlNodePtr node, > xmlNsPtr ns) > { > char *_tmp = NULL; >@@ -282,10 +282,10 @@ > } > > static long >-_get_prop_long (const char _prop_name[], xmlDocPtr doc, xmlNodePtr node, >+_get_prop_long (const char _prop_name[], xmlDocPtr doc, xmlNodePtr node, > xmlNsPtr ns) > { >- if (xmlHasProp (node, (const xmlChar *) _prop_name)) >+ if (xmlHasProp (node, (const xmlChar *) _prop_name)) > { > char *str = (char *) xmlGetProp (node, (const xmlChar *) _prop_name); > long retval = 0; >@@ -297,12 +297,12 @@ > retval = strtol (str, &endptr, 10); > > if (*endptr) >- vcd_error ("XML: error while converting string '%s' to an integer.", >+ vcd_error ("XML: error while converting string '%s' to an integer.", > str); > > return retval; > } >- >+ > return 0; > } > >@@ -315,23 +315,23 @@ > const uint32_t x2 = _get_prop_long ("x2", doc, node, ns); > const uint32_t y2 = _get_prop_long ("y2", doc, node, ns); > >- if (x1 > 255) >+ if (x1 > 255) > vcd_warn ("XML: value of x1 (%u) is greater than 255", (unsigned int) x1); > >- if (x2 > 255) >+ if (x2 > 255) > vcd_error ("XML: value of x2 (%u) is greater than 255", (unsigned int) x2); > >- if (y1 > 255) >+ if (y1 > 255) > vcd_error ("XML: value of y1 (%u) is greater than 255", (unsigned int) y1); > >- if (y2 > 255) >+ if (y2 > 255) > vcd_error ("XML: value of y2 (%u) is greater than 255", (unsigned int) y2); > > *pp_area = vcd_pbc_area_new ( x1, y1, x2, y2); > } > > static bool >-_parse_pbc_selection (vcdxml_t *p_obj, xmlDocPtr doc, xmlNodePtr node, >+_parse_pbc_selection (vcdxml_t *p_obj, xmlDocPtr doc, xmlNodePtr node, > xmlNsPtr ns) > { > xmlNodePtr cur; >@@ -345,27 +345,27 @@ > > FOR_EACH (cur, node) > { >- if (cur->ns != ns) >- continue; >- >+ if (cur->ns != ns) >+ continue; >+ > if (!xmlStrcmp (cur->name, (const xmlChar *) "prev")) >- { >+ { > GET_PROP_STR (p_pbc->prev_id, (const xmlChar *) "ref", doc, cur, ns); > _get_area_props (&p_pbc->prev_area, doc, cur, ns); > } > else if (!xmlStrcmp (cur->name, (const xmlChar *) "next")) >- { >- GET_PROP_STR (p_pbc->next_id, "ref", doc, cur, ns); >+ { >+ GET_PROP_STR (p_pbc->next_id, "ref", doc, cur, ns); > _get_area_props (&p_pbc->next_area, doc, cur, ns); > } > else if (!xmlStrcmp (cur->name, (const xmlChar *) "return")) > { >- GET_PROP_STR (p_pbc->retn_id, "ref", doc, cur, ns); >+ GET_PROP_STR (p_pbc->retn_id, "ref", doc, cur, ns); > _get_area_props (&p_pbc->return_area, doc, cur, ns); > } > else if (!xmlStrcmp (cur->name, (const xmlChar *) "timeout")) >- { >- GET_PROP_STR (p_pbc->timeout_id, "ref", doc, cur, ns); >+ { >+ GET_PROP_STR (p_pbc->timeout_id, "ref", doc, cur, ns); > } > else if (!xmlStrcmp (cur->name, (const xmlChar *) "multi-default")) > { >@@ -373,25 +373,25 @@ > > p_pbc->selection_type = _SEL_MULTI_DEF; > >- GET_PROP_STR (_numeric, "numeric", doc, cur, ns); >+ GET_PROP_STR (_numeric, "numeric", doc, cur, ns); > if (_numeric && !strcmp (_numeric, "disabled")) > p_pbc->selection_type = _SEL_MULTI_DEF_NO_NUM; > } > else if (!xmlStrcmp (cur->name, (const xmlChar *) "default")) >- { >+ { > p_pbc->selection_type = _SEL_NORMAL; >- GET_PROP_STR (p_pbc->default_id, "ref", doc, cur, ns); >+ GET_PROP_STR (p_pbc->default_id, "ref", doc, cur, ns); > } > else if (!xmlStrcmp (cur->name, (const xmlChar *) "bsn")) > { p_pbc->bsn = _get_elem_long ("bsn", doc, cur, ns); } > else if (!xmlStrcmp (cur->name, (const xmlChar *) "loop")) >- { >+ { > char *_tmp = NULL; >- >- p_pbc->loop_count = _get_elem_long ("loop", doc, cur, ns); >+ >+ p_pbc->loop_count = _get_elem_long ("loop", doc, cur, ns); > > GET_PROP_STR (_tmp, "jump-timing", doc, cur, ns); >- >+ > if (_tmp && !strcmp (_tmp, "delayed")) > p_pbc->jump_delayed = true; > } >@@ -403,7 +403,7 @@ > { > char *_select_ref = NULL; > >- GET_PROP_STR (_select_ref, "ref", doc, cur, ns); >+ GET_PROP_STR (_select_ref, "ref", doc, cur, ns); > > _cdio_list_append (p_pbc->select_id_list, _select_ref); > >@@ -413,7 +413,7 @@ > _get_area_props (&_area, doc, cur, ns); > _cdio_list_append (p_pbc->select_area_list, _area); > } >- >+ > } > else > vcd_assert_not_reached (); >@@ -425,7 +425,7 @@ > } > > static bool >-_parse_pbc_playlist (vcdxml_t *p_obj, xmlDocPtr doc, xmlNodePtr node, >+_parse_pbc_playlist (vcdxml_t *p_obj, xmlDocPtr doc, xmlNodePtr node, > xmlNsPtr ns) > { > xmlNodePtr cur; >@@ -437,9 +437,9 @@ > > FOR_EACH (cur, node) > { >- if (cur->ns != ns) >- continue; >- >+ if (cur->ns != ns) >+ continue; >+ > if (!xmlStrcmp (cur->name, (const xmlChar *) "prev")) > { GET_PROP_STR (_pbc->prev_id, "ref", doc, cur, ns); } > else if (!xmlStrcmp (cur->name, (const xmlChar *) "next")) >@@ -456,7 +456,7 @@ > { > char *_item_ref = NULL; > >- GET_PROP_STR (_item_ref, "ref", doc, cur, ns); >+ GET_PROP_STR (_item_ref, "ref", doc, cur, ns); > > _cdio_list_append (_pbc->item_id_list, _item_ref); > } >@@ -470,7 +470,7 @@ > } > > static bool >-_parse_pbc_endlist (vcdxml_t *p_obj, xmlDocPtr doc, xmlNodePtr node, >+_parse_pbc_endlist (vcdxml_t *p_obj, xmlDocPtr doc, xmlNodePtr node, > xmlNsPtr ns) > { > xmlNodePtr cur; >@@ -482,8 +482,8 @@ > > FOR_EACH (cur, node) > { >- if (cur->ns != ns) >- continue; >+ if (cur->ns != ns) >+ continue; > > if (!xmlStrcmp (cur->name, (const xmlChar *) "next-volume")) > { _pbc->next_disc = _get_elem_long ("next-volume", doc, cur, ns); } >@@ -507,16 +507,16 @@ > { > bool rc = true; > >- if (cur->ns != ns) >- continue; >+ if (cur->ns != ns) >+ continue; > >- if (!xmlStrcmp (cur->name, (const xmlChar *) "selection")) >+ if (!xmlStrcmp (cur->name, (const xmlChar *) "selection")) > rc = _parse_pbc_selection (p_obj, doc, cur, ns); >- else if (!xmlStrcmp (cur->name, (const xmlChar *) "playlist")) >+ else if (!xmlStrcmp (cur->name, (const xmlChar *) "playlist")) > rc = _parse_pbc_playlist (p_obj, doc, cur, ns); >- else if (!xmlStrcmp (cur->name, (const xmlChar *) "endlist")) >+ else if (!xmlStrcmp (cur->name, (const xmlChar *) "endlist")) > rc = _parse_pbc_endlist (p_obj, doc, cur, ns); >- else >+ else > vcd_assert_not_reached (); > > if (rc) >@@ -531,7 +531,7 @@ > */ > > static bool >-_parse_mpeg_sequence (vcdxml_t *p_obj, xmlDocPtr doc, xmlNodePtr node, >+_parse_mpeg_sequence (vcdxml_t *p_obj, xmlDocPtr doc, xmlNodePtr node, > xmlNsPtr ns) > { > struct sequence_t *sequence; >@@ -561,7 +561,7 @@ > else if (!xmlStrcmp (cur->name, (const xmlChar *) "entry")) > { > struct entry_point_t *entry = calloc(1, sizeof (struct entry_point_t)); >- >+ > GET_PROP_STR (entry->id, "id", doc, cur, ns); > GET_ELEM_DOUBLE (entry->timestamp, "entry", doc, cur, ns); > >@@ -571,7 +571,7 @@ > { > double *_ap_ts = calloc(1, sizeof (double)); > *_ap_ts = 0; >- >+ > GET_ELEM_DOUBLE (*_ap_ts, "auto-pause", doc, cur, ns); > > _cdio_list_append (sequence->autopause_list, _ap_ts); >@@ -596,7 +596,7 @@ > continue; > > >- if (!xmlStrcmp (cur->name, (const xmlChar *) "sequence-item")) >+ if (!xmlStrcmp (cur->name, (const xmlChar *) "sequence-item")) > rc = _parse_mpeg_sequence (p_obj, doc, cur, ns); > else > vcd_assert_not_reached (); >@@ -609,11 +609,11 @@ > } > > /* >- * filesystem block >+ * filesystem block > */ > > static bool >-_parse_file (vcdxml_t *p_obj, const char path[], xmlDocPtr doc, >+_parse_file (vcdxml_t *p_obj, const char path[], xmlDocPtr doc, > xmlNodePtr node, xmlNsPtr ns) > { > xmlNodePtr cur; >@@ -648,10 +648,10 @@ > char *_tmp; > > _tmp = malloc (strlen (path) + strlen (_name) + 1); >- >+ > strcpy (_tmp, path); > strcat (_tmp, _name); >- >+ > _data = malloc (sizeof (struct filesystem_t)); > _data->name = _tmp; > _data->file_src = strdup (_src); >@@ -664,7 +664,7 @@ > } > > static bool >-_parse_folder (vcdxml_t *p_obj, const char path[], xmlDocPtr doc, >+_parse_folder (vcdxml_t *p_obj, const char path[], xmlDocPtr doc, > xmlNodePtr node, xmlNsPtr ns) > { > xmlNodePtr cur; >@@ -676,10 +676,10 @@ > { > bool rc = true; > >- if (cur->ns != ns) >- continue; >+ if (cur->ns != ns) >+ continue; > >- if (!xmlStrcmp (cur->name, (const xmlChar *) "name")) >+ if (!xmlStrcmp (cur->name, (const xmlChar *) "name")) > { > xmlChar *_tmp; > >@@ -695,28 +695,28 @@ > > { > struct filesystem_t *_data; >- >+ > _data = malloc (sizeof (struct filesystem_t)); > _data->name = strdup (new_path); > _data->file_src = NULL; > > _cdio_list_append (p_obj->filesystem, _data); > } >- >+ > > strcat (new_path, "/"); >- >+ > rc = false; >- >+ > /* fixme, free _tmp?? */ > } >- else if (!xmlStrcmp (cur->name, (const xmlChar *) "folder")) >+ else if (!xmlStrcmp (cur->name, (const xmlChar *) "folder")) > rc = _parse_folder (p_obj, new_path, doc, cur, ns); > else if (!xmlStrcmp (cur->name, (const xmlChar *) "file")) > rc = _parse_file (p_obj, new_path, doc, cur, ns); >- else >+ else > vcd_assert_not_reached (); >- >+ > if (new_path == NULL) > rc = true; > >@@ -724,7 +724,7 @@ > free(new_path); > return rc; > } >- >+ > } > > free(new_path); >@@ -732,7 +732,7 @@ > } > > static bool >-_parse_filesystem (vcdxml_t *p_obj, xmlDocPtr doc, xmlNodePtr node, >+_parse_filesystem (vcdxml_t *p_obj, xmlDocPtr doc, xmlNodePtr node, > xmlNsPtr ns) > { > xmlNodePtr cur; >@@ -741,14 +741,14 @@ > { > bool rc = true; > >- if (cur->ns != ns) >- continue; >+ if (cur->ns != ns) >+ continue; > >- if (!xmlStrcmp (cur->name, (const xmlChar *) "folder")) >+ if (!xmlStrcmp (cur->name, (const xmlChar *) "folder")) > rc = _parse_folder (p_obj, "", doc, cur, ns); > else if (!xmlStrcmp (cur->name, (const xmlChar *) "file")) > rc = _parse_file (p_obj, "", doc, cur, ns); >- else >+ else > vcd_assert_not_reached (); > > if (rc) >@@ -777,10 +777,10 @@ > { "hqvcd", "1.0", VCD_TYPE_HQVCD }, > { NULL, NULL, VCD_TYPE_INVALID } > }; >- >+ > int i = 0; > >- while (type_str[i].class) >+ while (type_str[i].class) > if (strcasecmp(class, type_str[i].class) > || strcasecmp(version, type_str[i].version)) > i++; >@@ -809,25 +809,25 @@ > FOR_EACH (cur, node) > { > bool rc = false; >- >+ > if (cur->ns != ns) > continue; > >- if (!xmlStrcmp (cur->name, (const xmlChar *) "meta")) >+ if (!xmlStrcmp (cur->name, (const xmlChar *) "meta")) > { /* NOOP */ } >- else if (!xmlStrcmp (cur->name, (const xmlChar *) "option")) >+ else if (!xmlStrcmp (cur->name, (const xmlChar *) "option")) > rc = _parse_option (p_obj, doc, cur, ns); >- else if (!xmlStrcmp (cur->name, (const xmlChar *) "info")) >+ else if (!xmlStrcmp (cur->name, (const xmlChar *) "info")) > rc = _parse_info (p_obj, doc, cur, ns); >- else if (!xmlStrcmp (cur->name, (const xmlChar *) "pvd")) >+ else if (!xmlStrcmp (cur->name, (const xmlChar *) "pvd")) > rc = _parse_pvd (p_obj, doc, cur, ns); >- else if (!xmlStrcmp (cur->name, (const xmlChar *) "pbc")) >+ else if (!xmlStrcmp (cur->name, (const xmlChar *) "pbc")) > rc = _parse_pbc (p_obj, doc, cur, ns); >- else if (!xmlStrcmp (cur->name, (const xmlChar *) "segment-items")) >+ else if (!xmlStrcmp (cur->name, (const xmlChar *) "segment-items")) > rc = _parse_segments (p_obj, doc, cur, ns); >- else if (!xmlStrcmp (cur->name, (const xmlChar *) "filesystem")) >+ else if (!xmlStrcmp (cur->name, (const xmlChar *) "filesystem")) > rc = _parse_filesystem (p_obj, doc, cur, ns); >- else if (!xmlStrcmp (cur->name, (const xmlChar *) "sequence-items")) >+ else if (!xmlStrcmp (cur->name, (const xmlChar *) "sequence-items")) > rc = _parse_sequences (p_obj, doc, cur, ns); > else vcd_warn ("XML: unexpected element: %s", cur->name); > >diff -ur vcdimager-0.7.24.ORIG/frontends/xml/vcd_xml_parse.h vcdimager-0.7.24/frontends/xml/vcd_xml_parse.h >--- vcdimager-0.7.24.ORIG/frontends/xml/vcd_xml_parse.h 2005-05-07 21:53:21.000000000 +0200 >+++ vcdimager-0.7.24/frontends/xml/vcd_xml_parse.h 2018-01-02 16:27:31.277936068 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifndef __VCD_XML_PARSE_H__ > #define __VCD_XML_PARSE_H__ > >diff -ur vcdimager-0.7.24.ORIG/frontends/xml/vcd_xml_rip.c vcdimager-0.7.24/frontends/xml/vcd_xml_rip.c >--- vcdimager-0.7.24.ORIG/frontends/xml/vcd_xml_rip.c 2018-01-02 16:24:55.929944628 +0100 >+++ vcdimager-0.7.24/frontends/xml/vcd_xml_rip.c 2018-01-02 17:31:42.343603890 +0100 >@@ -18,7 +18,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > /* Private headers */ > #include "vcd_read.h" > #include "vcdxml.h" >@@ -81,10 +81,10 @@ > { > case _STAT_DIR: > { >- struct filesystem_t *p_fs >+ struct filesystem_t *p_fs > = calloc(1, sizeof (struct filesystem_t)); > _cdio_list_append (p_vcdxml->filesystem, p_fs); >- >+ > p_fs->name = strdup (pathname); > } > break; >@@ -103,7 +103,7 @@ > { > char namebuf2[strlen (namebuf) + 2]; > int i; >- >+ > namebuf2[0] = '_'; > > for (i = 0; namebuf[i]; i++) >@@ -123,18 +123,18 @@ > if (p_fs->file_raw) > { > if (p_fs->size % ISO_BLOCKSIZE == 0) >- { >+ { > p_fs->size /= ISO_BLOCKSIZE; > p_fs->size *= M2RAW_SECTOR_SIZE; > } > else if (p_fs->size % M2RAW_SECTOR_SIZE == 0) > vcd_warn ("detected wrong size calculation for form2 file `%s'; fixing up", namebuf); >- else >+ else > vcd_error ("form2 file has invalid file size"); > } > } > break; >- >+ > default: > vcd_assert_not_reached (); > break; >@@ -142,10 +142,10 @@ > } > > static int >-_parse_isofs_r (vcdxml_t *p_vcdxml, CdIo_t *p_cdio, >+_parse_isofs_r (vcdxml_t *p_vcdxml, CdIo_t *p_cdio, > const char pathname[]) >-{ >- CdioList_t *entlist = iso9660_fs_readdir (p_cdio, pathname, true); >+{ >+ CdioList_t *entlist = iso9660_fs_readdir (p_cdio, pathname); > CdioListNode_t *entnode; > > if (entlist == NULL) >@@ -162,8 +162,8 @@ > > if (NULL == statbuf) > return -1; >- >- if (!strcmp (_name, ".") >+ >+ if (!strcmp (_name, ".") > || !strcmp (_name, "..") > || !strcmp (_name, "MPEGAV") > || !strcmp (_name, "MPEG2") >@@ -184,7 +184,7 @@ > } > } > >- _cdio_list_free (entlist, true); >+ _cdio_list_free (entlist, true, NULL); > > return 0; > } >@@ -313,7 +313,7 @@ > track_t track = vcdinf_get_track(&entries, idx); > bool newtrack = (track != ltrack); > ltrack = track; >- >+ > vcd_assert (extent >= CDIO_PREGAP_SECTORS); > extent = cdio_lba_to_lsn(extent); > >@@ -339,7 +339,7 @@ > > snprintf (buf, sizeof (buf), "entry-%3.3d", idx); > p_new_sequence->default_entry_id = strdup (buf); >- >+ > _cdio_list_append (p_vcdxml->sequence_list, p_new_sequence); > } > else >@@ -348,7 +348,7 @@ > struct sequence_t *p_seq = > _cdio_list_node_data (_cdio_list_end (p_vcdxml->sequence_list)); > >- struct entry_point_t *p_entry = >+ struct entry_point_t *p_entry = > calloc(1, sizeof (struct entry_point_t)); > > snprintf (buf, sizeof (buf), "entry-%3.3d", idx); >@@ -370,7 +370,7 @@ > { > if (s) > return strdup (s); >- >+ > return NULL; > } > >@@ -390,7 +390,7 @@ > { > static char buf[80]; > vcdinfo_itemid_t itemid; >- >+ > vcdinfo_classify_itemid (pin, &itemid); > > switch(itemid.type) { >@@ -419,14 +419,14 @@ > static char buf[80]; > unsigned sl_num = 0, el_num = 0, pl_num = 0; > vcdinfo_offset_t *ofs = NULL; >- >+ > if (offset == PSD_OFS_DISABLED) > return NULL; > > _CDIO_LIST_FOREACH (node, _ctx->offset_list) > { > ofs = _cdio_list_node_data (node); >- >+ > switch (ofs->type) > { > case PSD_TYPE_PLAY_LIST: >@@ -506,19 +506,19 @@ > p_pbc = vcd_pbc_new (PBC_PLAYLIST); > { > const PsdPlayListDescriptor_t *d = (const void *) _buf; >- p_pbc->prev_id = _xstrdup (_ofs2id (vcdinf_pld_get_prev_offset(d), >+ p_pbc->prev_id = _xstrdup (_ofs2id (vcdinf_pld_get_prev_offset(d), > _ctx)); > p_pbc->next_id = _xstrdup (_ofs2id (vcdinf_pld_get_next_offset(d), > _ctx)); > p_pbc->retn_id = _xstrdup (_ofs2id (vcdinf_pld_get_return_offset(d), > _ctx)); >- >+ > p_pbc->playing_time = (double) (vcdinf_get_play_time(d)) / 15.0; > p_pbc->wait_time = vcdinf_get_wait_time(d); > p_pbc->auto_pause_time = vcdinf_get_autowait_time(d); > > for (n = 0; n < vcdinf_pld_get_noi(d); n++) { >- _cdio_list_append (p_pbc->item_id_list, >+ _cdio_list_append (p_pbc->item_id_list, > _xstrdup(_pin2id(vcdinf_pld_get_play_item(d,n) > ))); > } >@@ -531,9 +531,9 @@ > { > const PsdSelectionListDescriptor_t *d = (const void *) _buf; > p_pbc->bsn = vcdinf_get_bsn(d); >- p_pbc->prev_id = _xstrdup (_ofs2id (vcdinf_psd_get_prev_offset(d), >+ p_pbc->prev_id = _xstrdup (_ofs2id (vcdinf_psd_get_prev_offset(d), > _ctx)); >- p_pbc->next_id = _xstrdup (_ofs2id (vcdinf_psd_get_next_offset(d), >+ p_pbc->next_id = _xstrdup (_ofs2id (vcdinf_psd_get_next_offset(d), > _ctx)); > p_pbc->retn_id = _xstrdup (_ofs2id (vcdinf_psd_get_return_offset(d), > _ctx)); >@@ -562,7 +562,7 @@ > break; > } > >- p_pbc->timeout_id = _xstrdup (_ofs2id (vcdinf_get_timeout_offset(d), >+ p_pbc->timeout_id = _xstrdup (_ofs2id (vcdinf_get_timeout_offset(d), > _ctx)); > p_pbc->timeout_time = vcdinf_get_timeout_time (d); > p_pbc->jump_delayed = vcdinf_has_jump_delay(d); >@@ -571,7 +571,7 @@ > > for (n = 0; n < vcdinf_get_num_selections(d); n++) > { >- _cdio_list_append (p_pbc->select_id_list, >+ _cdio_list_append (p_pbc->select_id_list, > _xstrdup(_ofs2id(vcdinf_psd_get_offset(d,n), > _ctx))); > } >@@ -579,7 +579,7 @@ > if (d->type == PSD_TYPE_EXT_SELECTION_LIST > || d->flags.SelectionAreaFlag) > { >- PsdSelectionListDescriptorExtended_t *d2 = >+ PsdSelectionListDescriptorExtended_t *d2 = > (void *) &d->ofs[d->nos]; > > p_pbc->prev_area = calloc(1, sizeof (pbc_area_t)); >@@ -601,7 +601,7 @@ > _cdio_list_append (p_pbc->select_area_list, p_area); > } > >- vcd_assert (_cdio_list_length (p_pbc->select_area_list) >+ vcd_assert (_cdio_list_length (p_pbc->select_area_list) > == _cdio_list_length (p_pbc->select_id_list)); > } > } >@@ -611,10 +611,10 @@ > p_pbc = vcd_pbc_new (PBC_END); > { > const PsdEndListDescriptor_t *d = (const void *) _buf; >- >+ > p_pbc->next_disc = d->next_disc; > p_pbc->image_id = _xstrdup (_pin2id (uint16_from_be (d->change_pic))); >- } >+ } > break; > > default: >@@ -632,7 +632,7 @@ > } > > static void >-_visit_pbc (pbc_ctx_t *p_pbc_ctx, lid_t lid, unsigned int offset, >+_visit_pbc (pbc_ctx_t *p_pbc_ctx, lid_t lid, unsigned int offset, > bool in_lot) > { > CdioListNode_t *node; >@@ -683,7 +683,7 @@ > */ > ofs->lid = lid; > } >- >+ > return; /* already been there... */ > } > } >@@ -700,13 +700,13 @@ > case PSD_TYPE_PLAY_LIST: > _cdio_list_append (p_pbc_ctx->offset_list, ofs); > { >- const PsdPlayListDescriptor_t *d = >+ const PsdPlayListDescriptor_t *d = > (const void *) (p_pbc_ctx->psd + _rofs); > const lid_t lid = vcdinf_pld_get_lid(d); > > if (!ofs->lid) > ofs->lid = lid; >- else >+ else > if (ofs->lid != lid) > vcd_warn ("LOT entry assigned LID %d, but descriptor has LID %d", > ofs->lid, lid); >@@ -729,7 +729,7 @@ > > if (!ofs->lid) > ofs->lid = lid; >- else >+ else > if (ofs->lid != lid) > vcd_warn ("LOT entry assigned LID %d, but descriptor has LID %d", > ofs->lid, lid); >@@ -742,7 +742,7 @@ > > for (idx = 0; idx < vcdinf_get_num_selections(d); idx++) > _visit_pbc (p_pbc_ctx, 0, vcdinf_psd_get_offset (d, idx), false); >- >+ > } > break; > >@@ -768,7 +768,7 @@ > if ((tmp = vcdinf_get_lot_offset(lot, n)) != PSD_OFS_DISABLED) > _visit_pbc (p_pbc_ctx, n + 1, tmp, true); > >- _vcd_list_sort (p_pbc_ctx->offset_list, >+ _vcd_list_sort (p_pbc_ctx->offset_list, > (_cdio_list_cmp_func_t) vcdinf_lid_t_cmp); > } > >@@ -798,7 +798,7 @@ > extended = true; > _lot_vcd_sector = statbuf->lsn; > vcd_assert (statbuf->size == ISO_BLOCKSIZE * LOT_VCD_SIZE); >- } >+ } > > free(statbuf); > if (extended && >@@ -817,9 +817,9 @@ > else { > if (extended) > vcd_info ("ignoring detected extended VCD2.0 PBC files"); >- >+ > _pbc_ctx.extended = false; >- >+ > _lot_vcd_sector = LOT_VCD_SECTOR; > _psd_vcd_sector = PSD_VCD_SECTOR; > _psd_size = p_vcdxml->info.psd_size; >@@ -832,16 +832,16 @@ > _pbc_ctx.offset_list = _cdio_list_new (); > > /* read in LOT */ >- >+ > _pbc_ctx.lot = calloc(1, ISO_BLOCKSIZE * LOT_VCD_SIZE); >- >- if (cdio_read_mode2_sectors (p_cdio, _pbc_ctx.lot, _lot_vcd_sector, false, >+ >+ if (cdio_read_mode2_sectors (p_cdio, _pbc_ctx.lot, _lot_vcd_sector, false, > LOT_VCD_SIZE)) { >- _cdio_list_free (_pbc_ctx.offset_list, true); >+ _cdio_list_free (_pbc_ctx.offset_list, true, NULL); > free(_pbc_ctx.lot); > return -1; > } >- >+ > > /* read in PSD */ > >@@ -853,7 +853,7 @@ > rc = -1; > goto free_and_return; > } >- >+ > > /* traverse it */ > >@@ -865,13 +865,13 @@ > pbc_t *_pbc; > > vcd_assert (ofs->offset != PSD_OFS_DISABLED); >- >+ > if ((_pbc = _pbc_node_read (&_pbc_ctx, ofs->offset))) > _cdio_list_append (p_vcdxml->pbc_list, _pbc); > } > > free_and_return: >- _cdio_list_free (_pbc_ctx.offset_list, true); >+ _cdio_list_free (_pbc_ctx.offset_list, true, NULL); > free(_pbc_ctx.lot); > free(_pbc_ctx.psd); > return 0; >@@ -881,7 +881,7 @@ > _rip_isofs (vcdxml_t *p_vcdxml, CdIo_t *p_cdio) > { > CdioListNode_t *node; >- >+ > _CDIO_LIST_FOREACH (node, p_vcdxml->filesystem) > { > struct filesystem_t *_fs = _cdio_list_node_data (node); >@@ -892,9 +892,9 @@ > if (!_fs->file_src) > continue; > >- vcd_info ("extracting %s to %s (lsn %u, size %u, raw %d)", >+ vcd_info ("extracting %s to %s (lsn %u, size %u, raw %d)", > _fs->name, _fs->file_src, >- (unsigned int) _fs->lsn, (unsigned int) _fs->size, >+ (unsigned int) _fs->lsn, (unsigned int) _fs->size, > _fs->file_raw); > > if (!(outfd = fopen (_fs->file_src, "wb"))) >@@ -927,7 +927,7 @@ > perror ("ftruncate()"); > > fclose (outfd); >- >+ > } > > return 0; >@@ -956,7 +956,7 @@ > memset (&mpeg_ctx, 0, sizeof (VcdMpegStreamCtx)); > > vcd_info ("extracting %s... (start lsn %u, %d segments)", >- p_seg->src, (unsigned int) start_extent, >+ p_seg->src, (unsigned int) start_extent, > p_seg->segments_count); > > if (!(outfd = fopen (p_seg->src, "wb"))) >@@ -977,8 +977,8 @@ > > memset (&buf, 0, sizeof (buf)); > cdio_read_mode2_sector (p_cdio, &buf, start_extent + n, true); >- >- if (!buf.subheader[0] >+ >+ if (!buf.subheader[0] > && !buf.subheader[1] > && (buf.subheader[2] | SM_FORM2) == SM_FORM2 > && !buf.subheader[3]) >@@ -1002,7 +1002,7 @@ > if (buf.subheader[2] & SM_TRIG) > { > double *_ap_ts = calloc(1, sizeof (double)); >- >+ > vcd_debug ("autopause @%u (%f)", (unsigned int) n, last_pts); > *_ap_ts = last_pts; > >@@ -1060,19 +1060,19 @@ > vcd_info("Track %d selected, skipping track %d", i_track,counter-1); > continue; > } >- >+ > if (i_track < 0 && -i_track==counter++) { > vcd_info("Skipping track %d", -i_track); > continue; > } >- >+ > memset (&mpeg_ctx, 0, sizeof (VcdMpegStreamCtx)); > > start_lsn = _seq->start_extent; > end_lsn = _nseq ? _nseq->start_extent : cdio_get_disc_last_lsn (p_cdio); > > vcd_info ("extracting %s... (start lsn %lu (+%lu))", >- _seq->src, (long unsigned int) start_lsn, >+ _seq->src, (long unsigned int) start_lsn, > (long unsigned int) (end_lsn - start_lsn)); > > if (!(outfd = fopen (_seq->src, "wb"))) >@@ -1101,7 +1101,7 @@ > const int secs_left = end_lsn - n; > > memset (buf, 0, sizeof (buf)); >- cdio_read_mode2_sectors (p_cdio, buf, n, true, (secs_left > 15 >+ cdio_read_mode2_sectors (p_cdio, buf, n, true, (secs_left > 15 > ? 15 : secs_left)); > } > >@@ -1113,7 +1113,7 @@ > vcd_warn ("encountered non-form2 sector -- leaving loop"); > break; > } >- >+ > if (in_data) > { /* end conditions... */ > if (!buf[buf_idx].subheader[0]) >@@ -1124,7 +1124,7 @@ > > if (!(buf[buf_idx].subheader[2] & SM_REALT)) > { >- vcd_debug ("subheader: no realtime data anymore @%u", >+ vcd_debug ("subheader: no realtime data anymore @%u", > (unsigned int) n); > break; > } >@@ -1150,7 +1150,7 @@ > { > CdioListNode_t *_node; > >- vcd_mpeg_parse_packet (buf[buf_idx].data, M2F2_SECTOR_SIZE, >+ vcd_mpeg_parse_packet (buf[buf_idx].data, M2F2_SECTOR_SIZE, > false, &mpeg_ctx); > > if (!mpeg_ctx.packet.zero) >@@ -1158,7 +1158,7 @@ > > if (!first_data && !mpeg_ctx.packet.zero) > first_data = n; >- >+ > if (mpeg_ctx.packet.has_pts) > { > last_pts = mpeg_ctx.packet.pts; >@@ -1173,25 +1173,25 @@ > { > double *_ap_ts = calloc(1, sizeof (double)); > >- vcd_debug ("autopause @%u (%f)", (unsigned int) n, >+ vcd_debug ("autopause @%u (%f)", (unsigned int) n, > last_pts); > *_ap_ts = last_pts; > > _cdio_list_append (_seq->autopause_list, _ap_ts); > } >- >+ > _CDIO_LIST_FOREACH (_node, _seq->entry_point_list) > { > struct entry_point_t *_ep = _cdio_list_node_data (_node); > > if (_ep->extent == n) > { >- vcd_debug ("entry point @%u (%f)", (unsigned int) n, >+ vcd_debug ("entry point @%u (%f)", (unsigned int) n, > last_pts); > _ep->timestamp = last_pts; > } > } >- >+ > if (first_data) > { > fwrite (buf[buf_idx].data, M2F2_SECTOR_SIZE, 1, outfd); >@@ -1204,14 +1204,14 @@ > } > > } /* if (in_data) */ >- >+ > if (buf[buf_idx].subheader[2] & SM_EOF) > { > vcd_debug ("encountered subheader EOF @%u", (unsigned int) n); > break; > } > } /* for */ >- >+ > _progress.done = _progress.total; > vcd_xml_read_progress_cb (&_progress, _seq->src); > >@@ -1221,10 +1221,10 @@ > > if (n == end_lsn) > vcd_debug ("stream till end of track"); >- >+ > length = (1 + last_nonzero) - first_data; > >- vcd_debug ("truncating file to %u packets", >+ vcd_debug ("truncating file to %u packets", > (unsigned int) length); > > fflush (outfd); >@@ -1241,7 +1241,7 @@ > static vcd_log_handler_t gl_default_vcd_log_handler = NULL; > static cdio_log_handler_t gl_default_cdio_log_handler = NULL; > >-static void >+static void > _vcd_log_handler (vcd_log_level_t level, const char message[]) > { > if (level == VCD_LOG_DEBUG && !_verbose_flag) >@@ -1249,7 +1249,7 @@ > > if (level == VCD_LOG_INFO && _quiet_flag) > return; >- >+ > gl_default_vcd_log_handler (level, message); > } > >@@ -1279,8 +1279,8 @@ > int _track_flag=0; > int _x_track_flag=0; > >- enum { >- OP_SOURCE_UNDEF = DRIVER_UNKNOWN, >+ enum { >+ OP_SOURCE_UNDEF = DRIVER_UNKNOWN, > OP_SOURCE_BINCUE= DRIVER_BINCUE, > OP_SOURCE_NRG = DRIVER_NRG, > OP_SOURCE_CDRDAO= DRIVER_CDRDAO, >@@ -1293,7 +1293,7 @@ > vcd_xml_init (&vcdxml); > > gl_default_vcd_log_handler = vcd_log_set_handler (_vcd_log_handler); >- gl_default_cdio_log_handler = >+ gl_default_cdio_log_handler = > cdio_log_set_handler ( (cdio_log_handler_t) _vcd_log_handler); > > { >@@ -1304,19 +1304,19 @@ > "specify xml file for output (default: '" DEFAULT_XML_FNAME "')", > "FILE"}, > >- {"bin-file", 'b', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, >+ {"bin-file", 'b', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, > OP_SOURCE_BINCUE, >- "set image file as source (default: '" DEFAULT_IMG_FNAME "')", >+ "set image file as source (default: '" DEFAULT_IMG_FNAME "')", > "FILE"}, > >- {"cue-file", 'c', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, >+ {"cue-file", 'c', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, > OP_SOURCE_BINCUE, "set \"cue\" CD-ROM disk image file as source", "FILE"}, > >- {"nrg-file", 'N', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, >+ {"nrg-file", 'N', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, > OP_SOURCE_NRG, "set Nero CD-ROM disk image image file as source", > "FILE"}, > >- {"toc-file", '\0', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, >+ {"toc-file", '\0', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, > OP_SOURCE_CDRDAO, "set \"toc\" CD-ROM disk image file as source", "FILE"}, > {"cdrom-device", 'C', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, > OP_SOURCE_CDROM,"set CDROM device as source", "DEVICE"}, >@@ -1324,8 +1324,8 @@ > {"sector-2336", '\0', POPT_ARG_NONE, §or_2336_flag, 0, > "use 2336 byte sector mode for image file"}, > >- {"input", 'i', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, >- OP_SOURCE_UNDEF, >+ {"input", 'i', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, >+ OP_SOURCE_UNDEF, > "set source and determine if \"bin\" image or device", "FILE"}, > > {"no-ext-psd", '\0', POPT_ARG_NONE, &no_ext_psd_flag, 0, >@@ -1346,29 +1346,29 @@ > {"nosegments", '\0', POPT_ARG_NONE, &noseg_flag, 0, > "don't extract segment play items"}, > >- {"progress", 'p', POPT_ARG_NONE, &_progress_flag, 0, >- "show progress"}, >+ {"progress", 'p', POPT_ARG_NONE, &_progress_flag, 0, >+ "show progress"}, > > { "track", 't', POPT_ARG_INT, &_track_flag, 0, > "rip only this track"}, >- >+ > { "notrack", 'T', POPT_ARG_INT, &_x_track_flag, 0, > "do not rip this track"}, >- >+ > { "filename-encoding", '\0', POPT_ARG_STRING, &vcd_xml_filename_charset, 0, > "use given charset encoding for filenames instead of UTF8" }, > >- {"verbose", 'v', POPT_ARG_NONE, &_verbose_flag, 0, >+ {"verbose", 'v', POPT_ARG_NONE, &_verbose_flag, 0, > "be verbose"}, >- >- {"quiet", 'q', POPT_ARG_NONE, &_quiet_flag, 0, >+ >+ {"quiet", 'q', POPT_ARG_NONE, &_quiet_flag, 0, > "show only critical messages"}, > > {"gui", '\0', POPT_ARG_NONE, &_gui_flag, 0, "enable GUI mode"}, > > {"version", 'V', POPT_ARG_NONE, NULL, OP_VERSION, > "display version and copyright information and exit"}, >- >+ > POPT_AUTOHELP {NULL, 0, 0, NULL, 0} > }; > >@@ -1396,9 +1396,9 @@ > } > source_type = opt; > break; >- >+ > default: >- fprintf (stderr, "%s: %s\n", >+ fprintf (stderr, "%s: %s\n", > poptBadOption(optCon, POPT_BADOPTION_NOALIAS), > poptStrerror(opt)); > fprintf (stderr, "error while parsing command line - try --help\n"); >@@ -1409,7 +1409,7 @@ > > if (_verbose_flag && _quiet_flag) > vcd_error ("I can't be both, quiet and verbose... either one or another ;-)"); >- >+ > if (poptGetArgs (optCon) != NULL) > vcd_error ("Why are you giving me non-option arguments? -- try --help"); > >@@ -1437,7 +1437,7 @@ > */ > if (NULL == source_name && source_type == DRIVER_UNKNOWN) { > char **cd_drives=NULL; >- cd_drives = cdio_get_devices_with_cap(NULL, >+ cd_drives = cdio_get_devices_with_cap(NULL, > (CDIO_FS_ANAL_SVCD|CDIO_FS_ANAL_CVD|CDIO_FS_ANAL_VIDEOCD > |CDIO_FS_UNKNOWN), > true); >@@ -1453,18 +1453,18 @@ > vcd_error ("Error determining place to read from."); > exit (EXIT_FAILURE); > } >- >- if (NULL == source_name) >+ >+ if (NULL == source_name) > source_name = cdio_get_default_device(img_src); > >- vcdxml.comment = vcd_xml_dump_cl_comment (argc, argv, >+ vcdxml.comment = vcd_xml_dump_cl_comment (argc, argv, > nocommand_comment_flag); > > /* start with ISO9660 PVD */ > _parse_pvd (&vcdxml, img_src); > >- _parse_isofs (&vcdxml, img_src); >- >+ _parse_isofs (&vcdxml, img_src); >+ > /* needs to be parsed in order */ > _parse_info (&vcdxml, img_src); > _parse_entries (&vcdxml, img_src); >@@ -1473,7 +1473,7 @@ > _parse_pbc (&vcdxml, img_src, no_ext_psd_flag); > > if (_x_track_flag) _track_flag = - _x_track_flag; >- >+ > if (norip_flag || noseq_flag || noseg_flag || _track_flag) { > vcd_warn ("Entry offsets inside sequence-items may incorrect..."); > vcd_warn ("and auto-pause locations might not be checked."); >diff -ur vcdimager-0.7.24.ORIG/include/libvcd/files.h vcdimager-0.7.24/include/libvcd/files.h >--- vcdimager-0.7.24.ORIG/include/libvcd/files.h 2005-05-08 05:48:55.000000000 +0200 >+++ vcdimager-0.7.24/include/libvcd/files.h 2018-01-02 16:27:31.293936067 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifndef VCDFILES_H > #define VCDFILES_H > >@@ -58,7 +58,7 @@ > void > set_entries_vcd(VcdObj_t *p_vcdobj, void *p_buf); > >-void >+void > set_info_vcd (VcdObj_t *p_vcdobj, void *p_buf); > > uint32_t >@@ -73,13 +73,13 @@ > void > set_tracks_svd (VcdObj_t *p_vcdobj, void *p_buf); > >-uint32_t >+uint32_t > get_search_dat_size (const VcdObj_t *p_vcdobj); > > void > set_search_dat (VcdObj_t *p_vcdobj, void *p_buf); > >-uint32_t >+uint32_t > get_scandata_dat_size (const VcdObj_t *p_vcdobj); > > void >@@ -91,8 +91,8 @@ > > #endif /* VCDFILES_H */ > >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/include/libvcd/files_private.h vcdimager-0.7.24/include/libvcd/files_private.h >--- vcdimager-0.7.24.ORIG/include/libvcd/files_private.h 2005-05-08 10:42:49.000000000 +0200 >+++ vcdimager-0.7.24/include/libvcd/files_private.h 2018-01-02 16:27:31.292936067 +0100 >@@ -20,7 +20,7 @@ > > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifndef __VCD_FILES_PRIVATE_H__ > #define __VCD_FILES_PRIVATE_H__ > >@@ -34,10 +34,10 @@ > #define ENTRIES_ID_SVCD "ENTRYVCD" /* not ENTRYSVD! */ > > #define ENTRIES_VERSION_VCD 0x01 >-#define ENTRIES_SPTAG_VCD 0x00 >+#define ENTRIES_SPTAG_VCD 0x00 > > #define ENTRIES_VERSION_VCD11 0x01 >-#define ENTRIES_SPTAG_VCD11 0x00 >+#define ENTRIES_SPTAG_VCD11 0x00 > > #define ENTRIES_VERSION_VCD2 0x02 > #define ENTRIES_SPTAG_VCD2 0x00 >@@ -74,13 +74,13 @@ > #define INFO_ID_HQVCD "HQ-VCD " > > #define INFO_VERSION_VCD 0x01 >-#define INFO_SPTAG_VCD 0x00 >+#define INFO_SPTAG_VCD 0x00 > > #define INFO_VERSION_VCD11 0x01 >-#define INFO_SPTAG_VCD11 0x01 >+#define INFO_SPTAG_VCD11 0x01 > > #define INFO_VERSION_VCD2 0x02 >-#define INFO_SPTAG_VCD2 0x00 >+#define INFO_SPTAG_VCD2 0x00 > > #define INFO_VERSION_SVCD 0x01 > #define INFO_SPTAG_SVCD 0x00 >@@ -102,8 +102,8 @@ > 0x1 ==> restricted category 1, > 0x2 ==> restricted category 2, > 0x3 ==> restricted category 3 */ >- bool special_info : 1; /**< Special Information is >- encoded >+ bool special_info : 1; /**< Special Information is >+ encoded > in the pictures */ > bool user_data_cc : 1; /**< MPEG User Data is used > for Closed Caption */ >@@ -112,13 +112,13 @@ > disc has the same album > id then start the next > disc at List ID #2, >- otherwise List ID #1 */ >+ otherwise List ID #1 */ > bool use_track3 : 1; /**< If == 1 and the PSD is > not interpreted and > next disc has same album > id, then start next disc > with track 3, otherwise >- start with track 2 */ >+ start with track 2 */ > bool pbc_x : 1; /**< extended PBC available */ > #else > bool pbc_x : 1; >@@ -143,7 +143,7 @@ > VCD_FILES_VIDEO_PAL_MOTION = 7 > }; > >-typedef struct >+typedef struct > { > #if defined(BITFIELD_LSBF) > bitfield_t audio_type : 2; /**< Audio characteristics: >@@ -152,7 +152,7 @@ > stream without extension > 0x2 - Two MPEG1 or MPEG2 audio > streams without extension >- 0x3 - One MPEG2 multi-channel >+ 0x3 - One MPEG2 multi-channel > audio stream w/ extension*/ > bitfield_t video_type : 3; /**< Video characteristics: > 0x0 - No MPEG video data >@@ -163,16 +163,16 @@ > 0x5 - PAL still picture > 0x6 - Reserved (PAL hires?) > 0x7 - PAL motion picture */ >- bool item_cont : 1; /**< Indicates segment is >+ bool item_cont : 1; /**< Indicates segment is > continuation > 0x0 - 1st or only segment of item > 0x1 - 2nd or later > segment of item */ >- bitfield_t ogt : 2; /**< 0x0 - no OGT substream >+ bitfield_t ogt : 2; /**< 0x0 - no OGT substream > 0x1 - sub-stream 0 available >- 0x2 - sub-stream 0 & 1 >+ 0x2 - sub-stream 0 & 1 > available >- 0x3 - all OGT sub-substreams >+ 0x3 - all OGT sub-substreams > available */ > #else > bitfield_t ogt : 2; >@@ -189,14 +189,14 @@ > VCD, "SUPERVCD" or > "HQ-VCD " for SVCD */ > uint8_t version; /**< 0x02 -- VCD2.0, >- 0x01 for SVCD and VCD1.x */ >+ 0x01 for SVCD and VCD1.x */ > uint8_t sys_prof_tag; /**< System Profile Tag, used > to define the set of > mandatory parts to be > applied for compatibility; > 0x00 for "SUPERVCD", > 0x01 for "HQ-VCD ", >- 0x0n for VCDx.n */ >+ 0x0n for VCDx.n */ > char album_desc[16]; /**< album identification/desc. */ > uint16_t vol_count; /**< number of volumes in album */ > uint16_t vol_id; /**< number id of this volume in album */ >@@ -215,8 +215,8 @@ > uint16_t lot_entries; /**< offsets in lot */ > uint16_t item_count; /**< segments used for segmentitems */ > InfoSpiContents_t spi_contents[MAX_SEGMENTS]; /**< The next 1980 bytes >- contain one byte for each >- possible segment play item. >+ contain one byte for each >+ possible segment play item. > Each byte indicates > contents. */ > >@@ -287,7 +287,7 @@ > bitfield_t reserved : 6; > bool CommandListFlag : 1; > bool SelectionAreaFlag : 1; >-#endif >+#endif > } GNUC_PACKED PsdSelectionListFlags_t; > > #define PsdSelectionListFlags_t_SIZEOF 1 >@@ -385,10 +385,10 @@ > 0x03 : NTSC video > 0x07 : PAL video */ > bool reserved1 : 1; /**< Reserved, must be zero */ >- bitfield_t ogt : 2; /**< 0x0 - no OGT substream >+ bitfield_t ogt : 2; /**< 0x0 - no OGT substream > 0x1 - sub-stream 0 available > 0x2 - sub-stream 0 & 1 available >- 0x3 - all OGT sub-substreams >+ 0x3 - all OGT sub-substreams > available */ > #else > bitfield_t ogt : 2; >@@ -408,7 +408,7 @@ > #define TRACKS_SVD_VERSION 0x01 > > typedef struct { >- char file_id[sizeof(TRACKS_SVD_FILE_ID)-1]; /**< == "TRACKSVD" with out >+ char file_id[sizeof(TRACKS_SVD_FILE_ID)-1]; /**< == "TRACKSVD" with out > final NULL byte */ > uint8_t version; /**< == 0x01 */ > uint8_t reserved; /**< Reserved, must be zero */ >@@ -454,7 +454,7 @@ > #define SEARCH_TIME_INTERVAL 0x01 > > typedef struct { >- char file_id[sizeof(SEARCH_FILE_ID)-1]; /**< == "SEARCHSV" without final >+ char file_id[sizeof(SEARCH_FILE_ID)-1]; /**< == "SEARCHSV" without final > NULL byte */ > uint8_t version; /**< = 0x01 */ > uint8_t reserved; /**< Reserved, must be zero */ >@@ -467,7 +467,7 @@ > > #define SearchDat_t_SIZEOF 13 > >-/* SPICONTX.SVD >+/* SPICONTX.SVD > */ > > #define SPICONTX_FILE_ID "SPICONSV" >@@ -499,7 +499,7 @@ > uint8_t version; /**< = 0x02 */ > uint8_t reserved; /**< Reserved, must be zero */ > uint16_t scan_points; /**< the number of scan points */ >- msf_t points[EMPTY_ARRAY_SIZE]; /**< actual scan points >+ msf_t points[EMPTY_ARRAY_SIZE]; /**< actual scan points > points[time(iframe)/0.5] */ > } GNUC_PACKED ScandataDat_v2_t; > >@@ -519,11 +519,11 @@ > uint8_t reserved; /**< Reserved, must be zero */ > uint16_t scandata_count; /**< number of 3-byte entries in > the table */ >- uint16_t track_count; /**< number of MPEG tracks on >+ uint16_t track_count; /**< number of MPEG tracks on > disc */ >- uint16_t spi_count; /**< number of consecutively >- recorded play item segments >- (as opposed to the number of >+ uint16_t spi_count; /**< number of consecutively >+ recorded play item segments >+ (as opposed to the number of > segment play items). */ > msf_t cum_playtimes[EMPTY_ARRAY_SIZE]; /**< cumulative playing > time up to track >@@ -548,7 +548,7 @@ > following scandata table > where the MPEG track > scan points start */ >- >+ > /* The scandata table starts here */ > struct { > uint8_t track_num; /* Track number as in TOC */ >@@ -569,8 +569,8 @@ > > #endif /* __VCD_FILES_PRIVATE_H__ */ > >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/include/libvcd/inf.h vcdimager-0.7.24/include/libvcd/inf.h >--- vcdimager-0.7.24.ORIG/include/libvcd/inf.h 2005-07-16 17:15:57.000000000 +0200 >+++ vcdimager-0.7.24/include/libvcd/inf.h 2018-01-02 16:27:31.290936067 +0100 >@@ -21,7 +21,7 @@ > \endverbatim > */ > >-/* >+/* > Things here refer to lower-level structures using a structure other > than vcdinfo_t. For higher-level structures via the vcdinfo_t, see > info.h >@@ -31,7 +31,7 @@ > #define _VCD_INF_H > > #include <libvcd/info.h> >- >+ > #ifdef __cplusplus > extern "C" { > #endif /* __cplusplus */ >@@ -48,18 +48,18 @@ > Time is in seconds unless it is -1 (unlimited). > */ > int vcdinf_get_autowait_time (const PsdPlayListDescriptor_t *d); >- >+ > /*! > Return the base selection number. VCD_INVALID_BSN is returned if there > is an error. > */ > unsigned int vcdinf_get_bsn(const PsdSelectionListDescriptor_t *psd); >- >+ > /*! Return the starting LBA (logical block address) for sequence > entry_num in obj. VCDINFO_NULL_LBA is returned if there is no entry. > The first entry number is 0. > */ >- lba_t vcdinf_get_entry_lba(const EntriesVcd_t *entries, >+ lba_t vcdinf_get_entry_lba(const EntriesVcd_t *entries, > unsigned int entry_num); > > const char * vcdinf_get_format_version_str (vcd_type_t vcd_type); >@@ -68,29 +68,29 @@ > Return loop count. 0 is infinite loop. > */ > uint16_t vcdinf_get_loop_count (const PsdSelectionListDescriptor_t *psd); >- >+ > /*! > Return LOT offset > */ > uint16_t vcdinf_get_lot_offset (const LotVcd_t *lot, unsigned int n); > > /*! >- Return number of bytes in PSD. >+ Return number of bytes in PSD. > */ > uint32_t vcdinf_get_psd_size (const InfoVcd_t *info); >- >+ > /*! >- Return the number of segments in the VCD. >+ Return the number of segments in the VCD. > */ > unsigned int vcdinf_get_num_entries(const EntriesVcd_t *entries); > > /*! >- Return number of LIDs. >+ Return number of LIDs. > */ > lid_t vcdinf_get_num_LIDs (const InfoVcd_t *info); > > /*! >- Return the number of segments in the VCD. >+ Return the number of segments in the VCD. > */ > segnum_t vcdinf_get_num_segments(const InfoVcd_t *info); > >@@ -104,25 +104,25 @@ > Time is in 1/15-second units. > */ > uint16_t vcdinf_get_play_time (const PsdPlayListDescriptor_t *d); >- >+ > /*! >- Get timeout offset for PsdPlayListDescriptor *d. Return >+ Get timeout offset for PsdPlayListDescriptor *d. Return > VCDINFO_INVALID_OFFSET if d is NULL; > Time is in seconds unless it is -1 (unlimited). > */ > uint16_t vcdinf_get_timeout_offset (const PsdSelectionListDescriptor_t *d); >- >+ > /*! > Get timeout wait value for PsdPlayListDescriptor *d. > Time is in seconds unless it is -1 (unlimited). > */ > int vcdinf_get_timeout_time (const PsdSelectionListDescriptor_t *d); >- >+ > /*! > Return the track number for entry n in obj. The first track starts >- at 1. >+ at 1. > */ >- track_t vcdinf_get_track(const EntriesVcd_t *entries, >+ track_t vcdinf_get_track(const EntriesVcd_t *entries, > const unsigned int entry_num); > > /*! >@@ -130,7 +130,7 @@ > This is a number between 1 and the volume count. > */ > unsigned int vcdinf_get_volume_num(const InfoVcd_t *info); >- >+ > /*! > Return the VCD volume count - the number of CD's in the collection. > */ >@@ -141,14 +141,14 @@ > Time is in seconds unless it is -1 (unlimited). > */ > int vcdinf_get_wait_time (const PsdPlayListDescriptor_t *d); >- >+ > /*! > Return true if loop has a jump delay > */ > bool vcdinf_has_jump_delay (const PsdSelectionListDescriptor_t *psd); > > /*! >- Comparison routine used in sorting. We compare LIDs and if those are >+ Comparison routine used in sorting. We compare LIDs and if those are > equal, use the offset. > Note: we assume an unassigned LID is 0 and this compares as a high value. > >@@ -157,34 +157,34 @@ > int vcdinf_lid_t_cmp (vcdinfo_offset_t *a, vcdinfo_offset_t *b); > > /** >- \brief Get next offset for a given PSD selector descriptor. >- \return VCDINFO_INVALID_OFFSET is returned on error or if pld has no >+ \brief Get next offset for a given PSD selector descriptor. >+ \return VCDINFO_INVALID_OFFSET is returned on error or if pld has no > "next" entry or pld is NULL. Otherwise the LID offset is returned. > */ > uint16_t vcdinf_pld_get_next_offset(const PsdPlayListDescriptor_t *pld); >- >+ > /*! >- Get the LID from a given play-list descriptor. >- VCDINFO_REJECTED_MASK is returned on error or pld is NULL. >+ Get the LID from a given play-list descriptor. >+ VCDINFO_REJECTED_MASK is returned on error or pld is NULL. > */ > uint16_t vcdinf_pld_get_lid(const PsdPlayListDescriptor_t *pld); >- >+ > /*! >- Return the playlist item i in d. >+ Return the playlist item i in d. > */ >- uint16_t vcdinf_pld_get_play_item(const PsdPlayListDescriptor_t *pld, >+ uint16_t vcdinf_pld_get_play_item(const PsdPlayListDescriptor_t *pld, > unsigned int i); > > /** >- \brief Get prev offset for a given PSD selector descriptor. >- \return VCDINFO_INVALID_OFFSET is returned on error or if pld has no >+ \brief Get prev offset for a given PSD selector descriptor. >+ \return VCDINFO_INVALID_OFFSET is returned on error or if pld has no > "prev" entry or pld is NULL. Otherwise the LID offset is returned. > */ > uint16_t vcdinf_pld_get_prev_offset(const PsdPlayListDescriptor_t *pld); >- >+ > /** >- \brief Get return offset for a given PLD selector descriptor. >- \return VCDINFO_INVALID_OFFSET is returned on error or if pld has no >+ \brief Get return offset for a given PLD selector descriptor. >+ \return VCDINFO_INVALID_OFFSET is returned on error or if pld has no > "return" entry or pld is NULL. Otherwise the LID offset is returned. > */ > uint16_t vcdinf_pld_get_return_offset(const PsdPlayListDescriptor_t *pld); >@@ -193,60 +193,60 @@ > Return number of items in LIDs. Return 0 if error or not found. > */ > int vcdinf_pld_get_noi (const PsdPlayListDescriptor_t *pld); >- >+ > /** >- * \brief Get next offset for a given PSD selector descriptor. >+ * \brief Get next offset for a given PSD selector descriptor. > * \return VCDINFO_INVALID_OFFSET is returned on error or if psd is > * NULL. Otherwise the LID offset is returned. > */ > uint16_t vcdinf_psd_get_default_offset(const PsdSelectionListDescriptor_t *psd); > > /*! >- Get the item id for a given selection-list descriptor. >- VCDINFO_REJECTED_MASK is returned on error or if psd is NULL. >+ Get the item id for a given selection-list descriptor. >+ VCDINFO_REJECTED_MASK is returned on error or if psd is NULL. > */ > uint16_t vcdinf_psd_get_itemid(const PsdSelectionListDescriptor_t *psd); > > /*! >- Get the LID from a given selection-list descriptor. >- VCDINFO_REJECTED_MASK is returned on error or psd is NULL. >+ Get the LID from a given selection-list descriptor. >+ VCDINFO_REJECTED_MASK is returned on error or psd is NULL. > */ > uint16_t vcdinf_psd_get_lid(const PsdSelectionListDescriptor_t *psd); >- >+ > /*! >- Get the LID rejected status for a given selection-list descriptor. >- true is also returned d is NULL. >+ Get the LID rejected status for a given selection-list descriptor. >+ true is also returned d is NULL. > */ > bool > vcdinf_psd_get_lid_rejected(const PsdSelectionListDescriptor_t *psd); >- >+ > /** >- \brief Get "next" offset for a given PSD selector descriptor. >- \return VCDINFO_INVALID_OFFSET is returned on error or if psd has no >+ \brief Get "next" offset for a given PSD selector descriptor. >+ \return VCDINFO_INVALID_OFFSET is returned on error or if psd has no > "next" entry or psd is NULL. Otherwise the LID offset is returned. > */ > lid_t vcdinf_psd_get_next_offset(const PsdSelectionListDescriptor_t *psd); >- >+ > /*! >- \brief Get offset entry_num for a given PSD selector descriptor. >+ \brief Get offset entry_num for a given PSD selector descriptor. > \param d PSD selector containing the entry_num we query > \param entry_num entry number that we want the LID offset for. > \return VCDINFO_INVALID_OFFSET is returned if d on error or d is > NULL. Otherwise the LID offset is returned. > */ >- uint16_t vcdinf_psd_get_offset(const PsdSelectionListDescriptor_t *d, >+ uint16_t vcdinf_psd_get_offset(const PsdSelectionListDescriptor_t *d, > unsigned int entry_num); > /** >- \brief Get "prev" offset for a given PSD selector descriptor. >- \return VCDINFO_INVALID_OFFSET is returned on error or if psd has no >+ \brief Get "prev" offset for a given PSD selector descriptor. >+ \return VCDINFO_INVALID_OFFSET is returned on error or if psd has no > "prev" > entry or psd is NULL. Otherwise the LID offset is returned. > */ > uint16_t vcdinf_psd_get_prev_offset(const PsdSelectionListDescriptor_t *psd); >- >+ > /** >- \brief Get "return" offset for a given PSD selector descriptor. >- \return VCDINFO_INVALID_OFFSET is returned on error or if psd has no >+ \brief Get "return" offset for a given PSD selector descriptor. >+ \return VCDINFO_INVALID_OFFSET is returned on error or if psd has no > "return" entry or psd is NULL. Otherwise the LID offset is returned. > */ > uint16_t vcdinf_psd_get_return_offset(const PsdSelectionListDescriptor_t *psd); >diff -ur vcdimager-0.7.24.ORIG/include/libvcd/info.h vcdimager-0.7.24/include/libvcd/info.h >--- vcdimager-0.7.24.ORIG/include/libvcd/info.h 2018-01-02 16:24:55.930944628 +0100 >+++ vcdimager-0.7.24/include/libvcd/info.h 2018-01-02 16:28:28.785932899 +0100 >@@ -20,9 +20,9 @@ > Software, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > \endverbatim > */ >-/* >+/* > Things here refer to higher-level structures usually accessed via >- vcdinfo_t. For lower-level access which generally use >+ vcdinfo_t. For lower-level access which generally use > structures other than vcdinfo_t, see inf.h > */ > >@@ -33,6 +33,9 @@ > #include <libvcd/version.h> > #include <libvcd/types.h> > #include <libvcd/files.h> >+ >+/* We don't want to pull in cdio's config */ >+#define __CDIO_CONFIG_H__ > #include <cdio/cdio.h> > #include <cdio/iso9660.h> > #include <cdio/ds.h> >@@ -44,7 +47,7 @@ > /*========== Move somewhere else? ================*/ > > /*! maximum # characters in an album id. */ >-#define MAX_ALBUM_LEN 16 >+#define MAX_ALBUM_LEN 16 > > /*! maximum # of selections allowed in a PBC selection list. */ > #define MAX_PBC_SELECTIONS 99 >@@ -67,9 +70,9 @@ > > /*========== End move somewhere else? ================*/ > >-/*! >+/*! > Portion of uint16_t which determines whether offset is >- rejected or not. >+ rejected or not. > */ > #define VCDINFO_REJECTED_MASK (0x8000) > >@@ -78,57 +81,57 @@ > */ > #define VCDINFO_OFFSET_MASK (VCDINFO_REJECTED_MASK-1) > >-/*! >+/*! > Portion of uint16_t which contains the lid. > */ > #define VCDINFO_LID_MASK (VCDINFO_REJECTED_MASK-1) > >-/*! >+/*! > Constant for invalid track number > */ > #define VCDINFO_INVALID_TRACK 0xFF > >-/*! >+/*! > Constant for invalid LID offset. > */ > #define VCDINFO_INVALID_OFFSET 0xFFFF > >-/*! >+/*! > Constant for ending or "leadout" track. > */ > #define VCDINFO_LEADOUT_TRACK 0xaa > >-/*! >+/*! > Constant for invalid sequence entry. > */ > #define VCDINFO_INVALID_ENTRY 0xFFFF > >-/*! >- Constant for invalid LID. >- FIXME: player needs these to be the same. >+/*! >+ Constant for invalid LID. >+ FIXME: player needs these to be the same. > VCDimager code requres 0 for an UNINITIALIZED LID. >- >+ > */ > #define VCDINFO_INVALID_LID VCDINFO_INVALID_ENTRY > #define VCDINFO_UNINIT_LID 0 > >-/*! >+/*! > Constant for invalid itemid > */ > #define VCDINFO_INVALID_ITEMID 0xFFFF > >-/*! >+/*! > Constant for invalid audio type > */ > #define VCDINFO_INVALID_AUDIO_TYPE 4 > >-/*! >+/*! > Constant for invalid base selection number (BSN) > */ > #define VCDINFO_INVALID_BSN 200 > > /*! The number of sectors allocated in a Video CD segment is a fixed: 150. >- >+ > NOTE: The actual number of sectors used is often less and can sometimes > be gleaned by looking at the correspoinding ISO 9660 file entry (or > by scanning the MPEG segment which may be slow). >@@ -143,18 +146,18 @@ > /** A list of all the different kinds of things a segment can represent. > See enum in vcd_files_private.h */ > typedef enum { >- VCDINFO_FILES_VIDEO_NOSTREAM = 0, >- VCDINFO_FILES_VIDEO_NTSC_STILL = 1, >+ VCDINFO_FILES_VIDEO_NOSTREAM = 0, >+ VCDINFO_FILES_VIDEO_NTSC_STILL = 1, > VCDINFO_FILES_VIDEO_NTSC_STILL2 = 2, /**< NTCS lo+hires*/ > VCDINFO_FILES_VIDEO_NTSC_MOTION = 3, >- VCDINFO_FILES_VIDEO_PAL_STILL = 5, >+ VCDINFO_FILES_VIDEO_PAL_STILL = 5, > VCDINFO_FILES_VIDEO_PAL_STILL2 = 6, /**< PAL lo+hires*/ > VCDINFO_FILES_VIDEO_PAL_MOTION = 7, > VCDINFO_FILES_VIDEO_INVALID = 8 > } vcdinfo_video_segment_type_t; >- >+ > /*! >- Used in working with LOT - list of offsets and lid's >+ Used in working with LOT - list of offsets and lid's > */ > typedef struct { > uint8_t type; >@@ -163,9 +166,9 @@ > bool in_lot; /**< This offset is listed in LOT. */ > bool ext; /**< True if entry comes from offset_x_list. */ > } vcdinfo_offset_t; >- >+ > /*! >- The kind of entry associated with an selection-item id >+ The kind of entry associated with an selection-item id > See corresponding enum item_type_t in lib/pbc.h. */ > typedef enum { > VCDINFO_ITEM_TYPE_TRACK, >@@ -175,21 +178,21 @@ > VCDINFO_ITEM_TYPE_SPAREID2, > VCDINFO_ITEM_TYPE_NOTFOUND > } vcdinfo_item_enum_t; >- >+ > typedef struct { > uint16_t num; > vcdinfo_item_enum_t type; > } vcdinfo_itemid_t; >- >+ > typedef enum { > VCDINFO_OPEN_ERROR, /**< Error */ > VCDINFO_OPEN_VCD, /**< Is a VCD of some sort */ > VCDINFO_OPEN_OTHER /**< Is not VCD, but something else */ > } vcdinfo_open_return_t; >- >- typedef struct >+ >+ typedef struct > { >- >+ > psd_descriptor_types descriptor_type; > /* Only one of pld or psd is used below. Not all > C compiler accept the anonymous unions commented out below. */ >@@ -197,79 +200,79 @@ > PsdPlayListDescriptor_t *pld; > PsdSelectionListDescriptor_t *psd; > /* }; */ >- >+ > } PsdListDescriptor_t; > > /* For backwards compatibility. Don't use PsdListDescriptor. */ > #define PsdListDescriptor PsdListDescriptor_t >- >+ > /*! > Return the number of audio channels implied by "audio_type". > 0 is returned on error. > */ > unsigned int >- vcdinfo_audio_type_num_channels(const vcdinfo_obj_t *p_vcdinfo, >+ vcdinfo_audio_type_num_channels(const vcdinfo_obj_t *p_vcdinfo, > unsigned int audio_type); >- >+ > /*! > Return a string describing an audio type. > */ > const char * vcdinfo_audio_type2str(const vcdinfo_obj_t *p_vcdinfo, > unsigned int audio_type); >- >+ > /*! > Note first i_seg is 0! > */ >- const char * >+ const char * > vcdinfo_ogt2str(const vcdinfo_obj_t *p_vcdinfo, segnum_t i_seg); >- >+ > /*! > Note first i_seg is 0! > */ >- const char * >+ const char * > vcdinfo_video_type2str(const vcdinfo_obj_t *p_vcdinfo, segnum_t i_seg); >- >+ > const char * > vcdinfo_pin2str (uint16_t itemid); >- >+ > /*! >- \brief Classify i_itemid into the kind of item it is: track #, entry #, >- segment #. >- \param i_itemid is set to contain this classifcation an the converted >- entry number. >+ \brief Classify i_itemid into the kind of item it is: track #, entry #, >+ segment #. >+ \param i_itemid is set to contain this classifcation an the converted >+ entry number. > \param p_itemid returned value. > */ > void >- vcdinfo_classify_itemid (uint16_t i_itemid, >+ vcdinfo_classify_itemid (uint16_t i_itemid, > /*out*/ vcdinfo_itemid_t *p_itemid); >- >+ > /*! >- Return a string containing the VCD album id, or NULL if there is >- some problem in getting this. >+ Return a string containing the VCD album id, or NULL if there is >+ some problem in getting this. > */ > const char * > vcdinfo_get_album_id(const vcdinfo_obj_t *p_vcdinfo); >- >+ > /*! > Return the VCD application ID. >- NULL is returned if there is some problem in getting this. >+ NULL is returned if there is some problem in getting this. > */ > char * > vcdinfo_get_application_id(vcdinfo_obj_t *p_vcdinfo); >- >+ > /*! Return the selection number of the area that a point is enclosed in. > In short we return < 0 on an error of some kind. > If the VCD contains no extended selection list return -1. > If we are not in an extended selection list LID, return -2. > If there no area encloses the point return -3 > >- max_x, max_y are the maximum values that x and y can take on. >+ max_x, max_y are the maximum values that x and y can take on. > They would be the largest coordinate in the screen coordinate space. >- For example they might be 352, 240 (for VCD) or 704, 480 for SVCD NTSC, >- or 704, 576. >+ For example they might be 352, 240 (for VCD) or 704, 480 for SVCD NTSC, >+ or 704, 576. > */ >- int >- vcdinfo_get_area_selection(const vcdinfo_obj_t *p_vcdinfo, >+ int >+ vcdinfo_get_area_selection(const vcdinfo_obj_t *p_vcdinfo, > lid_t lid, int16_t x, int16_t y, > uint16_t max_x, uint16_t max_y); > /*! >@@ -278,20 +281,20 @@ > */ > CdIo_t * > vcdinfo_get_cd_image (const vcdinfo_obj_t *p_vcdinfo); >- >+ > /*! > Return a string containing the default VCD device if none is specified. >- This might be something like "/dev/cdrom" on Linux or >- "/vol/dev/aliases/cdrom0" on Solaris, or maybe "VIDEOCD.CUE" for >- if bin/cue I/O routines are in effect. >- >+ This might be something like "/dev/cdrom" on Linux or >+ "/vol/dev/aliases/cdrom0" on Solaris, or maybe "VIDEOCD.CUE" for >+ if bin/cue I/O routines are in effect. >+ > Return NULL we can't get this information. > */ > char * > vcdinfo_get_default_device (const vcdinfo_obj_t *p_vcdinfo); >- >+ > /*! >- \brief Get default LID offset. >+ \brief Get default LID offset. > > Return the LID offset associated with a the "default" entry of the > passed-in LID parameter. Note "default" entries are associated with >@@ -303,29 +306,29 @@ > */ > uint16_t > vcdinfo_get_default_offset(const vcdinfo_obj_t *p_vcdinfo, lid_t lid); >- >+ > /*! > Return number of sector units in of an entry. 0 is returned if > i_entry is invalid. > */ > uint32_t >- vcdinfo_get_entry_sect_count (const vcdinfo_obj_t *p_vcdinfo, >+ vcdinfo_get_entry_sect_count (const vcdinfo_obj_t *p_vcdinfo, > unsigned int i_entry); >- >+ > /*! Return the starting LBA (logical block address) for sequence > i_entry in obj. VCDINFO_NULL_LBA is returned if there is no entry. > The first entry number is 0. > */ > lba_t > vcdinfo_get_entry_lba(const vcdinfo_obj_t *p_vcdinfo, unsigned int i_entry); >- >+ > /*! Return the starting LSN (logical sector number) for sequence > i_entry in obj. VCDINFO_NULL_LSN is returned if there is no entry. > The first entry number is 0. > */ > lsn_t > vcdinfo_get_entry_lsn(const vcdinfo_obj_t *p_vcdinfo, unsigned int i_entry); >- >+ > /*! Return the starting MSF (minutes/secs/frames) for sequence > i_entry in obj. NULL is returned if there is no entry. > The first entry number is 0. >@@ -338,22 +341,22 @@ > The type is also set inside obj. > The first entry number is 0. > */ >- vcd_type_t >+ vcd_type_t > vcdinfo_get_format_version (const vcdinfo_obj_t *p_vcdinfo); >- >+ > /*! >- Return a string giving VCD format (VCD 1.0 VCD 1.1, SVCD, ... >+ Return a string giving VCD format (VCD 1.0 VCD 1.1, SVCD, ... > for this object. > */ >- const char * >+ const char * > vcdinfo_get_format_version_str (const vcdinfo_obj_t *p_vcdinfo); >- >+ > EntriesVcd_t * vcdinfo_get_entriesVcd (vcdinfo_obj_t *p_vcdinfo); >- >+ > InfoVcd_t * vcdinfo_get_infoVcd (vcdinfo_obj_t *p_vcdinfo); > > /*! >- \brief Get default or multi-default LID. >+ \brief Get default or multi-default LID. > > Return the LID offset associated with a the "default" entry of the > passed-in LID parameter. Note "default" entries are associated >@@ -370,9 +373,9 @@ > lid_t > vcdinfo_get_multi_default_lid(const vcdinfo_obj_t *p_vcdinfo, lid_t lid, > lsn_t lsn); >- >+ > /*! >- \brief Get default or multi-default LID offset. >+ \brief Get default or multi-default LID offset. > > Return the LID offset associated with a the "default" entry of the > passed-in LID parameter. Note "default" entries are associated >@@ -396,62 +399,62 @@ > object. > */ > iso9660_pvd_t * vcdinfo_get_pvd (vcdinfo_obj_t *p_vcdinfo); >- >+ > void * vcdinfo_get_scandata (vcdinfo_obj_t *p_vcdinfo); > > void * vcdinfo_get_searchDat (vcdinfo_obj_t *p_vcdinfo); >- >+ > void * vcdinfo_get_tracksSVD (vcdinfo_obj_t *p_vcdinfo); >- >+ > /*! >- Get the LOT pointer. >+ Get the LOT pointer. > */ > LotVcd_t * > vcdinfo_get_lot(const vcdinfo_obj_t *p_vcdinfo); >- >+ > /*! >- Get the extended LOT pointer. >+ Get the extended LOT pointer. > */ > LotVcd_t * > vcdinfo_get_lot_x(const vcdinfo_obj_t *p_vcdinfo); > > /*! >- Return Number of LIDs. >+ Return Number of LIDs. > */ > lid_t > vcdinfo_get_num_LIDs (const vcdinfo_obj_t *p_vcdinfo); >- >+ > /*! >- Return the audio type for a given track. >+ Return the audio type for a given track. > VCDINFO_INVALID_AUDIO_TYPE is returned on error. > */ > unsigned int > vcdinfo_get_num_audio_channels(unsigned int audio_type); >- >+ > /*! > Return the number of entries in the VCD. > */ > unsigned int > vcdinfo_get_num_entries(const vcdinfo_obj_t *p_vcdinfo); >- >+ > /*! >- Return the number of segments in the VCD. >+ Return the number of segments in the VCD. > */ > segnum_t > vcdinfo_get_num_segments(const vcdinfo_obj_t *p_vcdinfo); >- >- /*! >- Return the highest track number in the current medium. >+ >+ /*! >+ Return the highest track number in the current medium. > > Because we track start numbering at 0 (which is the ISO 9660 track > containing Video CD naviagion and disk information), this is one >- less than the number of tracks. >+ less than the number of tracks. > > If there are no tracks, we return -1. > */ > unsigned int > vcdinfo_get_num_tracks(const vcdinfo_obj_t *p_vcdinfo); >- >+ > /*! > Get the VCD info list. > */ >@@ -467,20 +470,20 @@ > */ > unsigned int vcdinfo_get_offset_mult(const vcdinfo_obj_t *p_vcdinfo); > >- /*! >- Get entry in offset list for the item that has offset. This entry >- has for example the LID. NULL is returned on error. >+ /*! >+ Get entry in offset list for the item that has offset. This entry >+ has for example the LID. NULL is returned on error. > */ > vcdinfo_offset_t * > vcdinfo_get_offset_t (const vcdinfo_obj_t *p_vcdinfo, unsigned int offset); >- >+ > /*! > Return a string containing the VCD preparer id with trailing > blanks removed, or NULL if there is some problem in getting this. > */ > char * > vcdinfo_get_preparer_id(const vcdinfo_obj_t *p_vcdinfo); >- >+ > /*! > Get the PSD. > */ >@@ -495,177 +498,177 @@ > Return number of bytes in PSD. > */ > uint32_t vcdinfo_get_psd_size (const vcdinfo_obj_t *p_vcdinfo); >- >+ > /*! > Return number of bytes in the extended PSD. > */ > uint32_t vcdinfo_get_psd_x_size (const vcdinfo_obj_t *p_vcdinfo); >- >+ > /*! > Return a string containing the VCD publisher id with trailing > blanks removed, or NULL if there is some problem in getting this. > */ > char * vcdinfo_get_publisher_id(const vcdinfo_obj_t *p_vcdinfo); >- >+ > /** >- \brief Get return offset for a given LID. >- \return VCDINFO_INVALID_OFFSET is returned on error or if LID has no >+ \brief Get return offset for a given LID. >+ \return VCDINFO_INVALID_OFFSET is returned on error or if LID has no > "return" entry. Otherwise the LID offset is returned. > */ > lid_t > vcdinfo_get_return_offset(const vcdinfo_obj_t *p_vcdinfo, lid_t lid); >- >+ > /*! >- Return the audio type for a given segment. >+ Return the audio type for a given segment. > VCDINFO_INVALID_AUDIO_TYPE is returned on error. > */ >- unsigned int >+ unsigned int > vcdinfo_get_seg_audio_type(const vcdinfo_obj_t *p_vcdinfo, segnum_t i_seg); >- >+ > /*! > Return true if this segment is supposed to continue to the next one, > (is part of an "item" or listing in the ISO 9660 filesystem). > */ >- bool vcdinfo_get_seg_continue(const vcdinfo_obj_t *p_vcdinfo, >+ bool vcdinfo_get_seg_continue(const vcdinfo_obj_t *p_vcdinfo, > segnum_t i_seg); > > /*! Return the starting LBA (logical block address) for segment > i_entry in obj. VCDINFO_NULL_LBA is returned if there is no entry. >- >+ > Note first i_seg is 0. > */ > lba_t > vcdinfo_get_seg_lba(const vcdinfo_obj_t *p_vcdinfo, segnum_t i_seg); >- >+ > /*! Return the starting LSN (logical sector number) for segment > i_entry in obj. VCDINFO_NULL_LBA is returned if there is no entry. >- >+ > Note first i_seg is 0. > */ > lsn_t > vcdinfo_get_seg_lsn(const vcdinfo_obj_t *p_vcdinfo, segnum_t i_seg); >- >+ > /*! Return the starting MSF (minutes/secs/frames) for segment > i_entry in obj. NULL is returned if there is no entry. >- >+ > Note first i_seg is 0. > */ > const msf_t * > vcdinfo_get_seg_msf(const vcdinfo_obj_t *p_vcdinfo, segnum_t i_seg); >- >+ > /*! Return the x-y resolution for a given segment. > Note first i_seg is 0. > */ > void > vcdinfo_get_seg_resolution(const vcdinfo_obj_t *p_vcdinfo, segnum_t i_seg, > /*out*/ uint16_t *max_x, /*out*/ uint16_t *max_y); >- >- /*! >+ >+ /*! > Return the number of sectors for segment > i_entry in obj. 0 is returned if there is no entry. >- >+ > Use this routine to figure out the actual number of bytes a physical > region of a disk or CD takes up for a segment. > > If an item has been broken up into a number of "continued" segments, > we will report the item size for the first segment and 0 for the >- remaining ones. We may revisit this decision later. >+ remaining ones. We may revisit this decision later. > */ > uint32_t > vcdinfo_get_seg_sector_count(const vcdinfo_obj_t *p_vcdinfo, segnum_t i_seg); >- >+ > /*! > Return a string containing the VCD system id with trailing > blanks removed, or NULL if there is some problem in getting this. > */ > char * > vcdinfo_get_system_id(const vcdinfo_obj_t *p_vcdinfo); >- >+ > /*! >- Return the track number for entry n in obj. >+ Return the track number for entry n in obj. > > In contrast to libcdio we start numbering at 0 which is the >- ISO9660 and metadata information for the Video CD. Thus track >+ ISO9660 and metadata information for the Video CD. Thus track > 1 is the first track the first complete MPEG track generally. > */ > track_t >- vcdinfo_get_track(const vcdinfo_obj_t *p_vcdinfo, >+ vcdinfo_get_track(const vcdinfo_obj_t *p_vcdinfo, > const unsigned int i_entry); >- >+ > /*! >- Return the audio type for a given track. >+ Return the audio type for a given track. > VCDINFO_INVALID_AUDIO_TYPE is returned on error. >- >+ > Note: track 1 is usually the first track. > */ > unsigned int >- vcdinfo_get_track_audio_type(const vcdinfo_obj_t *p_vcdinfo, >+ vcdinfo_get_track_audio_type(const vcdinfo_obj_t *p_vcdinfo, > track_t i_track); >- >- /*! >+ >+ /*! > Return the starting LBA (logical block address) for track number >- i_track in obj. >- >+ i_track in obj. >+ > The IS0-9660 filesystem track has number 0. Tracks associated > with playable entries numbers start at 1. >- >+ > The "leadout" track is specified either by > using i_track LEADOUT_TRACK or the total tracks+1. > VCDINFO_NULL_LBA is returned on failure. > */ > lba_t > vcdinfo_get_track_lba(const vcdinfo_obj_t *p_vcdinfo, track_t i_track); >- >- /*! >+ >+ /*! > Return the starting LSN (logical sector number) for track number >- i_track in obj. >- >+ i_track in obj. >+ > The IS0-9660 filesystem track has number 0. Tracks associated > with playable entries numbers start at 1. >- >+ > The "leadout" track is specified either by > using i_track LEADOUT_TRACK or the total tracks+1. > VCDINFO_NULL_LBA is returned on failure. > */ > lsn_t > vcdinfo_get_track_lsn(const vcdinfo_obj_t *p_vcdinfo, track_t i_track); >- >- /*! >+ >+ /*! > Return the starting MSF (minutes/secs/frames) for track number >- i_track in obj. >- >+ i_track in obj. >+ > The IS0-9660 filesystem track has number 0. Tracks associated > with playable entries numbers start at 1. >- >+ > The "leadout" track is specified either by > using i_track LEADOUT_TRACK or the total tracks+1. > VCDINFO_NULL_LSN is returned on failure. > */ > >- /*! >+ /*! > Return the ending LSN for track number > i_track in cdio. VCDINFO_NULL_LSN is returned on error. > */ >- lsn_t vcdinfo_get_track_last_lsn(const vcdinfo_obj_t *p_vcdinfo, >+ lsn_t vcdinfo_get_track_last_lsn(const vcdinfo_obj_t *p_vcdinfo, > track_t i_track); > > int > vcdinfo_get_track_msf(const vcdinfo_obj_t *p_vcdinfo, track_t i_track, > uint8_t *min, uint8_t *sec, uint8_t *frame); >- >+ > /*! >- Return the size in sectors for track n. >+ Return the size in sectors for track n. > > The IS0-9660 filesystem track has number 1. Tracks associated > with playable entries numbers start at 2. >- >+ > FIXME: Whether we count the track pregap sectors is a bit haphazard. > We should add a parameter to indicate whether this is wanted or not. > */ > unsigned int >- vcdinfo_get_track_sect_count(const vcdinfo_obj_t *p_vcdinfo, >+ vcdinfo_get_track_sect_count(const vcdinfo_obj_t *p_vcdinfo, > const track_t i_track); >- >+ > /*! > Return size in bytes for track number for entry n in obj. > >@@ -677,209 +680,209 @@ > */ > unsigned int > vcdinfo_get_track_size(const vcdinfo_obj_t *p_vcdinfo, track_t i_track); >- >+ > /*! > \brief Get the kind of video stream segment of segment i_seg in obj. >- \return VCDINFO_FILES_VIDEO_INVALID is returned if on error or >+ \return VCDINFO_FILES_VIDEO_INVALID is returned if on error or > p_vcdinfo_obj is null. Otherwise the enumeration type. >- >+ > Note first i_seg is 0! > */ > vcdinfo_video_segment_type_t > vcdinfo_get_video_type(const vcdinfo_obj_t *p_vcdinfo, segnum_t i_seg); >- >+ > /*! > \brief Get the kind of VCD that obj refers to. > */ > vcd_type_t > vcdinfo_get_VCD_type(const vcdinfo_obj_t *p_vcdinfo); >- >+ > /*! > Return the VCD volume count - the number of CD's in the collection. >- O is returned if there is some problem in getting this. >+ O is returned if there is some problem in getting this. > */ > unsigned int > vcdinfo_get_volume_count(const vcdinfo_obj_t *p_vcdinfo); >- >+ > /*! > Return the VCD ID. >- NULL is returned if there is some problem in getting this. >+ NULL is returned if there is some problem in getting this. > */ > const char * > vcdinfo_get_volume_id(const vcdinfo_obj_t *p_vcdinfo); >- >+ > /*! > Return the VCD volumeset ID. >- NULL is returned if there is some problem in getting this. >+ NULL is returned if there is some problem in getting this. > */ > const char * > vcdinfo_get_volumeset_id(const vcdinfo_obj_t *p_vcdinfo); >- >+ > /*! > Return the VCD volume num - the number of the CD in the collection. > This is a number between 1 and the volume count. >- O is returned if there is some problem in getting this. >+ O is returned if there is some problem in getting this. > */ > unsigned int > vcdinfo_get_volume_num(const vcdinfo_obj_t *p_vcdinfo); >- >+ > int vcdinfo_get_wait_time (uint16_t wtime); > > /*! >- Return true if there is playback control. >+ Return true if there is playback control. > */ > bool vcdinfo_has_pbc (const vcdinfo_obj_t *p_vcdinfo); >- >- /*! >+ >+ /*! > Return true if VCD has "extended attributes" (XA). Extended attributes > add meta-data attributes to a entries of file describing the file. > See also cdio_get_xa_attr_str() which returns a string similar to > a string you might get on a Unix filesystem listing ("ls"). > */ > bool vcdinfo_has_xa(const vcdinfo_obj_t *p_vcdinfo); >- >+ > /*! > Add one to the MSF. > */ > void vcdinfo_inc_msf (uint8_t *min, uint8_t *sec, int8_t *frame); >- >+ > /*! > Convert minutes, seconds and frame (MSF components) into a >- logical block address (or LBA). >+ logical block address (or LBA). > See also msf_to_lba which uses msf_t as its single parameter. > */ >- void >+ void > vcdinfo_lba2msf (lba_t lba, uint8_t *min, uint8_t *sec, uint8_t *frame); >- >+ > /*! >- Get the item id for a given list ID. >- VCDINFO_REJECTED_MASK is returned on error or if obj is NULL. >+ Get the item id for a given list ID. >+ VCDINFO_REJECTED_MASK is returned on error or if obj is NULL. > */ > uint16_t > vcdinfo_lid_get_itemid(const vcdinfo_obj_t *p_vcdinfo, lid_t lid); >- >+ > /*! >- \brief Get offset i_entry for a given LID. >+ \brief Get offset i_entry for a given LID. > \return VCDINFO_INVALID_OFFSET is returned if obj on error or obj > is NULL. Otherwise the LID offset is returned. > */ > uint16_t vcdinfo_lid_get_offset(const vcdinfo_obj_t *p_vcdinfo, lid_t lid, > unsigned int i_entry); >- >+ > /*! > Get the PSD Selection List Descriptor for a given lid. > False is returned if not found. > */ >- bool vcdinfo_lid_get_pxd(const vcdinfo_obj_t *p_vcdinfo, >+ bool vcdinfo_lid_get_pxd(const vcdinfo_obj_t *p_vcdinfo, > PsdListDescriptor_t *pxd, lid_t lid); >- >+ > /*! Return the entry number closest and before the given LSN. > */ >- unsigned int >+ unsigned int > vcdinfo_lsn_get_entry(const vcdinfo_obj_t *p_vcdinfo, lsn_t lsn); >- >+ > /*! > Convert minutes, seconds and frame (MSF components) into a >- logical sector number (or LSN). >+ logical sector number (or LSN). > */ > lsn_t vcdinfo_msf2lsn (uint8_t min, uint8_t sec, int8_t frame); >- >+ > const char * >- vcdinfo_ofs2str (const vcdinfo_obj_t *p_vcdinfo, unsigned int offset, >+ vcdinfo_ofs2str (const vcdinfo_obj_t *p_vcdinfo, unsigned int offset, > bool ext); >- >+ > /*! > Calls recursive routine to populate obj->offset_list or obj->offset_x_list > by going through LOT. >- >+ > Returns false if there was some error. > */ > bool vcdinfo_visit_lot (vcdinfo_obj_t *p_vcdinfo, bool extended); >- >+ > bool vcdinfo_read_psd (vcdinfo_obj_t *p_vcdinfo); >- >+ > /*! > \fn vcdinfo_selection_get_lid(const vcdinfo_obj_t *p_vcdinfo, lid_t lid, > unsigned int selection); >- \brief Get the "default" lid of a selection for a given lid. >+ \brief Get the "default" lid of a selection for a given lid. > > Return the LID offset associated with a the selection number of the >- passed-in LID parameter. >+ passed-in LID parameter. > > \return VCDINFO_INVALID_LID is returned if obj on error or obj > is NULL. Otherwise the LID offset is returned. > */ > lid_t vcdinfo_selection_get_lid(const vcdinfo_obj_t *p_vcdinfo, lid_t lid, > unsigned int selection); >- >+ > /*! >- \fn uint16_t vcdinfo_selection_get_offset(const vcdinfo_obj_t *p_vcdinfo, >+ \fn uint16_t vcdinfo_selection_get_offset(const vcdinfo_obj_t *p_vcdinfo, > lid_t lid, > unsigned int selection); >- \brief Get offset of a selection for a given LID. >+ \brief Get offset of a selection for a given LID. > > Return the LID offset associated with a the selection number of the >- passed-in LID parameter. >+ passed-in LID parameter. > > \return VCDINFO_INVALID_OFFSET is returned if obj on error or obj > is NULL. Otherwise the LID offset is returned. > */ >- uint16_t vcdinfo_selection_get_offset(const vcdinfo_obj_t *p_vcdinfo, >+ uint16_t vcdinfo_selection_get_offset(const vcdinfo_obj_t *p_vcdinfo, > lid_t lid, unsigned int selection); >- >+ > /*! > Change trailing blanks in str to nulls. Str has a maximum size of > n characters. > */ > const char * vcdinfo_strip_trail (const char str[], size_t n); >- >+ > /*! Return the entry number for the given track. > */ >- unsigned int >+ unsigned int > vcdinfo_track_get_entry(const vcdinfo_obj_t *p_vcdinfo, track_t i_track); >- >+ > /*! > Initialize the vcdinfo structure "obj". Should be done before other > routines using obj are called. > */ > bool vcdinfo_init(vcdinfo_obj_t *p_vcdinfo); >- >+ > /*! > Set up vcdinfo structure "obj" for reading from a particular > medium. This should be done before after initialization but before > any routines that need to retrieve data. >- >+ > source_name is the device or file to use for inspection, and > source_type indicates what driver to use or class of drivers in the > case of DRIVER_DEVICE. > access_mode gives the CD access method for reading should the driver > allow for more than one kind of access method (e.g. MMC versus ioctl > on GNU/Linux) >- >+ > If source_name is NULL we'll fill in the appropriate default device > name for the given source_type. However if in addtion source_type is > DRIVER_UNKNOWN, then we'll scan for a drive containing a VCD. >- >- VCDINFO_OPEN_VCD is returned if everything went okay; >+ >+ VCDINFO_OPEN_VCD is returned if everything went okay; > VCDINFO_OPEN_ERROR if there was an error and VCDINFO_OPEN_OTHER if the > medium is something other than a VCD. > > Only if VCDINFO_OPEN_VCD is returned, the caller needs free the >- vcdinfo_obj_t. >+ vcdinfo_obj_t. > */ > vcdinfo_open_return_t >- vcdinfo_open(vcdinfo_obj_t **p_obj, char *source_name[], >+ vcdinfo_open(vcdinfo_obj_t **p_obj, char *source_name[], > driver_id_t source_type, const char access_mode[]); >- >- >+ >+ > /*! > Dispose of any resources associated with the vcdinfo structure. >- Call this when "p_vcdinfo" it isn't needed anymore. >- >+ Call this when "p_vcdinfo" it isn't needed anymore. >+ > True is returned is everything went okay, and false if not. > */ > bool vcdinfo_close(vcdinfo_obj_t *p_vcdinfo); >- >+ > /*! > Return true if offset is "rejected". That is shouldn't be displayed > in a list of entries. >@@ -895,5 +898,5 @@ > > /** Deprecated */ > #define vcdinfo_msf2lba cdio_msf3_to_lba >- >+ > #endif /*_VCD_INFO_H*/ >diff -ur vcdimager-0.7.24.ORIG/include/libvcd/logging.h vcdimager-0.7.24/include/libvcd/logging.h >--- vcdimager-0.7.24.ORIG/include/libvcd/logging.h 2005-07-16 18:50:08.000000000 +0200 >+++ vcdimager-0.7.24/include/libvcd/logging.h 2018-01-02 16:27:31.292936067 +0100 >@@ -18,11 +18,11 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >-/** \file logging.h >+/** \file logging.h > * \brief Header to control logging and level of detail of output. >- * >+ * > */ >- >+ > #ifndef __VCD_LOGGING_H__ > #define __VCD_LOGGING_H__ > >@@ -37,7 +37,7 @@ > */ > typedef enum { > VCD_LOG_DEBUG = 1, /**< Debug-level messages - helps debug what's up. */ >- VCD_LOG_INFO, /**< Informational - indicates perhaps something of >+ VCD_LOG_INFO, /**< Informational - indicates perhaps something of > interest. */ > VCD_LOG_WARN, /**< Warning conditions - something that looks funny. */ > VCD_LOG_ERROR, /**< Error conditions - may terminate program. */ >@@ -45,7 +45,7 @@ > } vcd_log_level_t; > > /** >- * The place to save the preference concerning how much verbosity >+ * The place to save the preference concerning how much verbosity > * is desired. This is used by the internal default log handler, but > * it could be use by applications which provide their own log handler. > */ >@@ -62,7 +62,7 @@ > * @param level The log level. > * @param message The log message. > */ >-typedef void (*vcd_log_handler_t) (vcd_log_level_t level, >+typedef void (*vcd_log_handler_t) (vcd_log_level_t level, > const char message[]); > > /** >@@ -92,7 +92,7 @@ > */ > void > vcd_log (vcd_log_level_t level, const char format[], ...) GNUC_PRINTF(2, 3); >- >+ > /** > * Handle a debugging message. > * >@@ -131,8 +131,8 @@ > > #endif /* __VCD_LOGGING_H__ */ > >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/include/libvcd/sector.h vcdimager-0.7.24/include/libvcd/sector.h >--- vcdimager-0.7.24.ORIG/include/libvcd/sector.h 2005-07-16 18:50:08.000000000 +0200 >+++ vcdimager-0.7.24/include/libvcd/sector.h 2018-01-02 16:27:31.294936067 +0100 >@@ -17,24 +17,24 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifndef _VCD_SECTOR_H_ > #define _VCD_SECTOR_H_ > > #include <libvcd/types.h> > > /*! >- \file sector.h >- >-\verbatim >+ \file sector.h >+ >+\verbatim > > SVCD 1.0 > ~~~~~~~~ >- >+ > empty sector: fn=0 cn=0 sm=%00100000 ci=0 > data sector: fn=0 cn=0 sm=%x0001000 ci=0 > mpeg sector: fn=1 cn=1 sm=%x11x001x ci=0x80 >- >+ > VCD 2.0 > ~~~~~~~ > >@@ -49,7 +49,7 @@ > lores still: fn=1 cn=2 sm=%x11x001x ci=0x1f > hires still: fn=1 cn=3 sm=%x11x001x ci=0x3f > audio sector: fn=1 cn=1 sm=%x11x010x ci=0x7f >- >+ > /VCD/ *.VCD > data sector: fn=0 cn=0 sm=%x000100x ci=0 > >@@ -111,8 +111,8 @@ > > #endif /* _VCD_SECTOR_H_ */ > >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/include/libvcd/types.h vcdimager-0.7.24/include/libvcd/types.h >--- vcdimager-0.7.24.ORIG/include/libvcd/types.h 2005-07-16 18:50:08.000000000 +0200 >+++ vcdimager-0.7.24/include/libvcd/types.h 2018-01-02 16:28:45.458931980 +0100 >@@ -17,38 +17,40 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >-/** \file types.h >+/** \file types.h > * \brief Common type definitions specific to VCDs and used in vcdimager > */ >- >+ > #ifndef __VCD_TYPES_H__ > #define __VCD_TYPES_H__ > >+/* We don't want to pull in cdio's config */ >+#define __CDIO_CONFIG_H__ > #include <cdio/types.h> > > #ifdef __cplusplus > extern "C" { > #endif /* __cplusplus */ >- >+ > /** Opaque types ... */ >- >+ > /** These are defined fully in data_structures.c */ > typedef struct _VcdList VcdList; > typedef struct _VcdListNode VcdListNode; >- >+ > /** These are defined fully in files_private.h */ > typedef struct _InfoVcd_tag InfoVcd_t; > typedef struct _EntriesVcd_tag EntriesVcd_t; > typedef struct _LotVcd_tag LotVcd_t; >- >+ > typedef struct _PsdPlayListDescriptor_tag PsdPlayListDescriptor_t; > typedef struct _PsdSelectionListDescriptor_tag PsdSelectionListDescriptor_t; > > /** Overall data structure representing a VideoCD object. >- Defined fully in info_private.h. >+ Defined fully in info_private.h. > */ > typedef struct _VcdObj VcdObj_t; >- >+ > /** enum defining supported VideoCD types */ > typedef enum > { >@@ -60,13 +62,13 @@ > VCD_TYPE_HQVCD > } > vcd_type_t; >- >+ > /** The type of an playback control list ID (LID). */ > typedef uint16_t lid_t; >- >+ > /** The type of a segment number 0..1980 segment items possible. */ > typedef uint16_t segnum_t; >- >+ > /** (0,0) == upper left; (255,255) == lower right. > Setting all to zero disables the area. */ > PRAGMA_BEGIN_PACKED >@@ -78,20 +80,20 @@ > uint8_t y2; /**< lower right */ > } GNUC_PACKED; > PRAGMA_END_PACKED >- >+ > #define struct_psd_area_t_SIZEOF 4 >- >+ > #define PSD_OFS_DISABLED 0xffff > #define PSD_OFS_MULTI_DEF 0xfffe > #define PSD_OFS_MULTI_DEF_NO_NUM 0xfffd >- >+ > #ifdef __cplusplus > } > #endif /* __cplusplus */ > > #endif /* __VCD_TYPES_H__ */ >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/include/libvcd/version.h vcdimager-0.7.24/include/libvcd/version.h >--- vcdimager-0.7.24.ORIG/include/libvcd/version.h 2011-03-18 00:52:17.000000000 +0100 >+++ vcdimager-0.7.24/include/libvcd/version.h 2018-01-02 16:27:31.292936067 +0100 >@@ -1,5 +1,5 @@ > /* $Id: version.h.in,v 1.4 2005/07/16 20:44:30 rocky Exp $ */ >-/** \file version.h >+/** \file version.h > * \brief A file simply containing the library version number. > */ > >diff -ur vcdimager-0.7.24.ORIG/lib/bitvec.h vcdimager-0.7.24/lib/bitvec.h >--- vcdimager-0.7.24.ORIG/lib/bitvec.h 2003-11-10 12:57:49.000000000 +0100 >+++ vcdimager-0.7.24/lib/bitvec.h 2018-01-02 16:27:31.313936066 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifndef __VCD_BITVEC_H__ > #define __VCD_BITVEC_H__ > >@@ -41,15 +41,15 @@ > } > > /* >- * PEEK >+ * PEEK > */ > > #define vcd_bitvec_peek_bits16(bitvec, offset) \ > vcd_bitvec_peek_bits ((bitvec), (offset), 16) > >-static inline uint32_t >+static inline uint32_t > vcd_bitvec_peek_bits (const uint8_t bitvec[], >- const unsigned offset, >+ const unsigned offset, > const unsigned bits) > { > uint32_t result = 0; >@@ -87,12 +87,12 @@ > if (_vcd_bit_set_p (bitvec[i >> 3], 7 - (i % 8))) > result |= 0x1; > } >-#endif >+#endif > > return result; > } > >-static inline uint32_t >+static inline uint32_t > vcd_bitvec_peek_bits32 (const uint8_t bitvec[], unsigned offset) > { > if (offset % 8) >@@ -100,21 +100,21 @@ > > offset >>= 3; > >- return (bitvec[offset] << 24 >+ return (bitvec[offset] << 24 > | bitvec[offset + 1] << 16 > | bitvec[offset + 2] << 8 > | bitvec[offset + 3]); > } > >-/* >+/* > * READ > */ > >-static inline uint32_t >+static inline uint32_t > vcd_bitvec_read_bits (const uint8_t bitvec[], unsigned *offset, const unsigned bits) > { > const unsigned i = *offset; >- >+ > *offset += bits; > > return vcd_bitvec_peek_bits (bitvec, i, bits); >diff -ur vcdimager-0.7.24.ORIG/lib/data_structures.c vcdimager-0.7.24/lib/data_structures.c >--- vcdimager-0.7.24.ORIG/lib/data_structures.c 2018-01-02 16:24:55.930944628 +0100 >+++ vcdimager-0.7.24/lib/data_structures.c 2018-01-02 16:29:12.220930505 +0100 >@@ -18,7 +18,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >@@ -62,21 +62,21 @@ > { > CdioListNode_t **pp_node; > bool changed = false; >- >+ > for (pp_node = &(p_list->begin); > (*pp_node) != NULL && (*pp_node)->next != NULL; > pp_node = &((*pp_node)->next)) > { > CdioListNode_t *p_node = *pp_node; >- >+ > if (cmp_func (p_node->data, p_node->next->data) <= 0) > continue; /* n <= n->next */ >- >+ > /* exch n n->next */ > *pp_node = p_node->next; > p_node->next = p_node->next->next; > (*pp_node)->next = p_node; >- >+ > changed = true; > > if (p_node->next == NULL) >@@ -92,7 +92,7 @@ > > vcd_assert (list != NULL); > vcd_assert (cmp_func != 0); >- >+ > while (_bubble_sort_iteration (list, cmp_func)); > } > >@@ -118,7 +118,7 @@ > } > > /* >- * n-way tree based on list -- somewhat inefficent >+ * n-way tree based on list -- somewhat inefficent > */ > > struct _VcdTree >@@ -150,7 +150,7 @@ > new_tree->root->parent = NULL; > new_tree->root->children = NULL; > new_tree->root->listnode = NULL; >- >+ > return new_tree; > } > >@@ -158,7 +158,7 @@ > _vcd_tree_destroy (VcdTree_t *tree, bool free_data) > { > _vcd_tree_node_destroy (tree->root, free_data); >- >+ > free (tree->root); > free (tree); > } >@@ -167,7 +167,7 @@ > _vcd_tree_node_destroy (VcdTreeNode_t *p_node, bool free_data) > { > VcdTreeNode_t *p_child, *nxt_child; >- >+ > vcd_assert (p_node != NULL); > > p_child = _vcd_tree_node_first_child (p_node); >@@ -180,7 +180,7 @@ > if (p_node->children) > { > vcd_assert (_cdio_list_length (p_node->children) == 0); >- _cdio_list_free (p_node->children, true); >+ _cdio_list_free (p_node->children, true, NULL); > p_node->children = NULL; > } > >@@ -188,7 +188,7 @@ > free (_vcd_tree_node_set_data (p_node, NULL)); > > if (p_node->parent) >- _cdio_list_node_free (p_node->listnode, true); >+ _cdio_list_node_free (p_node->listnode, true, NULL); > else > _vcd_tree_node_set_data (p_node, NULL); > } >@@ -257,7 +257,7 @@ > } > > void >-_vcd_tree_node_sort_children (VcdTreeNode_t *p_node, >+_vcd_tree_node_sort_children (VcdTreeNode_t *p_node, > _vcd_tree_node_cmp_func cmp_func) > { > vcd_assert (p_node != NULL); >@@ -267,7 +267,7 @@ > } > > void >-_vcd_tree_node_traverse (VcdTreeNode_t *p_node, >+_vcd_tree_node_traverse (VcdTreeNode_t *p_node, > _vcd_tree_node_traversal_func trav_func, > void *p_user_data) /* pre-order */ > { >@@ -284,7 +284,7 @@ > } > > void >-_vcd_tree_node_traverse_bf (VcdTreeNode_t *p_node, >+_vcd_tree_node_traverse_bf (VcdTreeNode_t *p_node, > _vcd_tree_node_traversal_func trav_func, > void *p_user_data) /* breath-first */ > { >@@ -302,17 +302,17 @@ > VcdTreeNode_t *treenode = _cdio_list_node_data (lastnode); > VcdTreeNode_t *childnode; > >- _cdio_list_node_free (lastnode, false); >+ _cdio_list_node_free (lastnode, false, NULL); > > trav_func (treenode, p_user_data); >- >+ > _VCD_CHILD_FOREACH (childnode, treenode) > { > _cdio_list_prepend (queue, childnode); > } > } > >- _cdio_list_free (queue, false); >+ _cdio_list_free (queue, false, NULL); > } > > VcdTreeNode_t *_vcd_tree_node_parent (VcdTreeNode_t *p_node) >@@ -332,8 +332,8 @@ > > /* eof */ > >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/lib/data_structures.h vcdimager-0.7.24/lib/data_structures.h >--- vcdimager-0.7.24.ORIG/lib/data_structures.h 2018-01-02 16:24:55.930944628 +0100 >+++ vcdimager-0.7.24/lib/data_structures.h 2018-01-02 16:27:31.321936065 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifndef __VCD_DATA_STRUCTURES_H__ > #define __VCD_DATA_STRUCTURES_H__ > >@@ -38,10 +38,10 @@ > #define _VCD_CHILD_FOREACH(child, parent) \ > for (child = _vcd_tree_node_first_child (parent); child; child = _vcd_tree_node_next_sibling (child)) > >-typedef int (*_vcd_tree_node_cmp_func) (VcdTreeNode_t *p_node1, >+typedef int (*_vcd_tree_node_cmp_func) (VcdTreeNode_t *p_node1, > VcdTreeNode_t *p_node2); > >-typedef void (*_vcd_tree_node_traversal_func) (VcdTreeNode_t *p_node, >+typedef void (*_vcd_tree_node_traversal_func) (VcdTreeNode_t *p_node, > void *p_user_data); > > VcdTree_t *_vcd_tree_new (void *p_root_data); >@@ -59,7 +59,7 @@ > > void *_vcd_tree_node_set_data (VcdTreeNode_t *p_node, void *p_new_data); > >-VcdTreeNode_t *_vcd_tree_node_append_child (VcdTreeNode_t *p_node, >+VcdTreeNode_t *_vcd_tree_node_append_child (VcdTreeNode_t *p_node, > void *p_cdata); > > VcdTreeNode_t *_vcd_tree_node_first_child (VcdTreeNode_t *p_node); >@@ -72,18 +72,18 @@ > > bool _vcd_tree_node_is_root (VcdTreeNode_t *p_node); > >-void _vcd_tree_node_traverse (VcdTreeNode_t *p_node, >+void _vcd_tree_node_traverse (VcdTreeNode_t *p_node, > _vcd_tree_node_traversal_func trav_func, > void *user_data); > > void >-_vcd_tree_node_traverse_bf (VcdTreeNode_t *p_node, >+_vcd_tree_node_traverse_bf (VcdTreeNode_t *p_node, > _vcd_tree_node_traversal_func trav_func, > void *p_user_data); >- >+ > #endif /* __VCD_DATA_STRUCTURES_H__ */ >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/lib/dict.h vcdimager-0.7.24/lib/dict.h >--- vcdimager-0.7.24.ORIG/lib/dict.h 2018-01-02 16:24:55.930944628 +0100 >+++ vcdimager-0.7.24/lib/dict.h 2018-01-02 16:29:35.080929246 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifndef __VCD_DICT_H__ > #define __VCD_DICT_H__ > >@@ -39,7 +39,7 @@ > }; > > static void >-_dict_insert (VcdObj_t *obj, const char key[], uint32_t sector, uint32_t length, >+_dict_insert (VcdObj_t *obj, const char key[], uint32_t sector, uint32_t length, > uint8_t end_flags) > { > struct _dict_t *_new_node; >@@ -61,8 +61,8 @@ > _cdio_list_prepend (obj->buffer_dict_list, _new_node); > } > >-static >-int _dict_key_cmp_t (struct _dict_t *a, char *b) >+static >+int _dict_key_cmp (struct _dict_t *a, char *b) > { > vcd_assert (a != NULL); > vcd_assert (b != NULL); >@@ -70,8 +70,8 @@ > return !strcmp (a->key, b); > } > >-static >-int _dict_sector_cmp_t (struct _dict_t *a, uint32_t *b) >+static >+int _dict_sector_cmp (struct _dict_t *a, uint32_t *b) > { > vcd_assert (a != NULL); > vcd_assert (b != NULL); >@@ -88,9 +88,9 @@ > vcd_assert (key != NULL); > > node = _cdio_list_find (obj->buffer_dict_list, >- (_cdio_list_iterfunc_t) _dict_key_cmp_t, >+ (_cdio_list_iterfunc_t) _dict_key_cmp, > (char *) key); >- >+ > if (node) > return _cdio_list_node_data (node); > >@@ -105,8 +105,8 @@ > vcd_assert (obj != NULL); > vcd_assert (sector != SECTOR_NIL); > >- node = _cdio_list_find (obj->buffer_dict_list, >- (_cdio_list_iterfunc_t) _dict_sector_cmp_t, >+ node = _cdio_list_find (obj->buffer_dict_list, >+ (_cdio_list_iterfunc_t) _dict_sector_cmp, > §or); > > if (node) >@@ -158,7 +158,7 @@ > free (p->key); > free (p->buf); > >- _cdio_list_node_free (node, true); >+ _cdio_list_node_free (node, true, NULL); > } > } > >diff -ur vcdimager-0.7.24.ORIG/lib/directory.c vcdimager-0.7.24/lib/directory.c >--- vcdimager-0.7.24.ORIG/lib/directory.c 2005-02-09 11:00:59.000000000 +0100 >+++ vcdimager-0.7.24/lib/directory.c 2018-01-02 16:27:31.316936065 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >@@ -41,7 +41,7 @@ > > /* tree data structure */ > >-typedef struct >+typedef struct > { > bool is_dir; > char *name; >@@ -64,7 +64,7 @@ > /* important date to celebrate (for me at least =) > -- until user customization is implemented... */ > static const time_t _vcd_time = 269222400L; >- >+ > /* implementation */ > > static void >@@ -96,22 +96,22 @@ > { > data_t *d = DATAP(dirnode); > >- if (d->is_dir) >+ if (d->is_dir) > { > VcdDirNode_t *child; > unsigned dirextent = d->extent; >- >+ > vcd_assert (d->size % ISO_BLOCKSIZE == 0); >- >+ > dirextent += d->size / ISO_BLOCKSIZE; >- >+ > _VCD_CHILD_FOREACH (child, dirnode) > { > data_t *d = DATAP(child); >- >+ > vcd_assert (d != NULL); >- >- if (d->is_dir) >+ >+ if (d->is_dir) > { > d->extent = dirextent; > dirextent += get_dirsizes (child); >@@ -120,11 +120,11 @@ > } > } > >-static void >+static void > update_dirextents (VcdDirectory_t *dir, uint32_t extent) > { > data_t *dirdata = DATAP(_vcd_tree_root (dir)); >- >+ > dirdata->extent = extent; > _vcd_tree_node_traverse (_vcd_tree_root (dir), > traverse_update_dirextents, NULL); >@@ -139,25 +139,25 @@ > { > VcdDirNode_t *child; > unsigned offset = 0; >- >+ > offset += iso9660_dir_calc_record_size (1, sizeof(iso9660_xa_t)); /* '.' */ > offset += iso9660_dir_calc_record_size (1, sizeof(iso9660_xa_t)); /* '..' */ >- >+ > _VCD_CHILD_FOREACH (child, node) > { > data_t *d = DATAP(child); > unsigned reclen; >- char *pathname = (d->is_dir >+ char *pathname = (d->is_dir > ? strdup (d->name) > : iso9660_pathname_isofy (d->name, d->version)); >- >+ > vcd_assert (d != NULL); >- >- reclen = iso9660_dir_calc_record_size (strlen (pathname), >+ >+ reclen = iso9660_dir_calc_record_size (strlen (pathname), > sizeof (iso9660_xa_t)); > > free (pathname); >- >+ > offset = _vcd_ofs_add (offset, reclen, ISO_BLOCKSIZE); > } > >@@ -167,7 +167,7 @@ > } > } > >-static void >+static void > update_sizes (VcdDirectory_t *dir) > { > _vcd_tree_node_traverse (_vcd_tree_root(dir), traverse_update_sizes, NULL); >@@ -214,7 +214,7 @@ > _vcd_tree_destroy (dir, true); > } > >-static VcdDirNode_t * >+static VcdDirNode_t * > lookup_child (VcdDirNode_t *node, const char name[]) > { > VcdDirNode_t *child; >@@ -222,11 +222,11 @@ > _VCD_CHILD_FOREACH (child, node) > { > data_t *d = DATAP(child); >- >+ > if (!strcmp (d->name, name)) > return child; > } >- >+ > return child; /* NULL */ > } > >@@ -256,15 +256,15 @@ > > level = _vcd_strlenv (splitpath); > >- for (n = 0; n < level-1; n++) >- if (!(pdir = lookup_child(pdir, splitpath[n]))) >+ for (n = 0; n < level-1; n++) >+ if (!(pdir = lookup_child(pdir, splitpath[n]))) > { > vcd_error("mkdir: parent dir `%s' (level=%d) for `%s' missing!", > splitpath[n], n, pathname); > vcd_assert_not_reached (); > } > >- if (lookup_child (pdir, splitpath[level-1])) >+ if (lookup_child (pdir, splitpath[level-1])) > { > vcd_error ("mkdir: `%s' already exists", pathname); > vcd_assert_not_reached (); >@@ -283,14 +283,14 @@ > } > > _vcd_tree_node_sort_children (pdir, _iso_dir_cmp); >- >+ > _vcd_strfreev (splitpath); > > return 0; > } > > int >-_vcd_directory_mkfile (VcdDirectory_t *dir, const char pathname[], >+_vcd_directory_mkfile (VcdDirectory_t *dir, const char pathname[], > uint32_t start, uint32_t size, > bool form2_flag, uint8_t filenum) > { >@@ -310,19 +310,19 @@ > while (!pdir) > { > pdir = _vcd_tree_root (dir); >- >- for (n = 0; n < level-1; n++) >- if (!(pdir = lookup_child (pdir, splitpath[n]))) >+ >+ for (n = 0; n < level-1; n++) >+ if (!(pdir = lookup_child (pdir, splitpath[n]))) > { > char *newdir = _vcd_strjoin (splitpath, n+1, "/"); > > vcd_info ("autocreating directory `%s' for file `%s'", > newdir, pathname); >- >+ > _vcd_directory_mkdir (dir, newdir); >- >+ > free (newdir); >- >+ > vcd_assert (pdir == NULL); > > break; >@@ -340,12 +340,12 @@ > > } > >- if (lookup_child (pdir, splitpath[level-1])) >+ if (lookup_child (pdir, splitpath[level-1])) > { > vcd_error ("mkfile: `%s' already exists", pathname); > return -1; > } >- >+ > { > data_t *data = calloc(1, sizeof (data_t)); > >@@ -385,12 +385,12 @@ > > uint32_t root_extent = EXTENT(_vcd_tree_node_root (node)); > >- uint32_t parent_extent = >+ uint32_t parent_extent = > (!_vcd_tree_node_is_root (node)) > ? EXTENT(_vcd_tree_node_parent (node)) > : EXTENT(node); > >- uint32_t parent_size = >+ uint32_t parent_size = > (!_vcd_tree_node_is_root (node)) > ? SIZE(_vcd_tree_node_parent (node)) > : SIZE(node); >@@ -401,11 +401,11 @@ > > if (!_vcd_tree_node_is_root (node)) > { >- char *pathname = (d->is_dir >+ char *pathname = (d->is_dir > ? strdup (d->name) > : iso9660_pathname_isofy (d->name, d->version)); > >- iso9660_dir_add_entry_su (dirbufp, pathname, d->extent, d->size, >+ iso9660_dir_add_entry_su (dirbufp, pathname, d->extent, d->size, > d->is_dir ? ISO_DIRECTORY : ISO_FILE, > &xa_su, sizeof (xa_su), > &_vcd_time); >@@ -414,13 +414,13 @@ > } > > /* if this is a directory, create the new directory node */ >- if (d->is_dir) >+ if (d->is_dir) > { > dirbufp = (char*)data + ISO_BLOCKSIZE * (d->extent - root_extent); > >- iso9660_dir_init_new_su (dirbufp, >+ iso9660_dir_init_new_su (dirbufp, > d->extent, d->size, &xa_su, sizeof (xa_su), >- parent_extent, parent_size, &xa_su, >+ parent_extent, parent_size, &xa_su, > sizeof (xa_su), &_vcd_time); > } > } >@@ -433,11 +433,11 @@ > update_sizes (dir); /* better call it one time more than one less */ > update_dirextents (dir, extent); > >- _vcd_tree_node_traverse (_vcd_tree_root (dir), >- traverse_vcd_directory_dump_entries, buf); >+ _vcd_tree_node_traverse (_vcd_tree_root (dir), >+ traverse_vcd_directory_dump_entries, buf); > } > >-typedef struct >+typedef struct > { > void *ptl; > void *ptm; >@@ -454,10 +454,10 @@ > > vcd_assert (d->is_dir); > >- id_l = iso9660_pathtable_l_add_entry (args->ptl, d->name, d->extent, >+ id_l = iso9660_pathtable_l_add_entry (args->ptl, d->name, d->extent, > parent_id); >- >- id_m = iso9660_pathtable_m_add_entry (args->ptm, d->name, d->extent, >+ >+ id_m = iso9660_pathtable_m_add_entry (args->ptm, d->name, d->extent, > parent_id); > > vcd_assert (id_l == id_m); >@@ -493,11 +493,11 @@ > args.ptm = ptm; > > _vcd_tree_node_traverse_bf (_vcd_tree_root (dir), >- traverse_vcd_directory_dump_pathtables, &args); >+ traverse_vcd_directory_dump_pathtables, &args); > } > >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/lib/directory.h vcdimager-0.7.24/lib/directory.h >--- vcdimager-0.7.24.ORIG/lib/directory.h 2005-02-09 11:00:59.000000000 +0100 >+++ vcdimager-0.7.24/lib/directory.h 2018-01-02 16:27:31.308936066 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifndef _DIRECTORY_H_ > #define _DIRECTORY_H_ > >@@ -39,15 +39,15 @@ > _vcd_directory_mkdir (VcdDirectory_t *p_dir, const char pathname[]); > > int >-_vcd_directory_mkfile (VcdDirectory_t *dir, const char pathname[], >+_vcd_directory_mkfile (VcdDirectory_t *dir, const char pathname[], > uint32_t start, uint32_t size, > bool form2_flag, uint8_t filenum); > > uint32_t > _vcd_directory_get_size (VcdDirectory_t *p_dir); > >-void >-_vcd_directory_dump_entries (VcdDirectory_t *p_dir, void *p_buf, >+void >+_vcd_directory_dump_entries (VcdDirectory_t *p_dir, void *p_buf, > uint32_t extent); > > void >@@ -55,8 +55,8 @@ > > #endif /* _DIRECTORY_H_ */ > >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/lib/files.c vcdimager-0.7.24/lib/files.c >--- vcdimager-0.7.24.ORIG/lib/files.c 2018-01-02 16:24:55.931944628 +0100 >+++ vcdimager-0.7.24/lib/files.c 2018-01-02 16:29:53.820928213 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >@@ -27,6 +27,8 @@ > #include <stddef.h> > #include <math.h> > >+/* We don't want to pull in cdio's config */ >+#define __CDIO_CONFIG_H__ > #include <cdio/cdio.h> > #include <cdio/bytesex.h> > #include <cdio/util.h> >@@ -78,7 +80,7 @@ > static int > _derive_ogt_type (const struct vcd_mpeg_stream_info *p_info, bool svcd) > { >- >+ > if (!svcd) > return 0; > >@@ -93,7 +95,7 @@ > return 0x1; > > vcd_debug ("OGT streams available: %d %d %d %d", >- p_info->ogt[0], p_info->ogt[1], >+ p_info->ogt[0], p_info->ogt[1], > p_info->ogt[2], p_info->ogt[3]); > > return 0x0; >@@ -112,7 +114,7 @@ > > if (p_info->ahdr[1].seen) > return 2; /* 2 streams */ >- >+ > return 1; /* just one stream */ > } > else >@@ -188,7 +190,7 @@ > entries_vcd.version = ENTRIES_VERSION_HQVCD; > entries_vcd.sys_prof_tag = ENTRIES_SPTAG_HQVCD; > break; >- >+ > default: > vcd_assert_not_reached (); > break; >@@ -205,7 +207,7 @@ > lsect += obj->iso_size; > > entries_vcd.entry[idx].n = cdio_to_bcd8(track_idx); >- cdio_lba_to_msf(cdio_lsn_to_lba(lsect), >+ cdio_lba_to_msf(cdio_lsn_to_lba(lsect), > &(entries_vcd.entry[idx].msf)); > > idx++; >@@ -242,7 +244,7 @@ > bitset[_byte] |= (1 << _bit); > } > >-uint32_t >+uint32_t > get_psd_size (VcdObj_t *obj, bool extended) > { > if (extended) >@@ -250,7 +252,7 @@ > > if (!_vcd_pbc_available (obj)) > return 0; >- >+ > if (extended) > return obj->psdx_size; > >@@ -272,7 +274,7 @@ > pbc_t *p_pbc = _cdio_list_node_data (node); > char *_buf = buf; > unsigned offset = (b_extended ? p_pbc->offset_ext : p_pbc->offset); >- >+ > vcd_assert (offset % INFO_OFFSET_MULT == 0); > > _vcd_pbc_node_write (p_obj, p_pbc, _buf + offset, b_extended); >@@ -299,7 +301,7 @@ > { > pbc_t *p_pbc = _cdio_list_node_data (p_node); > unsigned int offset = b_extended ? p_pbc->offset_ext : p_pbc->offset; >- >+ > vcd_assert (offset % INFO_OFFSET_MULT == 0); > > if (p_pbc->rejected) >@@ -323,7 +325,7 @@ > > vcd_assert (sizeof (InfoVcd_t) == 2048); > vcd_assert (_cdio_list_length (p_obj->mpeg_track_list) <= 98); >- >+ > memset (&info_vcd, 0, sizeof (info_vcd)); > > switch (p_obj->type) >@@ -357,15 +359,15 @@ > info_vcd.version = INFO_VERSION_HQVCD; > info_vcd.sys_prof_tag = INFO_SPTAG_HQVCD; > break; >- >+ > default: > vcd_assert_not_reached (); > break; > } >- >- iso9660_strncpy_pad (info_vcd.album_desc, >+ >+ iso9660_strncpy_pad (info_vcd.album_desc, > p_obj->info_album_id, >- sizeof(info_vcd.album_desc), ISO9660_DCHARS); >+ sizeof(info_vcd.album_desc), ISO9660_DCHARS); > /* fixme, maybe it's VCD_ACHARS? */ > > info_vcd.vol_count = uint16_to_be (p_obj->info_volume_count); >@@ -379,8 +381,8 @@ > _CDIO_LIST_FOREACH (p_node, p_obj->mpeg_track_list) > { > mpeg_track_t *track = _cdio_list_node_data (p_node); >- >- const struct vcd_mpeg_stream_vid_info *p_info = >+ >+ const struct vcd_mpeg_stream_vid_info *p_info = > &track->info->shdr[0]; > > if (vcd_mpeg_get_norm (p_info) == MPEG_NORM_PAL >@@ -392,7 +394,7 @@ > "for track #%d -- are we creating a X(S)VCD?", n); > _set_bit(info_vcd.pal_flags, n); > } >- >+ > n++; > } > } >@@ -406,15 +408,15 @@ > if (_vcd_obj_has_cap_p (p_obj, _CAP_PBC_X) > &&_vcd_pbc_available (p_obj)) > info_vcd.flags.pbc_x = true; >- >+ > info_vcd.psd_size = uint32_to_be (get_psd_size (p_obj, false)); > info_vcd.offset_mult = _vcd_pbc_available (p_obj) ? INFO_OFFSET_MULT : 0; > info_vcd.lot_entries = uint16_to_be (_vcd_pbc_max_lid (p_obj)); >- >+ > if (_cdio_list_length (p_obj->mpeg_segment_list)) > { > unsigned segments = 0; >- >+ > if (!_vcd_pbc_available (p_obj)) > vcd_warn ("segment items available, but no PBC items set!" > " SPIs will be unreachable"); >@@ -425,11 +427,11 @@ > unsigned int idx; > InfoSpiContents_t contents = { 0, }; > >- contents.video_type = >+ contents.video_type = > _derive_vid_type (p_segment->info, > _vcd_obj_has_cap_p (p_obj, _CAP_4C_SVCD)); > >- contents.audio_type = >+ contents.audio_type = > _derive_aud_type (p_segment->info, > _vcd_obj_has_cap_p (p_obj, _CAP_4C_SVCD)); > >@@ -446,7 +448,7 @@ > vcd_assert (segments + idx < MAX_SEGMENTS); > > info_vcd.spi_contents[segments + idx] = contents; >- >+ > if (!contents.item_cont) > contents.item_cont = true; > } >@@ -454,9 +456,9 @@ > segments += idx; > } > >- info_vcd.item_count = uint16_to_be (segments); >+ info_vcd.item_count = uint16_to_be (segments); > >- cdio_lba_to_msf (cdio_lsn_to_lba(p_obj->mpeg_segment_start_extent), >+ cdio_lba_to_msf (cdio_lsn_to_lba(p_obj->mpeg_segment_start_extent), > &info_vcd.first_seg_addr); > } > } >@@ -473,7 +475,7 @@ > double playtime; > int n; > >- memcpy (tracks_svd->file_id, TRACKS_SVD_FILE_ID, >+ memcpy (tracks_svd->file_id, TRACKS_SVD_FILE_ID, > sizeof (TRACKS_SVD_FILE_ID)-1); > tracks_svd->version = TRACKS_SVD_VERSION; > tracks_svd->tracks = _cdio_list_length (p_vcdobj->mpeg_track_list); >@@ -487,9 +489,9 @@ > > playtime += track->info->playing_time; > >- tracks_svd->track[n].audio_info = track->info->ahdr[0].seen >+ tracks_svd->track[n].audio_info = track->info->ahdr[0].seen > ? 0x2 : 0x0; /* fixme */ >- tracks_svd->track[n].audio_info |= track->info->ahdr[1].seen >+ tracks_svd->track[n].audio_info |= track->info->ahdr[1].seen > ? 0x20 : 0x0; /* fixme */ > > tracks_svd->track[n].ogt_info = 0x0; >@@ -498,7 +500,7 @@ > tracks_svd->track[n].ogt_info |= 1 << (i * 2); /* fixme */ > > /* setting playtime */ >- >+ > { > double i, f; > >@@ -506,15 +508,15 @@ > playtime -= 6000.0; > > f = modf(playtime, &i); >- >+ > cdio_lba_to_msf (i * 75, &tracks_svd->track[n].cum_playing_time); >- tracks_svd->track[n].cum_playing_time.f = >+ tracks_svd->track[n].cum_playing_time.f = > cdio_to_bcd8 (floor (f * 75.0)); > } >- >+ > n++; >- } >- >+ } >+ > memcpy (buf, &tracks_svd_buf, sizeof(tracks_svd_buf)); > } > >@@ -537,7 +539,7 @@ > > vcd_assert (sizeof (SVDTrackContent_t) == 1); > >- memcpy (tracks_svd1->file_id, TRACKS_SVD_FILE_ID, >+ memcpy (tracks_svd1->file_id, TRACKS_SVD_FILE_ID, > sizeof (TRACKS_SVD_FILE_ID)-1); > tracks_svd1->version = TRACKS_SVD_VERSION; > >@@ -553,21 +555,21 @@ > const double playtime = track->info->playing_time; > > int _video; >- >+ > _video = tracks_svd2->contents[n].video = > _derive_vid_type (track->info, true); > > tracks_svd2->contents[n].audio = > _derive_aud_type (track->info, true); > >- tracks_svd2->contents[n].ogt = >+ tracks_svd2->contents[n].ogt = > _derive_ogt_type (track->info, true); > > if (_video != 0x3 && _video != 0x7) > vcd_warn("SVCD/TRACKS.SVCD: No MPEG motion video for track #%d?", n); > > /* setting playtime */ >- >+ > { > double i, f; > >@@ -584,15 +586,15 @@ > cdio_lba_to_msf (i * 75, &(tracks_svd1->playing_time[n])); > tracks_svd1->playing_time[n].f = cdio_to_bcd8 (floor (f * 75.0)); > } >- >+ > n++; >- } >- >+ } >+ > memcpy (buf, &tracks_svd, sizeof(tracks_svd)); > } > > static double >-_get_cumulative_playing_time (const VcdObj_t *p_vcdobj, >+_get_cumulative_playing_time (const VcdObj_t *p_vcdobj, > unsigned int up_to_track_no) > { > double result = 0; >@@ -608,29 +610,29 @@ > result += track->info->playing_time; > up_to_track_no--; > } >- >+ > if (up_to_track_no) > vcd_warn ("internal error..."); > > return result; > } > >-static unsigned >+static unsigned > _get_scanpoint_count (const VcdObj_t *p_vcdobj) > { > double total_playing_time; > >- total_playing_time = >- _get_cumulative_playing_time (p_vcdobj, >+ total_playing_time = >+ _get_cumulative_playing_time (p_vcdobj, > _cdio_list_length (p_vcdobj->mpeg_track_list)); > > return ceil (total_playing_time * 2.0); > } > >-uint32_t >+uint32_t > get_search_dat_size (const VcdObj_t *p_vcdobj) > { >- return sizeof (SearchDat_t) >+ return sizeof (SearchDat_t) > + (_get_scanpoint_count (p_vcdobj) * sizeof (msf_t)); > } > >@@ -648,16 +650,16 @@ > { > mpeg_track_t *track = _cdio_list_node_data (p_node); > CdioListNode_t *p_node2; >- >+ > _CDIO_LIST_FOREACH (p_node2, track->info->shdr[0].aps_list) > { > struct aps_data *_data = calloc(1, sizeof (struct aps_data)); >- >+ > *_data = *(struct aps_data *)_cdio_list_node_data (p_node2); > >- _data->timestamp += _get_cumulative_playing_time (p_vcdobj, >+ _data->timestamp += _get_cumulative_playing_time (p_vcdobj, > i_track); >- _data->packet_no += p_vcdobj->iso_size >+ _data->packet_no += p_vcdobj->iso_size > + track->relative_start_extent; > _data->packet_no += p_vcdobj->track_front_margin; > >@@ -665,7 +667,7 @@ > } > i_track++; > } >- >+ > { > CdioListNode_t *aps_node = _cdio_list_begin (p_all_aps); > CdioListNode_t *n; >@@ -686,7 +688,7 @@ > > for (t = 0; t < playing_time; t += 0.5) > { >- for(n = _cdio_list_node_next (aps_node); n; >+ for(n = _cdio_list_node_next (aps_node); n; > n = _cdio_list_node_next (n)) > { > _data = _cdio_list_node_data (n); >@@ -697,22 +699,22 @@ > aps_time = _data->timestamp; > aps_packet = _data->packet_no; > } >- else >+ else > break; > } > > { > uint32_t *lsect = calloc(1, sizeof (uint32_t)); >- >+ > *lsect = aps_packet; > _cdio_list_append (p_scantable, lsect); > } >- >+ > } > > } > >- _cdio_list_free (p_all_aps, true); >+ _cdio_list_free (p_all_aps, true, NULL); > > vcd_assert (scanpoints == _cdio_list_length (p_scantable)); > >@@ -733,13 +735,13 @@ > memset (&search_dat, 0, sizeof (search_dat)); > > memcpy (search_dat.file_id, SEARCH_FILE_ID, sizeof(search_dat.file_id)); >- >+ > search_dat.version = SEARCH_VERSION; > search_dat.scan_points = uint16_to_be (_get_scanpoint_count (p_vcdobj)); > search_dat.time_interval = SEARCH_TIME_INTERVAL; > > memcpy (buf, &search_dat, sizeof (search_dat)); >- >+ > p_scantable = _make_track_scantable (p_vcdobj); > > n = 0; >@@ -747,19 +749,19 @@ > { > SearchDat_t *search_dat2 = buf; > uint32_t sect = *(uint32_t *) _cdio_list_node_data (p_node); >- >+ > cdio_lba_to_msf(cdio_lsn_to_lba(sect), &(search_dat2->points[n])); > n++; > } > > vcd_assert (n = _get_scanpoint_count (p_vcdobj)); > >- _cdio_list_free (p_scantable, true); >+ _cdio_list_free (p_scantable, true, NULL); > } > >-static uint32_t >+static uint32_t > _get_scandata_count (const struct vcd_mpeg_stream_info *info) >-{ >+{ > return ceil (info->playing_time * 2.0); > } > >@@ -772,7 +774,7 @@ > int aps_packet; > uint32_t *retval; > unsigned int i; >- >+ > retval = calloc(1, _get_scandata_count (info) * sizeof (uint32_t)); > > _data = _cdio_list_node_data (aps_node); >@@ -791,7 +793,7 @@ > aps_time = _data->timestamp; > aps_packet = _data->packet_no; > } >- else >+ else > break; > } > >@@ -807,7 +809,7 @@ > return retval; > } > >-uint32_t >+uint32_t > get_scandata_dat_size (const VcdObj_t *p_vcdobj) > { > uint32_t retval = 0; >@@ -833,7 +835,7 @@ > _CDIO_LIST_FOREACH (node, p_vcdobj->mpeg_track_list) > { > const mpeg_track_t *track = _cdio_list_node_data (node); >- >+ > retval += sizeof (msf_t) * _get_scandata_count (track->info); > } > } >@@ -847,11 +849,11 @@ > const unsigned tracks = _cdio_list_length (p_vcdobj->mpeg_track_list); > > ScandataDat1_t *scandata_dat1 = (ScandataDat1_t *) buf; >- ScandataDat2_t *scandata_dat2 = >+ ScandataDat2_t *scandata_dat2 = > (ScandataDat2_t *) &(scandata_dat1->cum_playtimes[tracks]); > ScandataDat3_t *scandata_dat3 = > (ScandataDat3_t *) &(scandata_dat2->spi_indexes[0]); >- ScandataDat4_t *scandata_dat4 = >+ ScandataDat4_t *scandata_dat4 = > (ScandataDat4_t *) &(scandata_dat3->mpeg_track_offsets[tracks]); > > const uint16_t _begin_offset = >@@ -867,9 +869,9 @@ > /* memset (buf, 0, get_scandata_dat_size (p_vcdobj)); */ > > /* struct 1 */ >- memcpy (scandata_dat1->file_id, SCANDATA_FILE_ID, >+ memcpy (scandata_dat1->file_id, SCANDATA_FILE_ID, > sizeof (scandata_dat1->file_id)); >- >+ > scandata_dat1->version = SCANDATA_VERSION_SVCD; > scandata_dat1->reserved = 0x00; > scandata_dat1->scandata_count = uint16_to_be (_get_scanpoint_count (p_vcdobj)); >@@ -941,7 +943,7 @@ > > /* struct 4 */ > >- >+ > } > > vcd_type_t >@@ -951,7 +953,7 @@ > vcd_type_t _type = VCD_TYPE_INVALID; > > vcd_assert (info_buf != NULL); >- >+ > if (!memcmp (_info->ID, INFO_ID_VCD, sizeof (_info->ID))) > switch (_info->version) > { >@@ -985,7 +987,7 @@ > break; > } > else if (!memcmp (_info->ID, INFO_ID_SVCD, sizeof (_info->ID))) >- switch (_info->version) >+ switch (_info->version) > { > case INFO_VERSION_SVCD: > if (_info->sys_prof_tag != INFO_SPTAG_SVCD) >@@ -993,7 +995,7 @@ > "-- assuming SVCD", _info->sys_prof_tag); > _type = VCD_TYPE_SVCD; > break; >- >+ > default: > vcd_warn ("INFO.SVD: unexpected version value %d seen " > " -- still assuming SVCD", _info->version); >@@ -1001,14 +1003,14 @@ > break; > } > else if (!memcmp (_info->ID, INFO_ID_HQVCD, sizeof (_info->ID))) >- switch (_info->version) >+ switch (_info->version) > { > case INFO_VERSION_HQVCD: > if (_info->sys_prof_tag != INFO_SPTAG_HQVCD) > vcd_warn ("INFO.SVD: unexpected system profile tag value -- assuming hqvcd"); > _type = VCD_TYPE_HQVCD; > break; >- >+ > default: > vcd_warn ("INFO.SVD: unexpected version value %d seen " > "-- still assuming HQVCD", _info->version); >@@ -1017,14 +1019,14 @@ > } > else > vcd_warn ("INFO.SVD: signature not found"); >- >+ > return _type; > } > > /* eof */ > >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/lib/image_bincue.c vcdimager-0.7.24/lib/image_bincue.c >--- vcdimager-0.7.24.ORIG/lib/image_bincue.c 2018-01-02 16:24:55.931944628 +0100 >+++ vcdimager-0.7.24/lib/image_bincue.c 2018-01-02 16:30:11.449927241 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >@@ -26,6 +26,8 @@ > #include <stdlib.h> > #include <string.h> > >+/* We don't want to pull in cdio's config */ >+#define __CDIO_CONFIG_H__ > #include <cdio/cdio.h> > #include <cdio/bytesex.h> > #include <cdio/iso9660.h> >@@ -72,7 +74,7 @@ > if (!(_obj->cue_snk = vcd_data_sink_new_stdio (_obj->cue_fname))) > vcd_error ("init failed"); > >- _obj->init = true; >+ _obj->init = true; > } > > static void >@@ -94,7 +96,7 @@ > CdioListNode_t *node; > int track_no, index_no; > const vcd_cue_t *_last_cue = 0; >- >+ > _sink_init (_obj); > > vcd_data_sink_printf (_obj->cue_snk, "FILE \"%s\" BINARY\r\n", >@@ -106,16 +108,16 @@ > { > const vcd_cue_t *_cue = _cdio_list_node_data (node); > char *psz_msf; >- >+ > msf_t _msf = { 0, 0, 0 }; >- >+ > switch (_cue->type) > { > case VCD_CUE_TRACK_START: > track_no++; > index_no = 0; > >- vcd_data_sink_printf (_obj->cue_snk, >+ vcd_data_sink_printf (_obj->cue_snk, > " TRACK %2.2d MODE2/%d\r\n" > " FLAGS DCP\r\n", > track_no, (_obj->sector_2336_flag ? 2336 : 2352)); >@@ -125,8 +127,8 @@ > cdio_lba_to_msf (_last_cue->lsn, &_msf); > psz_msf = cdio_msf_to_str(&_msf); > >- vcd_data_sink_printf (_obj->cue_snk, >- " INDEX %2.2d %s\r\n", >+ vcd_data_sink_printf (_obj->cue_snk, >+ " INDEX %2.2d %s\r\n", > index_no, psz_msf); > free(psz_msf); > } >@@ -136,7 +138,7 @@ > cdio_lba_to_msf (_cue->lsn, &_msf); > psz_msf = cdio_msf_to_str(&_msf); > >- vcd_data_sink_printf (_obj->cue_snk, >+ vcd_data_sink_printf (_obj->cue_snk, > " INDEX %2.2d %s\r\n", > index_no, psz_msf); > free(psz_msf); >@@ -155,12 +157,12 @@ > cdio_lba_to_msf (_cue->lsn, &_msf); > psz_msf = cdio_msf_to_str(&_msf); > >- vcd_data_sink_printf (_obj->cue_snk, >+ vcd_data_sink_printf (_obj->cue_snk, > " INDEX %2.2d %s\r\n", > index_no, psz_msf); > free(psz_msf); > break; >- >+ > case VCD_CUE_END: > vcd_data_sink_close (_obj->cue_snk); > return 0; >@@ -177,7 +179,7 @@ > > return -1; > } >- >+ > static int > _vcd_image_bincue_write (void *user_data, const void *data, lsn_t lsn) > { >@@ -190,7 +192,7 @@ > offset *= _obj->sector_2336_flag ? M2RAW_SECTOR_SIZE : CDIO_CD_FRAMESIZE_RAW; > > vcd_data_sink_seek(_obj->bin_snk, offset); >- >+ > if (_obj->sector_2336_flag) > vcd_data_sink_write(_obj->bin_snk, buf + 12 + 4, M2RAW_SECTOR_SIZE, 1); > else >diff -ur vcdimager-0.7.24.ORIG/lib/image.c vcdimager-0.7.24/lib/image.c >--- vcdimager-0.7.24.ORIG/lib/image.c 2005-06-09 02:53:23.000000000 +0200 >+++ vcdimager-0.7.24/lib/image.c 2018-01-02 16:30:01.983927763 +0100 >@@ -18,11 +18,13 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif > >+/* We don't want to pull in cdio's config */ >+#define __CDIO_CONFIG_H__ > #include <cdio/cdio.h> > > /* Public headers */ >@@ -62,13 +64,13 @@ > vcd_image_sink_destroy (VcdImageSink_t *p_obj) > { > vcd_assert (p_obj != NULL); >- >+ > p_obj->op.free (p_obj->user_data); > free (p_obj); > } > > int >-vcd_image_sink_set_cuesheet (VcdImageSink_t *p_obj, >+vcd_image_sink_set_cuesheet (VcdImageSink_t *p_obj, > const CdioList_t *vcd_cue_list) > { > vcd_assert (p_obj != NULL); >@@ -99,8 +101,8 @@ > return obj->op.set_arg (obj->user_data, key, value); > } > >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/lib/image_cdrdao.c vcdimager-0.7.24/lib/image_cdrdao.c >--- vcdimager-0.7.24.ORIG/lib/image_cdrdao.c 2005-06-09 02:53:23.000000000 +0200 >+++ vcdimager-0.7.24/lib/image_cdrdao.c 2018-01-02 16:30:19.771926783 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >@@ -26,6 +26,8 @@ > #include <stdlib.h> > #include <string.h> > >+/* We don't want to pull in cdio's config */ >+#define __CDIO_CONFIG_H__ > /* Public headers */ > #include <cdio/iso9660.h> > #include <cdio/util.h> >@@ -85,7 +87,7 @@ > const vcd_cue_t *_last_cue = 0; > unsigned last_track_lsn = 0; > >- vcd_data_sink_printf (toc_snk, >+ vcd_data_sink_printf (toc_snk, > "// CDRDAO TOC\n" > "// generated by %s\n\n" > "CD_ROM_XA\n", vcd_version_string (false)); >@@ -103,7 +105,7 @@ > *_cue2 = *_cue; > _cdio_list_append (_obj->vcd_cue_list, _cue2); > } >- >+ > switch (_cue->type) > { > case VCD_CUE_TRACK_START: >@@ -112,21 +114,21 @@ > > last_track_lsn = _cue->lsn; > >- vcd_data_sink_printf (toc_snk, >+ vcd_data_sink_printf (toc_snk, > "\n// Track %d\n" > "TRACK %s\n COPY\n", > track_no, > (_obj->sector_2336_flag ? "MODE2_FORM_MIX" : "MODE2_RAW")); > > if (_last_cue && _last_cue->type == VCD_CUE_PREGAP_START) >- vcd_data_sink_printf (toc_snk, >+ vcd_data_sink_printf (toc_snk, > " DATAFILE \"%s_%.2d_pregap.img\"\n" > " START\n", > _obj->img_base, track_no); > > index_no++; > >- vcd_data_sink_printf (toc_snk, >+ vcd_data_sink_printf (toc_snk, > " DATAFILE \"%s_%.2d.img\"\n", > _obj->img_base, track_no); > break; >@@ -170,7 +172,7 @@ > > return -1; > } >- >+ > static int > _vcd_image_cdrdao_write (void *user_data, const void *data, lsn_t lsn) > { >@@ -189,8 +191,8 @@ > _CDIO_LIST_FOREACH (node, _obj->vcd_cue_list) > { > const vcd_cue_t *_cue = _cdio_list_node_data (node); >- >- switch (_cue->type) >+ >+ switch (_cue->type) > { > case VCD_CUE_PREGAP_START: > case VCD_CUE_END: >@@ -203,7 +205,7 @@ > _pregap = _lpregap; > } > >- _last = _cue->lsn; >+ _last = _cue->lsn; > _lpregap = (_cue->type == VCD_CUE_PREGAP_START); > > if (_cue->type == VCD_CUE_TRACK_START) >@@ -230,9 +232,9 @@ > snprintf (buf, sizeof (buf), > "%s_%.2d%s.img", > _obj->img_base, >- (_pregap ? in_track + 1 : in_track), >+ (_pregap ? in_track + 1 : in_track), > (_pregap ? "_pregap" : "")); >- >+ > _obj->last_bin_snk = vcd_data_sink_new_stdio (buf); > _obj->last_snk_idx = in_track; > _obj->last_pause = _pregap; >@@ -245,12 +247,12 @@ > offset *= _obj->sector_2336_flag ? M2RAW_SECTOR_SIZE : CDIO_CD_FRAMESIZE_RAW; > > vcd_data_sink_seek(_obj->last_bin_snk, offset); >- >+ > if (_obj->sector_2336_flag) > vcd_data_sink_write(_obj->last_bin_snk, buf + 12 + 4, M2RAW_SECTOR_SIZE, 1); > else > vcd_data_sink_write(_obj->last_bin_snk, buf, CDIO_CD_FRAMESIZE_RAW, 1); >- >+ > return 0; > } > >@@ -296,7 +298,7 @@ > vcd_image_sink_new_cdrdao (void) > { > _img_cdrdao_snk_t *_data; >- >+ > vcd_image_sink_funcs _funcs = { > .set_cuesheet = _set_cuesheet, > .write = _vcd_image_cdrdao_write, >diff -ur vcdimager-0.7.24.ORIG/lib/image_nrg.c vcdimager-0.7.24/lib/image_nrg.c >--- vcdimager-0.7.24.ORIG/lib/image_nrg.c 2006-03-08 01:19:57.000000000 +0100 >+++ vcdimager-0.7.24/lib/image_nrg.c 2018-01-02 16:30:27.657926348 +0100 >@@ -22,7 +22,7 @@ > /*! This code implements low-level access functions for Nero's native > CD-image format residing inside a disk file (*.nrg). > */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >@@ -31,6 +31,8 @@ > #include <stdlib.h> > #include <string.h> > >+/* We don't want to pull in cdio's config */ >+#define __CDIO_CONFIG_H__ > #include <cdio/cdio.h> > #include <cdio/bytesex.h> > #include <cdio/iso9660.h> >@@ -57,7 +59,7 @@ > typedef struct { > uint32_t start GNUC_PACKED; > uint32_t length GNUC_PACKED; >- uint32_t type GNUC_PACKED; /* only 0x3 seen so far... >+ uint32_t type GNUC_PACKED; /* only 0x3 seen so far... > -> MIXED_MODE2 2336 blocksize */ > uint32_t start_lsn GNUC_PACKED; /* does not include any pre-gaps! */ > uint32_t _unknown GNUC_PACKED; /* wtf is this for? -- always zero... */ >@@ -77,7 +79,7 @@ > uint8_t track; /* binary or BCD?? */ > uint8_t index; /* makes 0->1 transitions */ > uint8_t _unknown2; /* ?? */ >- uint32_t lsn GNUC_PACKED; >+ uint32_t lsn GNUC_PACKED; > } _cuex_array_t; > > typedef struct { >@@ -124,7 +126,7 @@ > if (!(_obj->nrg_snk = vcd_data_sink_new_stdio (_obj->nrg_fname))) > vcd_error ("init failed"); > >- _obj->init = true; >+ _obj->init = true; > } > > >@@ -157,7 +159,7 @@ > vcd_cue_t *_cue2 = calloc(1, sizeof (vcd_cue_t)); > *_cue2 = *_cue; > _cdio_list_append (_obj->vcd_cue_list, _cue2); >- >+ > if (_cue->type == VCD_CUE_TRACK_START) > num++; > >@@ -184,7 +186,7 @@ > _CDIO_LIST_FOREACH (node, _obj->vcd_cue_list) > { > _cue = _cdio_list_node_data (node); >- >+ > if (lsn < _cue->lsn) > break; > >@@ -202,7 +204,7 @@ > > _last = _cue; > } >- >+ > vcd_assert (node != NULL); > > switch (_last->type) >@@ -214,7 +216,7 @@ > case VCD_CUE_PREGAP_START: > return -1; > break; >- >+ > default: > case VCD_CUE_END: > vcd_assert_not_reached (); >@@ -242,10 +244,10 @@ > _CDIO_LIST_FOREACH (node, _obj->vcd_cue_list) > { > vcd_cue_t *_cue = _cdio_list_node_data (node); >- >+ > if (_cue->type == VCD_CUE_TRACK_START) > { >- vcd_cue_t *_cue2 = >+ vcd_cue_t *_cue2 = > _cdio_list_node_data (_cdio_list_node_next (node)); > > _etnf_array_t _etnf = { 0, }; >@@ -253,14 +255,14 @@ > _etnf.type = UINT32_TO_BE (0x3); > _etnf.start_lsn = uint32_to_be (_map (_obj, _cue->lsn)); > _etnf.start = uint32_to_be (_map (_obj, _cue->lsn) * M2RAW_SECTOR_SIZE); >- >+ > _etnf.length = uint32_to_be ((_cue2->lsn - _cue->lsn) * M2RAW_SECTOR_SIZE); > > vcd_data_sink_write (_obj->nrg_snk, &_etnf, sizeof (_etnf_array_t), 1); > } >- >+ > } >- >+ > { > uint32_t tracks = uint32_to_be (_obj->tracks); > >@@ -281,7 +283,7 @@ > > return 0; > } >- >+ > static int > _vcd_image_nrg_write (void *user_data, const void *data, lsn_t lsn) > { >@@ -302,7 +304,7 @@ > > if (_obj->cue_end_lsn - 1 == lsn) > { >- vcd_debug ("ENDLSN reached! (%lu == %lu)", >+ vcd_debug ("ENDLSN reached! (%lu == %lu)", > (long unsigned int) lsn, (long unsigned int) _lsn); > return _write_tail (_obj, (_lsn + 1) * M2RAW_SECTOR_SIZE); > } >diff -ur vcdimager-0.7.24.ORIG/lib/image_sink.h vcdimager-0.7.24/lib/image_sink.h >--- vcdimager-0.7.24.ORIG/lib/image_sink.h 2005-06-09 02:53:23.000000000 +0200 >+++ vcdimager-0.7.24/lib/image_sink.h 2018-01-02 16:27:31.311936066 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifndef __VCD_IMAGE_SINK_H__ > #define __VCD_IMAGE_SINK_H__ > >@@ -61,7 +61,7 @@ > vcd_image_sink_destroy (VcdImageSink_t *p_obj); > > int >-vcd_image_sink_set_cuesheet (VcdImageSink_t *p_obj, >+vcd_image_sink_set_cuesheet (VcdImageSink_t *p_obj, > const CdioList_t *p_vcd_cue_list); > > int >@@ -71,7 +71,7 @@ > Set the arg "key" with "value" in the target device. > */ > int >-vcd_image_sink_set_arg (VcdImageSink_t *p_obj, const char key[], >+vcd_image_sink_set_arg (VcdImageSink_t *p_obj, const char key[], > const char value[]); > > VcdImageSink_t * vcd_image_sink_new_nrg (void); >diff -ur vcdimager-0.7.24.ORIG/lib/inf.c vcdimager-0.7.24/lib/inf.c >--- vcdimager-0.7.24.ORIG/lib/inf.c 2004-11-22 04:49:48.000000000 +0100 >+++ vcdimager-0.7.24/lib/inf.c 2018-01-02 16:30:37.725925794 +0100 >@@ -18,13 +18,13 @@ > Software, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ > >-/* >+/* > Things here refer to lower-level structures using a structure other > than vcdinfo_t. For higher-level structures via the vcdinfo_t, see > info.c > */ > >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >@@ -49,6 +49,8 @@ > #include <unistd.h> > #endif > >+/* We don't want to pull in cdio's config */ >+#define __CDIO_CONFIG_H__ > #include <cdio/cdio.h> > #include <cdio/bytesex.h> > #include <cdio/util.h> >@@ -71,7 +73,7 @@ > { > static char _buf[BUF_COUNT][BUF_SIZE]; > static int _num = -1; >- >+ > _num++; > _num %= BUF_COUNT; > >@@ -85,7 +87,7 @@ > { > char *buf; > >- if (!_area->x1 >+ if (!_area->x1 > && !_area->y1 > && !_area->x2 > && !_area->y2) >@@ -96,13 +98,13 @@ > snprintf (buf, BUF_SIZE, "[%3d,%3d] - [%3d,%3d]", > _area->x1, _area->y1, > _area->x2, _area->y2); >- >+ > return buf; > } > > /*! >- Return a string containing the VCD album id, or NULL if there is >- some problem in getting this. >+ Return a string containing the VCD album id, or NULL if there is >+ some problem in getting this. > */ > const char * > vcdinf_get_album_id(const InfoVcd_t *info) >@@ -116,7 +118,7 @@ > Time is in seconds unless it is -1 (unlimited). > */ > int >-vcdinf_get_autowait_time (const PsdPlayListDescriptor_t *d) >+vcdinf_get_autowait_time (const PsdPlayListDescriptor_t *d) > { > return vcdinfo_get_wait_time (d->atime); > } >@@ -133,11 +135,11 @@ > } > > /*! >- Return a string giving VCD format (VCD 1.0 VCD 1.1, SVCD, ... >+ Return a string giving VCD format (VCD 1.0 VCD 1.1, SVCD, ... > for this object. > */ > const char * >-vcdinf_get_format_version_str (vcd_type_t vcd_type) >+vcdinf_get_format_version_str (vcd_type_t vcd_type) > { > switch (vcd_type) > { >@@ -168,7 +170,7 @@ > Return loop count. 0 is infinite loop. > */ > uint16_t >-vcdinf_get_loop_count (const PsdSelectionListDescriptor_t *psd) >+vcdinf_get_loop_count (const PsdSelectionListDescriptor_t *psd) > { > return 0x7f & psd->loop; > } >@@ -177,7 +179,7 @@ > Return LOT offset > */ > uint16_t >-vcdinf_get_lot_offset (const LotVcd_t *lot, unsigned int n) >+vcdinf_get_lot_offset (const LotVcd_t *lot, unsigned int n) > { > return uint16_from_be (lot->offset[n]); > } >@@ -193,7 +195,7 @@ > } > > /*! >- Return the number of segments in the VCD. >+ Return the number of segments in the VCD. > */ > segnum_t > vcdinf_get_num_segments(const InfoVcd_t *info) >@@ -203,10 +205,10 @@ > } > > /*! >- Return number of LIDs. >+ Return number of LIDs. > */ > lid_t >-vcdinf_get_num_LIDs (const InfoVcd_t *info) >+vcdinf_get_num_LIDs (const InfoVcd_t *info) > { > if (NULL==info) return 0; > /* Should probably use _vcd_pbc_max_lid instead? */ >@@ -227,14 +229,14 @@ > Time is in 1/15-second units. > */ > uint16_t >-vcdinf_get_play_time (const PsdPlayListDescriptor_t *d) >+vcdinf_get_play_time (const PsdPlayListDescriptor_t *d) > { > if (NULL==d) return 0; > return uint16_from_be (d->ptime); > } > > /*! >- Return number of bytes in PSD. >+ Return number of bytes in PSD. > */ > uint32_t > vcdinf_get_psd_size (const InfoVcd_t *info) >@@ -283,8 +285,8 @@ > /*! > Return the VCD volume count - the number of CD's in the collection. > */ >-unsigned int >-vcdinf_get_volume_count(const InfoVcd_t *info) >+unsigned int >+vcdinf_get_volume_count(const InfoVcd_t *info) > { > if (NULL==info) return 0; > return(uint16_from_be( info->vol_count)); >@@ -306,7 +308,7 @@ > Time is in seconds unless it is -1 (unlimited). > */ > int >-vcdinf_get_wait_time (const PsdPlayListDescriptor_t *d) >+vcdinf_get_wait_time (const PsdPlayListDescriptor_t *d) > { > return vcdinfo_get_wait_time (d->wtime); > } >@@ -315,17 +317,17 @@ > Return true if loop has a jump delay > */ > bool >-vcdinf_has_jump_delay (const PsdSelectionListDescriptor_t *psd) >+vcdinf_has_jump_delay (const PsdSelectionListDescriptor_t *psd) > { > if (NULL==psd) return false; > return ((0x80 & psd->loop) != 0); > } >- >-/*! >- Comparison routine used in sorting. We compare LIDs and if those are >+ >+/*! >+ Comparison routine used in sorting. We compare LIDs and if those are > equal, use the offset. > Note: we assume an unassigned LID is 0 and this compares as a high value. >- >+ > NOTE: Consider making static. > */ > int >@@ -335,9 +337,9 @@ > { > if (a->lid > b->lid) return +1; > if (a->lid < b->lid) return -1; >- vcd_warn ("LID %d at offset %d has same nunber as LID of offset %d", >+ vcd_warn ("LID %d at offset %d has same nunber as LID of offset %d", > a->lid, a->offset, b->offset); >- } >+ } > else if (a->lid) return -1; > else if (b->lid) return +1; > >@@ -345,25 +347,25 @@ > > if (a->offset > b->offset) return +1; > if (a->offset < b->offset) return -1; >- >+ > /* LIDS and offsets are equal. */ > return 0; > } > >-/* Get the LID from a given play-list descriptor. >- VCDINFO_REJECTED_MASK is returned d on error or pld is NULL. >+/* Get the LID from a given play-list descriptor. >+ VCDINFO_REJECTED_MASK is returned d on error or pld is NULL. > */ > lid_t > vcdinf_pld_get_lid(const PsdPlayListDescriptor_t *pld) > { >- return (pld != NULL) >+ return (pld != NULL) > ? uint16_from_be (pld->lid) & VCDINFO_LID_MASK > : VCDINFO_REJECTED_MASK; > } > > /** >- \fn vcdinfo_pld_get_next_offset(const PsdPlayListDescriptor *pld); >- \brief Get next offset for a given PSD selector descriptor. >+ \fn vcdinfo_pld_get_next_offset(const PsdPlayListDescriptor *pld); >+ \brief Get next offset for a given PSD selector descriptor. > \return VCDINFO_INVALID_OFFSET is returned on error or if pld has no "next" > entry or pld is NULL. Otherwise the LID offset is returned. > */ >@@ -377,7 +379,7 @@ > /*! > Return number of items in LIDs. Return 0 if error or not found. > */ >-int >+int > vcdinf_pld_get_noi (const PsdPlayListDescriptor_t *pld) > { > if ( NULL == pld ) return 0; >@@ -385,7 +387,7 @@ > } > > /*! >- Return the playlist item i in d. >+ Return the playlist item i in d. > */ > uint16_t > vcdinf_pld_get_play_item(const PsdPlayListDescriptor_t *pld, unsigned int i) >@@ -396,33 +398,33 @@ > > /** > \fn vcdinf_pld_get_prev_offset(const PsdPlayListDescriptor *pld); >- \brief Get prev offset for a given PSD selector descriptor. >+ \brief Get prev offset for a given PSD selector descriptor. > \return VCDINFO_INVALID_OFFSET is returned on error or if pld has no "prev" > entry or pld is NULL. Otherwise the LID offset is returned. > */ > uint16_t > vcdinf_pld_get_prev_offset(const PsdPlayListDescriptor_t *pld) > { >- return (pld != NULL) ? >+ return (pld != NULL) ? > uint16_from_be (pld->prev_ofs) : VCDINFO_INVALID_OFFSET; > } > > /** > \fn vcdinf_pld_get_return_offset(const PsdPlayListDescriptor *pld); >- \brief Get return offset for a given PLD selector descriptor. >- \return VCDINFO_INVALID_OFFSET is returned on error or if pld has no >+ \brief Get return offset for a given PLD selector descriptor. >+ \return VCDINFO_INVALID_OFFSET is returned on error or if pld has no > "return" entry or pld is NULL. Otherwise the LID offset is returned. > */ > uint16_t > vcdinf_pld_get_return_offset(const PsdPlayListDescriptor_t *pld) > { >- return (pld != NULL) ? >+ return (pld != NULL) ? > uint16_from_be (pld->return_ofs) : VCDINFO_INVALID_OFFSET; > } > > /** > * \fn vcdinfo_psd_get_default_offset(const PsdSelectionListDescriptor *psd); >- * \brief Get next offset for a given PSD selector descriptor. >+ * \brief Get next offset for a given PSD selector descriptor. > * \return VCDINFO_INVALID_OFFSET is returned on error or if psd is > * NULL. Otherwise the LID offset is returned. > */ >@@ -434,8 +436,8 @@ > } > > /*! >- Get the item id for a given selection-list descriptor. >- VCDINFO_REJECTED_MASK is returned on error or if psd is NULL. >+ Get the item id for a given selection-list descriptor. >+ VCDINFO_REJECTED_MASK is returned on error or if psd is NULL. > */ > uint16_t > vcdinf_psd_get_itemid(const PsdSelectionListDescriptor_t *psd) >@@ -444,32 +446,32 @@ > } > > /*! >- Get the LID from a given selection-list descriptor. >- VCDINFO_REJECTED_MASK is returned on error or psd is NULL. >+ Get the LID from a given selection-list descriptor. >+ VCDINFO_REJECTED_MASK is returned on error or psd is NULL. > */ > lid_t > vcdinf_psd_get_lid(const PsdSelectionListDescriptor_t *psd) > { >- return (psd != NULL) >+ return (psd != NULL) > ? uint16_from_be (psd->lid) & VCDINFO_LID_MASK > : VCDINFO_REJECTED_MASK; > } > > /*! >- Get the LID rejected status for a given PSD selector descriptor. >- true is also returned d is NULL. >+ Get the LID rejected status for a given PSD selector descriptor. >+ true is also returned d is NULL. > */ > bool > vcdinf_psd_get_lid_rejected(const PsdSelectionListDescriptor_t *psd) > { >- return (psd != NULL) >- ? vcdinfo_is_rejected(uint16_from_be(psd->lid)) >+ return (psd != NULL) >+ ? vcdinfo_is_rejected(uint16_from_be(psd->lid)) > : true; > } > > /** > * \fn vcdinf_psd_get_next_offset(const PsdSelectionListDescriptor *psd); >- * \brief Get "next" offset for a given PSD selector descriptor. >+ * \brief Get "next" offset for a given PSD selector descriptor. > * \return VCDINFO_INVALID_OFFSET is returned on error or if psd is > * NULL. Otherwise the LID offset is returned. > */ >@@ -481,15 +483,15 @@ > } > > /** >- * \fn vcdinf_psd_get_offset(const PsdSelectionListDescriptor *d, >+ * \fn vcdinf_psd_get_offset(const PsdSelectionListDescriptor *d, > * unsigned int entry_num); >- * \brief Get offset entry_num for a given PSD selector descriptor. >+ * \brief Get offset entry_num for a given PSD selector descriptor. > * \return VCDINFO_INVALID_OFFSET is returned if d on error or d is > * NULL. Otherwise the LID offset is returned. > */ > uint16_t >-vcdinf_psd_get_offset(const PsdSelectionListDescriptor_t *psd, >- unsigned int entry_num) >+vcdinf_psd_get_offset(const PsdSelectionListDescriptor_t *psd, >+ unsigned int entry_num) > { > return (psd != NULL && entry_num < vcdinf_get_num_selections(psd)) > ? uint16_from_be (psd->ofs[entry_num]) : VCDINFO_INVALID_OFFSET; >@@ -497,32 +499,32 @@ > > /** > \fn vcdinf_psd_get_prev_offset(const PsdSelectionListDescriptor *psd); >- \brief Get "prev" offset for a given PSD selector descriptor. >+ \brief Get "prev" offset for a given PSD selector descriptor. > \return VCDINFO_INVALID_OFFSET is returned on error or if psd has no "prev" > entry or psd is NULL. Otherwise the LID offset is returned. > */ > uint16_t > vcdinf_psd_get_prev_offset(const PsdSelectionListDescriptor_t *psd) > { >- return (psd != NULL) ? >+ return (psd != NULL) ? > uint16_from_be (psd->prev_ofs) : VCDINFO_INVALID_OFFSET; > } > > /** > * \fn vcdinf_psd_get_return_offset(const PsdSelectionListDescriptor *psd); >- * \brief Get return offset for a given PSD selector descriptor. >- \return VCDINFO_INVALID_OFFSET is returned on error or if psd has no >+ * \brief Get return offset for a given PSD selector descriptor. >+ \return VCDINFO_INVALID_OFFSET is returned on error or if psd has no > "return" entry or psd is NULL. Otherwise the LID offset is returned. > */ > uint16_t > vcdinf_psd_get_return_offset(const PsdSelectionListDescriptor_t *psd) > { >- return (psd != NULL) ? >+ return (psd != NULL) ? > uint16_from_be (psd->return_ofs) : VCDINFO_INVALID_OFFSET; > } > >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/lib/info.c vcdimager-0.7.24/lib/info.c >--- vcdimager-0.7.24.ORIG/lib/info.c 2005-08-03 10:15:37.000000000 +0200 >+++ vcdimager-0.7.24/lib/info.c 2018-01-02 16:30:57.783924688 +0100 >@@ -17,13 +17,13 @@ > along with this program; if not, write to the Free Foundation > Software, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >-/* >+/* > Things here refer to higher-level structures usually accessed via >- vcdinfo_t. For lower-level access which generally use >+ vcdinfo_t. For lower-level access which generally use > structures other than vcdinfo_t, see inf.c > */ > >- >+ > /* Private headers */ > #include "info_private.h" > #include "vcd_assert.h" >@@ -70,7 +70,7 @@ > { > static char _buf[BUF_COUNT][BUF_SIZE]; > static int _num = -1; >- >+ > _num++; > _num %= BUF_COUNT; > >@@ -79,13 +79,13 @@ > return _buf[_num]; > } > >-/* >- Initialize/allocate segment portion of vcdinfo_obj_t. >+/* >+ Initialize/allocate segment portion of vcdinfo_obj_t. > >- Getting exact segments sizes is done in a rather complicated way. >- A simple approach would be to use the fixed size allocated on disk, >- but players have trouble with the internal fragmentation padding. >- More accurate results are obtained by consulting with ISO 9660 >+ Getting exact segments sizes is done in a rather complicated way. >+ A simple approach would be to use the fixed size allocated on disk, >+ but players have trouble with the internal fragmentation padding. >+ More accurate results are obtained by consulting with ISO 9660 > information for the corresponding file entry. > > Another approach to get segment sizes is to read/scan the >@@ -100,13 +100,13 @@ > CdioList_t *entlist; > int i; > lsn_t last_lsn=0; >- >+ > p_obj->first_segment_lsn = cdio_msf_to_lsn(&info->first_seg_addr); > p_obj->seg_sizes = calloc(1, num_segments * sizeof(uint32_t *)); > > if (NULL == p_obj->seg_sizes || 0 == num_segments) return; > >- entlist = iso9660_fs_readdir(p_obj->img, "SEGMENT", true); >+ entlist = iso9660_fs_readdir(p_obj->img, "SEGMENT"); > > i=0; > _CDIO_LIST_FOREACH (entnode, entlist) { >@@ -118,14 +118,14 @@ > p_obj->seg_sizes[i] = VCDINFO_SEGMENT_SECTOR_SIZE; > i++; > } >- >- /* Should have an entry in the ISO 9660 filesystem. Get and save >+ >+ /* Should have an entry in the ISO 9660 filesystem. Get and save > in statbuf.secsize this size. > */ > p_obj->seg_sizes[i] = statbuf->secsize; > >- if (last_lsn >= statbuf->lsn) >- vcd_warn ("Segments if ISO 9660 directory out of order lsn %ul >= %ul", >+ if (last_lsn >= statbuf->lsn) >+ vcd_warn ("Segments if ISO 9660 directory out of order lsn %ul >= %ul", > (unsigned int) last_lsn, (unsigned int) statbuf->lsn); > last_lsn = statbuf->lsn; > >@@ -137,21 +137,21 @@ > i++; > } > >- if (i != num_segments) >- vcd_warn ("Number of segments found %d is not number of segments %d", >+ if (i != num_segments) >+ vcd_warn ("Number of segments found %d is not number of segments %d", > i, num_segments); > >- _cdio_list_free (entlist, true); >+ _cdio_list_free (entlist, true, NULL); >+ > >- > #if 0 > /* Figure all of the segment sector sizes */ > for (i=0; i < num_segments; i++) { >- >+ > p_obj->seg_sizes[i] = VCDINFO_SEGMENT_SECTOR_SIZE; > > if ( !info->spi_contents[i].item_cont ) { >- /* Should have an entry in the ISO 9660 filesystem. Get and save >+ /* Should have an entry in the ISO 9660 filesystem. Get and save > in statbuf.secsize this size. > */ > lsn_t lsn = vcdinfo_get_seg_lsn(p_obj, i); >@@ -173,8 +173,8 @@ > 0 is returned on error. > */ > unsigned int >-vcdinfo_audio_type_num_channels(const vcdinfo_obj_t *p_obj, >- unsigned int audio_type) >+vcdinfo_audio_type_num_channels(const vcdinfo_obj_t *p_obj, >+ unsigned int audio_type) > { > const int audio_types[2][5] = > { >@@ -186,8 +186,8 @@ > 0}, /* error */ > > { /* SVCD, HQVCD */ >- 0, /* no stream */ >- 1, /* 1 stream */ >+ 0, /* no stream */ >+ 1, /* 1 stream */ > 2, /* 2 streams */ > 1, /* 1 multi-channel stream (surround sound) */ > 0} /* error */ >@@ -197,7 +197,7 @@ > if (audio_type > 4) { > return 0; > } >- >+ > /* Get first index entry into above audio_type array from vcd_type */ > switch (p_obj->vcd_type) { > >@@ -224,23 +224,23 @@ > /*! > Return a string describing an audio type. > */ >-const char * >+const char * > vcdinfo_audio_type2str(const vcdinfo_obj_t *p_obj, unsigned int audio_type) > { > const char *audio_types[3][5] = > { > /* INVALID, VCD 1.0, or VCD 1.1 */ >- { "unknown", "invalid", "", "", "" }, >- >+ { "unknown", "invalid", "", "", "" }, >+ > /*VCD 2.0 */ >- { "no audio", "single channel", "stereo", "dual channel", "error" }, >- >+ { "no audio", "single channel", "stereo", "dual channel", "error" }, >+ > /* SVCD, HQVCD */ >- { "no stream", "1 stream", "2 streams", >- "1 multi-channel stream (surround sound)", "error"}, >+ { "no stream", "1 stream", "2 streams", >+ "1 multi-channel stream (surround sound)", "error"}, > }; > >- unsigned int first_index = 0; >+ unsigned int first_index = 0; > > /* Get first index entry into above audio_type array from vcd_type */ > switch (p_obj->vcd_type) { >@@ -261,20 +261,20 @@ > /* We have an invalid entry. Set to handle below. */ > audio_type=4; > } >- >+ > /* We should also check that the second index is in range too. */ > if (audio_type > 3) { > first_index=0; > audio_type=1; > } >- >+ > return audio_types[first_index][audio_type]; > } > > /*! > Note first i_seg is 0! > */ >-const char * >+const char * > vcdinfo_ogt2str(const vcdinfo_obj_t *p_obj, segnum_t i_seg) > { > const InfoVcd_t *info = &(p_obj->info); >@@ -285,12 +285,12 @@ > "0 & 1 available", > "all 4 available" > }; >- >+ > return ogt_str[info->spi_contents[i_seg].ogt]; > } > > >-const char * >+const char * > vcdinfo_video_type2str(const vcdinfo_obj_t *p_obj, segnum_t i_seg) > { > const char *video_types[] = >@@ -305,23 +305,23 @@ > "PAL motion" > "INVALID ENTRY" > }; >- >+ > return video_types[vcdinfo_get_video_type(p_obj, i_seg)]; > } > > /*! >- \brief Classify i_itemid into the kind of item it is: track #, entry #, >- segment #. >- \param itemid is set to contain this classification an the converted >- entry number. >+ \brief Classify i_itemid into the kind of item it is: track #, entry #, >+ segment #. >+ \param itemid is set to contain this classification an the converted >+ entry number. > */ > void >-vcdinfo_classify_itemid (uint16_t i_itemid, >+vcdinfo_classify_itemid (uint16_t i_itemid, > /*out*/ vcdinfo_itemid_t *itemid) > { > > itemid->num = i_itemid; >- if (i_itemid < 2) >+ if (i_itemid < 2) > itemid->type = VCDINFO_ITEM_TYPE_NOTFOUND; > else if (i_itemid < MIN_ENCODED_TRACK_NUM) { > itemid->type = VCDINFO_ITEM_TYPE_TRACK; >@@ -334,7 +334,7 @@ > else if (i_itemid <= MAX_ENCODED_SEGMENT_NUM) { > itemid->type = VCDINFO_ITEM_TYPE_SEGMENT; > itemid->num -= (MIN_ENCODED_SEGMENT_NUM); >- } else >+ } else > itemid->type = VCDINFO_ITEM_TYPE_SPAREID2; > } > >@@ -343,7 +343,7 @@ > { > char *buf = _getbuf (); > vcdinfo_itemid_t itemid; >- >+ > vcdinfo_classify_itemid(i_itemid, &itemid); > strcpy (buf, "??"); > >@@ -352,7 +352,7 @@ > snprintf (buf, BUF_SIZE, "play nothing (0x%4.4x)", itemid.num); > break; > case VCDINFO_ITEM_TYPE_TRACK: >- snprintf (buf, BUF_SIZE, "SEQUENCE[%d] (0x%4.4x)", itemid.num-1, >+ snprintf (buf, BUF_SIZE, "SEQUENCE[%d] (0x%4.4x)", itemid.num-1, > i_itemid); > break; > case VCDINFO_ITEM_TYPE_ENTRY: >@@ -373,8 +373,8 @@ > } > > /*! >- Return a string containing the VCD album id, or NULL if there is >- some problem in getting this. >+ Return a string containing the VCD album id, or NULL if there is >+ some problem in getting this. > */ > const char * > vcdinfo_get_album_id(const vcdinfo_obj_t *p_obj) >@@ -385,7 +385,7 @@ > > /*! > Return the VCD ID. >- NULL is returned if there is some problem in getting this. >+ NULL is returned if there is some problem in getting this. > */ > char * > vcdinfo_get_application_id(vcdinfo_obj_t *p_obj) >@@ -399,7 +399,7 @@ > NULL if error. > */ > CdIo_t * >-vcdinfo_get_cd_image (const vcdinfo_obj_t *p_vcd_obj) >+vcdinfo_get_cd_image (const vcdinfo_obj_t *p_vcd_obj) > { > if ( !p_vcd_obj ) return NULL; > return p_vcd_obj->img; >@@ -410,16 +410,16 @@ > \fn vcdinfo_selection_get_lid(const vcdinfo_obj_t *p_obj, lid_t lid, > unsigned int selection); > >- \brief Get offset of a selection for a given lid. >+ \brief Get offset of a selection for a given lid. > > Return the LID offset associated with a the selection number of the >- passed-in LID parameter. >+ passed-in LID parameter. > > \return VCDINFO_INVALID_LID is returned if obj on error or obj > is NULL. Otherwise the LID offset is returned. > */ > lid_t vcdinfo_selection_get_lid(const vcdinfo_obj_t *p_obj, lid_t lid, >- unsigned int selection) >+ unsigned int selection) > { > unsigned int offset; > >@@ -431,7 +431,7 @@ > case PSD_OFS_MULTI_DEF: > case PSD_OFS_MULTI_DEF_NO_NUM: > return VCDINFO_INVALID_LID; >- default: >+ default: > { > vcdinfo_offset_t *ofs = vcdinfo_get_offset_t(p_obj, offset); > return ofs->lid; >@@ -443,17 +443,17 @@ > \fn vcdinfo_selection_get_offset(const vcdinfo_obj_t *p_obj, lid_t lid, > unsigned int selection); > >- \brief Get offset of a selection for a given lid. >+ \brief Get offset of a selection for a given lid. > > Return the LID offset associated with a the selection number of the >- passed-in LID parameter. >+ passed-in LID parameter. > > \return VCDINFO_INVALID_OFFSET is returned if error, obj is NULL or > the lid is not some type of selection list. Otherwise the LID offset > is returned. > */ > uint16_t vcdinfo_selection_get_offset(const vcdinfo_obj_t *p_obj, lid_t lid, >- unsigned int selection) >+ unsigned int selection) > { > unsigned int bsn; > >@@ -462,11 +462,11 @@ > if (pxd.descriptor_type != PSD_TYPE_SELECTION_LIST && > pxd.descriptor_type != PSD_TYPE_EXT_SELECTION_LIST) { > vcd_warn( "Requesting selection of LID %i which not a selection list -" >- " type is 0x%x", >+ " type is 0x%x", > lid, pxd.descriptor_type ); > return VCDINFO_INVALID_OFFSET; > } >- >+ > bsn=vcdinf_get_bsn(pxd.psd); > > if ( (selection - bsn + 1) > 0) { >@@ -479,19 +479,19 @@ > > /** > \fn vcdinfo_get_default_offset(const vcdinfo_obj_t *p_obj, unsinged int lid); >- \brief Get return offset for a given PLD selector descriptor. >- \return VCDINFO_INVALID_OFFSET is returned on error or if pld has no >+ \brief Get return offset for a given PLD selector descriptor. >+ \return VCDINFO_INVALID_OFFSET is returned on error or if pld has no > "return" entry or pld is NULL. Otherwise the LID offset is returned. > */ > uint16_t > vcdinfo_get_default_offset(const vcdinfo_obj_t *p_obj, lid_t lid) > { > if (p_obj) { >- >+ > PsdListDescriptor_t pxd; > > vcdinfo_lid_get_pxd(p_obj, &pxd, lid); >- >+ > switch (pxd.descriptor_type) { > case PSD_TYPE_EXT_SELECTION_LIST: > case PSD_TYPE_SELECTION_LIST: >@@ -507,8 +507,8 @@ > } > > /*! >- \brief Get default or multi-default LID. >- >+ \brief Get default or multi-default LID. >+ > Return the LID offset associated with a the "default" entry of the > passed-in LID parameter. Note "default" entries are associated > with PSDs that are (extended) selection lists. If the "default" >@@ -516,13 +516,13 @@ > "default" LID. Otherwise this routine is exactly like > vcdinfo_get_default_lid with the exception of requiring an > additional "entry_num" parameter. >- >+ > \return VCDINFO_INVALID_LID is returned on error, or if the LID > is not a selection list or no "default" entry. Otherwise the LID > offset is returned. > */ > lid_t >-vcdinfo_get_multi_default_lid(const vcdinfo_obj_t *p_obj, lid_t lid, >+vcdinfo_get_multi_default_lid(const vcdinfo_obj_t *p_obj, lid_t lid, > lsn_t lsn) > { > unsigned int offset; >@@ -536,7 +536,7 @@ > case PSD_OFS_MULTI_DEF: > case PSD_OFS_MULTI_DEF_NO_NUM: > return VCDINFO_INVALID_LID; >- default: >+ default: > { > vcdinfo_offset_t *ofs = vcdinfo_get_offset_t(p_obj, offset); > return ofs->lid; >@@ -545,8 +545,8 @@ > } > > /*! >- \brief Get default or multi-default LID offset. >- >+ \brief Get default or multi-default LID offset. >+ > Return the LID offset associated with a the "default" entry of the > passed-in LID parameter. Note "default" entries are associated > with PSDs that are (extended) selection lists. If the "default" >@@ -554,28 +554,28 @@ > "default" offset. Otherwise this routine is exactly like > vcdinfo_get_default_offset with the exception of requiring an > additional "entry_num" parameter. >- >+ > \return VCDINFO_INVALID_OFFSET is returned on error, or if the LID > is not a selection list or no "default" entry. Otherwise the LID > offset is returned. > */ > uint16_t >-vcdinfo_get_multi_default_offset(const vcdinfo_obj_t *p_obj, lid_t lid, >+vcdinfo_get_multi_default_offset(const vcdinfo_obj_t *p_obj, lid_t lid, > unsigned int entry_num) > { > uint16_t offset=vcdinfo_get_default_offset(p_obj, lid); > > switch (offset) { > case PSD_OFS_MULTI_DEF: >- case PSD_OFS_MULTI_DEF_NO_NUM: >+ case PSD_OFS_MULTI_DEF_NO_NUM: > { > /* Have some work todo... Figure the selection number. */ > PsdListDescriptor_t pxd; >- >+ > vcdinfo_lid_get_pxd(p_obj, &pxd, lid); > > switch (pxd.descriptor_type) { >- >+ > case PSD_TYPE_SELECTION_LIST: > case PSD_TYPE_EXT_SELECTION_LIST: { > vcdinfo_itemid_t selection_itemid; >@@ -589,9 +589,9 @@ > return VCDINFO_INVALID_OFFSET; > } > >- start_entry_num = vcdinfo_track_get_entry(p_obj, >+ start_entry_num = vcdinfo_track_get_entry(p_obj, > selection_itemid.num); >- return vcdinfo_selection_get_offset(p_obj, lid, >+ return vcdinfo_selection_get_offset(p_obj, lid, > entry_num-start_entry_num); > } > default: ; >@@ -627,12 +627,12 @@ > The first entry number is 0. > */ > uint32_t >-vcdinfo_get_entry_sect_count (const vcdinfo_obj_t *p_obj, >+vcdinfo_get_entry_sect_count (const vcdinfo_obj_t *p_obj, > unsigned int entry_num) > { > const EntriesVcd_t *entries = &(p_obj->entries); > const unsigned int entry_count = vcdinf_get_num_entries(entries); >- if (entry_num > entry_count) >+ if (entry_num > entry_count) > return 0; > else { > const lsn_t this_lsn = vcdinfo_get_entry_lsn(p_obj, entry_num); >@@ -641,14 +641,14 @@ > track_t track=vcdinfo_get_track(p_obj, entry_num); > track_t next_track=vcdinfo_get_track(p_obj, entry_num+1); > next_lsn = vcdinfo_get_entry_lsn(p_obj, entry_num+1); >- /* If we've changed tracks, don't include pregap sector between >+ /* If we've changed tracks, don't include pregap sector between > tracks. > */ > if (track != next_track) next_lsn -= CDIO_PREGAP_SECTORS; > } else { > /* entry_num == entry_count -1. Or the last entry. > This is really really ugly. There's probably a better >- way to do it. >+ way to do it. > Below we get the track of the current entry and then the LBA of the > beginning of the following (leadout?) track. > >@@ -663,7 +663,7 @@ > > /* Try to get the sector count from the ISO 9660 filesystem */ > statbuf = iso9660_find_fs_lsn(p_obj->img, lsn); >- >+ > if (NULL != statbuf) { > next_lsn = lsn + statbuf->secsize; > free(statbuf); >@@ -721,13 +721,13 @@ > } > } > >-EntriesVcd_t * >-vcdinfo_get_entriesVcd (vcdinfo_obj_t *p_obj) >+EntriesVcd_t * >+vcdinfo_get_entriesVcd (vcdinfo_obj_t *p_obj) > { > if (!p_obj) return NULL; > return &(p_obj->entries); > } >- >+ > /*! > Get the VCD format (VCD 1.0 VCD 1.1, SVCD, ... for this object. > The type is also set inside obj. >@@ -739,27 +739,27 @@ > } > > /*! >- Return a string giving VCD format (VCD 1.0 VCD 1.1, SVCD, ... >+ Return a string giving VCD format (VCD 1.0 VCD 1.1, SVCD, ... > for this object. > */ > const char * >-vcdinfo_get_format_version_str (const vcdinfo_obj_t *p_obj) >+vcdinfo_get_format_version_str (const vcdinfo_obj_t *p_obj) > { > if (!p_obj) return "*Uninitialized*"; > return vcdinf_get_format_version_str(p_obj->vcd_type); > } > >-InfoVcd_t * >-vcdinfo_get_infoVcd (vcdinfo_obj_t *p_obj) >+InfoVcd_t * >+vcdinfo_get_infoVcd (vcdinfo_obj_t *p_obj) > { > if (!p_obj) return NULL; > return &(p_obj->info); > } >- >+ > /*! Return the entry number closest and before the given LSN. > */ >-unsigned int >-vcdinfo_lsn_get_entry(const vcdinfo_obj_t *p_obj, lsn_t lsn) >+unsigned int >+vcdinfo_lsn_get_entry(const vcdinfo_obj_t *p_obj, lsn_t lsn) > { > > /* Do a binary search to find the entry. */ >@@ -778,42 +778,42 @@ > return (lsn == mid_lsn) ? mid : mid-1; > } > >- >+ > /*! > \brief Get ISO 9660 Primary Volume Descriptor (PVD) for a VCDinfo > object. > */ >-iso9660_pvd_t * >-vcdinfo_get_pvd (vcdinfo_obj_t *p_obj) >+iso9660_pvd_t * >+vcdinfo_get_pvd (vcdinfo_obj_t *p_obj) > { > if (!p_obj) return NULL; > return &(p_obj->pvd); > } >- >-void * >-vcdinfo_get_scandata (vcdinfo_obj_t *p_obj) >+ >+void * >+vcdinfo_get_scandata (vcdinfo_obj_t *p_obj) > { > if (!p_obj) return NULL; > return p_obj->scandata_buf; > } >- >-void * >-vcdinfo_get_searchDat (vcdinfo_obj_t *p_obj) >+ >+void * >+vcdinfo_get_searchDat (vcdinfo_obj_t *p_obj) > { > if (!p_obj) return NULL; > return p_obj->search_buf; > } >- >-void * >-vcdinfo_get_tracksSVD (vcdinfo_obj_t *p_obj) >+ >+void * >+vcdinfo_get_tracksSVD (vcdinfo_obj_t *p_obj) > { > if (!p_obj) return NULL; > return p_obj->tracks_buf; > } >- >+ > /*! >- Get the itemid for a given list ID. >- VCDINFO_REJECTED_MASK is returned on error or if obj is NULL. >+ Get the itemid for a given list ID. >+ VCDINFO_REJECTED_MASK is returned on error or if obj is NULL. > */ > uint16_t > vcdinfo_lid_get_itemid(const vcdinfo_obj_t *p_obj, lid_t lid) >@@ -840,7 +840,7 @@ > } > > /*! >- Get the LOT pointer. >+ Get the LOT pointer. > */ > LotVcd_t * > vcdinfo_get_lot(const vcdinfo_obj_t *p_obj) >@@ -850,7 +850,7 @@ > } > > /*! >- Get the extended LOT pointer. >+ Get the extended LOT pointer. > */ > LotVcd_t * > vcdinfo_get_lot_x(const vcdinfo_obj_t *p_obj) >@@ -858,9 +858,9 @@ > if (!p_obj) return NULL; > return p_obj->lot_x; > } >- >+ > /*! >- Return number of LIDs. >+ Return number of LIDs. > */ > lid_t > vcdinfo_get_num_LIDs (const vcdinfo_obj_t *p_obj) >@@ -892,15 +892,15 @@ > } > > /*! >- \fn vcdinfo_get_offset_lid(const vcdinfo_obj_t *p_obj, >+ \fn vcdinfo_get_offset_lid(const vcdinfo_obj_t *p_obj, > unsigned int entry_num); >- \brief Get offset entry_num for a given LID. >+ \brief Get offset entry_num for a given LID. > \return VCDINFO_INVALID_OFFSET is returned if obj on error or obj > is NULL. Otherwise the LID offset is returned. > */ > uint16_t > vcdinfo_lid_get_offset(const vcdinfo_obj_t *p_obj, lid_t lid, >- unsigned int entry_num) >+ unsigned int entry_num) > { > PsdListDescriptor_t pxd; > >@@ -923,11 +923,11 @@ > > } > >-/*! >- NULL is returned on error. >+/*! >+ NULL is returned on error. > */ > static vcdinfo_offset_t * >-_vcdinfo_get_offset_t (const vcdinfo_obj_t *p_obj, unsigned int offset, >+_vcdinfo_get_offset_t (const vcdinfo_obj_t *p_obj, unsigned int offset, > bool ext) > { > CdioListNode_t *node; >@@ -940,7 +940,7 @@ > return NULL; > default: ; > } >- >+ > _CDIO_LIST_FOREACH (node, offset_list) > { > vcdinfo_offset_t *p_ofs = _cdio_list_node_data (node); >@@ -974,21 +974,21 @@ > /*! > Get the VCD info offset multiplier. > */ >-unsigned int vcdinfo_get_offset_mult(const vcdinfo_obj_t *p_obj) >+unsigned int vcdinfo_get_offset_mult(const vcdinfo_obj_t *p_obj) > { > if (!p_obj) return 0xFFFF; > return p_obj->info.offset_mult; > } > >-/*! >- Get entry in offset list for the item that has offset. This entry >- has for example the LID. NULL is returned on error. >+/*! >+ Get entry in offset list for the item that has offset. This entry >+ has for example the LID. NULL is returned on error. > */ > vcdinfo_offset_t * > vcdinfo_get_offset_t (const vcdinfo_obj_t *p_obj, unsigned int offset) > { > vcdinfo_offset_t *off_p= _vcdinfo_get_offset_t (p_obj, offset, true); >- if (NULL != off_p) >+ if (NULL != off_p) > return off_p; > return _vcdinfo_get_offset_t (p_obj, offset, false); > } >@@ -1008,7 +1008,7 @@ > Get the PSD. > */ > uint8_t * >-vcdinfo_get_psd(const vcdinfo_obj_t *p_obj) >+vcdinfo_get_psd(const vcdinfo_obj_t *p_obj) > { > if ( !p_obj ) return NULL; > return p_obj->psd; >@@ -1061,7 +1061,7 @@ > */ > static bool > _vcdinfo_lid_get_pxd(const vcdinfo_obj_t *p_obj, PsdListDescriptor_t *pxd, >- uint16_t lid, bool ext) >+ uint16_t lid, bool ext) > { > CdioListNode_t *node; > unsigned mult = p_obj->info.offset_mult; >@@ -1069,7 +1069,7 @@ > CdioList_t *offset_list = ext ? p_obj->offset_x_list : p_obj->offset_list; > > if (offset_list == NULL) return false; >- >+ > _CDIO_LIST_FOREACH (node, offset_list) > { > vcdinfo_offset_t *ofs = _cdio_list_node_data (node); >@@ -1089,7 +1089,7 @@ > } > > case PSD_TYPE_EXT_SELECTION_LIST: >- case PSD_TYPE_SELECTION_LIST: >+ case PSD_TYPE_SELECTION_LIST: > { > pxd->psd = (PsdSelectionListDescriptor_t *) (psd + _rofs); > if (vcdinf_psd_get_lid(pxd->psd) == lid) { >@@ -1118,8 +1118,8 @@ > > /** > \fn vcdinfo_get_return_offset(const vcdinfo_obj_t *p_obj); >- \brief Get return offset for a given LID. >- \return VCDINFO_INVALID_OFFSET is returned on error or if LID has no >+ \brief Get return offset for a given LID. >+ \return VCDINFO_INVALID_OFFSET is returned on error or if LID has no > "return" entry. Otherwise the LID offset is returned. > */ > uint16_t >@@ -1130,7 +1130,7 @@ > PsdListDescriptor_t pxd; > > vcdinfo_lid_get_pxd(p_obj, &pxd, lid); >- >+ > switch (pxd.descriptor_type) { > case PSD_TYPE_PLAY_LIST: > return vcdinf_pld_get_return_offset(pxd.pld); >@@ -1143,12 +1143,12 @@ > break; > } > } >- >+ > return VCDINFO_INVALID_OFFSET; > } > > /*! >- Return the audio type for a given segment. >+ Return the audio type for a given segment. > VCDINFO_INVALID_AUDIO_TYPE is returned on error. > */ > unsigned int >@@ -1180,7 +1180,7 @@ > */ > lba_t > vcdinfo_get_seg_lba(const vcdinfo_obj_t *p_obj, segnum_t i_seg) >-{ >+{ > if (!p_obj) return VCDINFO_NULL_LBA; > return cdio_lsn_to_lba(vcdinfo_get_seg_lsn(p_obj, i_seg)); > } >@@ -1192,7 +1192,7 @@ > */ > lsn_t > vcdinfo_get_seg_lsn(const vcdinfo_obj_t *p_obj, segnum_t i_seg) >-{ >+{ > if (!p_obj || i_seg >= vcdinfo_get_num_segments(p_obj)) > return VCDINFO_NULL_LSN; > return p_obj->first_segment_lsn + (VCDINFO_SEGMENT_SECTOR_SIZE * i_seg); >@@ -1205,7 +1205,7 @@ > */ > const msf_t * > vcdinfo_get_seg_msf(const vcdinfo_obj_t *p_obj, segnum_t i_seg) >-{ >+{ > if (!p_obj || i_seg >= vcdinfo_get_num_segments(p_obj)) > return NULL; > else { >@@ -1223,12 +1223,12 @@ > vcdinfo_get_seg_resolution(const vcdinfo_obj_t *p_vcdinfo, segnum_t i_seg, > /*out*/ uint16_t *max_x, /*out*/ uint16_t *max_y) > { >- vcdinfo_video_segment_type_t segtype >+ vcdinfo_video_segment_type_t segtype > = vcdinfo_get_video_type(p_vcdinfo, i_seg); > segnum_t i_segs = vcdinfo_get_num_segments(p_vcdinfo); >- >+ > if (i_seg >= i_segs) return; >- >+ > switch (segtype) { > case VCDINFO_FILES_VIDEO_NTSC_STILL: > *max_x = 704; >@@ -1272,8 +1272,8 @@ > } > > >- >-/*! >+ >+/*! > Return the number of sectors for segment > entry_num in obj. 0 is returned if there is no entry. > >@@ -1282,11 +1282,11 @@ > > If an item has been broken up into a number of "continued" segments, > we will report the item size for the first segment and 0 for the >- remaining ones. We may revisit this decision later. >+ remaining ones. We may revisit this decision later. > */ > uint32_t > vcdinfo_get_seg_sector_count(const vcdinfo_obj_t *p_obj, segnum_t i_seg) >-{ >+{ > if (!p_obj || i_seg >= vcdinfo_get_num_segments(p_obj)) > return 0; > return p_obj->seg_sizes[i_seg]; >@@ -1304,10 +1304,10 @@ > } > > /*! >- Return the track number for entry n in obj. >- >+ Return the track number for entry n in obj. >+ > In contrast to libcdio we start numbering at 0 which is the >- ISO9660 and metadata information for the Video CD. Thus track >+ ISO9660 and metadata information for the Video CD. Thus track > 1 is the first track the first complete MPEG track generally. > */ > track_t >@@ -1321,7 +1321,7 @@ > } > > /*! >- Return the audio type for a given track. >+ Return the audio type for a given track. > VCDINFO_INVALID_AUDIO_TYPE is returned on error. > > Note: track 1 is usually the first track. >@@ -1339,13 +1339,13 @@ > return(tracks2->contents[i_track-1].audio); > } > >-/*! >- Return the highest track number in the current medium. >- >+/*! >+ Return the highest track number in the current medium. >+ > Because we track start numbering at 0 (which is the ISO 9660 track > containing Video CD naviagion and disk information), this is one > less than the number of tracks. >- >+ > If there are no tracks, we return -1. > */ > unsigned int >@@ -1357,9 +1357,9 @@ > } > > >-/*! >+/*! > Return the starting LBA (logical block address) for track number >- i_track in obj. >+ i_track in obj. > > The IS0-9660 filesystem track has number 0. Tracks associated > with playable entries numbers start at 1. >@@ -1368,20 +1368,20 @@ > using i_track LEADOUT_TRACK or the total tracks+1. > VCDINFO_NULL_LBA is returned on failure. > */ >-lba_t >+lba_t > vcdinfo_get_track_lba(const vcdinfo_obj_t *p_obj, track_t i_track) > { > if (!p_obj || !p_obj->img) > return VCDINFO_NULL_LBA; >- >+ > > /* CdIo tracks start at 1 rather than 0. */ > return cdio_get_track_lba(p_obj->img, i_track+1); > } > >-/*! >+/*! > Return the starting LSN (logical sector number) for track number >- i_track in obj. >+ i_track in obj. > > The IS0-9660 filesystem track has number 0. Tracks associated > with playable entries numbers start at 1. >@@ -1390,7 +1390,7 @@ > using i_track LEADOUT_TRACK or the total tracks+1. > VCDINFO_NULL_LBA is returned on failure. > */ >-lsn_t >+lsn_t > vcdinfo_get_track_lsn(const vcdinfo_obj_t *p_obj, track_t i_track) > { > if (!p_obj || !p_obj->img) >@@ -1400,7 +1400,7 @@ > return cdio_get_track_lsn(p_obj->img, i_track+1); > } > >-/*! >+/*! > Return the ending LSN for track number > i_track in cdio. VCDINFO_NULL_LSN is returned on error. > */ >@@ -1413,9 +1413,9 @@ > return cdio_get_track_last_lsn(p_obj->img, i_track+1); > } > >-/*! >+/*! > Return the starting MSF (minutes/secs/frames) for track number >- i_track in obj. >+ i_track in obj. > > The IS0-9660 filesystem track has number 0. Tracks associated > with playable entries numbers start at 1. >@@ -1432,7 +1432,7 @@ > > if (!p_obj || !p_obj->img) > return 1; >- >+ > /* CdIo tracks start at 1 rather than 0. */ > if (cdio_get_track_msf(p_obj->img, i_track+1, &msf)) { > *min = cdio_from_bcd8(msf.m); >@@ -1440,12 +1440,12 @@ > *frame = cdio_from_bcd8(msf.f); > return 0; > } >- >+ > return 1; > } > > /*! >- Return the size in sectors for track n. >+ Return the size in sectors for track n. > > The IS0-9660 filesystem track has number 0. Tracks associated > with playable entries numbers start at 1. >@@ -1455,16 +1455,16 @@ > > */ > unsigned int >-vcdinfo_get_track_sect_count(const vcdinfo_obj_t *p_obj, >+vcdinfo_get_track_sect_count(const vcdinfo_obj_t *p_obj, > const track_t i_track) > { >- if (!p_obj || VCDINFO_INVALID_TRACK == i_track) >+ if (!p_obj || VCDINFO_INVALID_TRACK == i_track) > return 0; >- >+ > { > iso9660_stat_t *p_statbuf; > const lsn_t lsn = vcdinfo_get_track_lsn(p_obj, i_track); >- >+ > /* Try to get the sector count from the ISO 9660 filesystem */ > if (p_obj->has_xa && (p_statbuf = iso9660_find_fs_lsn(p_obj->img, lsn))) { > unsigned int secsize = p_statbuf->secsize; >@@ -1491,26 +1491,26 @@ > unsigned int > vcdinfo_get_track_size(const vcdinfo_obj_t *p_obj, track_t i_track) > { >- if (NULL == p_obj || VCDINFO_INVALID_TRACK == i_track) >+ if (NULL == p_obj || VCDINFO_INVALID_TRACK == i_track) > return 0; >- >+ > { >- const lsn_t lsn = cdio_lba_to_lsn(vcdinfo_get_track_lba(p_obj, >+ const lsn_t lsn = cdio_lba_to_lsn(vcdinfo_get_track_lba(p_obj, > i_track)); >- >+ > /* Try to get the sector count from the ISO 9660 filesystem */ > if (p_obj->has_xa) { > iso9660_stat_t *p_statbuf; > p_statbuf = iso9660_find_fs_lsn(p_obj->img, lsn); > return p_statbuf->size; >- } >+ } > #if 0 > else { > /* Failed on ISO 9660 filesystem. Use track information. */ >- if (p_obj->img != NULL) >+ if (p_obj->img != NULL) > return cdio_get_track_size(p_obj->img); > } >-#endif >+#endif > } > return 0; > } >@@ -1536,16 +1536,16 @@ > \brief Get the kind of VCD that p_obj refers to. > */ > vcd_type_t >-vcdinfo_get_VCD_type(const vcdinfo_obj_t *p_obj) >+vcdinfo_get_VCD_type(const vcdinfo_obj_t *p_obj) > { > if (NULL == p_obj) return VCD_TYPE_INVALID; > return p_obj->vcd_type; > } > >- >+ > /*! > Return the VCD volume count - the number of CD's in the collection. >- O is returned if there is some problem in getting this. >+ O is returned if there is some problem in getting this. > */ > unsigned int > vcdinfo_get_volume_count(const vcdinfo_obj_t *p_obj) >@@ -1556,7 +1556,7 @@ > > /*! > Return the VCD ID. >- NULL is returned if there is some problem in getting this. >+ NULL is returned if there is some problem in getting this. > */ > const char * > vcdinfo_get_volume_id(const vcdinfo_obj_t *p_obj) >@@ -1572,7 +1572,7 @@ > > /*! > Return the VCD volumeset ID. >- NULL is returned if there is some problem in getting this. >+ NULL is returned if there is some problem in getting this. > */ > const char * > vcdinfo_get_volumeset_id(const vcdinfo_obj_t *p_obj) >@@ -1586,7 +1586,7 @@ > /*! > Return the VCD volume num - the number of the CD in the collection. > This is a number between 1 and the volume count. >- O is returned if there is some problem in getting this. >+ O is returned if there is some problem in getting this. > */ > unsigned int > vcdinfo_get_volume_num(const vcdinfo_obj_t *p_obj) >@@ -1608,22 +1608,22 @@ > } > > /*! >- Return true is there is playback control. >+ Return true is there is playback control. > */ > bool >-vcdinfo_has_pbc (const vcdinfo_obj_t *p_obj) >+vcdinfo_has_pbc (const vcdinfo_obj_t *p_obj) > { > return (p_obj && p_obj->info.psd_size!=0); > } >- >-/*! >+ >+/*! > Return true if VCD has "extended attributes" (XA). Extended attributes > add meta-data attributes to a entries of file describing the file. > See also cdio_get_xa_attr_str() which returns a string similar to > a string you might get on a Unix filesystem listing ("ls"). > */ > bool >-vcdinfo_has_xa(const vcdinfo_obj_t *p_obj) >+vcdinfo_has_xa(const vcdinfo_obj_t *p_obj) > { > return p_obj->has_xa; > } >@@ -1665,10 +1665,10 @@ > ofs = _vcdinfo_get_offset_t(p_obj, offset, ext); > if (ofs != NULL) { > if (ofs->lid) >- snprintf (buf, BUF_SIZE, "LID[%d] @0x%4.4x", >+ snprintf (buf, BUF_SIZE, "LID[%d] @0x%4.4x", > ofs->lid, ofs->offset); >- else >- snprintf (buf, BUF_SIZE, "PSD[?] @0x%4.4x", >+ else >+ snprintf (buf, BUF_SIZE, "PSD[?] @0x%4.4x", > ofs->offset); > } else { > snprintf (buf, BUF_SIZE, "? @0x%4.4x", offset); >@@ -1692,18 +1692,18 @@ > free(p_obj->lot); > p_obj->lot = calloc(1, ISO_BLOCKSIZE * LOT_VCD_SIZE); > free(p_obj->psd); >- p_obj->psd = calloc(1, ISO_BLOCKSIZE * _vcd_len2blocks (psd_size, >+ p_obj->psd = calloc(1, ISO_BLOCKSIZE * _vcd_len2blocks (psd_size, > ISO_BLOCKSIZE)); >- >+ > if (cdio_read_mode2_sectors (p_obj->img, (void *) p_obj->lot, LOT_VCD_SECTOR, > false, LOT_VCD_SIZE)) > return false; >- >+ > if (cdio_read_mode2_sectors (p_obj->img, (void *) p_obj->psd, PSD_VCD_SECTOR, >- false, _vcd_len2blocks (psd_size, >+ false, _vcd_len2blocks (psd_size, > ISO_BLOCKSIZE))) > return false; >- >+ > } else { > return false; > } >@@ -1711,16 +1711,16 @@ > } > > /*! Return the entry number for the given track. */ >-unsigned int >-vcdinfo_track_get_entry(const vcdinfo_obj_t *p_obj, track_t i_track) >+unsigned int >+vcdinfo_track_get_entry(const vcdinfo_obj_t *p_obj, track_t i_track) > { >- /* FIXME: Add structure to directly map track to first entry number. >+ /* FIXME: Add structure to directly map track to first entry number. > Until then... > */ > lsn_t lsn= vcdinfo_get_track_lsn(p_obj, i_track); > return vcdinfo_lsn_get_entry(p_obj, lsn); > } >- >+ > /*! > Calls recursive routine to populate obj->offset_list or obj->offset_x_list > by going through LOT. >@@ -1746,11 +1746,11 @@ > pbc_ctx.extended = extended; > > ret = vcdinf_visit_lot(&pbc_ctx); >- if (NULL != p_obj->offset_x_list) >- _cdio_list_free(p_obj->offset_x_list, true); >+ if (NULL != p_obj->offset_x_list) >+ _cdio_list_free(p_obj->offset_x_list, true, NULL); > p_obj->offset_x_list = pbc_ctx.offset_x_list; >- if (NULL != p_obj->offset_list) >- _cdio_list_free(p_obj->offset_list, true); >+ if (NULL != p_obj->offset_list) >+ _cdio_list_free(p_obj->offset_list, true, NULL); > p_obj->offset_list = pbc_ctx.offset_list; > return ret; > } >@@ -1792,7 +1792,7 @@ > } > > /*! >- Nulls/zeros vcdinfo_obj_t structures; The caller should have >+ Nulls/zeros vcdinfo_obj_t structures; The caller should have > ensured that p_obj != NULL. > routines using p_obj are called. > */ >@@ -1811,7 +1811,7 @@ > Initialize the vcdinfo structure "obj". Should be done before other > routines using p_obj are called. > */ >-bool >+bool > vcdinfo_init(vcdinfo_obj_t *p_obj) > { > if (NULL == p_obj) return false; >@@ -1823,27 +1823,27 @@ > Set up vcdinfo structure "p_obj" for reading from a particular > medium. This should be done before after initialization but before > any routines that need to retrieve data. >- >+ > source_name is the device or file to use for inspection, and > source_type indicates what driver to use or class of drivers in the > case of DRIVER_DEVICE. > access_mode gives the CD access method for reading should the driver > allow for more than one kind of access method (e.g. MMC versus ioctl > on GNU/Linux) >- >+ > If source_name is NULL we'll fill in the appropriate default device > name for the given source_type. However if in addtion source_type is > DRIVER_UNKNOWN, then we'll scan for a drive containing a VCD. >- >- VCDINFO_OPEN_VCD is returned if everything went okay; >+ >+ VCDINFO_OPEN_VCD is returned if everything went okay; > VCDINFO_OPEN_ERROR if there was an error and VCDINFO_OPEN_OTHER if the > medium is something other than a VCD. > > Only if VCDINFO_OPEN_VCD is returned, the caller needs free the >- vcdinfo_obj_t. >+ vcdinfo_obj_t. > */ > vcdinfo_open_return_t >-vcdinfo_open(vcdinfo_obj_t **pp_obj, char *source_name[], >+vcdinfo_open(vcdinfo_obj_t **pp_obj, char *source_name[], > driver_id_t source_type, const char access_mode[]) > { > CdIo_t *p_cdio; >@@ -1856,7 +1856,7 @@ > */ > if (NULL == *source_name && source_type == DRIVER_UNKNOWN) { > char **cd_drives=NULL; >- cd_drives = cdio_get_devices_with_cap_ret(NULL, >+ cd_drives = cdio_get_devices_with_cap_ret(NULL, > (CDIO_FS_ANAL_SVCD|CDIO_FS_ANAL_CVD|CDIO_FS_ANAL_VIDEOCD > |CDIO_FS_UNKNOWN), > true, &source_type); >@@ -1873,8 +1873,8 @@ > } > > *pp_obj = p_obj; >- >- if (access_mode != NULL) >+ >+ if (access_mode != NULL) > cdio_set_arg (p_cdio, "access-mode", access_mode); > > if (NULL == *source_name) { >@@ -1883,24 +1883,24 @@ > goto err_return; > } > } >- >+ > memset (p_obj, 0, sizeof (vcdinfo_obj_t)); > p_obj->img = p_cdio; /* Note we do this after the above wipeout! */ > > if (!iso9660_fs_read_pvd(p_obj->img, &(p_obj->pvd))) { > goto err_return; > } >- >+ > /* Determine if VCD has XA attributes. */ > { >- >+ > iso9660_pvd_t const *pvd = &p_obj->pvd; >- >- p_obj->has_xa = !strncmp ((char *) pvd + ISO_XA_MARKER_OFFSET, >- ISO_XA_MARKER_STRING, >+ >+ p_obj->has_xa = !strncmp ((char *) pvd + ISO_XA_MARKER_OFFSET, >+ ISO_XA_MARKER_STRING, > strlen (ISO_XA_MARKER_STRING)); > } >- >+ > if (!read_info(p_obj->img, &(p_obj->info), &(p_obj->vcd_type))) > goto other_return; > >@@ -1909,7 +1909,7 @@ > > if (!read_entries(p_obj->img, &(p_obj->entries))) > goto other_return; >- >+ > { > size_t len = strlen(*source_name)+1; > p_obj->source_name = (char *) malloc(len * sizeof(char)); >@@ -1918,19 +1918,19 @@ > > if (p_obj->vcd_type == VCD_TYPE_SVCD || p_obj->vcd_type == VCD_TYPE_HQVCD) { > statbuf = iso9660_fs_stat (p_obj->img, "MPEGAV"); >- >+ > if (NULL != statbuf) { > vcd_warn ("non compliant /MPEGAV folder detected!"); > free(statbuf); > } >- >+ > > statbuf = iso9660_fs_stat (p_obj->img, "SVCD/TRACKS.SVD;1"); > if (NULL != statbuf) { > lsn_t lsn = statbuf->lsn; > if (statbuf->size != ISO_BLOCKSIZE) > vcd_warn ("TRACKS.SVD filesize != %d!", ISO_BLOCKSIZE); >- >+ > p_obj->tracks_buf = calloc(1, ISO_BLOCKSIZE); > > free(statbuf); >@@ -1938,12 +1938,12 @@ > goto err_return; > } > } >- >+ > _init_segments (p_obj); > > switch (p_obj->vcd_type) { > case VCD_TYPE_VCD2: { >- /* FIXME: Can reduce CD reads by using >+ /* FIXME: Can reduce CD reads by using > iso9660_fs_readdir(img, "EXT", true) and then scanning for > the files listed below. > */ >@@ -1954,8 +1954,8 @@ > > p_obj->psd_x = calloc(1, ISO_BLOCKSIZE * secsize); > p_obj->psd_x_size = statbuf->size; >- >- vcd_debug ("found /EXT/PSD_X.VCD at sector %lu", >+ >+ vcd_debug ("found /EXT/PSD_X.VCD at sector %lu", > (long unsigned int) lsn); > > free(statbuf); >@@ -1968,23 +1968,23 @@ > lsn_t lsn = statbuf->lsn; > uint32_t secsize = statbuf->secsize; > p_obj->lot_x = calloc(1, ISO_BLOCKSIZE * secsize); >- >- vcd_debug ("found /EXT/LOT_X.VCD at sector %lu", >+ >+ vcd_debug ("found /EXT/LOT_X.VCD at sector %lu", > (unsigned long int) lsn); >- >+ > if (statbuf->size != LOT_VCD_SIZE * ISO_BLOCKSIZE) > vcd_warn ("LOT_X.VCD size != 65535"); > > free(statbuf); > if (cdio_read_mode2_sectors (p_cdio, p_obj->lot_x, lsn, false, secsize)) > goto err_return; >- >+ > } > break; > } >- case VCD_TYPE_SVCD: >+ case VCD_TYPE_SVCD: > case VCD_TYPE_HQVCD: { >- /* FIXME: Can reduce CD reads by using >+ /* FIXME: Can reduce CD reads by using > iso9660_fs_readdir(p_cdio, "SVCD", true) and then scanning for > the files listed below. > */ >@@ -1993,16 +1993,16 @@ > vcd_warn ("non compliant /MPEGAV folder detected!"); > free(statbuf); > } >- >+ > statbuf = iso9660_fs_stat (p_cdio, "SVCD/TRACKS.SVD;1"); > if (NULL == statbuf) > vcd_warn ("mandatory /SVCD/TRACKS.SVD not found!"); > else { >- vcd_debug ("found TRACKS.SVD signature at sector %lu", >+ vcd_debug ("found TRACKS.SVD signature at sector %lu", > (unsigned long int) statbuf->lsn); > free(statbuf); > } >- >+ > statbuf = iso9660_fs_stat (p_cdio, "SVCD/SEARCH.DAT;1"); > if (NULL == statbuf) > vcd_warn ("mandatory /SVCD/SEARCH.DAT not found!"); >@@ -2013,12 +2013,12 @@ > uint32_t size; > > vcd_debug ("found SEARCH.DAT at sector %lu", (unsigned long int) lsn); >- >+ > p_obj->search_buf = calloc(1, ISO_BLOCKSIZE * secsize); >- >+ > if (cdio_read_mode2_sectors (p_cdio, p_obj->search_buf, lsn, false, secsize)) > goto err_return; >- >+ > size = (3 * uint16_from_be (((SearchDat_t *)p_obj->search_buf)->scan_points)) > + sizeof (SearchDat_t); > >@@ -2026,12 +2026,12 @@ > if (size > stat_size) { > vcd_warn ("number of scanpoints leads to bigger size than " > "file size of SEARCH.DAT! -- rereading"); >- >+ > free (p_obj->search_buf); >- p_obj->search_buf = calloc(1, ISO_BLOCKSIZE >+ p_obj->search_buf = calloc(1, ISO_BLOCKSIZE > * _vcd_len2blocks(size, ISO_BLOCKSIZE)); >- >- if (cdio_read_mode2_sectors (p_cdio, p_obj->search_buf, lsn, false, >+ >+ if (cdio_read_mode2_sectors (p_cdio, p_obj->search_buf, lsn, false, > secsize)) > goto err_return; > } >@@ -2048,11 +2048,11 @@ > uint32_t secsize = statbuf->secsize; > > vcd_debug ("found /EXT/SCANDATA.DAT at sector %u", (unsigned int) lsn); >- >+ > p_obj->scandata_buf = calloc(1, ISO_BLOCKSIZE * secsize); > > free(statbuf); >- if (cdio_read_mode2_sectors (p_cdio, p_obj->scandata_buf, lsn, false, >+ if (cdio_read_mode2_sectors (p_cdio, p_obj->scandata_buf, lsn, false, > secsize)) > return VCDINFO_OPEN_ERROR; > } >@@ -2067,23 +2067,23 @@ > free(p_obj); > return VCDINFO_OPEN_ERROR; > >- >+ > } > > /*! > Dispose of any resources associated with vcdinfo structure "p_obj". >- Call this when "p_obj" it isn't needed anymore. >+ Call this when "p_obj" it isn't needed anymore. > > True is returned is everything went okay, and false if not. > */ >-bool >+bool > vcdinfo_close(vcdinfo_obj_t *p_obj) > { > if (p_obj != NULL) { >- if (p_obj->offset_list != NULL) >- _cdio_list_free(p_obj->offset_list, true); >- if (p_obj->offset_x_list != NULL) >- _cdio_list_free(p_obj->offset_x_list, true); >+ if (p_obj->offset_list != NULL) >+ _cdio_list_free(p_obj->offset_list, true, NULL); >+ if (p_obj->offset_x_list != NULL) >+ _cdio_list_free(p_obj->offset_x_list, true, NULL); > free(p_obj->seg_sizes); > free(p_obj->lot); > free(p_obj->lot_x); >@@ -2097,7 +2097,7 @@ > if (p_obj->img != NULL) cdio_destroy (p_obj->img); > _vcdinfo_zero(p_obj); > } >- >+ > free(p_obj); > return(true); > } >@@ -2108,13 +2108,13 @@ > If we are not in an extended selection list LID, return -2. > If there no area encloses the point return -3 > >- max_x, max_y are the maximum values that x and y can take on. >+ max_x, max_y are the maximum values that x and y can take on. > They would be the largest coordinate in the screen coordinate space. >- For example they might be 352, 240 (for VCD) or 704, 480 for SVCD NTSC, >- or 704, 576. >+ For example they might be 352, 240 (for VCD) or 704, 480 for SVCD NTSC, >+ or 704, 576. > */ >-int >-vcdinfo_get_area_selection(const vcdinfo_obj_t *p_vcdinfo, >+int >+vcdinfo_get_area_selection(const vcdinfo_obj_t *p_vcdinfo, > lid_t lid, int16_t x, int16_t y, > uint16_t max_x, uint16_t max_y) > { >@@ -2123,21 +2123,21 @@ > if (! vcdinfo_lid_get_pxd(p_vcdinfo, &pxd, lid) ) > return -1; > if (pxd.descriptor_type != PSD_TYPE_EXT_SELECTION_LIST && >- !pxd.psd->flags.SelectionAreaFlag) >+ !pxd.psd->flags.SelectionAreaFlag) > return -2; > { >- const PsdSelectionListDescriptorExtended_t *d2 = >+ const PsdSelectionListDescriptorExtended_t *d2 = > (const void *) &(pxd.psd->ofs[pxd.psd->nos]); > const int32_t scaled_x = x * 255 / max_x; > const int32_t scaled_y = y * 255 / max_y; > const int n = vcdinf_get_num_selections(pxd.psd); > int i; >- vcd_debug("max x %d, max y %d, scaled x: %d, scaled y %d", >+ vcd_debug("max x %d, max y %d, scaled x: %d, scaled y %d", > max_x, max_y, (int) scaled_x, (int) scaled_y); > for (i = 0; i < n; i++) { > vcd_debug("x1: %d, y1 %d, x2: %d, y2 %d", > d2->area[i].x1, d2->area[i].y1, d2->area[i].y2, d2->area[i].y2 ); >- if (d2->area[i].x1 <= scaled_x && >+ if (d2->area[i].x1 <= scaled_x && > d2->area[i].y1 <= scaled_y && > d2->area[i].x2 >= scaled_x && > d2->area[i].y2 >= scaled_y ) { >@@ -2146,11 +2146,11 @@ > } > } > return -3; >- >+ > } > >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/lib/info_private.c vcdimager-0.7.24/lib/info_private.c >--- vcdimager-0.7.24.ORIG/lib/info_private.c 2018-01-02 16:24:55.931944628 +0100 >+++ vcdimager-0.7.24/lib/info_private.c 2018-01-02 16:31:08.304924109 +0100 >@@ -17,11 +17,11 @@ > along with this program; if not, write to the Free Foundation > Software, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >-/* >+/* > Like vcdinfo but exposes more of the internal structure. It is probably > better to use vcdinfo, when possible. > */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >@@ -46,6 +46,8 @@ > #include <unistd.h> > #endif > >+/* We don't want to pull in cdio's config */ >+#define __CDIO_CONFIG_H__ > #include <cdio/cdio.h> > #include <cdio/bytesex.h> > #include <cdio/util.h> >@@ -78,10 +80,10 @@ > CdioListNode_t *node; > CdioList_t *unused_lids = _cdio_list_new(); > CdioListNode_t *next_unused_node = _cdio_list_begin(unused_lids); >- >+ > unsigned int last_lid=0; > CdioList_t *offset_list = extended ? obj->offset_x_list : obj->offset_list; >- >+ > lid_t max_seen_lid=0; > > _CDIO_LIST_FOREACH (node, offset_list) >@@ -110,7 +112,7 @@ > if (last_lid > max_seen_lid) max_seen_lid=last_lid; > } > } >- _cdio_list_free(unused_lids, true); >+ _cdio_list_free(unused_lids, true, NULL); > } > } > >@@ -135,7 +137,7 @@ > if ((tmp = vcdinf_get_lot_offset(lot, n)) != PSD_OFS_DISABLED) > ret &= vcdinf_visit_pbc (obj, n + 1, tmp, true); > >- _vcd_list_sort (obj->extended ? obj->offset_x_list : obj->offset_list, >+ _vcd_list_sort (obj->extended ? obj->offset_x_list : obj->offset_list, > (_cdio_list_cmp_func_t) vcdinf_lid_t_cmp); > > /* Now really complete the offset table with LIDs. This routine >@@ -152,7 +154,7 @@ > Returns false if there was some error. > */ > bool >-vcdinf_visit_pbc (struct _vcdinf_pbc_ctx *obj, lid_t lid, unsigned int offset, >+vcdinf_visit_pbc (struct _vcdinf_pbc_ctx *obj, lid_t lid, unsigned int offset, > bool in_lot) > { > CdioListNode_t *node; >@@ -194,7 +196,7 @@ > > if (obj->extended) { > offset_list = obj->offset_x_list; >- } else >+ } else > offset_list = obj->offset_list; > > _CDIO_LIST_FOREACH (node, offset_list) >@@ -213,7 +215,7 @@ > */ > ofs->lid = lid; > } >- >+ > ofs->ext = obj->extended; > > return true; /* already been there... */ >@@ -238,14 +240,14 @@ > > if (!ofs->lid) > ofs->lid = lid; >- else >+ else > if (ofs->lid != lid) > vcd_warn ("LOT entry assigned LID %d, but descriptor has LID %d", > ofs->lid, lid); > > ret &= vcdinf_visit_pbc (obj, 0, vcdinf_pld_get_prev_offset(d), false); > ret &= vcdinf_visit_pbc (obj, 0, vcdinf_pld_get_next_offset(d), false); >- ret &= vcdinf_visit_pbc (obj, 0, vcdinf_pld_get_return_offset(d), >+ ret &= vcdinf_visit_pbc (obj, 0, vcdinf_pld_get_return_offset(d), > false); > } > break; >@@ -261,22 +263,22 @@ > > if (!ofs->lid) > ofs->lid = uint16_from_be (d->lid) & 0x7fff; >- else >+ else > if (ofs->lid != (uint16_from_be (d->lid) & 0x7fff)) > vcd_warn ("LOT entry assigned LID %d, but descriptor has LID %d", > ofs->lid, uint16_from_be (d->lid) & 0x7fff); > > ret &= vcdinf_visit_pbc (obj, 0, vcdinf_psd_get_prev_offset(d), false); > ret &= vcdinf_visit_pbc (obj, 0, vcdinf_psd_get_next_offset(d), false); >- ret &= vcdinf_visit_pbc (obj, 0, vcdinf_psd_get_return_offset(d), >+ ret &= vcdinf_visit_pbc (obj, 0, vcdinf_psd_get_return_offset(d), > false); >- ret &= vcdinf_visit_pbc (obj, 0, vcdinf_psd_get_default_offset(d), >+ ret &= vcdinf_visit_pbc (obj, 0, vcdinf_psd_get_default_offset(d), > false); >- ret &= vcdinf_visit_pbc (obj, 0, uint16_from_be (d->timeout_ofs), >+ ret &= vcdinf_visit_pbc (obj, 0, uint16_from_be (d->timeout_ofs), > false); > > for (idx = 0; idx < vcdinf_get_num_selections(d); idx++) >- ret &= vcdinf_visit_pbc (obj, 0, vcdinf_psd_get_offset(d, idx), >+ ret &= vcdinf_visit_pbc (obj, 0, vcdinf_psd_get_offset(d, idx), > false); > } > break; >@@ -317,8 +319,8 @@ > : NULL; > } > >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/lib/info_private.h vcdimager-0.7.24/lib/info_private.h >--- vcdimager-0.7.24.ORIG/lib/info_private.h 2005-04-28 05:02:27.000000000 +0200 >+++ vcdimager-0.7.24/lib/info_private.h 2018-01-02 16:31:17.501923602 +0100 >@@ -25,6 +25,8 @@ > > #ifndef _VCD_INFO_PRIVATE_H > #define _VCD_INFO_PRIVATE_H >+/* We don't want to pull in cdio's config */ >+#define __CDIO_CONFIG_H__ > > #ifdef HAVE_CONFIG_H > # include "config.h" >@@ -42,19 +44,19 @@ > > struct _VcdInfo { > vcd_type_t vcd_type; >- >+ > CdIo_t *img; >- >+ > iso9660_pvd_t pvd; >- >+ > InfoVcd_t info; > EntriesVcd_t entries; >- >+ > CdioList_t *offset_list; > CdioList_t *offset_x_list; >- uint32_t *seg_sizes; >+ uint32_t *seg_sizes; > lsn_t first_segment_lsn; >- >+ > LotVcd_t *lot; > LotVcd_t *lot_x; > uint8_t *psd; >@@ -63,20 +65,20 @@ > bool extended; > > bool has_xa; /* True if has extended attributes (XA) */ >- >+ > void *tracks_buf; > void *search_buf; > void *scandata_buf; >- >+ > char *source_name; /* VCD device or file currently open */ >- >+ > }; >- >+ > /*! Return the starting MSF (minutes/secs/frames) for sequence > entry_num in obj. NULL is returned if there is no entry. > The first entry number is 0. > */ >- const msf_t * vcdinf_get_entry_msf(const EntriesVcd_t *entries, >+ const msf_t * vcdinf_get_entry_msf(const EntriesVcd_t *entries, > unsigned int entry_num); > > struct _vcdinf_pbc_ctx { >@@ -85,7 +87,7 @@ > unsigned offset_mult; > CdioList_t *offset_x_list; > CdioList_t *offset_list; >- >+ > LotVcd_t *lot; > LotVcd_t *lot_x; > uint8_t *psd; >@@ -101,14 +103,14 @@ > Returns false if there was some error. > */ > bool vcdinf_visit_lot (struct _vcdinf_pbc_ctx *obj); >- >- /*! >+ >+ /*! > Recursive routine to populate obj->offset_list or obj->offset_x_list > by reading playback control entries referred to via lid. > > Returns false if there was some error. > */ >- bool vcdinf_visit_pbc (struct _vcdinf_pbc_ctx *obj, lid_t lid, >+ bool vcdinf_visit_pbc (struct _vcdinf_pbc_ctx *obj, lid_t lid, > unsigned int offset, bool in_lot); > > #ifdef __cplusplus >diff -ur vcdimager-0.7.24.ORIG/lib/logging.c vcdimager-0.7.24/lib/logging.c >--- vcdimager-0.7.24.ORIG/lib/logging.c 2003-11-10 12:57:50.000000000 +0100 >+++ vcdimager-0.7.24/lib/logging.c 2018-01-02 16:27:31.308936066 +0100 >@@ -18,7 +18,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >@@ -101,7 +101,7 @@ > vcd_assert_not_reached (); > > in_recursion = 1; >- >+ > vsnprintf(buf, sizeof(buf)-1, format, args); > > _handler(level, buf); >@@ -126,7 +126,7 @@ > va_start (args, format); \ > vcd_logv (VCD_LOG_ ## LEVEL, format, args); \ > va_end (args); \ >-} >+} > > VCD_LOG_TEMPLATE(debug, DEBUG) > VCD_LOG_TEMPLATE(info, INFO) >@@ -135,8 +135,8 @@ > > #undef VCD_LOG_TEMPLATE > >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/lib/mpeg.c vcdimager-0.7.24/lib/mpeg.c >--- vcdimager-0.7.24.ORIG/lib/mpeg.c 2005-02-02 01:37:37.000000000 +0100 >+++ vcdimager-0.7.24/lib/mpeg.c 2018-01-02 16:31:41.643922271 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >@@ -79,9 +79,9 @@ > }; > > static const double frame_rates[16] = { >- 0.0, 24000.0/1001, 24.0, 25.0, >- 30000.0/1001, 30.0, 50.0, 60000.0/1001, >- 60.0, 0.0, >+ 0.0, 24000.0/1001, 24.0, 25.0, >+ 30000.0/1001, 30.0, 50.0, 60000.0/1001, >+ 60.0, 0.0, > }; > > #ifdef DEBUG >@@ -98,7 +98,7 @@ > return (code & MPEG_START_CODE_MASK) == MPEG_START_CODE_PATTERN; > } > >-static inline int >+static inline int > _vid_streamid_idx (uint8_t streamid) > { > switch (streamid | MPEG_START_CODE_PATTERN) >@@ -119,11 +119,11 @@ > vcd_assert_not_reached (); > break; > } >- >+ > return -1; > } > >-static inline int >+static inline int > _aud_streamid_idx (uint8_t streamid) > { > switch (streamid | MPEG_START_CODE_PATTERN) >@@ -144,7 +144,7 @@ > vcd_assert_not_reached (); > break; > } >- >+ > return -1; > } > >@@ -160,7 +160,7 @@ > > _retval <<= 15; > _retval |= vcd_bitvec_read_bits (buf, offset, 15); >- >+ > MARKER (buf, offset); > > _retval <<= 15; >@@ -172,7 +172,7 @@ > } > > static void >-_parse_sequence_header (uint8_t streamid, const uint8_t *buf, >+_parse_sequence_header (uint8_t streamid, const uint8_t *buf, > VcdMpegStreamCtx *state) > { > unsigned offset = 0; >@@ -180,8 +180,8 @@ > const uint8_t *data = buf; > const int vid_idx = _vid_streamid_idx (streamid); > >- const double aspect_ratios[16] = >- { >+ const double aspect_ratios[16] = >+ { > 0.0000, 1.0000, 0.6735, 0.7031, > 0.7615, 0.8055, 0.8437, 0.8935, > 0.9375, 0.9815, 1.0255, 1.0695, >@@ -190,7 +190,7 @@ > > if (state->stream.shdr[vid_idx].seen) /* we have it already */ > return; >- >+ > hsize = vcd_bitvec_read_bits (data, &offset, 12); > > vsize = vcd_bitvec_read_bits (data, &offset, 12); >@@ -216,33 +216,32 @@ > > if (vcd_bitvec_read_bits (data, &offset, 1)) > offset += 64 << 3; >- >+ > state->stream.shdr[vid_idx].hsize = hsize; > state->stream.shdr[vid_idx].vsize = vsize; > state->stream.shdr[vid_idx].aratio = aspect_ratios[aratio]; > state->stream.shdr[vid_idx].frate = frame_rates[frate]; > state->stream.shdr[vid_idx].bitrate = 400 * brate; >- state->stream.shdr[vid_idx].vbvsize = bufsize * 16 * 1024; >+ state->stream.shdr[vid_idx].vbvsize = bufsize * 16 * 1024; > state->stream.shdr[vid_idx].constrained_flag = (constr != 0); > > state->stream.shdr[vid_idx].seen = true; > } > > static void >-_parse_gop_header (uint8_t streamid, const uint8_t *buf, >+_parse_gop_header (uint8_t streamid, const uint8_t *buf, > VcdMpegStreamCtx *state) > { > const uint8_t *data = buf; > unsigned offset = 0; >- >- bool drop_flag; >+ > /* bool close_gop; */ > /* bool broken_link; */ > > unsigned hour, minute, second, frame; > >- drop_flag = vcd_bitvec_read_bits(data, &offset, 1) != 0; >- >+ /* drop_flag = vcd_bitvec_read_bits(data, &offset, 1) != 0; */ >+ > hour = vcd_bitvec_read_bits(data, &offset, 5); > > minute = vcd_bitvec_read_bits(data, &offset, 6); >@@ -281,7 +280,7 @@ > "if it is not enabled already!"); > state->stream.scan_data_warnings++; > return; >- } >+ } > > if (msf->m == 0xff > && msf->s == 0xff >@@ -302,7 +301,7 @@ > } > > if ((msf->m >> 4) > 9 >- || ((0x80 ^ msf->s) >> 4) > 9 >+ || ((0x80 ^ msf->s) >> 4) > 9 > || ((0x80 ^ msf->f) >> 4) > 9 > || (msf->m & 0xf) > 9 > || (msf->s & 0xf) > 9 >@@ -319,7 +318,7 @@ > } > > static void >-_parse_user_data (uint8_t streamid, const void *buf, unsigned len, >+_parse_user_data (uint8_t streamid, const void *buf, unsigned len, > unsigned offset, > VcdMpegStreamCtx *state) > { >@@ -357,7 +356,7 @@ > { > struct vcd_mpeg_scan_data_t *usdi = (void *) udg; > vcd_assert (sizeof (struct vcd_mpeg_scan_data_t) == 14); >- >+ > if (GNUC_UNLIKELY (usdi->len != 14)) > { > vcd_warn ("invalid user scan data length (%d != 14)", usdi->len); >@@ -369,7 +368,7 @@ > _check_scan_data ("next_I_offset ", &usdi->next_ofs, state); > _check_scan_data ("backward_I_offset", &usdi->back_ofs, state); > _check_scan_data ("forward_I_offset ", &usdi->forw_ofs, state); >- >+ > state->packet.scan_data_ptr = usdi; > state->stream.scan_data++; > } >@@ -390,7 +389,7 @@ > vcd_assert (udg->len >= 2); > udg = (void *) &udg->data[udg->len - 2]; > } >- >+ > vcd_assert (pos <= len); > } > >@@ -424,7 +423,7 @@ > case 2: /* %10 */ > _has_pts = true; > break; >- >+ > case 3: /* %11 */ > _has_dts = _has_pts = true; > break; >@@ -435,7 +434,7 @@ > } > > pos2++; /* ESCR_flag */ >- >+ > pos2++; /* */ > pos2++; /* */ > pos2++; /* */ >@@ -473,7 +472,7 @@ > pes_mpeg_ver = MPEG_VERS_MPEG1; > > /* get rid of stuffing bytes */ >- while (((pos2 + 8) < (len << 3)) >+ while (((pos2 + 8) < (len << 3)) > && vcd_bitvec_peek_bits (buf, pos2, 8) == 0xff) > pos2 += 8; > >@@ -485,7 +484,7 @@ > pos2 += 13; /* STD_buffer_size */ > } > >- switch (vcd_bitvec_peek_bits (buf, pos2, 4)) >+ switch (vcd_bitvec_peek_bits (buf, pos2, 4)) > { > case 0x2: /* %0010 */ > pos2 += 4; >@@ -515,7 +514,7 @@ > vcd_assert (vcd_bitvec_peek_bits (buf, pos2, 8) == 0xff); > vcd_warn ("Unexpected stuffing byte noticed in ISO11172 PES header!"); > pos2 += 8; >- break; >+ break; > > default: > vcd_error ("Error in ISO11172 PES header"); >@@ -528,7 +527,7 @@ > if (_has_pts) > { > double pts2; >- >+ > pts2 = (double) pts / 90000.0; > > if (!state->stream.seen_pts) >@@ -611,7 +610,7 @@ > { > const int bits = vcd_bitvec_read_bits (buf, &bitpos, 4); > >- const unsigned bit_rates[4][16] = { >+ const unsigned bit_rates[4][16] = { > {0, }, > {0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, 0}, > {0, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 0}, >@@ -639,15 +638,15 @@ > state->stream.ahdr[aud_idx].sampfreq = 0; > break; > } >- >+ > bitpos++; /* padding_bit */ > > bitpos++; /* private_bit */ > > state->stream.ahdr[aud_idx].mode = 1 + vcd_bitvec_read_bits (buf, &bitpos, 2); /* mode */ >- >+ > state->stream.ahdr[aud_idx].seen = true; >- >+ > /* we got the info, let's jump outta here */ > break; > } >@@ -671,7 +670,7 @@ > /* if only pts extraction was needed, we are done here... */ > if (only_pts) > return; >- >+ > while (pos + 4 <= len) > { > uint32_t code = vcd_bitvec_peek_bits32 (buf, pos << 3); >@@ -686,11 +685,11 @@ > { > case MPEG_PICTURE_CODE: > pos += 4; >- >+ > if (vcd_bitvec_peek_bits (buf, (pos << 3) + 10, 3) == 1) > ipicture_header_pos = pos; > break; >- >+ > case MPEG_SEQUENCE_CODE: > pos += 4; > sequence_header_pos = pos; >@@ -723,7 +722,7 @@ > /* decide whether this packet qualifies as access point */ > state->packet.aps = APS_NONE; /* paranoia */ > >- if (state->packet.has_pts >+ if (state->packet.has_pts > && ipicture_header_pos != -1) > { > enum aps_t _aps_type = APS_NONE; >@@ -736,7 +735,7 @@ > && sequence_header_pos < gop_header_pos > && gop_header_pos < ipicture_header_pos) > _aps_type = (sequence_header_pos - 4 == pes_header) ? APS_ASGI : APS_SGI; >- else if (gop_header_pos != 1 >+ else if (gop_header_pos != 1 > && gop_header_pos < ipicture_header_pos) > _aps_type = APS_GI; > else >@@ -748,7 +747,7 @@ > break; > } > >- if (_aps_type) >+ if (_aps_type) > { > const double pts2 = state->packet.pts; > >@@ -775,8 +774,8 @@ > switch (code) > { > case MPEG_VIDEO_E0_CODE: >- case MPEG_VIDEO_E1_CODE: >- case MPEG_VIDEO_E2_CODE: >+ case MPEG_VIDEO_E1_CODE: >+ case MPEG_VIDEO_E2_CODE: > state->packet.video[_vid_streamid_idx (streamid)] = true; > break; > >@@ -790,14 +789,14 @@ > state->packet.padding = true; > break; > >- case MPEG_SYSTEM_HEADER_CODE: >+ case MPEG_SYSTEM_HEADER_CODE: > state->packet.system_header = true; > break; > } > } > > static void >-_analyze_system_header (const uint8_t *buf, int len, >+_analyze_system_header (const uint8_t *buf, int len, > VcdMpegStreamCtx *state) > { > unsigned bitpos = 0; >@@ -808,7 +807,7 @@ > > MARKER (buf, &bitpos); > >- bitpos += 6; /* audio_bound */ >+ bitpos += 6; /* audio_bound */ > > bitpos++; /* fixed_flag */ > bitpos++; /* CSPS_flag */ >@@ -817,12 +816,12 @@ > > MARKER (buf, &bitpos); > >- bitpos += 5; /* video_bound */ >+ bitpos += 5; /* video_bound */ > > bitpos += 1; /* packet_rate_restriction_flag -- only ISO 13818-1 */ > bitpos += 7; /* reserved */ > >- while (vcd_bitvec_peek_bits (buf, bitpos, 1) == 1 >+ while (vcd_bitvec_peek_bits (buf, bitpos, 1) == 1 > && bitpos <= (len << 3)) > { > const uint8_t stream_id = vcd_bitvec_read_bits (buf, &bitpos, 8); >@@ -839,7 +838,7 @@ > } > > static void >-_analyze_private_1_stream (const uint8_t *buf, int len, >+_analyze_private_1_stream (const uint8_t *buf, int len, > VcdMpegStreamCtx *state) > { > unsigned bitpos = _analyze_pes_header (buf, len, state); >@@ -851,7 +850,7 @@ > > private_data_id = vcd_bitvec_read_bits (buf, &bitpos, 8); > >- switch (private_data_id) >+ switch (private_data_id) > { > uint8_t sub_stream_id; > >@@ -901,7 +900,7 @@ > > vcd_assert (buf != NULL); > vcd_assert (ctx != NULL); >- >+ > /* clear packet info */ > memset (&(ctx->packet), 0, sizeof (ctx->packet)); > >@@ -922,7 +921,7 @@ > > vcd_warn ("mpeg scan: pack header code (0x%8.8x) expected, " > "but 0x%8.8x found (buflen = %d)", >- (unsigned int) MPEG_PACK_HEADER_CODE, >+ (unsigned int) MPEG_PACK_HEADER_CODE, > (unsigned int) _code, buflen); > > ctx->stream.packets--; >@@ -974,7 +973,7 @@ > uint16_t size; > int bits; > unsigned bitpos; >- >+ > case MPEG_PACK_HEADER_CODE: > if (pos) > return pos; >@@ -1031,9 +1030,9 @@ > _scr += vcd_bitvec_read_bits (buf, &bitpos, 9); /* SCR ext */ > > MARKER (buf, &bitpos); >- >+ > _muxrate = vcd_bitvec_read_bits (buf, &bitpos, 22); >- >+ > MARKER (buf, &bitpos); > MARKER (buf, &bitpos); > >@@ -1051,7 +1050,7 @@ > } > else > { >- vcd_warn ("packet not recognized as either version 1 or 2 (%d)" >+ vcd_warn ("packet not recognized as either version 1 or 2 (%d)" > " -- assuming v1", bits); > } > >@@ -1069,10 +1068,10 @@ > pos += 4; > size = vcd_bitvec_peek_bits16 (buf, pos << 3); > pos += 2; >- >- if (pos + size > buflen) >+ >+ if (pos + size > buflen) > { >- vcd_warn ("packet length beyond buffer" >+ vcd_warn ("packet length beyond buffer" > " (pos = %d + size = %d > buflen = %d) " > "-- stream may be truncated or packet length > 2324 bytes!", > pos, size, buflen); >@@ -1084,13 +1083,13 @@ > > switch (code) > { >- case MPEG_SYSTEM_HEADER_CODE: >+ case MPEG_SYSTEM_HEADER_CODE: > _analyze_system_header (buf + pos, size, ctx); > break; > > case MPEG_VIDEO_E0_CODE: >- case MPEG_VIDEO_E1_CODE: >- case MPEG_VIDEO_E2_CODE: >+ case MPEG_VIDEO_E1_CODE: >+ case MPEG_VIDEO_E2_CODE: > _analyze_video_pes (code & 0xff, buf + pos, size, !parse_pes, ctx); > break; > >@@ -1107,7 +1106,7 @@ > > pos += size; > break; >- >+ > case MPEG_PROGRAM_END_CODE: > ctx->packet.pem = true; > pos += 4; >@@ -1130,11 +1129,11 @@ > return buflen; > } > >-mpeg_norm_t >+mpeg_norm_t > vcd_mpeg_get_norm (const struct vcd_mpeg_stream_vid_info *_info) > { > int i; >- >+ > for (i = 0; norm_table[i].norm != MPEG_NORM_OTHER;i++) > if (norm_table[i].hsize == _info->hsize > && norm_table[i].vsize == _info->vsize >@@ -1147,29 +1146,29 @@ > enum vcd_mpeg_packet_type > vcd_mpeg_packet_get_type (const struct vcd_mpeg_packet_info *_info) > { >- if (_info->video[0] >+ if (_info->video[0] > || _info->video[1] > || _info->video[2]) > return PKT_TYPE_VIDEO; >- else if (_info->audio[0] >+ else if (_info->audio[0] > || _info->audio[1] > || _info->audio[2]) > return PKT_TYPE_AUDIO; > else if (_info->zero) > return PKT_TYPE_ZERO; >- else if (_info->ogt[0] >- || _info->ogt[1] >+ else if (_info->ogt[0] >+ || _info->ogt[1] > || _info->ogt[2] > || _info->ogt[3]) >- return PKT_TYPE_OGT; >+ return PKT_TYPE_OGT; > else if (_info->system_header || _info->padding) > return PKT_TYPE_EMPTY; > > return PKT_TYPE_INVALID; > } > >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/lib/mpeg.h vcdimager-0.7.24/lib/mpeg.h >--- vcdimager-0.7.24.ORIG/lib/mpeg.h 2018-01-02 16:24:55.931944628 +0100 >+++ vcdimager-0.7.24/lib/mpeg.h 2018-01-02 16:27:31.315936066 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifndef __VCD_MPEG_H__ > #define __VCD_MPEG_H__ > >@@ -105,7 +105,7 @@ > > CdioList_t *aps_list; /* filled up by vcd_mpeg_source */ > double last_aps_pts; /* temp, see ->packet */ >- >+ > } shdr[3]; > > struct vcd_mpeg_stream_aud_info { >@@ -147,7 +147,7 @@ > MPEG_NORM_NTSC_S > } mpeg_norm_t; > >-mpeg_norm_t >+mpeg_norm_t > vcd_mpeg_get_norm (const struct vcd_mpeg_stream_vid_info *_info); > > enum vcd_mpeg_packet_type { >@@ -184,8 +184,8 @@ > > #endif /* __VCD_MPEG_H__ */ > >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/lib/mpeg_stream.c vcdimager-0.7.24/lib/mpeg_stream.c >--- vcdimager-0.7.24.ORIG/lib/mpeg_stream.c 2018-01-02 16:24:55.931944628 +0100 >+++ vcdimager-0.7.24/lib/mpeg_stream.c 2018-01-02 16:31:53.818921600 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >@@ -46,7 +46,7 @@ > VcdDataSource_t *data_source; > > bool scanned; >- >+ > /* _get_packet cache */ > unsigned _read_pkt_pos; > unsigned _read_pkt_no; >@@ -62,7 +62,7 @@ > vcd_mpeg_source_new (VcdDataSource_t *mpeg_file) > { > VcdMpegSource_t *new_obj; >- >+ > vcd_assert (mpeg_file != NULL); > > new_obj = calloc(1, sizeof (VcdMpegSource_t)); >@@ -84,7 +84,7 @@ > > for (i = 0; i < 3; i++) > if (obj->info.shdr[i].aps_list) >- _cdio_list_free (obj->info.shdr[i].aps_list, true); >+ _cdio_list_free (obj->info.shdr[i].aps_list, true, NULL); > > free (obj); > } >@@ -104,7 +104,7 @@ > { > vcd_assert (obj != NULL); > vcd_assert (!obj->scanned); >- >+ > return obj->info.packets * 2324; > } > >@@ -132,7 +132,7 @@ > vcd_assert (!obj->scanned); > > memset (&state, 0, sizeof (state)); >- >+ > if (fix_scan_info) > state.stream.scan_data_warnings = VCD_MPEG_SCAN_DATA_WARNS + 1; > >@@ -190,14 +190,14 @@ > case APS_ASGI: > { > struct aps_data *_data = calloc(1, sizeof (struct aps_data)); >- >+ > _data->packet_no = pno; > _data->timestamp = state.packet.aps_pts; > > if (!state.stream.shdr[state.packet.aps_idx].aps_list) >- state.stream.shdr[state.packet.aps_idx].aps_list = >+ state.stream.shdr[state.packet.aps_idx].aps_list = > _cdio_list_new (); >- >+ > _cdio_list_append (state.stream.shdr[state.packet.aps_idx].aps_list, _data); > } > break; >@@ -240,7 +240,7 @@ > obj->info.playing_time = obj->info.max_pts - obj->info.min_pts; > > if (obj->info.min_pts) >- vcd_debug ("pts start offset %f (max pts = %f)", >+ vcd_debug ("pts start offset %f (max pts = %f)", > obj->info.min_pts, obj->info.max_pts); > > vcd_debug ("playing time %f", obj->info.playing_time); >@@ -256,8 +256,8 @@ > _CDIO_LIST_FOREACH (n, obj->info.shdr[i].aps_list) > { > struct aps_data *_data = _cdio_list_node_data (n); >- >- _data->timestamp -= obj->info.min_pts; >+ >+ _data->timestamp -= obj->info.min_pts; > } > } > >@@ -296,7 +296,7 @@ > > if (_aps->packet_no >= packet_no) > break; >- >+ > _laps = _aps; > } > >@@ -308,7 +308,7 @@ > return retval; > } > >-static void >+static void > _set_scan_msf (msf_t *_msf, long lsn) > { > if (lsn == -1) >@@ -322,7 +322,7 @@ > _msf->f |= 0x80; > } > >-static void >+static void > _fix_scan_info (struct vcd_mpeg_scan_data_t *scan_data_ptr, > unsigned packet_no, double pts, CdioList_t *aps_list) > { >@@ -338,7 +338,7 @@ > else if (_aps->packet_no < packet_no) > { > _prev = _aps->packet_no; >- >+ > if (pts - _aps->timestamp < 10 && _back == -1) > _back = _aps->packet_no; > } >@@ -366,7 +366,7 @@ > > int > vcd_mpeg_source_get_packet (VcdMpegSource_t *obj, unsigned long packet_no, >- void *packet_buf, >+ void *packet_buf, > struct vcd_mpeg_packet_info *flags, > bool fix_scan_info) > { >@@ -408,7 +408,7 @@ > char buf[2324] = { 0, }; > int read_len = MIN (sizeof (buf), (length - pos)); > int pkt_len; >- >+ > vcd_data_source_read (obj->data_source, buf, read_len, 1); > > pkt_len = vcd_mpeg_parse_packet (buf, read_len, >@@ -418,7 +418,7 @@ > > if (pno == packet_no) > { >- /* optimized for sequential access, >+ /* optimized for sequential access, > thus save pointer to next mpeg pack */ > obj->_read_pkt_pos = pos + pkt_len; > obj->_read_pkt_no = pno + 1; >@@ -434,16 +434,16 @@ > vid_idx = 2; > else if (state.packet.video[1]) > vid_idx = 1; >- else >+ else > vid_idx = 0; > > if (state.packet.has_pts) > _pts = state.packet.pts - obj->info.min_pts; > else >- _pts = _approx_pts (obj->info.shdr[vid_idx].aps_list, >+ _pts = _approx_pts (obj->info.shdr[vid_idx].aps_list, > packet_no); > >- _fix_scan_info (state.packet.scan_data_ptr, packet_no, >+ _fix_scan_info (state.packet.scan_data_ptr, packet_no, > _pts, obj->info.shdr[vid_idx].aps_list); > } > >@@ -481,8 +481,8 @@ > vcd_data_source_close (p_vcdmpegsource->data_source); > } > >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/lib/mpeg_stream.h vcdimager-0.7.24/lib/mpeg_stream.h >--- vcdimager-0.7.24.ORIG/lib/mpeg_stream.h 2005-06-08 01:29:23.000000000 +0200 >+++ vcdimager-0.7.24/lib/mpeg_stream.h 2018-01-02 16:27:31.298936066 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifndef __VCD_MPEG_STREAM__ > #define __VCD_MPEG_STREAM__ > >@@ -84,14 +84,14 @@ > void *user_data); > > void >-vcd_mpeg_source_scan (VcdMpegSource_t *obj, bool strict_aps, >- bool fix_scan_info, vcd_mpeg_prog_cb_t callback, >+vcd_mpeg_source_scan (VcdMpegSource_t *obj, bool strict_aps, >+ bool fix_scan_info, vcd_mpeg_prog_cb_t callback, > void *user_data); > > /* gets the packet at given position */ > int > vcd_mpeg_source_get_packet (VcdMpegSource_t *obj, unsigned long packet_no, >- void *packet_buf, >+ void *packet_buf, > struct vcd_mpeg_packet_info *flags, > bool fix_scan_info); > >@@ -108,8 +108,8 @@ > vcd_mpeg_source_destroy (VcdMpegSource_t *obj, bool destroy_file_obj); > > #endif /* __VCD_MPEG_STREAM__ */ >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/lib/obj.h vcdimager-0.7.24/lib/obj.h >--- vcdimager-0.7.24.ORIG/lib/obj.h 2005-06-09 02:53:23.000000000 +0200 >+++ vcdimager-0.7.24/lib/obj.h 2018-01-02 16:27:31.321936065 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifndef __VCD_OBJ_H__ > #define __VCD_OBJ_H__ > >@@ -62,7 +62,7 @@ > > /* work in progress -- fixme rename all occurences */ > #define mpeg_track_t mpeg_sequence_t >-#define mpeg_track_list mpeg_sequence_list >+#define mpeg_track_list mpeg_sequence_list > > typedef struct { > VcdMpegSource_t *source; >@@ -86,7 +86,7 @@ > char *iso_pathname; > VcdDataSource_t *file; > bool raw_flag; >- >+ > uint32_t size; > uint32_t start_extent; > uint32_t sectors; >@@ -140,8 +140,8 @@ > unsigned psdx_size; > > /* custom files */ >- unsigned ext_file_start_extent; >- unsigned custom_file_start_extent; >+ unsigned ext_file_start_extent; >+ unsigned custom_file_start_extent; > CdioList_t *custom_file_list; /* custom_file_t */ > CdioList_t *custom_dir_list; /* char */ > >@@ -192,8 +192,8 @@ > > #endif /* __VCD_OBJ_H__ */ > >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/lib/pbc.c vcdimager-0.7.24/lib/pbc.c >--- vcdimager-0.7.24.ORIG/lib/pbc.c 2005-06-18 05:27:24.000000000 +0200 >+++ vcdimager-0.7.24/lib/pbc.c 2018-01-02 16:32:07.632920839 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >@@ -26,6 +26,8 @@ > #include <stddef.h> > #include <math.h> > >+/* We don't want to pull in cdio's config */ >+#define __CDIO_CONFIG_H__ > #include <cdio/cdio.h> > #include <cdio/bytesex.h> > #include <cdio/util.h> >@@ -116,7 +118,7 @@ > _set_area_helper (pbc_area_t *dest, const pbc_area_t *src, const char sel_id[]) > { > memset (dest, 0, sizeof (pbc_area_t)); >- >+ > if (src) > { > if (src->x1 || src->x2 || src->y1 || src->y2) /* not disabled */ >@@ -129,7 +131,7 @@ > vcd_error ("selection '%s': area y1 >= y2 (%d >= %d)", > sel_id, src->y1, src->y2); > } >- >+ > *dest = *src; > } > } >@@ -151,7 +153,7 @@ > return ITEM_TYPE_ENTRY; > else if (id <= MAX_ENCODED_SEGMENT_NUM) > return ITEM_TYPE_SEGMENT; >- else >+ else > vcd_assert_not_reached (); > } > else if (_vcd_pbc_lid_lookup (obj, item_id)) >@@ -194,7 +196,7 @@ > > /* default entry point */ > >- if (_sequence->default_entry_id >+ if (_sequence->default_entry_id > && !strcmp (item_id, _sequence->default_entry_id)) > return n + 100; > n++; >@@ -254,7 +256,7 @@ > _vcd_pbc_max_lid (const VcdObj_t *obj) > { > uint16_t retval = 0; >- >+ > if (_vcd_pbc_available (obj)) > retval = _cdio_list_length (obj->pbc_list); > >@@ -286,7 +288,7 @@ > if (extended || _vcd_obj_has_cap_p (obj, _CAP_4C_SVCD)) > retval += __cd_offsetof (PsdSelectionListDescriptorExtended_t, area[n]); > break; >- >+ > case PBC_END: > retval = sizeof (PsdEndListDescriptor_t); > break; >@@ -299,7 +301,7 @@ > return retval; > } > >-static uint16_t >+static uint16_t > _lookup_psd_offset (const VcdObj_t *obj, const char item_id[], bool extended) > { > CdioListNode_t *node; >@@ -317,12 +319,12 @@ > > if (!p_pbc->id || strcmp (item_id, p_pbc->id)) > continue; >- >+ > return (extended ? p_pbc->offset_ext : p_pbc->offset) / INFO_OFFSET_MULT; > } > > vcd_error ("PSD: referenced PSD '%s' not found", item_id); >- >+ > /* not found */ > return PSD_OFS_DISABLED; > } >@@ -370,7 +372,7 @@ > case PBC_PLAYLIST: > { > CdioListNode_t *node; >- >+ > _vcd_pbc_mark_id (obj, p_pbc->prev_id); > _vcd_pbc_mark_id (obj, p_pbc->next_id); > _vcd_pbc_mark_id (obj, p_pbc->retn_id); >@@ -391,7 +393,7 @@ > _vcd_pbc_mark_id (obj, p_pbc->prev_id); > _vcd_pbc_mark_id (obj, p_pbc->next_id); > _vcd_pbc_mark_id (obj, p_pbc->retn_id); >- >+ > if (p_pbc->selection_type == _SEL_NORMAL) > _vcd_pbc_mark_id (obj, p_pbc->default_id); > >@@ -405,7 +407,7 @@ > > _vcd_pbc_mark_id (obj, _id); > } >- } >+ } > break; > > case PBC_END: >@@ -506,23 +508,23 @@ > _PsdPlayListDescriptor *_md = buf; > CdioListNode_t *node; > int n; >- >+ > _md->type = PSD_TYPE_PLAY_LIST; > _md->noi = _cdio_list_length (p_pbc->item_id_list); >- >+ > vcd_assert (p_pbc->lid < 0x8000); > _md->lid = uint16_to_be (p_pbc->lid | (p_pbc->rejected ? 0x8000 : 0)); >- >- _md->prev_ofs = >+ >+ _md->prev_ofs = > uint16_to_be (_lookup_psd_offset (obj, p_pbc->prev_id, extended)); >- _md->next_ofs = >+ _md->next_ofs = > uint16_to_be (_lookup_psd_offset (obj, p_pbc->next_id, extended)); > _md->return_ofs = > uint16_to_be (_lookup_psd_offset (obj, p_pbc->retn_id, extended)); > _md->ptime = uint16_to_be (rint (p_pbc->playing_time * 15.0)); > _md->wtime = _wtime (p_pbc->wait_time); > _md->atime = _wtime (p_pbc->auto_pause_time); >- >+ > n = 0; > _CDIO_LIST_FOREACH (node, p_pbc->item_id_list) > { >@@ -535,12 +537,12 @@ > > if (!_pin) > vcd_error ("PSD: referenced play item '%s' not found", _id); >- >- _md->itemid[n] = uint16_to_be (_pin); >+ >+ _md->itemid[n] = uint16_to_be (_pin); > } > else > _md->itemid[n] = 0; /* play nothing */ >- >+ > n++; > } > } >@@ -585,9 +587,9 @@ > vcd_assert (p_pbc->lid < 0x8000); > _md->lid = uint16_to_be (p_pbc->lid | (p_pbc->rejected ? 0x8000 : 0)); > >- _md->prev_ofs = >+ _md->prev_ofs = > uint16_to_be (_lookup_psd_offset (obj, p_pbc->prev_id, extended)); >- _md->next_ofs = >+ _md->next_ofs = > uint16_to_be (_lookup_psd_offset (obj, p_pbc->next_id, extended)); > _md->return_ofs = > uint16_to_be (_lookup_psd_offset (obj, p_pbc->retn_id, extended)); >@@ -598,7 +600,7 @@ > _md->default_ofs = > uint16_to_be (_lookup_psd_offset (obj, p_pbc->default_id, extended)); > break; >- >+ > case _SEL_MULTI_DEF: > _md->default_ofs = uint16_to_be (PSD_OFS_MULTI_DEF); > if (p_pbc->default_id) >@@ -612,7 +614,7 @@ > vcd_warn ("ignoring default target '%s' for multi default (w/o num) selection '%s'", > p_pbc->default_id, p_pbc->id); > break; >- >+ > default: > vcd_assert_not_reached (); > break; >@@ -626,7 +628,7 @@ > vcd_warn ("loop count %d > 127", p_pbc->loop_count); > > _md->loop = (p_pbc->loop_count > 0x7f) ? 0x7f : p_pbc->loop_count; >- >+ > if (p_pbc->jump_delayed) > _md->loop |= 0x80; > >@@ -643,7 +645,7 @@ > if (p_pbc->item_id) > { > const uint16_t _pin = _vcd_pbc_pin_lookup (obj, p_pbc->item_id); >- >+ > if (!_pin) > vcd_error ("PSD: referenced play item '%s' not found", p_pbc->item_id); > >@@ -657,7 +659,7 @@ > { > case _SEL_NORMAL: > break; >- >+ > case _SEL_MULTI_DEF: > case _SEL_MULTI_DEF_NO_NUM: > if (p_pbc->jump_delayed) >@@ -678,7 +680,7 @@ > if ((_seq = _vcd_obj_get_sequence_by_id ((VcdObj_t *) obj, p_pbc->item_id)) > || (_seq = _vcd_obj_get_sequence_by_entry_id ((VcdObj_t *) obj, p_pbc->item_id))) > { >- const unsigned _entries = >+ const unsigned _entries = > _cdio_list_length (_seq->entry_list) + 1; > > if (_nos != _entries) >@@ -691,10 +693,10 @@ > " is requried to be sequence or entry point" > " item for multi default selecton", > p_pbc->id, p_pbc->item_id); >- } >+ } > > break; >- >+ > default: > vcd_assert_not_reached (); > break; >@@ -709,10 +711,10 @@ > _CDIO_LIST_FOREACH (node, p_pbc->select_id_list) > { > const char *_id = _cdio_list_node_data (node); >- >- _md->ofs[idx] = >+ >+ _md->ofs[idx] = > uint16_to_be (_lookup_psd_offset (obj, _id, extended)); >- >+ > idx++; > } > } >@@ -722,7 +724,7 @@ > PsdSelectionListDescriptorExtended_t *_md2; > CdioListNode_t *node; > int n; >- >+ > /* append extended selection areas */ > > _md2 = (void *) &_md->ofs[_nos]; >@@ -748,7 +750,7 @@ > } > } > break; >- >+ > case PBC_END: > { > PsdEndListDescriptor_t *_md = buf; >@@ -769,7 +771,7 @@ > " but next volume is 0", p_pbc->id); > > if (!_pin) >- vcd_error ("PSD: referenced play item '%s' not found", >+ vcd_error ("PSD: referenced play item '%s' not found", > p_pbc->item_id); > > _md->change_pic = uint16_to_be (_pin); >@@ -781,12 +783,12 @@ > > if (!_segment) > vcd_warn ("PSD: endlist '%s': referenced play item '%s'" >- " is not a segment play item", >+ " is not a segment play item", > p_pbc->id, p_pbc->image_id); > else if (_segment->info->shdr[0].seen > || !(_segment->info->shdr[1].seen || _segment->info->shdr[2].seen)) > vcd_warn ("PSD: endlist '%s': referenced play item '%s'" >- " should be a still picture", >+ " should be a still picture", > p_pbc->id, p_pbc->image_id); > } > } >@@ -819,7 +821,7 @@ > p_pbc->select_id_list = _cdio_list_new (); > p_pbc->select_area_list = _cdio_list_new (); > break; >- >+ > case PBC_END: > break; > >@@ -848,14 +850,14 @@ > switch (p_pbc->type) > { > case PBC_PLAYLIST: >- _cdio_list_free (p_pbc->item_id_list, false); >+ _cdio_list_free (p_pbc->item_id_list, false, NULL); > break; > > case PBC_SELECTION: >- _cdio_list_free (p_pbc->select_id_list, true); >- _cdio_list_free (p_pbc->select_area_list, true); >+ _cdio_list_free (p_pbc->select_id_list, true, NULL); >+ _cdio_list_free (p_pbc->select_area_list, true, NULL); > break; >- >+ > case PBC_END: > break; > >@@ -865,7 +867,7 @@ > } > } > >-/* >+/* > */ > > bool >diff -ur vcdimager-0.7.24.ORIG/lib/pbc.h vcdimager-0.7.24/lib/pbc.h >--- vcdimager-0.7.24.ORIG/lib/pbc.h 2005-06-18 05:27:24.000000000 +0200 >+++ vcdimager-0.7.24/lib/pbc.h 2018-01-02 16:27:31.314936066 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifndef __VCD_PBC_H__ > #define __VCD_PBC_H__ > >@@ -135,7 +135,7 @@ > uint16_t > _vcd_pbc_pin_lookup (const VcdObj_t *p_obj, const char item_id[]); > >-unsigned >+unsigned > _vcd_pbc_list_calc_size (const pbc_t *_pbc, bool b_extended); > > bool >diff -ur vcdimager-0.7.24.ORIG/lib/salloc.c vcdimager-0.7.24/lib/salloc.c >--- vcdimager-0.7.24.ORIG/lib/salloc.c 2005-02-02 01:37:37.000000000 +0100 >+++ vcdimager-0.7.24/lib/salloc.c 2018-01-02 16:27:31.302936066 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >@@ -159,10 +159,10 @@ > { > uint32_t i; > >- for (i = 0; i < size; i++) >+ for (i = 0; i < size; i++) > { > vcd_assert (_vcd_salloc_is_set (bitmap, sec + i)); >- >+ > _vcd_salloc_unset (bitmap, sec + i); > } > } >@@ -201,9 +201,9 @@ > > return (bitmap->len - 1) * 8 + n; > } >- > >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/lib/salloc.h vcdimager-0.7.24/lib/salloc.h >--- vcdimager-0.7.24.ORIG/lib/salloc.h 2003-11-10 12:57:50.000000000 +0100 >+++ vcdimager-0.7.24/lib/salloc.h 2018-01-02 16:27:31.316936065 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > /* sector allocation management */ > > #ifndef _SALLOC_H_ >@@ -46,8 +46,8 @@ > > #endif /* _SALLOC_H_ */ > >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/lib/sector.c vcdimager-0.7.24/lib/sector.c >--- vcdimager-0.7.24.ORIG/lib/sector.c 2011-03-17 22:26:34.000000000 +0100 >+++ vcdimager-0.7.24/lib/sector.c 2018-01-02 16:27:31.303936066 +0100 >@@ -17,7 +17,7 @@ > along with this program; see the file COPYING. If not, write to > the Free Software Foundation, 59 Temple Place - Suite 330, Boston, > MA 02111-1307, USA. */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >@@ -48,7 +48,7 @@ > build_address (void *buf, sectortype_t sectortype, uint32_t address) > { > raw_cd_sector_t *sector = buf; >- >+ > vcd_assert (sizeof(raw_cd_sector_t) == CDIO_CD_FRAMESIZE_RAW-DATA_LEN); > > cdio_lba_to_msf(address, &(sector->msf)); >@@ -94,9 +94,9 @@ > uint8_t *dp; > uint8_t *Q; > int i, j; >- >+ > Q = inout + 4 + L2_RAW + 4 + 8 + L2_P; >- >+ > dps = inout; > for (j = 0; j < 26; j++) { > uint16_t a, b; >@@ -104,23 +104,23 @@ > a = b = 0; > dp = dps; > for (i = 0; i < 43; i++) { >- >+ > /* LSB */ > a ^= L2sq[i][*dp++]; >- >+ > /* MSB */ > b ^= L2sq[i][*dp]; >- >+ > dp += 2*44-1; > if (dp >= &inout[(4 + L2_RAW + 4 + 8 + L2_P)]) { > dp -= (4 + L2_RAW + 4 + 8 + L2_P); >- } >+ } > } > Q[0] = a >> 8; > Q[26*2] = a; > Q[1] = b >> 8; > Q[26*2+1] = b; >- >+ > Q += 2; > dps += 2*43; > } >@@ -132,30 +132,30 @@ > uint8_t *dp; > unsigned char *P; > int i, j; >- >+ > P = inout + 4 + L2_RAW + 4 + 8; >- >+ > for (j = 0; j < 43; j++) { > uint16_t a; > uint16_t b; >- >+ > a = b = 0; > dp = inout; > for (i = 19; i < 43; i++) { >- >+ > /* LSB */ > a ^= L2sq[i][*dp++]; >- >+ > /* MSB */ > b ^= L2sq[i][*dp]; >- >+ > dp += 2*43 -1; > } > P[0] = a >> 8; > P[43*2] = a; > P[1] = b >> 8; > P[43*2+1] = b; >- >+ > P += 2; > inout += 2; > } >@@ -174,7 +174,7 @@ > vcd_assert (sizeof (mode2_form2_sector_t) == CDIO_CD_FRAMESIZE_RAW); > vcd_assert (sizeof (mode0_sector_t) == CDIO_CD_FRAMESIZE_RAW); > vcd_assert (sizeof (raw_cd_sector_t) == SYNC_LEN+HEADER_LEN); >- >+ > memset (raw_sector, 0, SYNC_LEN+HEADER_LEN); > memcpy (raw_sector->sync, sync_pattern, sizeof (sync_pattern)); > >@@ -223,24 +223,24 @@ > vcd_assert (extent != SECTOR_NIL); > > memset (raw_sector, 0, CDIO_CD_FRAMESIZE_RAW); >- >+ > subhdr[0] = subhdr[4] = fnum; > subhdr[1] = subhdr[5] = cnum; > subhdr[2] = subhdr[6] = sm; > subhdr[3] = subhdr[7] = ci; > >- if (sm & SM_FORM2) >+ if (sm & SM_FORM2) > { >- memcpy ((char*)raw_sector+CDIO_CD_XA_SYNC_HEADER, data, >+ memcpy ((char*)raw_sector+CDIO_CD_XA_SYNC_HEADER, data, > M2F2_SECTOR_SIZE); > do_encode_L2 (raw_sector, MODE_2_FORM_2, extent+CDIO_PREGAP_SECTORS); >- } >- else >+ } >+ else > { >- memcpy ((char*)raw_sector+CDIO_CD_XA_SYNC_HEADER, data, >+ memcpy ((char*)raw_sector+CDIO_CD_XA_SYNC_HEADER, data, > CDIO_CD_FRAMESIZE); > do_encode_L2 (raw_sector, MODE_2_FORM_1, extent+CDIO_PREGAP_SECTORS); >- } >+ } > } > > void >@@ -249,15 +249,15 @@ > vcd_assert (raw_sector != NULL); > vcd_assert (data != NULL); > vcd_assert (extent != SECTOR_NIL); >- >+ > memset (raw_sector, 0, CDIO_CD_FRAMESIZE_RAW); > > memcpy ((char*)raw_sector+12+4, data, M2RAW_SECTOR_SIZE); > do_encode_L2 (raw_sector, MODE_2, extent+CDIO_PREGAP_SECTORS); > } > >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/lib/sector_private.h vcdimager-0.7.24/lib/sector_private.h >--- vcdimager-0.7.24.ORIG/lib/sector_private.h 2004-02-14 18:27:56.000000000 +0100 >+++ vcdimager-0.7.24/lib/sector_private.h 2018-01-02 16:27:31.310936066 +0100 >@@ -18,15 +18,15 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifndef __VCD_CD_SECTOR_PRIVATE_H__ > #define __VCD_CD_SECTOR_PRIVATE_H__ > >-#define RS_L12_BITS 8 >+#define RS_L12_BITS 8 > >-#define L2_RAW (1024*2) >-#define L2_Q (26*2*2) >-#define L2_P (43*2*2) >+#define L2_RAW (1024*2) >+#define L2_Q (26*2*2) >+#define L2_P (43*2*2) > > typedef enum { > MODE_0, >@@ -1338,8 +1338,8 @@ > > #endif /* __VCD_CD_SECTOR_PRIVATE_H__ */ > >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/lib/stream.c vcdimager-0.7.24/lib/stream.c >--- vcdimager-0.7.24.ORIG/lib/stream.c 2005-06-08 01:29:23.000000000 +0200 >+++ vcdimager-0.7.24/lib/stream.c 2018-01-02 16:27:31.313936066 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >@@ -42,7 +42,7 @@ > > static const char _rcsid[] = "$Id: stream.c,v 1.5 2005/06/07 23:29:23 rocky Exp $"; > >-/* >+/* > * DataSource implementations > */ > >@@ -68,7 +68,7 @@ > } > } > >-VcdDataSink* >+VcdDataSink* > vcd_data_sink_new(void *user_data, const vcd_data_sink_io_functions *funcs) > { > VcdDataSink *new_obj; >@@ -103,7 +103,7 @@ > long written; > > vcd_assert (obj != NULL); >- >+ > _vcd_data_sink_open_if_necessary(obj); > > written = obj->op.write(obj->user_data, ptr, size*nmemb); >@@ -126,7 +126,7 @@ > > if (len < 0 || len > (sizeof (buf) - 1)) > vcd_error ("vsnprintf() returned %d", len); >- >+ > retval = vcd_data_sink_write (obj, buf, 1, len); > > va_end (args); >@@ -156,7 +156,7 @@ > obj->op.free(obj->user_data); > } > >-/* >+/* > * DataSource implementations > */ > >@@ -194,7 +194,7 @@ > > if (p_obj->position != offset) { > #ifdef STREAM_DEBUG >- vcd_warn("had to reposition DataSource from %ld to %ld!", p_obj->position, >+ vcd_warn("had to reposition DataSource from %ld to %ld!", p_obj->position, > offset); > #endif > p_obj->position = offset; >@@ -205,7 +205,7 @@ > } > > VcdDataSource_t * >-vcd_data_source_new(void *p_user_data, >+vcd_data_source_new(void *p_user_data, > const vcd_data_source_io_functions *funcs) > { > VcdDataSource_t *new_obj; >@@ -218,8 +218,8 @@ > return new_obj; > } > >-/** >- read size*nmemb bytes from obj into ptr >+/** >+ read size*nmemb bytes from obj into ptr > */ > long > vcd_data_source_read(VcdDataSource_t* obj, void *ptr, long size, long nmemb) >@@ -271,8 +271,8 @@ > p_obj->op.free(p_obj->user_data); > } > >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/lib/stream.h vcdimager-0.7.24/lib/stream.h >--- vcdimager-0.7.24.ORIG/lib/stream.h 2005-06-08 01:29:23.000000000 +0200 >+++ vcdimager-0.7.24/lib/stream.h 2018-01-02 16:27:31.323936065 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > > #ifndef __VCD_STREAM_H__ > #define __VCD_STREAM_H__ >@@ -58,11 +58,11 @@ > vcd_data_free_t free; > } vcd_data_sink_io_functions; > >-VcdDataSink* >+VcdDataSink* > vcd_data_sink_new(void *p_user_data, const vcd_data_sink_io_functions *funcs); > > long >-vcd_data_sink_write(VcdDataSink* p_obj, const void *ptr, long size, >+vcd_data_sink_write(VcdDataSink* p_obj, const void *ptr, long size, > long nmemb); > > long >@@ -83,22 +83,22 @@ > > typedef struct { > vcd_data_open_t open; >- vcd_data_seek_t seek; >- vcd_data_stat_t stat; >+ vcd_data_seek_t seek; >+ vcd_data_stat_t stat; > vcd_data_read_t read; > vcd_data_close_t close; > vcd_data_free_t free; > } vcd_data_source_io_functions; > > VcdDataSource_t * >-vcd_data_source_new(void *p_user_data, >+vcd_data_source_new(void *p_user_data, > const vcd_data_source_io_functions *funcs); > >-/** >- read size*nmemb bytes from obj into ptr >+/** >+ read size*nmemb bytes from obj into ptr > */ > long >-vcd_data_source_read(VcdDataSource_t *p_obj, /*out*/ void *ptr, long int size, >+vcd_data_source_read(VcdDataSource_t *p_obj, /*out*/ void *ptr, long int size, > long int nmemb); > > long >@@ -119,8 +119,8 @@ > > #endif /* __VCD_STREAM_H__ */ > >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/lib/stream_stdio.c vcdimager-0.7.24/lib/stream_stdio.c >--- vcdimager-0.7.24.ORIG/lib/stream_stdio.c 2005-06-08 01:29:23.000000000 +0200 >+++ vcdimager-0.7.24/lib/stream_stdio.c 2018-01-02 16:27:31.304936066 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >@@ -25,7 +25,7 @@ > #include <stdio.h> > #include <stdlib.h> > #include <string.h> >-#include <unistd.h> >+#include <unistd.h> > #include <sys/stat.h> > #include <errno.h> > >@@ -49,10 +49,10 @@ > } _UserData; > > static int >-_stdio_open_source (void *user_data) >+_stdio_open_source (void *user_data) > { > _UserData *const ud = user_data; >- >+ > if ((ud->fd = fopen (ud->pathname, "rb"))) > { > ud->fd_buf = calloc(1, VCD_STREAM_STDIO_BUFSIZE); >@@ -63,7 +63,7 @@ > } > > static int >-_stdio_open_sink (void *user_data) >+_stdio_open_sink (void *user_data) > { > _UserData *const ud = user_data; > >@@ -72,7 +72,7 @@ > ud->fd_buf = calloc(1, VCD_STREAM_STDIO_BUFSIZE); > setvbuf (ud->fd, ud->fd_buf, _IOFBF, VCD_STREAM_STDIO_BUFSIZE); > } >- >+ > return (ud->fd == NULL); > } > >@@ -83,7 +83,7 @@ > > if (fclose (ud->fd)) > vcd_error ("fclose (): %s", strerror (errno)); >- >+ > ud->fd = NULL; > > free (ud->fd_buf); >@@ -101,7 +101,7 @@ > free(ud->pathname); > > if (ud->fd) /* should be NULL anyway... */ >- _stdio_close(user_data); >+ _stdio_close(user_data); > > free(ud); > } >@@ -159,7 +159,7 @@ > long written; > > written = fwrite(buf, 1, count, ud->fd); >- >+ > if (written != count) > vcd_error ("fwrite (): %s", strerror (errno)); > >@@ -173,8 +173,8 @@ > vcd_data_source_io_functions funcs = { 0, }; > _UserData *ud = NULL; > struct stat statbuf; >- >- if (stat (pathname, &statbuf) == -1) >+ >+ if (stat (pathname, &statbuf) == -1) > { > vcd_error ("could not stat() file `%s': %s", pathname, strerror (errno)); > return NULL; >@@ -206,7 +206,7 @@ > _UserData *ud = NULL; > struct stat statbuf; > >- if (stat (pathname, &statbuf) != -1) >+ if (stat (pathname, &statbuf) != -1) > vcd_warn ("file `%s' exist already, will get overwritten!", pathname); > > ud = calloc(1, sizeof (_UserData)); >@@ -226,8 +226,8 @@ > return new_obj; > } > >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/lib/stream_stdio.h vcdimager-0.7.24/lib/stream_stdio.h >--- vcdimager-0.7.24.ORIG/lib/stream_stdio.h 2005-06-08 01:29:23.000000000 +0200 >+++ vcdimager-0.7.24/lib/stream_stdio.h 2018-01-02 16:27:31.314936066 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > > #ifndef __VCD_STREAM_STDIO_H__ > #define __VCD_STREAM_STDIO_H__ >@@ -33,8 +33,8 @@ > > #endif /* __VCD_STREAM_STDIO_H__ */ > >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/lib/util.c vcdimager-0.7.24/lib/util.c >--- vcdimager-0.7.24.ORIG/lib/util.c 2005-02-02 01:37:37.000000000 +0100 >+++ vcdimager-0.7.24/lib/util.c 2018-01-02 16:27:31.314936066 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >@@ -51,7 +51,7 @@ > _vcd_strfreev(char **strv) > { > int n; >- >+ > vcd_assert (strv != NULL); > > for(n = 0; strv[n]; n++) >@@ -86,7 +86,7 @@ > strcat (new_str, delim); > strcat (new_str, strv[n]); > } >- >+ > return new_str; > } > >@@ -107,14 +107,14 @@ > > n = 1; > p = _str; >- while(*p) >+ while(*p) > if (*(p++) == delim) > n++; > > strv = calloc(1, sizeof (char *) * (n+1)); >- >+ > n = 0; >- while((p = strtok(n ? NULL : _str, _delim)) != NULL) >+ while((p = strtok(n ? NULL : _str, _delim)) != NULL) > strv[n++] = strdup(p); > > free(_str); >@@ -132,7 +132,7 @@ > new_mem = malloc(count); > memcpy (new_mem, mem, count); > } >- >+ > return new_mem; > } > >@@ -157,8 +157,8 @@ > return new_str; > } > >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/lib/util.h vcdimager-0.7.24/lib/util.h >--- vcdimager-0.7.24.ORIG/lib/util.h 2005-02-02 01:37:37.000000000 +0100 >+++ vcdimager-0.7.24/lib/util.h 2018-01-02 16:27:31.305936066 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifndef __VCD_UTIL_H__ > #define __VCD_UTIL_H__ > >@@ -37,13 +37,13 @@ > } > > /* round up to next block boundary */ >-static inline unsigned >+static inline unsigned > _vcd_ceil2block (unsigned offset, int blocksize) > { > return _vcd_len2blocks (offset, blocksize) * blocksize; > } > >-static inline unsigned >+static inline unsigned > _vcd_ofs_add (unsigned offset, unsigned length, int blocksize) > { > if (blocksize - (offset % blocksize) < length) >@@ -80,8 +80,8 @@ > > #endif /* __VCD_UTIL_H__ */ > >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/lib/vcd_assert.h vcdimager-0.7.24/lib/vcd_assert.h >--- vcdimager-0.7.24.ORIG/lib/vcd_assert.h 2003-11-10 12:57:52.000000000 +0100 >+++ vcdimager-0.7.24/lib/vcd_assert.h 2018-01-02 16:27:31.302936066 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifndef __VCD_ASSERT_H__ > #define __VCD_ASSERT_H__ > >@@ -31,7 +31,7 @@ > if (GNUC_UNLIKELY (!(expr))) vcd_log (VCD_LOG_ASSERT, \ > "file %s: line %d (%s): assertion failed: (%s)", \ > __FILE__, __LINE__, __PRETTY_FUNCTION__, #expr); \ >- } >+ } > > #define vcd_assert_not_reached() \ > { \ >diff -ur vcdimager-0.7.24.ORIG/lib/vcd.c vcdimager-0.7.24/lib/vcd.c >--- vcdimager-0.7.24.ORIG/lib/vcd.c 2018-01-02 16:24:55.932944628 +0100 >+++ vcdimager-0.7.24/lib/vcd.c 2018-01-02 16:33:03.611917755 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >@@ -28,6 +28,9 @@ > #include <ctype.h> > #include <math.h> > >+#define _VCD_INFO_PRIVATE_H >+/* We don't want to pull in cdio's config */ >+#define __CDIO_CONFIG_H__ > #include <cdio/cdio.h> > #include <cdio/util.h> > #include <cdio/iso9660.h> >@@ -92,7 +95,7 @@ > CdioListNode_t *node2; > > /* default entry point */ >- if (_sequence->default_entry_id >+ if (_sequence->default_entry_id > && !strcmp (entry_id, _sequence->default_entry_id)) > return _sequence; > >@@ -101,7 +104,7 @@ > { > entry_t *_entry = _cdio_list_node_data (node2); > >- if (_entry->id >+ if (_entry->id > && !strcmp (entry_id, _entry->id)) > return _sequence; > } >@@ -240,17 +243,17 @@ > > /* > * public methods >- */ >+ */ > > VcdObj_t * > vcd_obj_new (vcd_type_t vcd_type) > { > VcdObj_t *p_new_obj = NULL; > static bool _first = true; >- >+ > if (_first) > { >-#if defined(_DEVELOPMENT_) >+#if defined(_DEVELOPMENT_) > vcd_warn ("initializing libvcd %s [%s]", VERSION, HOST_ARCH); > vcd_warn (" "); > vcd_warn (" this is the Beta development branch!"); >@@ -297,9 +300,9 @@ > /* gap's defined by IEC-10149 / ECMA-130 */ > > /* pre-gap's for tracks but the first one */ >- p_new_obj->track_pregap = CDIO_PREGAP_SECTORS; >+ p_new_obj->track_pregap = CDIO_PREGAP_SECTORS; > /* post-gap after last track */ >- p_new_obj->leadout_pregap = CDIO_POSTGAP_SECTORS; >+ p_new_obj->leadout_pregap = CDIO_POSTGAP_SECTORS; > > if (_vcd_obj_has_cap_p (p_new_obj, _CAP_TRACK_MARGINS)) > { >@@ -315,7 +318,7 @@ > return p_new_obj; > } > >-int >+int > vcd_obj_remove_item (VcdObj_t *p_vcdobj, const char id[]) > { > vcd_warn ("vcd_obj_remove_item('%s') not implemented yet!", id); >@@ -333,7 +336,7 @@ > vcd_assert (track_id >= 0); > > node = _vcd_list_at (p_vcdobj->mpeg_sequence_list, track_id); >- >+ > vcd_assert (node != NULL); > > track = (mpeg_sequence_t *) _cdio_list_node_data (node); >@@ -341,25 +344,25 @@ > vcd_mpeg_source_destroy (track->source, true); > > length = track->info ? track->info->packets : 0; >- length += p_vcdobj->track_pregap + p_vcdobj->track_front_margin >+ length += p_vcdobj->track_pregap + p_vcdobj->track_front_margin > + 0 + p_vcdobj->track_rear_margin; > > /* fixup offsets */ > { > CdioListNode_t *node2 = node; > while ((node2 = _cdio_list_node_next (node2)) != NULL) >- ((mpeg_sequence_t *) _cdio_list_node_data (node))->relative_start_extent >+ ((mpeg_sequence_t *) _cdio_list_node_data (node))->relative_start_extent > -= length; > } > > p_vcdobj->relative_end_extent -= length; > > /* shift up */ >- _cdio_list_node_free (node, true); >+ _cdio_list_node_free (node, true, NULL); > } > > int >-vcd_obj_append_segment_play_item (VcdObj_t *p_vcdobj, >+vcd_obj_append_segment_play_item (VcdObj_t *p_vcdobj, > VcdMpegSource_t *p_mpeg_source, > const char item_id[]) > { >@@ -386,7 +389,7 @@ > return -1; > } > >- vcd_info ("scanning mpeg segment item #%d for scanpoints...", >+ vcd_info ("scanning mpeg segment item #%d for scanpoints...", > _cdio_list_length (p_vcdobj->mpeg_segment_list)); > > vcd_mpeg_source_scan (p_mpeg_source, !p_vcdobj->relaxed_aps, >@@ -405,7 +408,7 @@ > segment->source = p_mpeg_source; > > segment->id = strdup (item_id); >- >+ > segment->info = vcd_mpeg_source_get_info (p_mpeg_source); > segment->segment_count = _vcd_len2blocks (segment->info->packets, 150); > >@@ -421,7 +424,7 @@ > } > > int >-vcd_obj_append_sequence_play_item (VcdObj_t *p_vcdobj, >+vcd_obj_append_sequence_play_item (VcdObj_t *p_vcdobj, > VcdMpegSource_t *p_mpeg_source, > const char item_id[], > const char default_entry_id[]) >@@ -464,7 +467,7 @@ > > if (default_entry_id) > sequence->default_entry_id = strdup (default_entry_id); >- >+ > sequence->info = vcd_mpeg_source_get_info (p_mpeg_source); > length = sequence->info->packets; > >@@ -474,7 +477,7 @@ > p_vcdobj->relative_end_extent += p_vcdobj->track_pregap; > sequence->relative_start_extent = p_vcdobj->relative_end_extent; > >- p_vcdobj->relative_end_extent += p_vcdobj->track_front_margin + length >+ p_vcdobj->relative_end_extent += p_vcdobj->track_front_margin + length > + p_vcdobj->track_rear_margin; > > /* sanity checks */ >@@ -511,13 +514,13 @@ > vcd_warn ("audio stream #%d not supported by this VCD type", i); > > if (sequence->info->ahdr[i].sampfreq != 44100) >- vcd_warn ("audio stream #%d has sampling frequency %d Hz (should be 44100 Hz)", >+ vcd_warn ("audio stream #%d has sampling frequency %d Hz (should be 44100 Hz)", > i, sequence->info->ahdr[i].sampfreq); > > if (sequence->info->ahdr[i].layer != 2) > vcd_warn ("audio stream #%d is not layer II", i); > >- if (_vcd_obj_has_cap_p (p_vcdobj, _CAP_MPEG1) >+ if (_vcd_obj_has_cap_p (p_vcdobj, _CAP_MPEG1) > && sequence->info->ahdr[i].bitrate != 224*1024) > vcd_warn ("audio stream #%d has bitrate %d kbps (should be 224 kbps for this vcd type)", > i, sequence->info->ahdr[i].bitrate); >@@ -528,7 +531,7 @@ > } > } > } >- >+ > /* vcd_debug ("track# %d's detected playing time: %.2f seconds", */ > /* track_no, sequence->info->playing_time); */ > >@@ -549,8 +552,8 @@ > return 0; > } > >-int >-vcd_obj_add_sequence_pause (VcdObj_t *obj, const char sequence_id[], >+int >+vcd_obj_add_sequence_pause (VcdObj_t *obj, const char sequence_id[], > double pause_time, const char pause_id[]) > { > mpeg_sequence_t *p_sequence; >@@ -560,7 +563,7 @@ > if (sequence_id) > p_sequence = _vcd_obj_get_sequence_by_id (obj, sequence_id); > else >- p_sequence = >+ p_sequence = > _cdio_list_node_data (_cdio_list_end (obj->mpeg_sequence_list)); > > if (!p_sequence) >@@ -582,7 +585,7 @@ > _cdio_list_append (p_sequence->pause_list, _pause); > } > >- _vcd_list_sort (p_sequence->pause_list, >+ _vcd_list_sort (p_sequence->pause_list, > (_cdio_list_cmp_func_t) _pause_cmp); > > vcd_debug ("added autopause point at %f", pause_time); >@@ -590,8 +593,8 @@ > return 0; > } > >-int >-vcd_obj_add_segment_pause (VcdObj_t *p_obj, const char segment_id[], >+int >+vcd_obj_add_segment_pause (VcdObj_t *p_obj, const char segment_id[], > double pause_time, const char pause_id[]) > { > mpeg_segment_t *_segment; >@@ -622,7 +625,7 @@ > _cdio_list_append (_segment->pause_list, _pause); > } > >- _vcd_list_sort (_segment->pause_list, >+ _vcd_list_sort (_segment->pause_list, > (_cdio_list_cmp_func_t) _pause_cmp); > > vcd_debug ("added autopause point at %f", pause_time); >@@ -642,8 +645,8 @@ > return 0; > } > >-int >-vcd_obj_add_sequence_entry (VcdObj_t *p_obj, const char sequence_id[], >+int >+vcd_obj_add_sequence_entry (VcdObj_t *p_obj, const char sequence_id[], > double entry_time, const char entry_id[]) > { > mpeg_sequence_t *p_sequence; >@@ -684,13 +687,13 @@ > _cdio_list_append (p_sequence->entry_list, _entry); > } > >- _vcd_list_sort (p_sequence->entry_list, >+ _vcd_list_sort (p_sequence->entry_list, > (_cdio_list_cmp_func_t) _entry_cmp); > > return 0; > } > >-void >+void > vcd_obj_destroy (VcdObj_t *p_obj) > { > CdioListNode_t *p_node; >@@ -704,33 +707,33 @@ > _CDIO_LIST_FOREACH (p_node, p_obj->custom_file_list) > { > custom_file_t *p = _cdio_list_node_data (p_node); >- >+ > free (p->iso_pathname); > } > >- _cdio_list_free (p_obj->custom_file_list, true); >+ _cdio_list_free (p_obj->custom_file_list, true, NULL); > >- _cdio_list_free (p_obj->custom_dir_list, true); >+ _cdio_list_free (p_obj->custom_dir_list, true, NULL); > > while (_cdio_list_length (p_obj->mpeg_sequence_list)) > _vcd_obj_remove_mpeg_track (p_obj, 0); >- _cdio_list_free (p_obj->mpeg_sequence_list, true); >+ _cdio_list_free (p_obj->mpeg_sequence_list, true, NULL); > > free (p_obj); > } > >-int >+int > vcd_obj_set_param_uint (VcdObj_t *p_obj, vcd_parm_t param, unsigned arg) > { > vcd_assert (p_obj != NULL); > >- switch (param) >+ switch (param) > { > case VCD_PARM_VOLUME_COUNT: > p_obj->info_volume_count = arg; > if (!IN (p_obj->info_volume_count, 1, 65535)) > { >- p_obj->info_volume_count = >+ p_obj->info_volume_count = > CLAMP (p_obj->info_volume_count, 1, 65535); > vcd_warn ("volume count out of range, clamping to range"); > } >@@ -741,7 +744,7 @@ > p_obj->info_volume_number = arg; > if (!IN (p_obj->info_volume_number, 0, 65534)) > { >- p_obj->info_volume_number = >+ p_obj->info_volume_number = > CLAMP (p_obj->info_volume_number, 0, 65534); > vcd_warn ("volume number out of range, clamping to range"); > } >@@ -767,7 +770,7 @@ > } > if (p_obj->leadout_pregap < CDIO_PREGAP_SECTORS) > vcd_warn ("track leadout pregap set below %d sectors; " >- "created (S)VCD may be non-working", >+ "created (S)VCD may be non-working", > CDIO_PREGAP_SECTORS); > > vcd_debug ("changed leadout pregap to %u", p_obj->leadout_pregap); >@@ -782,7 +785,7 @@ > } > if (p_obj->track_pregap < CDIO_PREGAP_SECTORS) > vcd_warn ("track pre gap set below %d sectors; " >- "created (S)VCD may be non-working", >+ "created (S)VCD may be non-working", > CDIO_PREGAP_SECTORS); > vcd_debug ("changed track pregap to %u", p_obj->track_pregap); > break; >@@ -791,11 +794,11 @@ > p_obj->track_front_margin = arg; > if (!IN (p_obj->track_front_margin, 0, CDIO_PREGAP_SECTORS)) > { >- p_obj->track_front_margin = CLAMP (p_obj->track_front_margin, 0, >+ p_obj->track_front_margin = CLAMP (p_obj->track_front_margin, 0, > CDIO_PREGAP_SECTORS); > vcd_warn ("front margin out of range, clamping to allowed range"); > } >- if (_vcd_obj_has_cap_p (p_obj, _CAP_TRACK_MARGINS) >+ if (_vcd_obj_has_cap_p (p_obj, _CAP_TRACK_MARGINS) > && p_obj->track_front_margin < 15) > vcd_warn ("front margin set smaller than recommended (%d < 15 sectors) for disc type used", > p_obj->track_front_margin); >@@ -807,11 +810,11 @@ > p_obj->track_rear_margin = arg; > if (!IN (p_obj->track_rear_margin, 0, CDIO_POSTGAP_SECTORS)) > { >- p_obj->track_rear_margin = CLAMP (p_obj->track_rear_margin, 0, >+ p_obj->track_rear_margin = CLAMP (p_obj->track_rear_margin, 0, > CDIO_POSTGAP_SECTORS); > vcd_warn ("rear margin out of range, clamping to allowed range"); > } >- if (_vcd_obj_has_cap_p (p_obj, _CAP_TRACK_MARGINS) >+ if (_vcd_obj_has_cap_p (p_obj, _CAP_TRACK_MARGINS) > && p_obj->track_rear_margin < 15) > vcd_warn ("rear margin set smaller than recommended (%d < 15 sectors) for disc type used", > p_obj->track_rear_margin); >@@ -826,13 +829,13 @@ > return 0; > } > >-int >+int > vcd_obj_set_param_str (VcdObj_t *p_obj, vcd_parm_t param, const char *arg) > { > vcd_assert (p_obj != NULL); > vcd_assert (arg != NULL); > >- switch (param) >+ switch (param) > { > case VCD_PARM_VOLUME_ID: > free (p_obj->iso_volume_label); >@@ -877,7 +880,7 @@ > } > vcd_debug ("changed application id to `%s'", p_obj->iso_application_id); > break; >- >+ > case VCD_PARM_ALBUM_ID: > free (p_obj->info_album_id); > p_obj->info_album_id = strdup (arg); >@@ -897,12 +900,12 @@ > return 0; > } > >-int >+int > vcd_obj_set_param_bool (VcdObj_t *p_obj, vcd_parm_t param, bool arg) > { > vcd_assert (p_obj != NULL); > >- switch (param) >+ switch (param) > { > case VCD_PARM_RELAXED_APS: > p_obj->relaxed_aps = arg ? true : false; >@@ -911,13 +914,13 @@ > > case VCD_PARM_NEXT_VOL_LID2: > p_obj->info_use_lid2 = arg ? true : false; >- vcd_debug ("changing 'next volume use lid 2' to %d", >+ vcd_debug ("changing 'next volume use lid 2' to %d", > p_obj->info_use_lid2); > break; > > case VCD_PARM_NEXT_VOL_SEQ2: > p_obj->info_use_seq2 = arg ? true : false; >- vcd_debug ("changing 'next volume use sequence 2' to %d", >+ vcd_debug ("changing 'next volume use sequence 2' to %d", > p_obj->info_use_seq2); > break; > >@@ -925,7 +928,7 @@ > if (p_obj->type == VCD_TYPE_SVCD) > { > if ((p_obj->svcd_vcd3_mpegav = arg ? true : false)) >- vcd_warn ("!! enabling deprecated VCD3.0 MPEGAV folder --" >+ vcd_warn ("!! enabling deprecated VCD3.0 MPEGAV folder --" > " SVCD will not be IEC62107 compliant !!"); > } > else >@@ -936,7 +939,7 @@ > if (p_obj->type == VCD_TYPE_SVCD) > { > if ((p_obj->svcd_vcd3_entrysvd = arg ? true : false)) >- vcd_warn ("!! enabling deprecated VCD3.0 ENTRYSVD signature --" >+ vcd_warn ("!! enabling deprecated VCD3.0 ENTRYSVD signature --" > " SVCD will not be IEC62107 compliant !!"); > } > else >@@ -947,7 +950,7 @@ > if (p_obj->type == VCD_TYPE_SVCD) > { > if ((p_obj->svcd_vcd3_tracksvd = arg ? true : false)) >- vcd_warn ("!! enabling deprecated VCD3.0 TRACK.SVD format --" >+ vcd_warn ("!! enabling deprecated VCD3.0 TRACK.SVD format --" > " SVCD will not be IEC62107 compliant !!"); > } > else >@@ -958,7 +961,7 @@ > if (_vcd_obj_has_cap_p (p_obj, _CAP_4C_SVCD)) > { > p_obj->update_scan_offsets = arg ? true : false; >- vcd_debug ("changing 'update scan offsets' to %d", >+ vcd_debug ("changing 'update scan offsets' to %d", > p_obj->update_scan_offsets); > } > else >@@ -968,7 +971,7 @@ > case VCD_PARM_LEADOUT_PAUSE: > vcd_warn ("use of 'leadout pause' is deprecated and may be removed in later releases;" > " use 'leadout pregap' instead"); >- vcd_obj_set_param_uint (p_obj, VCD_PARM_LEADOUT_PREGAP, >+ vcd_obj_set_param_uint (p_obj, VCD_PARM_LEADOUT_PREGAP, > (arg ? CDIO_PREGAP_SECTORS : 0)); > break; > >@@ -989,10 +992,10 @@ > vcd_assert (iso_pathname != NULL); > > _iso_pathname = _vcd_strdup_upper (iso_pathname); >- >+ > if (!iso9660_dirname_valid_p (_iso_pathname)) > { >- vcd_error("pathname `%s' is not a valid iso pathname", >+ vcd_error("pathname `%s' is not a valid iso pathname", > _iso_pathname); > free (_iso_pathname); > return 1; >@@ -1000,7 +1003,7 @@ > > _cdio_list_append (p_obj->custom_dir_list, _iso_pathname); > >- _vcd_list_sort (p_obj->custom_dir_list, >+ _vcd_list_sort (p_obj->custom_dir_list, > (_cdio_list_cmp_func_t) strcmp); > > return 0; >@@ -1011,7 +1014,7 @@ > VcdDataSource_t *file, bool raw_flag) > { > uint32_t size = 0, sectors = 0; >- >+ > vcd_assert (p_obj != NULL); > vcd_assert (file != NULL); > vcd_assert (iso_pathname != NULL); >@@ -1035,7 +1038,7 @@ > > if (size % M2RAW_SECTOR_SIZE) > { >- vcd_error("raw mode2 file must have size multiple of %d \n", >+ vcd_error("raw mode2 file must have size multiple of %d \n", > M2RAW_SECTOR_SIZE); > return 1; > } >@@ -1046,21 +1049,21 @@ > { > custom_file_t *p; > char *_iso_pathname = _vcd_strdup_upper (iso_pathname); >- >+ > if (!iso9660_pathname_valid_p (_iso_pathname)) > { >- vcd_error("pathname `%s' is not a valid iso pathname", >+ vcd_error("pathname `%s' is not a valid iso pathname", > _iso_pathname); > free (_iso_pathname); > return 1; > } > > p = calloc(1, sizeof (custom_file_t)); >- >+ > p->file = file; > p->iso_pathname = _iso_pathname; > p->raw_flag = raw_flag; >- >+ > p->size = size; > p->start_extent = 0; > p->sectors = sectors; >@@ -1077,8 +1080,6 @@ > int n; > CdioListNode_t *p_node; > >- uint32_t dir_secs = SECTOR_NIL; >- > _dict_clean (p_obj); > > /* pre-alloc 16 blocks of ISO9660 required silence */ >@@ -1086,7 +1087,7 @@ > vcd_assert_not_reached (); > > /* keep karaoke sectors blank -- well... guess I'm too paranoid :) */ >- if (_vcd_salloc (p_obj->iso_bitmap, 75, 75) == SECTOR_NIL) >+ if (_vcd_salloc (p_obj->iso_bitmap, 75, 75) == SECTOR_NIL) > vcd_assert_not_reached (); > > /* pre-alloc descriptors, PVD */ >@@ -1095,10 +1096,10 @@ > _dict_insert (p_obj, "evd", ISO_EVD_SECTOR, 1, SM_EOR|SM_EOF); /* EOR+EOF */ > > /* reserve for iso directory */ >- dir_secs = _vcd_salloc (p_obj->iso_bitmap, 18, 75-18); >+ _vcd_salloc (p_obj->iso_bitmap, 18, 75-18); > > /* VCD information area */ >- >+ > _dict_insert (p_obj, "info", INFO_VCD_SECTOR, 1, SM_EOF); /* INFO.VCD */ /* EOF */ > _dict_insert (p_obj, "entries", ENTRIES_VCD_SECTOR, 1, SM_EOF); /* ENTRIES.VCD */ /* EOF */ > >@@ -1107,14 +1108,14 @@ > if (_vcd_pbc_available (p_obj)) > { > _dict_insert (p_obj, "lot", LOT_VCD_SECTOR, LOT_VCD_SIZE, SM_EOF); /* LOT.VCD */ /* EOF */ >- _dict_insert (p_obj, "psd", PSD_VCD_SECTOR, >+ _dict_insert (p_obj, "psd", PSD_VCD_SECTOR, > _vcd_len2blocks (get_psd_size (p_obj, false), ISO_BLOCKSIZE), SM_EOF); /* PSD.VCD */ /* EOF */ > } > > if (_vcd_obj_has_cap_p (p_obj, _CAP_4C_SVCD)) > { > _dict_insert (p_obj, "tracks", SECTOR_NIL, 1, SM_EOF); /* TRACKS.SVD */ >- _dict_insert (p_obj, "search", SECTOR_NIL, >+ _dict_insert (p_obj, "search", SECTOR_NIL, > _vcd_len2blocks (get_search_dat_size (p_obj), ISO_BLOCKSIZE), SM_EOF); /* SEARCH.DAT */ > > vcd_assert (_dict_get_bykey (p_obj, "tracks")->sector > INFO_VCD_SECTOR); >@@ -1123,13 +1124,13 @@ > > /* done with primary information area */ > >- p_obj->mpeg_segment_start_extent = >+ p_obj->mpeg_segment_start_extent = > _vcd_len2blocks (_vcd_salloc_get_highest (p_obj->iso_bitmap) + 1, 75) * 75; > > /* salloc up to end of vcd sector */ >- for(n = 0;n < p_obj->mpeg_segment_start_extent;n++) >+ for(n = 0;n < p_obj->mpeg_segment_start_extent;n++) > _vcd_salloc (p_obj->iso_bitmap, n, 1); >- >+ > vcd_assert (_vcd_salloc_get_highest (p_obj->iso_bitmap) + 1 == p_obj->mpeg_segment_start_extent); > > /* insert segments */ >@@ -1137,14 +1138,14 @@ > _CDIO_LIST_FOREACH (p_node, p_obj->mpeg_segment_list) > { > mpeg_segment_t *_segment = _cdio_list_node_data (p_node); >- >- _segment->start_extent = >- _vcd_salloc (p_obj->iso_bitmap, SECTOR_NIL, >+ >+ _segment->start_extent = >+ _vcd_salloc (p_obj->iso_bitmap, SECTOR_NIL, > _segment->segment_count * VCDINFO_SEGMENT_SECTOR_SIZE); > > vcd_assert (_segment->start_extent % 75 == 0); >- vcd_assert (_vcd_salloc_get_highest (p_obj->iso_bitmap) + 1 >- == _segment->start_extent >+ vcd_assert (_vcd_salloc_get_highest (p_obj->iso_bitmap) + 1 >+ == _segment->start_extent > + _segment->segment_count * VCDINFO_SEGMENT_SECTOR_SIZE); > } > >@@ -1156,7 +1157,7 @@ > > if (_vcd_obj_has_cap_p (p_obj, _CAP_4C_SVCD)) > { >- _dict_insert (p_obj, "scandata", SECTOR_NIL, >+ _dict_insert (p_obj, "scandata", SECTOR_NIL, > _vcd_len2blocks (get_scandata_dat_size (p_obj), > ISO_BLOCKSIZE), > SM_EOF); >@@ -1166,9 +1167,9 @@ > &&_vcd_pbc_available (p_obj)) > { > _dict_insert (p_obj, "lot_x", SECTOR_NIL, LOT_VCD_SIZE, SM_EOF); >- >+ > _dict_insert (p_obj, "psd_x", SECTOR_NIL, >- _vcd_len2blocks (get_psd_size (p_obj, true), >+ _vcd_len2blocks (get_psd_size (p_obj, true), > ISO_BLOCKSIZE), SM_EOF); > } > >@@ -1181,7 +1182,7 @@ > _CDIO_LIST_FOREACH (p_node, p_obj->custom_file_list) > { > custom_file_t *p = _cdio_list_node_data (p_node); >- >+ > if (p->sectors) > { > p->start_extent = >@@ -1198,8 +1199,8 @@ > p_obj->iso_size = > MAX (MIN_ISO_SIZE, _vcd_salloc_get_highest (p_obj->iso_bitmap) + 1); > >- vcd_debug ("iso9660: highest alloced sector is %lu (using %d as isosize)", >- (unsigned long int) _vcd_salloc_get_highest (p_obj->iso_bitmap), >+ vcd_debug ("iso9660: highest alloced sector is %lu (using %d as isosize)", >+ (unsigned long int) _vcd_salloc_get_highest (p_obj->iso_bitmap), > p_obj->iso_size); > > /* after this point the ISO9660's size is frozen */ >@@ -1229,21 +1230,21 @@ > if (_cdio_list_length (p_obj->mpeg_segment_list)) > _vcd_directory_mkdir (p_obj->dir, "SEGMENT"); > >- _vcd_directory_mkfile (p_obj->dir, "VCD/ENTRIES.VCD", >- _dict_get_bykey (p_obj, "entries")->sector, >- ISO_BLOCKSIZE, false, 0); >+ _vcd_directory_mkfile (p_obj->dir, "VCD/ENTRIES.VCD", >+ _dict_get_bykey (p_obj, "entries")->sector, >+ ISO_BLOCKSIZE, false, 0); > _vcd_directory_mkfile (p_obj->dir, "VCD/INFO.VCD", >- _dict_get_bykey (p_obj, "info")->sector, >+ _dict_get_bykey (p_obj, "info")->sector, > ISO_BLOCKSIZE, false, 0); > > /* only for vcd2.0 */ > if (_vcd_pbc_available (p_obj)) > { >- _vcd_directory_mkfile (p_obj->dir, "VCD/LOT.VCD", >- _dict_get_bykey (p_obj, "lot")->sector, >+ _vcd_directory_mkfile (p_obj->dir, "VCD/LOT.VCD", >+ _dict_get_bykey (p_obj, "lot")->sector, > ISO_BLOCKSIZE*LOT_VCD_SIZE, false, 0); >- _vcd_directory_mkfile (p_obj->dir, "VCD/PSD.VCD", >- _dict_get_bykey (p_obj, "psd")->sector, >+ _vcd_directory_mkfile (p_obj->dir, "VCD/PSD.VCD", >+ _dict_get_bykey (p_obj, "psd")->sector, > get_psd_size (p_obj, false), false, 0); > } > break; >@@ -1267,27 +1268,27 @@ > _vcd_directory_mkdir (p_obj->dir, "SVCD"); > > _vcd_directory_mkfile (p_obj->dir, "SVCD/ENTRIES.SVD", >- _dict_get_bykey (p_obj, "entries")->sector, >- ISO_BLOCKSIZE, false, 0); >+ _dict_get_bykey (p_obj, "entries")->sector, >+ ISO_BLOCKSIZE, false, 0); > _vcd_directory_mkfile (p_obj->dir, "SVCD/INFO.SVD", >- _dict_get_bykey (p_obj, "info")->sector, >+ _dict_get_bykey (p_obj, "info")->sector, > ISO_BLOCKSIZE, false, 0); > > if (_vcd_pbc_available (p_obj)) > { > _vcd_directory_mkfile (p_obj->dir, "SVCD/LOT.SVD", >- _dict_get_bykey (p_obj, "lot")->sector, >+ _dict_get_bykey (p_obj, "lot")->sector, > ISO_BLOCKSIZE*LOT_VCD_SIZE, false, 0); >- _vcd_directory_mkfile (p_obj->dir, "SVCD/PSD.SVD", >- _dict_get_bykey (p_obj, "psd")->sector, >+ _vcd_directory_mkfile (p_obj->dir, "SVCD/PSD.SVD", >+ _dict_get_bykey (p_obj, "psd")->sector, > get_psd_size (p_obj, false), false, 0); > } > >- _vcd_directory_mkfile (p_obj->dir, "SVCD/SEARCH.DAT", >- _dict_get_bykey (p_obj, "search")->sector, >+ _vcd_directory_mkfile (p_obj->dir, "SVCD/SEARCH.DAT", >+ _dict_get_bykey (p_obj, "search")->sector, > get_search_dat_size (p_obj), false, 0); > _vcd_directory_mkfile (p_obj->dir, "SVCD/TRACKS.SVD", >- _dict_get_bykey (p_obj, "tracks")->sector, >+ _dict_get_bykey (p_obj, "tracks")->sector, > ISO_BLOCKSIZE, false, 0); > break; > >@@ -1306,7 +1307,7 @@ > const char *fmt = NULL; > uint8_t fnum = 0; > >- switch (p_obj->type) >+ switch (p_obj->type) > { > case VCD_TYPE_VCD2: > fmt = "SEGMENT/ITEM%4.4d.DAT"; >@@ -1320,10 +1321,10 @@ > default: > vcd_assert_not_reached (); > } >- >+ > snprintf (segment_pathname, sizeof (segment_pathname), fmt, n); >- >- _vcd_directory_mkfile (p_obj->dir, segment_pathname, >+ >+ _vcd_directory_mkfile (p_obj->dir, segment_pathname, > segment->start_extent, > segment->info->packets * ISO_BLOCKSIZE, > true, fnum); >@@ -1340,12 +1341,12 @@ > { > /* psd_x -- extended PSD */ > _vcd_directory_mkfile (p_obj->dir, "EXT/PSD_X.VCD", >- _dict_get_bykey (p_obj, "psd_x")->sector, >+ _dict_get_bykey (p_obj, "psd_x")->sector, > get_psd_size (p_obj, true), false, 1); > > /* lot_x -- extended LOT */ > _vcd_directory_mkfile (p_obj->dir, "EXT/LOT_X.VCD", >- _dict_get_bykey (p_obj, "lot_x")->sector, >+ _dict_get_bykey (p_obj, "lot_x")->sector, > ISO_BLOCKSIZE*LOT_VCD_SIZE, false, 1); > > vcd_assert (p_obj->type == VCD_TYPE_VCD2); >@@ -1355,7 +1356,7 @@ > { > /* scandata.dat -- scanpoints */ > _vcd_directory_mkfile (p_obj->dir, "EXT/SCANDATA.DAT", >- _dict_get_bykey (p_obj, "scandata")->sector, >+ _dict_get_bykey (p_obj, "scandata")->sector, > get_scandata_dat_size (p_obj), false, 0); > } > >@@ -1371,9 +1372,9 @@ > custom_file_t *p = _cdio_list_node_data (p_node); > > _vcd_directory_mkfile (p_obj->dir, p->iso_pathname, p->start_extent, >- (p->raw_flag >+ (p->raw_flag > ? (ISO_BLOCKSIZE * (p->size / M2RAW_SECTOR_SIZE)) >- : p->size), >+ : p->size), > p->raw_flag, 1); > } > >@@ -1386,10 +1387,10 @@ > mpeg_sequence_t *p_sequence = _cdio_list_node_data (p_node); > uint32_t extent = p_sequence->relative_start_extent; > uint8_t file_num = 0; >- >+ > extent += p_obj->iso_size; > >- switch (p_obj->type) >+ switch (p_obj->type) > { > case VCD_TYPE_VCD: > fmt = "MPEGAV/MUSIC%2.2d.DAT"; >@@ -1412,19 +1413,19 @@ > fmt = "MPEGAV/AVSEQ%2.2d.MPG"; > file_num = n + 1; > } >- >+ > break; > default: > vcd_assert_not_reached (); > } > > vcd_assert (n < 98); >- >+ > snprintf (avseq_pathname, sizeof (avseq_pathname), fmt, n + 1); >- >+ > /* file entry contains front margin, mpeg stream and rear margin */ > _vcd_directory_mkfile (p_obj->dir, avseq_pathname, extent, >- (p_obj->track_front_margin >+ (p_obj->track_front_margin > + p_sequence->info->packets > + p_obj->track_rear_margin) * ISO_BLOCKSIZE, > true, file_num); >@@ -1435,33 +1436,33 @@ > /* register isofs dir structures */ > { > uint32_t dirs_size = _vcd_directory_get_size (p_obj->dir); >- >+ > /* be sure to stay out of information areas */ > >- switch (p_obj->type) >+ switch (p_obj->type) > { > case VCD_TYPE_VCD: > case VCD_TYPE_VCD11: > case VCD_TYPE_VCD2: > /* karaoke area starts at 03:00 */ >- if (16 + 2 + dirs_size + 2 >= 75) >+ if (16 + 2 + dirs_size + 2 >= 75) > vcd_error ("directory section to big for a VCD"); > break; > > case VCD_TYPE_SVCD: > case VCD_TYPE_HQVCD: > /* since no karaoke exists the next fixed area starts at 04:00 */ >- if (16 + 2 + dirs_size + 2 >= 150) >+ if (16 + 2 + dirs_size + 2 >= 150) > vcd_error ("directory section to big for a SVCD"); > break; > default: > vcd_assert_not_reached (); > } >- >+ > /* un-alloc small area */ >- >+ > _vcd_salloc_free (p_obj->iso_bitmap, 18, dirs_size + 2); >- >+ > /* alloc it again! */ > > _dict_insert (p_obj, "dir", 18, dirs_size, SM_EOR|SM_EOF); >@@ -1492,7 +1493,7 @@ > progress_info_t _pi; > > _pi.sectors_written = p_obj->sectors_written; >- _pi.total_sectors = p_obj->relative_end_extent + p_obj->iso_size; >+ _pi.total_sectors = p_obj->relative_end_extent + p_obj->iso_size; > _pi.in_track = p_obj->in_track; > _pi.total_tracks = _cdio_list_length (p_obj->mpeg_sequence_list) + 1; > >@@ -1504,7 +1505,7 @@ > > static int > _write_m2_image_sector (VcdObj_t *obj, const void *data, uint32_t extent, >- uint8_t fnum, uint8_t cnum, uint8_t sm, uint8_t ci) >+ uint8_t fnum, uint8_t cnum, uint8_t sm, uint8_t ci) > { > char buf[CDIO_CD_FRAMESIZE_RAW] = { 0, }; > >@@ -1513,7 +1514,7 @@ > _vcd_make_mode2(buf, data, extent, fnum, cnum, sm, ci); > > vcd_image_sink_write (obj->image_sink, buf, extent); >- >+ > obj->sectors_written++; > > return _callback_wrapper (obj, false); >@@ -1536,7 +1537,7 @@ > } > > static void >-_write_source_mode2_raw (VcdObj_t *obj, VcdDataSource_t *source, >+_write_source_mode2_raw (VcdObj_t *obj, VcdDataSource_t *source, > uint32_t extent) > { > int n; >@@ -1544,7 +1545,7 @@ > > sectors = vcd_data_source_stat (source) / M2RAW_SECTOR_SIZE; > >- vcd_data_source_seek (source, 0); >+ vcd_data_source_seek (source, 0); > > for (n = 0;n < sectors;n++) { > char buf[M2RAW_SECTOR_SIZE] = { 0, }; >@@ -1559,7 +1560,7 @@ > } > > static void >-_write_source_mode2_form1 (VcdObj_t *obj, VcdDataSource_t *source, >+_write_source_mode2_form1 (VcdObj_t *obj, VcdDataSource_t *source, > uint32_t extent) > { > int n; >@@ -1573,19 +1574,19 @@ > if (!last_block_size) > last_block_size = CDIO_CD_FRAMESIZE; > >- vcd_data_source_seek (source, 0); >+ vcd_data_source_seek (source, 0); > > for (n = 0;n < sectors;n++) { > char buf[CDIO_CD_FRAMESIZE] = { 0, }; > >- vcd_data_source_read (source, buf, >- ((n + 1 == sectors) >+ vcd_data_source_read (source, buf, >+ ((n + 1 == sectors) > ? last_block_size > : CDIO_CD_FRAMESIZE), 1); > >- if (_write_m2_image_sector (obj, buf, extent+n, 1, 0, >- ((n+1 < sectors) >- ? SM_DATA >+ if (_write_m2_image_sector (obj, buf, extent+n, 1, 0, >+ ((n+1 < sectors) >+ ? SM_DATA > : SM_DATA |SM_EOF), > 0)) > break; >@@ -1597,7 +1598,7 @@ > static int > _write_sequence (VcdObj_t *p_obj, int track_idx) > { >- mpeg_sequence_t *track = >+ mpeg_sequence_t *track = > _cdio_list_node_data (_vcd_list_at (p_obj->mpeg_sequence_list, track_idx)); > CdioListNode_t *pause_node; > int n, lastsect = p_obj->sectors_written; >@@ -1631,7 +1632,7 @@ > case MPEG_NORM_NTSC_S: > norm_str = strdup ("NTSC 2/3 D1 (480x480/29.97fps)"); > break; >- >+ > case MPEG_NORM_OTHER: > { > char buf[1024] = { 0, }; >@@ -1674,17 +1675,17 @@ > 0 > }; > >- int i_buf = snprintf (buf, sizeof (buf), >- "audio[%d]: l%d/%2.1fkHz/%dkbps/%s ", >+ int i_buf = snprintf (buf, sizeof (buf), >+ "audio[%d]: l%d/%2.1fkHz/%dkbps/%s ", > i, > track->info->ahdr[i].layer, > track->info->ahdr[i].sampfreq / 1000.0, > track->info->ahdr[i].bitrate / 1024, > _mode_str[track->info->ahdr[i].mode]); >- >+ > strncat (buf2, buf, sizeof(buf2)-strlen(buf2)-i_buf2-1); > i_buf2 += i_buf; >- } >+ } > > vcd_info ("writing track %d, %s, %s, %s...", track_idx + 2, > (track->info->version == MPEG_VERS_MPEG1 ? "MPEG1" : "MPEG2"), >@@ -1708,7 +1709,7 @@ > struct vcd_mpeg_packet_info pkt_flags; > bool set_trigger = false; > >- vcd_mpeg_source_get_packet (track->source, n, buf, &pkt_flags, >+ vcd_mpeg_source_get_packet (track->source, n, buf, &pkt_flags, > p_obj->update_scan_offsets); > > while (pause_node) >@@ -1724,13 +1725,13 @@ > /* seems it's time to trigger! */ > set_trigger = true; > >- vcd_debug ("setting auto pause trigger for time %f (pts %f) @%d", >+ vcd_debug ("setting auto pause trigger for time %f (pts %f) @%d", > _pause->time, pkt_flags.pts, n); > > pause_node = _cdio_list_node_next (pause_node); > } > >- switch (vcd_mpeg_packet_get_type (&pkt_flags)) >+ switch (vcd_mpeg_packet_get_type (&pkt_flags)) > { > case PKT_TYPE_VIDEO: > mpeg_packets.video++; >@@ -1745,7 +1746,7 @@ > ci = CI_OGT; > cnum = CN_OGT; > break; >- >+ > case PKT_TYPE_AUDIO: > mpeg_packets.audio++; > sm = SM_FORM2|SM_REALT|SM_AUDIO; >@@ -1791,9 +1792,9 @@ > sm |= SM_TRIG; > > fnum = track_idx + 1; >- >+ > if (_vcd_obj_has_cap_p (p_obj, _CAP_4C_SVCD) >- && !p_obj->svcd_vcd3_mpegav) /* IEC62107 SVCDs have a >+ && !p_obj->svcd_vcd3_mpegav) /* IEC62107 SVCDs have a > simplified subheader */ > { > fnum = 1; >@@ -1850,14 +1851,14 @@ > bool _need_eor = false; > > vcd_mpeg_source_get_packet (p_segment->source, packet_no, >- buf, &pkt_flags, >+ buf, &pkt_flags, > p_obj->update_scan_offsets); > > fn = 1; > cn = CN_EMPTY; > sm = SM_FORM2 | SM_REALT; > ci = CI_EMPTY; >- >+ > while (pause_node) > { > pause_t *_pause = _cdio_list_node_data (pause_node); >@@ -1871,13 +1872,13 @@ > /* seems it's time to trigger! */ > set_trigger = true; > >- vcd_debug ("setting auto pause trigger for time %f (pts %f) @%d", >+ vcd_debug ("setting auto pause trigger for time %f (pts %f) @%d", > _pause->time, pkt_flags.pts, n); > > pause_node = _cdio_list_node_next (pause_node); > } >- >- switch (vcd_mpeg_packet_get_type (&pkt_flags)) >+ >+ switch (vcd_mpeg_packet_get_type (&pkt_flags)) > { > case PKT_TYPE_VIDEO: > sm = SM_FORM2 | SM_REALT | SM_VIDEO; >@@ -1893,7 +1894,7 @@ > if (pkt_flags.video[1] || pkt_flags.video[2]) > { /* search for endcode -- hack */ > int idx; >- >+ > for (idx = 0; idx <= 2320; idx++) > if (buf[idx] == 0x00 > && buf[idx + 1] == 0x00 >@@ -1908,7 +1909,7 @@ > > case PKT_TYPE_AUDIO: > sm = SM_FORM2 | SM_REALT | SM_AUDIO; >- >+ > ci = CI_AUDIO; > cn = CN_AUDIO; > break; >@@ -1938,7 +1939,7 @@ > > if (_need_eor) > { >- vcd_debug ("setting EOR for SeqEnd at packet# %d ('%s')", >+ vcd_debug ("setting EOR for SeqEnd at packet# %d ('%s')", > packet_no, p_segment->id); > sm |= SM_EOR; > } >@@ -1959,7 +1960,7 @@ > } > > _write_m2_image_sector (p_obj, buf, n, fn, cn, sm, ci); >- >+ > n++; > } > >@@ -1984,7 +1985,7 @@ > _CDIO_LIST_FOREACH (p_node, _mpeg_info->shdr[0].aps_list) > { > struct aps_data *_aps = _cdio_list_node_data (p_node); >- >+ > if (first) > { > best_aps = *_aps; >@@ -1992,7 +1993,7 @@ > } > else if (fabs (_aps->timestamp - t) < fabs (best_aps.timestamp - t)) > best_aps = *_aps; >- else >+ else > break; > } > >@@ -2042,29 +2043,29 @@ > int n; > > /* generate dir sectors */ >- >- _vcd_directory_dump_entries (p_obj->dir, >- _dict_get_bykey (p_obj, "dir")->buf, >+ >+ _vcd_directory_dump_entries (p_obj->dir, >+ _dict_get_bykey (p_obj, "dir")->buf, > _dict_get_bykey (p_obj, "dir")->sector); > >- _vcd_directory_dump_pathtables (p_obj->dir, >- _dict_get_bykey (p_obj, "ptl")->buf, >+ _vcd_directory_dump_pathtables (p_obj->dir, >+ _dict_get_bykey (p_obj, "ptl")->buf, > _dict_get_bykey (p_obj, "ptm")->buf); >- >+ > /* generate PVD and EVD at last... */ > iso9660_set_pvd (_dict_get_bykey (p_obj, "pvd")->buf, >- p_obj->iso_volume_label, >+ p_obj->iso_volume_label, > p_obj->iso_publisher_id, > p_obj->iso_preparer_id, >- p_obj->iso_application_id, >- p_obj->iso_size, >- _dict_get_bykey (p_obj, "dir")->buf, >+ p_obj->iso_application_id, >+ p_obj->iso_size, >+ _dict_get_bykey (p_obj, "dir")->buf, > _dict_get_bykey (p_obj, "ptl")->sector, > _dict_get_bykey (p_obj, "ptm")->sector, > iso9660_pathtable_get_size (_dict_get_bykey (p_obj, "ptm")->buf), > p_create_time > ); >- >+ > iso9660_set_evd (_dict_get_bykey (p_obj, "evd")->buf); > > /* fill VCD relevant files with data */ >@@ -2081,7 +2082,7 @@ > } > > _vcd_pbc_check_unreferenced (p_obj); >- >+ > set_lot_vcd (p_obj, _dict_get_bykey (p_obj, "lot")->buf, false); > set_psd_vcd (p_obj, _dict_get_bykey (p_obj, "psd")->buf, false); > } >@@ -2105,7 +2106,7 @@ > > content = _dict_get_sector (p_obj, n); > flags |= _dict_get_sector_flags (p_obj, n); >- >+ > if (content == NULL) > content = zero; > >@@ -2137,33 +2138,33 @@ > > content = _dict_get_sector (p_obj, n); > flags |= _dict_get_sector_flags (p_obj, n); >- >+ > if (content == NULL) > { > vcd_debug ("unexpected empty EXT sector"); > content = zero; > } >- >+ > _write_m2_image_sector (p_obj, content, n, fileno, 0, flags, 0); > } > > /* write custom files */ > > vcd_assert (n == p_obj->custom_file_start_extent); >- >+ > _CDIO_LIST_FOREACH (node, p_obj->custom_file_list) > { > custom_file_t *p = _cdio_list_node_data (node); >- >- vcd_info ("writing file `%s' (%lu bytes%s)", >- p->iso_pathname, (unsigned long) p->size, >+ >+ vcd_info ("writing file `%s' (%lu bytes%s)", >+ p->iso_pathname, (unsigned long) p->size, > p->raw_flag ? ", raw sectors file": ""); > if (p->raw_flag) > _write_source_mode2_raw (p_obj, p->file, p->start_extent); > else > _write_source_mode2_form1 (p_obj, p->file, p->start_extent); > } >- >+ > /* blank unalloced tracks */ > while ((n = _vcd_salloc (p_obj->iso_bitmap, SECTOR_NIL, 1)) < p_obj->iso_size) > _write_m2_image_sector (p_obj, zero, n, 0, 0, SM_DATA, 0); >@@ -2178,8 +2179,8 @@ > long size_sectors = -1; > > vcd_assert (!p_obj->in_output); >- >- if (_cdio_list_length (p_obj->mpeg_sequence_list) > 0) >+ >+ if (_cdio_list_length (p_obj->mpeg_sequence_list) > 0) > { > /* fixme -- make this efficient */ > size_sectors = vcd_obj_begin_output (p_obj); >@@ -2218,7 +2219,7 @@ > image_size += p_obj->leadout_pregap; > > if (image_size > CDIO_CD_MAX_SECTORS) >- vcd_error ("image too big (%d sectors > %d sectors)", >+ vcd_error ("image too big (%d sectors > %d sectors)", > (unsigned) image_size, (unsigned) CDIO_CD_MAX_SECTORS); > > { >@@ -2226,7 +2227,7 @@ > > if (image_size > CDIO_CD_74MIN_SECTORS) > vcd_warn ("generated image (%d sectors [%s]) may not fit " >- "on 74min CDRs (%d sectors)", >+ "on 74min CDRs (%d sectors)", > (unsigned) image_size, _tmp, (unsigned) CDIO_CD_74MIN_SECTORS); > > free (_tmp); >@@ -2248,7 +2249,7 @@ > _vcd_salloc_destroy (p_obj->iso_bitmap); > > _dict_clean (p_obj); >- _cdio_list_free (p_obj->buffer_dict_list, true); >+ _cdio_list_free (p_obj->buffer_dict_list, true, NULL); > } > > int >@@ -2268,7 +2269,7 @@ > vcd_error ("item id (%s) exists already", p_pbc->item_id); > return -1; > } >- >+ > _cdio_list_append (p_obj->pbc_list, p_pbc); > > return 0; >@@ -2305,14 +2306,14 @@ > mpeg_sequence_t *p_track = _cdio_list_node_data (node); > CdioListNode_t *p_entry_node; > >- _cdio_list_append (p_cue_list, >+ _cdio_list_append (p_cue_list, > (p_cue = calloc(1, sizeof (vcd_cue_t)))); >- >+ > p_cue->lsn = p_track->relative_start_extent + p_obj->iso_size; > p_cue->lsn -= p_obj->track_pregap; > p_cue->type = VCD_CUE_PREGAP_START; > >- _cdio_list_append (p_cue_list, >+ _cdio_list_append (p_cue_list, > (p_cue = calloc(1, sizeof (vcd_cue_t)))); > > p_cue->lsn = p_track->relative_start_extent + p_obj->iso_size; >@@ -2322,9 +2323,9 @@ > { > entry_t *_entry = _cdio_list_node_data (p_entry_node); > >- _cdio_list_append (p_cue_list, >+ _cdio_list_append (p_cue_list, > (p_cue = calloc(1, sizeof (vcd_cue_t)))); >- >+ > p_cue->lsn = p_obj->iso_size; > p_cue->lsn += p_track->relative_start_extent; > p_cue->lsn += p_obj->track_front_margin; >@@ -2348,7 +2349,7 @@ > > vcd_image_sink_set_cuesheet (p_image_sink, p_cue_list); > >- _cdio_list_free (p_cue_list, true); >+ _cdio_list_free (p_cue_list, true, NULL); > } > > /* and now for the pay load */ >@@ -2364,7 +2365,7 @@ > p_obj->progress_callback = callback; > p_obj->callback_user_data = user_data; > p_obj->image_sink = p_image_sink; >- >+ > if (_callback_wrapper (p_obj, true)) > return 1; > >@@ -2393,7 +2394,7 @@ > int n, lastsect = p_obj->sectors_written; > > vcd_debug ("writting post-gap ('leadout pregap')..."); >- >+ > for (n = 0; n < p_obj->leadout_pregap; n++) > _write_m2_image_sector (p_obj, zero, lastsect++, 0, 0, SM_FORM2, 0); > } >@@ -2402,12 +2403,12 @@ > return 1; > > p_obj->image_sink = NULL; >- >+ > vcd_image_sink_destroy (p_image_sink); > > return 0; /* ok */ > } >-} >+} > > const char * > vcd_version_string (bool full_text) >@@ -2427,8 +2428,8 @@ > "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"); > } > >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/lib/vcd.h vcdimager-0.7.24/lib/vcd.h >--- vcdimager-0.7.24.ORIG/lib/vcd.h 2005-06-09 02:53:23.000000000 +0200 >+++ vcdimager-0.7.24/lib/vcd.h 2018-01-02 16:27:31.322936065 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > /* libvcd main header */ > > #ifndef __VCD_H__ >@@ -37,7 +37,7 @@ > /** allocates and initializes a new VideoCD object */ > VcdObj_t * > vcd_obj_new (vcd_type_t vcd_type); >- >+ > /** VideoCD parameters */ > typedef enum { > VCD_PARM_INVALID = 0, >@@ -63,74 +63,74 @@ > VCD_PARM_TRACK_FRONT_MARGIN, /**< unsigned [0..150] */ > VCD_PARM_TRACK_REAR_MARGIN /**< unsigned [0..150] */ > } vcd_parm_t; >- >+ > /** sets VideoCD parameter */ >- int >+ int > vcd_obj_set_param_uint (VcdObj_t *p_vcdobj, vcd_parm_t param, unsigned arg); > >- int >- vcd_obj_set_param_str (VcdObj_t *p_vcdobj, vcd_parm_t param, >+ int >+ vcd_obj_set_param_str (VcdObj_t *p_vcdobj, vcd_parm_t param, > const char *p_arg); >- >- int >+ >+ int > vcd_obj_set_param_bool (VcdObj_t *p_vcdobj, vcd_parm_t param, bool arg); >- >+ > /** add custom files; if raw_flag set, the data source has to > include a mode2 subheader, and thus needs to be a multiple of 2336 > byte blocksize */ > int > vcd_obj_add_file (VcdObj_t *p_vcdobj, const char iso_pathname[], > VcdDataSource_t *p_file, bool raw_flag); >- >+ > int > vcd_obj_add_dir (VcdObj_t *p_vcdobj, const char iso_pathname[]); >- >- /* this is for actually adding mpeg items to VCD, returns >+ >+ /* this is for actually adding mpeg items to VCD, returns > a negative value for error.. */ >- >- int >- vcd_obj_append_sequence_play_item (VcdObj_t *p_vcdobj, >- VcdMpegSource_t *p_mpeg_source, >- const char item_id[], >+ >+ int >+ vcd_obj_append_sequence_play_item (VcdObj_t *p_vcdobj, >+ VcdMpegSource_t *p_mpeg_source, >+ const char item_id[], > const char default_entry_id[]); >- >- int >- vcd_obj_add_sequence_entry (VcdObj_t *p_vcdobj, const char sequence_id[], >+ >+ int >+ vcd_obj_add_sequence_entry (VcdObj_t *p_vcdobj, const char sequence_id[], > double entry_time, const char entry_id[]); >- >- int >- vcd_obj_add_sequence_pause (VcdObj_t *p_vcdobj, const char sequence_id[], >+ >+ int >+ vcd_obj_add_sequence_pause (VcdObj_t *p_vcdobj, const char sequence_id[], > double pause_timestamp, const char pause_id[]); >- >- int >- vcd_obj_add_segment_pause (VcdObj_t *p_vcdobj, const char segment_id[], >+ >+ int >+ vcd_obj_add_segment_pause (VcdObj_t *p_vcdobj, const char segment_id[], > double pause_timestamp, const char pause_id[]); >- >- int >- vcd_obj_append_segment_play_item (VcdObj_t *p_vcdobj, >- VcdMpegSource_t *mpeg_source, >+ >+ int >+ vcd_obj_append_segment_play_item (VcdObj_t *p_vcdobj, >+ VcdMpegSource_t *mpeg_source, > const char item_id[]); >- >+ > /** warning -- api will change for pbc */ > typedef struct _pbc_t pbc_t; >- >+ > int > vcd_obj_append_pbc_node (VcdObj_t *p_vcdobj, struct _pbc_t *p_pbc); >- >+ > /** removes item (sequence, entry, segment, ...) by id, returns > negative value on error */ >- int >+ int > vcd_obj_remove_item (VcdObj_t *p_vcdobj, const char id[]); >- >+ > /** returns image size in sectors */ >- long >+ long > vcd_obj_get_image_size (VcdObj_t *p_vcdobj); >- >+ > /** this one is to be called when every parameter has been set and the > image is about to be written. returns sectors to be written... */ >- long >+ long > vcd_obj_begin_output (VcdObj_t *p_vcdobj); >- >+ > /** callback hook called every few (>|<) iterations, if it returns a > value != 0 the writing process gets aborted */ > typedef struct >@@ -141,37 +141,37 @@ > int total_tracks; > } > progress_info_t; >- >+ > typedef int (*progress_callback_t) (const progress_info_t *progress_info, > void *user_data); >- >+ > /** writes the actual bin image file; a return value != 0 means the > action was aborted by user or some other error has occured... */ > int > vcd_obj_write_image (VcdObj_t *p_vcdobj, VcdImageSink_t *p_image_sink, > progress_callback_t callback, void *p_user_data, > const time_t *p_create_time); >- >- /** this should be called writing the bin and/or cue file is done---even if >+ >+ /** this should be called writing the bin and/or cue file is done---even if > an error occurred */ >- void >+ void > vcd_obj_end_output (VcdObj_t *p_vcdobj); >- >+ > /** destructor for VideoCD objects; call this to destory a VideoCD > object created by vcd_obj_new () */ >- void >+ void > vcd_obj_destroy (VcdObj_t *p_vcdobj); >- >+ > const char * > vcd_version_string (bool full_text); >- >+ > #ifdef __cplusplus > } > #endif /* __cplusplus */ > > #endif /* __VCD_H__ */ >- >-/* >+ >+/* > * Local variables: > * c-file-style: "gnu" > * tab-width: 8 >diff -ur vcdimager-0.7.24.ORIG/lib/vcd_read.c vcdimager-0.7.24/lib/vcd_read.c >--- vcdimager-0.7.24.ORIG/lib/vcd_read.c 2005-08-03 10:25:19.000000000 +0200 >+++ vcdimager-0.7.24/lib/vcd_read.c 2018-01-02 16:27:31.304936066 +0100 >@@ -19,7 +19,7 @@ > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ > >- >+ > #include "vcd_read.h" > #include "vcd_assert.h" > #include <libvcd/inf.h> >@@ -30,19 +30,19 @@ > #include <string.h> > #endif > >-bool >-read_pvd(CdIo_t *cdio, iso9660_pvd_t *pvd) >+bool >+read_pvd(CdIo_t *cdio, iso9660_pvd_t *pvd) > { > if (cdio_read_mode2_sector (cdio, pvd, ISO_PVD_SECTOR, false)) { > vcd_error ("error reading PVD sector (%d)", ISO_PVD_SECTOR); > return false; > } >- >+ > if (pvd->type != ISO_VD_PRIMARY) { > vcd_error ("unexpected PVD type %d", pvd->type); > return false; > } >- >+ > if (memcmp (pvd->id, ISO_STANDARD_ID, sizeof (ISO_STANDARD_ID))) > { > vcd_error ("unexpected ID encountered (expected `" >@@ -52,8 +52,8 @@ > return true; > } > >-bool >-read_entries(CdIo_t *cdio, EntriesVcd_t *entries) >+bool >+read_entries(CdIo_t *cdio, EntriesVcd_t *entries) > { > if (cdio_read_mode2_sector (cdio, entries, ENTRIES_VCD_SECTOR, false)) { > vcd_error ("error reading Entries sector (%d)", ENTRIES_VCD_SECTOR); >@@ -73,8 +73,8 @@ > } > } > >-bool >-read_info(CdIo_t *cdio, InfoVcd_t *info, vcd_type_t *vcd_type) >+bool >+read_info(CdIo_t *cdio, InfoVcd_t *info, vcd_type_t *vcd_type) > { > if (cdio_read_mode2_sector (cdio, info, INFO_VCD_SECTOR, false)) { > vcd_warn ("error reading Info sector (%d)", INFO_VCD_SECTOR); >diff -ur vcdimager-0.7.24.ORIG/lib/vcd_read.h vcdimager-0.7.24/lib/vcd_read.h >--- vcdimager-0.7.24.ORIG/lib/vcd_read.h 2005-04-28 12:19:47.000000000 +0200 >+++ vcdimager-0.7.24/lib/vcd_read.h 2018-01-02 16:33:10.463917377 +0100 >@@ -22,6 +22,8 @@ > # include "config.h" > #endif > >+/* We don't want to pull in cdio's config */ >+#define __CDIO_CONFIG_H__ > #include <cdio/cdio.h> > #include <cdio/iso9660.h> > >diff -ur vcdimager-0.7.24.ORIG/test/check_bitfield.c vcdimager-0.7.24/test/check_bitfield.c >--- vcdimager-0.7.24.ORIG/test/check_bitfield.c 2005-05-07 13:04:28.000000000 +0200 >+++ vcdimager-0.7.24/test/check_bitfield.c 2018-01-02 16:27:31.296936067 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >@@ -304,7 +304,7 @@ > > if (u->byte != InfoSpiContents_table[i].intval) > { >- printf ("failed at index %d (%.2x != %.2x)\n", >+ printf ("failed at index %d (%.2x != %.2x)\n", > i, u->byte, InfoSpiContents_table[i].intval); > return 1; > } >diff -ur vcdimager-0.7.24.ORIG/test/check_common_fn.in vcdimager-0.7.24/test/check_common_fn.in >--- vcdimager-0.7.24.ORIG/test/check_common_fn.in 2003-11-10 12:57:53.000000000 +0100 >+++ vcdimager-0.7.24/test/check_common_fn.in 2018-01-02 17:34:21.859595100 +0100 >@@ -6,8 +6,10 @@ > if cksum "$NAME" | ( > read CRC2 SIZE2 NAME2 > >- if [ "$CRC" != "$CRC2" ]; then >- echo "$0: CRC didn't match for $NAME ($CRC != $CRC2)" >+ if [ "$CRC" != "$CRC2" ] ; then >+ if [ 'quiet' != "$1" ] ; then >+ echo "$0: CRC didn't match for $NAME ($CRC != $CRC2)" >+ fi > return 0; > fi > >diff -ur vcdimager-0.7.24.ORIG/test/check_nrg.sh vcdimager-0.7.24/test/check_nrg.sh >--- vcdimager-0.7.24.ORIG/test/check_nrg.sh 2005-05-07 02:44:24.000000000 +0200 >+++ vcdimager-0.7.24/test/check_nrg.sh 2018-01-02 17:34:56.565593188 +0100 >@@ -26,14 +26,18 @@ > exit $RC > fi > >-if do_cksum <<EOF >+if do_cksum "quiet" <<EOF >+2176989007 2630472 videocd.nrg >+EOF >+then >+ : >+elif do_cksum <<EOF > 1284184221 2630472 videocd.nrg > EOF >- then >+then > : > else > echo "$0: cksum(1) checksums didn't match :-(" >- > cksum videocd.nrg > exit 1 > fi >@@ -71,16 +75,19 @@ > exit $RC > fi > >-if do_cksum <<EOF >+if do_cksum "quiet" <<EOF >+2290177553 1653964 videocd.nrg >+EOF >+then >+ : >+elif do_cksum <<EOF > 2897989104 1653964 videocd.nrg > EOF >- then >+then > : > else > echo "$0: cksum(1) checksums didn't match :-(" >- > cksum videocd.nrg >- > test_vcdxbuild_cleanup > exit 1 > fi >diff -ur vcdimager-0.7.24.ORIG/test/check_sizeof.c vcdimager-0.7.24/test/check_sizeof.c >--- vcdimager-0.7.24.ORIG/test/check_sizeof.c 2005-05-07 13:04:28.000000000 +0200 >+++ vcdimager-0.7.24/test/check_sizeof.c 2018-01-02 17:35:05.391592701 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >@@ -28,6 +28,8 @@ > #include <stdio.h> > #include <math.h> > >+/* We don't want to pull in cdio's config */ >+#define __CDIO_CONFIG_H__ > #include <cdio/iso9660.h> > #include <libvcd/types.h> > #include <libvcd/files.h> >diff -ur vcdimager-0.7.24.ORIG/test/check_svcd1.sh vcdimager-0.7.24/test/check_svcd1.sh >--- vcdimager-0.7.24.ORIG/test/check_svcd1.sh 2005-05-07 02:45:21.000000000 +0200 >+++ vcdimager-0.7.24/test/check_svcd1.sh 2018-01-02 17:35:21.619591807 +0100 >@@ -25,12 +25,18 @@ > test_vcdimager_cleanup > fi > else >- if do_cksum <<EOF >+ if do_cksum "quiet" <<EOF >+1923402845 1587600 videocd.bin >+3699460731 172 videocd.cue >+EOF >+ then >+ : >+ elif do_cksum <<EOF > 3747978987 1587600 videocd.bin > 3699460731 172 videocd.cue > EOF >- then >- : >+ then >+ : > else > echo "$0: cksum(1) checksums didn't match :-(" > >@@ -58,11 +64,17 @@ > exit $RC > fi > >-if do_cksum <<EOF >+if do_cksum "quiet" <<EOF >+832619107 4059552 videocd.bin >+669873986 424 videocd.cue >+EOF >+then >+ : >+elif do_cksum <<EOF > 4104676060 4059552 videocd.bin > 669873986 424 videocd.cue > EOF >- then >+then > : > else > echo "$0: cksum(1) checksums didn't match :-(" >@@ -111,11 +123,17 @@ > exit $RC > fi > >-if do_cksum <<EOF >+if do_cksum "quiet" <<EOF >+4248765257 2018016 videocd.bin >+483250638 172 videocd.cue >+EOF >+then >+ : >+elif do_cksum "quiet" <<EOF > 3695643404 2018016 videocd.bin > 483250638 172 videocd.cue > EOF >- then >+then > : > else > echo "$0: cksum(1) checksums didn't match :-(" >diff -ur vcdimager-0.7.24.ORIG/test/check_vcd11.sh vcdimager-0.7.24/test/check_vcd11.sh >--- vcdimager-0.7.24.ORIG/test/check_vcd11.sh 2005-05-07 02:44:46.000000000 +0200 >+++ vcdimager-0.7.24/test/check_vcd11.sh 2018-01-02 17:35:37.054590956 +0100 >@@ -26,8 +26,6 @@ > fi > else > if do_cksum <<EOF >-3746200718 1764000 videocd.bin >-3699460731 172 videocd.cue > EOF > then > : >@@ -57,11 +55,23 @@ > exit $RC > fi > >-if do_cksum <<EOF >+if do_cksum "quiet" <<EOF >+4286535819 3880800 videocd.bin >+2088931809 424 videocd.cue >+EOF >+then >+ : >+elif do_cksum "quiet" <<EOF > 1013953491 3880800 videocd.bin > 2088931809 424 videocd.cue > EOF >- then >+then >+ : >+elif do_cksum "quiet" <<EOF >+4286535819 3880800 videocd.bin >+2088931809 424 videocd.cue >+EOF >+then > : > else > echo "$0: cksum(1) checksums didn't match :-(" >diff -ur vcdimager-0.7.24.ORIG/test/check_vcd20.sh vcdimager-0.7.24/test/check_vcd20.sh >--- vcdimager-0.7.24.ORIG/test/check_vcd20.sh 2005-05-07 02:45:08.000000000 +0200 >+++ vcdimager-0.7.24/test/check_vcd20.sh 2018-01-02 17:35:56.842589866 +0100 >@@ -18,33 +18,38 @@ > RC=$? > > if test $RC -ne 0 ; then >- if test $RC -ne 77 ; then >- echo vcdimager failed >- exit $RC >- else >- echo vcdimager skipped >- test_vcdimager_cleanup >- fi >+ if test $RC -ne 77 ; then >+ echo vcdimager failed >+ exit $RC >+ else >+ echo vcdimager skipped >+ test_vcdimager_cleanup >+ fi > else >- if do_cksum <<EOF >+ if do_cksum "quiet" <<EOF >+1594106842 1764000 videocd.bin >+3699460731 172 videocd.cue >+EOF >+ then >+ : >+ elif do_cksum <<EOF > 1170593626 1764000 videocd.bin > 3699460731 172 videocd.cue > EOF > then >- : >- else >- echo "$0: cksum(1) checksums didn't match :-(" >- >- cksum videocd.bin videocd.cue >- exit 1 >- fi >- >- echo "$0: vcdimager cksum(1) checksums matched :-)" >- >- test_vcdinfo '-B -i videocd.cue ' \ >- vcd20_test0.dump ${srcdir}/vcd20_test0.right >- RC=$? >- check_result $RC 'vcd-info test 0' >+ : >+ else >+ echo "$0: cksum(1) checksums didn't match :-(" >+ cksum videocd.bin videocd.cue >+ exit 1 >+ fi >+ >+ echo "$0: vcdimager cksum(1) checksums matched :-)" >+ >+ test_vcdinfo '-B -i videocd.cue ' \ >+ vcd20_test0.dump ${srcdir}/vcd20_test0.right >+ RC=$? >+ check_result $RC 'vcd-info test 0' > fi > > test_vcdxbuild ${srcdir}/${BASE}.xml >@@ -59,11 +64,17 @@ > exit $RC > fi > >-if do_cksum <<EOF >+if do_cksum "quiet" <<EOF >+3694706815 4840416 videocd.bin >+2350689551 447 videocd.cue >+EOF >+then >+ : >+elif do_cksum <<EOF > 1209563022 4840416 videocd.bin > 2350689551 447 videocd.cue > EOF >- then >+then > : > else > echo "$0: cksum(1) checksums didn't match :-(" >diff -ur vcdimager-0.7.24.ORIG/test/mpegscan2.c vcdimager-0.7.24/test/mpegscan2.c >--- vcdimager-0.7.24.ORIG/test/mpegscan2.c 2005-05-08 05:48:55.000000000 +0200 >+++ vcdimager-0.7.24/test/mpegscan2.c 2018-01-02 16:27:31.295936067 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >@@ -45,12 +45,12 @@ > _msf.s &= 0x7f; > _msf.f &= 0x7f; > } >- >- printf (" %.2x:%.2x.%.2x ", >+ >+ printf (" %.2x:%.2x.%.2x ", > _msf.m, _msf.s, _msf.f); > } > >-int >+int > main (int argc, const char *argv[]) > { > VcdMpegSource_t *src; >@@ -108,7 +108,7 @@ > { > const struct vcd_mpeg_stream_info *_info = vcd_mpeg_source_get_info (src); > printf ("mpeg info\n"); >- >+ > printf (" %d x %d (%f:1) @%f v%d\n", _info->shdr[0].hsize, _info->shdr[0].vsize, > _info->shdr[0].aratio, _info->shdr[0].frate, _info->version); > } >diff -ur vcdimager-0.7.24.ORIG/test/mpegscan.c vcdimager-0.7.24/test/mpegscan.c >--- vcdimager-0.7.24.ORIG/test/mpegscan.c 2005-05-08 11:15:17.000000000 +0200 >+++ vcdimager-0.7.24/test/mpegscan.c 2018-01-02 16:27:31.295936067 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >@@ -37,7 +37,7 @@ > #include "mpeg_stream.h" > #include "stream_stdio.h" > >-int >+int > main (int argc, const char *argv[]) > { > VcdMpegSource_t *p_src; >@@ -56,13 +56,13 @@ > _CDIO_LIST_FOREACH (p_n, vcd_mpeg_source_get_info (p_src)->shdr[0].aps_list) > { > struct aps_data *p_data = _cdio_list_node_data (p_n); >- >- printf ("aps: %u %f\n", (unsigned int) p_data->packet_no, >+ >+ printf ("aps: %u %f\n", (unsigned int) p_data->packet_no, > p_data->timestamp); > } > > { >- CdioListNode_t *aps_node = >+ CdioListNode_t *aps_node = > _cdio_list_begin (vcd_mpeg_source_get_info (p_src)->shdr[0].aps_list); > struct aps_data *p_data; > double aps_time; >@@ -75,7 +75,7 @@ > > for (t = 0; t <= vcd_mpeg_source_get_info (p_src)->playing_time; t += 0.5) > { >- for(p_n = _cdio_list_node_next (aps_node); p_n; >+ for(p_n = _cdio_list_node_next (aps_node); p_n; > p_n = _cdio_list_node_next (p_n)) > { > p_data = _cdio_list_node_data (p_n); >@@ -86,7 +86,7 @@ > aps_time = p_data->timestamp; > aps_packet = p_data->packet_no; > } >- else >+ else > break; > } > >@@ -96,12 +96,12 @@ > } > > { >- const struct vcd_mpeg_stream_info *p_info = >+ const struct vcd_mpeg_stream_info *p_info = > vcd_mpeg_source_get_info (p_src); > printf ("mpeg info\n"); >- >- printf (" %d x %d (%f:1) @%f v%d\n", p_info->shdr[0].hsize, >- p_info->shdr[0].vsize, p_info->shdr[0].aratio, >+ >+ printf (" %d x %d (%f:1) @%f v%d\n", p_info->shdr[0].hsize, >+ p_info->shdr[0].vsize, p_info->shdr[0].aratio, > p_info->shdr[0].frate, p_info->version); > } > >diff -ur vcdimager-0.7.24.ORIG/test/testassert.c vcdimager-0.7.24/test/testassert.c >--- vcdimager-0.7.24.ORIG/test/testassert.c 2003-11-10 12:57:53.000000000 +0100 >+++ vcdimager-0.7.24/test/testassert.c 2018-01-02 16:27:31.295936067 +0100 >@@ -17,7 +17,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >diff -ur vcdimager-0.7.24.ORIG/test/testimage.c vcdimager-0.7.24/test/testimage.c >--- vcdimager-0.7.24.ORIG/test/testimage.c 2006-03-08 01:19:57.000000000 +0100 >+++ vcdimager-0.7.24/test/testimage.c 2018-01-02 16:27:31.297936067 +0100 >@@ -18,7 +18,7 @@ > along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ >- >+ > #ifdef HAVE_CONFIG_H > # include "config.h" > #endif >@@ -48,10 +48,10 @@ > if (!strcmp ("nrg", argv[1])) > img = cdio_open_nrg (argv[2]); > else if (!strcmp ("bincue", argv[1])) >- img = cdio_open_bincue (argv[2]) /* src, NULL, false) */; >+ img = cdio_open_bincue (argv[2]) /* src, NULL, false) */; > else if (!strcmp ("cd", argv[1])) > img = cdio_open_cd (argv[2]) /* argv[2]) */; >- else >+ else > vcd_error ("unrecognized img type"); > > vcd_assert (img != NULL); >@@ -64,7 +64,7 @@ > vcd_debug ("size = %lu", (unsigned long int) n); > > vcd_debug ("reading sector %lu to testimage.out", (unsigned long int) lsn); >- >+ > if (!cdio_read_mode2_sector (img, buf, lsn, true)) > { > struct m2f2sector >@@ -91,7 +91,7 @@ > else > vcd_error ("failed..."); > >- >+ > } > > return 0; >diff -ur vcdimager-0.7.24.ORIG/test/testvcd.c vcdimager-0.7.24/test/testvcd.c >--- vcdimager-0.7.24.ORIG/test/testvcd.c 2005-06-10 14:03:41.000000000 +0200 >+++ vcdimager-0.7.24/test/testvcd.c 2018-01-02 16:27:31.295936067 +0100 >@@ -16,7 +16,7 @@ > * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. > * > */ >-/* Test the operation of vcd-info and vcdxrip on a real CD-ROM - not a >+/* Test the operation of vcd-info and vcdxrip on a real CD-ROM - not a > CD-ROM image. */ > > #ifdef HAVE_CONFIG_H >@@ -60,7 +60,7 @@ > struct stat statbuf; > > /* Set to give only errors on open, not warnings. */ >- vcd_loglevel_default = VCD_LOG_ERROR; >+ vcd_loglevel_default = VCD_LOG_ERROR; > > if ( vcdinfo_open(&p_vcdinfo, &psz_source, DRIVER_DEVICE, > NULL) != VCDINFO_OPEN_VCD) { >@@ -77,18 +77,18 @@ > snprintf(cmd, sizeof(cmd), FRONTEND_DIR "cli/vcd-info -i %s", psz_source); > i_rc = system(cmd); > } >- >+ > if (0 != stat(FRONTEND_DIR "xml/vcdxrip", &statbuf)) { > printf("Unable to find vcdxrip program; skipping test\n"); > } else { > int i_rc2; >- snprintf(cmd, sizeof(cmd), >+ snprintf(cmd, sizeof(cmd), > FRONTEND_DIR "xml/vcdxrip --norip --input=%s", psz_source); > i_rc2 = system(cmd); >- if (i_rc2 && SKIP_TEST_RC != i_rc && !i_rc) >+ if (i_rc2 && SKIP_TEST_RC != i_rc && !i_rc) > i_rc = i_rc2; > } >- >+ > free(psz_source); > return i_rc; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 638646
:
506236
|
506244
|
506268
|
506642
|
506770
| 512744