aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/bzip2/spewG.c
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-01-13 17:24:39 +1000
committerDavid Walter Seikel2013-01-13 17:24:39 +1000
commit393b5cd1dc438872af89d334ef6e5fcc59f27d47 (patch)
tree6a14521219942a08a1b95cb2f5a923a9edd60f63 /libraries/irrlicht-1.8/source/Irrlicht/bzip2/spewG.c
parentAdd a note about rasters suggested start up code. (diff)
downloadSledjHamr-393b5cd1dc438872af89d334ef6e5fcc59f27d47.zip
SledjHamr-393b5cd1dc438872af89d334ef6e5fcc59f27d47.tar.gz
SledjHamr-393b5cd1dc438872af89d334ef6e5fcc59f27d47.tar.bz2
SledjHamr-393b5cd1dc438872af89d334ef6e5fcc59f27d47.tar.xz
Added Irrlicht 1.8, but without all the Windows binaries.
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/bzip2/spewG.c')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/bzip2/spewG.c54
1 files changed, 54 insertions, 0 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/bzip2/spewG.c b/libraries/irrlicht-1.8/source/Irrlicht/bzip2/spewG.c
new file mode 100644
index 0000000..14a3649
--- /dev/null
+++ b/libraries/irrlicht-1.8/source/Irrlicht/bzip2/spewG.c
@@ -0,0 +1,54 @@
1
2/* spew out a thoroughly gigantic file designed so that bzip2
3 can compress it reasonably rapidly. This is to help test
4 support for large files (> 2GB) in a reasonable amount of time.
5 I suggest you use the undocumented --exponential option to
6 bzip2 when compressing the resulting file; this saves a bit of
7 time. Note: *don't* bother with --exponential when compressing
8 Real Files; it'll just waste a lot of CPU time :-)
9 (but is otherwise harmless).
10*/
11
12/* ------------------------------------------------------------------
13 This file is part of bzip2/libbzip2, a program and library for
14 lossless, block-sorting data compression.
15
16 bzip2/libbzip2 version 1.0.6 of 6 September 2010
17 Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
18
19 Please read the WARNING, DISCLAIMER and PATENTS sections in the
20 README file.
21
22 This program is released under the terms of the license contained
23 in the file LICENSE.
24 ------------------------------------------------------------------ */
25
26
27#define _FILE_OFFSET_BITS 64
28
29#include <stdio.h>
30#include <stdlib.h>
31
32/* The number of megabytes of junk to spew out (roughly) */
33#define MEGABYTES 5000
34
35#define N_BUF 1000000
36char buf[N_BUF];
37
38int main ( int argc, char** argv )
39{
40 int ii, kk, p;
41 srandom(1);
42 setbuffer ( stdout, buf, N_BUF );
43 for (kk = 0; kk < MEGABYTES * 515; kk+=3) {
44 p = 25+random()%50;
45 for (ii = 0; ii < p; ii++)
46 printf ( "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" );
47 for (ii = 0; ii < p-1; ii++)
48 printf ( "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" );
49 for (ii = 0; ii < p+1; ii++)
50 printf ( "ccccccccccccccccccccccccccccccccccccc" );
51 }
52 fflush(stdout);
53 return 0;
54}