亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? epr_record.c

?? Insar圖像處理軟件
?? C
字號:
/* * $Id: epr_record.c,v 1.1.1.1 2003/03/05 17:36:43 hartmut Exp $ * * Copyright (C) 2002 by Brockmann Consult (info@brockmann-consult.de) * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation. This program is distributed in the hope it will * be useful, but WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. */#include <assert.h>#include <errno.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include "epr_api.h"#include "epr_core.h"#include "epr_string.h"#include "epr_ptrarray.h"#include "epr_swap.h"#include "epr_field.h"#include "epr_record.h"#include "epr_param.h"#include "epr_dsd.h"#include "epr_msph.h"#include "epr_band.h"#include "epr_bitmask.h"#include "epr_dddb.h"/* * ===================== Record Info Access ============================== *//*   Function:    epr_create_record_info   Access:      public API   Changelog:   2002/01/16  mp initial version *//** * Creates a new record_info for the record by the given  * dataset name. *  * @param dataset_name the name of the dataset, to which the record *        belongs to, must not be <code>NULL</code> * @param field_infos the pointer at the strucrure with information  *        of all fields wich belong to record,  *          must not be <code>NULL</code> * @return the new record instance *         or <code>NULL</code> if an error occured. */ EPR_SRecordInfo* epr_create_record_info(const char* dataset_name, EPR_SPtrArray* field_infos){    EPR_SRecordInfo* record_info = NULL;    EPR_SFieldInfo* field_info = NULL;    int field_infos_index;    int field_infos_length;    uint tot_record_size = 0;    record_info = (EPR_SRecordInfo*) calloc(1, sizeof (EPR_SRecordInfo));    if (record_info == NULL)     {        epr_set_err(e_err_out_of_memory,                     "epr_create_record_info: out of memory");        return NULL;    }    epr_assign_string(&record_info->dataset_name, dataset_name);    if (record_info->dataset_name == NULL)     {        epr_set_err(e_err_out_of_memory,                     "epr_create_record_info: out of memory");        return NULL;    }    record_info->field_infos = field_infos;    field_infos_length = (int)epr_get_ptr_array_length(field_infos);    for (field_infos_index = 0; field_infos_index < field_infos_length; field_infos_index++)    {        field_info = (EPR_SFieldInfo*)epr_get_ptr_array_elem_at(field_infos, field_infos_index);        tot_record_size += field_info->tot_size;    }    record_info->tot_size = tot_record_size;    return record_info;}/** * Frees the memory allocated by the given record_info. * * <p> After calling this function the give record_info pointer gets * invalid and should not be used anymore. *  * @param record_info the record to be released, if <code>NULL</code> *        the function immediately returns */void epr_free_record_info(EPR_SRecordInfo* record_info){    EPR_SFieldInfo* field_info = NULL;    uint field_info_index = 0;    if (record_info == NULL)         return;    if (record_info->field_infos != NULL)    {        for (field_info_index = 0; field_info_index < record_info->field_infos->length; field_info_index++)        {            field_info = (EPR_SFieldInfo*)epr_get_ptr_array_elem_at(record_info->field_infos, field_info_index);            epr_free_field_info(field_info);        }        epr_free_ptr_array(record_info->field_infos);        record_info->field_infos = NULL;    }    epr_free_string(record_info->dataset_name);    record_info->dataset_name = NULL;    record_info->field_infos = NULL;    record_info->tot_size = 0;    free(record_info);}/*   Function:    epr_get_record_info   Access:      private API implementation helper   Changelog:   2002/01/05  mp initial version *//** * Returns information about the structure of the records contained in * a dataset specified by the given <code>dataset_id</code>. * * @param dataset_id the the dataset identifier * * @return the the pointer for the record structure information. */EPR_SRecordInfo* epr_get_record_info(EPR_SDatasetId* dataset_id){    EPR_SProductId* product_id;    EPR_SRecordInfo* record_info;    uint num_record_infos;    uint record_index = 0;    assert(dataset_id != NULL);    product_id = dataset_id->product_id;    assert(product_id != NULL);    assert(product_id->record_info_cache != NULL);        /*     *  checks, if 'record_info_cache' is not empty, then returns this cache,     *  not making moreover     */    num_record_infos = product_id->record_info_cache->length;    for (record_index = 0; record_index < num_record_infos; record_index++)    {        record_info = (EPR_SRecordInfo*) product_id->record_info_cache->elems[record_index];        if (epr_equal_names(record_info->dataset_name, dataset_id->dataset_name))             return record_info;    }	record_info = epr_read_record_info(product_id, dataset_id);    if (record_info == NULL) {        epr_set_err(e_err_file_access_denied,                    "epr_get_record_info: invalid DDDB resource path: missing any 'ASAR' files");        return NULL;    }    epr_add_ptr_array_elem(product_id->record_info_cache, record_info);    return record_info;}EPR_SRecordInfo* epr_read_record_info(EPR_SProductId* product_id, EPR_SDatasetId* dataset_id){    EPR_SRecordInfo* record_info = NULL;    EPR_SFieldInfo* field_info = NULL;    EPR_SPtrArray* field_infos = NULL;    EPR_EDataTypeId data_type_id = e_tid_unknown;    uint num_elems = 0;    uint num_bytes = 0;    uint more_count = 0;    char* field_name = NULL;    char* data_type = NULL;    char* unit = NULL;    char* description = NULL;		int i;    int rt_index;    const struct RecordDescriptorTable* r_tables;    int num_descr;	int num_r_tables;    if (product_id == NULL) {            epr_set_err(e_err_null_pointer,                     "epr_read_record_info: product_id must not be NULL");        return NULL;    }	/* @DDDB */    if (strncmp(product_id->id_string, "MER", 3) == 0) {		r_tables = dddb_meris_rec_tables;		num_r_tables = EPR_NUM_MERIS_REC_TABLES;	} else if (strncmp(product_id->id_string, "ATS", 3) == 0) {		r_tables = dddb_aatsr_rec_tables;		num_r_tables = EPR_NUM_AATSR_REC_TABLES;	} else if (strncmp(product_id->id_string, "ASA", 3) == 0) {		r_tables = dddb_asar_rec_tables;		num_r_tables = EPR_NUM_ASAR_REC_TABLES;	} else {        epr_set_err(e_err_invalid_product_id,                     "epr_read_record_info: invalid product identifier");        return NULL;	}    rt_index = -1;    for (i = 0; i < num_r_tables; i++) {         if (dataset_id->record_descriptor == r_tables[i].descriptors) {            rt_index = i;            break;        }    }    if (rt_index == -1) {        epr_set_err(e_err_invalid_product_id,                     "epr_read_record_info: unknown record");        return NULL;    }    field_infos = epr_create_ptr_array(16);    num_descr = r_tables[rt_index].num_descriptors;    for (i = 0; i < num_descr; i++) {        /* 1: field_name */		field_name = epr_clone_string(r_tables[rt_index].descriptors[i].id);        /* 2: data_type_id */		data_type_id = r_tables[rt_index].descriptors[i].type;        /* 3: unit */		unit = epr_clone_string(r_tables[rt_index].descriptors[i].unit);        /* 4: num_elems */		num_bytes = r_tables[rt_index].descriptors[i].elem_size;        /* 5: num_elems and more_count*/        /* @todo: check return value! and check epr_parse_value_count */		num_elems = epr_parse_value_count(product_id, r_tables[rt_index].descriptors[i].num_elem);		more_count = 1;        /* 6: description*/		description = epr_clone_string(r_tables[rt_index].descriptors[i].description);		field_info = epr_create_field_info(data_type_id, description, field_name, num_elems, num_bytes, more_count, unit);        epr_add_ptr_array_elem(field_infos, field_info);        epr_free_string(field_name);        epr_free_string(data_type);        epr_free_string(unit);        epr_free_string(description);    }    record_info = epr_create_record_info(dataset_id->dataset_name, field_infos);    return record_info;}/*   Function:    epr_read_record_info   Access:      private API implementation helper   Changelog:   2002/01/05  mp initial version *//** * Reads the record information with the given file path and  * returns the poiter at it. * * @param product_id the the product file identifier * @param dataset_name the name of the dataset * @param db_file_istream the DB-table file identifier * * @return the the pointer at the record information. */ /*EPR_SRecordInfo* epr_read_record_info(EPR_SProductId* product_id, EPR_SDatasetId* dataset_id, FILE* db_file_istream)}*//*   Function:    epr_create_record   Access:      public API   Changelog:   2002/01/23  mp initial version *//** * Creates a new record instance from the dataset specified by the given  * dataset name. * * @param the pointer at the record information. *        must not be <code>NULL</code> * @return the new record instance *         or <code>NULL</code> if an error occured. */EPR_SRecord* epr_create_record_from_info(EPR_SRecordInfo* record_info){    EPR_SRecord* record = NULL;    EPR_SFieldInfo* field_info = NULL;    uint field_infos_index = 0;    int field_infos_length;    if (record_info == NULL)     {        epr_set_err(e_err_out_of_memory,                     "epr_create_record_from_info: out of memory");        return NULL;    }    record = (EPR_SRecord*) calloc(1, sizeof(EPR_SRecord));    if (record == NULL)     {        epr_set_err(e_err_out_of_memory,                     "epr_create_record: out of memory");        return NULL;    }    record->magic = EPR_MAGIC_RECORD;    record->info = record_info;    record->num_fields = record_info->field_infos->length;    record->fields = (EPR_SField**) calloc(record->num_fields, sizeof(EPR_SField*));    if (record->fields == NULL)     {        epr_set_err(e_err_out_of_memory,                     "epr_create_record: out of memory");        return NULL;    }    field_infos_length = (int)epr_get_ptr_array_length(record_info->field_infos);    for (field_infos_index = 0; field_infos_index < record_info->field_infos->length; field_infos_index++)    {        field_info = (EPR_SFieldInfo*)epr_get_ptr_array_elem_at(record_info->field_infos, field_infos_index);        record->fields[field_infos_index] = epr_create_field(field_info);    }    return record;}const EPR_SField* epr_get_field_at(const EPR_SRecord* record, uint field_index){    EPR_SField* field = NULL;    epr_clear_err();    if (record == NULL) {        epr_set_err(e_err_null_pointer,                     "epr_get_field_at: record-identifier must not be NULL");        return NULL;        }    if ((field_index < 0) || (field_index >= record->num_fields))    {        epr_set_err(e_err_index_out_of_range,                 "epr_get_field_at: field_index out of range");        return NULL;    }    field = record->fields[field_index];    return field;}uint epr_get_num_fields(const EPR_SRecord* record){    epr_clear_err();    if (record == NULL) {        epr_set_err(e_err_null_pointer,                     "epr_get_field_at: record-identifier must not be NULL");        return (uint)-1;        }    return record->num_fields;}/** * Frees the memory allocated by the given record. * * <p> After calling this function the give record pointer gets * invalid and should not be used anymore. *  * @param record the record to be released, if <code>NULL</code> *        the function immediately returns */void epr_free_record(EPR_SRecord* record){    EPR_SField* field = NULL;    uint fields_index = 0;    epr_clear_err();    if (record == NULL)         return;    if (record->fields != NULL)     {        for (fields_index = 0; fields_index < record->num_fields; fields_index++)        {            field = (EPR_SField*)record->fields[fields_index];            epr_free_field(field);        }        free(record->fields);        record->fields = NULL;    }    /* Do NOT free record->info since many records can        share the same record->info! */    record->info = NULL;    record->num_fields = 0;    free(record);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲乱码国产乱码精品精小说| 丝袜国产日韩另类美女| 久久精品国产99| 日本韩国欧美在线| 一区二区三区.www| 99在线视频精品| 久久在线免费观看| 狠狠色伊人亚洲综合成人| 久久免费看少妇高潮| 日韩黄色小视频| 欧美午夜理伦三级在线观看| 亚洲欧洲精品成人久久奇米网| 大尺度一区二区| 国产欧美一区二区精品性色| 国产一区二区精品在线观看| wwww国产精品欧美| av中文一区二区三区| 亚洲毛片av在线| 欧美日韩大陆在线| 狠狠色丁香久久婷婷综| 国产亚洲一二三区| 日韩欧美一级二级三级久久久| 91福利视频久久久久| 亚洲妇熟xx妇色黄| 久久久不卡网国产精品二区| 91在线精品一区二区| 天天色 色综合| 国产精品国产自产拍在线| 成人福利视频在线看| 亚洲国产精品影院| 国产精品网站在线| 欧美综合天天夜夜久久| 成人福利视频网站| 国产主播一区二区三区| 天天综合色天天综合色h| 久久久精品中文字幕麻豆发布| 欧美国产日韩a欧美在线观看 | 国产日韩欧美制服另类| 欧美一级日韩不卡播放免费| 亚洲欧美一区二区视频| 亚洲综合色成人| 国产99精品国产| 久久久噜噜噜久久人人看| 蜜臀av一区二区在线免费观看| 精品1区2区3区| 亚洲国产中文字幕| 色狠狠色噜噜噜综合网| 亚洲精品国产品国语在线app| 国产成人av一区二区三区在线观看| 欧美一区二区成人| 蜜臂av日日欢夜夜爽一区| 91免费观看视频| 国产偷国产偷亚洲高清人白洁 | 欧美videofree性高清杂交| 亚洲电影激情视频网站| 欧美日本一区二区三区四区 | 国产传媒久久文化传媒| 久久久综合激的五月天| 国产白丝精品91爽爽久久| 久久精品视频一区二区三区| 国产一区二区中文字幕| 国产三级一区二区| 99久久伊人久久99| 一区二区三区精品| 成人免费看片app下载| 日韩黄色片在线观看| 日韩欧美亚洲国产精品字幕久久久| 久久爱www久久做| 国产欧美日韩精品a在线观看| 成人午夜av电影| 一级做a爱片久久| 日韩西西人体444www| 男女性色大片免费观看一区二区 | 国产精品自拍一区| 国产精品久久久爽爽爽麻豆色哟哟 | 91久久香蕉国产日韩欧美9色| 亚洲欧美一区二区在线观看| 成人黄动漫网站免费app| 亚洲精品视频在线| 欧美一卡2卡三卡4卡5免费| 国产成人自拍在线| 亚洲国产精品尤物yw在线观看| 日韩美女一区二区三区四区| 粉嫩一区二区三区性色av| 国产精品你懂的| 欧美人xxxx| 成人理论电影网| 青青草国产精品亚洲专区无| 国产亚洲人成网站| 欧美影视一区二区三区| 久久99精品国产麻豆婷婷| 亚洲免费在线视频| 欧美一区二区三区不卡| 极品少妇xxxx精品少妇| 一区二区三区成人在线视频| 久久久久久久久久久久电影| 欧美性生活影院| 不卡在线观看av| 麻豆精品一区二区综合av| 国产亚洲成av人在线观看导航 | 在线免费观看视频一区| 美国一区二区三区在线播放| 亚洲精品视频观看| 欧美精品在线一区二区| 色综合色狠狠天天综合色| 久久99国产乱子伦精品免费| 亚洲一区日韩精品中文字幕| 久久久久久久久久久99999| 欧美精品 国产精品| 日本久久精品电影| 丰满放荡岳乱妇91ww| 久久99久久久久| 性久久久久久久久| 亚洲一区二区欧美激情| 久久视频一区二区| 91精品国产综合久久蜜臀| 欧美无砖专区一中文字| 91免费版在线| 91一区二区在线观看| 国产二区国产一区在线观看| 韩日精品视频一区| 久久不见久久见免费视频1 | www.视频一区| 国产成人亚洲综合色影视| 捆绑调教美女网站视频一区| 日本不卡的三区四区五区| 亚洲国产一区二区视频| 一区二区三区欧美视频| 国产精品免费视频观看| 国产女同性恋一区二区| 欧美精选一区二区| 欧美美女喷水视频| 精品视频在线视频| 日本精品一级二级| 久久久久久久网| 欧美成人精精品一区二区频| 精品盗摄一区二区三区| 久久九九99视频| 中文字幕精品一区二区三区精品| 欧美韩国一区二区| 国产精品久久777777| 曰韩精品一区二区| 日韩一区精品视频| 日韩精品电影在线观看| 日韩av电影天堂| 激情六月婷婷久久| 成人午夜私人影院| 欧美视频中文一区二区三区在线观看 | 国产一区二区免费在线| 成人国产精品视频| 色噜噜狠狠成人网p站| 91.麻豆视频| 精品成人在线观看| 国产精品久久看| 亚洲福利一区二区| 经典一区二区三区| 丁香一区二区三区| 在线亚洲一区二区| 日韩免费观看高清完整版 | 国产成人亚洲综合色影视| 91小视频在线| 日韩三级视频中文字幕| 亚洲国产精品传媒在线观看| 亚洲综合在线观看视频| 久久精品国产精品亚洲精品| 成人免费高清在线| 欧美喷水一区二区| 日本一区二区三级电影在线观看| 尤物av一区二区| 国产精品亚洲а∨天堂免在线| 一本一道波多野结衣一区二区| 欧美一区二区三区免费| 国产精品色哟哟网站| 日韩成人精品在线| 99久久精品国产导航| 91精品国产品国语在线不卡| 精品国产一区久久| 午夜精品久久久久久久久| 国产盗摄视频一区二区三区| 色天使色偷偷av一区二区| 久久这里只精品最新地址| 亚洲一区二区三区激情| 成人免费观看男女羞羞视频| 91精品国模一区二区三区| 亚洲图片欧美激情| 国产成人综合网| 日韩欧美国产综合一区| 中文字幕 久热精品 视频在线| 日韩av电影天堂| 欧美日韩一区二区不卡| 中文字幕一区在线观看视频| 久久国产欧美日韩精品| 欧美日韩一级黄| 久久午夜电影网| 国产乱码精品一区二区三区av | ...av二区三区久久精品| 久久99精品国产麻豆婷婷| 欧美日韩免费视频| 亚洲美腿欧美偷拍| av电影一区二区|