[cairo-commit] roadster/src road.c,1.10,1.11 road.h,1.7,1.8
Ian McIntosh
commit at pdx.freedesktop.org
Tue Oct 25 22:09:28 PDT 2005
Committed by: ian
Update of /cvs/cairo/roadster/src
In directory gabe:/tmp/cvs-serv32544/src
Modified Files:
road.c road.h
Log Message:
* src/road.c:
* src/road.h: Remove hardcoded road suffix list.
Index: road.c
===================================================================
RCS file: /cvs/cairo/roadster/src/road.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- road.c 26 Oct 2005 05:04:53 -0000 1.10
+++ road.c 26 Oct 2005 05:09:26 -0000 1.11
@@ -49,168 +49,6 @@
g_free(pszPath);
}
-struct {
- gchar* pszLong;
- gchar* pszShort;
-} g_RoadNameSuffix[] = {
- {"",""},
- {"Road", "Rd"},
- {"Street", "St"},
- {"Drive", "Dr"},
- {"Boulevard", "Bvd"},
- {"Avenue", "Ave"},
- {"Circle", "Crl"},
- {"Square", "Sq"},
- {"Path", "Pth"},
- {"Way", "Wy"},
- {"Plaza", "Plz"},
- {"Trail", "Trl"},
- {"Lane", "Ln"},
- {"Crossing", "Xing"},
- {"Place", "Pl"},
- {"Court", "Ct"},
- {"Turnpike", "Tpke"},
- {"Terrace", "Ter"},
- {"Row", "Row"},
- {"Parkway", "Pky"},
-
- {"Bridge", "Brg"},
- {"Highway", "Hwy"},
- {"Run", "Run"},
- {"Pass", "Pass"},
-
- {"Freeway", "Fwy"},
- {"Alley", "Aly"},
- {"Crescent", "Cres"},
- {"Tunnel", "Tunl"},
- {"Walk", "Walk"},
- {"Terrace", "Trce"},
- {"Branch", "Br"},
- {"Cove", "Cv"},
- {"Bypass", "Byp"},
- {"Loop", "Loop"},
- {"Spur", "Spur"},
- {"Ramp", "Ramp"},
- {"Pike", "Pike"},
- {"Grade", "Grd"},
- {"Route", "Rte"},
- {"Arc", "Arc"},
-};
-
-struct {
- gchar* pszName;
- gint nID;
-} g_RoadNameSuffixLookup[] = {
- {"Rd", ROAD_SUFFIX_ROAD},
- {"Road", ROAD_SUFFIX_ROAD},
-
- {"St", ROAD_SUFFIX_STREET},
- {"Street", ROAD_SUFFIX_STREET},
-
- {"Dr", ROAD_SUFFIX_DRIVE},
- {"Drive", ROAD_SUFFIX_DRIVE},
-
- {"Blv", ROAD_SUFFIX_BOULEVARD},
- {"Blvd", ROAD_SUFFIX_BOULEVARD},
- {"Boulevard", ROAD_SUFFIX_BOULEVARD},
-
- {"Av", ROAD_SUFFIX_AVENUE},
- {"Ave", ROAD_SUFFIX_AVENUE},
- {"Avenue", ROAD_SUFFIX_AVENUE},
-
- {"Cir", ROAD_SUFFIX_CIRCLE},
- {"Crl", ROAD_SUFFIX_CIRCLE},
- {"Circle", ROAD_SUFFIX_CIRCLE},
-
- {"Sq", ROAD_SUFFIX_SQUARE},
- {"Square", ROAD_SUFFIX_SQUARE},
-
- {"Pl", ROAD_SUFFIX_PLACE},
- {"Place", ROAD_SUFFIX_PLACE},
-
- {"Xing", ROAD_SUFFIX_CROSSING},
- {"Crossing", ROAD_SUFFIX_CROSSING},
-
- {"Ct", ROAD_SUFFIX_COURT},
- {"Court", ROAD_SUFFIX_COURT},
-
- {"Tpke", ROAD_SUFFIX_TURNPIKE},
- {"Turnpike", ROAD_SUFFIX_TURNPIKE},
-
- {"Ter", ROAD_SUFFIX_TERRACE},
- {"Terrace", ROAD_SUFFIX_TERRACE},
-
- {"Row", ROAD_SUFFIX_ROW},
-
- {"Pth", ROAD_SUFFIX_PATH},
- {"Path", ROAD_SUFFIX_PATH},
-
- {"Wy", ROAD_SUFFIX_WAY},
- {"Way", ROAD_SUFFIX_WAY},
-
- {"Plz", ROAD_SUFFIX_PLAZA},
- {"Plaza", ROAD_SUFFIX_PLAZA},
-
- {"Trl", ROAD_SUFFIX_TRAIL},
- {"Trail", ROAD_SUFFIX_TRAIL},
-
- {"Ln", ROAD_SUFFIX_LANE},
- {"Lane", ROAD_SUFFIX_LANE},
-
- {"Pky", ROAD_SUFFIX_PARKWAY},
- {"Parkway", ROAD_SUFFIX_PARKWAY},
-
- {"Brg", ROAD_SUFFIX_BRIDGE},
- {"Bridge", ROAD_SUFFIX_BRIDGE},
-
- {"Hwy", ROAD_SUFFIX_HIGHWAY},
- {"Highway", ROAD_SUFFIX_HIGHWAY},
-
- {"Run", ROAD_SUFFIX_RUN},
-
- {"Pass", ROAD_SUFFIX_PASS},
-
- {"Freeway", ROAD_SUFFIX_FREEWAY},
- {"Fwy", ROAD_SUFFIX_FREEWAY},
-
- {"Alley", ROAD_SUFFIX_ALLEY},
- {"Aly", ROAD_SUFFIX_ALLEY},
-
- {"Crescent", ROAD_SUFFIX_CRESCENT},
- {"Cres", ROAD_SUFFIX_CRESCENT},
-
- {"Tunnel", ROAD_SUFFIX_TUNNEL},
- {"Tunl", ROAD_SUFFIX_TUNNEL},
-
- {"Walk", ROAD_SUFFIX_WALK},
-
- {"Branch", ROAD_SUFFIX_BRANCE},
- {"Br", ROAD_SUFFIX_BRANCE},
-
- {"Cove", ROAD_SUFFIX_COVE},
- {"Cv", ROAD_SUFFIX_COVE},
-
- {"Bypass", ROAD_SUFFIX_BYPASS},
- {"Byp", ROAD_SUFFIX_BYPASS},
-
- {"Loop", ROAD_SUFFIX_LOOP},
-
- {"Spur", ROAD_SUFFIX_SPUR},
-
- {"Ramp", ROAD_SUFFIX_RAMP},
-
- {"Pike", ROAD_SUFFIX_PIKE},
-
- {"Grade", ROAD_SUFFIX_GRADE},
- {"Grd", ROAD_SUFFIX_GRADE},
-
- {"Route", ROAD_SUFFIX_ROUTE},
- {"Rte", ROAD_SUFFIX_ROUTE},
-
- {"Arc", ROAD_SUFFIX_ARC},
-};
-
-
// ========================================================
// Road Direction / Suffix conversions
// ========================================================
Index: road.h
===================================================================
RCS file: /cvs/cairo/roadster/src/road.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- road.h 26 Oct 2005 05:04:53 -0000 1.7
+++ road.h 26 Oct 2005 05:09:26 -0000 1.8
@@ -46,53 +46,7 @@
ROAD_SUFFIX_LENGTH_SHORT
} ESuffixLength;
-enum ERoadNameSuffix { // these can't change once stored in DB
- ROAD_SUFFIX_FIRST = 0,
- ROAD_SUFFIX_NONE = 0,
-
- ROAD_SUFFIX_ROAD = 1,
- ROAD_SUFFIX_STREET,
- ROAD_SUFFIX_DRIVE,
- ROAD_SUFFIX_BOULEVARD, // blvd
- ROAD_SUFFIX_AVENUE,
- ROAD_SUFFIX_CIRCLE,
- ROAD_SUFFIX_SQUARE,
- ROAD_SUFFIX_PATH,
- ROAD_SUFFIX_WAY,
- ROAD_SUFFIX_PLAZA,
- ROAD_SUFFIX_TRAIL,
- ROAD_SUFFIX_LANE,
- ROAD_SUFFIX_CROSSING,
- ROAD_SUFFIX_PLACE,
- ROAD_SUFFIX_COURT,
- ROAD_SUFFIX_TURNPIKE,
- ROAD_SUFFIX_TERRACE,
- ROAD_SUFFIX_ROW,
- ROAD_SUFFIX_PARKWAY,
-
- ROAD_SUFFIX_BRIDGE,
- ROAD_SUFFIX_HIGHWAY,
- ROAD_SUFFIX_RUN,
- ROAD_SUFFIX_PASS,
-
- ROAD_SUFFIX_FREEWAY,
- ROAD_SUFFIX_ALLEY,
- ROAD_SUFFIX_CRESCENT,
- ROAD_SUFFIX_TUNNEL,
- ROAD_SUFFIX_WALK,
- ROAD_SUFFIX_BRANCE,
- ROAD_SUFFIX_COVE,
- ROAD_SUFFIX_BYPASS,
- ROAD_SUFFIX_LOOP,
- ROAD_SUFFIX_SPUR,
- ROAD_SUFFIX_RAMP,
- ROAD_SUFFIX_PIKE,
- ROAD_SUFFIX_GRADE,
- ROAD_SUFFIX_ROUTE,
- ROAD_SUFFIX_ARC,
-
- ROAD_SUFFIX_LAST = ROAD_SUFFIX_ARC
-};
+#define ROAD_SUFFIX_NONE (0)
const gchar* road_suffix_itoa(gint nSuffixID, ESuffixLength eSuffixLength);
gboolean road_suffix_atoi(const gchar* pszSuffix, gint* pReturnSuffixID);
More information about the cairo-commit
mailing list