Revision: 42351
http://brlcad.svn.sourceforge.net/brlcad/?rev=42351&view=rev
Author: johnranderson
Date: 2011-01-17 01:09:32 +0000 (Mon, 17 Jan 2011)
Log Message:
-----------
fixed a bunch of size_t issues.
Modified Paths:
--------------
brlcad/trunk/include/fb.h
brlcad/trunk/src/canon/canon.h
brlcad/trunk/src/canon/canonize.c
brlcad/trunk/src/canon/canonlib.c
brlcad/trunk/src/fb/bw-fb.c
brlcad/trunk/src/fb/pix-fb.c
brlcad/trunk/src/fb/pixautosize.c
brlcad/trunk/src/libfb/asize.c
brlcad/trunk/src/libfb/tcl.c
brlcad/trunk/src/util/bw-a.c
brlcad/trunk/src/util/bw-imp.c
brlcad/trunk/src/util/bw-png.c
brlcad/trunk/src/util/bw-ps.c
brlcad/trunk/src/util/bw-rle.c
brlcad/trunk/src/util/double-asc.c
brlcad/trunk/src/util/imgdims.c
brlcad/trunk/src/util/pix-ppm.c
brlcad/trunk/src/util/pix-ps.c
brlcad/trunk/src/util/pix-yuv.c
brlcad/trunk/src/util/pixbgstrip.c
brlcad/trunk/src/util/pixborder.c
brlcad/trunk/src/util/pixcut.c
brlcad/trunk/src/util/pixhalve.c
brlcad/trunk/src/util/pixmorph.c
brlcad/trunk/src/util/pixpaste.c
brlcad/trunk/src/util/yuv-pix.c
Modified: brlcad/trunk/include/fb.h
===================================================================
--- brlcad/trunk/include/fb.h 2011-01-17 01:05:14 UTC (rev 42350)
+++ brlcad/trunk/include/fb.h 2011-01-17 01:09:32 UTC (rev 42351)
@@ -89,9 +89,9 @@
FB_EXPORT extern int fb_null_setcursor(FBIO *ifp, const unsigned char *bits,
int xbits, int ybits, int xorig, int yorig);
/* utility functions */
-FB_EXPORT extern int fb_common_file_size(unsigned long int *widthp, unsigned
long int *heightp, const char *filename, int pixel_size);
-FB_EXPORT extern int fb_common_image_size(unsigned long int *widthp, unsigned
long int *heightp, unsigned long int npixels);
-FB_EXPORT extern int fb_common_name_size(unsigned long int *widthp, unsigned
long int *heightp, const char *name);
+FB_EXPORT extern int fb_common_file_size(size_t *widthp, size_t *heightp,
const char *filename, int pixel_size);
+FB_EXPORT extern int fb_common_image_size(size_t *widthp, size_t *heightp,
size_t npixels);
+FB_EXPORT extern int fb_common_name_size(size_t *widthp, size_t *heightp,
const char *name);
/* color mapping */
FB_EXPORT extern int fb_is_linear_cmap(const ColorMap *cmap);
Modified: brlcad/trunk/src/canon/canon.h
===================================================================
--- brlcad/trunk/src/canon/canon.h 2011-01-17 01:05:14 UTC (rev 42350)
+++ brlcad/trunk/src/canon/canon.h 2011-01-17 01:09:32 UTC (rev 42351)
@@ -108,8 +108,8 @@
extern int tray;
extern char conv;
extern char clear;
-extern unsigned long width;
-extern unsigned long height;
+extern size_t width;
+extern size_t height;
extern int zoom;
extern int scr_width;
extern int scr_height;
Modified: brlcad/trunk/src/canon/canonize.c
===================================================================
--- brlcad/trunk/src/canon/canonize.c 2011-01-17 01:05:14 UTC (rev 42350)
+++ brlcad/trunk/src/canon/canonize.c 2011-01-17 01:09:32 UTC (rev 42351)
@@ -69,7 +69,7 @@
for (args=1; args < arg_c; args++) {
if (BU_STR_EQUAL(arg_v[args], "-a")) {
- fprintf(pfp, " -w %ld -n %ld", width, height);
+ fprintf(pfp, " -w %lu -n %lu", (unsigned long)width, (unsigned
long)height);
} if (BU_STR_EQUAL(arg_v[args], "-d")) {
args += 2; /* skip device specification */
} if (BU_STR_EQUAL(arg_v[args], "-v") ||
Modified: brlcad/trunk/src/canon/canonlib.c
===================================================================
--- brlcad/trunk/src/canon/canonlib.c 2011-01-17 01:05:14 UTC (rev 42350)
+++ brlcad/trunk/src/canon/canonlib.c 2011-01-17 01:09:32 UTC (rev 42351)
@@ -1160,8 +1160,8 @@
int tray = IPU_UPPER_CASSETTE;
char conv = IPU_AUTOSCALE;
char clear = 0;
-unsigned long width = 512;
-unsigned long height = 512;
+size_t width = 512;
+size_t height = 512;
int zoom = 0;
int scr_width;
int scr_height;
Modified: brlcad/trunk/src/fb/bw-fb.c
===================================================================
--- brlcad/trunk/src/fb/bw-fb.c 2011-01-17 01:05:14 UTC (rev 42350)
+++ brlcad/trunk/src/fb/bw-fb.c 2011-01-17 01:09:32 UTC (rev 42351)
@@ -190,7 +190,7 @@
/* autosize input? */
if (fileinput && autosize) {
- unsigned long int w, h;
+ size_t w, h;
if (fb_common_file_size(&w, &h, file_name, 1)) {
file_width = w;
file_height = h;
Modified: brlcad/trunk/src/fb/pix-fb.c
===================================================================
--- brlcad/trunk/src/fb/pix-fb.c 2011-01-17 01:05:14 UTC (rev 42350)
+++ brlcad/trunk/src/fb/pix-fb.c 2011-01-17 01:09:32 UTC (rev 42351)
@@ -220,7 +220,7 @@
/* autosize input? */
if (fileinput && autosize) {
- unsigned long int w, h;
+ size_t w, h;
if (fb_common_file_size(&w, &h, file_name, 3)) {
file_width = w;
file_height = h;
Modified: brlcad/trunk/src/fb/pixautosize.c
===================================================================
--- brlcad/trunk/src/fb/pixautosize.c 2011-01-17 01:05:14 UTC (rev 42350)
+++ brlcad/trunk/src/fb/pixautosize.c 2011-01-17 01:09:32 UTC (rev 42351)
@@ -42,8 +42,8 @@
static int file_length = 0;
static char *file_name;
-static unsigned long int width;
-static unsigned long int height;
+static size_t width;
+static size_t height;
static char usage[] = "\
Usage: pixautosize [-b bytes_per_sample] [-f file_name]\n\
@@ -110,7 +110,7 @@
* print out the width and height on stdout.
* They will be zero on error.
*/
- printf("WIDTH=%lu; HEIGHT=%lu\n", width, height);
+ printf("WIDTH=%lu; HEIGHT=%lu\n", (unsigned long)width, (unsigned
long)height);
return ret;
}
Modified: brlcad/trunk/src/libfb/asize.c
===================================================================
--- brlcad/trunk/src/libfb/asize.c 2011-01-17 01:05:14 UTC (rev 42350)
+++ brlcad/trunk/src/libfb/asize.c 2011-01-17 01:09:32 UTC (rev 42351)
@@ -40,8 +40,8 @@
/* This table does not need to include any square sizes */
struct sizes {
- unsigned long int width; /* image width in pixels */
- unsigned long int height; /* image height in pixels */
+ size_t width; /* image width in pixels */
+ size_t height; /* image height in pixels */
};
struct sizes fb_common_sizes[] = {
{ 160, 120 }, /* quarter 640x480 */
@@ -87,14 +87,14 @@
* 1 width and height returned
*/
int
-fb_common_file_size(unsigned long int *widthp, unsigned long int *heightp,
const char *filename, int pixel_size)
+fb_common_file_size(size_t *widthp, size_t *heightp, const char *filename, int
pixel_size)
/* pointer to returned width */
/* pointer to returned height */
/* image file to stat */
/* bytes per pixel */
{
struct stat sbuf;
- unsigned long int size;
+ size_t size;
register const char *cp;
*widthp = *heightp = 0; /* sanity */
@@ -121,7 +121,7 @@
if (stat(filename, &sbuf) < 0)
return 0;
- size = (unsigned long int)(sbuf.st_size / pixel_size);
+ size = (size_t)(sbuf.st_size / pixel_size);
return fb_common_image_size(widthp, heightp, size);
}
@@ -139,19 +139,24 @@
*/
int
-fb_common_name_size(unsigned long int *widthp, unsigned long int *heightp,
const char *name)
+fb_common_name_size(size_t *widthp, size_t *heightp, const char *name)
/* pointer to returned width */
/* pointer to returned height */
/* name to parse */
{
register const char *cp = name;
+ unsigned long w;
+ unsigned long h;
/* File name may have several minus signs in it. Try repeatedly */
while (*cp) {
cp = strchr(cp, '-'); /* Find a minus sign */
if (cp == NULL) break;
- if (sscanf(cp, "-w%lu-n%lu", widthp, heightp) == 2)
+ if (sscanf(cp, "-w%lu-n%lu", &w, &h) == 2) {
+ *widthp = w;
+ *heightp = h;
return 1;
+ }
cp++; /* skip over the minus */
}
@@ -172,13 +177,13 @@
* 1 width and height returned
*/
int
-fb_common_image_size(unsigned long int *widthp, unsigned long int *heightp,
unsigned long int npixels)
+fb_common_image_size(size_t *widthp, size_t *heightp, size_t npixels)
/* pointer to returned width */
/* pointer to returned height */
/* Number of pixels */
{
struct sizes *sp;
- unsigned long int root;
+ size_t root;
if (npixels <= 0)
return 0;
@@ -194,7 +199,7 @@
}
/* If the size is a perfect square, then use that. */
- root = (long int)(sqrt((double)npixels)+0.999);
+ root = (size_t)(sqrt((double)npixels)+0.999);
if (root*root == npixels) {
*widthp = root;
*heightp = root;
Modified: brlcad/trunk/src/libfb/tcl.c
===================================================================
--- brlcad/trunk/src/libfb/tcl.c 2011-01-17 01:05:14 UTC (rev 42350)
+++ brlcad/trunk/src/libfb/tcl.c 2011-01-17 01:09:32 UTC (rev 42351)
@@ -373,7 +373,7 @@
int
fb_cmd_common_file_size(ClientData UNUSED(clientData), Tcl_Interp *interp, int
argc, char **argv)
{
- unsigned long int width, height;
+ size_t width, height;
int pixel_size = 3;
if (argc != 2 && argc != 3) {
@@ -388,7 +388,7 @@
if (fb_common_file_size(&width, &height, argv[1], pixel_size) > 0) {
struct bu_vls vls;
bu_vls_init(&vls);
- bu_vls_printf(&vls, "%lu %lu", width, height);
+ bu_vls_printf(&vls, "%lu %lu", (unsigned long)width, (unsigned
long)height);
Tcl_SetObjResult(interp,
Tcl_NewStringObj(bu_vls_addr(&vls),
bu_vls_strlen(&vls)));
bu_vls_free(&vls);
Modified: brlcad/trunk/src/util/bw-a.c
===================================================================
--- brlcad/trunk/src/util/bw-a.c 2011-01-17 01:05:14 UTC (rev 42350)
+++ brlcad/trunk/src/util/bw-a.c 2011-01-17 01:09:32 UTC (rev 42351)
@@ -117,7 +117,7 @@
/* autosize the input? */
if (fileinput && autosize) {
- unsigned long int w, h;
+ size_t w, h;
if (fb_common_file_size(&w, &h, file_name, 1)) {
file_width = (long)w;
} else {
Modified: brlcad/trunk/src/util/bw-imp.c
===================================================================
--- brlcad/trunk/src/util/bw-imp.c 2011-01-17 01:05:14 UTC (rev 42350)
+++ brlcad/trunk/src/util/bw-imp.c 2011-01-17 01:09:32 UTC (rev 42351)
@@ -183,7 +183,7 @@
im_wpatches = (im_width+31) / 32;
im_hpatches = ((height * im_mag)+31) / 32;
if (im_wpatches*32 > 2560) {
- fprintf(stderr, "bw-imp: output %ld too wide, limit is 2560\n",
+ fprintf(stderr, "bw-imp: output %d too wide, limit is 2560\n",
im_wpatches*32);
return 1;
}
Modified: brlcad/trunk/src/util/bw-png.c
===================================================================
--- brlcad/trunk/src/util/bw-png.c 2011-01-17 01:05:14 UTC (rev 42350)
+++ brlcad/trunk/src/util/bw-png.c 2011-01-17 01:09:32 UTC (rev 42351)
@@ -122,7 +122,7 @@
/* autosize input? */
if (fileinput && autosize) {
- unsigned long int w, h;
+ size_t w, h;
if (fb_common_file_size(&w, &h, file_name, 1)) {
file_width = (long)w;
file_height = (long)h;
Modified: brlcad/trunk/src/util/bw-ps.c
===================================================================
--- brlcad/trunk/src/util/bw-ps.c 2011-01-17 01:05:14 UTC (rev 42350)
+++ brlcad/trunk/src/util/bw-ps.c 2011-01-17 01:09:32 UTC (rev 42351)
@@ -161,10 +161,10 @@
for (y = 0; y < height; y += scans_per_patch) {
/* start a patch */
fprintf(ofp, "save\n");
- fprintf(ofp, "%ld %ld 8 [%ld 0 0 %ld 0 %ld] {<\n ",
- width, scans_per_patch, /* patch size */
- width, height, /* total size = 1.0 */
- -y); /* patch y origin */
+ fprintf(ofp, "%lu %lu 8 [%lu 0 0 %lu 0 %lu] {<\n ",
+ (unsigned long)width, (unsigned long)scans_per_patch,
/* patch size */
+ (unsigned long)width, (unsigned long)height,
/* total size = 1.0 */
+ (unsigned long)-y); /* patch y
origin */
/* data */
num = 0;
@@ -216,7 +216,7 @@
pagewidth = pageheight;
pageheight = tmp;
fprintf(fp, "90 rotate\n");
- fprintf(fp, "0 -%ld translate\n", pageheight);
+ fprintf(fp, "0 -%lu translate\n", (unsigned long)pageheight);
}
if (!encapsulated && center) {
int xtrans, ytrans;
Modified: brlcad/trunk/src/util/bw-rle.c
===================================================================
--- brlcad/trunk/src/util/bw-rle.c 2011-01-17 01:05:14 UTC (rev 42350)
+++ brlcad/trunk/src/util/bw-rle.c 2011-01-17 01:09:32 UTC (rev 42351)
@@ -195,8 +195,8 @@
for (y = 0; y < file_height; y++) {
if (fread((char *)scan_buf, sizeof(unsigned char), (size_t)file_width,
infp) != file_width) {
(void) fprintf(stderr,
- "pix-rle: read of %ld pixels on line %ld failed!\n",
- file_width, y);
+ "pix-rle: read of %lu pixels on line %lu failed!\n",
+ (unsigned long)file_width, (unsigned long)y);
bu_exit (1, NULL);
}
Modified: brlcad/trunk/src/util/double-asc.c
===================================================================
--- brlcad/trunk/src/util/double-asc.c 2011-01-17 01:05:14 UTC (rev 42350)
+++ brlcad/trunk/src/util/double-asc.c 2011-01-17 01:09:32 UTC (rev 42351)
@@ -159,7 +159,7 @@
/* autosize input? */
if (fileinput && autosize) {
- unsigned long int w, h;
+ size_t w, h;
if (fb_common_file_size(&w, &h, file_name, d_per_l * 8)) {
file_width = (long)w;
Modified: brlcad/trunk/src/util/imgdims.c
===================================================================
--- brlcad/trunk/src/util/imgdims.c 2011-01-17 01:05:14 UTC (rev 42350)
+++ brlcad/trunk/src/util/imgdims.c 2011-01-17 01:09:32 UTC (rev 42351)
@@ -102,8 +102,8 @@
int how = BELIEVE_NAME;
int nm_bytes = -1;
int nm_pixels = 0;
- unsigned long int width;
- unsigned long int height;
+ size_t width;
+ size_t height;
struct stat stat_buf;
/*
Modified: brlcad/trunk/src/util/pix-ppm.c
===================================================================
--- brlcad/trunk/src/util/pix-ppm.c 2011-01-17 01:05:14 UTC (rev 42350)
+++ brlcad/trunk/src/util/pix-ppm.c 2011-01-17 01:09:32 UTC (rev 42351)
@@ -181,7 +181,7 @@
/* autosize input? */
if (fileinput && autosize) {
- unsigned long int w, h;
+ size_t w, h;
if (fb_common_file_size(&w, &h, file_name, pixbytes)) {
file_width = (long)w;
file_height = (long)h;
Modified: brlcad/trunk/src/util/pix-ps.c
===================================================================
--- brlcad/trunk/src/util/pix-ps.c 2011-01-17 01:05:14 UTC (rev 42350)
+++ brlcad/trunk/src/util/pix-ps.c 2011-01-17 01:09:32 UTC (rev 42351)
@@ -82,7 +82,7 @@
fputs("%%Creator: BRL-CAD pix-ps\n", fp);
fprintf(fp, "%%%%CreationDate: %s", ctime(<ime));
}
- fprintf(fp, "%%%%BoundingBox: 0 0 %ld %ld\n", w, h);
+ fprintf(fp, "%%%%BoundingBox: 0 0 %lu %lu\n", (unsigned long)w, (unsigned
long)h);
fputs("%%EndComments\n\n", fp);
if (!encapsulated && landscape) {
@@ -91,15 +91,15 @@
pagewidth = pageheight;
pageheight = tmp;
fprintf(fp, "90 rotate\n");
- fprintf(fp, "0 -%ld translate\n", pageheight);
+ fprintf(fp, "0 -%lu translate\n", (unsigned long)pageheight);
}
if (!encapsulated && center) {
size_t xtrans, ytrans;
xtrans = (pagewidth - w)/2.0;
ytrans = (pageheight - h)/2.0;
- fprintf(fp, "%ld %ld translate\n", xtrans, ytrans);
+ fprintf(fp, "%lu %lu translate\n", (unsigned long)xtrans, (unsigned
long)ytrans);
}
- fprintf(fp, "%ld %ld scale\n\n", (unsigned long)w, (unsigned long)h);
+ fprintf(fp, "%lu %lu scale\n\n", (unsigned long)w, (unsigned long)h);
}
@@ -243,10 +243,10 @@
/* start a patch */
fprintf(ofp, "save\n");
- fprintf(ofp, "%ld %ld 8 [%ld 0 0 %ld 0 %ld] {<\n ",
- width, scans_per_patch, /* patch size */
- width, height, /* total size = 1.0 */
- -y); /* patch y origin */
+ fprintf(ofp, "%lu %lu 8 [%lu 0 0 %lu 0 %lu] {<\n ",
+ (unsigned long)width, (unsigned long)scans_per_patch,
/* patch size */
+ (unsigned long)width, (unsigned long)height,
/* total size = 1.0 */
+ (unsigned long)-y); /* patch y
origin */
/* data */
num = 0;
Modified: brlcad/trunk/src/util/pix-yuv.c
===================================================================
--- brlcad/trunk/src/util/pix-yuv.c 2011-01-17 01:05:14 UTC (rev 42350)
+++ brlcad/trunk/src/util/pix-yuv.c 2011-01-17 01:09:32 UTC (rev 42351)
@@ -135,7 +135,7 @@
/* autosize input? */
if (fileinput && autosize) {
- unsigned long int w, h;
+ size_t w, h;
if (fb_common_file_size(&w, &h, file_name, 3)) {
file_width = (long)w;
file_height = (long)h;
Modified: brlcad/trunk/src/util/pixbgstrip.c
===================================================================
--- brlcad/trunk/src/util/pixbgstrip.c 2011-01-17 01:05:14 UTC (rev 42350)
+++ brlcad/trunk/src/util/pixbgstrip.c 2011-01-17 01:09:32 UTC (rev 42351)
@@ -135,7 +135,7 @@
/* autosize input? */
if (fileinput && autosize) {
- unsigned long int w, h;
+ size_t w, h;
if (fb_common_file_size(&w, &h, file_name, 3)) {
file_width = (long)w;
} else {
Modified: brlcad/trunk/src/util/pixborder.c
===================================================================
--- brlcad/trunk/src/util/pixborder.c 2011-01-17 01:05:14 UTC (rev 42350)
+++ brlcad/trunk/src/util/pixborder.c 2011-01-17 01:09:32 UTC (rev 42351)
@@ -533,7 +533,7 @@
* Autosize the input if appropriate
*/
if (fileinput && autosize) {
- unsigned long int w, h;
+ size_t w, h;
if (fb_common_file_size(&w, &h, file_name, 3)) {
file_width = (long)w;
Modified: brlcad/trunk/src/util/pixcut.c
===================================================================
--- brlcad/trunk/src/util/pixcut.c 2011-01-17 01:05:14 UTC (rev 42350)
+++ brlcad/trunk/src/util/pixcut.c 2011-01-17 01:09:32 UTC (rev 42351)
@@ -185,7 +185,7 @@
}
/* Should we autosize the input? */
if (isfile && autosize) {
- unsigned long int w, h;
+ size_t w, h;
if (fb_common_file_size(&w, &h, in_name, num_bytes)) {
org_width = (long)w;
org_height = (long)h;
Modified: brlcad/trunk/src/util/pixhalve.c
===================================================================
--- brlcad/trunk/src/util/pixhalve.c 2011-01-17 01:05:14 UTC (rev 42350)
+++ brlcad/trunk/src/util/pixhalve.c 2011-01-17 01:09:32 UTC (rev 42351)
@@ -338,7 +338,7 @@
/* autosize input? */
if (fileinput && autosize) {
- unsigned long int w, h;
+ size_t w, h;
if (fb_common_file_size(&w, &h, file_name, 3)) {
file_width = (long)w;
} else {
Modified: brlcad/trunk/src/util/pixmorph.c
===================================================================
--- brlcad/trunk/src/util/pixmorph.c 2011-01-17 01:05:14 UTC (rev 42350)
+++ brlcad/trunk/src/util/pixmorph.c 2011-01-17 01:09:32 UTC (rev 42351)
@@ -345,7 +345,7 @@
int
get_args(int argc, char **argv, char **picAnamep, char **picBnamep, char
**linesfilenamep,
double *warpfracp, int *dissolvefracp, long int *autosizep,
- long int *widthp, long int *heightp)
+ size_t *widthp, size_t *heightp)
{
long int c;
@@ -380,7 +380,7 @@
}
-int
+size_t
pix_readpixels(FILE *fp, long int numpix, unsigned char *pixarray)
{
return fread(pixarray, 3, (size_t)numpix, fp);
@@ -399,7 +399,7 @@
{
char *picAname, *picBname, *linesfilename;
FILE *picA, *picB, *linesfile;
- long int pa_width = 0, pa_height = 0;
+ size_t pa_width = 0, pa_height = 0;
int dissolvefrac;
double warpfrac;
unsigned char *pa, *pb, *wa, *wb, *morph;
@@ -446,7 +446,7 @@
}
if (autosize) {
- if (fb_common_file_size((unsigned long int *)&pa_width, (unsigned long
int *)&pa_height, argv[1], 3) == 0) {
+ if (fb_common_file_size(&pa_width, &pa_height, argv[1], 3) == 0) {
fprintf(stderr, "pixmorph: unable to autosize\n");
return 1;
}
@@ -460,13 +460,13 @@
if (pa_width > 0) {
pa_height = sb.st_size/(3*pa_width);
- fprintf(stderr, "width = %ld, size = %ld, so height = %ld\n",
- pa_width, (long)sb.st_size, pa_height);
+ fprintf(stderr, "width = %lu, size = %ld, so height = %lu\n",
+ (unsigned long)pa_width, (long)sb.st_size, (unsigned
long)pa_height);
} else if (pa_height > 0) pa_width = sb.st_size/(3*pa_height);
if (pa_width <= 0 || pa_height <= 0) {
- fprintf(stderr, "pixmorph: Bogus image dimensions: %ld %ld\n",
- pa_width, pa_height);
+ fprintf(stderr, "pixmorph: Bogus image dimensions: %lu %lu\n",
+ (unsigned long)pa_width, (unsigned long)pa_height);
return 1;
}
}
@@ -493,13 +493,13 @@
fprintf(stderr, "pixmorph: Reading images and lines file.\n");
if (pix_readpixels(picA, pa_width*pa_height, pa) < pa_width*pa_height) {
- fprintf(stderr, "Error reading %ld pixels from %s\n",
- pa_width*pa_height, picAname);
+ fprintf(stderr, "Error reading %lu pixels from %s\n",
+ (unsigned long)pa_width*pa_height, picAname);
return 1;
}
if (pix_readpixels(picB, pa_width*pa_height, pb) < pa_width*pa_height) {
- fprintf(stderr, "Error reading %ld pixels from %s\n",
- pa_width*pa_height, picBname);
+ fprintf(stderr, "Error reading %lu pixels from %s\n",
+ (unsigned long)pa_width*pa_height, picBname);
return 1;
}
fclose(picA);
Modified: brlcad/trunk/src/util/pixpaste.c
===================================================================
--- brlcad/trunk/src/util/pixpaste.c 2011-01-17 01:05:14 UTC (rev 42350)
+++ brlcad/trunk/src/util/pixpaste.c 2011-01-17 01:09:32 UTC (rev 42351)
@@ -191,7 +191,7 @@
}
/* Should we autosize the original? */
if (orig_isfile && orig_autosize) {
- unsigned long int w, h;
+ size_t w, h;
if (fb_common_file_size(&w, &h, orig_name, num_bytes)) {
org_width = (long)w;
org_height = (long)h;
@@ -202,7 +202,7 @@
/* Should we autosize the paste file? */
if (paste_isfile && paste_autosize) {
- unsigned long int w, h;
+ size_t w, h;
if (fb_common_file_size(&w, &h, paste_name, num_bytes)) {
paste_width = (long)w;
paste_height = (long)h;
Modified: brlcad/trunk/src/util/yuv-pix.c
===================================================================
--- brlcad/trunk/src/util/yuv-pix.c 2011-01-17 01:05:14 UTC (rev 42350)
+++ brlcad/trunk/src/util/yuv-pix.c 2011-01-17 01:09:32 UTC (rev 42351)
@@ -136,7 +136,7 @@
/* autosize input? */
if (fileinput && autosize) {
- unsigned long int w, h;
+ size_t w, h;
if (fb_common_file_size(&w, &h, file_name, 2)) {
file_width = (long)w;
file_height = (long)h;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits