-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhelp.c
More file actions
executable file
·28 lines (23 loc) · 1.14 KB
/
help.c
File metadata and controls
executable file
·28 lines (23 loc) · 1.14 KB
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
#include <stdio.h>
#include <stdlib.h>
#include "mpdinfo.h"
int usage(int argc, char** argv, void* c) {
Config* config = (Config*) c;
printf("%s utility\n", config->programName);
//options
printf("Usage: %s [options] <mode> [mode-args]\n", config->programName);
printf("Available options:\n");
printf(" -c , --config <config> Path to Config file\n");
printf(" -f , --format <string> Format string for all\n");
printf(" -fpa, --format=pause <string> Format string for status paused\n");
printf(" -fpl, --format=play <string> Format string for status playing\n");
printf(" -fs , --format=stop <string> Format string for status stopped\n");
printf(" -hp , --help Show this help\n");
printf(" -h , --host <host> Set the hostname\n");
printf(" -p , --port <port> Set the port\n");
printf(" -v , --verbosity <int> Set verbosity level between 0 (Error) and 5 (DEBUG)\n");
//examples
printf("\nExamples:\n");
printf("%s --format \"%%artist%% - %%title%%\" returns the title and artist in format *artist* - *title*\n", config->programName);
return -1;
}