diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2023-12-12 23:33:05 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2023-12-12 23:33:05 +0100 |
commit | 8d70cb996b7ab18b0dde802938880200a78e62b5 (patch) | |
tree | 9f196a69862ae27a5ca18e03f0c5cd5c01c8af53 /FICS | |
parent | edf62ca24342ec5a9baf9ce65d14a286ef10e27f (diff) |
Sorted the function definitions
Diffstat (limited to 'FICS')
-rw-r--r-- | FICS/ficsmain.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/FICS/ficsmain.c b/FICS/ficsmain.c index 6c48dd1..6853c13 100644 --- a/FICS/ficsmain.c +++ b/FICS/ficsmain.c @@ -48,15 +48,9 @@ PUBLIC int port; PUBLIC int withConsole; PRIVATE void -usage(char *progname) +BrokenPipe(int sig) { - fprintf(stderr, "Usage: %s [-p port] [-C] [-h]\n", progname); - fprintf(stderr, "\t\t-p port\t\tSpecify port. (Default=%d)\n", - DEFAULT_PORT); - fprintf(stderr, "\t\t-C\t\tStart with console player connected " - "to stdin.\n"); - fprintf(stderr, "\t\t-h\t\tDisplay this information.\n"); - exit(1); + fprintf(stderr, "FICS: Got Broken Pipe\n"); } PRIVATE void @@ -91,6 +85,16 @@ GetArgs(int argc, char *argv[]) } PRIVATE void +TerminateServer(int sig) +{ + fprintf(stderr, "FICS: Got signal %d\n", sig); + output_shut_mess(); + TerminateCleanup(); + net_close(); + exit(1); +} + +PRIVATE void main_event_loop(void) { char command_string[MAX_STRING_LENGTH]; @@ -105,22 +109,18 @@ main_event_loop(void) } } -void -TerminateServer(int sig) +PRIVATE void +usage(char *progname) { - fprintf(stderr, "FICS: Got signal %d\n", sig); - output_shut_mess(); - TerminateCleanup(); - net_close(); + fprintf(stderr, "Usage: %s [-p port] [-C] [-h]\n", progname); + fprintf(stderr, "\t\t-p port\t\tSpecify port. (Default=%d)\n", + DEFAULT_PORT); + fprintf(stderr, "\t\t-C\t\tStart with console player connected " + "to stdin.\n"); + fprintf(stderr, "\t\t-h\t\tDisplay this information.\n"); exit(1); } -void -BrokenPipe(int sig) -{ - fprintf(stderr, "FICS: Got Broken Pipe\n"); -} - PUBLIC int main(int argc, char *argv[]) { |