|
System | : | Linux MiraNet 3.0.0-14-generic-pae #23-Ubuntu SMP Mon Nov 21 22:07:10 UTC 2011 i686 |
Software | : | Apache. PHP/5.3.6-13ubuntu3.10 |
ID | : | uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)
|
|
Safe Mode | : | OFF |
Open_Basedir | : | OFF |
Freespace | : | 23.73 GB of 70.42 GB (33.7%) |
|
MySQL: ON MSSQL: OFF Oracle: OFF PostgreSQL: OFF Curl: OFF Sockets: ON Fetch: OFF Wget: ON Perl: ON |
Disabled Functions: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
|
[ System Info ]
[ Processes ]
[ SQL Manager ]
[ Eval ]
[ Encoder ]
[ Mailer ]
[ Back Connection ]
[ Backdoor Server ]
[ Kernel Exploit Search ]
[ MD5 Decrypter ]
[ Reverse IP ]
[ Kill Shell ]
[ FTP Brute-Force ]
|
|
/
usr/
src/
courier-0.66.1/
webmail/
- drwxrwxrwx
|
Viewing file: buf.c (1.7 KB) -rw-rw-rw-Select action/file-type:  ( +) |  ( +) |  ( +) | Code ( +) | Session ( +) |  ( +) | SDB ( +) |  ( +) |  ( +) |  ( +) |  ( +) |  ( +) |
#include "config.h" /* ** Copyright 1998 - 1999 Double Precision, Inc. See COPYING for ** distribution information. */
/* */ #include <string.h> #include "buf.h" #include "sqwebmail.h"
void buf_append(struct buf *b, char c) { char cc[2];
cc[0]=c; cc[1]=0; buf_cat(b, cc); }
static int buf_allocbuf(struct buf *b, size_t n) { if (n > b->size) { size_t c=n+64; char *p= b->ptr ? realloc(b->ptr, c):malloc(c);
if (!p) return 0;
b->ptr=p; b->size=c; } return 1; }
void buf_cpy(struct buf *b, const char *c) { size_t l=strlen(c);
if (!buf_allocbuf(b, l+1)) return;
strcpy(b->ptr, c); b->cnt=l; }
void buf_cpyn(struct buf *b, const char *c, size_t n) { size_t l;
for (l=0; l<n; l++) if (c[l] == '\0') break;
if (!buf_allocbuf(b, l+1)) return;
memcpy(b->ptr, c, l); b->ptr[b->cnt=l]=0; }
void buf_cat(struct buf *b, const char *c) { size_t l=strlen(c);
if (!buf_allocbuf(b, b->cnt+l+1)) return;
strcpy(b->ptr+b->cnt, c); b->cnt += l; }
void buf_catn(struct buf *b, const char *c, size_t n) { size_t l;
for (l=0; l<n; l++) if (c[l] == '\0') break;
if (!buf_allocbuf(b, b->cnt+l+1)) return;
memcpy(b->ptr+b->cnt, c, l); b->ptr[b->cnt += l]=0; }
void buf_memcpy(struct buf *b, const char *c, size_t n) { if (!buf_allocbuf(b, n+1)) return;
memcpy(b->ptr, c, n); b->ptr[b->cnt=n]=0; }
void buf_memcat(struct buf *b, const char *c, size_t n) { if (!buf_allocbuf(b, b->cnt+n+1)) return;
memcpy(b->ptr+b->cnt, c, n); b->ptr[b->cnt += n]=0; }
void buf_trimleft(struct buf *b, size_t n) { if (n >= b->cnt) b->cnt=0; else { size_t i;
for (b->cnt -= n, i=0; i<b->cnt; i++) b->ptr[i]=b->ptr[i+n]; } if (!buf_allocbuf(b, b->cnt+1)) return;
b->ptr[b->cnt]=0; }
|