+49 711 9998888 - Stuttgart (Germany)
Overview Function Supported systems and limitations How to get the source and data files Installing the package Some notes regarding version 2.0 Copyright Credits
The areacode module together with its database serves as a helper for finding names for area codes. It is freely available, subject to the copyright notice below.
The module exports a few data types and one function. The function resolves a phone number (including the country code) to some text describing the area code found in the phone number. Current descriptions are in german, the database contains german, swiss, and austrian areacodes plus some incomplete data for the US, the UK and the netherlands.
Usage is easy, just have a look into the header file areacode.h.
The module should run on nearly all systems that have the following characteristics:
#defining
the macro u32 to the datatype needed.
#ifdef
__cplusplus
checks.
#define
CHARSET_CP850
has to be added when compiling the module.
The package has some limits as stated below:
You may get the source for the package itself, for the datafile builder and for new datafiles from
ftp://ftp.musoftware.de/pub/uz/areacode/Note: Please do not distribute modified data files. The data files contain a version stamp to make shure, users don't overwrite newer versions with older ones. This scheme will no longer work if data files are distributed by third parties.
Note: The datafile builder needs spunk, a C++ class library to compile. You may want to have a look in
ftp://ftp.musoftware.de/pub/uz/spunk/for the current spunk version.
For convenience, there's also a full archive containing spunk and all other stuff.
For all systems the location of the data file has to be known. The default
name (including the path) may be compiled into the module by #defining
DATA_FILENAME
, or set at runtime (see areacode.h).
The Linux makefile will install the data file in a common place, so more
than one software package depending on areacode is able to use the data file.
The data file contains a version stamp, to avoid overwriting a newer file by an older one, when installing more than one software package. The program acvers is used to determine the build version, it will output three numbers, the last one is the data file build (the first two are format version numbers that - hopefully - will not change).
Unfortunately, I was not able to keep binary compatibility for version 2.0. After realizing that the new version would not be binary compatible anyway, I made some more changes that were due for some time (ISO-8859-1 as a native format is an example).
New in version 2.0:
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
- The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
- Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
- This notice may not be removed or altered from any source distribution.
Many thanks to all people that helped developing the module:
areacode.php Letzte Änderung: 26-Mar-2008 | Impressum Datenschutzerklärung |