null+****@clear*****
null+****@clear*****
2010年 8月 4日 (水) 10:33:59 JST
Kouhei Sutou 2010-08-04 01:33:59 +0000 (Wed, 04 Aug 2010)
New Revision: a48382d341d933848598c320f4c9fed53b30164d
Log:
add grn_p_geo_point().
Modified files:
lib/util.c
lib/util.h
Modified: lib/util.c (+11 -0)
===================================================================
--- lib/util.c 2010-08-04 00:59:24 +0000 (9a7cce8)
+++ lib/util.c 2010-08-04 01:33:59 +0000 (be22582)
@@ -628,3 +628,14 @@ grn_p(grn_ctx *ctx, grn_obj *obj)
printf("%.*s\n", (int)GRN_TEXT_LEN(&buffer), GRN_TEXT_VALUE(&buffer));
grn_obj_unlink(ctx, &buffer);
}
+
+void
+grn_p_geo_point(grn_ctx *ctx, grn_geo_point *point)
+{
+ grn_obj obj;
+
+ GRN_WGS84_GEO_POINT_INIT(&obj, 0);
+ GRN_GEO_POINT_SET(ctx, &obj, point->latitude, point->longitude);
+ grn_p(ctx, &obj);
+ grn_obj_unlink(ctx, &obj);
+}
Modified: lib/util.h (+1 -0)
===================================================================
--- lib/util.h 2010-08-04 00:59:24 +0000 (128772b)
+++ lib/util.h 2010-08-04 01:33:59 +0000 (748a89e)
@@ -34,6 +34,7 @@ GRN_API grn_rc grn_normalize_offset_and_limit(grn_ctx *ctx, int size, int *offse
grn_obj *grn_inspect(grn_ctx *ctx, grn_obj *buffer, grn_obj *obj);
grn_obj *grn_inspect_name(grn_ctx *ctx, grn_obj *buffer, grn_obj *obj);
void grn_p(grn_ctx *ctx, grn_obj *obj);
+void grn_p_geo_point(grn_ctx *ctx, grn_geo_point *point);
#ifdef __cplusplus
}