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

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

?? esig_nat.c

?? 隱馬爾科夫模型工具箱
?? C
?? 第 1 頁 / 共 2 頁
字號:
   long    size;                /* size of element (bytes) */   long    length;              /* number of elements */   if (file  == NULL || field == NULL || field->type == NO_TYPE)      {         DebugMsg(1, "ReadNativeData: NULL argument or type NO_TYPE.");         return FALSE;      }   size = InternTypeSize(field->type);   length = FieldLength(field);   if (field->data == NULL && length != 0)      {         field->data = malloc(length * size);         if (field->data == NULL)            {               DebugMsg(1, "ReadNativeData: allocation failure.");               return FALSE;            }      }   return (NativeRead(field->data, field->type, length, file) == length);}/* * Read items of data from a file into a block of storage indicated * by a pointer "data".  The number of items is given by "length", * and their data type is indicated by the integer code "type". * Return the number of successfully read items.  (A value other * than "length" indicates an error). */static intNativeRead(void *data,           int  type,           long length,           FILE *file){   if (file == NULL || data == NULL || length <= 0)      return 0;   if (type == ARRAY)      {         Array  *array = (Array *) data;         long   n;         for (n = 0;              n < length && ReadNativeArray(&array[n], file);              n++)            { }         return n;      }   else      {         long   size;           /* size of element (bytes) */         size = InternTypeSize(type);         return fread(data, size, length, file);      }}/* * Read from file the native-mode representation of one item of type * ARRAY.  Store the type, rank, dimensions, and data in the members of * the array structure, allocating the necessary space for dimensions * and data.  Return TRUE for success, FALSE for failure. */static intReadNativeArray(Array *array,                FILE *file){   short   type, rank;   long    *dim;   long    length;   long    size;   void    *data;   if (array == NULL || file == NULL)      return FALSE;   /* Read type, rank. */   if (fread(&type, sizeof(short), 1, file) != 1)      return FALSE;             /* Couldn't get type. */   if (fread(&rank, sizeof(short), 1, file) != 1)      return FALSE;             /* Couldn't get rank. */   if (rank == 0)      dim = NULL;   else      {         dim = (long *) malloc(rank * sizeof(long));         if (dim == NULL)            return FALSE;       /* Allocation failure. */         if (fread(dim, sizeof(long), rank, file) != rank)            return FALSE;       /* Couldn't get dimensions. */      }   length = LongProd(rank, dim);   size = InternTypeSize(type);   if (length == 0)      data = NULL;   else      {         data = malloc(length*size);         if (data == NULL)            return FALSE;       /* Allocation failure. */         if (NativeRead(data, type, length, file) != length)            return FALSE;      }   array->type = type;   array->rank = rank;   array->dim = dim;   array->data = data;   return TRUE;}/* * Read field specification in native binary format from file * and return pointer to it; return NULL on failure. */static FieldSpec *ReadNativeFieldSpec(FILE *file){   char *name;          /* field name */   short        type;           /* data type code */   short        rank;           /* number of dimensions */   int          i;              /* loop index */   FieldSpec    *field;         /* field spec being read */   long num_ax_names;   /* number of axis names */   /* Read name, type, rank. */   if (!ReadNativeString(&name, file))      return NULL;              /* Failure getting field name. */   if (fread(&type, sizeof(short), 1, file) != 1)      return NULL;              /* Couldn't get type. */   if (fread(&rank, sizeof(short), 1, file) != 1)      return NULL;              /* Couldn't get rank. */   /* Allocate structure. */   field = NewFieldSpec(type, rank);   if (field == NULL)      return NULL;              /* Couldn't create field spec. */   field->name = name;   /* Read dimensions. */   if (rank != 0 && field->dim == NULL)      return NULL;              /* Inconsistent rank and dimensions. */   if (fread(field->dim, sizeof(long), rank, file) != rank)      return NULL;              /* Couldn't get dimensions. */   /* Read units, scale, offset, axis_names. */   if (!ReadNativeString(&field->units, file))      return NULL;   if (fread(&field->scale, sizeof(double), 1, file) != 1)      return NULL;              /* Couldn't get scale. */   if (fread(&field->offset, sizeof(double), 1, file) != 1)      return NULL;              /* Couldn't get offset. */   if (fread(&num_ax_names, sizeof(long), 1, file) != 1)      return NULL;              /* Couldn't get number of axis names. */   if (num_ax_names > rank)      return NULL;              /* Bad value for num_ax_names. */   if (num_ax_names != 0)      {         field->axis_names = (char **) malloc(rank * sizeof(char *));         if (field->axis_names == NULL)            return NULL;        /* Allocation failure. */         for (i = 0; i < num_ax_names; i++)            ReadNativeString(&field->axis_names[i], file);         for ( ; i < rank; i++)            field->axis_names[i] = NULL;      }   /* Read occurrence class. */   if (fread(&field->occurrence, sizeof(short), 1, file) != 1)      return NULL;              /* Couldn't get occurrence code. */   /* Read data if required. */   if (type != NO_TYPE       && field->occurrence != REQUIRED && field->occurrence != OPTIONAL)      {         if (!ReadNativeData(field, file))            return NULL;        /* Failure reading data. */      }   /* Read subfield list. */   if (!ReadNativeFieldList(&field->subfields, file))      {         FreeFieldSpec(field);         return NULL;           /* Failure getting subfields. */      }   return field;                /* Success. */}/* * Read character string in native binary format from file and * assign a pointer to it via output variable.  Return TRUE on * success, FALSE on failure. */static intReadNativeString(char **string, FILE *file){   long    length;   char    *str;   if (fread(&length, sizeof(long), 1, file) != 1)      return FALSE;             /* Couldn't get length. */   if (length == 0)      str = NULL;   else      {         str = (char *) malloc(length + 1);         if (str ==  NULL)            return FALSE;         if (fread(str, 1, length, file) != length)            {               free(str);               return FALSE;            }         str[length] = '\0';      }   if (string != NULL)      *string = str;   return TRUE;}/* * *** FUNCTIONS FOR OUTPUT *//* * Write "data" member of field to file in native binary format. * Return TRUE on success, FALSE on failure. */static intWriteNativeData(FieldSpec *field,                FILE      *file){   long    length;              /* number of elements */   if (file  == NULL || field == NULL || field->type == NO_TYPE)      return FALSE;   length = FieldLength(field);   if (length != 0 && field->data == NULL)      return FALSE;   return (NativeWrite(field->data, field->type, length, file) == length);}/* * Write items of data to a file in native binary format from * the block of storage indicated by the pointer "data". * The number of items is given by "length", and their data type * is indicated by the integer code "type". * Return the number of successfully written items.  (A value other * than "length" indicates an error). */static intNativeWrite(void    *data,            int     type,            long    length,            FILE    *file){   if (file == NULL || data == NULL || length <= 0)      return 0;   if (type == ARRAY)      {         Array  *array = (Array *) data;         long   n;         for (n = 0;              n < length && WriteNativeArray(&array[n], file);              n++)            { }         return n;      }   else      {         long   size;           /* size of element (bytes) */         size = InternTypeSize(type);         return fwrite(data, size, length, file);      }}/* * Write to "file" the native binary representation of one item of type * ARRAY from the location indicated by "array". * Return TRUE for success, FALSE for failure. * * */static intWriteNativeArray(Array *array,                 FILE  *file){   short   type, rank;   long    *dim;   void    *data;   long    length;   if (array == NULL || file == NULL)      return FALSE;   type = array->type;   rank = array->rank;   dim = array->dim;   data = array->data;   if (fwrite(&type, sizeof(short), 1, file) != 1)      return FALSE;   if (fwrite(&rank, sizeof(short), 1, file) != 1)      return FALSE;   if (rank > 0)      {         if (dim == NULL)            return FALSE;         if (fwrite(dim, sizeof(long), rank, file) != rank)            return FALSE;      }   length = LongProd(rank, dim);   if (length > 0)      {         if (data == NULL)            return FALSE;         if (NativeWrite(data, type, length, file) != length)            return FALSE;      }   return TRUE;}/* * Write field specification to file in native binary format. * Return TRUE on success, FALSE on failure. */static intWriteNativeFieldSpec(FieldSpec  *field,                     FILE       *file){   int     rank;                /* number of dimensions */   int     i;                   /* loop index */   long    num_ax_names;        /* number of axis names */   if (file == NULL || field == NULL)      return FALSE;   if (!WriteNativeString(field->name, file))      return FALSE;   if (fwrite(&field->type, sizeof(short), 1, file) != 1)      return FALSE;   if (fwrite(&field->rank, sizeof(short), 1, file) != 1)      return FALSE;   rank = field->rank;   if (rank != 0 && field->dim == NULL)      return FALSE;             /* Inconsistent rank and dimensions. */   if (fwrite(field->dim, sizeof(long), rank, file) != rank)      return FALSE;   if (!WriteNativeString(field->units, file))      return FALSE;   if (fwrite(&field->scale, sizeof(double), 1, file) != 1)      return FALSE;   if (fwrite(&field->offset, sizeof(double), 1, file) != 1)      return FALSE;   num_ax_names = (field->axis_names == NULL) ? 0 : rank;   if (fwrite(&num_ax_names, sizeof(long), 1, file) != 1)      return FALSE;   for (i = 0; i < num_ax_names; i++)      if (!WriteNativeString(field->axis_names[i], file))         return FALSE;   if (fwrite(&field->occurrence, sizeof(short), 1, file) != 1)      return FALSE;   if (field->type != NO_TYPE       && field->occurrence != REQUIRED && field->occurrence != OPTIONAL)      {         if (!WriteNativeData(field, file))            return FALSE;      }   if (!WriteNativeFieldList(field->subfields, file))      return FALSE;   return TRUE;}/* * Write character string in native binary format to a file. *  Return TRUE on success, FALSE on failure. */static intWriteNativeString(char *string,                  FILE *file){   long    length;   if (file == NULL)      return FALSE;   if (string == NULL)      string = "";   length = strlen(string);   if (fwrite(&length, sizeof(long), 1, file) != 1)      return FALSE;             /* Couldn't write length. */   if (fwrite(string, 1, length, file) != length)      return FALSE;   return TRUE;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一二三区不卡| 欧美日韩精品一区二区在线播放| 欧美一区二区三区思思人| 亚洲午夜在线观看视频在线| 欧美日韩视频一区二区| 亚洲3atv精品一区二区三区| 91精品欧美综合在线观看最新| 久久国产婷婷国产香蕉| 2022国产精品视频| 菠萝蜜视频在线观看一区| 亚洲欧美日韩国产手机在线| 在线观看欧美精品| 蜜桃传媒麻豆第一区在线观看| 亚洲精品一区二区三区在线观看| 国产精品亚洲成人| 亚洲美女区一区| 欧美一级一级性生活免费录像| 国产中文字幕精品| 亚洲欧美日韩一区二区三区在线观看| 在线欧美一区二区| 久久精品久久综合| **欧美大码日韩| 欧美乱熟臀69xxxxxx| 国产麻豆视频精品| 一级精品视频在线观看宜春院| 欧美精品 日韩| 成人美女视频在线看| 亚洲成a天堂v人片| 久久久久久影视| 91福利小视频| 国产精品18久久久久久久久久久久| 国产精品二区一区二区aⅴ污介绍| 欧美日韩不卡一区二区| 国产福利视频一区二区三区| 亚洲香肠在线观看| 国产精品免费视频观看| 日韩欧美一级二级三级久久久| a4yy欧美一区二区三区| 精品亚洲免费视频| 五月天中文字幕一区二区| 中文字幕免费一区| 精品精品国产高清a毛片牛牛| 91视视频在线观看入口直接观看www | 国产精品99久久久久久久vr| 亚洲一区二区三区中文字幕在线| 久久无码av三级| 亚洲成年人影院| 欧美96一区二区免费视频| 成人黄色小视频| 日韩午夜激情电影| 香蕉av福利精品导航| gogo大胆日本视频一区| 欧美精品一区二区精品网| 亚洲国产成人高清精品| 一本大道久久a久久综合| 亚洲精品一区二区三区香蕉 | 欧美日本在线观看| 亚洲三级在线免费观看| 国产福利不卡视频| 精品少妇一区二区三区日产乱码| 一区二区不卡在线视频 午夜欧美不卡在| 国产做a爰片久久毛片| 欧美一区二区在线观看| 亚洲成人黄色影院| 色综合久久久久久久久| 国产精品久久久久桃色tv| 成人永久看片免费视频天堂| 久久免费电影网| 久久国产乱子精品免费女| 8x8x8国产精品| 天堂精品中文字幕在线| 制服丝袜亚洲精品中文字幕| 亚洲国产毛片aaaaa无费看| 在线一区二区三区四区五区| 亚洲视频一区二区免费在线观看| 豆国产96在线|亚洲| 国产精品国产三级国产aⅴ原创 | 一区二区三区蜜桃网| 色综合久久久网| 亚洲色图欧美在线| 色综合久久88色综合天天 | 欧美午夜理伦三级在线观看| 亚洲色图视频免费播放| 95精品视频在线| 亚洲人成精品久久久久久 | 日韩黄色免费电影| 欧美高清视频不卡网| 美女一区二区三区| 久久综合成人精品亚洲另类欧美| 国产福利一区二区| 亚洲免费观看在线观看| 欧美日本在线一区| 国产一区三区三区| 亚洲欧美日本在线| 91精品国产综合久久蜜臀| 国产一区二区在线免费观看| 欧美国产一区二区| 99久久久精品免费观看国产蜜| 国产片一区二区| 91传媒视频在线播放| 免费三级欧美电影| 欧美国产一区视频在线观看| 色先锋aa成人| 蜜桃免费网站一区二区三区| 国产精品嫩草影院av蜜臀| 欧美三级在线看| 韩国中文字幕2020精品| 亚洲精品国产高清久久伦理二区| 欧美日韩www| 高清国产一区二区三区| 亚洲成人第一页| 久久精品视频一区| 欧美三级欧美一级| 成人激情午夜影院| 日本视频一区二区三区| 国产精品嫩草影院av蜜臀| 欧美精品777| 白白色亚洲国产精品| 蜜臀av亚洲一区中文字幕| **性色生活片久久毛片| 欧美电影免费观看完整版| 91成人在线观看喷潮| 成人免费不卡视频| 国产伦理精品不卡| 爽好久久久欧美精品| 亚洲日本免费电影| 欧美国产视频在线| 亚洲精品在线三区| 日韩欧美一级片| 欧美日韩aaa| 欧美三日本三级三级在线播放| 国产河南妇女毛片精品久久久| 丝袜美腿高跟呻吟高潮一区| 樱花影视一区二区| 国产精品高潮呻吟久久| 国产偷国产偷亚洲高清人白洁| 91精品国产欧美一区二区18| 欧美影院一区二区| 一本到一区二区三区| 成人激情黄色小说| 国产高清不卡一区| 国产一区999| 韩日精品视频一区| 国产又黄又大久久| 精品亚洲aⅴ乱码一区二区三区| 同产精品九九九| 天天色图综合网| 日韩精品每日更新| 午夜伊人狠狠久久| 亚洲第一在线综合网站| 亚洲综合激情另类小说区| 有坂深雪av一区二区精品| 亚洲欧美偷拍卡通变态| 亚洲精品写真福利| 久久久一区二区三区捆绑**| 夜夜精品浪潮av一区二区三区| 成人午夜在线播放| 日本一区二区视频在线| 高清不卡一二三区| 国产亚洲一区二区三区四区| 国产综合成人久久大片91| 精品国产免费一区二区三区香蕉| 天天影视网天天综合色在线播放| 在线日韩av片| 亚洲高清免费观看高清完整版在线观看| 91视频国产资源| 亚洲免费观看高清完整版在线观看 | 中文字幕亚洲欧美在线不卡| 国产成人免费网站| 国产亲近乱来精品视频| 国产成人免费在线观看| 日本一区二区综合亚洲| 成人av在线看| 亚洲视频免费在线| 欧美在线观看一二区| 亚洲国产一区在线观看| 欧美老人xxxx18| 日本vs亚洲vs韩国一区三区| 日韩女优电影在线观看| 国产在线播精品第三| 国产片一区二区三区| 99re视频精品| 亚洲电影在线免费观看| 欧美一二三区在线观看| 经典三级视频一区| 中文字幕巨乱亚洲| 日本高清不卡aⅴ免费网站| 五月天久久比比资源色| 日韩欧美国产wwwww| 懂色av一区二区三区免费观看 | 久久久国际精品| 成人黄色小视频| 亚洲资源在线观看| 日韩一区二区视频| 国产成人啪免费观看软件| 国产精品―色哟哟| 欧美性受xxxx| 精品在线一区二区| 国产日韩欧美电影| 欧美日本一道本在线视频|