!C99Shell v. 1.0 pre-release build #16!

Software: Apache/2.0.54 (Fedora). PHP/5.0.4 

uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 

uid=48(apache) gid=48(apache) groups=48(apache)
context=system_u:system_r:httpd_sys_script_t
 

Safe-mode: OFF (not secure)

/usr/include/   drwxr-xr-x
Free 3.9 GB of 27.03 GB (14.41%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     mxQueue.h (4.47 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#ifndef MXQUEUE_H
#define MXQUEUE_H
/*
  mxQueue -- A queue implementation

  Copyright (c) 1998-2000, Marc-Andre Lemburg; mailto:mal@lemburg.com
  Copyright (c) 2000-2001, eGenix.com Software GmbH; mailto:info@egenix.com
  See the documentation for further copyright information or contact
  the author (mailto:mal@lemburg.com).
  
*/

/* The extension's name; must be the same as the init function's suffix */
#define MXQUEUE_MODULE "mxQueue"

/* Name of the package or module that provides the extensions C API.
   If the extension is used inside a package, provide the complete
   import path. */
#define MXQUEUE_API_MODULE "mx.Queue"

/* --- No servicable parts below this line ----------------------*/

/* Include generic mx extension header file */
#include "mxh.h"

#ifdef MX_BUILDING_MXQUEUE
# define MXQUEUE_EXTERNALIZE MX_EXPORT
#else
# define MXQUEUE_EXTERNALIZE MX_IMPORT
#endif

#ifdef __cplusplus
extern "C" {
#endif

/* --- Queue Object ------------------------------------------*/

typedef struct {
    PyObject_HEAD
    int size;            /* Number of items allocated */
    int head;            /* Index of head element */
    int tail;            /* Index of tail element */
    PyObject **array;        /* Pointer to the queue array */
} mxQueueObject;

/* Fast access */

#define mxQueue_GET_SIZE(v) \
        ((((mxQueueObject *)(v))->head - ((mxQueueObject *)(v))->tail) \
     % ((mxQueueObject *)(v))->size)
#define mxQueue_EMPTY(v) \
        (((((mxQueueObject *)(v))->head - ((mxQueueObject *)(v))->tail)) == 0)

/* Type checking macro */

#define mxQueue_Check(v) \
        (((mxQueueObject *)(v))->ob_type == mxQueue.Queue_Type)

/* --- C API ----------------------------------------------------*/

/* C API for usage by other Python modules */
typedef struct {
    
    /* Type object for Queue() */
    PyTypeObject *Queue_Type;

    /* Create a new empty queue object with at least size entries
       alredy allocated. */
    mxQueueObject *(*mxQueue_New)(int size);

    /* Push a Python object onto the queue. The reference count is increased
       by one. Queues only grow, they never shrink again. */
    int (*mxQueue_Push)(mxQueueObject *queue,
            PyObject *v);
    
    /* Pop an object from the queue. Ownership is passed to the caller.
       Note: This doesn't cause the allocated queue size to change. */
    PyObject *(*mxQueue_Pop)(mxQueueObject *queue);
    
    /* Clear the queue. */
    int (*mxQueue_Clear)(mxQueueObject *queue);

    /* Get the number of entries in the queue. */
    int (*mxQueue_Length)(mxQueueObject *queue);

    /* Create a new empty queue object from the sequence v */
    mxQueueObject *(*mxQueue_FromSequence)(PyObject *v);

    /* Return a the queues content as tuple. */
    PyObject *(*mxQueue_AsTuple)(mxQueueObject *queue);
    
    /* Return a the queues content as list. */
    PyObject *(*mxQueue_AsList)(mxQueueObject *queue);

    /* Pop the topmost n entries from the queue and return them as
       tuple. If there are not enough entries only the available ones
       are returned.  */
    PyObject *(*mxQueue_PopMany)(mxQueueObject *queue,
                int n);

    /* Push the entries from sequence onto the queue. */
    int (*mxQueue_PushMany)(mxQueueObject *queue,
                PyObject *sequence);

} mxQueueModule_APIObject;

#ifndef MX_BUILDING_MXQUEUE

/* Interfacestructure to C API for other modules.
   Call mxQueue_ImportModuleAPI() to initialize this
   structure. After that usage is simple:

   PyObject *v;
    
   v = mxQueue.Queue_New(0);
   if (!v)
       goto onError;
   ...

*/

static
mxQueueModule_APIObject mxQueue;

/* You *must* call this before using any of the functions in
   mxQueue and check its outcome; otherwise all accesses will
   result in a segfault. Returns 0 on success. */

#ifndef DPRINTF
# define DPRINTF if (0) printf
#endif

static
int mxQueue_ImportModuleAndAPI(void)
{
    PyObject *mod, *v = 0;
    void *api;
    
    DPRINTF("Importing the %s C API...\n",MXQUEUE_API_MODULE);
    mod = PyImport_ImportModule(MXQUEUE_API_MODULE);
    if (mod == NULL)
    goto onError;
    DPRINTF(" module found\n");
    v = PyObject_GetAttrString(mod,MXQUEUE_MODULE"API");
    if (v == NULL)
    goto onError;
    Py_DECREF(mod);
    DPRINTF(" API object found\n");
    api = PyCObject_AsVoidPtr(v);
    if (api == NULL)
    goto onError;
    Py_DECREF(v);
    memcpy(&mxQueue,api,sizeof(mxQueue));
    DPRINTF(" API object initialized.\n");
    return 0;
    
onError:
    DPRINTF(" not found.\n");
    Py_XDECREF(mod);
    Py_XDECREF(v);
    return -1;
}

#endif

/* EOF */
#ifdef __cplusplus
}
#endif
#endif

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0035 ]--