-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdoc.c
32 lines (27 loc) · 803 Bytes
/
doc.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <stdio.h>
#include <stdlib.h>
#include "doc.h"
void copyrights()
{
printf("Copyright (c) 2019-2023 Youssef Hesham\n");
}
void version(const char *name)
{
printf("%s version %s ( %s )\n", name, VERSION, HOMEPAGE);
exit(EXIT_SUCCESS);
}
void help_enc(const char *name)
{
printf("Usage: echo \"<data>\" | %s [<options>...]\n"
"Usage: %s [<options>...]\n\n"
"URL encode or decode FILE, or standard input, to standard output.\n\n"
"<Options>\n"
"-d : decode data\n"
"-a : ignore alphanumeric characters\n"
"-s : use + instead of %%20 when encoding spaces\n"
"-i : input file to encode (must be the last argument)\n"
"-v : print version number\n"
"-h : display this help and exit\n\n", name, name);
copyrights();
exit(EXIT_SUCCESS);
}