repo_name stringlengths 6 97 | path stringlengths 3 341 | text stringlengths 8 1.02M |
|---|---|---|
openwengo/qmail-ldap | ipalloc.c | <reponame>openwengo/qmail-ldap<gh_stars>10-100
#include "alloc.h"
#include "gen_allocdefs.h"
#include "ip.h"
#include "ipalloc.h"
GEN_ALLOC_readyplus(ipalloc,struct ip_mx,ix,len,a,i,n,x,10,ipalloc_readyplus)
GEN_ALLOC_append(ipalloc,struct ip_mx,ix,len,a,i,n,x,10,ipalloc_readyplus,ipalloc_append)
|
openwengo/qmail-ldap | auto_qmail.h | <filename>auto_qmail.h<gh_stars>10-100
#ifndef AUTO_QMAIL_H
#define AUTO_QMAIL_H
extern char auto_qmail[];
#endif
|
openwengo/qmail-ldap | ip.h | #ifndef IP_H
#define IP_H
struct ip_address { unsigned char d[4]; } ;
extern unsigned int ip_fmt(char *, struct ip_address *);
#define IPFMT 19
extern unsigned int ip_scan(const char *, struct ip_address *);
extern unsigned int ip_scanbracket(const char *, struct ip_address *);
#endif
|
openwengo/qmail-ldap | readsubdir.h | <reponame>openwengo/qmail-ldap
#ifndef READSUBDIR_H
#define READSUBDIR_H
#include "direntry.h"
typedef struct readsubdir
{
DIR *dir;
unsigned int pos;
const char *name;
void (*pause)();
}
readsubdir;
extern void readsubdir_init(readsubdir *, const char *, void (*)());
extern int readsubdir_next(readsubdir ... |
openwengo/qmail-ldap | auto_usera.h | <gh_stars>10-100
#ifndef AUTO_USERA_H
#define AUTO_USERA_H
extern char auto_usera[];
#endif
|
openwengo/qmail-ldap | condredirect.c | <reponame>openwengo/qmail-ldap<filename>condredirect.c
#include <unistd.h>
#include "sig.h"
#include "readwrite.h"
#include "exit.h"
#include "env.h"
#include "error.h"
#include "fork.h"
#include "wait.h"
#include "seek.h"
#include "qmail.h"
#include "strerr.h"
#include "substdio.h"
#include "fmt.h"
#define FATAL "con... |
openwengo/qmail-ldap | constmap.c | <filename>constmap.c<gh_stars>10-100
#include "constmap.h"
#include "alloc.h"
#include "case.h"
static constmap_hash hash(s,len)
const char *s;
unsigned int len;
{
unsigned char ch;
constmap_hash h;
h = 5381;
while (len > 0) {
ch = *s++ - 'A';
if (ch <= 'Z' - 'A') ch += 'a' - 'A';
h = ((h << 5) + h... |
openwengo/qmail-ldap | myctime.h | <filename>myctime.h<gh_stars>10-100
#ifndef MYCTIME_H
#define MYCTIME_H
#include "datetime.h"
extern char *myctime(datetime_sec);
#endif
|
openwengo/qmail-ldap | rcpthosts.h | <reponame>openwengo/qmail-ldap
#ifndef RCPTHOSTS_H
#define RCPTHOSTS_H
extern int rcpthosts_init(void);
extern int rcpthosts(char *, unsigned int, int);
extern int localhosts(char *, unsigned int);
#endif
|
openwengo/qmail-ldap | byte_zero.c | #include "byte.h"
void byte_zero(s,n)
void *s;
register unsigned int n;
{
char *S = (char *)s;
for (;;) {
if (!n) break; *S++ = 0; --n;
if (!n) break; *S++ = 0; --n;
if (!n) break; *S++ = 0; --n;
if (!n) break; *S++ = 0; --n;
}
}
|
openwengo/qmail-ldap | hfield.h | #ifndef HFIELD_H
#define HFIELD_H
extern unsigned int hfield_skipname(char *, unsigned int);
extern int hfield_known(char *, unsigned int);
extern int hfield_valid(char *, unsigned int);
#define H_SENDER 1
#define H_FROM 2
#define H_REPLYTO 3
#define H_TO 4
#define H_CC 5
#define H_BCC 6
#define H_DATE 7
#define H_ME... |
openwengo/qmail-ldap | tryulong32.c | void main()
{
unsigned long u;
u = 1;
u += u; u += u; u += u; u += u; u += u; u += u; u += u; u += u;
u += u; u += u; u += u; u += u; u += u; u += u; u += u; u += u;
u += u; u += u; u += u; u += u; u += u; u += u; u += u; u += u;
u += u; u += u; u += u; u += u; u += u; u += u; u += u; u += u;
if (!u) _exi... |
openwengo/qmail-ldap | str_len.c | <filename>str_len.c
#include "str.h"
unsigned int str_len(s)
register const char *s;
{
register const char *t;
t = s;
for (;;) {
if (!*t) return t - s; ++t;
if (!*t) return t - s; ++t;
if (!*t) return t - s; ++t;
if (!*t) return t - s; ++t;
}
}
|
openwengo/qmail-ldap | control.h | #ifndef CONTROL_H
#define CONTROL_H
#include "stralloc.h"
extern int control_init(void);
extern int control_readline(stralloc *, const char *);
extern int control_rldef(stralloc *, const char *, int, const char *);
extern int control_readint(int *, const char *);
extern int control_readulong(unsigned long *, const ch... |
openwengo/qmail-ldap | sig_term.c | <reponame>openwengo/qmail-ldap<filename>sig_term.c
#include <signal.h>
#include "sig.h"
void sig_termblock(void) { sig_block(SIGTERM); }
void sig_termunblock(void) { sig_unblock(SIGTERM); }
void sig_termcatch(f) void (*f)(); { sig_catch(SIGTERM,f); }
void sig_termdefault(void) { sig_catch(SIGTERM,SIG_DFL); }
|
openwengo/qmail-ldap | fd_copy.c | <reponame>openwengo/qmail-ldap<gh_stars>10-100
#include <fcntl.h>
#include <unistd.h>
#include "fd.h"
int fd_copy(to,from)
int to;
int from;
{
if (to == from) return 0;
if (fcntl(from,F_GETFL,0) == -1) return -1;
close(to);
if (fcntl(from,F_DUPFD,to) == -1) return -1;
return 0;
}
|
openwengo/qmail-ldap | subfdout.c | #include "readwrite.h"
#include "substdio.h"
#include "subfd.h"
char subfd_outbuf[SUBSTDIO_OUTSIZE];
static substdio it = SUBSTDIO_FDBUF(subwrite,1,subfd_outbuf,SUBSTDIO_OUTSIZE);
substdio *subfdout = ⁢
|
openwengo/qmail-ldap | constmap.h | #ifndef CONSTMAP_H
#define CONSTMAP_H
typedef unsigned long constmap_hash;
struct constmap {
int num;
constmap_hash mask;
constmap_hash *hash;
int *first;
int *next;
const char **input;
unsigned int *inputlen;
} ;
extern int constmap_init(struct constmap *, const char *, unsigned int, int);
extern void... |
openwengo/qmail-ldap | trysyslog.c | <filename>trysyslog.c
#include <sys/types.h>
#include <sys/time.h>
#include <syslog.h>
main()
{
openlog("foo",0,LOG_MAIL);
syslog(0,"foo");
}
|
openwengo/qmail-ldap | datetime_un.c | #include "datetime.h"
/* roughly 100x faster than mktime() */
datetime_sec datetime_untai(dt)
struct datetime *dt;
{
int year;
int day;
int mon;
year = dt->year + 1900;
mon = dt->mon;
if (mon >= 2) { mon -= 2; }
else { mon += 10; --year; }
day = (dt->mday - 1) * 10 + 5 + 306 * mon;
day /= 10;
... |
openwengo/qmail-ldap | digest_rmd160.h | /* digest_rmd160.h for QLDAP modified to use djb's stuff */
/* */
/* RMD160 */
/* */
/********************************************************************\
*
* FILE: rmd160.h
*
* CONTENTS: Header file for a sample C-implementation of the
* RIPEMD-160 hash-function.
* ... |
openwengo/qmail-ldap | received.h | <filename>received.h<gh_stars>10-100
#ifndef RECEIVED_H
#define RECEIVED_H
#include "qmail.h"
extern void received(struct qmail *, const char *, const char *, const char *,
const char *, const char *, const char *, const char *, const char *);
#endif
|
openwengo/qmail-ldap | commands.h | #ifndef COMMANDS_H
#define COMMANDS_H
#include "substdio.h"
struct commands {
const char *text;
void (*fun)();
void (*flush)();
} ;
extern int commands(substdio *, struct commands *);
#endif
|
openwengo/qmail-ldap | substdio.h | #ifndef SUBSTDIO_H
#define SUBSTDIO_H
typedef struct substdio {
char *x;
unsigned int p;
unsigned int n;
int fd;
int (*op)(int, void *, int);
} substdio;
#define SUBSTDIO_FDBUF(op,fd,buf,len) { (buf), 0, (len), (fd), (op) }
extern void substdio_fdbuf(substdio *, int (*)(int, void *, int), int, char *, unsi... |
openwengo/qmail-ldap | sig_bug.c | <filename>sig_bug.c
#include <signal.h>
#include "sig.h"
void sig_bugcatch(f) void (*f)();
{
sig_catch(SIGILL,f);
sig_catch(SIGABRT,f);
sig_catch(SIGFPE,f);
sig_catch(SIGBUS,f);
sig_catch(SIGSEGV,f);
#ifdef SIGSYS
sig_catch(SIGSYS,f);
#endif
#ifdef SIGEMT
sig_catch(SIGEMT,f);
#endif
}
|
openwengo/qmail-ldap | spawn.c | #include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "readwrite.h"
#include "alloc.h"
#include "sig.h"
#include "wait.h"
#include "substdio.h"
#include "byte.h"
#include "str.h"
#include "stralloc.h"
#include "select.h"
#include "exit.h"
#include "coe.h"
#include "open.h"
#include "error.h"
#includ... |
openwengo/qmail-ldap | readsubdir.c | <gh_stars>10-100
#include "readsubdir.h"
#include "fmt.h"
#include "scan.h"
#include "str.h"
#include "auto_split.h"
void readsubdir_init(rs,name,pause)
readsubdir *rs;
const char *name;
void (*pause)();
{
rs->name = name;
rs->pause = pause;
rs->dir = 0;
rs->pos = 0;
}
static char namepos[FMT_ULONG + 4 + READSUBD... |
openwengo/qmail-ldap | auto_split.h | #ifndef AUTO_SPLIT_H
#define AUTO_SPLIT_H
extern unsigned int auto_split;
#endif
|
openwengo/qmail-ldap | date822fmt.h | #ifndef DATE822FMT_H
#define DATE822FMT_H
#include "datetime.h"
extern unsigned int date822fmt(char *, struct datetime *);
#define DATE822FMT 60
#endif
|
openwengo/qmail-ldap | lock.h | #ifndef LOCK_H
#define LOCK_H
extern int lock_ex(int);
extern int lock_un(int);
extern int lock_exnb(int);
#endif
|
openwengo/qmail-ldap | alloc.c | <filename>alloc.c
#include <stdlib.h>
#include "alloc.h"
#include "error.h"
/*@null@*//*@out@*/void *alloc(n)
unsigned int n;
{
void *x;
x = malloc(n);
if (!x) errno = error_nomem;
return x;
}
void alloc_free(x)
void *x;
{
free(x);
}
|
openwengo/qmail-ldap | sig_pipe.c | <gh_stars>10-100
#include <signal.h>
#include "sig.h"
void sig_pipeignore(void) { sig_catch(SIGPIPE,SIG_IGN); }
void sig_pipedefault(void) { sig_catch(SIGPIPE,SIG_DFL); }
|
openwengo/qmail-ldap | sig_hup.c | #include <signal.h>
#include "sig.h"
void sig_hangupblock(void) { sig_block(SIGHUP); }
void sig_hangupunblock(void) { sig_unblock(SIGHUP); }
void sig_hangupcatch(f) void (*f)(); { sig_catch(SIGHUP,f); }
void sig_hangupdefault(void) { sig_catch(SIGHUP,SIG_DFL); }
|
openwengo/qmail-ldap | subfdouts.c | <filename>subfdouts.c
#include "readwrite.h"
#include "substdio.h"
#include "subfd.h"
char subfd_outbufsmall[256];
static substdio it = SUBSTDIO_FDBUF(subwrite,1,subfd_outbufsmall,256);
substdio *subfdoutsmall = ⁢
|
openwengo/qmail-ldap | timeoutconn.h | #ifndef TIMEOUTCONN_H
#define TIMEOUTCONN_H
struct ip_address;
extern int timeoutconn(int, struct ip_address *,
struct ip_address *, unsigned int, int);
#endif
|
openwengo/qmail-ldap | remoteinfo.h | #ifndef REMOTEINFO_H
#define REMOTEINFO_H
struct ip_address;
extern char *remoteinfo_get(struct ip_address *, unsigned long,
struct ip_address *, unsigned long, int);
#endif
|
openwengo/qmail-ldap | token822.c | #include "stralloc.h"
#include "alloc.h"
#include "str.h"
#include "token822.h"
#include "gen_allocdefs.h"
static struct token822 comma = { TOKEN822_COMMA };
void token822_reverse(ta)
token822_alloc *ta;
{
unsigned int i;
unsigned int n;
struct token822 temp;
if (ta->len == 0) return;
n = ta->len - 1;
for (i =... |
openwengo/qmail-ldap | trysgprm.c | <filename>trysgprm.c
#include <signal.h>
void main()
{
sigset_t ss;
sigemptyset(&ss);
sigaddset(&ss,SIGCHLD);
sigprocmask(SIG_SETMASK,&ss,(sigset_t *) 0);
}
|
openwengo/qmail-ldap | byte_diff.c | <reponame>openwengo/qmail-ldap
#include "byte.h"
int byte_diff(s,n,t)
const void *s;
register unsigned int n;
const void *t;
{
register const char *S = (const char *)s;
register const char *T = (const char *)t;
for (;;) {
if (!n) return 0; if (*S != *T) break; ++S; ++T; --n;
if (!n) return 0; if (*S != ... |
openwengo/qmail-ldap | trynpbg1.c | <reponame>openwengo/qmail-ldap
#include "select.h"
#include "open.h"
#include "fifo.h"
#define FN "temp-trynpbg1.fifo"
void main()
{
int flagbug;
struct timeval instant;
fd_set rfds;
flagbug = 0;
if (fifo_make(FN,0600) != -1) {
close(0);
if (open_read(FN) == 0) {
FD_ZERO(&rfds);
FD_SET... |
openwengo/qmail-ldap | headerbody.h | <reponame>openwengo/qmail-ldap<gh_stars>10-100
#ifndef HEADERBODY_H
#define HEADERBODY_H
#include "stralloc.h"
#include "substdio.h"
extern int headerbody(substdio *,
void (*)(stralloc *), void (*)(void), void (*)(stralloc *));
#endif
|
openwengo/qmail-ldap | sig_alarm.c | #include <signal.h>
#include "sig.h"
void sig_alarmblock(void) { sig_block(SIGALRM); }
void sig_alarmunblock(void) { sig_unblock(SIGALRM); }
void sig_alarmcatch(f) void (*f)(); { sig_catch(SIGALRM,f); }
void sig_alarmdefault(void) { sig_catch(SIGALRM,SIG_DFL); }
|
openwengo/qmail-ldap | trymkffo.c | <filename>trymkffo.c
#include <sys/types.h>
#include <sys/stat.h>
void main()
{
mkfifo("temp-trymkffo",0);
}
|
openwengo/qmail-ldap | byte_copy.c | <reponame>openwengo/qmail-ldap
#include "byte.h"
void byte_copy(to,n,from)
void *to;
register unsigned int n;
const void *from;
{
register char *t = (char *)to;
register const char *f = (const char *)from;
for (;;) {
if (!n) return; *t++ = *f++; --n;
if (!n) return; *t++ = *f++; --n;
if (!n) return; ... |
openwengo/qmail-ldap | timeoutconn.c | <gh_stars>10-100
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "ndelay.h"
#include "select.h"
#include "error.h"
#include "readwrite.h"
#include "ip.h"
#include "byte.h"
#include "timeoutconn.h"
int timeoutconn(int s, struct ip_address *ip, struct ip_address *ou... |
openwengo/qmail-ldap | fifo.c | <gh_stars>10-100
#include <sys/types.h>
#include <sys/stat.h>
#include "hasmkffo.h"
#include "fifo.h"
#ifdef HASMKFIFO
int fifo_make(fn,mode) const char *fn; int mode; { return mkfifo(fn,mode); }
#else
int fifo_make(fn,mode) const char *fn; int mode; { return mknod(fn,S_IFIFO | mode,0); }
#endif
|
openwengo/qmail-ldap | maildir2mbox.c | #include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <unistd.h>
#include "readwrite.h"
#include "prioq.h"
#include "env.h"
#include "stralloc.h"
#include "subfd.h"
#include "substdio.h"
#include "getln.h"
#include "error.h"
#include "open.h"
#include "lock.h"
#include "gfrom.h"
#include "str.h"
#inc... |
openwengo/qmail-ldap | qsmhook.c | #include <unistd.h>
#include "fd.h"
#include "stralloc.h"
#include "readwrite.h"
#include "sgetopt.h"
#include "wait.h"
#include "env.h"
#include "byte.h"
#include "str.h"
#include "alloc.h"
#include "exit.h"
#include "fork.h"
#include "case.h"
#include "subfd.h"
#include "error.h"
#include "substdio.h"
#include "sig.h... |
openwengo/qmail-ldap | error_temp.c | <filename>error_temp.c
#include <errno.h>
#include "error.h"
#define X(n) if (e == n) return 1;
int error_temp(e)
int e;
{
X(error_intr)
X(error_nomem)
X(error_txtbsy)
X(error_io)
X(error_timeout)
X(error_wouldblock)
X(error_again)
#ifdef EDEADLK
X(EDEADLK)
#endif
#ifdef EBUSY
X(EBUSY)
#endif
#ifdef... |
openwengo/qmail-ldap | lock_un.c | #include <sys/types.h>
#include <sys/file.h>
#include <fcntl.h>
#include "hasflock.h"
#include "lock.h"
#ifdef HASFLOCK
int lock_un(fd) int fd; { return flock(fd,LOCK_UN); }
#else
int lock_un(fd) int fd; { return lockf(fd,0,0); }
#endif
|
openwengo/qmail-ldap | ndelay.h | #ifndef NDELAY_H
#define NDELAY_H
extern int ndelay_on(int fd);
extern int ndelay_off(int fd);
#endif
|
openwengo/qmail-ldap | ipme.h | #ifndef IPME_H
#define IPME_H
#include "ip.h"
#include "ipalloc.h"
extern ipalloc ipme;
extern int ipme_init(void);
extern int ipme_is(struct ip_address *);
#endif
|
openwengo/qmail-ldap | coe.c | #include <fcntl.h>
#include "coe.h"
int coe(fd)
int fd;
{
return fcntl(fd,F_SETFD,1);
}
|
openwengo/qmail-ldap | open_append.c | #include <sys/types.h>
#include <fcntl.h>
#include "open.h"
int open_append(fn) const char *fn;
{ return open(fn,O_WRONLY | O_NDELAY | O_APPEND | O_CREAT,0600); }
|
openwengo/qmail-ldap | qmail-qmqpd.c | #include <unistd.h>
#include "auto_qmail.h"
#include "byte.h"
#include "qmail.h"
#include "received.h"
#include "sig.h"
#include "subfd.h"
#include "substdio.h"
#include "readwrite.h"
#include "exit.h"
#include "now.h"
#include "fmt.h"
#include "env.h"
#include "str.h"
#ifdef QMQP_COMPRESS
#include <zlib.h>
z_stream s... |
openwengo/qmail-ldap | timeoutread.h | #ifndef TIMEOUTREAD_H
#define TIMEOUTREAD_H
extern int timeoutread(int, int, char *, int);
#endif
|
openwengo/qmail-ldap | gfrom.h | #ifndef GFROM_H
#define GFROM_H
extern int gfrom(char *, int);
#endif
|
openwengo/qmail-ldap | stralloc_pend.c | #include "alloc.h"
#include "stralloc.h"
#include "gen_allocdefs.h"
GEN_ALLOC_append(stralloc,const char,s,len,a,i,n,x,30,stralloc_readyplus,stralloc_append)
|
openwengo/qmail-ldap | exit.h | <reponame>openwengo/qmail-ldap
#ifndef EXIT_H
#define EXIT_H
/* XXX unistd.h */
extern void _exit(int);
#endif
|
openwengo/qmail-ldap | qmail-tcpto.c | /* XXX: this program knows quite a bit about tcpto's internals */
#include <unistd.h>
#include "substdio.h"
#include "subfd.h"
#include "auto_qmail.h"
#include "fmt.h"
#include "ip.h"
#include "lock.h"
#include "error.h"
#include "exit.h"
#include "datetime.h"
#include "now.h"
#include "open.h"
#include "readwrite.h"
... |
openwengo/qmail-ldap | tryvfork.c | <reponame>openwengo/qmail-ldap
void main()
{
vfork();
}
|
openwengo/qmail-ldap | case_starts.c | #include "case.h"
int case_starts(s,t)
register const char *s;
register const char *t;
{
register unsigned char x;
register unsigned char y;
for (;;) {
x = *s++ - 'A';
if (x <= 'Z' - 'A') x += 'a'; else x += 'A';
y = *t++ - 'A';
if (y <= 'Z' - 'A') y += 'a'; else y += 'A';
if (!y) return 1;
... |
openwengo/qmail-ldap | sig_misc.c | <reponame>openwengo/qmail-ldap
#include <signal.h>
#include "sig.h"
void sig_miscignore(void)
{
sig_catch(SIGVTALRM,SIG_IGN);
sig_catch(SIGPROF,SIG_IGN);
sig_catch(SIGQUIT,SIG_IGN);
sig_catch(SIGINT,SIG_IGN);
sig_catch(SIGHUP,SIG_IGN);
#ifdef SIGXCPU
sig_catch(SIGXCPU,SIG_IGN);
#endif
#ifdef SIGXFSZ
sig_... |
openwengo/qmail-ldap | maildirwatch.c | <filename>maildirwatch.c
#include <unistd.h>
#include "getln.h"
#include "substdio.h"
#include "subfd.h"
#include "prioq.h"
#include "stralloc.h"
#include "str.h"
#include "exit.h"
#include "hfield.h"
#include "readwrite.h"
#include "open.h"
#include "headerbody.h"
#include "maildir.h"
#define FATAL "maildirwatch: fat... |
openwengo/qmail-ldap | str_cpy.c | <reponame>openwengo/qmail-ldap
#include "str.h"
unsigned int str_copy(s,t)
register char *s;
register const char *t;
{
register unsigned int len;
len = 0;
for (;;) {
if (!(*s = *t)) return len; ++s; ++t; ++len;
if (!(*s = *t)) return len; ++s; ++t; ++len;
if (!(*s = *t)) return len; ++s; ++t; ++len;... |
openwengo/qmail-ldap | qsutil.c | #include <unistd.h>
#include "stralloc.h"
#include "readwrite.h"
#include "substdio.h"
#include "qsutil.h"
static stralloc foo = {0};
static char errbuf[1];
static struct substdio sserr = SUBSTDIO_FDBUF(subwrite,0,errbuf,1);
void logsa(sa) stralloc *sa; {
substdio_putflush(&sserr,sa->s,sa->len); }
void log1(s1) con... |
openwengo/qmail-ldap | token822.h | #ifndef TOKEN822_H
#define TOKEN822_H
struct token822
{
int type;
const char *s;
unsigned int slen;
}
;
#include "gen_alloc.h"
#include "stralloc.h"
GEN_ALLOC_typedef(token822_alloc,struct token822,t,len,a)
extern int token822_parse(token822_alloc *, stralloc *, stralloc *);
extern int token822_addrlist(tok... |
openwengo/qmail-ldap | ipalloc.h | #ifndef IPALLOC_H
#define IPALLOC_H
#include "ip.h"
struct ip_mx { struct ip_address ip; int pref; } ;
#include "gen_alloc.h"
GEN_ALLOC_typedef(ipalloc,struct ip_mx,ix,len,a)
extern int ipalloc_readyplus(ipalloc *, unsigned int);
extern int ipalloc_append(ipalloc *, struct ip_mx *);
#endif
|
openwengo/qmail-ldap | timeoutread.c | <gh_stars>10-100
#include "timeoutread.h"
#include "select.h"
#include "error.h"
#include "readwrite.h"
int timeoutread(t,fd,buf,len) int t; int fd; char *buf; int len;
{
fd_set rfds;
struct timeval tv;
tv.tv_sec = t;
tv.tv_usec = 0;
FD_ZERO(&rfds);
FD_SET(fd,&rfds);
if (select(fd + 1,&rfds,(fd_set *)... |
openwengo/qmail-ldap | triggerpull.h | <filename>triggerpull.h
#ifndef TRIGGERPULL_H
#define TRIGGERPULL_H
extern void triggerpull(void);
#endif
|
openwengo/qmail-ldap | fmt.h | #ifndef FMT_H
#define FMT_H
#define FMT_ULONG 40 /* enough space to hold 2^128 - 1 in decimal, plus \0 */
#define FMT_LEN ((char *) 0) /* convenient abbreviation */
extern unsigned int fmt_uint(char *, unsigned int);
extern unsigned int fmt_uint0(char *, unsigned int, unsigned int);
/* XXX not available in qmail-1.03... |
openwengo/qmail-ldap | fmt_uint0.c | #include "fmt.h"
unsigned int fmt_uint0(s,u,n) char *s; unsigned int u; unsigned int n;
{
unsigned int len;
len = fmt_uint(FMT_LEN,u);
while (len < n) { if (s) *s++ = '0'; ++len; }
if (s) fmt_uint(s,u);
return len;
}
|
openwengo/qmail-ldap | control.c | <reponame>openwengo/qmail-ldap<filename>control.c
#include <unistd.h>
#include "readwrite.h"
#include "open.h"
#include "getln.h"
#include "stralloc.h"
#include "substdio.h"
#include "error.h"
#include "control.h"
#include "alloc.h"
#include "scan.h"
#include "limit.h"
static char inbuf[64];
static stralloc line = {0}... |
openwengo/qmail-ldap | chkshsgr.c | #include <sys/types.h>
#include <unistd.h>
#include "exit.h"
int main(int argc, char ** argv)
{
short x[4];
x[0] = x[1] = 0;
if (getgroups(1,x) == 0) if (setgroups(1,x) == -1) _exit(1);
return 0;
}
|
openwengo/qmail-ldap | sig_child.c | <reponame>openwengo/qmail-ldap
#include <signal.h>
#include "sig.h"
void sig_childblock(void) { sig_block(SIGCHLD); }
void sig_childunblock(void) { sig_unblock(SIGCHLD); }
void sig_childcatch(f) void (*f)(); { sig_catch(SIGCHLD,f); }
void sig_childdefault(void) { sig_catch(SIGCHLD,SIG_DFL); }
|
openwengo/qmail-ldap | qmail-popup.c | <gh_stars>10-100
#include <unistd.h>
#include "commands.h"
#include "fd.h"
#include "sig.h"
#include "stralloc.h"
#include "substdio.h"
#include "alloc.h"
#include "wait.h"
#include "str.h"
#include "byte.h"
#include "now.h"
#include "fmt.h"
#include "exit.h"
#include "readwrite.h"
#include "timeoutread.h"
#include "ti... |
openwengo/qmail-ldap | qmail-qmtpd.c | <gh_stars>1-10
#include <unistd.h>
#include "stralloc.h"
#include "substdio.h"
#include "qmail.h"
#include "now.h"
#include "str.h"
#include "fmt.h"
#include "env.h"
#include "sig.h"
#include "rcpthosts.h"
#include "auto_qmail.h"
#include "readwrite.h"
#include "control.h"
#include "received.h"
#include "scan.h"
void ... |
openwengo/qmail-ldap | alloc.h | <filename>alloc.h
#ifndef ALLOC_H
#define ALLOC_H
extern /*@null@*//*@out@*/void *alloc(unsigned int);
extern void alloc_free(void *);
extern int alloc_re(char **, unsigned int, unsigned int);
#endif
|
openwengo/qmail-ldap | auto_spawn.h | <filename>auto_spawn.h
#ifndef AUTO_SPAWN_H
#define AUTO_SPAWN_H
extern unsigned int auto_spawn;
#endif
|
openwengo/qmail-ldap | gettimeofday.c | #include <stdio.h>
#include <sys/time.h>
struct timeval sincepoch = {0,0};
struct timezone notimezone = {0,0};
int main()
{
gettimeofday(&sincepoch, ¬imezone);
printf("%d\n", sincepoch.tv_sec);
return 0;
}
|
openwengo/qmail-ldap | subfdins.c | <reponame>openwengo/qmail-ldap<gh_stars>10-100
#include "readwrite.h"
#include "substdio.h"
#include "subfd.h"
int subfd_readsmall(fd,buf,len) int fd; void *buf; int len;
{
if (substdio_flush(subfdoutsmall) == -1) return -1;
return subread(fd,buf,len);
}
char subfd_inbufsmall[256];
static substdio it = SUBSTDIO_F... |
yuchizhong/bubble_game | game/Classes/overScene.h | <gh_stars>0
#ifndef __OVER_SCENE_H__
#define __OVER_SCENE_H__
#include "cocos2d.h"
#include "bubble.h"
#include "game.h"
#include <list>
using namespace std;
class overScene : public cocos2d::Layer {
public:
// there's no 'id' in cpp, so we recommend returning the class instance pointer
static cocos2d::Scene... |
yuchizhong/bubble_game | game/Classes/mainScene.h | #ifndef __MAIN_SCENE_H__
#define __MAIN_SCENE_H__
#include "cocos2d.h"
#include "bubble.h"
#include "game.h"
#include <list>
using namespace std;
#define TIME_RATE 1.0
class mainScene : public cocos2d::Layer {
list<bubble*> bubbles;
cocos2d::LabelTTF *lifeLabel;
cocos2d::LabelTTF *scoreLabel;
c... |
yuchizhong/bubble_game | game/Classes/game.h | <gh_stars>0
//
// bubble.h
// game
//
// Created by <NAME> on 2014-12-02.
//
//
#ifndef __game__game__
#define __game__game__
#define INITED 0
#define INGAME 1
#define GAMEOVER 2
#define PAUSED 3
#define MAXERROR 5
#include <string>
#include "cocos2d.h"
using namespace std;
class game {
publi... |
yuchizhong/bubble_game | game/Classes/bubble.h | <filename>game/Classes/bubble.h
//
// bubble.h
// game
//
// Created by <NAME> on 2014-12-02.
//
//
#ifndef __game__bubble__
#define __game__bubble__
//only 266 pixels radius in 400 file radius
//|edge|---134px---|--------266px--------|center|
#define BUBBLE_RADIUS 266.0
#define BUBBLE_FILE_RADIUS 400.0
//fly to ... |
yuchizhong/bubble_game | game/Classes/startScene.h | #ifndef __START_SCENE_H__
#define __START_SCENE_H__
#include "cocos2d.h"
#include "bubble.h"
#include "game.h"
#include <list>
using namespace std;
class startScene : public cocos2d::Layer {
public:
// there's no 'id' in cpp, so we recommend returning the class instance pointer
static cocos2d::Scene* createS... |
Sodacooky/HDD_Awaker | src/Application.h | #ifndef __APPLICATION_H__
#define __APPLICATION_H__
#include <string>
class Application
{
public:
int Main();
private:
void __Startup();
void __Running();
private:
std::string m_strSelectedPartition;
};
#endif // __APPLICATION_H__ |
Sodacooky/HDD_Awaker | src/StartupWindow.h | #ifndef __STARTUPWINDOW_H__
#define __STARTUPWINDOW_H__
#include <nana/gui.hpp>
#include <nana/gui/widgets/button.hpp>
#include <nana/gui/widgets/listbox.hpp>
#include <string>
//启动窗口,选择分区
//自动加载上次设定的分区勾选上
//构造函数传入保存已勾选分区的字符串
class StartupWindow
{
public:
//build window
StartupWindow(std::string &se... |
Sodacooky/HDD_Awaker | src/RunningWindow.h | #ifndef __RUNNINGWINDOW_H__
#define __RUNNINGWINDOW_H__
#include <chrono>
#include <nana/gui.hpp>
#include <nana/gui/widgets/label.hpp>
#include <stdint.h>
#include <string>
//运行时窗口,显示运行时间和写入的总数据量
//构造函数传入要工作的分区
//实际写入时仍然会检查分区的存在,若不存在则忽略不写(也不报错)
class RunningWindow
{
public:
RunningWindow(const std::... |
hvhbot/DEADCELL-CSGO | csgo/features/backtrack/backtrack.h | #pragma once
#include "../../inc.h"
struct lag_record_t {
lag_record_t( ) : m_bonecount{ 0 }, m_simtime{ 0.f }, m_lby{ 0.f }{ }
lag_record_t( c_csplayer* player ) : m_priority{ 0 } {
std::memcpy( m_matrix, player->bone_cache( ).base( ), player->get_bone_count( ) * sizeof( matrix3x4_t ) );
m_bonecount = player... |
hvhbot/DEADCELL-CSGO | csgo/menu/menu.h | <reponame>hvhbot/DEADCELL-CSGO<filename>csgo/menu/menu.h
#pragma once
#include "../inc.h"
class c_menu {
private:
// x axis pos.
int m_control_x_pos;
// y axis pos.
int m_control_y_pos;
OSHGui::Drawing::Color m_primary_colour;
public:
std::shared_ptr< OSHGui::Form > m_form;
std::shared_ptr< OSHGui::Form > m_da... |
hvhbot/DEADCELL-CSGO | csgo/sdk/csgo/csgo.h | #pragma once
class c_csgo : protected c_interface_mgr {
private:
using command_line_t = i_command_line *( __stdcall * )( );
public:
bool m_interfaces_successful = false;
// modules.
pe::Module m_client_dll;
pe::Module m_engine_dll;
// misc ptrs;
uintptr_t m_d3d9_vmt = 0;
// interfaces.
chl_client *m_clien... |
hvhbot/DEADCELL-CSGO | csgo/features/vars.h | #pragma once
class c_vars {
public:
struct rage {
int key;
bool enabled;
int target_selection;
float pointscale = 60.f;
bool prefer_bodyaim;
bool save_fps;
bool selectively_multipoint_records;
bool bodyaim_lethal;
int hitchance;
int min_dmg;
bool auto_fire;
bool silent;
bool autostop;
int ... |
crea7or/EulerPowersConjecture | EulerCpp/uint128.h | #pragma once
typedef unsigned __int64 uint64;
typedef unsigned __int32 uint32;
#pragma warning(disable : 4244)
// enable multiply via BMI2: https://en.wikipedia.org/wiki/Bit_Manipulation_Instruction_Sets
// https://msdn.microsoft.com/en-us/library/hh977022.aspx
// otherwise regular mul via ASM x64
//#define BMI2MUL
... |
adrian-tech-enthusiast/Bot | src/messenger/messenger.h | /**
* Author : <NAME>.
* Version : 1.0.0
* Copyright : © 2021 <NAME>, All Rights Reserved.
* Title : messenger.h
* Description : Messenger helper functions, sends formatted messages to stdout.
*/
#ifndef MESSENGER_H
#define MESSENGER_H
// Color variables.
#define GREEN "\e[0;32m"
#de... |
adrian-tech-enthusiast/Bot | main.c | #include "src/bot/bot.h"
/**
* Main controller function.
*
* @param int argc
* The number of arguments passed by the user in the command line.
* @param char* argv
* Array of char, the arguments names passed by the user.
*
* @return int
* The constant EXIT_SUCCESS on Successful exit status, otherwise EXI... |
adrian-tech-enthusiast/Bot | src/question/choice_question.c | <reponame>adrian-tech-enthusiast/Bot
/**
* Author : <NAME>.
* Version : 1.0.0
* Copyright : © 2021 <NAME>, All Rights Reserved.
* Title : choice_question.c
* Description : Question helper functions.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "choice_question.h"
#includ... |
adrian-tech-enthusiast/Bot | src/question/choice_question.h | /**
* Author : <NAME>.
* Version : 1.0.0
* Copyright : © 2021 <NAME>, All Rights Reserved.
* Title : choice_question.h
* Description : Question helper functions.
*/
#ifndef CHOICE_QUESTION_H
#define CHOICE_QUESTION_H
/**
* Traversable choice option struct.
*/
struct traversable_choice_option {... |
adrian-tech-enthusiast/Bot | src/tasks/do_fetch_data.c | /**
* Author : <NAME>.
* Version : 1.0.0
* Copyright : © 2021 <NAME>, All Rights Reserved.
* Title : fetch_data.c
* Description : Bot Task - fetch data.
*/
#include "do_fetch_data.h"
#include "../messenger/messenger.h"
/**
* {@inheritdoc}
*/
task_response do_fetch_data() {
success("_> Doin... |
adrian-tech-enthusiast/Bot | src/tasks/do_say_hello.h | <reponame>adrian-tech-enthusiast/Bot<filename>src/tasks/do_say_hello.h
/**
* Author : <NAME>.
* Version : 1.0.0
* Copyright : © 2021 <NAME>, All Rights Reserved.
* Title : do_say_hello.h
* Description : Bot Task - Say hello.
*/
#ifndef BOT_TASK_SAY_HELLO_H
#define BOT_TASK_SAY_HELLO_H
#include "... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.