MSVC updates.
This commit is contained in:
parent
1482f0bf43
commit
8d2cb0f304
@ -1,4 +1,4 @@
|
||||
/* $Header: /cvs/maptools/cvsroot/libtiff/tools/fax2ps.c,v 1.8 2003-10-03 13:09:38 dron Exp $" */
|
||||
/* $Id: fax2ps.c,v 1.9 2004-04-15 10:44:32 dron Exp $" */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991-1997 Sam Leffler
|
||||
@ -23,19 +23,16 @@
|
||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||
* OF THIS SOFTWARE.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
||||
#if defined(VMS)
|
||||
#include <unixio.h>
|
||||
#elif defined(_WINDOWS)
|
||||
#if HAVE_IO_H
|
||||
# include <io.h>
|
||||
#define off_t toff_t
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "tiffio.h"
|
||||
@ -64,7 +61,7 @@ printruns(unsigned char* buf, uint32* runs, uint32* erun, uint32 lastx)
|
||||
{
|
||||
static struct {
|
||||
char white, black;
|
||||
short width;
|
||||
unsigned short width;
|
||||
} WBarr[] = {
|
||||
{ 'd', 'n', 512 }, { 'e', 'o', 256 }, { 'f', 'p', 128 },
|
||||
{ 'g', 'q', 64 }, { 'h', 'r', 32 }, { 'i', 's', 16 },
|
||||
@ -74,9 +71,9 @@ printruns(unsigned char* buf, uint32* runs, uint32* erun, uint32 lastx)
|
||||
static char* svalue =
|
||||
" !\"#$&'*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abc";
|
||||
int colormode = 1; /* 0 for white, 1 for black */
|
||||
int runlength = 0;
|
||||
uint32 runlength = 0;
|
||||
int n = maxline;
|
||||
int x = 0;
|
||||
uint32 x = 0;
|
||||
int l;
|
||||
|
||||
(void) buf;
|
||||
@ -114,7 +111,7 @@ printruns(unsigned char* buf, uint32* runs, uint32* erun, uint32 lastx)
|
||||
l++;
|
||||
}
|
||||
while (runlength > 0 && runlength <= 6) {
|
||||
int bitsleft = 6;
|
||||
uint32 bitsleft = 6;
|
||||
int t = 0;
|
||||
while (bitsleft) {
|
||||
if (runlength <= bitsleft) {
|
||||
@ -208,8 +205,8 @@ printTIF(TIFF* tif, int pageNumber)
|
||||
}
|
||||
if (TIFFGetField(tif, TIFFTAG_RESOLUTIONUNIT, &unit) &&
|
||||
unit == RESUNIT_CENTIMETER) {
|
||||
xres *= 2.54;
|
||||
yres *= 2.54;
|
||||
xres *= 2.54F;
|
||||
yres *= 2.54F;
|
||||
}
|
||||
if (pageWidth == 0)
|
||||
pageWidth = w / xres;
|
||||
@ -320,13 +317,13 @@ main(int argc, char** argv)
|
||||
while ((c = getopt(argc, argv, "l:p:x:y:W:H:wS")) != -1)
|
||||
switch (c) {
|
||||
case 'H': /* page height */
|
||||
pageHeight = atof(optarg);
|
||||
pageHeight = (float)atof(optarg);
|
||||
break;
|
||||
case 'S': /* scale to page */
|
||||
scaleToPage = 1;
|
||||
break;
|
||||
case 'W': /* page width */
|
||||
pageWidth = atof(optarg);
|
||||
pageWidth = (float)atof(optarg);
|
||||
break;
|
||||
case 'p': /* print specific page */
|
||||
pageNumber = atoi(optarg);
|
||||
@ -345,10 +342,10 @@ main(int argc, char** argv)
|
||||
dowarnings = 1;
|
||||
break;
|
||||
case 'x':
|
||||
defxres = atof(optarg);
|
||||
defxres = (float)atof(optarg);
|
||||
break;
|
||||
case 'y':
|
||||
defyres = atof(optarg);
|
||||
defyres = (float)atof(optarg);
|
||||
break;
|
||||
case 'l':
|
||||
maxline = atoi(optarg);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: tiffcp.c,v 1.21 2004-03-26 15:52:47 dron Exp $ */
|
||||
/* $Id: tiffcp.c,v 1.22 2004-04-15 10:44:32 dron Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988-1997 Sam Leffler
|
||||
@ -92,7 +92,7 @@ static int nextSrcImage (TIFF *tif, char **imageSpec)
|
||||
{
|
||||
if (**imageSpec == comma) { /* if not @comma, we've done all images */
|
||||
char *start = *imageSpec + 1;
|
||||
unsigned long nextImage = strtol (start, imageSpec, 0);
|
||||
tdir_t nextImage = (tdir_t)strtol(start, imageSpec, 0);
|
||||
if (start == *imageSpec) nextImage = TIFFCurrentDirectory (tif);
|
||||
if (**imageSpec)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Header: /cvs/maptools/cvsroot/libtiff/tools/tiffinfo.c,v 1.2 2003-03-12 14:05:06 dron Exp $ */
|
||||
/* $Id: tiffinfo.c,v 1.3 2004-04-15 10:44:32 dron Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988-1997 Sam Leffler
|
||||
@ -239,7 +239,7 @@ static void
|
||||
ShowTile(uint32 row, uint32 col, tsample_t sample,
|
||||
unsigned char* pp, uint32 nrow, uint32 rowsize)
|
||||
{
|
||||
register tsize_t cc;
|
||||
uint32 cc;
|
||||
|
||||
printf("Tile (%lu,%lu", (unsigned long) row, (unsigned long) col);
|
||||
if (sample != (tsample_t) -1)
|
||||
@ -337,7 +337,7 @@ TIFFReadData(TIFF* tif)
|
||||
static void
|
||||
ShowRawBytes(unsigned char* pp, uint32 n)
|
||||
{
|
||||
tsize_t i;
|
||||
uint32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
printf(" %02x", *pp++);
|
||||
@ -350,7 +350,7 @@ ShowRawBytes(unsigned char* pp, uint32 n)
|
||||
static void
|
||||
ShowRawWords(uint16* pp, uint32 n)
|
||||
{
|
||||
tsize_t i;
|
||||
uint32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
printf(" %04x", *pp++);
|
||||
@ -369,7 +369,7 @@ TIFFReadRawData(TIFF* tif, int bitrev)
|
||||
|
||||
TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &stripbc);
|
||||
if (nstrips > 0) {
|
||||
tsize_t bufsize = stripbc[0];
|
||||
uint32 bufsize = stripbc[0];
|
||||
tdata_t buf = _TIFFmalloc(bufsize);
|
||||
tstrip_t s;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user