mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
- use proper pointer format specifier (int does not work on 64 bit systems)
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@913 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -899,7 +899,7 @@ FILE *f_open(const char *filename, const char *acctype)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
dprintf(stderr, "f_open: adding stream %x to cache[%d]\n", (int) fd, i);
|
||||
dprintf(stderr, "f_open: adding stream %p to cache[%d]\n", fd, i);
|
||||
|
||||
cache[i].fd = fd;
|
||||
cache[i].csize = CACHESIZE;
|
||||
@@ -1153,7 +1153,7 @@ int f_close(FILE *stream)
|
||||
|
||||
if(cache[i].fd == stream)
|
||||
{
|
||||
dprintf(stderr, "f_close: removing stream %x from cache[%d]\n", (int)stream, i);
|
||||
dprintf(stderr, "f_close: removing stream %p from cache[%d]\n", stream, i);
|
||||
|
||||
cache[i].closed = 1; /* indicate that the cache is closed */
|
||||
|
||||
@@ -1286,7 +1286,7 @@ char *f_type(FILE *stream, char *type)
|
||||
/* if the stream could not be found, look for a free slot ... */
|
||||
if(i == CACHEENTMAX)
|
||||
{
|
||||
dprintf(stderr, "stream %x not in type table, ", (int) stream);
|
||||
dprintf(stderr, "stream %p not in type table, ", stream);
|
||||
|
||||
for(i=0 ; (i<CACHEENTMAX) && (stream_type[i].stream != NULL); i++){};
|
||||
|
||||
@@ -1297,7 +1297,7 @@ char *f_type(FILE *stream, char *type)
|
||||
{
|
||||
stream_type[i].stream = stream;
|
||||
strncpy(stream_type[i].type, type, 64);
|
||||
dprintf(stderr, "added entry (%s) for %x\n", type, (int) stream);
|
||||
dprintf(stderr, "added entry (%s) for %p\n", type, stream);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
@@ -1309,7 +1309,7 @@ char *f_type(FILE *stream, char *type)
|
||||
/* the stream is already in the table */
|
||||
else
|
||||
{
|
||||
dprintf(stderr, "stream %x lookup in type table succeded\n", (int) stream);
|
||||
dprintf(stderr, "stream %p lookup in type table succeded\n", stream);
|
||||
|
||||
if(!type)
|
||||
return stream_type[i].type;
|
||||
@@ -1373,7 +1373,7 @@ int push(FILE *fd, char *buf, long len)
|
||||
// dprintf(stderr, "push: %d bytes to store [filled: %d of %d], stream: %x\n", len, cache[i].filled, CACHESIZE, fd);
|
||||
|
||||
if(cache[i].fd != fd) {
|
||||
dprintf(stderr, "push: no cache present for stream %0x\n", (int) fd);
|
||||
dprintf(stderr, "push: no cache present for stream %p\n", fd);
|
||||
return -1;
|
||||
}
|
||||
do
|
||||
@@ -1452,7 +1452,7 @@ int push(FILE *fd, char *buf, long len)
|
||||
|
||||
} while(rval < len);
|
||||
|
||||
dprintf(stderr, "push: exitstate: [filled: %3.1f %%], stream: %x\r", 100.0 * (float)cache[i].filled / (float)cache[i].csize, (int) fd);
|
||||
dprintf(stderr, "push: exitstate: [filled: %3.1f %%], stream: %p\r", 100.0 * (float)cache[i].filled / (float)cache[i].csize, fd);
|
||||
|
||||
return rval;
|
||||
}
|
||||
@@ -1467,8 +1467,8 @@ int pop(FILE *fd, char *buf, long len)
|
||||
if(i < 0)
|
||||
return -1;
|
||||
|
||||
dprintf(stderr, "pop: %d bytes requested [filled: %d of %d], stream: %x buf 0x%x\n",
|
||||
(int) len, (int) cache[i].filled, (int) CACHESIZE, (int)fd, (int) buf);
|
||||
dprintf(stderr, "pop: %d bytes requested [filled: %d of %d], stream: %p buf %p\n",
|
||||
(int) len, (int) cache[i].filled, (int) CACHESIZE, fd, buf);
|
||||
|
||||
if(cache[i].fd == fd)
|
||||
{
|
||||
@@ -1522,8 +1522,8 @@ int pop(FILE *fd, char *buf, long len)
|
||||
|
||||
if(amt[j])
|
||||
{
|
||||
dprintf(stderr, "pop(): rptr: 0x%08x, buf: 0x%08x, amt[%d]=%d, blen=%d, len=%d, rval=%d\n",
|
||||
(int) cache[i].rptr, (int) buf, j, amt[j], blen, (int) len, rval);
|
||||
dprintf(stderr, "pop(): rptr: %p, buf: %p, amt[%d]=%d, blen=%d, len=%d, rval=%d\n",
|
||||
cache[i].rptr, buf, j, amt[j], blen, (int) len, rval);
|
||||
|
||||
memmove(buf, cache[i].rptr, amt[j]);
|
||||
|
||||
@@ -1537,7 +1537,7 @@ int pop(FILE *fd, char *buf, long len)
|
||||
}
|
||||
}
|
||||
|
||||
dprintf(stderr, "pop: %d/%d/%d bytes read [filled: %d of %d], stream: %x\n", amt[0] + amt[1], rval, (int) len, (int) cache[i].filled, (int) CACHESIZE, (int) fd);
|
||||
dprintf(stderr, "pop: %d/%d/%d bytes read [filled: %d of %d], stream: %p\n", amt[0] + amt[1], rval, (int) len, (int) cache[i].filled, (int) CACHESIZE, fd);
|
||||
|
||||
/* if the cache is closed and empty, then */
|
||||
/* force the end condition to be met */
|
||||
@@ -1566,7 +1566,7 @@ int pop(FILE *fd, char *buf, long len)
|
||||
}
|
||||
else
|
||||
{
|
||||
dprintf(stderr, "pop: no cache present for stream %0x\n", (int) fd);
|
||||
dprintf(stderr, "pop: no cache present for stream %p\n", fd);
|
||||
rval = -1;
|
||||
}
|
||||
|
||||
@@ -1590,7 +1590,7 @@ void CacheFillThread(void *c)
|
||||
if(scache->closed)
|
||||
return;
|
||||
|
||||
dprintf(stderr, "CacheFillThread: thread started, using stream %8x\n", (int) scache->fd);
|
||||
dprintf(stderr, "CacheFillThread: thread started, using stream %p\n", scache->fd);
|
||||
|
||||
buf = (char*)malloc(CACHEBTRANS);
|
||||
|
||||
@@ -1648,7 +1648,7 @@ void CacheFillThread(void *c)
|
||||
pthread_mutex_unlock( &scache->readable );
|
||||
|
||||
/* ... and exit this thread. */
|
||||
dprintf(stderr, "CacheFillThread: thread exited, stream %8x \n", (int) scache->fd);
|
||||
dprintf(stderr, "CacheFillThread: thread exited, stream %p \n", scache->fd);
|
||||
|
||||
free(buf);
|
||||
pthread_exit(0);
|
||||
@@ -1700,7 +1700,7 @@ void ShoutCAST_ParseMetaData(char *md, CSTATE *state)
|
||||
if((!md) || (!state))
|
||||
return;
|
||||
|
||||
dprintf(stderr, "ShoutCAST_ParseMetaData(%x : %s, %x)\n", (int) md, md, (int) state);
|
||||
dprintf(stderr, "ShoutCAST_ParseMetaData(%p : %s, %p)\n", md, md, state);
|
||||
|
||||
ptr = strstr(md, "StreamTitle=");
|
||||
|
||||
|
Reference in New Issue
Block a user