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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? epr_msph.c

?? Insar圖像處理軟件
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* * $Id: epr_msph.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"/** * Reads the full main product header (MPH) of the ENVISAT product file * by the given product identifier. * * @param product_id the product identifier, must not be <code>NULL</code> * @return a record representing the MPH of the specified product file *         or <code>NULL</code> if an error occured. */EPR_SRecord* epr_read_mph(EPR_SProductId* product_id){    EPR_SRecord* record = NULL;    char* code_block;    int numread;    epr_clear_err();    code_block = epr_create_string(EPR_MPH_SIZE);    if (code_block == NULL)    {        epr_set_err(e_err_out_of_memory,                     "epr_read_mph: out of memory");        return NULL;    }    rewind(product_id->istream);    numread = fread(code_block, 1, EPR_MPH_SIZE, product_id->istream);    if (numread != EPR_MPH_SIZE)    {        epr_set_err(e_err_file_read_error,             "epr_read_mph: wrong reading MPH from product data file");        return NULL;    }    record = epr_parse_header("mph", code_block);    if (record == NULL)    {        epr_set_err(e_err_invalid_record,             "epr_read_mph: can not recognize the correct MPH from product data file");    } else {        epr_add_ptr_array_elem(product_id->record_info_cache, record->info);    }    epr_free_string(code_block);    return record;}/** * Reads the full specific product header (SPH) of the ENVISAT product file * by the given product identifier. * * @param product_id the product identifier, must not be <code>NULL</code> * @return a record representing the MPH of the specified product file *         or <code>NULL</code> if an error occured. */EPR_SRecord* epr_read_sph(EPR_SProductId* product_id){    EPR_SRecord* sph_record = NULL;    const EPR_SField* field;    char* code_block;    int numread;    ulong sph_length = 0;    ulong sph_without_dsd_length = 0;    ulong dsd_number = 0;    epr_clear_err();    if (product_id->mph_record == NULL) {        product_id->mph_record = epr_read_mph(product_id);        if (product_id->mph_record == NULL) {            epr_set_err(e_err_file_read_error, "epr_read_sph: wrong MPH");            return NULL;        }    }    field = epr_get_field(product_id->mph_record, "SPH_SIZE");    sph_length = ((ulong*) field->elems)[0];    if (sph_length == 0) {        epr_set_err(e_err_invalid_value,             "epr_read_sph: wrong MPH: SPH_SIZE must be > 0");        return NULL;    }    field = epr_get_field(product_id->mph_record, "NUM_DSD");    dsd_number = ((ulong*) field->elems)[0];    if (dsd_number == 0) {        epr_set_err(e_err_invalid_value,             "epr_read_sph: wrong MPH: NUM_DSD must be > 0");        return NULL;    }    epr_api.epr_head_size = sph_length + EPR_MPH_SIZE;    if (fseek(product_id->istream, EPR_MPH_SIZE, SEEK_SET) != 0) {        epr_set_err(e_err_file_access_denied,                     "epr_read_sph: file seek failed");        return NULL;    }    sph_without_dsd_length = sph_length - dsd_number * EPR_DSD_SIZE;    code_block = epr_create_string(sph_without_dsd_length);    numread = fread(code_block, 1, sph_without_dsd_length, product_id->istream);    if ((uint)numread != sph_without_dsd_length) {        epr_set_err(e_err_file_read_error,             "epr_read_sph: wrong reading SPH from product data file");        return NULL;    }       sph_record = epr_parse_header("sph", code_block);    if (sph_record == NULL) {        epr_set_err(e_err_invalid_record,             "epr_read_sph: can not recognize the correct SPH from product data file");    } else {        epr_add_ptr_array_elem(product_id->record_info_cache, sph_record->info);    }    epr_free_string(code_block);    return sph_record;}void epr_store_header(const char* header_name, const char* ascii_source) {    FILE* os;    char fname[1024];    sprintf(fname, "%s.txt", header_name);    os=fopen(fname, "w");    fprintf(os,"%s", ascii_source);    fclose(os);}/** * Parses the header ASCII information. *  * @param header_name name of the header ascii information; * @param ascii_source the header ascii information was read; * @param record the identifier of header ascii information. */EPR_SRecord* epr_parse_header(const char* header_name, const char* ascii_source){    EPR_SRecordInfo* record_info;    EPR_SPtrArray* field_infos = NULL;    EPR_SFieldInfo* field_info;    EPR_SPtrArray* header_values = NULL;    EPR_SRecord* record = NULL;    EPR_EDataTypeId tp;    char * code_block;    char seps[] = EPR_HEADER_SEPARATOR_ARRAY;    char * token_name;    char * token_value;    char * token_unit;    char * h_name;          int pos = 0;    int pos_ascii = 0;    uint num_bytes = 0;    uint num_elems = 0;            epr_clear_err();    /* uncomment for debugging purpose */    /* epr_store_header(header_name, ascii_source); */    header_values = epr_create_ptr_array(16);    field_infos = epr_create_ptr_array(16);    h_name = epr_clone_string(header_name);        while ((code_block = epr_str_tok(ascii_source, "\n", &pos_ascii)) != NULL) {        /*if EMPTY code_block*/            if ((strlen(code_block) > 0) && (code_block[0] == ' ')) {            /* epr_log(e_log_info, "code_block is empty"); */            if (code_block != NULL) {                epr_free_string(code_block);                code_block = NULL;            }            continue;        }        /*if '=' separator*/        pos = 0;        token_name = epr_str_tok(code_block, seps, &pos);        if (pos == 1) {            epr_set_err(e_err_invalid_keyword_name,                         "epr_parse_header: invalid ascii header: keyword is empty");            epr_free_string(token_name);            if (code_block != NULL) {                epr_free_string(code_block);                code_block = NULL;            }            continue;        }         if (pos == (int)strlen(code_block) + 1) {            epr_set_err(e_err_invalid_keyword_name,                         "epr_parse_header: invalid ascii header: keyword not found");            epr_free_string(token_name);            if (code_block != NULL) {                epr_free_string(code_block);                code_block = NULL;            }            continue;        }        /*if STRING value*/        if (code_block[pos] == '\"') {            pos ++;			/* 			  Note that strings always are considered as one single element,			  so we get the total number of characters from tot_size.			  Addidionally we reserve an extra character for the trailing zero (terminator),			*/            token_value = epr_strip_string_r(epr_str_tok(code_block, "\"", &pos));            token_unit = NULL;            tp = e_tid_string;            num_bytes = (uint)strlen(token_value);            num_elems = 1;            epr_add_ptr_array_elem(header_values, token_value);        } else {            token_value = epr_str_tok(code_block, seps, &pos);            if (token_value == NULL) {                epr_set_err(e_err_invalid_value,                             "epr_parse_header: invalid ascii header: value not found");                token_value = epr_clone_string("");                token_unit = NULL;                tp = e_tid_uchar;                num_bytes = 0;                num_elems = 1;                epr_add_ptr_array_elem(header_values, token_value);            } else {                /*if FLOAT-DOUBLE value*/                if (strchr(token_value, '.') != NULL                     || strchr(token_value, 'e') != NULL                     || strchr(token_value, 'E') != NULL)                {                    epr_parse_double_token(header_values, token_value, &num_elems, &num_bytes, &tp);                    token_unit = epr_str_tok(code_block, seps, &pos);                    epr_free_string(token_value);                    token_value = NULL;                /*if INTEGER_LONG value*/                } else if ((strlen(token_value) > 1)) {                    epr_parse_long_token(header_values, token_value, &num_elems, &num_bytes, &tp);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人av小说网| 午夜激情一区二区| 国产乱码精品一区二区三| 日韩色在线观看| 看电影不卡的网站| 精品国产成人系列| 国产精品亚洲第一| 日韩久久一区二区| 欧美色区777第一页| 亚洲成人一二三| 欧美不卡一区二区三区| 国产一二精品视频| 国产精品久久99| 91麻豆免费视频| 午夜av电影一区| 日韩女优电影在线观看| 国产成人精品网址| 亚洲精品va在线观看| 欧美美女网站色| 国产精品白丝av| 中文字幕字幕中文在线中不卡视频| 日本精品视频一区二区| 日本不卡高清视频| 国产精品美女久久久久久久久久久 | 亚洲欧美色图小说| 制服.丝袜.亚洲.另类.中文| 精品一区二区日韩| 亚洲色图色小说| 日韩一区二区免费在线观看| 岛国av在线一区| 五月激情综合网| 中文字幕电影一区| 91精品国产高清一区二区三区蜜臀| 国产一区二区美女诱惑| 一区二区在线观看av| 精品成人佐山爱一区二区| 97精品超碰一区二区三区| 麻豆国产精品777777在线| 亚洲免费伊人电影| 国产亚洲成年网址在线观看| 欧美三级电影网站| 成人激情文学综合网| 日韩av成人高清| 亚洲精品高清在线观看| 国产亚洲精品超碰| 欧美一区二区免费| 欧美亚洲一区二区在线观看| 国产69精品一区二区亚洲孕妇| 丝袜美腿亚洲色图| **欧美大码日韩| 久久久久久亚洲综合| 5858s免费视频成人| 色播五月激情综合网| 成人在线综合网站| 国产综合久久久久久鬼色| 三级影片在线观看欧美日韩一区二区 | 亚洲色图欧洲色图| 久久久亚洲综合| 日韩一二三区视频| 欧美日韩一区三区四区| 91网站最新网址| 成人福利在线看| 国产99一区视频免费| 精品夜夜嗨av一区二区三区| 亚洲va韩国va欧美va精品| 亚洲精品视频在线观看免费 | 成人午夜在线视频| 国产在线精品视频| 麻豆成人av在线| 日韩电影在线免费观看| 亚洲国产欧美在线| 亚洲最色的网站| 一区二区三区免费| 亚洲激情中文1区| 一区二区三区欧美日韩| 一区二区高清在线| 亚洲自拍偷拍麻豆| 亚洲一区在线看| 午夜欧美一区二区三区在线播放| 亚洲在线视频一区| 亚洲成年人影院| 日本不卡1234视频| 激情亚洲综合在线| 成人一区二区三区中文字幕| 成人影视亚洲图片在线| 成人av集中营| 91黄色免费看| 欧美日韩精品二区第二页| 7777精品伊人久久久大香线蕉的| 91精品中文字幕一区二区三区| 欧美一区二区在线免费播放| 欧美一区二区三区啪啪| 2024国产精品视频| 中文字幕在线不卡一区| 一区二区在线观看不卡| 日韩国产欧美三级| 韩国女主播一区| 成人av电影在线播放| 欧洲另类一二三四区| 欧美一卡2卡3卡4卡| 精品国产网站在线观看| 国产精品剧情在线亚洲| 亚洲一区二区三区自拍| 青青草成人在线观看| 成人一区二区三区视频在线观看| 91麻豆.com| 91精品国产综合久久小美女| 精品理论电影在线| 亚洲手机成人高清视频| 日韩黄色在线观看| 国产精品18久久久久久久久久久久| 成人动漫精品一区二区| 欧美亚洲动漫精品| 久久亚洲免费视频| 一区二区三区不卡视频| 另类欧美日韩国产在线| 成人av午夜电影| 日韩一区二区免费在线电影| 国产精品免费网站在线观看| 天涯成人国产亚洲精品一区av| 国产一区二区三区免费播放| 在线亚洲人成电影网站色www| 日韩欧美电影一区| 亚洲天堂成人在线观看| 免费的国产精品| 91亚洲精品乱码久久久久久蜜桃| 日韩一区二区精品在线观看| 中文字幕一区二区三区在线观看| 青娱乐精品在线视频| 99综合影院在线| 日韩精品中文字幕一区二区三区 | 色综合久久88色综合天天| 日韩一卡二卡三卡国产欧美| 中文字幕欧美激情| 精彩视频一区二区| 欧美日韩一卡二卡三卡 | 精品奇米国产一区二区三区| 日韩理论电影院| 国产成人免费在线| 91精品国产综合久久久蜜臀图片 | 国产在线一区观看| 7777精品伊人久久久大香线蕉经典版下载 | 有坂深雪av一区二区精品| 国产一区高清在线| 欧美一区二区三区视频免费 | 欧美日韩aaa| 亚洲丝袜精品丝袜在线| 高清不卡一二三区| 亚洲精品在线电影| 欧美aa在线视频| 欧美精选午夜久久久乱码6080| 综合久久久久久久| 99久久精品国产导航| 国产亚洲一区二区三区| 麻豆国产欧美一区二区三区| 欧美电影在哪看比较好| 亚洲一区视频在线观看视频| 91猫先生在线| 亚洲精选免费视频| 日本久久一区二区三区| 亚洲精品高清在线观看| av在线一区二区三区| 亚洲国产成人一区二区三区| 国产麻豆91精品| 国产亚洲精品超碰| 国产福利一区二区三区视频 | 日韩欧美一级二级三级| 亚洲国产精品久久久男人的天堂| 色av成人天堂桃色av| 亚洲一卡二卡三卡四卡五卡| 在线一区二区视频| 亚洲va欧美va人人爽| 6080国产精品一区二区| 免费在线成人网| 欧美一级日韩免费不卡| 久久99热狠狠色一区二区| 精品1区2区在线观看| 国产一区二区免费在线| 日本一区二区三区电影| 99麻豆久久久国产精品免费| 亚洲日本一区二区三区| 欧美性色欧美a在线播放| 亚洲成av人片在线观看| 日韩视频一区在线观看| 国产自产v一区二区三区c| 国产欧美一区二区精品久导航 | 欧美哺乳videos| 国产精品538一区二区在线| 中文字幕欧美日本乱码一线二线| 99r精品视频| 亚洲成人高清在线| 日韩久久久精品| 国产suv精品一区二区883| 亚洲精品视频在线看| 91精品在线一区二区| 国产91精品一区二区麻豆亚洲| 久久国产剧场电影| 久久精品亚洲精品国产欧美kt∨| 成人精品gif动图一区| 夜夜嗨av一区二区三区四季av|