~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
include configure and compiler details in version output
[disorder]
/
clients
/
disorder.c
diff --git
a/clients/disorder.c
b/clients/disorder.c
index
5817766
..
7ee9865
100644
(file)
--- a/
clients/disorder.c
+++ b/
clients/disorder.c
@@
-61,6
+61,8
@@
static const struct option options[] = {
{ "version", no_argument, 0, 'V' },
{ "config", required_argument, 0, 'c' },
{ "debug", no_argument, 0, 'd' },
{ "version", no_argument, 0, 'V' },
{ "config", required_argument, 0, 'c' },
{ "debug", no_argument, 0, 'd' },
+ { "local", no_argument, 0, 'l' },
+ { "no-per-user-config", no_argument, 0, 'N' },
{ "help-commands", no_argument, 0, 'H' },
{ 0, 0, 0, 0 }
};
{ "help-commands", no_argument, 0, 'H' },
{ 0, 0, 0, 0 }
};
@@
-74,6
+76,7
@@
static void help(void) {
" --help-commands, -H List commands\n"
" --version, -V Display version number\n"
" --config PATH, -c PATH Set configuration file\n"
" --help-commands, -H List commands\n"
" --version, -V Display version number\n"
" --config PATH, -c PATH Set configuration file\n"
+ " --local, -l Force connection to local server\n"
" --debug, -d Turn on debugging\n");
xfclose(stdout);
exit(0);
" --debug, -d Turn on debugging\n");
xfclose(stdout);
exit(0);
@@
-81,7
+84,7
@@
static void help(void) {
/* display version number and terminate */
static void version(void) {
/* display version number and terminate */
static void version(void) {
- xprintf("
disorder version %s\n
", disorder_version_string);
+ xprintf("
%s
", disorder_version_string);
xfclose(stdout);
exit(0);
}
xfclose(stdout);
exit(0);
}
@@
-531,7
+534,7
@@
static void help_commands(void) {
}
int main(int argc, char **argv) {
}
int main(int argc, char **argv) {
- int n, i, j;
+ int n, i, j
, local = 0
;
disorder_client *c = 0;
int status = 0;
struct vector args;
disorder_client *c = 0;
int status = 0;
struct vector args;
@@
-541,17
+544,21
@@
int main(int argc, char **argv) {
pcre_malloc = xmalloc;
pcre_free = xfree;
if(!setlocale(LC_CTYPE, "")) fatal(errno, "error calling setlocale");
pcre_malloc = xmalloc;
pcre_free = xfree;
if(!setlocale(LC_CTYPE, "")) fatal(errno, "error calling setlocale");
- while((n = getopt_long(argc, argv, "hVc:dH
L
", options, 0)) >= 0) {
+ while((n = getopt_long(argc, argv, "hVc:dH
lN
", options, 0)) >= 0) {
switch(n) {
case 'h': help();
case 'H': help_commands();
case 'V': version();
case 'c': configfile = optarg; break;
case 'd': debugging = 1; break;
switch(n) {
case 'h': help();
case 'H': help_commands();
case 'V': version();
case 'c': configfile = optarg; break;
case 'd': debugging = 1; break;
+ case 'l': local = 1; break;
+ case 'N': config_per_user = 0; break;
default: fatal(0, "invalid option");
}
}
if(config_read(0)) fatal(0, "cannot read configuration");
default: fatal(0, "invalid option");
}
}
if(config_read(0)) fatal(0, "cannot read configuration");
+ if(local)
+ config->connect.n = 0;
if(!(c = disorder_new(1))) exit(EXIT_FAILURE);
if(disorder_connect(c)) exit(EXIT_FAILURE);
n = optind;
if(!(c = disorder_new(1))) exit(EXIT_FAILURE);
if(disorder_connect(c)) exit(EXIT_FAILURE);
n = optind;