[nexuiz-commits] r6717 - trunk/misc/tools
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Tue May 12 08:02:07 EDT 2009
Author: div0
Date: 2009-05-12 08:02:07 -0400 (Tue, 12 May 2009)
New Revision: 6717
Modified:
trunk/misc/tools/hitplot2tga.c
Log:
also implement errx
Modified: trunk/misc/tools/hitplot2tga.c
===================================================================
--- trunk/misc/tools/hitplot2tga.c 2009-05-12 12:01:04 UTC (rev 6716)
+++ trunk/misc/tools/hitplot2tga.c 2009-05-12 12:02:07 UTC (rev 6717)
@@ -18,6 +18,15 @@
exit(ex);
}
+void errx(int ex, const char *fmt, ...)
+{
+ va_list list;
+ va_start(list, fmt);
+ vfprintf(stderr, fmt, list);
+ fputs("\n", stderr);
+ exit(ex);
+}
+
typedef void (*colorfunc_t) (double x, double y, double dx, double dy, double *r, double *g, double *b);
double rnd()
@@ -58,8 +67,6 @@
uint8_t rgb[3];
double rr, gg, bb;
double xx, yy;
- double xxx, yyy, zzz;
- double r;
xx = (x + 0.5) / width;
yy = (y + 0.5) / height;
f(xx, yy, 0.5 / width, 0.5 / height, &rr, &gg, &bb);
@@ -165,11 +172,11 @@
int main(int argc, char **argv)
{
- FILE *in;
-
if(argc != 3)
errx(1, "Usage: %s infile.plot outfile.tga", *argv);
readpoints(argv[1]);
writepic(calcplot, argv[2], 512, 512);
+
+ return 0;
}
More information about the nexuiz-commits
mailing list