g                  97 core/gps.c     geo2rect (t_geo * g, t_rectangular* r, double lat_w) {
g                  98 core/gps.c         r->north= g->lat_w * EARTH;
g                  99 core/gps.c         r->east = g->lon_w * EARTH * cos(lat_w/RHO);
g                 901 lib/lua/lapi.c   global_State *g;
g                 903 lib/lua/lapi.c   g = G(L);
g                 906 lib/lua/lapi.c       g->GCthreshold = MAX_LUMEM;
g                 910 lib/lua/lapi.c       g->GCthreshold = g->totalbytes;
g                 919 lib/lua/lapi.c       res = cast_int(g->totalbytes >> 10);
g                 923 lib/lua/lapi.c       res = cast_int(g->totalbytes & 0x3ff);
g                 928 lib/lua/lapi.c       if (a <= g->totalbytes)
g                 929 lib/lua/lapi.c         g->GCthreshold = g->totalbytes - a;
g                 931 lib/lua/lapi.c         g->GCthreshold = 0;
g                 932 lib/lua/lapi.c       while (g->GCthreshold <= g->totalbytes) {
g                 934 lib/lua/lapi.c         if (g->gcstate == GCSpause) {  /* end of cycle? */
g                 942 lib/lua/lapi.c       res = g->gcpause;
g                 943 lib/lua/lapi.c       g->gcpause = data;
g                 947 lib/lua/lapi.c       res = g->gcstepmul;
g                 948 lib/lua/lapi.c       g->gcstepmul = data;
g                 510 lib/lua/ldebug.c         int g = GETARG_Bx(i);  /* global index */
g                 511 lib/lua/ldebug.c         lua_assert(ttisstring(&p->k[g]));
g                 512 lib/lua/ldebug.c         *name = svalue(&p->k[g]);
g                  54 lib/lua/lfunc.c   global_State *g = G(L);
g                  61 lib/lua/lfunc.c       if (isdead(g, obj2gco(p)))  /* is it dead? */
g                  69 lib/lua/lfunc.c   uv->marked = luaC_white(g);
g                  73 lib/lua/lfunc.c   uv->u.l.prev = &g->uvhead;  /* double link it in `uvhead' list */
g                  74 lib/lua/lfunc.c   uv->u.l.next = g->uvhead.u.l.next;
g                  76 lib/lua/lfunc.c   g->uvhead.u.l.next = uv;
g                  98 lib/lua/lfunc.c   global_State *g = G(L);
g                 103 lib/lua/lfunc.c     if (isdead(g, o))
g                  34 lib/lua/lgc.c  #define makewhite(g,x)	\
g                  35 lib/lua/lgc.c     ((x)->gch.marked = cast_byte(((x)->gch.marked & maskmarks) | luaC_white(g)))
g                  52 lib/lua/lgc.c  #define markvalue(g,o) { checkconsistency(o); \
g                  53 lib/lua/lgc.c    if (iscollectable(o) && iswhite(gcvalue(o))) reallymarkobject(g,gcvalue(o)); }
g                  55 lib/lua/lgc.c  #define markobject(g,t) { if (iswhite(obj2gco(t))) \
g                  56 lib/lua/lgc.c  		reallymarkobject(g, obj2gco(t)); }
g                  59 lib/lua/lgc.c  #define setthreshold(g)  (g->GCthreshold = (g->estimate/100) * g->gcpause)
g                  69 lib/lua/lgc.c  static void reallymarkobject (global_State *g, GCObject *o) {
g                  70 lib/lua/lgc.c    lua_assert(iswhite(o) && !isdead(g, o));
g                  79 lib/lua/lgc.c        if (mt) markobject(g, mt);
g                  80 lib/lua/lgc.c        markobject(g, gco2u(o)->env);
g                  85 lib/lua/lgc.c        markvalue(g, uv->v);
g                  91 lib/lua/lgc.c        gco2cl(o)->c.gclist = g->gray;
g                  92 lib/lua/lgc.c        g->gray = o;
g                  96 lib/lua/lgc.c        gco2h(o)->gclist = g->gray;
g                  97 lib/lua/lgc.c        g->gray = o;
g                 101 lib/lua/lgc.c        gco2th(o)->gclist = g->gray;
g                 102 lib/lua/lgc.c        g->gray = o;
g                 106 lib/lua/lgc.c        gco2p(o)->gclist = g->gray;
g                 107 lib/lua/lgc.c        g->gray = o;
g                 115 lib/lua/lgc.c  static void marktmu (global_State *g) {
g                 116 lib/lua/lgc.c    GCObject *u = g->tmudata;
g                 120 lib/lua/lgc.c        makewhite(g, u);  /* may be marked, if left from previous GC */
g                 121 lib/lua/lgc.c        reallymarkobject(g, u);
g                 122 lib/lua/lgc.c      } while (u != g->tmudata);
g                 129 lib/lua/lgc.c    global_State *g = G(L);
g                 131 lib/lua/lgc.c    GCObject **p = &g->mainthread->next;
g                 145 lib/lua/lgc.c        if (g->tmudata == NULL)  /* list is empty? */
g                 146 lib/lua/lgc.c          g->tmudata = curr->gch.next = curr;  /* creates a circular list */
g                 148 lib/lua/lgc.c          curr->gch.next = g->tmudata->gch.next;
g                 149 lib/lua/lgc.c          g->tmudata->gch.next = curr;
g                 150 lib/lua/lgc.c          g->tmudata = curr;
g                 158 lib/lua/lgc.c  static int traversetable (global_State *g, Table *h) {
g                 164 lib/lua/lgc.c      markobject(g, h->metatable);
g                 165 lib/lua/lgc.c    mode = gfasttm(g, h->metatable, TM_MODE);
g                 173 lib/lua/lgc.c        h->gclist = g->weak;  /* must be cleared after GC, ... */
g                 174 lib/lua/lgc.c        g->weak = obj2gco(h);  /* ... so put in the appropriate list */
g                 181 lib/lua/lgc.c        markvalue(g, &h->array[i]);
g                 191 lib/lua/lgc.c        if (!weakkey) markvalue(g, gkey(n));
g                 192 lib/lua/lgc.c        if (!weakvalue) markvalue(g, gval(n));
g                 203 lib/lua/lgc.c  static void traverseproto (global_State *g, Proto *f) {
g                 207 lib/lua/lgc.c      markvalue(g, &f->k[i]);
g                 214 lib/lua/lgc.c        markobject(g, f->p[i]);
g                 224 lib/lua/lgc.c  static void traverseclosure (global_State *g, Closure *cl) {
g                 225 lib/lua/lgc.c    markobject(g, cl->c.env);
g                 229 lib/lua/lgc.c        markvalue(g, &cl->c.upvalue[i]);
g                 234 lib/lua/lgc.c      markobject(g, cl->l.p);
g                 236 lib/lua/lgc.c        markobject(g, cl->l.upvals[i]);
g                 256 lib/lua/lgc.c  static void traversestack (global_State *g, lua_State *l) {
g                 259 lib/lua/lgc.c    markvalue(g, gt(l));
g                 266 lib/lua/lgc.c      markvalue(g, o);
g                 277 lib/lua/lgc.c  static l_mem propagatemark (global_State *g) {
g                 278 lib/lua/lgc.c    GCObject *o = g->gray;
g                 284 lib/lua/lgc.c        g->gray = h->gclist;
g                 285 lib/lua/lgc.c        if (traversetable(g, h))  /* table is weak? */
g                 292 lib/lua/lgc.c        g->gray = cl->c.gclist;
g                 293 lib/lua/lgc.c        traverseclosure(g, cl);
g                 299 lib/lua/lgc.c        g->gray = th->gclist;
g                 300 lib/lua/lgc.c        th->gclist = g->grayagain;
g                 301 lib/lua/lgc.c        g->grayagain = o;
g                 303 lib/lua/lgc.c        traversestack(g, th);
g                 309 lib/lua/lgc.c        g->gray = p->gclist;
g                 310 lib/lua/lgc.c        traverseproto(g, p);
g                 323 lib/lua/lgc.c  static size_t propagateall (global_State *g) {
g                 325 lib/lua/lgc.c    while (g->gray) m += propagatemark(g);
g                 409 lib/lua/lgc.c    global_State *g = G(L);
g                 410 lib/lua/lgc.c    int deadmask = otherwhite(g);
g                 415 lib/lua/lgc.c        lua_assert(!isdead(g, curr) || testbit(curr->gch.marked, FIXEDBIT));
g                 416 lib/lua/lgc.c        makewhite(g, curr);  /* make it white (for next cycle) */
g                 420 lib/lua/lgc.c        lua_assert(isdead(g, curr) || deadmask == bitmask(SFIXEDBIT));
g                 422 lib/lua/lgc.c        if (curr == g->rootgc)  /* is the first element of the list? */
g                 423 lib/lua/lgc.c          g->rootgc = curr->gch.next;  /* adjust first */
g                 432 lib/lua/lgc.c    global_State *g = G(L);
g                 434 lib/lua/lgc.c    if (g->strt.nuse < cast(lu_int32, g->strt.size/4) &&
g                 435 lib/lua/lgc.c        g->strt.size > MINSTRTABSIZE*2)
g                 436 lib/lua/lgc.c      luaS_resize(L, g->strt.size/2);  /* table is too big */
g                 438 lib/lua/lgc.c    if (luaZ_sizebuffer(&g->buff) > LUA_MINBUFFER*2) {  /* buffer too big? */
g                 439 lib/lua/lgc.c      size_t newsize = luaZ_sizebuffer(&g->buff) / 2;
g                 440 lib/lua/lgc.c      luaZ_resizebuffer(L, &g->buff, newsize);
g                 446 lib/lua/lgc.c    global_State *g = G(L);
g                 447 lib/lua/lgc.c    GCObject *o = g->tmudata->gch.next;  /* get first element */
g                 451 lib/lua/lgc.c    if (o == g->tmudata)  /* last element? */
g                 452 lib/lua/lgc.c      g->tmudata = NULL;
g                 454 lib/lua/lgc.c      g->tmudata->gch.next = udata->uv.next;
g                 455 lib/lua/lgc.c    udata->uv.next = g->mainthread->next;  /* return it to `root' list */
g                 456 lib/lua/lgc.c    g->mainthread->next = o;
g                 457 lib/lua/lgc.c    makewhite(g, o);
g                 461 lib/lua/lgc.c      lu_mem oldt = g->GCthreshold;
g                 463 lib/lua/lgc.c      g->GCthreshold = 2*g->totalbytes;  /* avoid GC steps */
g                 469 lib/lua/lgc.c      g->GCthreshold = oldt;  /* restore threshold */
g                 484 lib/lua/lgc.c    global_State *g = G(L);
g                 486 lib/lua/lgc.c    g->currentwhite = WHITEBITS | bitmask(SFIXEDBIT);  /* mask to collect all elements */
g                 487 lib/lua/lgc.c    sweepwholelist(L, &g->rootgc);
g                 488 lib/lua/lgc.c    for (i = 0; i < g->strt.size; i++)  /* free all string lists */
g                 489 lib/lua/lgc.c      sweepwholelist(L, &g->strt.hash[i]);
g                 493 lib/lua/lgc.c  static void markmt (global_State *g) {
g                 496 lib/lua/lgc.c      if (g->mt[i]) markobject(g, g->mt[i]);
g                 502 lib/lua/lgc.c    global_State *g = G(L);
g                 503 lib/lua/lgc.c    g->gray = NULL;
g                 504 lib/lua/lgc.c    g->grayagain = NULL;
g                 505 lib/lua/lgc.c    g->weak = NULL;
g                 506 lib/lua/lgc.c    markobject(g, g->mainthread);
g                 508 lib/lua/lgc.c    markvalue(g, gt(g->mainthread));
g                 509 lib/lua/lgc.c    markvalue(g, registry(L));
g                 510 lib/lua/lgc.c    markmt(g);
g                 511 lib/lua/lgc.c    g->gcstate = GCSpropagate;
g                 515 lib/lua/lgc.c  static void remarkupvals (global_State *g) {
g                 517 lib/lua/lgc.c    for (uv = g->uvhead.u.l.next; uv != &g->uvhead; uv = uv->u.l.next) {
g                 520 lib/lua/lgc.c        markvalue(g, uv->v);
g                 526 lib/lua/lgc.c    global_State *g = G(L);
g                 529 lib/lua/lgc.c    remarkupvals(g);
g                 531 lib/lua/lgc.c    propagateall(g);
g                 533 lib/lua/lgc.c    g->gray = g->weak;
g                 534 lib/lua/lgc.c    g->weak = NULL;
g                 535 lib/lua/lgc.c    lua_assert(!iswhite(obj2gco(g->mainthread)));
g                 536 lib/lua/lgc.c    markobject(g, L);  /* mark running thread */
g                 537 lib/lua/lgc.c    markmt(g);  /* mark basic metatables (again) */
g                 538 lib/lua/lgc.c    propagateall(g);
g                 540 lib/lua/lgc.c    g->gray = g->grayagain;
g                 541 lib/lua/lgc.c    g->grayagain = NULL;
g                 542 lib/lua/lgc.c    propagateall(g);
g                 544 lib/lua/lgc.c    marktmu(g);  /* mark `preserved' userdata */
g                 545 lib/lua/lgc.c    udsize += propagateall(g);  /* remark, to propagate `preserveness' */
g                 546 lib/lua/lgc.c    cleartable(g->weak);  /* remove collected objects from weak tables */
g                 548 lib/lua/lgc.c    g->currentwhite = cast_byte(otherwhite(g));
g                 549 lib/lua/lgc.c    g->sweepstrgc = 0;
g                 550 lib/lua/lgc.c    g->sweepgc = &g->rootgc;
g                 551 lib/lua/lgc.c    g->gcstate = GCSsweepstring;
g                 552 lib/lua/lgc.c    g->estimate = g->totalbytes - udsize;  /* first estimate */
g                 557 lib/lua/lgc.c    global_State *g = G(L);
g                 559 lib/lua/lgc.c    switch (g->gcstate) {
g                 565 lib/lua/lgc.c        if (g->gray)
g                 566 lib/lua/lgc.c          return propagatemark(g);
g                 573 lib/lua/lgc.c        lu_mem old = g->totalbytes;
g                 574 lib/lua/lgc.c        sweepwholelist(L, &g->strt.hash[g->sweepstrgc++]);
g                 575 lib/lua/lgc.c        if (g->sweepstrgc >= g->strt.size)  /* nothing more to sweep? */
g                 576 lib/lua/lgc.c          g->gcstate = GCSsweep;  /* end sweep-string phase */
g                 577 lib/lua/lgc.c        lua_assert(old >= g->totalbytes);
g                 578 lib/lua/lgc.c        g->estimate -= old - g->totalbytes;
g                 582 lib/lua/lgc.c        lu_mem old = g->totalbytes;
g                 583 lib/lua/lgc.c        g->sweepgc = sweeplist(L, g->sweepgc, GCSWEEPMAX);
g                 584 lib/lua/lgc.c        if (*g->sweepgc == NULL) {  /* nothing more to sweep? */
g                 586 lib/lua/lgc.c          g->gcstate = GCSfinalize;  /* end sweep phase */
g                 588 lib/lua/lgc.c        lua_assert(old >= g->totalbytes);
g                 589 lib/lua/lgc.c        g->estimate -= old - g->totalbytes;
g                 593 lib/lua/lgc.c        if (g->tmudata) {
g                 595 lib/lua/lgc.c          if (g->estimate > GCFINALIZECOST)
g                 596 lib/lua/lgc.c            g->estimate -= GCFINALIZECOST;
g                 600 lib/lua/lgc.c          g->gcstate = GCSpause;  /* end collection */
g                 601 lib/lua/lgc.c          g->gcdept = 0;
g                 611 lib/lua/lgc.c    global_State *g = G(L);
g                 612 lib/lua/lgc.c    l_mem lim = (GCSTEPSIZE/100) * g->gcstepmul;
g                 615 lib/lua/lgc.c    g->gcdept += g->totalbytes - g->GCthreshold;
g                 618 lib/lua/lgc.c      if (g->gcstate == GCSpause)
g                 621 lib/lua/lgc.c    if (g->gcstate != GCSpause) {
g                 622 lib/lua/lgc.c      if (g->gcdept < GCSTEPSIZE)
g                 623 lib/lua/lgc.c        g->GCthreshold = g->totalbytes + GCSTEPSIZE;  /* - lim/g->gcstepmul;*/
g                 625 lib/lua/lgc.c        g->gcdept -= GCSTEPSIZE;
g                 626 lib/lua/lgc.c        g->GCthreshold = g->totalbytes;
g                 630 lib/lua/lgc.c      setthreshold(g);
g                 636 lib/lua/lgc.c    global_State *g = G(L);
g                 637 lib/lua/lgc.c    if (g->gcstate <= GCSpropagate) {
g                 639 lib/lua/lgc.c      g->sweepstrgc = 0;
g                 640 lib/lua/lgc.c      g->sweepgc = &g->rootgc;
g                 642 lib/lua/lgc.c      g->gray = NULL;
g                 643 lib/lua/lgc.c      g->grayagain = NULL;
g                 644 lib/lua/lgc.c      g->weak = NULL;
g                 645 lib/lua/lgc.c      g->gcstate = GCSsweepstring;
g                 647 lib/lua/lgc.c    lua_assert(g->gcstate != GCSpause && g->gcstate != GCSpropagate);
g                 649 lib/lua/lgc.c    while (g->gcstate != GCSfinalize) {
g                 650 lib/lua/lgc.c      lua_assert(g->gcstate == GCSsweepstring || g->gcstate == GCSsweep);
g                 654 lib/lua/lgc.c    while (g->gcstate != GCSpause) {
g                 657 lib/lua/lgc.c    setthreshold(g);
g                 662 lib/lua/lgc.c    global_State *g = G(L);
g                 663 lib/lua/lgc.c    lua_assert(isblack(o) && iswhite(v) && !isdead(g, v) && !isdead(g, o));
g                 664 lib/lua/lgc.c    lua_assert(g->gcstate != GCSfinalize && g->gcstate != GCSpause);
g                 667 lib/lua/lgc.c    if (g->gcstate == GCSpropagate)
g                 668 lib/lua/lgc.c      reallymarkobject(g, v);  /* restore invariant */
g                 670 lib/lua/lgc.c      makewhite(g, o);  /* mark as white just to avoid other barriers */
g                 675 lib/lua/lgc.c    global_State *g = G(L);
g                 677 lib/lua/lgc.c    lua_assert(isblack(o) && !isdead(g, o));
g                 678 lib/lua/lgc.c    lua_assert(g->gcstate != GCSfinalize && g->gcstate != GCSpause);
g                 680 lib/lua/lgc.c    t->gclist = g->grayagain;
g                 681 lib/lua/lgc.c    g->grayagain = o;
g                 686 lib/lua/lgc.c    global_State *g = G(L);
g                 687 lib/lua/lgc.c    o->gch.next = g->rootgc;
g                 688 lib/lua/lgc.c    g->rootgc = o;
g                 689 lib/lua/lgc.c    o->gch.marked = luaC_white(g);
g                 695 lib/lua/lgc.c    global_State *g = G(L);
g                 697 lib/lua/lgc.c    o->gch.next = g->rootgc;  /* link upvalue into `rootgc' list */
g                 698 lib/lua/lgc.c    g->rootgc = o;
g                 700 lib/lua/lgc.c      if (g->gcstate == GCSpropagate) {
g                 705 lib/lua/lgc.c        makewhite(g, o);
g                 706 lib/lua/lgc.c        lua_assert(g->gcstate != GCSfinalize && g->gcstate != GCSpause);
g                  69 lib/lua/lgc.h  #define otherwhite(g)	(g->currentwhite ^ WHITEBITS)
g                  70 lib/lua/lgc.h  #define isdead(g,v)	((v)->gch.marked & otherwhite(g) & WHITEBITS)
g                  77 lib/lua/lgc.h  #define luaC_white(g)	cast(lu_byte, (g)->currentwhite & WHITEBITS)
g                  77 lib/lua/lmem.c   global_State *g = G(L);
g                  79 lib/lua/lmem.c   block = (*g->frealloc)(g->ud, block, osize, nsize);
g                  83 lib/lua/lmem.c   g->totalbytes = (g->totalbytes - osize) + nsize;
g                 111 lib/lua/lobject.h #define checkliveness(g,obj) \
g                 113 lib/lua/lobject.h   ((ttype(obj) == (obj)->value.gc->gch.tt) && !isdead(g, (obj)->value.gc)))
g                  37 lib/lua/lstate.c   global_State g;
g                  71 lib/lua/lstate.c   global_State *g = G(L);
g                  80 lib/lua/lstate.c   g->GCthreshold = 4*g->totalbytes;
g                  84 lib/lua/lstate.c static void preinit_state (lua_State *L, global_State *g) {
g                  85 lib/lua/lstate.c   G(L) = g;
g                 106 lib/lua/lstate.c   global_State *g = G(L);
g                 109 lib/lua/lstate.c   lua_assert(g->rootgc == obj2gco(L));
g                 110 lib/lua/lstate.c   lua_assert(g->strt.nuse == 0);
g                 112 lib/lua/lstate.c   luaZ_freebuffer(L, &g->buff);
g                 114 lib/lua/lstate.c   lua_assert(g->totalbytes == sizeof(LG));
g                 115 lib/lua/lstate.c   (*g->frealloc)(g->ud, fromstate(L), state_size(LG), 0);
g                 146 lib/lua/lstate.c   global_State *g;
g                 150 lib/lua/lstate.c   g = &((LG *)L)->g;
g                 153 lib/lua/lstate.c   g->currentwhite = bit2mask(WHITE0BIT, FIXEDBIT);
g                 154 lib/lua/lstate.c   L->marked = luaC_white(g);
g                 156 lib/lua/lstate.c   preinit_state(L, g);
g                 157 lib/lua/lstate.c   g->frealloc = f;
g                 158 lib/lua/lstate.c   g->ud = ud;
g                 159 lib/lua/lstate.c   g->mainthread = L;
g                 160 lib/lua/lstate.c   g->uvhead.u.l.prev = &g->uvhead;
g                 161 lib/lua/lstate.c   g->uvhead.u.l.next = &g->uvhead;
g                 162 lib/lua/lstate.c   g->GCthreshold = 0;  /* mark it as unfinished state */
g                 163 lib/lua/lstate.c   g->strt.size = 0;
g                 164 lib/lua/lstate.c   g->strt.nuse = 0;
g                 165 lib/lua/lstate.c   g->strt.hash = NULL;
g                 167 lib/lua/lstate.c   luaZ_initbuffer(L, &g->buff);
g                 168 lib/lua/lstate.c   g->panic = NULL;
g                 169 lib/lua/lstate.c   g->gcstate = GCSpause;
g                 170 lib/lua/lstate.c   g->rootgc = obj2gco(L);
g                 171 lib/lua/lstate.c   g->sweepstrgc = 0;
g                 172 lib/lua/lstate.c   g->sweepgc = &g->rootgc;
g                 173 lib/lua/lstate.c   g->gray = NULL;
g                 174 lib/lua/lstate.c   g->grayagain = NULL;
g                 175 lib/lua/lstate.c   g->weak = NULL;
g                 176 lib/lua/lstate.c   g->tmudata = NULL;
g                 177 lib/lua/lstate.c   g->totalbytes = sizeof(LG);
g                 178 lib/lua/lstate.c   g->gcpause = LUAI_GCPAUSE;
g                 179 lib/lua/lstate.c   g->gcstepmul = LUAI_GCMUL;
g                 180 lib/lua/lstate.c   g->gcdept = 0;
g                 181 lib/lua/lstate.c   for (i=0; i<NUM_TAGS; i++) g->mt[i] = NULL;
g                  41 lib/lua/ltm.h  #define gfasttm(g,et,e) ((et) == NULL ? NULL : \
g                  42 lib/lua/ltm.h    ((et)->flags & (1u<<(e))) ? NULL : luaT_gettm(et, e, (g)->tmname[e]))
g                 449 lib/lua/lvm.c          TValue g;
g                 451 lib/lua/lvm.c          sethvalue(L, &g, cl->env);
g                 453 lib/lua/lvm.c          Protect(luaV_gettable(L, &g, rb, ra));
g                 461 lib/lua/lvm.c          TValue g;
g                 462 lib/lua/lvm.c          sethvalue(L, &g, cl->env);
g                 464 lib/lua/lvm.c          Protect(luaV_settable(L, &g, KBx(i), ra));
g                 930 modules/dng.c              int g=get_raw_pixel(x+1,y) >> (shift+1);
g                 931 modules/dng.c              *buf++ = gamma[g+(g>>2)];  // green pixel was (6*g/10), now (g/2 + g/8)