"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/test-geoip-isp.c" between
GeoIP-1.6.11.tar.gz and GeoIP-1.6.12.tar.gz

About: GeoIP is a C library that enables the user to find the country that any IP address or hostname originates from (contains an initial free GeoIP Country database).

test-geoip-isp.c  (GeoIP-1.6.11):test-geoip-isp.c  (GeoIP-1.6.12)
skipping to change at line 18 skipping to change at line 18
* License as published by the Free Software Foundation; either * License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version. * version 2.1 of the License, or (at your option) any later version.
* *
* This library is distributed in the hope that it will be useful, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 US A * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#include "GeoIP.h" #include "GeoIP.h"
static const char *_mk_NA(const char *p) static const char *_mk_NA(const char *p) { return p ? p : "N/A"; }
{
return p ? p : "N/A";
}
int main(int argc, char *argv[]) int main(int argc, char *argv[]) {
{
FILE *f; FILE *f;
GeoIP *gi; GeoIP *gi;
char *org; char *org;
char host[50]; char host[50];
gi = GeoIP_open("../data/GeoIPISP.dat", GEOIP_STANDARD); gi = GeoIP_open("../data/GeoIPISP.dat", GEOIP_STANDARD);
if (gi == NULL) { if (gi == NULL) {
fprintf(stderr, "Error opening database\n"); fprintf(stderr, "Error opening database\n");
exit(1); exit(1);
 End of changes. 3 change blocks. 
7 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)