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 |
|---|---|---|---|---|---|---|
ConcreteConfigure(const ProcessingConfig& c)
{
//Ugly, ugly. Don't try this at home.
Control2DataConfig &tmp=const_cast<Control2DataConfig&>(dynamic_cast<const Control2DataConfig&>(c));
//We harcode this value as the concrete MIDI2Melody now will only work on 4 controls
tmp.SetNumControls(4);
Control2Data::Concret... | false | false | false | false | false | 0 |
print_layout()
{
int i, w, o;
fprintf(stderr, "print-layout-begin\n");
for (w = 0; w < 8; ++w) {
fprintf( stderr, "Play%d: ", w );
for (i = 0; i < Wlen[w]; ++i) {
printcard(W[w][i], stderr);
}
fputc('\n', stderr);
}
fprintf( stderr, "Off: " );
for (o ... | false | false | false | false | false | 0 |
test_paint (TestState *state)
{
CoglPipeline *pipeline;
CoglTexture *tex;
uint8_t tex_data[6];
int i;
/* Create a two pixel texture. The first pixel is white and the
second pixel is tex_color. The assumption is that if no texture
coordinates are specified then it will default to 0,0 and get
wh... | false | false | false | false | false | 0 |
watchdog_ioctl_op(struct watchdog_device *wdd, unsigned int cmd,
unsigned long arg)
{
int err;
if (!wdd->ops->ioctl)
return -ENOIOCTLCMD;
mutex_lock(&wdd->lock);
if (test_bit(WDOG_UNREGISTERED, &wdd->status)) {
err = -ENODEV;
goto out_ioctl;
}
err = wdd->ops->ioctl(wdd, cmd, arg);
out_ioctl:
mu... | false | false | false | false | false | 0 |
appendString (String *sp, const char *str)
{
int strl = strlen (str);
int l = sp->sl + strl + 1; /* need room for '\0' */
if (l > sp->sm) {
if (!sp->s)
newString (sp);
if (l > sp->sm)
sp->s = (char *) moremem (sp->s, (sp->sm = l));
}
strcpy (&sp->s[sp->sl], str);
sp->sl += strl;
} | false | false | false | false | false | 0 |
dogen() {
poller->reset_countdown() ;
#ifdef STATS
ds = 0 ; dq = 0 ; rcc = 0 ;
#endif
// AKT: if grid is bounded then we should never need to call uproot() here
// because setrule() has already expanded the universe to enclose the grid
if (gridwd == 0 || gridht == 0) {
while (uproot_needed())
... | false | false | false | false | false | 0 |
artmagic_from_shiftreg(offs_t address, data16_t *data)
{
UINT16 *vram = address_to_vram(&address);
if (vram)
memcpy(&vram[address], data, TOBYTE(0x2000));
} | false | true | false | false | false | 1 |
execv(const char *filename, char *const argv [])
{
int e;
int apt = 0;
funcptr __execv;
auto_apt_setup();
again:
DPRINT(("execv: filename=%s \n", filename));
if (!apt && detectdb_file) { detect_package(filename, __FUNCTION__); }
__execv = load_library_symbol("execv");
if (__execv ==... | false | false | false | false | true | 1 |
FromFile(std::string filename) /*{{{*/
{
// pick the strongest hash
if (Type == "")
Type = _SupportedHashes[0];
Hash = GetHashForFile(filename);
return true;
} | false | false | false | false | false | 0 |
close()
{
int err = 0;
if (this_dir == NULL)
err = ENOTCONN;
else if (closedir(this_dir) != 0)
err = errno;
else {
this_path.clear();
this_dir = NULL;
return err;
}
err = ff_log(FC_ERROR, err, "failed to close directory `%s'", this_path.c_str());
retur... | false | false | false | false | false | 0 |
process_state_longest_path_length (state)
state_t state;
{
int value;
value = longest_path_length (state);
if (value > max_dfa_issue_rate)
max_dfa_issue_rate = value;
} | false | false | false | false | false | 0 |
psb_gtt_insert(struct drm_device *dev, struct gtt_range *r,
int resume)
{
u32 __iomem *gtt_slot;
u32 pte;
struct page **pages;
int i;
if (r->pages == NULL) {
WARN_ON(1);
return -EINVAL;
}
WARN_ON(r->stolen); /* refcount these maybe ? */
gtt_slot = psb_gtt_entry(dev, r);
pages = r->pages;
if (!res... | false | false | false | false | false | 0 |
dump_mlid(char *str, int strlen, unsigned mlid, unsigned nports,
uint16_t mft[16][IB_MLIDS_IN_BLOCK])
{
uint16_t mask;
unsigned i, chunk, bit, nonzero = 0;
if (brief) {
int n = 0;
unsigned chunks = ALIGN(nports + 1, 16) / 16;
for (i = 0; i < chunks; i++) {
mask = ntohs(mft[i][mlid % IB_MLIDS_IN_BLOC... | false | false | false | false | false | 0 |
check_macro (const char *line, sb *expand,
const char **error, macro_entry **info)
{
const char *s;
char *copy, *cls;
macro_entry *macro;
sb line_sb;
if (! is_name_beginner (*line)
&& (! macro_mri || *line != '.'))
return 0;
s = line + 1;
while (is_part_of_name (*s))
++s;
if (is_na... | false | false | false | false | false | 0 |
MD5_hmac(const u_char * data, size_t len, u_char * mac, size_t maclen,
const u_char * secret, size_t secretlen)
{
#define MD5_HASHKEYLEN 64
#define MD5_SECRETKEYLEN 16
MD5_CTX cmd5;
u_char K1[MD5_HASHKEYLEN];
u_char K2[MD5_HASHKEYLEN];
u_char extendedAuthKey[... | false | true | false | false | false | 1 |
start_async(struct async *async)
{
int pipe_out[2];
if (pipe(pipe_out) < 0)
return error("cannot create pipe: %s", strerror(errno));
async->out = pipe_out[0];
#ifndef __MINGW32__
/* Flush stdio before fork() to avoid cloning buffers */
fflush(NULL);
async->pid = fork();
if (async->pid < 0) {
error("fork (... | false | false | false | false | false | 0 |
open()
{
if ((fd = ::open(_filename, O_RDONLY)) < 0) {
fprintf(stderr, "open failed.\n");
return false;
}
if (!init_inflation())
return false;
return true;
} | false | false | false | false | false | 0 |
mode_set(IRC_SERVER_REC *server, GString *str,
char type, char mode, int user)
{
g_return_if_fail(str != NULL);
if (type == '-')
mode_remove(server, str, mode, user);
else
mode_add_sorted(server, str, mode, NULL, user);
} | false | false | false | false | false | 0 |
getarg(struct getargs *args, size_t num_args,
int argc, char **argv, int *goptind)
{
int i;
int ret = 0;
rk_random_init();
(*goptind)++;
for(i = *goptind; i < argc; i++) {
if(argv[i][0] != '-')
break;
if(argv[i][1] == '-'){
if(argv[i][2] == 0){
i++;
break;
}
ret = a... | false | false | false | false | false | 0 |
msacluster_clinkage(const void *v1, const void *v2, const void *p, int *ret_link)
{
char *as1 = *(char **) v1;
char *as2 = *(char **) v2;
double maxid = *(double *) p;
double pid;
int status = eslOK;
#if defined(eslMSACLUSTER_REGRESSION) || defined(eslMSAWEIGHT_REGRESSION)
pid = 1. - squid_distanc... | false | false | false | false | false | 0 |
check_hidden(const gchar *filename)
{
gsize len;
const gchar *base_name = NULL;
base_name = g_path_get_basename(filename);
if (! NZV(base_name))
return FALSE;
if (CONFIG_SHOW_HIDDEN_FILES)
return FALSE;
#ifdef G_OS_WIN32
if (win32_check_hidden(filename))
return TRUE;
#else
if (base_name[0] == '.')
ret... | false | false | false | false | false | 0 |
hb_shape_plan_destroy (hb_shape_plan_t *shape_plan)
{
if (!hb_object_destroy (shape_plan)) return;
#define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_DESTROY(shaper, shape_plan);
#include "hb-shaper-list.hh"
#undef HB_SHAPER_IMPLEMENT
free (shape_plan->user_features);
free (shape_plan);
} | false | false | false | false | false | 0 |
listGenres() {
if (source) {
FXIcon * icon = NULL;
if (GMPlayerManager::instance()->getPreferences().gui_show_browser_icons)
icon = GMIconTheme::instance()->icon_genre;
if (!source->listGenres(genrelist,icon))
return false;
genrelist->sortItems();
if (genrelist->getNumItems()>1)
... | false | false | false | false | false | 0 |
UnrollXYZFloatTo16(register _cmsTRANSFORM* info,
register cmsUInt16Number wIn[],
register cmsUInt8Number* accum,
register cmsUInt32Number Stride)
{
if (T_PLANAR(info -> InputFormat)) {
cmsFloat32Number*... | false | false | false | false | false | 0 |
scavenge_large_srt_bitmap( StgLargeSRT *large_srt )
{
nat i, b, size;
StgWord bitmap;
StgClosure **p;
b = 0;
bitmap = large_srt->l.bitmap[b];
size = (nat)large_srt->l.size;
p = (StgClosure **)large_srt->srt;
for (i = 0; i < size; ) {
if ((bitmap & 1) != 0) {
evacuate(p)... | false | false | false | false | false | 0 |
ReshuffleWindows(void)
{
ProxyWindow *proxy;
#if PROXY_GROUP_DEBUG
fprintf(stderr, "ReshuffleWindows\n");
#endif
if (are_windows_shown)
{
CloseWindows();
}
for (proxy=firstProxy; proxy != NULL; proxy=proxy->next)
{
RecenterProxy(proxy);
}
AdjustWindows();
SortProxies();
if (are_windows_shown)
{
Open... | false | false | false | false | false | 0 |
ev_io_init(ev_loop_t *loop, int max_ev_num, int etmodel) {
/* set a default minumum num of evnets*/
if (max_ev_num < MINEVENTNUMBER) {
max_ev_num = MINEVENTNUMBER;
}
loop->maxevent = max_ev_num;
loop->etmodel = etmodel;
loop->events = (struct epoll_event *)malloc(max_ev_num * sizeof(struct epo... | false | false | false | false | false | 0 |
socket_data_new(int fd)
{
struct mailstream_socket_data * socket_data;
socket_data = (struct mailstream_socket_data * ) malloc(sizeof(* socket_data));
if (socket_data == NULL)
goto err;
socket_data->fd = fd;
socket_data->cancel = mailstream_cancel_new();
if (socket_data->cancel == NULL)
goto fre... | false | false | false | false | false | 0 |
ReviewQualityFactor( const float qfac, const long int num_bits )
{
if (num_bits>m_total_GOP_bits/2)
{
// The frame is too big, so reset to a smaller quality factor
return ClipQualityFactor(qfac-2);
}
else
{
// Keep the quality factor in a sensible range
return ClipQua... | false | false | false | false | false | 0 |
ForceLogicalRetractions(
void *theEnv)
{
struct dependency *tempPtr;
struct patternEntity *theEntity;
/*===================================================*/
/* Don't reenter this function once it's called. Any */
/* new additions to the list of items to be deleted */
/* as a result of losing th... | false | false | false | false | false | 0 |
get_shortcuts(gint *size)
{
gint i = 0;
if(macros != NULL)
{
while(macros[i].shortcut != NULL)
i++;
}
*size = i;
return macros;
} | false | false | false | false | false | 0 |
__ecereProp_OptionBox_Set_position(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__sys__Point * value)
{
struct OptionBox * __ecerePointer_OptionBox = (struct OptionBox *)(this ? (((char *)this) + __ecereClass_OptionBox->offset) : 0);
__ecereProp___ecereNameSpace__ecere__gui__Wind... | false | false | false | false | false | 0 |
fsdb_cando (Unit *unit)
{
if (unit->volflags & (MYVOLUMEINFO_ARCHIVE | MYVOLUMEINFO_CDFS))
return 1;
if (currprefs.filesys_custom_uaefsdb && (unit->volflags & MYVOLUMEINFO_STREAMS))
return 1;
if (!currprefs.filesys_no_uaefsdb)
return 1;
return 0;
} | false | false | false | false | false | 0 |
w83977af_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{
struct if_irda_req *irq = (struct if_irda_req *) rq;
struct w83977af_ir *self;
unsigned long flags;
int ret = 0;
IRDA_ASSERT(dev != NULL, return -1;);
self = netdev_priv(dev);
IRDA_ASSERT(self != NULL, return -1;);
pr_debug("%s(), %s, (... | false | false | false | false | false | 0 |
evaluate (JoinPointLoc &jpl, PointCutContext &context,
Binding &binding, Condition &cond) {
if (jpl.type () != JoinPointLoc::Construction)
return false;
JPL_Name *scope = ((JPL_Construction&)jpl).lexical_scope ();
return arg (0)->match (*scope, context, binding, cond);
} | false | false | false | false | false | 0 |
on_model_set (GObject *gobject, GParamSpec *arg1,
GeditFileBrowserWidget *obj)
{
GtkTreeModel *model;
model = gtk_tree_view_get_model (GTK_TREE_VIEW (gobject));
clear_signals (obj);
if (GEDIT_IS_FILE_BOOKMARKS_STORE (model))
{
clear_next_locations (obj);
/* Add the current location to the back menu ... | false | false | false | false | false | 0 |
GL_BlendFunction (GLenum sfactor, GLenum dfactor)
{
if (sfactor!=bFunc1 || dfactor!=bFunc2)
{
bFunc1 = sfactor;
bFunc2 = dfactor;
qglBlendFunc(bFunc1, bFunc2);
}
} | false | false | false | false | false | 0 |
_e_fm2_client_spawn(void)
{
char buf[4096];
if (_e_fm2_client_spawning) return;
snprintf(buf, sizeof(buf), "%s/enlightenment/utils/enlightenment_fm", e_prefix_lib_get());
ecore_exe_run(buf, NULL);
_e_fm2_client_spawning = 1;
} | true | true | false | false | false | 1 |
compareDelinear(Address *to)
{
assert(getObjectID() == to->getObjectID());
uint32 da = delinearize(addr);
uint32 db = delinearize(((AddressFlat32 *)to)->addr);
if (da > db) return 1;
if (da < db) return -1;
return 0;
} | false | false | false | false | false | 0 |
mousePressEvent(QMouseEvent *e)
{
e->accept();
for (int index = 0; index < m_tabs.count(); ++index) {
if (tabRect(index).contains(e->pos())) {
if (isTabEnabled(index)) {
m_currentIndex = index;
update();
m_triggerTimer.start(0);
}
... | false | false | false | false | false | 0 |
signalremove_inner(struct visorchannel *channel, u32 queue, void *msg)
{
struct signal_queue_header sig_hdr;
if (!sig_read_header(channel, queue, &sig_hdr))
return false;
if (sig_hdr.head == sig_hdr.tail)
return false; /* no signals to remove */
sig_hdr.tail = (sig_hdr.tail + 1) % sig_hdr.max_slots;
if (!sig... | false | false | false | false | false | 0 |
ecore_ipc_init(void)
{
int i = 0;
if (++_ecore_ipc_init_count != 1)
return _ecore_ipc_init_count;
_ecore_ipc_log_dom = eina_log_domain_register
("ecore_ipc", ECORE_IPC_DEFAULT_LOG_COLOR);
if(_ecore_ipc_log_dom < 0)
{
EINA_LOG_ERR("Impossible to create a log domain for the Ecore IPC mo... | false | false | false | false | false | 0 |
lwaddr_netaddr_fromlwresaddr(isc_netaddr_t *na, lwres_addr_t *la) {
if (la->family != LWRES_ADDRTYPE_V4 && la->family != LWRES_ADDRTYPE_V6)
return (ISC_R_FAMILYNOSUPPORT);
if (la->family == LWRES_ADDRTYPE_V4) {
struct in_addr ina;
memmove(&ina.s_addr, la->address, 4);
isc_netaddr_fromin(na, &ina);
} else {
... | false | false | false | false | false | 0 |
search_entry_changed_cb (GtkEntry *entry,
GnomeControlCenter *center)
{
GnomeControlCenterPrivate *priv = center->priv;
char *str;
/* if the entry text was set manually (not by the user) */
if (!g_strcmp0 (priv->filter_string, gtk_entry_get_text (entry)))
return;
/* Do... | false | false | false | false | false | 0 |
sis_ata133_program_timings(ide_drive_t *drive, const u8 mode)
{
struct pci_dev *dev = to_pci_dev(drive->hwif->dev);
u32 t1 = 0;
u8 drive_pci = sis_ata133_get_base(drive), clk, idx;
pci_read_config_dword(dev, drive_pci, &t1);
t1 &= 0xc0c00fff;
clk = (t1 & 0x08) ? ATA_133 : ATA_100;
if (mode >= XFER_MW_DMA_0) {
... | false | false | false | false | false | 0 |
ApplyRotationN(Matrix m, int n, VECTOR_TYPE *in, VECTOR_TYPE *out)
{
int i, j;
for (i = 0; i < n; i++)
{
out[i] = 0.0;
for (j = 0; j < n; j++)
out[i] += in[j] * m.A[j][i];
}
return;
} | false | false | false | false | false | 0 |
spop(void)
{
static char dummy[] = ""; /* avoid const-cast */
char *result = dummy;
if (stack_ptr > 0) {
stack_ptr--;
if (!stack[stack_ptr].num_type && stack[stack_ptr].data.str != 0)
result = stack[stack_ptr].data.str;
}
return result;
} | false | false | false | false | false | 0 |
tenm_point_nearer(double a_x, double a_y, double b_x, double b_y, double n)
{
/* distance^2 = temp = temp1 + temp2 */
double temp = 0;
double temp1 = 0;
double temp2 = 0;
/* distance can't be negative*/
if (n < -NEAR_ZERO)
{
fprintf(stderr, "tenm_point_nearer: n is negative (%f)\n", n);
return 0;... | false | false | false | false | false | 0 |
Fd_Element_V_To_I(Range *i, Range *v, WamWord *l)
{
int val;
int n;
int j;
/* when V changes -> update I */
Vector_Allocate(i->vec);
Vector_Empty(i->vec);
n = *l;
for (j = 1; j <= n; j++)
{
val = l[j]; /* val=Lj */
if (Range_Test_Value(v, val))
Vector_Set_Value(i->vec, j);
}
... | false | false | false | false | false | 0 |
lookup_cache_add(const char *context,
netsnmp_subtree *next, netsnmp_subtree *previous) {
lookup_cache_context *cptr;
if ((cptr = get_context_lookup_cache(context)) == NULL)
return;
if (cptr->thecachecount < lookup_cache_size)
cptr->thecachecount++;
cptr->cache[cptr->... | false | false | false | false | false | 0 |
SplitVecOp_MSTORE(MaskedStoreSDNode *N,
unsigned OpNo) {
SDValue Ch = N->getChain();
SDValue Ptr = N->getBasePtr();
SDValue Mask = N->getMask();
SDValue Data = N->getValue();
EVT MemoryVT = N->getMemoryVT();
unsigned Alignment = N->getOriginalAlignment();
SDLoc... | false | false | false | false | false | 0 |
writeRaw(std::vector<char>& buffer, int start, int pixel_count) {
raw_count += pixel_count;
int written = 0;
while(pixel_count > 0) {
int write_count = std::min(128, pixel_count);
char counter_byte = write_count-1;
out->write((char*)&counter_byte, 1);
for(int i=0; i < w... | false | false | false | false | false | 0 |
ffmpeg_add_sound_ffmpeg( int len )
{
AVCodecContext *c;
int coded_bps;
int16_t *buf;
if( !audio_st ) return;
buf = *ffmpeg_sound;
c = audio_st->codec;
coded_bps = av_get_bits_per_sample( c->codec_id );
audio_iframe_size = snd_chn > 1 ? 4 : 2;
if( audio_input_frames > 1 && audio_inpbuf_len + len < a... | false | true | false | false | false | 1 |
goto_goto_command_callback(Widget w, XtPointer client_data,
XtPointer call_data)
{
struct city *pdestcity = get_selected_city();
if (pdestcity) {
unit_list_iterate(get_units_in_focus(), punit) {
send_goto_tile(punit, pdestcity->tile);
} unit_list_iterate_end;
}
popdown_goto_dialog();
} | false | false | false | false | false | 0 |
mono_gc_clear_domain (MonoDomain * domain)
{
LOSObject *bigobj, *prev;
int i;
LOCK_GC;
binary_protocol_domain_unload_begin (domain);
sgen_stop_world (0);
if (concurrent_collection_in_progress)
sgen_perform_collection (0, GENERATION_OLD, "clear domain", TRUE);
g_assert (!concurrent_collection_in_progress);
... | false | false | false | false | false | 0 |
dvb_usercopy(struct file *file,
unsigned int cmd, unsigned long arg,
int (*func)(struct file *file,
unsigned int cmd, void *arg))
{
char sbuf[128];
void *mbuf = NULL;
void *parg = NULL;
int err = -EINVAL;
/* Copy arguments into temp kernel buffer */
switch (_IOC_DIR(cmd)) {
... | false | false | false | false | false | 0 |
ocfs2_ioctl_move_extents(struct file *filp, void __user *argp)
{
int status;
struct inode *inode = file_inode(filp);
struct ocfs2_move_extents range;
struct ocfs2_move_extents_context *context;
if (!argp)
return -EINVAL;
status = mnt_want_write_file(filp);
if (status)
return status;
if ((!S_ISREG(inode-... | false | false | false | false | false | 0 |
gsi_advance_bw_nondebug_nonlocal (gimple_stmt_iterator *gsi, tree *vuse,
bool *vuse_escaped)
{
gimple stmt;
tree lvuse;
while (true)
{
if (gsi_end_p (*gsi))
return;
stmt = gsi_stmt (*gsi);
lvuse = gimple_vuse (stmt);
if (lvuse != NULL_TREE)
{
*vuse = lvuse;
if (!ZERO_SS... | false | false | false | false | false | 0 |
visit(ir_function *ir)
{
/* Ignore function bodies other than main() -- we shouldn't see calls to
* them since they should all be inlined before we get to ir_to_mesa.
*/
if (strcmp(ir->name, "main") == 0) {
const ir_function_signature *sig;
exec_list empty;
sig = ir->matching_signature(... | false | false | false | false | false | 0 |
ecryptfs_follow_link(struct dentry *dentry, void **cookie)
{
size_t len;
char *buf = ecryptfs_readlink_lower(dentry, &len);
if (IS_ERR(buf))
return buf;
fsstack_copy_attr_atime(d_inode(dentry),
d_inode(ecryptfs_dentry_to_lower(dentry)));
buf[len] = '\0';
return *cookie = buf;
} | false | false | false | false | false | 0 |
cmp_base(const char *p, const char *q, const Py_ssize_t *shape,
const Py_ssize_t *pstrides, const Py_ssize_t *psuboffsets,
const Py_ssize_t *qstrides, const Py_ssize_t *qsuboffsets,
char fmt, struct unpacker *unpack_p, struct unpacker *unpack_q)
{
Py_ssize_t i;
int equal;
for (i ... | false | false | false | false | false | 0 |
xlprint(LVAL fptr, LVAL vptr, int flag)
{
LVAL nptr,next;
int n,i;
/* print nil */
if (vptr == NIL) {
putsymbol(fptr,"NIL",flag);
return;
}
/* check value type */
switch (ntype(vptr)) {
case SUBR:
putsubr(fptr,"Subr",vptr);
break;
case FSUBR:... | false | false | false | false | false | 0 |
_extract_tree_children(
int position,
valarray<bool> & extracted,
const valarray<int> & lowest_constituent,
vector<int> & unique_tree) const {
if (!extracted[position]) {
// that means we may have unidentified parents around, so go and
// collect them (extracted[position]) will t... | false | false | false | false | false | 0 |
e_cal_recur_ensure_rule_end_date (ECalComponent *comp,
icalproperty *prop,
gboolean exception,
gboolean refresh,
ECalRecurResolveTimezoneFn tz_cb,
gpo... | false | false | false | false | false | 0 |
rawnet_receive_data( struct us_socket_collection_s *self,
void *context,
int fd,
uint64_t current_time_in_milliseconds,
void *buf_,
size_t b... | false | false | false | false | false | 0 |
copy_user_gigantic_page(struct page *dst, struct page *src,
unsigned long addr,
struct vm_area_struct *vma,
unsigned int pages_per_huge_page)
{
int i;
struct page *dst_base = dst;
struct page *src_base = src;
for (i = 0; i < pages_per_huge_page; ) {
cond_resched();
copy_user_highpage(ds... | false | false | false | false | false | 0 |
list_configure(unsigned long *body)
{
struct ConfigWinPacket *cfgpacket = (void *) body;
if (
(module->window == cfgpacket->frame)||
(module->window == cfgpacket->w) ||
((cfgpacket->icon_w != 0)&&
(module->window == cfgpacket->icon_w)) ||
((cfgpacket->icon_pixmap_w)&&
(module->window == cfgpacket->ico... | false | false | false | false | false | 0 |
ReleaseGraphicsResources(vtkWindow *w)
{
assert("pre: w_exists" && w!=0);
this->Superclass::ReleaseGraphicsResources(w);
if(this->BlurProgram!=0)
{
this->BlurProgram->ReleaseGraphicsResources();
}
if(this->FrameBufferObject!=0)
{
this->FrameBufferObject->Delete();
this->FrameBuffer... | false | false | false | false | false | 0 |
flam3_parse_xml2(char *xmldata, char *xmlfilename, int default_flag, int *ncps) {
xmlDocPtr doc; /* Parsed XML document tree */
xmlNode *rootnode;
char *bn;
int i;
int loc_all_ncps=0;
flam3_genome *loc_all_cp=NULL;
char* locale = NULL;
char* lorig = setlocale(LC_NUMERIC, NULL);
/* Parse XM... | false | false | false | false | false | 0 |
merge_tuner(tuner_dat_t* dst, const tuner_dat_t* src)
{
int i, j, ret = 0;
for (i = 0;i < src->num_entries;++i) {
const tuner_entry_t* src_entry = &src->stations[i];
for (j = 0;j < dst->num_entries;++j) {
tuner_entry_t* dst_entry = &dst->stations[j];
if (ucs2cmp(src_entry->name, dst_entry->name) == 0 && ... | false | false | false | false | false | 0 |
OTF_Reader_parseSnapshotsRecord( OTF_RBuffer* buffer,
OTF_HandlerArray* handlers ) {
/* check prefix */
if ( OTF_RBuffer_testPrefix( buffer, OTF_KEYWORD_L_SNAPSHOT_PREFIX ) ||
OTF_RBuffer_testPrefix( buffer, OTF_KEYWORD_S_SNAPSHOT_PREFIX ) ) {
/* fine */
} else if ( OTF_RBuffer_testPrefix( buffer, OTF_KE... | false | false | false | false | false | 0 |
details_button_undo_all_clicked(GtkButton *button) {
GList *gl;
g_return_if_fail (details_view);
for (gl = details_view->tracks; gl; gl = gl->next) {
Track *track = gl->data;
g_return_if_fail (track);
details_undo_track(track);
}
details_view->changed = FALSE;
detail... | false | false | false | false | false | 0 |
gromit_release_grab (GromitData *data)
{
if (data->hard_grab)
{
data->hard_grab = 0;
gdk_display_pointer_ungrab (data->display, GDK_CURRENT_TIME);
/* inherit cursor from root window */
gdk_window_set_cursor (data->win->window, NULL);
}
if (!data->painted)
gromit_hide_window (dat... | false | false | false | false | false | 0 |
exec_rectify(int order, char *extension, char *interp_method)
/* ADDED WITH CRS MODIFICATIONS */
{
char *name;
char *mapset;
char *result;
char *type = "raster";
int n;
struct Colors colr;
struct Categories cats;
struct History hist;
int colr_ok, cats_ok;
long start_time, rectify... | false | false | false | false | false | 0 |
SumImpl() const
{
DBG_ASSERT(initialized_);
Number sum;
if (homogeneous_) {
sum = Dim()*scalar_;
}
else {
sum = 0.;
for (Index i=0; i<Dim(); i++) {
sum += values_[i];
}
}
return sum;
} | false | false | false | false | false | 0 |
read_int(const char * const line, int * const num)
{
vector<string> vs;
char * endptr;
tokenize(vs, line);
*num = strtol(vs.back().c_str(), &endptr, 10);
return endptr != vs.back().c_str();
} | false | false | false | false | false | 0 |
bVectorTensor(PRECISION *x, PRECISION *y, PRECISION *z, int m, int n)
{
int j, k;
PRECISION s;
for (x+=m*n-1, j=m-1; j >= 0; j--)
for (s=y[j], k=n-1; k >= 0; x--, k--)
*x=s*z[k];
return NO_ERR;
} | false | false | false | false | false | 0 |
writeToStream(mrpt::utils::CStream &out, int *out_Version) const
{
if (out_Version)
*out_Version = 0;
else
{
// First, write the number of rows and columns:
out << (uint32_t)rows() << (uint32_t)cols();
if (rows()>0 && cols()>0)
for (Index i=0;i<rows();i++)
out.WriteBufferFixEndianness<Scalar>(&coeff(... | false | false | false | false | false | 0 |
notify_removals_cb (gpointer key,
gpointer value,
gpointer data)
{
BackendDeltaContext *context = data;
const gchar *uid = key;
ECalBackendFileObject *old_obj_data = value;
if (!g_hash_table_lookup (context->new_uid_hash, uid)) {
ECalComponentId *id;
/* Object was remov... | false | false | false | false | false | 0 |
timeout_node_invoke (gpointer data)
{
TimeoutNode *node = data;
ESourceExtension *extension;
ESource *source;
extension = E_SOURCE_EXTENSION (node->extension);
source = e_source_extension_ref_source (extension);
g_return_val_if_fail (source != NULL, FALSE);
/* We allow timeouts to be scheduled for disabled dat... | false | false | false | false | false | 0 |
gtk_source_search_context_replace_all (GtkSourceSearchContext *search,
const gchar *replace,
gint replace_length,
GError **error)
{
GtkTextIter iter;
GtkTextIter match_start;
GtkTextIter match_end;
guint nb_matches_replaced = 0;
gboo... | false | false | false | false | false | 0 |
gedit_file_browser_store_set_virtual_root_top (GeditFileBrowserStore *model)
{
g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (model),
GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE);
if (model->priv->virtual_root == model->priv->root)
return GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE;
model_clear (model, ... | false | false | false | false | false | 0 |
gf_isom_has_segment(GF_ISOFile *file, u32 *brand, u32 *version)
{
#ifndef GPAC_DISABLE_ISOM_FRAGMENTS
u32 i;
GF_Box *a;
i = 0;
while (NULL != (a = gf_list_enum(file->TopBoxes, &i))) {
#ifndef GPAC_DISABLE_ISOM_FRAGMENTS
if (a->type == GF_ISOM_BOX_TYPE_STYP) {
GF_SegmentTypeBox *styp ... | false | false | false | false | false | 0 |
operator/(double d, const vector& a)
{
vector t(a);
return t /= d;
} | false | false | false | false | false | 0 |
ProcessStateDebugString(int pstat)
{
std::string sta("bad-process-state-");
switch (pstat)
{
case kpstatJustifyMode: return "JustifyMode";
case kpstatJustifyLevel: return "JustifyLevel";
default:
Assert(false);
char rgch[20];
itoa(pstat, rgch, 10);
sta += rgch;
return sta;
}
} | false | false | false | false | false | 0 |
shd_option_handler (volgen_graph_t *graph, struct volopt_map_entry *vme,
void *param)
{
int ret = 0;
struct volopt_map_entry new_vme = {0};
char *shd_option = NULL;
shd_option = gd_get_matching_option (gd_shd_options, vme->optio... | false | false | false | false | false | 0 |
Draw(int Row0, int RowE) {
//printf("r0 = %d, re = %d\n", Row0, RowE);
//printf("m = %d, max = %d, rts = %d\n", MinRedraw, MaxRedraw, RedrawToEos);
if (Row0 == -1) Row0 = 0;
if ((Row0 < MinRedraw) || (MinRedraw == -1)) {
MinRedraw = Row0;
if (MaxRedraw == -1) MaxRedraw = MinRedraw;
}... | false | false | false | false | false | 0 |
e_bindings_key_del(E_Binding_Context ctxt, const char *key, E_Binding_Modifier mod, int any_mod, const char *action, const char *params)
{
E_Binding_Key *binding;
Eina_List *l;
EINA_LIST_FOREACH(key_bindings, l, binding)
{
if ((binding->ctxt == ctxt) &&
(key) && (binding->key) && (!st... | false | false | false | false | false | 0 |
add(const char* state,const char* options,const char* command) {
job_state_t i = GMJob::get_state(state);
if(i != JOB_STATE_UNDEFINED) {
return add(i,options,command);
};
return false;
} | false | false | false | false | false | 0 |
do_need_sigen_inc(int a, int b)
{
return au_br_whable(a) && !au_br_whable(b);
} | false | false | false | false | false | 0 |
enumerateProperties(as_object& obj)
{
// this set will keep track of visited objects,
// to avoid infinite loops
std::set<as_object*> visited;
SortedPropertyList to;
PropertyEnumerator e(to);
as_object* current(&obj);
while (current && visited.insert(current).second) {
current->vi... | false | false | false | false | false | 0 |
EmitCFISections(bool EH, bool Debug) {
MCStreamer::EmitCFISections(EH, Debug);
if (!UseCFI)
return;
OS << "\t.cfi_sections ";
if (EH) {
OS << ".eh_frame";
if (Debug)
OS << ", .debug_frame";
} else if (Debug) {
OS << ".debug_frame";
}
EmitEOL();
} | false | false | false | false | false | 0 |
fpa_insert(struct term *t,
int level,
struct fpa_index *index)
{
static int atom_count, term_count;
int path[MAX_PATH];
/* t->fpa_id is used to order FPA lists. Assign one if necessary. */
if (t->fpa_id == 0) {
if (t->type != VARIABLE && t->varnum != 0)
t->fpa_id = ++atom_count;
else
... | false | false | false | false | false | 0 |
bfa_iocfc_sm_init_failed(struct bfa_iocfc_s *iocfc, enum iocfc_event event)
{
bfa_trc(iocfc->bfa, event);
switch (event) {
case IOCFC_E_STOP:
bfa_fsm_set_state(iocfc, bfa_iocfc_sm_stopping);
break;
case IOCFC_E_DISABLE:
bfa_ioc_disable(&iocfc->bfa->ioc);
break;
case IOCFC_E_IOC_ENABLED:
bfa_fsm_set_stat... | false | false | false | false | false | 0 |
find_prev_build_dir(GtkTreePath *cur, GtkTreeModel *model, gchar **prefix)
{
GtkTreeIter iter;
*prefix = NULL;
while (gtk_tree_path_prev(cur))
{
if (gtk_tree_model_get_iter(model, &iter, cur))
{
gchar *string;
gtk_tree_model_get(model, &iter, 1, &string, -1);
if (string != NULL && build_parse_make_dir... | false | false | false | false | false | 0 |
has_hid(struct acpi_device *dev, const char *hid)
{
struct acpi_hardware_id *id;
list_for_each_entry(id, &dev->pnp.ids, list)
if (!strcmp(hid, id->id))
return 1;
return 0;
} | false | false | false | false | false | 0 |
Read(int w, uint8 ret)
{
if(w)
{
ret|=(bs&1)<<3;
ret|=(boop&1)<<4;
bs>>=1;
boop>>=1;
// puts("Read");
}
return(ret);
} | false | false | false | false | false | 0 |
operator<<(QDebug in, const Context &context)
{
in << "CONTEXT: ";
foreach (int c, context)
in << " " << c << Id::fromUniqueIdentifier(c).toString();
return in;
} | false | false | false | false | false | 0 |
draw_sphere_arc(const seg& sgmt, double t_min, double t_max,
bool front, sphere_proj_type TYPE, const Sphere& S)
{
P tail(sgmt(t_min)), head(sgmt(t_max));
double cos_theta(((head-S.center())|(tail-S.center()))/pow(S.radius(),2));
if (1-cos_theta < EPIX_EPSILON) // endpoints equal
return; /... | false | false | false | false | false | 0 |
spi_xmit(struct spi_device *spi_dev, void *addr, const int len,
enum spi_direction dir)
{
struct spi_message msg;
int r;
struct spi_transfer xfer = {
.len = len,
};
if (dir == SPI_DIR_TX)
xfer.tx_buf = addr;
else
xfer.rx_buf = addr;
if (spi_dev == NULL) {
pr_err("SPI device is uninitialized\n");... | 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.