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

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

?? myutil.c

?? disksim是一個非常優(yōu)秀的磁盤仿真工具
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* libparam (version 1.0) * Authors: John Bucy, Greg Ganger * Contributors: John Griffin, Jiri Schindler, Steve Schlosser * * Copyright (c) of Carnegie Mellon University, 2001-2008. * * This software is being provided by the copyright holders under the * following license. By obtaining, using and/or copying this * software, you agree that you have read, understood, and will comply * with the following terms and conditions: * * Permission to reproduce, use, and prepare derivative works of this * software is granted provided the copyright and "No Warranty" * statements are included with all reproductions and derivative works * and associated documentation. This software may also be * redistributed without charge provided that the copyright and "No * Warranty" statements are included in all redistributions. * * NO WARRANTY. THIS SOFTWARE IS FURNISHED ON AN "AS IS" BASIS. * CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY KIND, EITHER * EXPRESSED OR IMPLIED AS TO THE MATTER INCLUDING, BUT NOT LIMITED * TO: WARRANTY OF FITNESS FOR PURPOSE OR MERCHANTABILITY, EXCLUSIVITY * OF RESULTS OR RESULTS OBTAINED FROM USE OF THIS SOFTWARE. CARNEGIE * MELLON UNIVERSITY DOES NOT MAKE ANY WARRANTY OF ANY KIND WITH * RESPECT TO FREEDOM FROM PATENT, TRADEMARK, OR COPYRIGHT * INFRINGEMENT.  COPYRIGHT HOLDERS WILL BEAR NO LIABILITY FOR ANY USE * OF THIS SOFTWARE OR DOCUMENTATION.   */#include <stdlib.h>#include <stdio.h>#include <ctype.h>#include <stdlib.h>#include <string.h>#include <libddbg/libddbg.h>#include <sys/types.h>#include <sys/stat.h>#include <unistd.h>#include <unistd.h>#include <fcntl.h>#include <libgen.h>#include "libparam.h"#include "bitvector.h"static lp_topoloader_t topoloader = 0;void lp_register_topoloader(lp_topoloader_t l) {  topoloader = l;}char *lp_builtin_names[] = {  0,  "Block",  "String",  "Int",  "Double",  "List",   "Topospec"};// FILE *libparamin = 0;struct lp_subtype **lp_typetbl;int lp_typetbl_len;struct lp_tlt **lp_tlts;int lp_tlts_len;//extern char lp_filename[];//extern char lp_cwd[];char **lp_searchpath = 0;int lp_searchpath_len = 0;extern int lp_lineno;static void destroy_block(struct lp_block *b);static void destroy_value(struct lp_value *v);static void destroy_param(struct lp_param *p);static void destroy_list(struct lp_list *l);static void destroy_topospec(struct lp_topospec *t);int dumb_split(char *s, char **t, int *i);int dumb_split2(char *s, char **s1, char **s2);static int lp_max_mod = 0;static int lp_mod_size = 0;struct lp_mod **lp_modules = 0;static char **overrides = 0;static int overrides_len = 0;#define outputfile stdoutstruct lp_value *lp_new_intv(int i) {  struct lp_value *v = calloc(1, sizeof(struct lp_value));  v->v.i = i;  v->t = I;  return v;}struct lp_value *lp_new_doublev(double d) {  struct lp_value *v = calloc(1, sizeof(struct lp_value));  v->v.d = d;  v->t = D;  return v;}struct lp_value *lp_new_stringv(char *s) {  struct lp_value *v = calloc(1, sizeof(struct lp_value));  v->v.s = s;  v->t = S;  return v;}struct lp_value *lp_new_listv(struct lp_list *l){  struct lp_value *v = calloc(1, sizeof(struct lp_value));  v->v.l = l;  v->t = LIST;  return v;}struct lp_value *lp_new_blockv(struct lp_block *b){  struct lp_value *v = calloc(1, sizeof(struct lp_value));  v->v.b = b;  v->t = b->type;  return v;}struct lp_param *lp_new_param(char *name, char *source, struct lp_value *v){  struct lp_param *result = calloc(1, sizeof(struct lp_param));  result->source_file = source;  result->name = name;  result->v = v;    return result;}struct lp_list *lp_new_list(void) {  struct lp_list *l = calloc(1, sizeof(struct lp_list));  l->values = calloc(8, sizeof(struct lp_value *));  l->values_len = 8;  l->values_pop = 0;  l->linelen = 1;  return l;}struct lp_block *lp_new_block(void){  struct lp_block *b = calloc(1, sizeof(struct lp_block));  b->params = calloc(8, sizeof(struct lp_param *));  b->params_len = 8;  return b;}struct lp_list *lp_new_intlist(int *intarr, int len){  int i;  struct lp_list *l = lp_new_list();  for(i = 0; i < len; i++) {    lp_list_add(l, lp_new_intv(intarr[i]));  }  return l;}int lp_register_module(struct lp_mod *m) {  int c;  for(c = 0; c < lp_max_mod; c++) {    if(!strcmp(m->name, lp_modules[c]->name)) {      return -1;    }  }  if(c >= lp_mod_size) {    lp_mod_size *= 2; lp_mod_size++;    lp_modules = realloc(lp_modules, lp_mod_size * sizeof(int *));  }  if(c > 0)     lp_modules[c] = m;  else     lp_modules[0] = m;  lp_max_mod++;  return c;}static void die(char *msg) {  fprintf(stderr, "*** error: FATAL: %s\n", msg);  exit(1);}static void destroy_param(struct lp_param *p){  free(p->name);  destroy_value(p->v);  free(p);}static void destroy_list(struct lp_list *l) {  int c;  for(c = 0; c < l->values_len; c++)    if(l->values[c])      destroy_value(l->values[c]);  free(l->values);  free(l);}static void destroy_value(struct lp_value *v) {  int d;  switch(v->t) {  case S:    free(v->v.s);     break;      case LIST:    destroy_list(v->v.l);    break;      case I:   case D: break;  case TOPOSPEC:    for(d = 0; d < v->v.t.len; d++)      destroy_topospec(&v->v.t.l[d]);    free(v->v.t.l);    break;        default:    destroy_block(v->v.b);  }  free(v);}static void destroy_block(struct lp_block *b) {  int c;  for(c = 0; c < b->params_len; c++) {    if(b->params[c]) {      destroy_param(b->params[c]);    }   }  free(b->name);  free(b->params);  free(b);}static void destroy_topospec(struct lp_topospec *t){  free(t->type);  free(t->name);  destroy_list(t->l);}static struct lp_block *copy_block(struct lp_block *);static struct lp_list *copy_list(struct lp_list *);static struct lp_value *copy_value(struct lp_value *);static struct lp_param *copy_param(struct lp_param *);static struct lp_block *copy_block(struct lp_block *b){  int c;  struct lp_block *result = calloc(1, sizeof(*result));  memcpy(result, b, sizeof(struct lp_block));  result->params = calloc(b->params_len, sizeof(result->params[0]));  if(b->name) {    result->name = strdup(b->name);  }  for(c = 0; c < b->params_len; c++) {    if(b->params[c]) {      result->params[c] = copy_param(b->params[c]);    }  }  return result;}static struct lp_list *copy_list(struct lp_list *l) {  int c;  struct lp_list *result = calloc(1, sizeof(*result));  memcpy(result, l, sizeof(struct lp_list));  result->values = calloc(l->values_len, sizeof(result->values[0]));  memcpy(result->values, l->values, l->values_len * sizeof(int *));  for(c = 0; c < l->values_len; c++) {    if(l->values[c]) {      result->values[c] = copy_value(l->values[c]);    }  }  return result;}static struct lp_value *copy_value(struct lp_value *v) {  struct lp_value *result = calloc(1, sizeof(struct lp_value));  memcpy(result, v, sizeof(struct lp_value));  switch(v->t) {  case S:    result->v.s = strdup(v->v.s);    break;  case LIST:    result->v.l = copy_list(v->v.l);    break;  case BLOCK:    result->v.b = copy_block(v->v.b);    break;  default:    break;  }    return result;}static struct lp_param *copy_param(struct lp_param *p) {  struct lp_param *result = calloc(1, sizeof(struct lp_param));  result->name = strdup(p->name);  result->v = copy_value(p->v);  return result;}static int indent_level = 0;static void indent(FILE *f) {  char *space = calloc(1, 3*indent_level+1);  memset(space, (int)' ', 3*indent_level);  space[3*indent_level] = 0;  fprintf(f, "%s", space);  free(space);}void unparse_source(char *source, FILE *outfile) {  fprintf(outfile, "source %s", source);}void unparse_type(int t, FILE *outfile) {  if(t < 0) {    fprintf(outfile, "%s", lp_builtin_names[abs(t)]);  }  else {    if(t > lp_max_mod) {      fprintf(outfile, "<UNKNOWN TYPE>");    }    else {      fprintf(outfile, "%s", lp_modules[t]->name);    }  }}void unparse_param(struct lp_param *p, FILE *outfile) {  fprintf(outfile, "%s = ", p->name);  if(p->source_file && p->v->source_file) {    if(strcmp(p->source_file, p->v->source_file)) {      unparse_source(p->v->source_file, outfile);      return;    }  }  unparse_value(p->v, outfile);}void unparse_value(struct lp_value *v, FILE *outfile) {  int c;  switch(v->t) {  case I:    fprintf(outfile, "%d", v->v.i);    break;  case D:    if(v->v.d == 0.0) {      fprintf(outfile, "0.0");    }    else {      fprintf(outfile, "%f", v->v.d);    }    break;  case S:    fprintf(outfile, "%s", v->v.s);    break;  case LIST:    unparse_list(v->v.l, outfile);    break;  case TOPOSPEC:    for(c = 0; c < v->v.t.len; c++)      unparse_topospec(&v->v.t.l[c], outfile);    break;  default:  case BLOCK:    unparse_block(v->v.b, outfile);    break;  }}void unparse_list(struct lp_list *l, FILE *outfile) {  int printed = 0;  int c;/*    indent(outfile); */  fprintf(outfile, "[ ");  indent_level++;  for(c = 0; c < l->values_len; c++) {     if(!l->values[c])       continue;    if(c) {      fprintf(outfile, ", ");      if(!(c % l->linelen)) {	fprintf(outfile, "\n");	indent(outfile);      }    }    else {      fprintf(outfile, "\n");      indent(outfile);    }    printed++;    unparse_value(l->values[c], outfile);  }  indent_level--;  if((c > 0) && printed) {    fprintf(outfile, "\n");    indent(outfile);  }  fprintf(outfile, "]");}void unparse_block(struct lp_block *b, FILE *outfile) {  int c;/*    indent(outfile); */  if(b->name) {    /* a block definition */    fprintf(outfile, "%s %s {\n", lp_modules[b->type]->name, b->name);  }  else {    /* a block value */    fprintf(outfile, "%s {\n", lp_modules[b->type]->name);  }  indent_level++;  for(c = 0; c < b->params_len; c++) {    if(!b->params[c]) continue;    if(c) fprintf(outfile, ",\n");    unparse_param(b->params[c], outfile);  }  indent_level--;  fprintf(outfile, "\n");  indent(outfile);  fprintf(outfile, "}");  if(b->name) {    fprintf(outfile, " # end of %s spec", b->name);    fprintf(outfile, "\n\n");  }}void unparse_topospec(struct lp_topospec *t, FILE *outfile) {  fprintf(outfile, "%s %s ", t->type, t->name);  unparse_list(t->l, outfile);  // unparse_list() prints a trailing newline...  //  fprintf(outputfile, "\n"); }// somewhat of a hackvoid unparse_tl_topospec(struct lp_topospec *t, FILE *outfile) {  fprintf(outfile, "topospec ");  unparse_topospec(t, outfile);  fprintf(outfile, "\n\n");}void unparse_inst(struct lp_inst *i, FILE *outfile) {  fprintf(outfile, "instantiate ");  unparse_list(i->l, outfile);  fprintf(outfile, " as %s\n\n", i->name);}void unparse_tlt(struct lp_tlt *tlt, FILE *outfile, char *infile) {  if(tlt->source_file && infile) {    if(strcmp(tlt->source_file, infile)) {      unparse_source(tlt->source_file, outfile);      return;    }  }    switch(tlt->what) {  case TLT_BLOCK: unparse_block(tlt->it.block, outfile); break;  case TLT_TOPO:  unparse_tl_topospec(tlt->it.topo, outfile); break;  case TLT_INST:  unparse_inst(tlt->it.inst, outfile); break;  default:        ddbg_assert(0); break;  };  }void lp_unparse_tlts(struct lp_tlt **tlts, 		     int tlts_len, 		     FILE *outfile, 		     char *infile) {  int c;  for(c = 0; c < tlts_len; c++) {    if(tlts[c] != 0) {      unparse_tlt(tlts[c], outfile, infile);    }  }}/* instantiate all the elements of <l> as <name> */int lp_inst_list(struct lp_inst *i){  int c;    /*      unparse_block(spec, outputfile); */  for(c = 0; c < i->l->values_len; c++) {    if(!i->l->values[c]) continue;        ddbg_assert3(i->l->values[c]->t == S, 	       ("bad type for component %s", i->l->values[c]->v.s));        lp_instantiate(i->l->values[c]->v.s, i->name);  }    return 0;}/* instantiate <targ> as <name> */int *lp_instantiate(char *targ, char *name) {  char *nametmp;  struct lp_block *spec;  int *obj;    /*    unparse_block(b, outputfile); */  spec = lp_lookup_spec(name);  ddbg_assert3(spec != 0, ("no such type %s.\n", name));  // this is a bit of a hack; we swap the name of the component  // being instantiated with the name of the module that's being  // instantiated so that the loader function sees the target  // name  nametmp = spec->name;  spec->name = targ;    //  fprintf(stderr, "*** Instantiating %s as %s\n", targ, name);  obj = lp_override_inst(spec, 			 targ,			 lp_modules[spec->type]->fn,			 overrides, 			 overrides_len);  // swap the name back  spec->name = nametmp;  if(!obj) {    return 0;  }    if(lp_modules[spec->type]->callback) {    lp_modules[spec->type]->callback(lp_modules[spec->type]->ctx, obj);  }  return obj;}/* 0 on success, nonzero on error */int check_types(struct lp_block *b) {  int c = 0;  /* we'll do all of the type checking here so that    * the per-mod loaders only have to sanitize values */  for(c = 0; c < b->params_len; c++) {    if(b->params[c]) {      if(lp_param_name(b->type, b->params[c]->name) == -1) {	fprintf(stderr, "*** warning: parameter %s not valid in context %s\n",		b->params[c]->name, lp_modules[b->type]->name);	      }      else if(lp_modules[b->type]->modvars[lp_param_name(b->type, b->params[c]->name)].type	 != PTYPE(b->params[c])) {	/* implicitly convert ints to doubles */	if((lp_modules[b->type]->modvars[lp_param_name(b->type, b->params[c]->name)].type	    == D)	   && (PTYPE(b->params[c]) == I)) {	  b->params[c]->v->t = D;	  DVAL(b->params[c]) = (double) IVAL(b->params[c]);	}	  	else { 	  fprintf(stderr, "*** error: type error: %s::\"%s\" cannot take type ",		  lp_modules[b->type]->name,		  b->params[c]->name);	  /*  	  unparse_type(PTYPE(b->params[c]), stderr); */	  fprintf(stderr, "\n");	  die("check_types() failed");	}      }            if(PTYPE(b->params[c]) >= BLOCK) {	check_types(BVAL(b->params[c]));      }      else if(PTYPE(b->params[c]) == LIST) {	int d;	struct lp_list *l = LVAL(b->params[c]);	for(d = 0; d < l->values_len; d++) {	  if(l->values[d]) {	    if(l->values[d]->t >= BLOCK) {	      check_types(l->values[d]->v.b);	    }	  }	}      }    }  }  return 0;}void load_block(struct lp_block *b) {  int n;  lp_lookup_type(b->name, &n);  lp_typetbl[n]->spec = b;}void load_topo(struct lp_topospec *t, int len) {/*    unparse_topospec(t, outputfile); */  topoloader(t, len);}void printvars(void) {  int c, d;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人av中文字幕| 国产一区在线看| 在线观看视频一区二区欧美日韩| 国产精品色哟哟| 一本大道久久a久久综合婷婷| 亚洲色图丝袜美腿| 91黄色在线观看| 亚洲成在人线免费| 337p日本欧洲亚洲大胆色噜噜| 国产毛片精品视频| 中文字幕一区二区三区精华液| 99久久免费精品高清特色大片| 亚洲尤物视频在线| 日韩精品在线一区| 成人性生交大片免费看中文 | 国产精品99久久久久久久女警| 久久综合久久99| 91亚洲午夜精品久久久久久| 亚洲电影欧美电影有声小说| 欧美变态口味重另类| www.日本不卡| 免费黄网站欧美| 中文字幕免费一区| 欧美日韩国产bt| 国产不卡高清在线观看视频| 一区二区欧美精品| 久久蜜桃香蕉精品一区二区三区| 97se亚洲国产综合在线| 毛片av一区二区| 亚洲视频中文字幕| 欧美一级久久久| 色综合久久中文综合久久牛| 久久国产生活片100| 亚洲乱码日产精品bd| 欧美成人精品二区三区99精品| 99久久精品国产一区二区三区| 日本中文字幕一区二区有限公司| 国产精品国产自产拍高清av王其| 欧美久久久久久久久久| av中文字幕不卡| 久久99久久99精品免视看婷婷| 亚洲品质自拍视频| 久久亚洲综合色一区二区三区| 91久久久免费一区二区| 国产成人超碰人人澡人人澡| 日韩激情一二三区| 亚洲精品国产视频| 中文字幕巨乱亚洲| 日韩免费视频线观看| 欧美日韩激情在线| 色欲综合视频天天天| 风间由美一区二区av101| 久久精品国产免费看久久精品| 亚洲国产毛片aaaaa无费看| 中文字幕在线观看一区| 国产丝袜欧美中文另类| 欧美一级二级三级乱码| 欧美日韩在线精品一区二区三区激情| 国产高清精品在线| 国产综合久久久久影院| 麻豆精品一二三| 日韩电影在线一区二区| 午夜精品爽啪视频| 亚洲国产毛片aaaaa无费看| 亚洲免费观看视频| 亚洲免费观看高清完整版在线| 欧美国产精品v| 国产亲近乱来精品视频| 2021国产精品久久精品| 精品国产麻豆免费人成网站| 91精品国模一区二区三区| 欧美色图12p| 欧美三日本三级三级在线播放| 日本乱人伦一区| 色综合久久九月婷婷色综合| 一本色道久久加勒比精品 | 精品美女被调教视频大全网站| 欧美日韩一区三区四区| 色偷偷久久人人79超碰人人澡| 成人福利视频在线看| 东方欧美亚洲色图在线| 成人国产精品视频| 91影院在线观看| 色综合久久久久久久久久久| 欧美午夜精品久久久久久孕妇| 欧美亚洲综合色| 欧美精品1区2区3区| 欧美一区二区成人| 2欧美一区二区三区在线观看视频| 久久免费午夜影院| 一区精品在线播放| 亚洲综合精品久久| 男女性色大片免费观看一区二区| 麻豆国产精品官网| 国产传媒欧美日韩成人| 成人在线视频一区| 日本韩国视频一区二区| 在线电影欧美成精品| 精品裸体舞一区二区三区| 中文成人av在线| 一区二区三区免费看视频| 偷窥少妇高潮呻吟av久久免费| 美国十次了思思久久精品导航| 精品一区二区在线视频| 成人av影院在线| 欧美日韩在线播放三区四区| 精品国产免费久久| 亚洲欧洲中文日韩久久av乱码| 亚洲成a人在线观看| 国产真实乱偷精品视频免| 93久久精品日日躁夜夜躁欧美| 欧美日韩在线观看一区二区 | 日韩午夜av一区| 国产欧美中文在线| 亚洲国产cao| 国产成人一级电影| 欧美日韩一区二区三区免费看| 精品国产一二三| 亚洲丰满少妇videoshd| 国产大陆亚洲精品国产| 欧美亚洲一区二区三区四区| 精品国产乱码久久久久久牛牛| 亚洲精品高清在线观看| 国内精品嫩模私拍在线| 91浏览器打开| 久久久久久电影| 午夜伊人狠狠久久| av欧美精品.com| 精品精品欲导航| 亚洲成人动漫在线免费观看| 成人av资源网站| 精品99一区二区| 午夜精品视频一区| 色综合天天性综合| 日本一区二区三区视频视频| 日本成人中文字幕| 在线观看日韩一区| 中文字幕av不卡| 久久爱www久久做| 欧美日韩视频一区二区| 国产精品传媒在线| 国产一区二区三区四| 欧美一区二区视频网站| 一区二区三区精品视频| 岛国一区二区在线观看| 精品国产伦一区二区三区观看方式| 亚洲主播在线观看| 91丨porny丨国产入口| 国产亚洲视频系列| 国内国产精品久久| 日韩欧美在线观看一区二区三区| 伊人婷婷欧美激情| 99久久精品99国产精品| 国产精品丝袜在线| 成人污污视频在线观看| 久久久九九九九| 国模少妇一区二区三区| 精品sm捆绑视频| 精品一区二区三区免费观看| 日韩一级片网站| 丝袜a∨在线一区二区三区不卡| 日本高清免费不卡视频| 亚洲免费观看在线观看| 91亚洲精品久久久蜜桃网站| 国产精品激情偷乱一区二区∴| 高清shemale亚洲人妖| 中文子幕无线码一区tr | 色8久久精品久久久久久蜜| 亚洲婷婷国产精品电影人久久| 99国产精品久久久久久久久久久| 国产精品福利av| 色婷婷av一区| 亚洲午夜在线视频| 欧美肥妇bbw| 久久精品久久久精品美女| 精品福利一二区| 国产成人h网站| 国产精品久久久久久久久免费桃花 | 亚洲一本大道在线| 欧美日韩免费一区二区三区| 日本不卡中文字幕| 日韩精品一区二区三区四区| 国产中文字幕一区| 国产精品成人一区二区艾草 | 在线不卡的av| 韩国av一区二区| 国产精品第一页第二页第三页| 91视频在线观看| 天堂va蜜桃一区二区三区漫画版| 欧美一二三在线| 成人黄色大片在线观看| 亚洲一区中文日韩| 91精品国产欧美一区二区| 国产一区二区网址| 亚洲乱码精品一二三四区日韩在线| 欧美日韩一区二区三区高清| 精品在线播放免费| 亚洲视频在线一区| 这里是久久伊人| 成人激情电影免费在线观看|