src/main.c

changeset 55
54ea19938d57
parent 52
26707039d5a6
child 69
c8f2c280cff7
     1.1 --- a/src/main.c	Wed Aug 26 14:46:42 2015 +0200
     1.2 +++ b/src/main.c	Fri Feb 26 11:55:42 2016 +0100
     1.3 @@ -1,7 +1,7 @@
     1.4  /*
     1.5   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     1.6   *
     1.7 - * Copyright 2014 Mike Becker. All rights reserved.
     1.8 + * Copyright 2016 Mike Becker. All rights reserved.
     1.9   *
    1.10   * Redistribution and use in source and binary forms, with or without
    1.11   * modification, are permitted provided that the following conditions are met:
    1.12 @@ -146,7 +146,7 @@
    1.13      return 0;
    1.14  }
    1.15  
    1.16 -Settings default_settings() {
    1.17 +static Settings default_settings() {
    1.18      Settings settings;
    1.19      memset(&settings, 0, sizeof(Settings));
    1.20      settings.gameinfo.servercolor = WHITE;
    1.21 @@ -194,10 +194,6 @@
    1.22      refresh();
    1.23  }
    1.24  
    1.25 -void leavescr() {
    1.26 -    endwin();
    1.27 -}
    1.28 -
    1.29  int main(int argc, char **argv) {
    1.30      srand(time(NULL));
    1.31      
    1.32 @@ -218,7 +214,7 @@
    1.33          endwin();
    1.34          return EXIT_FAILURE;
    1.35      }
    1.36 -    atexit(leavescr);
    1.37 +    atexit((void(*)())endwin);
    1.38      
    1.39      int exitcode;
    1.40      if (settings.singlemachine) {

mercurial