diff options
author | pacien | 2018-01-09 16:03:45 +0100 |
---|---|---|
committer | pacien | 2018-01-09 16:05:22 +0100 |
commit | bb1b42028440302a1b95ecb9c964963edc2572d5 (patch) | |
tree | 92bdacc1851c2526bbf75ef38c8d83cb115ac695 /src | |
parent | ffa24dc1077ba47b7bc202e1cdd76dfe7d0f9944 (diff) | |
download | morpher-bb1b42028440302a1b95ecb9c964963edc2572d5.tar.gz |
Extract help func
Signed-off-by: pacien <pacien.trangirard@pacien.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -4,6 +4,13 @@ | |||
4 | #include <MLV/MLV_path.h> | 4 | #include <MLV/MLV_path.h> |
5 | #include "gui/gui.h" | 5 | #include "gui/gui.h" |
6 | 6 | ||
7 | static inline void print_help() { | ||
8 | printf("Usage: morph [--help] <path to base image> <path to end image>\n\n" | ||
9 | "To use the morphing, you need to put two correct paths to image files.\n\n" | ||
10 | "Accepted input imaege formats are: ICO, CUR, BMP, PNM, XPM, LBM, PCX, GIF, JPEG, PNG, TGA, TIFF, and XV.\n\n" | ||
11 | "Project made by: Pacien TRAN-GIRARD and Adam NAILI\n"); | ||
12 | } | ||
13 | |||
7 | int main(int argc, char **argv) { | 14 | int main(int argc, char **argv) { |
8 | int opt = 0; | 15 | int opt = 0; |
9 | int help = -1; | 16 | int help = -1; |
@@ -23,8 +30,7 @@ int main(int argc, char **argv) { | |||
23 | } | 30 | } |
24 | } | 31 | } |
25 | if (help == 0) { | 32 | if (help == 0) { |
26 | printf( | 33 | print_help(); |
27 | "--Morphing's Help--\nTo use the morphing, you need to put two correct paths to image files.\n\nCorrect image format :\nICO(Icon)/CUR(Cursor)/BMP, PNM (PPM/PGM/PBM), XPM, LBM(IFF ILBM), PCX, GIF, JPEG, PNG, TGA, TIFF, and XV.\n\nMorphing made by:\n Pacien TRAN-GIRARD and Adam NAILI\n"); | ||
28 | } else { | 34 | } else { |
29 | int nbArg = argc - optind; | 35 | int nbArg = argc - optind; |
30 | if (nbArg < 2) { | 36 | if (nbArg < 2) { |