functionSource stringlengths 20 97.4k | CWE-119 bool 2
classes | CWE-120 bool 2
classes | CWE-469 bool 2
classes | CWE-476 bool 2
classes | CWE-other bool 2
classes | combine int64 0 1 |
|---|---|---|---|---|---|---|
verify_host_caps(GVirConfigCapabilitiesHost *host_caps)
{
GVirConfigCapabilitiesCpu *cpu_caps;
GVirConfigCapabilitiesCpuTopology *topology;
GList *features, *iter;
const char *str;
g_assert(host_caps != NULL);
str = gvir_config_capabilities_host_get_uuid(host_caps);
g_assert(g_strcmp0(str, ... | false | false | false | false | false | 0 |
dcache_dir_lseek(struct file *file, loff_t offset, int whence)
{
struct dentry *dentry = file->f_path.dentry;
mutex_lock(&d_inode(dentry)->i_mutex);
switch (whence) {
case 1:
offset += file->f_pos;
case 0:
if (offset >= 0)
break;
default:
mutex_unlock(&d_inode(dentry)->i_mutex);
return -EINVAL;... | false | false | false | false | false | 0 |
writeconfig(int fd, char *file)
{
section *Section;
section *ConfigSection;
/*
section *PhoneSection;
*/
if (strcmp(file, "-")) {
ConfigSection = read_file(NULL,file,C_NOT_UNIQUE|C_NO_WARN_FILE);
}
else {
ConfigSection = NULL;
file = "/dev/fd/1"; /* stdout */
... | false | false | false | false | false | 0 |
enchant_trie_get_subtrie(EnchantTrie* trie,
EnchantTrieMatcher* matcher,
char** nxtChS)
{
EnchantTrie* subtrie;
if(trie->subtries == NULL || *nxtChS == NULL)
return NULL;
subtrie = g_hash_table_lookup(trie->subtries,*nxtChS);
if(subtrie == NULL && matcher->mode == case_insensitive) {
... | false | false | false | false | false | 0 |
sdbout_type (tree type)
{
if (type == error_mark_node)
type = integer_type_node;
PUT_SDB_TYPE (plain_type (type));
} | false | false | false | false | false | 0 |
print_scn_pdu(struct isns_hdr *hdr)
{
struct isns_tlv *tlv = (struct isns_tlv *) hdr->pdu;
uint16_t function, length, flags, transaction, sequence;
char *name = NULL;
static char iscsi_name[224];
get_hdr_param(hdr, function, length, flags, transaction, sequence);
while (length) {
uint32_t vlen = ntohl(tlv->le... | false | false | false | false | false | 0 |
getLineTableForUnit(DWARFUnit *U) {
if (!Line)
Line.reset(new DWARFDebugLine(&getLineSection().Relocs));
const auto *UnitDIE = U->getUnitDIE();
if (UnitDIE == nullptr)
return nullptr;
unsigned stmtOffset =
UnitDIE->getAttributeValueAsSectionOffset(U, DW_AT_stmt_list, -1U);
if (stmtOffset == -1U)... | false | false | false | false | false | 0 |
create_large_rect_path (GooDemoLargeRect *rect,
cairo_t *cr,
const GooCanvasBounds *bounds,
gdouble line_width,
gdouble x,
gdouble y,
gdouble width,
gdouble height)
{
GooCanvasItem *item = (GooCanvasItem... | false | false | false | false | false | 0 |
xsh_spectralformat_list_get_lamp( xsh_spectralformat_list * list,
int absorder )
{
int i ;
const char *res = NULL;
XSH_ASSURE_NOT_NULL( list);
for( i = 0 ; i<list->size ; i++ )
if ( list->list[i].absorder == absorder ) {
res = list->list[i].lamp ;
brea... | false | false | false | false | false | 0 |
tear_down_update_document (UpdateDocumentData *data, gconstpointer _test_params)
{
const UpdateDocumentTestParams *test_params = _test_params;
gchar *trace_name;
/* The trace name needs to take the test parameters into account. */
trace_name = g_strdup_printf ("teardown-update-document_%s-%s",
... | false | false | false | false | false | 0 |
EqualSlowCase(const APInt& RHS) const {
// Get some facts about the number of bits used in the two operands.
unsigned n1 = getActiveBits();
unsigned n2 = RHS.getActiveBits();
// If the number of bits isn't the same, they aren't equal
if (n1 != n2)
return false;
// If the number of bits fits in a word,... | false | false | false | false | false | 0 |
display_help_cb(char *topic)
{
GError *error = NULL;
char *uri;
if (topic)
uri = g_strdup_printf ("help:gnomeradio/%s", topic);
else
uri = g_strdup ("help:gnomeradio");
gtk_show_uri (NULL, uri, GDK_CURRENT_TIME, &error);
if (error)
{
GtkWidget *dialog;
dialog = gtk_message_dialog_new (NULL, DIALOG_FL... | false | false | false | false | false | 0 |
setCubeInput(const char * cubeinput)
{
getImpl()->cubeinput_ = pystring::lower(cubeinput);
} | false | false | false | false | false | 0 |
ipAddressPrefixTable_indexes_set(ipAddressPrefixTable_rowreq_ctx *
rowreq_ctx,
long ipAddressPrefixIfIndex_val,
u_long ipAddressPrefixType_val,
u_char *ipAddressPrefixPrefix_val_ptr,
... | false | false | false | false | false | 0 |
LocalNameServers_ips(LocalNameServers *self)
{
if (!self->ips)
{
self->ips = List_new();
LocalNameServers_findIps(self);
}
return self->ips;
} | false | false | false | false | false | 0 |
btrfs_old_root_level(struct btrfs_root *root, u64 time_seq)
{
struct tree_mod_elem *tm;
int level;
struct extent_buffer *eb_root = btrfs_root_node(root);
tm = __tree_mod_log_oldest_root(root->fs_info, eb_root, time_seq);
if (tm && tm->op == MOD_LOG_ROOT_REPLACE) {
level = tm->old_root.level;
} else {
level =... | false | false | false | false | false | 0 |
advanceQ(t)
int t;
{
if (Qhead == -1) {
event_error("Internal error - empty queue");
} else {
Q[Qhead].delay = Q[Qhead].delay - t;
};
} | false | false | false | false | false | 0 |
database_cleanup(void *data)
{
pa_sdbm_t *db = data;
/*
* Can't rely on pa_sdbm_unlock, since it will merely
* decrement the refcnt if several locks are held.
*/
if (db->flags & (SDBM_SHARED_LOCK | SDBM_EXCLUSIVE_LOCK))
(void) pa_file_unlock(db->dirf);
(void) pa_file_close(db->di... | false | false | false | false | false | 0 |
vertical_compose97iL0(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2, int width){
int i;
for(i=0; i<width; i++){
#ifdef liftS
b1[i] += (W_BM*(b0[i] + b2[i])+W_BO)>>W_BS;
#else
b1[i] += (W_BM*(b0[i] + b2[i])+4*b1[i]+W_BO)>>W_BS;
#endif
}
} | false | false | false | false | false | 0 |
type_from_name(dns_rpz_zone_t *rpz, dns_name_t *name) {
if (dns_name_issubdomain(name, &rpz->ip))
return (DNS_RPZ_TYPE_IP);
if (dns_name_issubdomain(name, &rpz->client_ip))
return (DNS_RPZ_TYPE_CLIENT_IP);
#ifdef ENABLE_RPZ_NSIP
if (dns_name_issubdomain(name, &rpz->nsip))
return (DNS_RPZ_TYPE_NSIP);
#endif
... | false | false | false | false | false | 0 |
GdipAddPathRectanglesI (GpPath *path, const GpRect *rects, int count)
{
int i;
if (!path || !rects)
return InvalidParameter;
for (i = 0; i < count; i++) {
float x = (float) rects[i].X;
float y = (float) rects[i].Y;
float width = (float) rects[i].Widt... | false | false | false | false | false | 0 |
snd_seq_prioq_cell_in(struct snd_seq_prioq * f,
struct snd_seq_event_cell * cell)
{
struct snd_seq_event_cell *cur, *prev;
unsigned long flags;
int count;
int prior;
if (snd_BUG_ON(!f || !cell))
return -EINVAL;
/* check flags */
prior = (cell->event.flags & SNDRV_SEQ_PRIORITY_MASK);
spin_lock_irqsave... | false | false | false | false | false | 0 |
prev_sibling(ARTICLE *art)
{
ARTICLE *result = A_PARENT(art);
if (result)
result = A_CHILD1(result);
else
result = art->subject->thread;
while (result && A_SIBLING(result) != art)
result = A_SIBLING(result);
return result;
} | false | false | false | false | false | 0 |
codel_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
{
struct rtattr *tb[TCA_CODEL_MAX + 1];
unsigned limit;
unsigned interval;
unsigned target;
unsigned ecn;
SPRINT_BUF(b1);
if (opt == NULL)
return 0;
parse_rtattr_nested(tb, TCA_CODEL_MAX, opt);
if (tb[TCA_CODEL_LIMIT] &&
RTA_PAYLOAD(... | false | false | false | false | false | 0 |
operator<<(QDebug dbg, const QOrganizerItemFetchHint& hint)
{
dbg.nospace() << "QOrganizerItemFetchHint(";
dbg.nospace() << "detailDefinitionsHint=";
dbg.nospace() << hint.detailDefinitionsHint();
dbg.nospace() << ",";
dbg.nospace() << "optimizationHints=";
dbg.nospace() << static_cast<quint32>(... | false | false | false | false | false | 0 |
FileINetParse(file, port, adrinet)
char *file; /* host/socket pair to parse? */
int port;
struct sockaddr_in *adrinet; /* socket info structure to fill? */
{
struct hostent *hp; /* -> hostent structure for host */
char hostname[MAXHOSTNAMELENGTH + 12]; /* name of host */
... | false | false | false | false | false | 0 |
savecontext()
{
int i;
oldsignal = signal(SIGPIPE, NULL);
i = setjmp(badsock);
if (i != 0) {
signal(SIGPIPE, oldsignal);
DXSetError(ERROR_DATA_INVALID, "connection to remote process closed");
}
return i;
} | false | false | false | false | false | 0 |
s5c73m3_oif_get_pad_code(int pad, int index)
{
if (pad == OIF_SOURCE_PAD) {
if (index > 1)
return -EINVAL;
return (index == 0) ? S5C73M3_ISP_FMT : S5C73M3_JPEG_FMT;
}
if (index > 0)
return -EINVAL;
return (pad == OIF_ISP_PAD) ? S5C73M3_ISP_FMT : S5C73M3_JPEG_FMT;
} | false | false | false | false | false | 0 |
fill_translucent8
(
unsigned char /* val */, // Not used.
int srcw, int srch,
int destx, int desty,
Xform_palette& xform // Transform table.
)
{
int srcx = 0, srcy = 0;
// Constrain to window's space.
if (!clip(srcx, srcy, srcw, srch, destx, desty))
return;
unsigned char *pixels = (unsigned char *) bi... | false | false | false | false | false | 0 |
PEM_SealInit(PEM_ENCODE_SEAL_CTX *ctx, EVP_CIPHER *type, EVP_MD *md_type,
unsigned char **ek, int *ekl, unsigned char *iv, EVP_PKEY **pubk,
int npubk)
{
unsigned char key[EVP_MAX_KEY_LENGTH];
int ret= -1;
int i,j,max=0;
char *s=NULL;
for (i=0; i<npubk; i++)
{
if (pubk[i]->type != EVP_PKEY_RSA)
... | false | false | false | false | false | 0 |
toolset( const string & s )
{
string::size_type pos = target_name_end( s );
if ( pos == string::npos ) pos = s.find( "build/" );
if ( pos == string::npos ) return "";
pos = s.find( "/", pos ) + 1;
return s.substr( pos, s.find( "/", pos ) - pos );
} | false | false | false | false | false | 0 |
ajSysExecLocaleC(const char* cmdlinetxt, const char* localetxt)
{
#ifndef WIN32
pid_t pid;
pid_t retval;
ajint status = 0;
char *pgm;
char **argptr;
ajint i;
AjPStr pname = NULL;
ajDebug("ajSysExecLocaleC '%s' '%s'\n", cmdlinetxt, localetxt);
if(!ajSysArglistBuildC(cmdlinetxt, &pg... | false | false | false | false | true | 1 |
Check_Formals (Object x, int *min, int *max) {
Object s, t1, t2;
*min = *max = 0;
for (t1 = Car (x); !Nullp (t1); t1 = Cdr (t1)) {
s = TYPE(t1) == T_Pair ? Car (t1) : t1;
Check_Type (s, T_Symbol);
for (t2 = Car (x); !EQ(t2, t1); t2 = Cdr (t2))
if (EQ(s, Car (t2)))
... | false | false | false | false | false | 0 |
obj_nsigoutlets(t_object *x)
{
int n;
t_outlet *o;
for (o = x->ob_outlet, n = 0; o; o = o->o_next)
if (o->o_sym == &s_signal) n++;
return (n);
} | false | false | false | false | false | 0 |
HoistPostRA(MachineInstr *MI, unsigned Def) {
MachineBasicBlock *Preheader = getCurPreheader();
// Now move the instructions to the predecessor, inserting it before any
// terminator instructions.
DEBUG(dbgs() << "Hoisting to BB#" << Preheader->getNumber() << " from BB#"
<< MI->getParent()->getN... | false | false | false | false | false | 0 |
isValidAssumeForContext(const Instruction *I,
const Instruction *CxtI,
const DominatorTree *DT) {
return ::isValidAssumeForContext(const_cast<Instruction *>(I),
Query(nullptr, CxtI, DT));
} | false | false | false | false | false | 0 |
gen2_emit_texture(struct intel_batchbuffer *batch,
struct scratch_buf *src,
int unit)
{
uint32_t tiling;
tiling = 0;
if (src->tiling != I915_TILING_NONE)
tiling = TM0S1_TILED_SURFACE;
if (src->tiling == I915_TILING_Y)
tiling |= TM0S1_TILE_WALK;
OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_2 | LO... | false | false | false | false | false | 0 |
rv770_dpm_print_power_state(struct radeon_device *rdev,
struct radeon_ps *rps)
{
struct rv7xx_ps *ps = rv770_get_ps(rps);
struct rv7xx_pl *pl;
r600_dpm_print_class_info(rps->class, rps->class2);
r600_dpm_print_cap_info(rps->caps);
printk("\tuvd vclk: %d dclk: %d\n", rps->vclk, rps->dclk);
if (rdev->famil... | false | false | false | false | false | 0 |
help_callback(GtkWidget *w, gpointer data)
{
struct worklist_data *ptr;
GtkTreeSelection *selection;
GtkTreeModel *model;
GtkTreeIter it;
ptr = data;
selection = ptr->src_selection;
if (gtk_tree_selection_get_selected(selection, &model, &it)) {
gint cid;
struct universal target;
gtk_tree_mo... | false | false | false | false | false | 0 |
SASLprep(u08bits *s)
{
if(s) {
u08bits *strin = s;
u08bits *strout = s;
for(;;) {
u08bits c = *strin;
if(!c) {
*strout=0;
break;
}
switch(c) {
case 0xAD:
++strin;
break;
case 0xA0:
case 0x20:
*strout=0x20;
++strout;
++strin;
break;
case 0x7F:
return -1... | false | false | false | false | false | 0 |
jk_pool_strdup(jk_pool_t *p, const char *s)
{
char *rc = NULL;
if (s && p) {
size_t size = strlen(s);
if (!size) {
return "";
}
size++;
rc = jk_pool_alloc(p, size);
if (rc) {
memcpy(rc, s, size);
}
}
return rc;
} | false | false | false | false | false | 0 |
item_finalized (gpointer user_data,
GObject *gone_item)
{
GalA11yETableItem *a11y;
GalA11yETableItemPrivate *priv;
a11y = GAL_A11Y_E_TABLE_ITEM (user_data);
priv = GET_PRIVATE (a11y);
priv->item = NULL;
atk_state_set_add_state (priv->state_set, ATK_STATE_DEFUNCT);
atk_object_notify_state_chang... | false | false | false | false | false | 0 |
dht_inode_ctx_get (inode_t *inode, xlator_t *this, dht_inode_ctx_t **ctx)
{
int ret = -1;
uint64_t ctx_int = 0;
GF_VALIDATE_OR_GOTO ("dht", this, out);
GF_VALIDATE_OR_GOTO (this->name, inode, out);
ret = inode_ctx_get (inode, this, &ctx_int);
if ... | false | false | false | false | false | 0 |
splineFunc(double x, double *ret, int numDimen, int nknots, double *knot)
{
int nspans = nknots - 4;
if (nspans < 0) // illegal case
return;
// find the correct 4-point span of the spline
x = FLOAT_CLAMP(x) * nspans;
int span = static_cast<int>(x);
x -= span; // get... | false | false | false | false | false | 0 |
HasSourceCode(Heap* heap, SharedFunctionInfo* info) {
Object* undefined = heap->raw_unchecked_undefined_value();
return (info->script() != undefined) &&
(reinterpret_cast<Script*>(info->script())->source() != undefined);
} | false | false | false | false | false | 0 |
FreeImage_ConvertLine4To32MapTransparency(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette, BYTE *table, int transparent_pixels) {
BOOL low_nibble = FALSE;
int x = 0;
for (int cols = 0 ; cols < width_in_pixels ; ++cols) {
if (low_nibble) {
target[FI_RGBA_BLUE] = palette[LOWNIBBLE(source[... | false | false | false | false | false | 0 |
set_goto_map()
{
register shifts *sp;
register int i;
register int symbol;
register int k;
register short *temp_map;
register int state2;
register int state1;
goto_map = NEW2(nvars + 1, short) - ntokens;
temp_map = NEW2(nvars + 1, short) - ntokens;
ngotos = 0;
for (sp = first_shift; sp; sp = sp-... | false | false | false | false | false | 0 |
NetTCP6ReadWrite( pal_socket_t sock, char *bi, sint32_t li, char *bo, sint32_t lo )
{
if ( NetTCP6Write(sock, bi, li) != li)
return -1;
return NetTCP6Read(sock, bo, lo);
} | false | false | false | false | false | 0 |
dodisp(const int sockfd, char *cmd)
{
int ch;
char *expv;
FILE *pip_in, *sock_out;
if (!cmd) /* Relevant variable not defined */
return;
expv = expandvars(cmd);
/* We exit after this, don't worry about freeing "expv" etc */
if (!(pip_in = popen(expv, "r")))
return;
if (!(sock_out = fdopen(sockfd, "w"... | false | false | false | false | false | 0 |
H5HF_dblock_debug_cb(const H5FS_section_info_t *_sect, void *_udata)
{
const H5HF_free_section_t *sect = (const H5HF_free_section_t *)_sect; /* Section to dump info */
H5HF_debug_iter_ud1_t *udata = (H5HF_debug_iter_ud1_t *)_udata; /* User data for callbacks */
haddr_t sect_start, sect_end; ... | false | false | false | false | false | 0 |
functable_func_boxcar (double *fx, double *dfx, double x, void *closure)
{
double width = *(double *) closure;
if (x < width && x > -width) {
*fx = 1;
} else {
*fx = 0;
}
*dfx = 0;
} | false | false | false | false | false | 0 |
show_toolbox_log()
{
int pos;
int i;
pos = g_toolbox_log_pos;
for(i = TOOLBOX_LOG_LEN - 1; i >= 0; i--) {
printf("%2d:%2d: %08x %06x %04x: %08x %08x %08x %08x %08x\n",
i, pos,
g_toolbox_log_array[pos][0],
g_toolbox_log_array[pos][1],
g_toolbox_log_array[pos][2],
g_toolbox_log_array[pos][3],
g... | false | false | false | false | false | 0 |
scheme_for (uint32_t id, ElvinError *error)
{
if (id > 0 && id <= KEY_SCHEME_COUNT)
{
return schemes [id - 1];
} else
{
elvin_error_set (error, ELVIN_ERROR_PROTOCOL,
"Invalid key scheme ID: %u", id);
return NULL;
}
} | false | false | false | false | false | 0 |
chmod_internal(path, mode)
const char *path;
void *mode;
{
if (chmod(path, (int)mode) < 0)
rb_sys_fail(path);
} | false | false | false | false | false | 0 |
check_session_authorization(char **newval, void **extra, GucSource source)
{
HeapTuple roleTup;
Oid roleid;
bool is_superuser;
role_auth_extra *myextra;
/* Do nothing for the boot_val default of NULL */
if (*newval == NULL)
return true;
if (!IsTransactionState())
{
/*
* Can't do catalog lookups, so ... | false | false | false | false | false | 0 |
G_info_format(void)
{
static int grass_info_format = -1;
char *fstr;
if (grass_info_format < 0) {
fstr = getenv("GRASS_MESSAGE_FORMAT");
if (fstr && G_strcasecmp(fstr, "gui") == 0)
grass_info_format = G_INFO_FORMAT_GUI;
else if (fstr && G_strcasecmp(fstr, "silent") == 0)
grass_info_format = G... | false | false | false | false | true | 1 |
isl_set_is_bounded(__isl_keep isl_set *set)
{
int i;
if (!set)
return -1;
for (i = 0; i < set->n; ++i) {
int bounded = isl_basic_set_is_bounded(set->p[i]);
if (!bounded || bounded < 0)
return bounded;
}
return 1;
} | false | false | false | false | true | 1 |
init_uinput(struct avctp *session)
{
struct audio_device *dev;
char address[18], name[248 + 1];
dev = manager_get_device(&session->server->src, &session->dst, FALSE);
device_get_name(dev->btd_dev, name, sizeof(name));
if (g_str_equal(name, "Nokia CK-20W")) {
session->key_quirks[FORWARD_OP] |= QUIRK_NO_RELEASE;... | false | false | false | false | false | 0 |
carl9170_restart_work(struct work_struct *work)
{
struct ar9170 *ar = container_of(work, struct ar9170,
restart_work);
int err = -EIO;
ar->usedkeys = 0;
ar->filter_state = 0;
carl9170_cancel_worker(ar);
mutex_lock(&ar->mutex);
if (!ar->force_usb_reset) {
err = carl9170_usb_restart(ar);
if (net_rateli... | false | false | false | false | false | 0 |
gdl_dock_param_import_placement (const GValue *src,
GValue *dst)
{
if (!strcmp (src->data [0].v_pointer, "top"))
dst->data [0].v_int = GDL_DOCK_TOP;
else if (!strcmp (src->data [0].v_pointer, "bottom"))
dst->data [0].v_int = GDL_DOCK_BOTTOM;
else if (!s... | false | false | false | false | false | 0 |
inet_set_tos(int fd, struct sockaddr_storage from, int tos)
{
#ifdef IP_TOS
if (from.ss_family == AF_INET)
setsockopt(fd, IPPROTO_IP, IP_TOS, &tos, sizeof(tos));
#endif
#ifdef IPV6_TCLASS
if (from.ss_family == AF_INET6) {
if (IN6_IS_ADDR_V4MAPPED(&((struct sockaddr_in6 *)&from)->sin6_addr))
/* v4-mapped addres... | false | false | false | false | false | 0 |
zifelse(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
check_proc(*op);
check_proc(op[-1]);
check_type(op[-2], t_boolean);
check_estack(1);
++esp;
if (op[-2].value.boolval) {
ref_assign(esp, op - 1);
} else {
ref_assign(esp, op);
}
esfile_check_cache();
pop(3);
ret... | false | false | false | false | false | 0 |
allocrest(void)
{
long i;
extras = (steptr)Malloc(chars*sizeof(long));
weight = (steptr)Malloc(chars*sizeof(long));
threshwt = (double *)Malloc(chars*sizeof(double));
if (usertree) {
fsteps = (double **)Malloc(maxuser*sizeof(double *));
for (i = 1; i <= maxuser; i++)
fsteps[i - 1] = (double *)M... | false | false | false | false | false | 0 |
checkDefinition(ast_node* defNode) {
if (defNode->get_nodetype() != AST_EXPR_BUILTIN) return INVALID;
ast_expr_builtin* rhsBuiltIn = (ast_expr_builtin*) defNode;
if (rhsBuiltIn->get_driver()->getSymInfo() != mapEntry) return INVALID;
gm_method_id_t methodId = (gm_method_id_t) rhsBuiltI... | false | false | false | false | false | 0 |
driver_release(struct kobject *kobj)
{
struct driver_private *drv_priv = to_driver(kobj);
pr_debug("driver: '%s': %s\n", kobject_name(kobj), __func__);
kfree(drv_priv);
} | false | false | false | false | false | 0 |
zxatasp_to_snapshot( libspectrum_snap *snap )
{
size_t i;
libspectrum_byte *buffer;
if( !settings_current.zxatasp_active ) return;
libspectrum_snap_set_zxatasp_active( snap, 1 );
libspectrum_snap_set_zxatasp_upload( snap, settings_current.zxatasp_upload );
libspectrum_snap_set_zxatasp_writeprotect( snap,
... | false | true | false | false | false | 1 |
encodeURL(std::string &str, const std::string& reserved_chars)
{
std::string temp;
static const char *digits = "0123456789ABCDEF";
const char* valid (reserved_chars.c_str());
#ifdef HTCHECK_DEBUG
std::cout << "Decoding URL: " << str << " - using : " << reserved_chars << std::endl;
#endif
for (st... | false | false | false | false | false | 0 |
branch2tree(Module_table *m, SemBranch *b)
{
SemTree *t = NULL; /* for warning */
switch (b->kind) {
case NODE:
t = node2tree(m, b->data.node);
break;
case LEAF:
t = leaf2tree(m, b->data.leaf);
break;
case EMPTY:
t = NULL;
break;
}
#if 1
Dest... | false | false | false | false | false | 0 |
fscache_lookup_failure(struct fscache_object *object,
int event)
{
struct fscache_cookie *cookie;
_enter("{OBJ%x},%d", object->debug_id, event);
object->oob_event_mask = 0;
fscache_stat(&fscache_n_cop_lookup_complete);
object->cache->ops->lookup_complete(object);
fscache_stat_d(&fscache_n_cop_lookup_c... | false | false | false | false | false | 0 |
av_arch_new_node(struct archive *arch, struct entry *ent,
int isdir)
{
struct archnode *nod;
nod = (struct archnode *) av_namespace_get(ent);
if(nod != NULL) {
av_unref_obj(nod);
av_unref_obj(ent);
}
AV_NEW_OBJ(nod, archnode_destroy);
av_defau... | false | false | false | false | false | 0 |
Nlights_cmd(Nv_data * data, Tcl_Interp * interp, /* Current interpreter. */
int argc, /* Number of arguments. */
char **argv /* Argument strings. */
)
{
if (argc == 2)
if (!strcmp(argv[1], "off")) {
GS_lights_off();
return (TCL_OK);
}
GS_lights_on();
return (TCL_OK);
} | false | false | false | false | false | 0 |
clear(void) {
fResults.removeAllElements();
for (int32_t i = 0; i < (int32_t)(sizeof(fMatchLen)/sizeof(fMatchLen[0])); i++) {
fMatchLen[i] = 0;
}
} | false | false | false | false | false | 0 |
vol_cdev_release(struct inode *inode, struct file *file)
{
struct ubi_volume_desc *desc = file->private_data;
struct ubi_volume *vol = desc->vol;
dbg_gen("release device %d, volume %d, mode %d",
vol->ubi->ubi_num, vol->vol_id, desc->mode);
if (vol->updating) {
ubi_warn(vol->ubi, "update of volume %d not finis... | false | false | false | false | false | 0 |
src_disable(struct src_mgr *mgr, struct src *src)
{
struct hw *hw = mgr->mgr.hw;
int i;
src->rsc.ops->master(&src->rsc);
for (i = 0; i < src->rsc.msr; i++) {
hw->src_mgr_dsb_src(mgr->mgr.ctrl_blk,
src->rsc.ops->index(&src->rsc));
src->rsc.ops->next_conj(&src->rsc);
}
src->rsc.ops->master(&src->rsc);
... | false | false | false | false | false | 0 |
photobucket_service_get_albums (PhotobucketService *self,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
{
OAuthAccount *account;
GHashTable *data_set;
char *url;
SoupMessage *msg;
account = web_service_get_current_acco... | false | false | false | false | false | 0 |
ext4_insert_dentry(struct inode *dir,
struct inode *inode,
struct ext4_dir_entry_2 *de,
int buf_size,
struct ext4_filename *fname)
{
int nlen, rlen;
nlen = EXT4_DIR_REC_LEN(de->name_len);
rlen = ext4_rec_len_from_disk(de->rec_len, buf_size);
if (de->inode) {
struct ext4_dir_e... | false | false | false | false | false | 0 |
sm750le_i2c_init(unsigned char clk_gpio,
unsigned char data_gpio)
{
int i;
/* Initialize the GPIO pin for the i2c Clock Register */
sw_i2c_clk_gpio_data_reg = GPIO_DATA_SM750LE;
sw_i2c_clk_gpio_data_dir_reg = GPIO_DATA_DIRECTION_SM750LE;
/* Initialize the Clock GPIO Offset */
sw_i2c_clk_gpio = clk_gpio;... | false | false | false | false | false | 0 |
ide_do_start_stop(ide_drive_t *drive, struct gendisk *disk, int start)
{
struct ide_atapi_pc pc;
ide_init_pc(&pc);
pc.c[0] = START_STOP;
pc.c[4] = start;
if (drive->media == ide_tape)
pc.flags |= PC_FLAG_WAIT_FOR_DSC;
return ide_queue_pc_tail(drive, disk, &pc, NULL, 0);
} | false | false | false | false | false | 0 |
Draw( void ) {
if ( mview->Enabled() ) mview->Draw();
else Window::DrawBack();
} | false | false | false | false | false | 0 |
DetermineNextDayStop()
{
struct tm* lctime;
time_t current_time = time(0);
lctime = gmtime(¤t_time);
int gm_hour = lctime->tm_hour;
time_t gm_time = mktime(lctime);
lctime = localtime(¤t_time);
int local_hour = lctime->tm_hour;
int tzone_offset = local_hour - gm_hour;
if(gm_time > current... | false | false | false | false | false | 0 |
unload_project (GbfProjectModel *model)
{
if (model->priv->proj) {
gtk_tree_row_reference_free (model->priv->root);
model->priv->root = NULL;
gbf_project_model_clear (model);
g_list_free (model->priv->shortcuts);
model->priv->shortcuts = NULL;
//g_signal_handler_disconnect (anjuta_pm_project_get_project... | false | false | false | false | false | 0 |
ComputeWorldCoordinate(
int x, int y, double* coord)
{
if (!this->CurrentRenderer)
{
return 0;
}
this->CurrentRenderer->SetWorldPoint(
this->InitialBounds[0], this->InitialBounds[2], this->InitialBounds[4], 1.0);
this->CurrentRenderer->WorldToDisplay();
double *dispPoint = this->CurrentRender... | false | false | false | false | false | 0 |
free_focus_styles (MetaFrameStyle *focus_styles[META_FRAME_FOCUS_LAST])
{
int i;
for (i = 0; i < META_FRAME_FOCUS_LAST; i++)
if (focus_styles[i])
meta_frame_style_unref (focus_styles[i]);
} | false | false | false | false | false | 0 |
ECPGprepare(int lineno, const char *connection_name, const bool questionmarks, const char *name, const char *variable)
{
struct connection *con;
struct statement *stmt;
struct prepared_statement *this,
*prev;
PGresult *query;
con = ecpg_get_connection(connection_name);
if (!ecpg_init(con, connection_nam... | false | false | false | false | false | 0 |
create_hex_view(HexDocument *doc)
{
GtkWidget *gh = hex_document_add_view(doc);
gtk_hex_set_group_type(GTK_HEX(gh), def_group_type);
if (def_metrics && def_font_desc) {
gtk_hex_set_font(GTK_HEX(gh), def_metrics, def_font_desc);
}
gtk_hex_set_insert_mode(GTK_HEX(gh), TRUE);
gtk_hex_set_geometry(GTK_HEX(gh), ... | false | false | false | false | false | 0 |
rev_list_view_cell_data_emblem_func (GtkCellLayout *layout,
GtkCellRenderer *cell,
GtkTreeModel *model,
GtkTreeIter *iter,
gpointer data)
{
GiggleRevListViewPriv *priv;
GiggleRevListView *list;
GiggleRevision *revision;
GdkPixbuf ... | false | false | false | false | false | 0 |
flat_read_chunk(struct inbuf *inb, void *p, int len)
{
if ((inb->ptr + len) > inb->limit)
die("Premature end of data parsing flat device tree\n");
memcpy(p, inb->ptr, len);
inb->ptr += len;
} | false | false | false | false | false | 0 |
tgaPixelWrite(FILE *fio, RgbaImageT *imgP, int col, int row, int npixels, int mpsize, int mapped)
{
register int pcount;
switch(mpsize) {
case 8:
if(mapped) {
fprintf(stderr, "tgaPixelWrite: I only do non-mapped 8\n");
return EOF ;
}
{
for(pcount=col; pcount < col+npix... | false | false | false | false | false | 0 |
print_funcdef (definition *def)
{
switch (def->def_kind)
{
case DEF_PROGRAM:
f_print (fout, "\n");
pprogramdef (def);
break;
default:
break;
/* ?... shouldn't happen I guess */
}
} | false | false | false | false | false | 0 |
rest_of_handle_postreload (void)
{
if (!dbg_cnt (postreload_cse))
return 0;
/* Do a very simple CSE pass over just the hard registers. */
reload_cse_regs (get_insns ());
/* Reload_cse_regs can eliminate potentially-trapping MEMs.
Remove any EH edges associated with them. */
if (cfun->can_throw_non... | false | false | false | false | false | 0 |
ListRep(struct WordList *wl, const char From, const char To)
{
unsigned long i;
FORWL(i, *wl) strrep(wl->Stack.Data[i], From, To);
ReHash(wl);
} | false | false | false | false | false | 0 |
do_prepare_row(THD *thd_arg,
Relay_log_info const *rli,
TABLE *table,
uchar const *row_start,
uchar const **row_end)
{
int error;
DB... | false | false | false | false | false | 0 |
add_to_DIIS_list()
{
FockMatrix_alpha.readFromFile();
FockMatrix_beta.readFromFile();
if(((DIISManagerUnrestricted*)DIIS)->AddIterationToList(FockMatrix_alpha,
FockMatrix_beta,
ErrorMatrix_alpha,
ErrorMatrix_beta) != 0)
{
do_output(LOG_CAT_ERROR, LOG_AREA_SCF, "error in DIIS ... | false | false | false | false | false | 0 |
Process(float *Inp, int InpLen, float *Out)
{ int i,batch;
for( i=0; i<InpLen; )
{ for(batch=imin(InpLen-i,Len-TapPtr), i+=batch; batch; batch--)
{ Sum-=Tap[TapPtr]; Out[i]=(Sum+=Tap[TapPtr++]=Inp[i]); }
if(TapPtr>=Len) TapPtr=0; }
for(Sum=0, i=0; i<Len; i++) Sum+=Tap[i]; return InpLen;
} | false | false | false | false | false | 0 |
gnm_named_expr_collection_free (GnmNamedExprCollection *names)
{
if (names != NULL && names->ref_count-- < 2) {
g_hash_table_destroy (names->names);
g_hash_table_destroy (names->placeholders);
g_free (names);
}
} | false | false | false | false | false | 0 |
rebuild_object_properties(zend_object *zobj) /* {{{ */
{
if (!zobj->properties) {
HashPosition pos;
zend_property_info *prop_info;
zend_class_entry *ce = zobj->ce;
ALLOC_HASHTABLE(zobj->properties);
zend_hash_init(zobj->properties, 0, NULL, ZVAL_PTR_DTOR, 0);
if (ce->default_properties_count) {
for (ze... | false | false | false | false | false | 0 |
can_redo (GtkSourceBuffer * doc, GParamSpec * spec, GtrWindow * window)
{
GtkAction *action;
gboolean sensitive;
GtrView *view;
GtkSourceBuffer *buf;
view = gtr_window_get_active_view (window);
buf = GTK_SOURCE_BUFFER (gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)));
sensitive = gtk_source_buffer_can_r... | false | false | false | false | false | 0 |
do_redirections (list, flags)
REDIRECT *list;
int flags;
{
int error;
REDIRECT *temp;
if (flags & RX_UNDOABLE)
{
if (redirection_undo_list)
{
dispose_redirects (redirection_undo_list);
redirection_undo_list = (REDIRECT *)NULL;
}
if (exec_redirection_undo_list)
dispose_exec_redi... | false | false | false | false | false | 0 |
gt_bioseq_show_sequence_as_fasta(GtBioseq *bs, unsigned long seqnum,
unsigned long width, GtFile *outfp)
{
char *seq = NULL;
gt_assert(bs);
gt_assert(seqnum < gt_bioseq_number_of_sequences(bs));
seq = gt_bioseq_get_sequence(bs, seqnum);
gt_fasta_show_entry(gt_bioseq_get_... | false | false | false | false | false | 0 |
df_simulate_find_uses (rtx insn, bitmap uses)
{
df_ref *rec;
unsigned int uid = INSN_UID (insn);
for (rec = DF_INSN_UID_DEFS (uid); *rec; rec++)
{
df_ref def = *rec;
if (DF_REF_FLAGS (def) & (DF_REF_PARTIAL | DF_REF_CONDITIONAL))
bitmap_set_bit (uses, DF_REF_REGNO (def));
}
for (rec = DF_I... | false | false | false | false | false | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.