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

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

?? lstrlib.c

?? 這個是一個嵌入式腳本支持引擎, 體積十分小巧
?? C
?? 第 1 頁 / 共 2 頁
字號:
        }      }    }  }}static const char *lmemfind (const char *s1, size_t l1,                               const char *s2, size_t l2) {  if (l2 == 0) return s1;  /* empty strings are everywhere */  else if (l2 > l1) return NULL;  /* avoids a negative `l1' */  else {    const char *init;  /* to search for a `*s2' inside `s1' */    l2--;  /* 1st char will be checked by `memchr' */    l1 = l1-l2;  /* `s2' cannot be found after that */    while (l1 > 0 && (init = (const char *)memchr(s1, *s2, l1)) != NULL) {      init++;   /* 1st char is already checked */      if (memcmp(init, s2+1, l2) == 0)        return init-1;      else {  /* correct `l1' and `s1' to try again */        l1 -= init-s1;        s1 = init;      }    }    return NULL;  /* not found */  }}static void push_onecapture (MatchState *ms, int i, const char *s,                                                    const char *e) {  if (i >= ms->level) {    if (i == 0)  /* ms->level == 0, too */      lua_pushlstring(ms->L, s, e - s);  /* add whole match */    else      luaL_error(ms->L, "invalid capture index");  }  else {    ptrdiff_t l = ms->capture[i].len;    if (l == CAP_UNFINISHED) luaL_error(ms->L, "unfinished capture");    if (l == CAP_POSITION)      lua_pushinteger(ms->L, ms->capture[i].init - ms->src_init + 1);    else      lua_pushlstring(ms->L, ms->capture[i].init, l);  }}static int push_captures (MatchState *ms, const char *s, const char *e) {  int i;  int nlevels = (ms->level == 0 && s) ? 1 : ms->level;  luaL_checkstack(ms->L, nlevels, "too many captures");  for (i = 0; i < nlevels; i++)    push_onecapture(ms, i, s, e);  return nlevels;  /* number of strings pushed */}static int str_find_aux (lua_State *L, int find) {  size_t l1, l2;  const char *s = luaL_checklstring(L, 1, &l1);  const char *p = luaL_checklstring(L, 2, &l2);  ptrdiff_t init = posrelat(luaL_optinteger(L, 3, 1), l1) - 1;  if (init < 0) init = 0;  else if ((size_t)(init) > l1) init = (ptrdiff_t)l1;  if (find && (lua_toboolean(L, 4) ||  /* explicit request? */      strpbrk(p, SPECIALS) == NULL)) {  /* or no special characters? */    /* do a plain search */    const char *s2 = lmemfind(s+init, l1-init, p, l2);    if (s2) {      lua_pushinteger(L, s2-s+1);      lua_pushinteger(L, s2-s+l2);      return 2;    }  }  else {    MatchState ms;    int anchor = (*p == '^') ? (p++, 1) : 0;    const char *s1=s+init;    ms.L = L;    ms.src_init = s;    ms.src_end = s+l1;    do {      const char *res;      ms.level = 0;      if ((res=match(&ms, s1, p)) != NULL) {        if (find) {          lua_pushinteger(L, s1-s+1);  /* start */          lua_pushinteger(L, res-s);   /* end */          return push_captures(&ms, NULL, 0) + 2;        }        else          return push_captures(&ms, s1, res);      }    } while (s1++ < ms.src_end && !anchor);  }  lua_pushnil(L);  /* not found */  return 1;}static int str_find (lua_State *L) {  return str_find_aux(L, 1);}static int str_match (lua_State *L) {  return str_find_aux(L, 0);}static int gmatch_aux (lua_State *L) {  MatchState ms;  size_t ls;  const char *s = lua_tolstring(L, lua_upvalueindex(1), &ls);  const char *p = lua_tostring(L, lua_upvalueindex(2));  const char *src;  ms.L = L;  ms.src_init = s;  ms.src_end = s+ls;  for (src = s + (size_t)lua_tointeger(L, lua_upvalueindex(3));       src <= ms.src_end;       src++) {    const char *e;    ms.level = 0;    if ((e = match(&ms, src, p)) != NULL) {      lua_Integer newstart = e-s;      if (e == src) newstart++;  /* empty match? go at least one position */      lua_pushinteger(L, newstart);      lua_replace(L, lua_upvalueindex(3));      return push_captures(&ms, src, e);    }  }  return 0;  /* not found */}static int gmatch (lua_State *L) {  luaL_checkstring(L, 1);  luaL_checkstring(L, 2);  lua_settop(L, 2);  lua_pushinteger(L, 0);  lua_pushcclosure(L, gmatch_aux, 3);  return 1;}static int gfind_nodef (lua_State *L) {  return luaL_error(L, LUA_QL("string.gfind") " was renamed to "                       LUA_QL("string.gmatch"));}static void add_s (MatchState *ms, luaL_Buffer *b, const char *s,                                                   const char *e) {  size_t l, i;  const char *news = lua_tolstring(ms->L, 3, &l);  for (i = 0; i < l; i++) {    if (news[i] != L_ESC)      luaL_addchar(b, news[i]);    else {      i++;  /* skip ESC */      if (!isdigit(uchar(news[i])))        luaL_addchar(b, news[i]);      else if (news[i] == '0')          luaL_addlstring(b, s, e - s);      else {        push_onecapture(ms, news[i] - '1', s, e);        luaL_addvalue(b);  /* add capture to accumulated result */      }    }  }}static void add_value (MatchState *ms, luaL_Buffer *b, const char *s,                                                       const char *e) {  lua_State *L = ms->L;  switch (lua_type(L, 3)) {    case LUA_TNUMBER:    case LUA_TSTRING: {      add_s(ms, b, s, e);      return;    }    case LUA_TFUNCTION: {      int n;      lua_pushvalue(L, 3);      n = push_captures(ms, s, e);      lua_call(L, n, 1);      break;    }    case LUA_TTABLE: {      push_onecapture(ms, 0, s, e);      lua_gettable(L, 3);      break;    }  }  if (!lua_toboolean(L, -1)) {  /* nil or false? */    lua_pop(L, 1);    lua_pushlstring(L, s, e - s);  /* keep original text */  }  else if (!lua_isstring(L, -1))    luaL_error(L, "invalid replacement value (a %s)", luaL_typename(L, -1));   luaL_addvalue(b);  /* add result to accumulator */}static int str_gsub (lua_State *L) {  size_t srcl;  const char *src = luaL_checklstring(L, 1, &srcl);  const char *p = luaL_checkstring(L, 2);  int  tr = lua_type(L, 3);  int max_s = luaL_optint(L, 4, srcl+1);  int anchor = (*p == '^') ? (p++, 1) : 0;  int n = 0;  MatchState ms;  luaL_Buffer b;  luaL_argcheck(L, tr == LUA_TNUMBER || tr == LUA_TSTRING ||                   tr == LUA_TFUNCTION || tr == LUA_TTABLE, 3,                      "string/function/table expected");  luaL_buffinit(L, &b);  ms.L = L;  ms.src_init = src;  ms.src_end = src+srcl;  while (n < max_s) {    const char *e;    ms.level = 0;    e = match(&ms, src, p);    if (e) {      n++;      add_value(&ms, &b, src, e);    }    if (e && e>src) /* non empty match? */      src = e;  /* skip it */    else if (src < ms.src_end)      luaL_addchar(&b, *src++);    else break;    if (anchor) break;  }  luaL_addlstring(&b, src, ms.src_end-src);  luaL_pushresult(&b);  lua_pushinteger(L, n);  /* number of substitutions */  return 2;}/* }====================================================== *//* maximum size of each formatted item (> len(format('%99.99f', -1e308))) */#define MAX_ITEM	512/* valid flags in a format specification */#define FLAGS	"-+ #0"/*** maximum size of each format specification (such as '%-099.99d')** (+10 accounts for %99.99x plus margin of error)*/#define MAX_FORMAT	(sizeof(FLAGS) + sizeof(LUA_INTFRMLEN) + 10)static void addquoted (lua_State *L, luaL_Buffer *b, int arg) {  size_t l;  const char *s = luaL_checklstring(L, arg, &l);  luaL_addchar(b, '"');  while (l--) {    switch (*s) {      case '"': case '\\': case '\n': {        luaL_addchar(b, '\\');        luaL_addchar(b, *s);        break;      }      case '\r': {        luaL_addlstring(b, "\\r", 2);        break;      }      case '\0': {        luaL_addlstring(b, "\\000", 4);        break;      }      default: {        luaL_addchar(b, *s);        break;      }    }    s++;  }  luaL_addchar(b, '"');}static const char *scanformat (lua_State *L, const char *strfrmt, char *form) {  const char *p = strfrmt;  while (*p != '\0' && strchr(FLAGS, *p) != NULL) p++;  /* skip flags */  if ((size_t)(p - strfrmt) >= sizeof(FLAGS))    luaL_error(L, "invalid format (repeated flags)");  if (isdigit(uchar(*p))) p++;  /* skip width */  if (isdigit(uchar(*p))) p++;  /* (2 digits at most) */  if (*p == '.') {    p++;    if (isdigit(uchar(*p))) p++;  /* skip precision */    if (isdigit(uchar(*p))) p++;  /* (2 digits at most) */  }  if (isdigit(uchar(*p)))    luaL_error(L, "invalid format (width or precision too long)");  *(form++) = '%';  strncpy(form, strfrmt, p - strfrmt + 1);  form += p - strfrmt + 1;  *form = '\0';  return p;}static void addintlen (char *form) {  size_t l = strlen(form);  char spec = form[l - 1];  strcpy(form + l - 1, LUA_INTFRMLEN);  form[l + sizeof(LUA_INTFRMLEN) - 2] = spec;  form[l + sizeof(LUA_INTFRMLEN) - 1] = '\0';}static int str_format (lua_State *L) {  int arg = 1;  size_t sfl;  const char *strfrmt = luaL_checklstring(L, arg, &sfl);  const char *strfrmt_end = strfrmt+sfl;  luaL_Buffer b;  luaL_buffinit(L, &b);  while (strfrmt < strfrmt_end) {    if (*strfrmt != L_ESC)      luaL_addchar(&b, *strfrmt++);    else if (*++strfrmt == L_ESC)      luaL_addchar(&b, *strfrmt++);  /* %% */    else { /* format item */      char form[MAX_FORMAT];  /* to store the format (`%...') */      char buff[MAX_ITEM];  /* to store the formatted item */      arg++;      strfrmt = scanformat(L, strfrmt, form);      switch (*strfrmt++) {        case 'c': {          sprintf(buff, form, (int)luaL_checknumber(L, arg));          break;        }        case 'd':  case 'i': {          addintlen(form);          sprintf(buff, form, (LUA_INTFRM_T)luaL_checknumber(L, arg));          break;        }        case 'o':  case 'u':  case 'x':  case 'X': {          addintlen(form);          sprintf(buff, form, (unsigned LUA_INTFRM_T)luaL_checknumber(L, arg));          break;        }        case 'e':  case 'E': case 'f':        case 'g': case 'G': {          sprintf(buff, form, (double)luaL_checknumber(L, arg));          break;        }        case 'q': {          addquoted(L, &b, arg);          continue;  /* skip the 'addsize' at the end */        }        case 's': {          size_t l;          const char *s = luaL_checklstring(L, arg, &l);          if (!strchr(form, '.') && l >= 100) {            /* no precision and string is too long to be formatted;               keep original string */            lua_pushvalue(L, arg);            luaL_addvalue(&b);            continue;  /* skip the `addsize' at the end */          }          else {            sprintf(buff, form, s);            break;          }        }        default: {  /* also treat cases `pnLlh' */          return luaL_error(L, "invalid option " LUA_QL("%%%c") " to "                               LUA_QL("format"), *(strfrmt - 1));        }      }      luaL_addlstring(&b, buff, strlen(buff));    }  }  luaL_pushresult(&b);  return 1;}static const luaL_Reg strlib[] = {  {"byte", str_byte},  {"char", str_char},  {"dump", str_dump},  {"find", str_find},  {"format", str_format},  {"gfind", gfind_nodef},  {"gmatch", gmatch},  {"gsub", str_gsub},  {"len", str_len},  {"lower", str_lower},  {"match", str_match},  {"rep", str_rep},  {"reverse", str_reverse},  {"sub", str_sub},  {"upper", str_upper},  {NULL, NULL}};static void createmetatable (lua_State *L) {  lua_createtable(L, 0, 1);  /* create metatable for strings */  lua_pushliteral(L, "");  /* dummy string */  lua_pushvalue(L, -2);  lua_setmetatable(L, -2);  /* set string metatable */  lua_pop(L, 1);  /* pop dummy string */  lua_pushvalue(L, -2);  /* string library... */  lua_setfield(L, -2, "__index");  /* ...is the __index metamethod */  lua_pop(L, 1);  /* pop metatable */}/*** Open string library*/LUALIB_API int luaopen_string (lua_State *L) {  luaL_register(L, LUA_STRLIBNAME, strlib);#if defined(LUA_COMPAT_GFIND)  lua_getfield(L, -1, "gmatch");  lua_setfield(L, -2, "gfind");#endif  createmetatable(L);  return 1;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲a一区二区| 91亚洲精品久久久蜜桃网站| 国产成人三级在线观看| 色综合天天做天天爱| 欧美精品一区二区三区蜜桃视频| 中文文精品字幕一区二区| 亚洲午夜激情网页| 成人午夜免费av| 337p日本欧洲亚洲大胆精品| 一区二区三区小说| 国产成人免费视| 日韩久久久久久| 亚洲h动漫在线| 色综合久久综合网欧美综合网| 中文字幕精品—区二区四季| 性久久久久久久久| 91在线国产观看| 久久久久久久久岛国免费| 午夜一区二区三区视频| 99视频一区二区| 久久精品免费在线观看| 九九国产精品视频| 日韩亚洲欧美综合| 亚洲第一精品在线| 欧美亚洲动漫精品| 亚洲一区二区精品3399| 99久免费精品视频在线观看| 久久久精品免费免费| 国产综合久久久久久久久久久久| 欧美一区二区日韩| 天堂av在线一区| 欧美亚洲国产怡红院影院| ...xxx性欧美| 99国产麻豆精品| 中文字幕一区二区三区在线不卡 | 91精品国产美女浴室洗澡无遮挡| 日韩美女视频19| 99在线精品观看| 中文字幕一区视频| eeuss鲁片一区二区三区在线观看| 久久尤物电影视频在线观看| 国产一区二区0| 国产欧美一区二区精品秋霞影院 | 午夜精品免费在线观看| 欧美性受极品xxxx喷水| 婷婷开心激情综合| 日韩精品一区二区三区在线| 麻豆精品国产91久久久久久| 久久影音资源网| 成人午夜伦理影院| 亚洲久本草在线中文字幕| 欧美午夜精品一区二区蜜桃| 亚洲国产精品久久不卡毛片| 3751色影院一区二区三区| 九一九一国产精品| 国产日产欧产精品推荐色| jiyouzz国产精品久久| 亚洲午夜羞羞片| 日韩午夜在线观看| 国产白丝精品91爽爽久久| 亚洲天堂网中文字| 欧美精品自拍偷拍动漫精品| 激情综合色综合久久| 亚洲欧洲日韩综合一区二区| 欧美人妇做爰xxxⅹ性高电影| 极品少妇一区二区三区精品视频| 中文字幕不卡的av| 欧美性色黄大片手机版| 麻豆91在线观看| 亚洲视频免费看| 日韩视频123| 97成人超碰视| 蜜桃免费网站一区二区三区| 中文字幕一区二区5566日韩| 欧美一区二区视频在线观看2020 | 一区二区三区视频在线看| 欧美一级一区二区| 成人av手机在线观看| 午夜精品aaa| 国产精品妹子av| 91精品视频网| 91在线porny国产在线看| 午夜精品123| 亚洲欧洲成人av每日更新| 日韩欧美自拍偷拍| 色婷婷久久久亚洲一区二区三区| 久久精品国产澳门| 亚洲一区二区在线免费看| 欧美经典三级视频一区二区三区| 欧美老女人在线| 日韩欧美在线1卡| 色综合久久中文综合久久牛| 国产一区二区三区黄视频| 亚洲综合激情网| 国产精品嫩草久久久久| 精品日韩99亚洲| 欧美精品亚洲二区| 色哟哟在线观看一区二区三区| 国产剧情一区在线| 久久99深爱久久99精品| 五月天精品一区二区三区| 亚洲日本韩国一区| 国产精品视频免费看| 欧美大片拔萝卜| 日韩一本二本av| 欧美精品1区2区| 欧美日韩精品欧美日韩精品一 | 日韩色在线观看| 欧美日韩卡一卡二| 欧美三级电影一区| 欧美性猛交xxxxxxxx| 一本大道久久a久久综合| 成人av综合在线| 国产成人av电影免费在线观看| 国产综合久久久久久鬼色| 久久激情五月婷婷| 美女任你摸久久| 麻豆精品在线看| 久久国产精品露脸对白| 极品少妇xxxx偷拍精品少妇| 精品一区二区久久久| 狠狠色丁香婷婷综合| 国产一区二区三区免费| 国内成+人亚洲+欧美+综合在线| 久久精品国产亚洲一区二区三区 | 国模一区二区三区白浆| 久草精品在线观看| 国产一区二区导航在线播放| 国内偷窥港台综合视频在线播放| 国产精品亚洲成人| 国产99久久精品| www.亚洲免费av| 色偷偷一区二区三区| 欧美日韩精品三区| 欧美成人精品1314www| 国产夜色精品一区二区av| 国产精品久久久久久久久动漫| 亚洲精品国产a| 亚洲网友自拍偷拍| 日韩电影免费在线看| 国产永久精品大片wwwapp | 国产喂奶挤奶一区二区三区| 亚洲国产精品av| 亚洲精品大片www| 日韩精品免费专区| 国内外成人在线| 欧美色电影在线| 精品久久国产老人久久综合| 欧美激情综合在线| 亚洲高清一区二区三区| 美日韩黄色大片| 99这里只有精品| 欧美嫩在线观看| 国产精品午夜久久| 亚洲成a人v欧美综合天堂下载 | 国产精品久久久久久久浪潮网站 | 中文字幕日韩一区| 日韩国产在线观看| 成人激情图片网| 欧美精品三级日韩久久| 国产亚洲精品久| 首页国产欧美日韩丝袜| 成人美女视频在线看| 欧美日韩久久久久久| 国产精品妹子av| 麻豆成人综合网| 色综合久久综合网欧美综合网| 精品日韩欧美在线| 亚洲超丰满肉感bbw| 国产精品77777竹菊影视小说| 欧美日韩中字一区| 中文字幕在线观看不卡| 麻豆国产91在线播放| 91成人在线观看喷潮| 国产亚洲自拍一区| 日韩精品五月天| 日本久久一区二区三区| 国产日产精品一区| 蜜臀av一区二区在线免费观看| 色综合天天综合网国产成人综合天| 日韩精品一区二区在线| 亚洲国产视频在线| 91视频com| 国产精品福利一区二区| 久久精品国产秦先生| 在线综合+亚洲+欧美中文字幕| 亚洲精品久久久蜜桃| 成人av在线观| 国产精品色在线观看| 国产一区二区三区精品视频| 日韩精品中午字幕| 日韩国产精品久久久久久亚洲| 日本久久精品电影| 国产精品福利一区| fc2成人免费人成在线观看播放| 国产欧美一区二区三区鸳鸯浴| 久久99精品国产麻豆不卡| 欧美一区二区精品在线| 日韩不卡一区二区| 欧美一区二区三区的|