]> git.pld-linux.org Git - packages/wget.git/blob - wget-porn.patch
- added new functionality - save non permament cookies
[packages/wget.git] / wget-porn.patch
1 diff -ur wget-1.9.1/src/progress.c wget-1.9.1-porn/src/progress.c
2 --- wget-1.9.1/src/progress.c   2003-09-23 20:48:10.000000000 +0000
3 +++ wget-1.9.1-porn/src/progress.c      2004-02-13 12:11:13.000000000 +0000
4 @@ -659,15 +659,19 @@
5       randomly.
6  
7       "xx% " or "100%"  - percentage               - 4 chars
8 -     "[]"              - progress bar decorations - 2 chars
9 +     "8(_o_)"          - progress bar decorations - 6 chars
10       " nnn,nnn,nnn"    - downloaded bytes         - 12 chars or very rarely more
11       " 1012.56K/s"     - dl rate                  - 11 chars
12       " ETA xx:xx:xx"   - ETA                      - 13 chars
13  
14 -     "=====>..."       - progress bar             - the rest
15 +     "=====D..."       - progress bar             - the rest
16    */
17    int dlbytes_size = 1 + MAX (size_legible_len, 11);
18 -  int progress_size = bp->width - (4 + 2 + dlbytes_size + 11 + 13);
19 +  int progress_size = bp->width - (4 + 6 + dlbytes_size + 11 + 13);
20 +
21 +  int percentage = (int)(100.0 * size / bp->total_length);
22 +
23 +  assert (percentage <= 100);
24  
25    if (progress_size < 5)
26      progress_size = 0;
27 @@ -675,9 +679,6 @@
28    /* "xx% " */
29    if (bp->total_length > 0)
30      {
31 -      int percentage = (int)(100.0 * size / bp->total_length);
32 -
33 -      assert (percentage <= 100);
34  
35        if (percentage < 100)
36         sprintf (p, "%2d%% ", percentage);
37 @@ -703,7 +704,7 @@
38        assert (dlsz <= progress_size);
39        assert (insz <= dlsz);
40  
41 -      *p++ = '[';
42 +      *p++ = '8';
43        begin = p;
44  
45        /* Print the initial portion of the download with '+' chars, the
46 @@ -715,12 +716,23 @@
47         {
48           for (i = 0; i < dlsz - 1; i++)
49             *p++ = '=';
50 -         *p++ = '>';
51 +         *p++ = 'D';
52         }
53  
54        while (p - begin < progress_size)
55         *p++ = ' ';
56 -      *p++ = ']';
57 +      *p++ = '(';
58 +      *p++ = '_';
59 +      if (percentage < 25)
60 +        *p++ = '.';
61 +      else if (percentage < 50)
62 +        *p++ = 'o';
63 +      else if (percentage < 75)
64 +        *p++ = '0';
65 +      else
66 +        *p++ = 'O';
67 +      *p++ = '_';
68 +      *p++ = ')';
69      }
70    else if (progress_size)
71      {
This page took 0.033484 seconds and 3 git commands to generate.