type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
defines |
#define COPY_TO_S(src,dest,col) (dest->col = (src->col ? pstrdup(src->col) : NULL)) |
defines | #define COPY_TO(src,dest,col) (dest->col = src->col) |
defines |
#define COPY_FIELDS(src,dest) \ |
defines |
#define COPY_NODE(src) \ |
defines |
#define IsType(node, type) (node->typenode == X_##type) |
defines | #define APPEND_NODE(list,nd) \ |
defines |
#define mod(a) (a->modificator) |
defines | #define SF(a) (a ? a : "") |
defines |
#define NEWNODE(type) \ |
functions | else if (isdot && !dot && a)
{
dot = COPY_NODE(nd);
continue;
} |
functions | Datum
plvlex_tokens(PG_FUNCTION_ARGS)
{
FuncCallContext *funcctx;
TupleDesc tupdesc;
AttInMetadata *attinmeta;
tokensFctx *fctx;
if (SRF_IS_FIRSTCALL ())
{
MemoryContext oldcontext;
List *lexems;
text *src = PG_GETARG_TEXT_P(0);
bool skip_spaces = PG_GETARG_BOOL(1);
bool qnames = PG_GETAR... |
functions | int
zip_source_stat(zip_source_t *src, zip_stat_t *st)
{
if (src->source_closed) {
return -1;
} |
functions | int git_buf_text_puts_escaped(
git_buf *buf,
const char *string,
const char *esc_chars,
const char *esc_with)
{
const char *scan;
size_t total = 0, esc_len = strlen(esc_with), count;
if (!string)
return 0;
for (scan = string; *scan; ) {
/* count run of non-escaped characters */
count = strcspn(scan, esc... |
functions | void git_buf_text_unescape(git_buf *buf)
{
buf->size = git__unescape(buf->ptr);
} |
functions | int git_buf_text_crlf_to_lf(git_buf *tgt, const git_buf *src)
{
const char *scan = src->ptr;
const char *scan_end = src->ptr + src->size;
const char *next = memchr(scan, '\r', src->size);
char *out;
assert(tgt != src);
if (!next)
return git_buf_set(tgt, src->ptr, src->size);
/* reduce reallocs while in the ... |
functions | int git_buf_text_lf_to_crlf(git_buf *tgt, const git_buf *src)
{
const char *start = src->ptr;
const char *end = start + src->size;
const char *scan = start;
const char *next = memchr(scan, '\n', src->size);
assert(tgt != src);
if (!next)
return git_buf_set(tgt, src->ptr, src->size);
/* attempt to reduce rea... |
functions | int git_buf_text_common_prefix(git_buf *buf, const git_strarray *strings)
{
size_t i;
const char *str, *pfx;
git_buf_clear(buf);
if (!strings || !strings->count)
return 0;
/* initialize common prefix to first string */
if (git_buf_sets(buf, strings->strings[0]) < 0)
return -1;
/* go through the rest of t... |
functions | bool git_buf_text_is_binary(const git_buf *buf)
{
const char *scan = buf->ptr, *end = buf->ptr + buf->size;
git_bom_t bom;
int printable = 0, nonprintable = 0;
scan += git_buf_text_detect_bom(&bom, buf, 0);
if (bom > GIT_BOM_UTF8)
return 1;
while (scan < end) {
unsigned char c = *scan++;
if (c > 0x1F &&... |
functions | bool git_buf_text_contains_nul(const git_buf *buf)
{
return (memchr(buf->ptr, '\0', buf->size) != NULL);
} |
functions | int git_buf_text_detect_bom(git_bom_t *bom, const git_buf *buf, size_t offset)
{
const char *ptr;
size_t len;
*bom = GIT_BOM_NONE;
/* need at least 2 bytes after offset to look for any BOM */
if (buf->size < offset + 2)
return 0;
ptr = buf->ptr + offset;
len = buf->size - offset;
switch (*ptr++) {
case 0:... |
functions | bool git_buf_text_gather_stats(
git_buf_text_stats *stats, const git_buf *buf, bool skip_bom)
{
const char *scan = buf->ptr, *end = buf->ptr + buf->size;
int skip;
memset(stats, 0, sizeof(*stats));
/* BOM detection */
skip = git_buf_text_detect_bom(&stats->bom, buf, 0);
if (skip_bom)
scan += skip;
/* Ignor... |
functions | void exp_rotation1(celt_norm *X, int len, int stride, opus_val16 c, opus_val16 s)
{
int i;
celt_norm *Xptr;
Xptr = X;
for (i=0;i<len-stride;i++)
{
celt_norm x1, x2;
x1 = Xptr[0];
x2 = Xptr[stride];
Xptr[stride] = EXTRACT16(SHR32(MULT16_16(c,x2) + MULT16_16(s,x1), 15));
*Xptr... |
functions | void exp_rotation(celt_norm *X, int len, int dir, int stride, int K, int spread)
{
static const int SPREAD_FACTOR[3]={15,10,5} |
functions | void normalise_residual(int * OPUS_RESTRICT iy, celt_norm * OPUS_RESTRICT X,
int N, opus_val32 Ryy, opus_val16 gain)
{
int i;
#ifdef OPUS_FIXED_POINT
int k;
#endif
opus_val32 t;
opus_val16 g;
#ifdef OPUS_FIXED_POINT
k = celt_ilog2(Ryy)>>1;
#endif
t = VSHR32(Ryy, 2*(k-7));
g = MULT16_16_P15(c... |
functions | unsigned extract_collapse_mask(int *iy, int N, int B)
{
unsigned collapse_mask;
int N0;
int i;
if (B<=1)
return 1;
/*NOTE: As a minor optimization, we could be passing around log2(B), not B, for both this and for
exp_rotation().*/
N0 = N/B;
collapse_mask = 0;
i=0; do {
int j;
... |
functions | unsigned alg_quant(celt_norm *X, int N, int K, int spread, int B, ec_enc *enc
#ifdef RESYNTH
, opus_val16 gain
#endif
)
{
VARDECL(celt_norm, y);
VARDECL(int, iy);
VARDECL(opus_val16, signx);
int i, j;
opus_val16 s;
int pulsesLeft;
opus_val32 sum;
opus_val32 xy;
opus_val16 yy;
unsigne... |
functions | endif
if (pulsesLeft > N+3)
{
opus_val16 tmp = (opus_val16)pulsesLeft;
yy = MAC16_16(yy, tmp, tmp);
yy = MAC16_16(yy, tmp, y[0]);
iy[0] += pulsesLeft;
pulsesLeft=0;
} |
functions | unsigned alg_unquant(celt_norm *X, int N, int K, int spread, int B,
ec_dec *dec, opus_val16 gain)
{
int i;
opus_val32 Ryy;
unsigned collapse_mask;
VARDECL(int, iy);
SAVE_STACK;
celt_assert2(K>0, "alg_unquant() needs at least one pulse");
celt_assert2(N>1, "alg_unquant() needs at least two di... |
functions | void renormalise_vector(celt_norm *X, int N, opus_val16 gain)
{
int i;
#ifdef OPUS_FIXED_POINT
int k;
#endif
opus_val32 E = EPSILON;
opus_val16 g;
opus_val32 t;
celt_norm *xptr = X;
for (i=0;i<N;i++)
{
E = MAC16_16(E, *xptr, *xptr);
xptr++;
} |
functions | int stereo_itheta(celt_norm *X, celt_norm *Y, int stereo, int N)
{
int i;
int itheta;
opus_val16 mid, side;
opus_val32 Emid, Eside;
Emid = Eside = EPSILON;
if (stereo)
{
for (i=0;i<N;i++)
{
celt_norm m, s;
m = ADD16(SHR16(X[i],1),SHR16(Y[i],1));
s = SUB16(SHR... |
includes |
#include <config.h> |
includes | #include <stdlib.h> |
includes | #include <unistd.h> |
includes | #include <string.h> |
includes | #include <strings.h> |
includes | #include <winsock.h> |
includes | #include <sys/time.h> |
includes |
#include <ctype.h> |
includes | #include <utsname.h> |
includes | #include <sys/utsname.h> |
includes | #include <netinet/in.h> |
includes | #include <dmalloc.h> |
defines |
#define SYS_STRING_LEN 256 |
defines | #define SYSTEM_NAME_LENGTH 8 |
functions | void system_parse_config_sysloc(const char *token,
char *cptr)
{
char tmpbuf[1024];
if (strlen(cptr) < sizeof(sysLocation)) {
strcpy(sysLocation,cptr);
} |
functions | void system_parse_config_sysServices(const char *token, char *cptr)
{
sysServices = atoi(cptr);
sysServicesConfiged = 1;
} |
functions | void system_parse_config_syscon(const char *token,
char *cptr)
{
char tmpbuf[1024];
if (strlen(cptr) < sizeof(sysContact)) {
strcpy(sysContact,cptr);
} |
functions | void init_system_mib(void)
{
#ifdef HAVE_UNAME
struct utsname utsName;
uname(&utsName);
sprintf(version_descr, "%s %s %s %s %s", utsName.sysname, utsName.nodename,
utsName.release, utsName.version, utsName.machine);
#else
#if HAVE_EXECV
struct extensible extmp;
/* set default values of system stu... |
functions | int
header_system(struct variable *vp,
oid *name,
size_t *length,
int exact,
size_t *var_len,
WriteMethod **write_method)
{
oid newname[MAX_OID_LEN];
int result;
DEBUGMSGTL(("mibII/system", "var_system: "));
DEBUGMSGOID(("mibII/system", name, *length));
DEBUGMSG(... |
functions | int
writeSystem(int action,
u_char *var_val,
u_char var_val_type,
size_t var_val_len,
u_char *statP,
oid *name,
size_t name_len)
{
u_char *cp;
char *buf = NULL, *oldbuf = NULL;
int count;
switch((char)name[7]){
case VERSION_DESCR:
buf = version_descr... |
includes |
#include <string.h> |
includes | #include <stdio.h> |
includes | #include <console.h> |
includes | #include <com32.h> |
includes | #include <inttypes.h> |
functions | void wait_key(void)
{
char ch;
while (fread(&ch, 1, 1, stdin) == 0) ;
} |
functions | void print_modes(void)
{
static com32sys_t rm;
struct vesa_general_info *gi;
struct vesa_mode_info *mi;
uint16_t mode, *mode_ptr;
int lines;
/* Allocate space in the bounce buffer for these structures */
gi = &((struct vesa_info *)__com32.cs_bounce)->gi;
mi = &((struct vesa_info *)__com... |
functions | else if (gi->signature != VESA_MAGIC) {
printf("VESA information structure has bad magic, trying anyway...\n");
} |
main | int main(void)
{
openconsole(&dev_rawcon_r, &dev_stdcon_w);
print_modes();
return 0;
} |
includes |
#include <linux/module.h> |
includes | #include <linux/signal.h> |
includes | #include <linux/sched.h> |
includes | #include <linux/mm.h> |
includes | #include <linux/swap.h> |
includes | #include <linux/kernel.h> |
includes | #include <linux/string.h> |
includes | #include <linux/types.h> |
includes | #include <linux/init.h> |
includes | #include <linux/bootmem.h> |
includes | #include <linux/gfp.h> |
includes |
#include <asm/setup.h> |
includes | #include <asm/uaccess.h> |
includes | #include <asm/page.h> |
includes | #include <asm/pgalloc.h> |
includes | #include <asm/traps.h> |
includes | #include <asm/machdep.h> |
includes | #include <asm/io.h> |
includes | #include <asm/atari_stram.h> |
includes | #include <asm/sections.h> |
includes | #include <asm/tlb.h> |
defines | #define VECTORS &vectors[0] |
defines | #define VECTORS _ramvec |
defines | #define UL(x) ((unsigned long) (x)) |
defines | #define MLK(b, t) UL(b), UL(t), (UL(t) - UL(b)) >> 10 |
defines | #define MLM(b, t) UL(b), UL(t), (UL(t) - UL(b)) >> 20 |
defines | #define MLK_ROUNDUP(b, t) b, t, DIV_ROUND_UP(((t) - (b)), 1024) |
functions | __init m68k_setup_node(int node)
{
#ifndef CONFIG_SINGLE_MEMORY_CHUNK
struct mem_info *info = m68k_memory + node;
int i, end;
i = (unsigned long)phys_to_virt(info->addr) >> __virt_to_node_shift();
end = (unsigned long)phys_to_virt(info->addr + info->size - 1) >> __virt_to_node_shift();
for (; i <= end; i++) {
i... |
functions | __init paging_init(void)
{
/*
* Make sure start_mem is page aligned, otherwise bootmem and
* page_alloc get different views of the world.
*/
unsigned long end_mem = memory_end & PAGE_MASK;
unsigned long zones_size[MAX_NR_ZONES] = { 0, } |
functions | void free_initmem(void)
{
#ifndef CONFIG_MMU_SUN3
unsigned long addr;
addr = (unsigned long) __init_begin;
for (; addr < ((unsigned long) __init_end); addr += PAGE_SIZE) {
ClearPageReserved(virt_to_page(addr));
init_page_count(virt_to_page(addr));
free_page(addr);
totalram_pages++;
} |
functions | __init print_memmap(void)
{
pr_notice("Virtual kernel memory layout:\n"
" vector : 0x%08lx - 0x%08lx (%4ld KiB)\n"
" kmap : 0x%08lx - 0x%08lx (%4ld MiB)\n"
" vmalloc : 0x%08lx - 0x%08lx (%4ld MiB)\n"
" lowmem : 0x%08lx - 0x%08lx (%4ld MiB)\n"
" .init : 0x%p" " - 0x%p" " (... |
functions | __init mem_init(void)
{
pg_data_t *pgdat;
int codepages = 0;
int datapages = 0;
int initpages = 0;
int i;
/* this will put all memory onto the freelists */
totalram_pages = num_physpages = 0;
for_each_online_pgdat(pgdat) {
num_physpages += pgdat->node_present_pages;
totalram_pages += free_all_bootmem_node... |
functions | void free_initrd_mem(unsigned long start, unsigned long end)
{
int pages = 0;
for (; start < end; start += PAGE_SIZE) {
ClearPageReserved(virt_to_page(start));
init_page_count(virt_to_page(start));
free_page(start);
totalram_pages++;
pages++;
} |
includes |
#include <config.h> |
functions | else if (pPrt->PhyId1 == PHY_BCOM_ID1_A1) {
/*
* Workaround BCOM Errata for the A1 type.
* Write magic patterns to reserved registers.
*/
i = 0;
while (BcomRegA1Hack[i].PhyReg != 0) {
SkXmPhyWrite(pAC, IoC, Port, BcomRegA1Hack[i].PhyReg,
BcomRegA1Hack[i].PhyVal);
i++;
} |
functions | 0
if (pPrt->PLinkSpeed != SK_LSPEED_AUTO) {
/* Write Ext. PHY Specific Control */
SkGmPhyWrite(pAC, IoC, Port, PHY_MARV_EXT_CTRL,
(SK_U16)((pPrt->PLinkSpeed + 2) << 4));
} |
functions | else if (pPrt->PLinkSpeed == SK_LSPEED_10MBPS) {
/* Write PHY Specific Control */
SkGmPhyWrite(pAC, IoC, Port, PHY_MARV_PHY_CTRL, PHY_M_PC_EN_DET_MSK);
} |
functions | else if (ResAb & PHY_L_1000S_MSR) {
pPrt->PMSStatus = SK_MS_STAT_MASTER;
} |
includes | #include <linux/init.h> |
includes | #include <linux/ioport.h> |
includes | #include <linux/irq.h> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.