~ubuntu-branches/debian/squeeze/openttd/squeeze

« back to all changes in this revision

Viewing changes to src/minilzo.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jordi Mallach, Matthijs Kooijman, Jordi Mallach
  • Date: 2009-04-15 18:22:10 UTC
  • mfrom: (1.1.6 upstream) (2.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090415182210-22ktb8kdbp2tf3bm
[ Matthijs Kooijman ]
* New upstream release.
* Remove Debian specific desktop file, upstream provides one now. 
* Add debian/watch file.

[ Jordi Mallach ]
* Bump Standards-Version to 3.8.1, with no changes required.
* Move to debhelper compat 7. Bump Build-Depends accordingly.
* Use dh_prep.
* Add "set -e" to config script.
* Remove a few extra doc files that get installed by upstream Makefile.
* Add more complete copyright information.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: minilzo.cpp 10778 2007-08-03 23:26:12Z truelight $ */
2
 
 
3
 
/* @file minilzo.cpp -- mini subset of the LZO real-time data compression library
4
 
 
5
 
   This file is part of the LZO real-time data compression library.
6
 
 
7
 
   Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
8
 
   Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
9
 
   Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
10
 
   Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
11
 
   Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
12
 
   Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
13
 
   Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
14
 
   All Rights Reserved.
15
 
 
16
 
   The LZO library is free software; you can redistribute it and/or
17
 
   modify it under the terms of the GNU General Public License as
18
 
   published by the Free Software Foundation; either version 2 of
19
 
   the License, or (at your option) any later version.
20
 
 
21
 
   The LZO library is distributed in the hope that it will be useful,
22
 
   but WITHOUT ANY WARRANTY; without even the implied warranty of
23
 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24
 
   GNU General Public License for more details.
25
 
 
26
 
   You should have received a copy of the GNU General Public License
27
 
   along with the LZO library; see the file COPYING.
28
 
   If not, write to the Free Software Foundation, Inc.,
29
 
   59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
30
 
 
31
 
   Markus F.X.J. Oberhumer
32
 
   <markus@oberhumer.com>
33
 
   http://www.oberhumer.com/opensource/lzo/
34
 
 */
35
 
 
36
 
/*
 
1
/* $Id: minilzo.cpp 13552 2008-06-17 19:38:00Z smatz $ */
 
2
 
 
3
/**
 
4
 * @file minilzo.cpp -- mini subset of the LZO real-time data compression library
 
5
 *
 
6
 * This file is part of the LZO real-time data compression library.
 
7
 *
 
8
 * Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
 
9
 * Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
 
10
 * Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
 
11
 * Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
 
12
 * Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
 
13
 * Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
 
14
 * Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
 
15
 * All Rights Reserved.
 
16
 *
 
17
 * The LZO library is free software; you can redistribute it and/or
 
18
 * modify it under the terms of the GNU General Public License as
 
19
 * published by the Free Software Foundation; either version 2 of
 
20
 * the License, or (at your option) any later version.
 
21
 *
 
22
 * The LZO library is distributed in the hope that it will be useful,
 
23
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
24
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
25
 * GNU General Public License for more details.
 
26
 *
 
27
 * You should have received a copy of the GNU General Public License
 
28
 * along with the LZO library; see the file COPYING.
 
29
 * If not, write to the Free Software Foundation, Inc.,
 
30
 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
31
 *
 
32
 * Markus F.X.J. Oberhumer
 
33
 * <markus@oberhumer.com>
 
34
 * http://www.oberhumer.com/opensource/lzo/
 
35
 *
37
36
 * NOTE:
38
37
 *   the full LZO package can be found at
39
38
 *   http://www.oberhumer.com/opensource/lzo/
231
230
#  error "LZO_ALIGNED_OK_4 must not be defined on this system"
232
231
#endif
233
232
 
234
 
#define LZO_LITTLE_ENDIAN          1234
235
 
#define LZO_BIG_ENDIAN            4321
236
 
#define LZO_PDP_ENDIAN            3412
 
233
#define LZO_LITTLE_ENDIAN 1234
 
234
#define LZO_BIG_ENDIAN    4321
 
235
#define LZO_PDP_ENDIAN    3412
237
236
 
238
237
#if !defined(LZO_BYTE_ORDER)
239
238
#  if defined(MFX_BYTE_ORDER)
1030
1029
                {
1031
1030
                register const lzo_byte *m_pos;
1032
1031
                lzo_moff_t m_off;
1033
 
                lzo_uint m_len;
 
1032
                lzo_ptrdiff_t m_len;
1034
1033
                lzo_uint dindex;
1035
1034
 
1036
1035
                DINDEX1(dindex,ip);
1184
1183
                        break;
1185
1184
        }
1186
1185
 
1187
 
        *out_len = op - out;
 
1186
        *out_len = (lzo_uint)(op - out);
1188
1187
        return pd(in_end,ii);
1189
1188
}
1190
1189
 
1234
1233
        *op++ = 0;
1235
1234
        *op++ = 0;
1236
1235
 
1237
 
        *out_len = op - out;
 
1236
        *out_len = (lzo_uint)(op - out);
1238
1237
        return LZO_E_OK;
1239
1238
}
1240
1239
 
1556
1555
 
1557
1556
eof_found:
1558
1557
        assert(t == 1);
1559
 
        *out_len = op - out;
 
1558
        *out_len = (lzo_uint)(op - out);
1560
1559
        return (ip == ip_end ? LZO_E_OK :
1561
1560
                   (ip < ip_end  ? LZO_E_INPUT_NOT_CONSUMED : LZO_E_INPUT_OVERRUN));
1562
1561