Compare commits
No commits in common. "0a2d03fdaa47ce2bc9def14cae9aae675a8a3e9b" and "2d6b194c26f6765f1d37ebd92b79c4bcf4650f63" have entirely different histories.
0a2d03fdaa
...
2d6b194c26
|
@ -3,7 +3,7 @@
|
||||||
// | Copyright (C) 2023, Barra Ó Catháin |
|
// | Copyright (C) 2023, Barra Ó Catháin |
|
||||||
// | See end of file for copyright notice. |
|
// | See end of file for copyright notice. |
|
||||||
// ==========================================
|
// ==========================================
|
||||||
#include <config.h>
|
#include "../config.h"
|
||||||
#include "client-drawing.h"
|
#include "client-drawing.h"
|
||||||
|
|
||||||
void redrawClientLayout(WINDOW * gameWindow, WINDOW * chatWindow, WINDOW * inputWindow)
|
void redrawClientLayout(WINDOW * gameWindow, WINDOW * chatWindow, WINDOW * inputWindow)
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <config.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
@ -17,6 +16,7 @@
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <gnutls/gnutls.h>
|
#include <gnutls/gnutls.h>
|
||||||
|
|
||||||
|
#include "../config.h"
|
||||||
#include "../messages.h"
|
#include "../messages.h"
|
||||||
#include "client-drawing.h"
|
#include "client-drawing.h"
|
||||||
#include "receiving-thread.h"
|
#include "receiving-thread.h"
|
||||||
|
|
|
@ -63,24 +63,9 @@ int main (int argc, char ** argv)
|
||||||
{"port", required_argument, 0, 'p' },
|
{"port", required_argument, 0, 'p' },
|
||||||
{"host", required_argument, 0, 'h' },
|
{"host", required_argument, 0, 'h' },
|
||||||
{"interface", required_argument, 0, 'i' }
|
{"interface", required_argument, 0, 'i' }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Check environment variables:
|
|
||||||
if (getenv("SILVERMUD_SERVER_PORT") != NULL)
|
|
||||||
{
|
|
||||||
portSpecified = true;
|
|
||||||
strncpy(serverPort, getenv("SILVERMUD_SERVER_HOST"), HOST_NAME_MAX);
|
|
||||||
}
|
|
||||||
if (getenv("SILVERMUD_SERVER_HOST") != NULL)
|
|
||||||
{
|
|
||||||
hostSpecified = true;
|
|
||||||
strncpy(serverHostname, getenv("SILVERMUD_SERVER_HOST"), HOST_NAME_MAX);
|
|
||||||
}
|
|
||||||
if (getenv("SILVERMUD_SERVER_INTERFACE") != NULL)
|
|
||||||
{
|
|
||||||
interfaceSpecified = true;
|
|
||||||
strncpy(serverInterface, getenv("SILVERMUD_SERVER_INTERFACE"), HOST_NAME_MAX);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Parse command-line options:
|
// Parse command-line options:
|
||||||
int selectedOption = 0, optionIndex = 0;
|
int selectedOption = 0, optionIndex = 0;
|
||||||
|
@ -90,13 +75,14 @@ int main (int argc, char ** argv)
|
||||||
{
|
{
|
||||||
case 'p':
|
case 'p':
|
||||||
{
|
{
|
||||||
|
printf("Using port: %s\n", optarg);
|
||||||
portSpecified = true;
|
portSpecified = true;
|
||||||
strncpy(serverPort, optarg, HOST_NAME_MAX);
|
strncpy(serverPort, optarg, HOST_NAME_MAX);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'h':
|
case 'h':
|
||||||
{
|
{
|
||||||
|
printf("Using hostname: %s\n", optarg);
|
||||||
hostSpecified = true;
|
hostSpecified = true;
|
||||||
strncpy(serverHostname, optarg, HOST_NAME_MAX);
|
strncpy(serverHostname, optarg, HOST_NAME_MAX);
|
||||||
break;
|
break;
|
||||||
|
@ -110,22 +96,7 @@ int main (int argc, char ** argv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (portSpecified)
|
|
||||||
{
|
|
||||||
printf("Using port: %s\n", serverPort);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (hostSpecified)
|
|
||||||
{
|
|
||||||
printf("Using hostname: %s\n", serverHostname);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (interfaceSpecified)
|
|
||||||
{
|
|
||||||
printf("Using interface: %s\n", serverInterface);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Initialize Scheme:
|
// Initialize Scheme:
|
||||||
scm_init_guile();
|
scm_init_guile();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue