~ubuntu-branches/ubuntu/hardy/ghostscript/hardy

« back to all changes in this revision

Viewing changes to libpng/contrib/gregbook/rpng2-win.c

  • Committer: Bazaar Package Importer
  • Author(s): Till Kamppeter
  • Date: 2007-11-22 12:17:43 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20071122121743-cd70s3ypq0r243mp
Tags: 8.61.dfsg.1-0ubtuntu1
* New upstream release
  o Final 8.61 release
* debian/patches/09_ijs_krgb_support.dpatch: Adapted to upstream changes.
* debian/rules: Updated CUPS-related variables for "make install" calls.
* debian/rules: Remove /usr/include/ghostscript from the ghostscript
  package, they go into lings-dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
    - 1.10:  enabled "message window"/console (thanks to David Geldreich)
28
28
    - 1.20:  added runtime MMX-enabling/disabling and new -mmx* options
29
29
    - 1.21:  made minor tweak to usage screen to fit within 25-line console
 
30
    - 1.22:  added AMD64/EM64T support (__x86_64__)
 
31
    - 2.00:  dual-licensed (added GNU GPL)
30
32
 
31
33
  ---------------------------------------------------------------------------
32
34
 
33
 
      Copyright (c) 1998-2001 Greg Roelofs.  All rights reserved.
 
35
      Copyright (c) 1998-2007 Greg Roelofs.  All rights reserved.
34
36
 
35
37
      This software is provided "as is," without warranty of any kind,
36
38
      express or implied.  In no event shall the author or contributors
37
39
      be held liable for any damages arising in any way from the use of
38
40
      this software.
39
41
 
 
42
      The contents of this file are DUAL-LICENSED.  You may modify and/or
 
43
      redistribute this software according to the terms of one of the
 
44
      following two licenses (at your option):
 
45
 
 
46
 
 
47
      LICENSE 1 ("BSD-like with advertising clause"):
 
48
 
40
49
      Permission is granted to anyone to use this software for any purpose,
41
50
      including commercial applications, and to alter it and redistribute
42
51
      it freely, subject to the following restrictions:
53
62
            and contributors for the book, "PNG: The Definitive Guide,"
54
63
            published by O'Reilly and Associates.
55
64
 
 
65
 
 
66
      LICENSE 2 (GNU GPL v2 or later):
 
67
 
 
68
      This program is free software; you can redistribute it and/or modify
 
69
      it under the terms of the GNU General Public License as published by
 
70
      the Free Software Foundation; either version 2 of the License, or
 
71
      (at your option) any later version.
 
72
 
 
73
      This program is distributed in the hope that it will be useful,
 
74
      but WITHOUT ANY WARRANTY; without even the implied warranty of
 
75
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
76
      GNU General Public License for more details.
 
77
 
 
78
      You should have received a copy of the GNU General Public License
 
79
      along with this program; if not, write to the Free Software Foundation,
 
80
      Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
81
 
56
82
  ---------------------------------------------------------------------------*/
57
83
 
58
84
#define PROGNAME  "rpng2-win"
59
85
#define LONGNAME  "Progressive PNG Viewer for Windows"
60
 
#define VERSION   "1.21 of 29 June 2001"
 
86
#define VERSION   "2.00 of 2 June 2007"
61
87
 
62
88
#include <stdio.h>
63
89
#include <stdlib.h>
119
145
LRESULT CALLBACK  rpng2_win_wndproc(HWND, UINT, WPARAM, LPARAM);
120
146
 
121
147
 
122
 
static char titlebar[1024], *window_name = titlebar;
 
148
static char titlebar[1024];
123
149
static char *progname = PROGNAME;
124
150
static char *appname = LONGNAME;
125
 
static char *icon_name = PROGNAME;    /* GRR:  not (yet) used */
126
151
static char *filename;
127
152
static FILE *infile;
128
153
 
367
392
            }
368
393
        } else if (!strncmp(*argv, "-timing", 2)) {
369
394
            timing = TRUE;
370
 
#if (defined(__i386__) || defined(_M_IX86))
 
395
#if (defined(__i386__) || defined(_M_IX86) || defined(__x86_64__))
371
396
        } else if (!strncmp(*argv, "-nommxfilters", 7)) {
372
397
            rpng2_info.nommxfilters = TRUE;
373
398
        } else if (!strncmp(*argv, "-nommxcombine", 7)) {
432
457
        readpng2_version_info();
433
458
        fprintf(stderr, "\n"
434
459
          "Usage:  %s [-gamma exp] [-bgcolor bg | -bgpat pat] [-timing]\n"
435
 
#if (defined(__i386__) || defined(_M_IX86))
 
460
#if (defined(__i386__) || defined(_M_IX86) || defined(__x86_64__))
436
461
          "        %*s [[-nommxfilters] [-nommxcombine] [-nommxinterlace] | -nommx]\n"
437
462
#endif
438
463
          "        %*s file.png\n\n"
447
472
          "\t\t  transparent images; overrides -bgcolor option\n"
448
473
          "    -timing\tenables delay for every block read, to simulate modem\n"
449
474
          "\t\t  download of image (~36 Kbps)\n"
450
 
#if (defined(__i386__) || defined(_M_IX86))
 
475
#if (defined(__i386__) || defined(_M_IX86) || defined(__x86_64__))
451
476
          "    -nommx*\tdisable optimized MMX routines for decoding row filters,\n"
452
477
          "\t\t  combining rows, and expanding interlacing, respectively\n"
453
478
#endif
454
479
          "\nPress Q, Esc or mouse button 1 after image is displayed to quit.\n"
455
480
          "Press Q or Esc to quit this usage screen. ",
456
481
          PROGNAME,
457
 
#if (defined(__i386__) || defined(_M_IX86))
458
 
          strlen(PROGNAME), " ",
 
482
#if (defined(__i386__) || defined(_M_IX86) || defined(__x86_64__))
 
483
          (int)strlen(PROGNAME), " ",
459
484
#endif
460
 
          strlen(PROGNAME), " ", default_display_exponent, num_bgpat);
 
485
          (int)strlen(PROGNAME), " ", default_display_exponent, num_bgpat);
461
486
        fflush(stderr);
462
487
        do
463
488
            ch = _getch();