mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-27 03:30:20 +00:00
No idea why it was a void * if it always was used as int.
This change makes it compile on amd64. Tobias is the support complete? I tried a document from gutenberg website at it seems i don't get all content. CCMAIL: tokoe@kde.org svn path=/trunk/playground/graphics/okular/; revision=642294
This commit is contained in:
parent
61ace600ec
commit
6c75fd3203
|
@ -898,10 +898,10 @@ static int FpSeek
|
|||
{
|
||||
long result;
|
||||
|
||||
result = lseek ((int) (handle->dbprivate), offset, SEEK_SET);
|
||||
result = lseek (handle->dbprivate, offset, SEEK_SET);
|
||||
if (result != offset) {
|
||||
_plkr_message ("Unable to seek fp %d to offset %d -- %d instead\n",
|
||||
(int) (handle->dbprivate), offset, result);
|
||||
handle->dbprivate, offset, result);
|
||||
}
|
||||
return (result == offset);
|
||||
}
|
||||
|
@ -917,12 +917,12 @@ static int FpRead
|
|||
int result;
|
||||
|
||||
result =
|
||||
read ((int) (handle->dbprivate), buffer,
|
||||
read (handle->dbprivate, buffer,
|
||||
MIN (buffersize, readsize));
|
||||
if (result != readsize) {
|
||||
_plkr_message
|
||||
("Unable to read %d bytes from fp %d -- read %d instead\n",
|
||||
MIN (buffersize, readsize), (int) (handle->dbprivate),
|
||||
MIN (buffersize, readsize), handle->dbprivate,
|
||||
result);
|
||||
}
|
||||
return (result);
|
||||
|
@ -933,7 +933,7 @@ static void FpFree
|
|||
plkr_DBHandle handle
|
||||
)
|
||||
{
|
||||
int fp = (int) (handle->dbprivate);
|
||||
int fp = handle->dbprivate;
|
||||
|
||||
if (fp > 0)
|
||||
close (fp);
|
||||
|
@ -944,7 +944,7 @@ static long FpSize
|
|||
plkr_DBHandle handle
|
||||
)
|
||||
{
|
||||
int fp = (int) (handle->dbprivate);
|
||||
int fp = handle->dbprivate;
|
||||
|
||||
struct stat buf;
|
||||
|
||||
|
@ -974,7 +974,7 @@ plkr_Document* plkr_OpenDBFile
|
|||
return NULL;
|
||||
}
|
||||
handle = (plkr_DBHandle) malloc (sizeof (*handle));
|
||||
handle->dbprivate = (void *) fp;
|
||||
handle->dbprivate = fp;
|
||||
handle->seek = FpSeek;
|
||||
handle->read = FpRead;
|
||||
handle->free = FpFree;
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
of a file pointer, so that raw memory can also be used. */
|
||||
typedef struct plkr_DBHandle_s *plkr_DBHandle;
|
||||
struct plkr_DBHandle_s {
|
||||
void *dbprivate;
|
||||
int dbprivate;
|
||||
|
||||
/* Call seek to position the DB stream at the "offset" byte from the start of the DB.
|
||||
Returns non-zero if seek has been successfully done, zero otherwise. */
|
||||
|
|
Loading…
Reference in a new issue