Code:isochromic.c: Difference between revisions

Added note about how I'm planning to change the syntax for "preserve sum" (i want it to be '$' instead of '_')
(Created page with "<syntaxhighlight lang="c"> // Elie's isochromic image generator v0.5 // Copyright 2022, Elie Goldman Smith // License: GNU GPL V3 // To compile this code: // gcc isochromic.c -lm -lfftw3 -lreadline -lcurses -O3 -o isochromic // # takes awhile to compile, because of optimization and stb_image #include <ctype.h> #include <fftw3.h> #include <math.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <readline/readline.h> #include <...")
 
(Added note about how I'm planning to change the syntax for "preserve sum" (i want it to be '$' instead of '_'))
Line 758: Line 758:
   char *rightx = right;
   char *rightx = right;
   if (right[0]=='_') {
   if (right[0]=='_') {
  // TODO XXX: Change the syntax. The '_' is a terrible choice for "preserve sum", because the names of variables could also contain underscores. Use '$' instead - makes far more sense. Also change this for the integer scale functions "@@ _width" and "@@ _height". Last but not least, be sure to update the wikitext of '''all''' the images generated so far!
   rightx++;
   rightx++;
   preserveSum=1;
   preserveSum=1;