!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/5.6.40 

uname -a: Linux cpanel06wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.80.el6.x86_64 #1 SMP Thu Sep 24
01:42:00 EDT 2020 x86_64
 

uid=851(cp949260) gid=853(cp949260) groups=853(cp949260) 

Safe-mode: OFF (not secure)

/opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/oj-3.7.12/ext/oj/   drwxrwxr-x
Free 221.6 GB of 981.82 GB (22.57%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     circarray.c (1.25 KB)      -rw-rw-r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/* circarray.c
 * Copyright (c) 2012, Peter Ohler
 * All rights reserved.
 */

#include "circarray.h"

CircArray
oj_circ_array_new() {
    CircArray    ca;
    
    if (0 == (ca = ALLOC(struct _circArray))) {
    rb_raise(rb_eNoMemError, "not enough memory\n");
    }
    ca->objs = ca->obj_array;
    ca->size = sizeof(ca->obj_array) / sizeof(VALUE);
    ca->cnt = 0;
    
    return ca;
}

void
oj_circ_array_free(CircArray ca) {
    if (ca->objs != ca->obj_array) {
    xfree(ca->objs);
    }
    xfree(ca);
}

void
oj_circ_array_set(CircArray ca, VALUE obj, unsigned long id) {
    if (0 < id && 0 != ca) {
    unsigned long    i;

    if (ca->size < id) {
        unsigned long    cnt = id + 512;

        if (ca->objs == ca->obj_array) {
        if (0 == (ca->objs = ALLOC_N(VALUE, cnt))) {
            rb_raise(rb_eNoMemError, "not enough memory\n");
        }
        memcpy(ca->objs, ca->obj_array, sizeof(VALUE) * ca->cnt);
        } else { 
        REALLOC_N(ca->objs, VALUE, cnt);
        }
        ca->size = cnt;
    }
    id--;
    for (i = ca->cnt; i < id; i++) {
        ca->objs[i] = Qnil;
    }
    ca->objs[id] = obj;
    if (ca->cnt <= id) {
        ca->cnt = id + 1;
    }
    }
}

VALUE
oj_circ_array_get(CircArray ca, unsigned long id) {
    VALUE    obj = Qnil;

    if (id <= ca->cnt && 0 != ca) {
    obj = ca->objs[id - 1];
    }
    return obj;
}


:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.1266 ]--