1
0
Fork 0

Add space between literal and string macro

This commit is contained in:
hpi1 2020-02-16 17:06:55 +02:00
parent d73f0332b2
commit 0529106337
13 changed files with 30 additions and 30 deletions

View File

@ -274,7 +274,7 @@ _show_cpi_info(CLPI_CPI *cpi, int level)
pts = ((uint64_t) (coarse->pts_ep & ~0x01) << 19) +
((uint64_t)fine->pts_ep << 9);
spn = (coarse->spn_ep & ~0x1FFFF) + fine->spn_ep;
indent_printf(level+4, "PTS %8"PRIu64"/%8"PRIu64" -- SPN %u",
indent_printf(level+4, "PTS %8" PRIu64 "/%8" PRIu64 " -- SPN %u",
pts, pts >> 1, spn);
}
}

View File

@ -110,7 +110,7 @@ static void _read_to_eof(BLURAY *bd)
_print_event(&ev);
} while (bytes > 0);
printf("_read_to_eof(): read %"PRIu64" bytes\n", total);
printf("_read_to_eof(): read %" PRIu64 " bytes\n", total);
}
static void _print_events(BLURAY *bd)

View File

@ -225,7 +225,7 @@ main(int argc, char *argv[])
total += wrote;
}
if (verbose) {
fprintf(stderr, "Wrote %"PRId64" bytes\n", total);
fprintf(stderr, "Wrote %" PRId64 " bytes\n", total);
}
bd_close(bd);
fclose(out);

View File

@ -54,7 +54,7 @@ int main(int argc, char *argv[])
for (ii = 0; ii < num_titles; ii++) {
BLURAY_TITLE_INFO* ti;
ti = bd_get_title_info(bd, ii, 0);
printf("index: %d duration: %02"PRIu64":%02"PRIu64":%02"PRIu64" chapters: %d\n",
printf("index: %d duration: %02" PRIu64 ":%02" PRIu64 ":%02" PRIu64 " chapters: %d\n",
ii,
(ti->duration / 90000) / (3600),
((ti->duration / 90000) % 3600) / 60,

View File

@ -116,7 +116,7 @@ int main(int argc, char *argv[])
BLURAY_TITLE_INFO* ti;
ti = bd_get_title_info(bd, ii, 0);
printf(
"index: %3d duration: %02"PRIu64":%02"PRIu64":%02"PRIu64" chapters: %3d angles: %2u clips: %3u (playlist: %05d.mpls) "
"index: %3d duration: %02" PRIu64 ":%02" PRIu64 ":%02" PRIu64 " chapters: %3d angles: %2u clips: %3u (playlist: %05d.mpls) "
"V:%d A:%-2d PG:%-2d IG:%-2d SV:%d SA:%d\n",
ii + 1,
(ti->duration / 90000) / (3600),

View File

@ -85,7 +85,7 @@ static int64_t _file_read(BD_FILE_H *file, uint8_t *buf, int64_t size)
ssize_t got, result;
if (size <= 0 || size >= BD_MAX_SSIZE) {
BD_DEBUG(DBG_FILE | DBG_CRIT, "Ignoring invalid read of size %"PRId64" (%p)\n", size, (void*)file);
BD_DEBUG(DBG_FILE | DBG_CRIT, "Ignoring invalid read of size %" PRId64 " (%p)\n", size, (void*)file);
return 0;
}
@ -117,7 +117,7 @@ static int64_t _file_write(BD_FILE_H *file, const uint8_t *buf, int64_t size)
}
return 0;
}
BD_DEBUG(DBG_FILE | DBG_CRIT, "Ignoring invalid write of size %"PRId64" (%p)\n", size, (void*)file);
BD_DEBUG(DBG_FILE | DBG_CRIT, "Ignoring invalid write of size %" PRId64 " (%p)\n", size, (void*)file);
return 0;
}

View File

@ -81,7 +81,7 @@ static int64_t _file_read(BD_FILE_H *file, uint8_t *buf, int64_t size)
return (int64_t)fread(buf, 1, (size_t)size, (FILE *)file->internal);
}
BD_DEBUG(DBG_FILE | DBG_CRIT, "Ignoring invalid read of size %"PRId64" (%p)\n", size, (void*)file);
BD_DEBUG(DBG_FILE | DBG_CRIT, "Ignoring invalid read of size %" PRId64 " (%p)\n", size, (void*)file);
return 0;
}
@ -99,7 +99,7 @@ static int64_t _file_write(BD_FILE_H *file, const uint8_t *buf, int64_t size)
return 0;
}
BD_DEBUG(DBG_FILE | DBG_CRIT, "Ignoring invalid write of size %"PRId64" (%p)\n", size, (void*)file);
BD_DEBUG(DBG_FILE | DBG_CRIT, "Ignoring invalid write of size %" PRId64 " (%p)\n", size, (void*)file);
return 0;
}

