Contents of the AREACODE.DOC file
Telephone area code search program
310 Cinnamon Oak Lane (713) 661-1241 [Office]
Houston, Texas 77079 (713) 464-6737 [Home]
Find area codes by entering an area code or state name on the
command line. Multiple codes, names arepermitted up to 20,
the limit set forth for the C86 Computer Innovations(tm) compiler,
although your compiler may be different.
Program written for IBM-PC with PC-DOS 2.0, but no machine specific
code is involved, other than the GETTIME routine.
This code has been modified on 2/1/85 by the Device Driver to
(1) speed it up, (2) allow multiple names to be found, (3) add time
zones, (4) add foreign countries, (5) add new area codes.
Modified yet again on 11/30/85 to treat foreign codes as foreign and
not just as ordinary areacodes. Considerable data also added
and program adjusted to accept area codes of length 1 to 4 as required
for foreign codes. Program also slightly modified to accomadate version
2.20 of C86 compiler. (Gene Cohler)
Modified to compile under MS Quick C Compiler (11/88)
The table is near the top of this file to make it easier to maintain.
Area codes don't change much, but just this year in Houston our
area code was broken off from the surrounding area.
The format of the table is simple, so adding cities to the city list
or even new states or regions won't upset the program if a few easy
rules are followed:
1) The table format is one array of string pointers.
2) A state name consists of a two character postal abbreviation,
like ca for California, and then the actual name,
a) All data on this line is lowercase. A multiple word name,
like New Jersey, would be entered as "njnew*jersey" , .
This prevents argv from making two arguments out of the name.
3) An area code is the three digit code, followed by whatever text.
a) As many area codes, cities as you want are ok.
b) Note the program depends on a state name not beginning with
a number. When a numeric code is searched and found, the
program goes back to the first non-numeric for the state name.
4) All entries need to be enclosed in quotes (") and followed by a
5) Countries are similar to states.
a) In place of 2 letter code there must be "--". This is used
by the program to distinguish countries from states.
b) The first entry (city code) following the country name
should be the country code for that country.
c) For foreign codes, always pad codes to 3 with blanks, but codes
may be up to four digits long.
6) Time zone follow the state name as (+n) for n hours after Eastern,
(-n) for n hours before Eastern, and (\t..) to add an extra 1/2