-L -> -N, allow remote networking in -F mode

This commit is contained in:
Ted Blackman 2017-10-30 17:41:48 -07:00
parent 4843234a78
commit 2a75beaf8e
3 changed files with 16 additions and 12 deletions

View File

@ -547,8 +547,8 @@
c3_o fog; // -X, skip last event
c3_o gab; // -g, run with garbage collector
c3_o git; // -s, pill url from arvo git hash
c3_o loh; // -L, local-only networking
c3_o mem; // -M, memory madness
c3_o net; // -N, remote networking in -F mode
c3_o nuu; // -c, new pier
c3_o pro; // -P, profile
c3_o qui; // -q, quiet

View File

@ -50,8 +50,9 @@ _ames_czar(c3_y imp_y, c3_s* por_s)
{
u3_ames* sam_u = &u3_Host.sam_u;
if ( c3y == u3_Host.ops_u.loh ) {
if ( c3n == u3_Host.ops_u.net ) {
*por_s = 31337 + imp_y;
uL(fprintf(uH, "ames: czar: localhost-only mode\n"));
return 0x7f000001;
}
else {

View File

@ -73,7 +73,7 @@ _main_getopt(c3_i argc, c3_c** argv)
u3_Host.ops_u.fog = c3n;
u3_Host.ops_u.gab = c3n;
u3_Host.ops_u.git = c3n;
u3_Host.ops_u.loh = c3n;
u3_Host.ops_u.net = c3n;
u3_Host.ops_u.mem = c3n;
u3_Host.ops_u.nuu = c3n;
u3_Host.ops_u.pro = c3n;
@ -83,7 +83,7 @@ _main_getopt(c3_i argc, c3_c** argv)
u3_Host.ops_u.veb = c3n;
u3_Host.ops_u.kno_w = DefaultKernel;
while ( (ch_i=getopt(argc, argv,"G:B:A:I:w:u:t:f:k:l:n:p:r:LabcdgqsvxFMPDXR")) != -1 ) {
while ( (ch_i=getopt(argc, argv,"G:B:A:I:w:u:t:f:k:l:n:p:r:NabcdgqsvxFMPDXR")) != -1 ) {
switch ( ch_i ) {
case 'M': {
u3_Host.ops_u.mem = c3y;
@ -162,12 +162,8 @@ _main_getopt(c3_i argc, c3_c** argv)
u3_Host.ops_u.rep = c3y;
return c3y;
}
case 'L': { u3_Host.ops_u.loh = c3y; break; }
case 'F': {
u3_Host.ops_u.loh = c3y;
u3_Host.ops_u.fak = c3y;
break;
}
case 'N': { u3_Host.ops_u.net = c3y; break; }
case 'F': { u3_Host.ops_u.fak = c3y; break; }
case 'a': { u3_Host.ops_u.abo = c3y; break; }
case 'b': { u3_Host.ops_u.bat = c3y; break; }
case 'c': { u3_Host.ops_u.nuu = c3y; break; }
@ -184,6 +180,13 @@ _main_getopt(c3_i argc, c3_c** argv)
}
}
if ( u3_Host.ops_u.fak == c3n && u3_Host.ops_u.net == c3y ) {
fprintf(stderr, "-N only makes sense with -F\n");
return c3n;
} else if ( u3_Host.ops_u.fak == c3n && u3_Host.ops_u.net == c3n ) {
u3_Host.ops_u.net = c3y; /* remote networking is always on in real mode. */
}
if ( u3_Host.ops_u.arv_c != 0 && ( u3_Host.ops_u.imp_c == 0 ||
u3_Host.ops_u.nuu == c3n ) ) {
fprintf(stderr, "-A only makes sense when creating a new galaxy\n");