31 int offset = *p_offset;
41 }
else if (offset != 0 && offset >= size) {
54 }
else if (limit > size) {
215 sprintf(type_in_hex,
"%#02x", type);
233 switch (proc->
type) {
256 for (i = 0; i < proc->
nvars; i++) {
277 for (i = 0; i < vector->
u.
v.n_sections; i++) {
279 const char *value_raw;
374 grn_column_inspect_common(ctx, buf, obj);
413 grn_store_inspect_body(ctx, buf, obj);
422 grn_store_inspect_body(ctx, buf, obj);
431 int i, n, have_flags = 0;
435 grn_column_inspect_common(ctx, buf, obj);
442 for (i = 0; i < n; i++) {
446 source_id = source_ids[
i];
514 }
else if (domain_id) {
580 if (default_tokenizer) {
682 grn_table_type_inspect(ctx, buf, obj);
689 grn_table_key_inspect(ctx, buf, obj);
697 }
else if (range_id) {
707 grn_table_columns_inspect(ctx, buf, obj);
711 grn_table_ids_inspect(ctx, buf, obj);
714 grn_table_default_tokenizer_inspect(ctx, buf, obj);
717 grn_table_normalizer_inspect(ctx, buf, obj);
720 grn_table_keys_inspect(ctx, buf, obj);
724 grn_table_subrec_inspect(ctx, buf, obj);
737 grn_geo_point_inspect_point(
grn_ctx *ctx,
grn_obj *buf,
int point)
755 int latitude, longitude;
767 grn_geo_point_inspect_point(ctx, buf, latitude);
769 grn_geo_point_inspect_point(ctx, buf, longitude);
785 for (j = 0; j < 8; j++) {
806 grn_table_type_inspect(ctx, buf, table);
899 grn_geo_point_inspect(ctx, buffer, obj);
910 grn_record_inspect(ctx, buffer, obj);
930 grn_uvector_record_inspect(ctx, buffer, obj);
941 grn_vector_inspect(ctx, buffer, obj);
947 grn_accessor_inspect(ctx, buffer, obj);
969 grn_type_inspect(ctx, buffer, obj);
972 grn_proc_inspect(ctx, buffer, obj);
981 grn_table_inspect(ctx, buffer, obj);
987 grn_ra_inspect(ctx, buffer, obj);
990 grn_ja_inspect(ctx, buffer, obj);
993 grn_ii_inspect(ctx, buffer, obj);
1026 static char *win32_base_dir = NULL;
1030 if (!win32_base_dir) {
1032 const wchar_t *dll_filename = GRN_DLL_FILENAME;
1033 wchar_t absolute_dll_filename[MAX_PATH];
1034 DWORD absolute_dll_filename_size;
1035 dll = GetModuleHandleW(dll_filename);
1036 absolute_dll_filename_size = GetModuleFileNameW(dll,
1037 absolute_dll_filename,
1039 if (absolute_dll_filename_size == 0) {
1040 win32_base_dir =
".";
1042 DWORD ansi_dll_filename_size;
1043 ansi_dll_filename_size =
1044 WideCharToMultiByte(CP_ACP, 0,
1045 absolute_dll_filename, absolute_dll_filename_size,
1046 NULL, 0, NULL, NULL);
1047 if (ansi_dll_filename_size == 0) {
1048 win32_base_dir =
".";
1051 win32_base_dir = malloc(ansi_dll_filename_size + 1);
1052 WideCharToMultiByte(CP_ACP, 0,
1053 absolute_dll_filename, absolute_dll_filename_size,
1054 win32_base_dir, ansi_dll_filename_size,
1056 win32_base_dir[ansi_dll_filename_size] =
'\0';
1057 if ((path = strrchr(win32_base_dir,
'\\'))) {
1060 path = strrchr(win32_base_dir,
'\\');
1061 if (path && (strcasecmp(path + 1,
"bin") == 0 ||
1062 strcasecmp(path + 1,
"lib") == 0)) {
1065 path = win32_base_dir + strlen(win32_base_dir);
1068 for (path = win32_base_dir; *path; path++) {
1069 if (*path ==
'\\') {
1076 return win32_base_dir;