X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=win%2Fconfigure.cpp;h=ee03b3659e95a5f158217eedcef56a1d7d5085b0;hb=41c26a03fac6915c0abcde17bacb6563c50719e5;hp=4acd7131b411a69194a9b965aa4111039e82f454;hpb=699a8b2fc82949bfd5a39acc5b00670a5c350b4d;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/win/configure.cpp b/win/configure.cpp index 4acd7131b..ee03b3659 100644 --- a/win/configure.cpp +++ b/win/configure.cpp @@ -1,16 +1,27 @@ -/* +------------------------------------+ - * | Inspire Internet Relay Chat Daemon | - * +------------------------------------+ +/* + * InspIRCd -- Internet Relay Chat Daemon * - * InspIRCd: (C) 2002-2011 InspIRCd Development Team - * See: http://wiki.inspircd.org/Credits + * Copyright (C) 2011 Adam + * Copyright (C) 2007, 2009 Dennis Friis + * Copyright (C) 2007-2008 Craig Edwards + * Copyright (C) 2008 Eric Dietz + * Copyright (C) 2007 Burlex + * Copyright (C) 2007 Robin Burchell * - * This program is free but copyrighted software; see - * the file COPYING for details. + * This file is part of InspIRCd. InspIRCd is free software: you can + * redistribute it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation, version 2. * - * --------------------------------------------------- + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ + #define _CRT_SECURE_NO_DEPRECATE #define CONFIGURE_BUILD @@ -50,7 +61,7 @@ int get_int_option(const char * text, int def) static char buffer[500]; int ret; printf_c("%s\n[\033[1;32m%u\033[0m] -> ", text, def); - fgets(buffer, 500, stdin); + fgets(buffer, sizeof(buffer), stdin); if(sscanf(buffer, "%u", &ret) != 1) ret = def; @@ -63,7 +74,7 @@ bool get_bool_option(const char * text, bool def) static char buffer[500]; char ret[100]; printf_c("%s [\033[1;32m%c\033[0m] -> ", text, def ? 'y' : 'n'); - fgets(buffer, 500, stdin); + fgets(buffer, sizeof(buffer), stdin); if(sscanf(buffer, "%s", ret) != 1) strcpy(ret, def ? "y" : "n"); @@ -148,7 +159,7 @@ void get_machine_info(char * buffer, size_t len) FILE * f = fopen("ver.txt.tmp", "r"); if (f) { - while (fgets(buf2, 500, f)) { } + while (fgets(buf2, sizeof(buf2), f)) { } fclose(f); unlink("ver.txt.tmp"); } @@ -250,8 +261,8 @@ void Run() FILE * fI = fopen("..\\src\\version.sh", "r"); if(fI) { - fgets(version, 514, fI); - fgets(version, 514, fI); + fgets(version, sizeof(version), fI); + fgets(version, sizeof(version), fI); char * p2 = version; while(*p2 != '\"') ++p2; @@ -330,7 +341,7 @@ void Run() printf("Writing inspircd_se_config.h..."); f = fopen("inspircd_se_config.h", "w"); - fprintf(f, "/* Auto generated by configure, do not modify or commit to svn! */\n"); + fprintf(f, "/* Auto generated by configure, do not modify or commit to Git! */\n"); fprintf(f, "#ifndef __CONFIGURATION_SOCKETENGINE__\n"); fprintf(f, "#define __CONFIGURATION_SOCKETENGINE__\n\n"); fprintf(f, "#include \"socketengines/socketengine_%s.h\"\n\n", "select");