Example #1
0
local int unzlocal_getLong (
    const zlib_filefunc_def* pzlib_filefunc_def,
    voidpf filestream,
    uLong *pX)
{
    uLong x ;
    int i = 0;
    int err;

    err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
    x = (uLong)i;

    if (err==UNZ_OK)
        err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
    x += ((uLong)i)<<8;

    if (err==UNZ_OK)
        err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
    x += ((uLong)i)<<16;

    if (err==UNZ_OK)
        err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
    x += ((uLong)i)<<24;

    if (err==UNZ_OK)
        *pX = x;
    else
        *pX = 0;
    return err;
}
Example #2
0
local int unzlocal_getLong (FILE* fin,uLong *pX)
{
    uLong x ;
    int i;
    int err;

    err = unzlocal_getByte(fin,&i);
    x = (uLong)i;
    
    if (err==UNZ_OK)
        err = unzlocal_getByte(fin,&i);
    x += ((uLong)i)<<8;

    if (err==UNZ_OK)
        err = unzlocal_getByte(fin,&i);
    x += ((uLong)i)<<16;

    if (err==UNZ_OK)
        err = unzlocal_getByte(fin,&i);
    x += ((uLong)i)<<24;
   
    if (err==UNZ_OK)
        *pX = x;
    else
        *pX = 0;
    return err;
}
Example #3
0
static int unzlocal_getLong (voidpf filestream, uLong *pX)
{
    uLong x ;
    int i = 0;
    int err;

    err = unzlocal_getByte(filestream,&i);
    x = (uLong)i;

    if (err==UNZ_OK)
        err = unzlocal_getByte(filestream,&i);
    x += ((uLong)i)<<8;

    if (err==UNZ_OK)
        err = unzlocal_getByte(filestream,&i);
    x += ((uLong)i)<<16;

    if (err==UNZ_OK)
        err = unzlocal_getByte(filestream,&i);
    x += ((uLong)i)<<24;

    if (err==UNZ_OK)
        *pX = x;
    else
        *pX = 0;
    return err;
}
Example #4
0
static int unzlocal_getShort(const zlib_filefunc_def *pzlib_filefunc_def, void *filestream, DWORD *pX)
{
  DWORD x;
  int i;
  int err;

  err = unzlocal_getByte(pzlib_filefunc_def, filestream, &i);

  x = (DWORD)i;

  if (err == UNZ_OK)
  {
    err = unzlocal_getByte(pzlib_filefunc_def, filestream, &i);
  }

  x += ((DWORD)i) << 8;

  if (err == UNZ_OK)
  {
    *pX = x;
  }
  else
  {
    *pX = 0;
  }

  return err;
}
Example #5
0
/* ===========================================================================
   Reads a long in LSB order from the given gz_stream. Sets
*/
local int unzlocal_getShort (struct zfile *fin,uLong *pX)
{
    uLong x ;
    int i;
    int err;

    err = unzlocal_getByte(fin,&i);
    x = (uLong)i;

    if (err==UNZ_OK)
	err = unzlocal_getByte(fin,&i);
    x += ((uLong)i)<<8;

    if (err==UNZ_OK)
	*pX = x;
    else
	*pX = 0;
    return err;
}
Example #6
0
/**
 *  Reads a long in LSB order from the given gz_stream. Sets
 */
local int unzlocal_getShort (FILE* fin, uLong *pX)
{
    uLong x ;
    int32_t i = 0;
    int32_t err;

    err = unzlocal_getByte(fin,&i);
    x = (uLong)i;

    if (err==UNZ_OK)
        err = unzlocal_getByte(fin,&i);
    x += ((uLong)i)<<8;

    if (err==UNZ_OK)
        *pX = x;
    else
        *pX = 0;
    return err;
}
Example #7
0
//local int unzlocal_getShort ( FILE *fin, uLong *pX)
local int unzlocal_getShort ( mpo_io *fin, uLong *pX)	// MPO
{
    uLong x ;
    int i = 0;
    int err;

    err = unzlocal_getByte(fin,&i);
    x = (uLong)i;
    
    if (err==UNZ_OK)
        err = unzlocal_getByte(fin,&i);
    x += ((uLong)i)<<8;
   
    if (err==UNZ_OK)
        *pX = x;
    else
        *pX = 0;
    return err;
}