about summary refs log tree commit diff
path: root/generator
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2019-01-13 00:57:51 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2019-01-13 00:57:51 +0000
commitd9a45f5fc22d3cf8bc270feea3c155fad43933eb (patch)
treef928741bf047f5a2b5d461c1f1233379fed90085 /generator
parent0e3a86ab3d83a52cf9c12fa00567901d695e78d2 (diff)
downloadnetpbm-mirror-d9a45f5fc22d3cf8bc270feea3c155fad43933eb.tar.gz
netpbm-mirror-d9a45f5fc22d3cf8bc270feea3c155fad43933eb.tar.xz
netpbm-mirror-d9a45f5fc22d3cf8bc270feea3c155fad43933eb.zip
cleanup
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3498 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'generator')
-rw-r--r--generator/ppmwheel.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/generator/ppmwheel.c b/generator/ppmwheel.c
index b8a4ae0c..9f7a7dcb 100644
--- a/generator/ppmwheel.c
+++ b/generator/ppmwheel.c
@@ -16,15 +16,14 @@
 #include <string.h>
 #include <math.h>
 
+#include "pm_c_util.h"
 #include "ppm.h"
 
 #ifndef PI
 #define PI  3.14159265358979323846
 #endif
 
-#ifndef ABS
-#define ABS(a) ((a) < 0 ? -(a) : (a))
-#endif
+
 
 static void
 hsv_rgb(double const in_h, double const in_s, double const in_v,
@@ -87,8 +86,9 @@ hsv_rgb(double const in_h, double const in_s, double const in_v,
 
 
 int
-main(int argc, char *argv[]) {
-    pixel *orow;
+main(int argc, const char ** argv) {
+
+    pixel * orow;
     int rows, cols;
     pixval maxval;
     unsigned int row;
@@ -96,7 +96,7 @@ main(int argc, char *argv[]) {
     long diameter;
     char * tailptr;
 
-    ppm_init( &argc, argv );
+    pm_proginit( &argc, argv );
 
     if (argc-1 != 1)
         pm_error("Program takes one argument:  diameter of color wheel");
@@ -153,5 +153,5 @@ main(int argc, char *argv[]) {
         ppm_writeppmrow(stdout, orow, cols, maxval, 0);
     }
     pm_close(stdout);
-    exit(0);
+    return 0;
 }