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

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

?? names.c

?? 話帶數(shù)據(jù)中傳真解調(diào)程序
?? C
字號(hào):
/* *	$Id: names.c,v 1.1 1999/01/22 21:05:33 mj Exp $ * *	The PCI Library -- ID to Name Translation * *	Copyright (c) 1997--1999 Martin Mares <mj@atrey.karlin.mff.cuni.cz> * *	Can be freely distributed and used under the terms of the GNU GPL. */#include <stdio.h>#include <stdlib.h>#include <string.h>#include <fcntl.h>#include <unistd.h>#include <sys/stat.h>#include <errno.h>#include "internal.h"struct nl_entry {  struct nl_entry *next;  word id1, id2;  int cat;  byte *name;};#define NL_VENDOR 0#define NL_DEVICE 1#define NL_CLASS 2#define NL_SUBCLASS 3#define NL_SUBSYSTEM_VENDOR 4#define NL_SUBSYSTEM_DEVICE 5#define HASH_SIZE 1024static inline unsigned int nl_calc_hash(int cat, int id1, int id2){  unsigned int h;  h = id1 ^ id2 ^ (cat << 5);  h += (h >> 6);  return h & (HASH_SIZE-1);}static struct nl_entry *nl_lookup(struct pci_access *a, int num, int cat, int id1, int id2){  unsigned int h;  struct nl_entry *n;  if (num)    return NULL;  h = nl_calc_hash(cat, id1, id2);  n = a->nl_hash[h];  while (n && (n->id1 != id1 || n->id2 != id2 || n->cat != cat))    n = n->next;  return n;}static int nl_add(struct pci_access *a, int cat, int id1, int id2, byte *text){  unsigned int h = nl_calc_hash(cat, id1, id2);  struct nl_entry *n = a->nl_hash[h];  while (n && (n->id1 != id1 || n->id2 != id2 || n->cat != cat))    n = n->next;  if (n)    return 1;  n = pci_malloc(a, sizeof(struct nl_entry));  n->id1 = id1;  n->id2 = id2;  n->cat = cat;  n->name = text;  n->next = a->nl_hash[h];  a->nl_hash[h] = n;  return 0;}static voiderr_name_list(struct pci_access *a, char *msg){  a->error("%s: %s: %s\n", a->id_file_name, msg, strerror(errno));}static voidparse_name_list(struct pci_access *a){  byte *p = a->nl_list;  byte *q, *r;  int lino = 0;  unsigned int id1=0, id2=0;  int cat, last_cat = -1;  while (*p)    {      lino++;      q = p;      while (*p && *p != '\n')	{	  if (*p == '#')	    {	      *p++ = 0;	      while (*p && *p != '\n')		p++;	      break;	    }	  if (*p == '\t')	    *p = ' ';	  p++;	}      if (*p == '\n')	*p++ = 0;      if (!*q)	continue;      r = p;      while (r > q && r[-1] == ' ')	*--r = 0;      r = q;      while (*q == ' ')	q++;      if (r == q)	{	  if (q[0] == 'C' && q[1] == ' ')	    {	      if (strlen(q+2) < 3 ||		  q[4] != ' ' ||		  sscanf(q+2, "%x", &id1) != 1)		goto parserr;	      cat = last_cat = NL_CLASS;	    }	  else if (q[0] == 'S' && q[1] == ' ')	    {	      if (strlen(q+2) < 5 ||		  q[6] != ' ' ||		  sscanf(q+2, "%x", &id1) != 1)		goto parserr;	      cat = last_cat = NL_SUBSYSTEM_VENDOR;	      q += 2;	    }	  else	    {	      if (strlen(q) < 5 ||		  q[4] != ' ' ||		  sscanf(q, "%x", &id1) != 1)		goto parserr;	      cat = last_cat = NL_VENDOR;	    }	  id2 = 0;	}      else	{	  if (sscanf(q, "%x", &id2) != 1)	    goto parserr;	  if (last_cat < 0)	    goto parserr;	  if (last_cat == NL_CLASS)	    cat = NL_SUBCLASS;	  else	    cat = last_cat+1;	}      q += 4;      while (*q == ' ')	q++;      if (!*q)	goto parserr;      if (nl_add(a, cat, id1, id2, q))	a->error("%s, line %d: duplicate entry", a->id_file_name, lino);    }  return;parserr:  a->error("%s, line %d: parse error", a->id_file_name, lino);}static voidload_name_list(struct pci_access *a){  int fd;  struct stat st;  fd = open(a->id_file_name, O_RDONLY);  if (fd < 0)    {      a->numeric_ids = 1;      return;    }  if (fstat(fd, &st) < 0)    err_name_list(a, "stat");  a->nl_list = pci_malloc(a, st.st_size + 1);  if (read(fd, a->nl_list, st.st_size) != st.st_size)    err_name_list(a, "read");  a->nl_list[st.st_size] = 0;  a->nl_hash = pci_malloc(a, sizeof(struct nl_entry *) * HASH_SIZE);  bzero(a->nl_hash, sizeof(struct nl_entry *) * HASH_SIZE);  parse_name_list(a);  close(fd);}voidpci_free_name_list(struct pci_access *a){  pci_mfree(a->nl_list);  a->nl_list = NULL;  pci_mfree(a->nl_hash);  a->nl_hash = NULL;}static intcompound_name(struct pci_access *a, int num, char *buf, int size, int cat, int v, int i){  if (!num)    {      struct nl_entry *e, *e2;      e = nl_lookup(a, 0, cat, v, 0);      e2 = nl_lookup(a, 0, cat+1, v, i);      if (!e)	return snprintf(buf, size, "Unknown device %04x:%04x", v, i);      else if (!e2)	return snprintf(buf, size, "%s: Unknown device %04x", e->name, i);      else	return snprintf(buf, size, "%s %s", e->name, e2->name);    }  else    return snprintf(buf, size, "%04x:%04x", v, i);}char *pci_lookup_name(struct pci_access *a, char *buf, int size, int flags, u32 arg1, u32 arg2){  int num = a->numeric_ids;  int res;  struct nl_entry *n;  if (flags & PCI_LOOKUP_NUMERIC)    {      flags &= PCI_LOOKUP_NUMERIC;      num = 1;    }  if (!a->nl_hash && !num)    {      load_name_list(a);      num = a->numeric_ids;    }  switch (flags)    {    case PCI_LOOKUP_VENDOR:      if (n = nl_lookup(a, num, NL_VENDOR, arg1, 0))	return n->name;      else	res = snprintf(buf, size, "%04x", arg1);      break;    case PCI_LOOKUP_DEVICE:      if (n = nl_lookup(a, num, NL_DEVICE, arg1, arg2))	return n->name;      else	res = snprintf(buf, size, "%04x", arg1);      break;    case PCI_LOOKUP_VENDOR | PCI_LOOKUP_DEVICE:      res = compound_name(a, num, buf, size, NL_VENDOR, arg1, arg2);      break;    case PCI_LOOKUP_VENDOR | PCI_LOOKUP_SUBSYSTEM:      if (n = nl_lookup(a, num, NL_SUBSYSTEM_VENDOR, arg1, 0))	return n->name;      else	res = snprintf(buf, size, "%04x", arg1);      break;    case PCI_LOOKUP_DEVICE | PCI_LOOKUP_SUBSYSTEM:      if (n = nl_lookup(a, num, NL_SUBSYSTEM_DEVICE, arg1, arg2))	return n->name;      else	res = snprintf(buf, size, "%04x", arg1);      break;    case PCI_LOOKUP_VENDOR | PCI_LOOKUP_DEVICE | PCI_LOOKUP_SUBSYSTEM:      res = compound_name(a, num, buf, size, NL_SUBSYSTEM_VENDOR, arg1, arg2);      break;    case PCI_LOOKUP_CLASS:      if (n = nl_lookup(a, num, NL_SUBCLASS, arg1 >> 8, arg1 & 0xff))	return n->name;      else if (n = nl_lookup(a, num, NL_CLASS, arg1, 0))	res = snprintf(buf, size, "%s [%04x]", n->name, arg1);      else	res = snprintf(buf, size, "Class %04x", arg1);      break;    default:      return "<pci_lookup_name: invalid request>";    }  return (res == size) ? "<too-large>" : buf;}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久国产福利国产秒拍| 精品国精品国产尤物美女| 亚洲自拍偷拍综合| 日韩免费高清av| 国产成人在线看| 亚洲综合色视频| 国产欧美日韩中文久久| 在线观看精品一区| 国产高清亚洲一区| 日韩电影在线一区| 7777精品伊人久久久大香线蕉完整版 | 成人av在线播放网站| 天天综合日日夜夜精品| 中文字幕一区免费在线观看 | 欧美美女激情18p| 91网站在线观看视频| 国产乱色国产精品免费视频| 亚洲综合一区二区| 日本一区二区三区视频视频| 日韩亚洲欧美成人一区| 欧美日韩一区中文字幕| 国产视频不卡一区| 国产一区二区三区香蕉| 色呦呦一区二区三区| 亚洲国产日韩综合久久精品| 国产精品成人在线观看| 欧美极品aⅴ影院| 日韩成人精品视频| 国产精品久久精品日日| 日韩视频一区二区三区在线播放 | 日韩一区二区电影在线| 欧美日韩一区小说| 日韩一级在线观看| 亚洲精品在线观| 国产欧美一区二区精品久导航| 亚洲一二三四区不卡| 婷婷一区二区三区| 麻豆高清免费国产一区| 国产1区2区3区精品美女| 99久久精品情趣| 884aa四虎影成人精品一区| 欧美肥妇bbw| 国产日韩欧美a| 午夜精品123| 精品一区二区三区日韩| 成人福利电影精品一区二区在线观看 | 久久久三级国产网站| 国产日韩欧美精品综合| 亚洲欧美偷拍三级| 久久99热国产| 色94色欧美sute亚洲线路二 | 蜜臀av一区二区在线免费观看| 国产成+人+日韩+欧美+亚洲| 91视频.com| 337p粉嫩大胆色噜噜噜噜亚洲| 亚洲视频免费在线| 国产69精品久久777的优势| 欧美日韩国产一二三| 亚洲国产成人一区二区三区| 午夜精品福利一区二区三区av| 成人一级黄色片| 26uuu国产一区二区三区| 亚洲最新在线观看| 成人久久18免费网站麻豆| 日韩欧美国产高清| 亚洲超碰97人人做人人爱| jlzzjlzz国产精品久久| 久久久激情视频| 国产乱码精品一区二区三区五月婷| 欧美日韩不卡在线| 免费不卡在线视频| 国产一区二三区| 青娱乐精品视频在线| 中文成人综合网| 亚洲一区在线视频观看| 久久精品一区二区三区四区 | 久久精品国产亚洲一区二区三区| 五月婷婷久久综合| 喷水一区二区三区| 成人看片黄a免费看在线| 日韩一区二区视频| 国产伦精品一区二区三区免费| 精品99一区二区三区| 六月丁香婷婷久久| 亚洲免费av观看| 欧美日韩卡一卡二| 美女一区二区在线观看| 免费看日韩精品| 99久久精品免费看国产| 亚洲大尺度视频在线观看| 精品国产成人在线影院| 91啪亚洲精品| 国内成+人亚洲+欧美+综合在线| 中文字幕中文字幕在线一区 | 欧美日韩一区高清| 久久国产免费看| 中文字幕在线一区| 7799精品视频| 色播五月激情综合网| 国产黄色成人av| 欧美aaa在线| 亚洲午夜久久久久久久久电影院| 欧美国产日产图区| 精品少妇一区二区三区在线播放| 91社区在线播放| 欧美乱妇一区二区三区不卡视频 | 国内精品伊人久久久久av影院| 在线免费观看日本欧美| 日韩美女视频一区二区在线观看| www.日韩在线| 国产91在线观看| 国产一区二区在线观看视频| 日韩精品一区第一页| 日日夜夜精品视频免费| 亚洲成av人片一区二区| 午夜精品福利一区二区三区av | 夜夜嗨av一区二区三区中文字幕 | 欧美专区日韩专区| 色爱区综合激月婷婷| 在线观看欧美黄色| 欧美日韩一区在线观看| 91麻豆精品国产91久久久久久久久| 久久久www成人免费毛片麻豆| 久久福利资源站| 成人伦理片在线| av一区二区久久| 久久精品视频一区二区| 国产精品乱人伦中文| **性色生活片久久毛片| 日韩美女视频19| 香蕉av福利精品导航| 精品一区二区综合| 国产精品996| av亚洲精华国产精华精华| 丝袜脚交一区二区| 国产成人免费xxxxxxxx| 国产成人av电影在线| 91亚洲精品久久久蜜桃| 欧美色国产精品| 精品国产乱码久久久久久久| 欧美激情中文字幕| 亚洲制服丝袜在线| 久久91精品国产91久久小草| 成人精品小蝌蚪| 欧美精品自拍偷拍动漫精品| 久久久久九九视频| 九九国产精品视频| 不卡一区在线观看| 日韩一级视频免费观看在线| 国产精品日产欧美久久久久| 狂野欧美性猛交blacked| 一本久久综合亚洲鲁鲁五月天| 日韩精品专区在线| 亚洲综合一区二区精品导航| av不卡免费电影| 欧美精品一区二区三区视频| 亚洲国产精品精华液网站| 成人av在线播放网站| 亚洲精品一区二区三区在线观看 | 亚洲最色的网站| 粉嫩13p一区二区三区| 日韩免费成人网| 日韩国产在线观看一区| 91视频一区二区三区| 亚洲三级理论片| 成人18视频在线播放| 欧美极品aⅴ影院| av电影天堂一区二区在线观看| 国产午夜一区二区三区| 国产麻豆成人传媒免费观看| 欧美日韩精品一区二区| 亚洲人精品午夜| 一本大道av一区二区在线播放| 久久精品一区二区| 国产成人精品影视| 亚洲女同一区二区| 在线观看视频一区二区欧美日韩| 亚洲人成伊人成综合网小说| 色8久久人人97超碰香蕉987| 亚洲一卡二卡三卡四卡五卡| 欧美男人的天堂一二区| 日韩高清在线不卡| 日韩一区二区不卡| 成人综合婷婷国产精品久久蜜臀| 国产精品美女久久久久aⅴ | 国产亚洲午夜高清国产拍精品| 国产精品一区专区| 亚洲精品第1页| 精品美女在线观看| 色综合天天综合在线视频| 午夜精品久久久久久久久| 久久久久久久电影| 欧美日韩国产成人在线免费| 精品一区二区国语对白| 欧美国产精品中文字幕| 欧美亚洲综合久久| 岛国一区二区三区| 午夜影院久久久| 国产精品无码永久免费888| 欧美另类变人与禽xxxxx|