--- deliantra/server/common/porting.C 2006/12/14 22:45:40 1.10 +++ deliantra/server/common/porting.C 2007/01/15 21:06:18 1.13 @@ -1,25 +1,26 @@ /* - CrossFire, A Multiplayer game for X-windows - - Copyright (C) 2002 Mark Wedel & Crossfire Development Team - Copyright (C) 1992 Frank Tore Johansen - - This program 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; either version 2 of the License, or - (at your option) any later version. - - 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, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - The authors can be reached via e-mail at -*/ + * CrossFire, A Multiplayer game for X-windows + * + * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team + * Copyright (C) 2002 Mark Wedel & Crossfire Development Team + * Copyright (C) 1992 Frank Tore Johansen + * + * This program 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; either version 2 of the License, or + * (at your option) any later version. + * + * 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, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * The authors can be reached via e-mail at + */ /* This file contains various functions that are not really unique for * crossfire, but rather provides what should be standard functions @@ -127,32 +128,6 @@ } /* - * Based on (n+1)^2 = n^2 + 2n + 1 - * given that 1^2 = 1, then - * 2^2 = 1 + (2 + 1) = 1 + 3 = 4 - * 3^2 = 4 + (4 + 1) = 4 + 5 = 1 + 3 + 5 = 9 - * 4^2 = 9 + (6 + 1) = 9 + 7 = 1 + 3 + 5 + 7 = 16 - * ... - * In other words, a square number can be express as the sum of the - * series n^2 = 1 + 3 + ... + (2n-1) - */ -int -isqrt (int n) -{ - int result, sum, prev; - - result = 0; - prev = sum = 1; - while (sum <= n) - { - prev += 2; - sum += prev; - ++result; - } - return result; -} - -/* * returns a char-pointer to a static array, in which a representation * of the decimal number given will be stored. */