summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorpacien2018-01-09 16:03:45 +0100
committerpacien2018-01-09 16:05:22 +0100
commitbb1b42028440302a1b95ecb9c964963edc2572d5 (patch)
tree92bdacc1851c2526bbf75ef38c8d83cb115ac695 /src/main.c
parentffa24dc1077ba47b7bc202e1cdd76dfe7d0f9944 (diff)
downloadmorpher-bb1b42028440302a1b95ecb9c964963edc2572d5.tar.gz
Extract help func
Signed-off-by: pacien <pacien.trangirard@pacien.net>
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index d791a93..ddcc6dc 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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
7static 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
7int main(int argc, char **argv) { 14int 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) {