X-Git-Url: http://git.plutz.net/?p=stereofy;a=blobdiff_plain;f=anaglyph.c;h=b0be61c53b1bc66bcda7ea27a3a18dc9a134383a;hp=1ade9521c828b279b1e793e6adf9c015c8b2d406;hb=dd9163bfcca6056bf4def621010c751b0e251cdc;hpb=d756f57d5612c2fa4b6fff7db9af57ffbaef59cc diff --git a/anaglyph.c b/anaglyph.c index 1ade952..b0be61c 100644 --- a/anaglyph.c +++ b/anaglyph.c @@ -1,3 +1,19 @@ +// Copyright 2011 Paul Hänsch +// This file is part of Stereofy +// +// Stereofy is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Stereofy is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Stereofy. If not, see . + #include #include #include @@ -35,13 +51,13 @@ int main(int argc, char *argv[]){ int error(int code){ char *msg = "Unknown Error\n"; switch (code) { - case 1: msg = "Usage: anaglyph [ -[fhd]gm | -[fhd]rc | -fmc | -dab ] left.rgb right.rgb output.rgb\n"; - case 2: msg = "Could not open input file for reading\n"; - case 3: msg = "Could not open output file for writing\n"; - case 4: msg = "Unexpected end of file\n"; - case 5: msg = "Cannot write to output file\n"; + case 1: msg = "Usage: anaglyph [ -[fhd]gm | -[fhd]rc | -fmc | -dab ] left.rgb right.rgb output.rgb\n"; break; + case 2: msg = "Could not open input file for reading\n"; break; + case 3: msg = "Could not open output file for writing\n"; break; + case 4: msg = "Unexpected end of file\n"; break; + case 5: msg = "Cannot write to output file\n"; break; } - fprintf(stderr, msg); return code; + fprintf(stderr, "%s", msg); return code; } // min-max to prevent overflowing in Dubois calculations