View File

@ -293,7 +293,7 @@ JNIEXPORT jlong JNICALL Java_org_videolan_Libbluray_seekN(JNIEnv * env,
jclass cls, jlong np, jint playitem, jint playmark, jlong tick) {
BLURAY* bd = (BLURAY*)(intptr_t)np;
BD_DEBUG(DBG_JNI, "seekN(tick=%"PRId64", mark=%d, playitem=%d)\n", (int64_t)tick, (int)playmark, (int)playitem);
BD_DEBUG(DBG_JNI, "seekN(tick=%" PRId64 ", mark=%d, playitem=%d)\n", (int64_t)tick, (int)playmark, (int)playitem);
return bd_bdj_seek(bd, playitem, playmark, tick);
}

View File

@ -688,7 +688,7 @@ static int _read_block(BLURAY *bd, BD_STREAM *st, uint8_t *buf)
const size_t len = 6144;
if (st->fp) {
BD_DEBUG(DBG_STREAM, "Reading unit at %"PRIu64"...\n", st->clip_block_pos);
BD_DEBUG(DBG_STREAM, "Reading unit at %" PRIu64 "...\n", st->clip_block_pos);
if (len + st->clip_block_pos <= st->clip_size) {
size_t read_len;
@ -697,14 +697,14 @@ static int _read_block(BLURAY *bd, BD_STREAM *st, uint8_t *buf)
int error;
if (read_len != len) {
BD_DEBUG(DBG_STREAM | DBG_CRIT, "Read %d bytes at %"PRIu64" ; requested %d !\n", (int)read_len, st->clip_block_pos, (int)len);
BD_DEBUG(DBG_STREAM | DBG_CRIT, "Read %d bytes at %" PRIu64 " ; requested %d !\n", (int)read_len, st->clip_block_pos, (int)len);
return _skip_unit(bd, st);
}
st->clip_block_pos += len;
if ((error = _validate_unit(bd, st, buf)) <= 0) {
/* skip broken unit */
BD_DEBUG(DBG_BLURAY | DBG_CRIT, "Skipping broken unit at %"PRId64"\n", st->clip_block_pos - len);
BD_DEBUG(DBG_BLURAY | DBG_CRIT, "Skipping broken unit at %" PRId64 "\n", st->clip_block_pos - len);
st->clip_pos += len;
return error;
}
@ -727,7 +727,7 @@ static int _read_block(BLURAY *bd, BD_STREAM *st, uint8_t *buf)
#endif
}
BD_DEBUG(DBG_STREAM | DBG_CRIT, "Read unit at %"PRIu64" failed !\n", st->clip_block_pos);
BD_DEBUG(DBG_STREAM | DBG_CRIT, "Read unit at %" PRIu64 " failed !\n", st->clip_block_pos);
return _skip_unit(bd, st);
}
@ -775,7 +775,7 @@ static int _preload_m2ts(BLURAY *bd, BD_PRELOAD *p)
st.clip = p->clip;
if (st.clip_size > PRELOAD_SIZE_LIMIT) {
BD_DEBUG(DBG_BLURAY|DBG_CRIT, "_preload_m2ts(): too large clip (%"PRId64")\n", st.clip_size);
BD_DEBUG(DBG_BLURAY|DBG_CRIT, "_preload_m2ts(): too large clip (%" PRId64 ")\n", st.clip_size);
return 0;
}
@ -802,7 +802,7 @@ static int _preload_m2ts(BLURAY *bd, BD_PRELOAD *p)
for (; buf < end; buf += 6144) {
if (_read_block(bd, &st, buf) <= 0) {
BD_DEBUG(DBG_BLURAY|DBG_CRIT, "_preload_m2ts(): error loading %s at %"PRIu64"\n",
BD_DEBUG(DBG_BLURAY|DBG_CRIT, "_preload_m2ts(): error loading %s at %" PRIu64 "\n",
st.clip->name, (uint64_t)(buf - p->buf));
_close_m2ts(&st);
_close_preload(p);
@ -812,7 +812,7 @@ static int _preload_m2ts(BLURAY *bd, BD_PRELOAD *p)
/* */
BD_DEBUG(DBG_BLURAY, "_preload_m2ts(): loaded %"PRIu64" bytes from %s\n",
BD_DEBUG(DBG_BLURAY, "_preload_m2ts(): loaded %" PRIu64 " bytes from %s\n",
st.clip_size, st.clip->name);
_close_m2ts(&st);
@ -1581,7 +1581,7 @@ static void _playmark_reached(BLURAY *bd)
{
while (bd->next_mark >= 0 && bd->s_pos > bd->next_mark_pos) {
BD_DEBUG(DBG_BLURAY, "PlayMark %d reached (%"PRIu64")\n", bd->next_mark, bd->next_mark_pos);
BD_DEBUG(DBG_BLURAY, "PlayMark %d reached (%" PRIu64 ")\n", bd->next_mark, bd->next_mark_pos);
_queue_event(bd, BD_EVENT_PLAYMARK, bd->next_mark);
_bdj_event(bd, BDJ_EVENT_MARK, bd->next_mark);
@ -1634,7 +1634,7 @@ static void _seek_internal(BLURAY *bd,
_init_textst_timer(bd);
}
BD_DEBUG(DBG_BLURAY, "Seek to %"PRIu64"\n", bd->s_pos);
BD_DEBUG(DBG_BLURAY, "Seek to %" PRIu64 "\n", bd->s_pos);
}
}
@ -1657,7 +1657,7 @@ int64_t bd_seek_time(BLURAY *bd, uint64_t tick)
NAV_CLIP *clip;
if (tick >> 33) {
BD_DEBUG(DBG_BLURAY | DBG_CRIT, "bd_seek_time(%"PRIu64") failed: invalid timestamp\n", tick);
BD_DEBUG(DBG_BLURAY | DBG_CRIT, "bd_seek_time(%" PRIu64 ") failed: invalid timestamp\n", tick);
return bd->s_pos;
}
@ -2068,7 +2068,7 @@ static int _bd_read_locked(BLURAY *bd, unsigned char *buf, int len)
return 0;
}
BD_DEBUG(DBG_STREAM, "Reading [%d bytes] at %"PRIu64"...\n", len, bd->s_pos);
BD_DEBUG(DBG_STREAM, "Reading [%d bytes] at %" PRIu64 "...\n", len, bd->s_pos);
r = _bd_read(bd, buf, len);
@ -3773,7 +3773,7 @@ static int _bd_read_file(BLURAY *bd, const char *dir, const char *file, void **d
return 0;
}
BD_DEBUG(DBG_BLURAY, "bd_read_file(): read %"PRId64" bytes from %s"DIR_SEP"%s\n",
BD_DEBUG(DBG_BLURAY, "bd_read_file(): read %" PRId64 " bytes from %s" DIR_SEP "%s\n",
*size, dir ? dir : "", file);
return 1;
}

View File

@ -1027,7 +1027,7 @@ static int _render_textst(GRAPHICS_CONTROLLER *p, uint32_t stc, GC_NAV_CMDS *cmd
/* next dialog too far in future ? */
if (now < 1 || dialog[ii].start_pts >= now + 90000) {
GC_TRACE("_render_textst(): next event #%d in %"PRId64" seconds (pts %"PRId64")\n",
GC_TRACE("_render_textst(): next event #%d in %" PRId64 " seconds (pts %" PRId64 ")\n",
ii, (dialog[ii].start_pts - now)/90000, dialog[ii].start_pts);
if (cmds) {
cmds->wakeup_time = (uint32_t)(dialog[ii].start_pts / 2);
@ -1052,7 +1052,7 @@ static int _render_textst(GRAPHICS_CONTROLLER *p, uint32_t stc, GC_NAV_CMDS *cmd
continue;
}
GC_TRACE("_render_textst(): rendering dialog #%d (pts %"PRId64", diff %"PRId64"\n",
GC_TRACE("_render_textst(): rendering dialog #%d (pts %" PRId64 ", diff %" PRId64 "\n",
ii, dialog[ii].start_pts, dialog[ii].start_pts - now);

View File

@ -542,7 +542,7 @@ static int graphics_processor_decode_pes(PG_DISPLAY_SET **s, PES_BUFFER **p, int
/* filter out values that seem to be incorrect (if stc is not updated) */
int64_t diff = (*p)->dts - stc;
if (diff < MAX_STC_DTS_DIFF) {
GP_TRACE("Segment dts > stc (%"PRId64" > %"PRId64" ; diff %"PRId64")\n",
GP_TRACE("Segment dts > stc (%" PRId64 " > %" PRId64 " ; diff %" PRId64 ")\n",
(*p)->dts, stc, diff);
return 0;
}
@ -562,7 +562,7 @@ static int graphics_processor_decode_pes(PG_DISPLAY_SET **s, PES_BUFFER **p, int
/* decode segment */
GP_TRACE("Decoding segment, dts %010"PRId64" pts %010"PRId64" len %d\n",
GP_TRACE("Decoding segment, dts %010" PRId64 " pts %010" PRId64 " len %d\n",
(*p)->dts, (*p)->pts, (*p)->len);
_decode_segment(*s, *p);

View File

@ -220,13 +220,13 @@ static int _filter_es_pts(M2TS_FILTER *p, const uint8_t *buf, uint16_t pid)
int64_t pts = _es_timestamp(buf + 4 + payload_offset, 188 - payload_offset);
if (pts >= p->in_pts && (p->out_pts < 0 || pts <= p->out_pts)) {
M2TS_TRACE("Pid 0x%04x pts %"PRId64" passed IN timestamp %"PRId64" (pts %"PRId64")\n",
M2TS_TRACE("Pid 0x%04x pts %" PRId64 " passed IN timestamp %" PRId64 " (pts %" PRId64 ")\n",
pid, pts, p->in_pts, pts);
_remove_pid(p->wipe_pid, pid);
_add_pid(p->pass_pid, pid);
} else {
M2TS_TRACE("Pid 0x%04x pts %"PRId64" outside of clip (%"PRId64"-%"PRId64" -> keep wiping out\n",
M2TS_TRACE("Pid 0x%04x pts %" PRId64 " outside of clip (%" PRId64 "-%" PRId64 " -> keep wiping out\n",
pid, pts, p->in_pts, p->out_pts);
}
}
@ -246,7 +246,7 @@ static int _filter_es_pts(M2TS_FILTER *p, const uint8_t *buf, uint16_t pid)
if (pts > p->out_pts ||
IS_HDMV_PID_PG(pid) ||
IS_HDMV_PID_IG(pid)) {
M2TS_TRACE("Pid 0x%04x passed OUT timestamp %"PRId64" (pts %"PRId64") -> start wiping\n", pid, p->out_pts, pts);
M2TS_TRACE("Pid 0x%04x passed OUT timestamp %" PRId64 " (pts %" PRId64 ") -> start wiping\n", pid, p->out_pts, pts);
_remove_pid(p->pass_pid, pid);
_add_pid(p->wipe_pid, pid);
}

View File

@ -85,7 +85,7 @@ static int _read_prop_file(const char *file, char **data)
return 0;
unlink:
BD_DEBUG(DBG_FILE | DBG_CRIT, "Removing invalid properties file %s (%"PRId64" bytes)\n", file, size);
BD_DEBUG(DBG_FILE | DBG_CRIT, "Removing invalid properties file %s (%" PRId64 " bytes)\n", file, size);
X_FREE(*data);
if (fp) {