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 |
|---|---|---|---|---|---|---|
GdipSetPenBrushFill (GpPen *pen, GpBrush *brush)
{
GpStatus s;
ARGB color;
GpBrushType type;
if (!pen || !brush)
return InvalidParameter;
s = GdipGetBrushType (brush, &type);
if (s != Ok)
return s;
if (type == BrushTypeSolidColor) {
s = GdipGetSolidFillColor ((... | false | false | false | false | false | 0 |
clutter_offscreen_effect_real_create_texture (ClutterOffscreenEffect *effect,
gfloat width,
gfloat height)
{
return cogl_texture_new_with_size (MAX (width, 1), MAX (height, 1),
... | false | false | false | false | false | 0 |
vaul_name_eq (const char *n1, const char *n2)
{
if (n1 == NULL || n2 == NULL)
return false;
if (n1[0] == '\\' || n1[0] == '\'')
return !strcmp (n1, n2);
else
return !strcasecmp (n1, n2);
} | false | false | false | false | false | 0 |
reset_locking(void)
{
int was_locked = _vg_lock_count;
_vg_lock_count = 0;
_vg_write_lock_held = 0;
if (_locking.reset_locking)
_locking.reset_locking();
if (was_locked)
_unblock_signals();
memlock_reset();
} | false | false | false | false | false | 0 |
tree_traverse(tree_t* root, unsigned int depth, node_callback_t cb) {
int status;
if (root->left)
status = tree_traverse(root->left, depth + 1, cb);
if (root->right)
status += tree_traverse(root->right, depth + 1, cb);
/*
* this has to do for last in case the callback acts
* with the allocation of the p... | false | false | false | false | true | 1 |
bi_windup(s)
deflate_state *s;
{
if (s->bi_valid > 8) {
put_short(s, s->bi_buf);
} else if (s->bi_valid > 0) {
put_byte(s, (Byte)s->bi_buf);
}
s->bi_buf = 0;
s->bi_valid = 0;
#ifdef DEBUG
s->bits_sent = (s->bits_sent+7) & ~7;
#endif
} | false | false | false | false | false | 0 |
Ancestor(size_t wl, size_t wr, size_t vl, size_t vr) const{
if((wl<=vl) && (wr >= vr))
return true;
return false;
} | false | false | false | false | false | 0 |
icalproperty_set_value (icalproperty* p, icalvalue* value)
{
icalerror_check_arg_rv((p !=0),"prop");
icalerror_check_arg_rv((value !=0),"value");
if (p->value != 0){
icalvalue_set_parent(p->value,0);
icalvalue_free(p->value);
p->value = 0;
}
p->value = value;
icalvalue_set_parent(v... | false | false | false | false | false | 0 |
GetTextLength( const wxString &s ) const
{
wxClientDC dc( wxConstCast(this, wxListMainWindow) );
dc.SetFont( GetFont() );
wxCoord lw;
dc.GetTextExtent( s, &lw, NULL );
return lw + AUTOSIZE_COL_MARGIN;
} | false | false | false | false | false | 0 |
fill_media (OsinfoDb *db, OsinfoMedia *media,
OsinfoMedia *matched_media,
OsinfoOs *os)
{
GList *languages;
gboolean is_installer;
gboolean is_live;
gint reboots;
const gchar *id;
const gchar *kernel_path;
const gchar *initrd_path;
const gc... | false | false | false | false | false | 0 |
GetArrayPointer(vtkDataArray* array, int coordinate[3])
{
vtkIdType incs[3];
vtkIdType idx;
if (array == NULL)
{
return NULL;
}
const int* extent = this->Extent;
// error checking: since most acceses will be from pointer arithmetic.
// this should not waste much time.
for (idx = 0; idx < 3; ... | false | false | false | false | false | 0 |
getAddressPort(int channelId, QHostAddress *addr, int *port)
{
for(int n = 0; n < channels.count(); ++n)
{
if(channels[n]->channelId == channelId)
{
*addr = channels[n]->addr;
*port = channels[n]->port;
return true;
}
}
return false;
} | false | false | false | false | false | 0 |
math_variable_popup_variable_name_key_press_cb (MathVariablePopup* self, GtkWidget* widget, GdkEventKey* event) {
gboolean result = FALSE;
gboolean _tmp0_ = FALSE;
GdkEventKey _tmp1_ = {0};
guint _tmp2_ = 0U;
gboolean _tmp5_ = FALSE;
g_return_val_if_fail (self != NULL, FALSE);
g_return_val_if_fail (widget != NUL... | false | false | false | false | false | 0 |
generate_nonunion_plan(SetOperationStmt *op, PlannerInfo *root,
List *refnames_tlist,
List **sortClauses)
{
Plan *lplan,
*rplan,
*plan;
List *tlist,
*sortList,
*planlist,
*child_sortclauses;
SetOpCmd cmd;
/* Recurse on children, ensuring their outputs are marked ... | false | false | false | false | false | 0 |
evas_software_xlib_x_color_init(void)
{
static int initialised = 0;
if (initialised) return;
x_color_alloc[PAL_MODE_NONE] = NULL;
x_color_count[PAL_MODE_NONE] = 0;
x_color_alloc[PAL_MODE_MONO] = x_color_alloc_mono;
x_color_count[PAL_MODE_MONO] = 2;
x_color_alloc[PAL_MODE_GRAY4] = x... | false | false | false | false | false | 0 |
shift(tp, trigger)
struct token **tp;
struct token *trigger;
{
long e1, e2;
int tok_id;
e1 = additive(tp, trigger);
tok_id = (*tp)->tok_id;
while (tok_id == LShft || tok_id == RShft) {
advance_tok(tp);
e2 = additive(tp, trigger);
if (tok_id == LShft)
e1 = (e1 << e2);
... | false | false | false | false | false | 0 |
feature_blind_transfer(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, void *hook_pvt)
{
char exten[AST_MAX_EXTENSION] = "";
struct ast_channel *chan = NULL;
struct ast_bridge_features_blind_transfer *blind_transfer = hook_pvt;
const char *context = (blind_transfer && !ast_strlen_zero(blind_tr... | true | true | false | false | false | 1 |
uncurse(struct obj *otmp)
{
otmp->cursed = 0;
if (carried(otmp) && confers_luck(otmp))
set_moreluck();
else if (otmp->otyp == BAG_OF_HOLDING)
otmp->owt = weight(otmp);
else if (otmp->otyp == FIGURINE && otmp->timed)
stop_timer(FIG_TRANSFORM, (void *) otmp);
return;
} | false | false | false | false | false | 0 |
afs_vnode_release_lock(struct afs_vnode *vnode, struct key *key)
{
struct afs_server *server;
int ret;
_enter("%s{%x:%u.%u},%x",
vnode->volume->vlocation->vldb.name,
vnode->fid.vid,
vnode->fid.vnode,
vnode->fid.unique,
key_serial(key));
do {
/* pick a server to query */
... | false | false | false | false | false | 0 |
history_filename (filename)
const char *filename;
{
char *return_val;
const char *home;
int home_len;
return_val = filename ? savestring (filename) : (char *)NULL;
if (return_val)
return (return_val);
home = sh_get_env_value ("HOME");
if (home == 0)
{
home = ".";
home_len = ... | false | false | false | false | false | 0 |
loadFile(const std::string &fName)
{
FILE *f = fopen(fName.c_str() , "rb");
if (!f)
{
error("Cannot open file %s", fName.c_str());
return false;
}
while (true)
{
int ch = fgetc(f);
if (ch < 0)
break;
data.push_back(ch);
}
... | false | false | false | false | false | 0 |
__commit_transaction(struct dm_cache_metadata *cmd,
flags_mutator mutator)
{
int r;
struct cache_disk_superblock *disk_super;
struct dm_block *sblock;
/*
* We need to know if the cache_disk_superblock exceeds a 512-byte sector.
*/
BUILD_BUG_ON(sizeof(struct cache_disk_superblock) > 512);
r = dm_bitset_f... | false | true | false | false | false | 1 |
DtsAllocMemPools(DTS_LIB_CONTEXT *Ctx)
{
uint32_t i, Sz;
DTS_MPOOL_TYPE *mp;
BC_IOCTL_DATA *pIoData;
BC_STATUS sts = BC_STS_SUCCESS;
if(!Ctx){
return BC_STS_INV_ARG;
}
DtsInitLock(Ctx);
for(i=0; i< BC_IOCTL_DATA_POOL_SIZE; i++){
pIoData = (BC_IOCTL_DATA *) malloc(sizeof(BC_IOCTL_DATA));
if(!pIoData){
... | false | true | false | false | false | 1 |
close_all_files(void)
{
while (fp_head)
if (fp_head->pipe)
Pclose(fp_head->fp);
else
Fclose(fp_head->fp);
} | false | false | false | false | false | 0 |
test_core_filebuf__2(void)
{
git_filebuf file = GIT_FILEBUF_INIT;
char test[] = "test";
unsigned char buf[4096 * 4]; /* 2 * WRITE_BUFFER_SIZE */
memset(buf, 0xfe, sizeof(buf));
cl_git_pass(git_filebuf_open(&file, test, 0));
cl_git_pass(git_filebuf_write(&file, buf, sizeof(buf)));
cl_git_pass(git_filebuf_commit... | true | true | false | false | false | 1 |
findLocation(const QString & filename)
{
if (filename.startsWith(FolderUtils::getUserDataStorePath("bins"))) {
return BinLocation::User;
}
else if (filename.startsWith(FolderUtils::getApplicationSubFolderPath("bins") + "/more")) {
return BinLocation::More;
}
else if (filename.startsWith(FolderUtils::getAppli... | false | false | false | false | false | 0 |
os_banner_delete(void *banner_handle)
{
osbanid_t banner = banner_handle;
if (!banner || !(banner->valid))
return;
banner->valid = 0;
os_banners_redraw();
if (banner->parent && banner->parent->children == banner)
banner->parent->children = banner->next;
if (banner-... | false | false | false | false | false | 0 |
mmc_get_devidx(struct gendisk *disk)
{
int devmaj = MAJOR(disk_devt(disk));
int devidx = MINOR(disk_devt(disk)) / perdev_minors;
if (!devmaj)
devidx = disk->first_minor / perdev_minors;
return devidx;
} | false | false | false | false | false | 0 |
convert_frame_need_data_callback (GstElement * src, guint size,
GstVideoConvertFrameContext * context)
{
GstFlowReturn ret = GST_FLOW_ERROR;
GError *error;
g_mutex_lock (context->mutex);
if (context->finished)
goto done;
g_signal_emit_by_name (src, "push-buffer", context->buffer, &ret);
gst_buffe... | false | false | false | false | false | 0 |
saveAllDocuments()
{
int index = m_tabs->currentIndex();
for (int i = 0; i < m_documents->count(); ++i) {
Document* document = m_documents->document(i);
if (!document->filename().isEmpty()) {
document->save();
} else {
m_tabs->setCurrentIndex(i);
document->saveAs();
}
}
m_tabs->setCurrentIndex(inde... | false | false | false | false | false | 0 |
table_ASIN (struct GMTMATH_INFO *info, double **stack[], GMT_LONG *constant, double *factor, GMT_LONG last, GMT_LONG col, GMT_LONG n_row)
/*OPERATOR: ASIN 1 1 asin (A). */
{
GMT_LONG i;
double a = 0.0;
if (gmtdefs.verbose && constant[last] && fabs (factor[last]) > 1.0) fprintf (stderr, "%s: Warning, |operand| > 1 ... | false | false | false | false | false | 0 |
MakeCtString( AT_NUMB *LinearCT, int nLenCT, int bAddDelim,
S_CHAR *nNum_H, int num_atoms, /* both parameters are not used here */
char *szLinearCT, int nLen_szLinearCT, int nCtMode, int *bOverflow)
{
if ( !nNum_H || !(nCtMode & CT_MODE_NO_ORPHANS) ) {
return MakeCtS... | false | false | false | false | false | 0 |
ReadDataBlocks(PCFFOLDER_NODE FolderNode)
/*
* FUNCTION: Reads all CFDATA blocks for a folder from the cabinet file
* ARGUMENTS:
* FolderNode = Pointer to CFFOLDER_NODE structure for folder
* RETURNS:
* Status of operation
*/
{
ULONG AbsoluteOffset;
ULONG UncompOffset;
PCFDATA_NODE Node;
U... | false | false | false | false | false | 0 |
Fmethod_xsetter(CTX ctx, ksfp_t *sfp _RIX)
{
kMethod *mtd = sfp[K_MTDIDX].mtdNC;
ksymbol_t fn = DP(mtd)->delta;
kString *n = knh_getFieldName(ctx, fn);
kDictMap *m = knh_Object_getXData(ctx, sfp[0].o);
knh_DictMap_set(ctx, m, n, sfp[1].o);
RETURN_(sfp[1].o);
} | false | false | false | false | false | 0 |
setTitle(const char* word) throw()
{
try {
d_title = (word) ? (word) : ("");
}
catch(...) {
std::cerr << "[AiksaurusGTK] DialogImpl::setTitle() error, ignoring." << std::endl;
}
} | false | false | false | false | false | 0 |
glusterd_bricks_select_heal_volume (dict_t *dict, char **op_errstr)
{
int ret = -1;
char *volname = NULL;
glusterd_conf_t *priv = NULL;
glusterd_volinfo_t *volinfo = NULL;
... | false | false | false | true | false | 1 |
BackOffOnLosses (float ratio) {
ack_rcvd_recent_ = 0;
ack_not_rcvd_recent_ = 0;
if (last_loss_time_<NOW-rtt_avg_) {
cwnd_ *= ratio;
last_loss_time_ = NOW;
dprintf("%s #%u sendctrl backoff %3.2f\n",tintstr(),id_,cwnd_);
}
} | false | false | false | false | false | 0 |
skip_separator(const char *buf, int i, int len)
{
if(i >= len)
return -1;
if(issep(buf[i]))
i++;
else
return -1;
while(i < len) {
if(issep(buf[i]))
i++;
else
break;
}
return i;
} | false | false | false | false | false | 0 |
mono_type_is_generic_argument (MonoType *type)
{
return type->type == MONO_TYPE_VAR || type->type == MONO_TYPE_MVAR;
} | false | false | false | false | false | 0 |
vt8623_set_pixclock(struct fb_info *info, u32 pixclock)
{
struct vt8623fb_info *par = info->par;
u16 m, n, r;
u8 regval;
int rv;
rv = svga_compute_pll(&vt8623_pll, 1000000000 / pixclock, &m, &n, &r, info->node);
if (rv < 0) {
fb_err(info, "cannot set requested pixclock, keeping old value\n");
return;
}
/*... | false | false | false | false | false | 0 |
closeFile()
{
if( m_pFileHdl)
{
m_pFileHdl->closeFile();
m_bFileAccessed = FALSE;
m_pFileHdl->Release();
m_pFileHdl = NULL;
}
return FERR_OK;
} | false | false | false | false | false | 0 |
megasas_sriov_start_heartbeat(struct megasas_instance *instance,
int initial)
{
struct megasas_cmd *cmd;
struct megasas_dcmd_frame *dcmd;
int retval = 0;
cmd = megasas_get_cmd(instance);
if (!cmd) {
dev_printk(KERN_DEBUG, &instance->pdev->dev, "megasas_sriov_start_heartbeat: "
"Failed to get cmd... | false | false | false | false | false | 0 |
gst_real_audio_demux_sink_activate_mode (GstPad * sinkpad, GstObject * parent,
GstPadMode mode, gboolean active)
{
gboolean res;
GstRealAudioDemux *demux;
demux = GST_REAL_AUDIO_DEMUX (parent);
switch (mode) {
case GST_PAD_MODE_PUSH:
demux->seekable = FALSE;
res = TRUE;
break;
ca... | false | false | false | false | false | 0 |
init_once(void *foo)
{
struct ext2_inode_info *ei = (struct ext2_inode_info *) foo;
rwlock_init(&ei->i_meta_lock);
#ifdef CONFIG_EXT2_FS_XATTR
init_rwsem(&ei->xattr_sem);
#endif
mutex_init(&ei->truncate_mutex);
#ifdef CONFIG_FS_DAX
init_rwsem(&ei->dax_sem);
#endif
inode_init_once(&ei->vfs_inode);
} | false | false | false | false | false | 0 |
delete_vars (gint * cols, gint ncols, GGobiData * d)
{
gint j;
gint *keepers, nkeepers;
vartabled *vt;
if (!GGOBI_IS_GGOBI(d->gg))
return false;
/*-- don't allow all variables to be deleted --*/
if (ncols >= d->ncols)
return false;
/*
* If one of the variables to be deleted is currently plot... | false | false | false | false | false | 0 |
_elm_access_widget_item_unregister(Elm_Widget_Item *item)
{
Evas_Object *ho;
if (!item || item->access_obj) return;
ho = item->view;
evas_object_event_callback_del_full(ho, EVAS_CALLBACK_RESIZE,
_content_resize, item->access_obj);
evas_object_event_callback_del_full(ho... | false | false | false | false | false | 0 |
_set_task_device(struct dm_task *dmt, const char *name, int optional)
{
if (name) {
if (!dm_task_set_name(dmt, name))
return 0;
} else if (_switches[UUID_ARG]) {
if (!dm_task_set_uuid(dmt, _uuid))
return 0;
} else if (_switches[MAJOR_ARG] && _switches[MINOR_ARG]) {
if (!dm_task_set_major(dmt, _int_args[M... | false | false | false | false | false | 0 |
SaveKeyDef(int port,char *file)
{
FILE *f;
if ((f=fopen(file,"w")))
{
char buffer[120];
int i=0;
int *q;
q= (port) ? &query[10] : query;
D(bug("Saving custom key definition...\n"));
while(i < 10)
{
sprintf(buffer,"%d\n",q[i]);
... | true | true | false | false | true | 1 |
pcc_cpufreq_init(void)
{
int ret;
if (acpi_disabled)
return 0;
ret = pcc_cpufreq_probe();
if (ret) {
pr_debug("pcc_cpufreq_init: PCCH evaluation failed\n");
return ret;
}
ret = cpufreq_register_driver(&pcc_cpufreq_driver);
return ret;
} | false | false | false | false | false | 0 |
micro_hash_insert (MicroHash *hash_table, gpointer key)
{
int N = hash_table->num_elements;
g_return_if_fail (key != NULL);
if (N == 0) {
hash_table->u.one = key;
} else if (N == 1) {
gpointer key0 = hash_table->u.one;
if (key == key0)
return;
/* one --> few */
hash_table->u.few = NEW_FEW;
hash_tab... | false | false | false | false | false | 0 |
mthca_init_srq_table(struct mthca_dev *dev)
{
int err;
if (!(dev->mthca_flags & MTHCA_FLAG_SRQ))
return 0;
spin_lock_init(&dev->srq_table.lock);
err = mthca_alloc_init(&dev->srq_table.alloc,
dev->limits.num_srqs,
dev->limits.num_srqs - 1,
dev->limits.reserved_srqs);
if (err)
re... | false | false | false | false | false | 0 |
initNominalCloud ( void )
{
// create nominal nodes and fills them with initial values
for ( SingletonVector::iterator p = Nominals.begin(); p != Nominals.end(); ++p )
if ( initNominalNode(*p) )
return true; // ABox is inconsistent
// create edges between related nodes
for ( TBox::RelatedCollection::const_ite... | false | false | false | false | false | 0 |
update_stuff(void)
{
int i;
struct update_cb *uc;
/* clear speeds and up status in case device was removed and doesn't get
* updated */
#ifdef HAVE_OPENMP
#pragma omp parallel for schedule(dynamic,10)
#endif /* HAVE_OPENMP */
for (i = 0; i < MAX_NET_INTERFACES; i++) {
if (netstats[i].dev) {
netstats[i].... | false | false | false | false | false | 0 |
Cudd_RecursiveDerefZdd(
DdManager * table,
DdNode * n)
{
DdNode *N;
int ord;
DdNodePtr *stack = table->stack;
int SP = 1;
N = n;
do {
#ifdef DD_DEBUG
assert(N->ref != 0);
#endif
cuddSatDec(N->ref);
if (N->ref == 0) {
table->deadZ++;
#ifdef DD_STATS
table->nodesDropped++;... | false | false | false | false | false | 0 |
gst_icydemux_parse_and_send_tags (GstICYDemux * icydemux)
{
GstTagList *tags;
const guint8 *data;
int length, i;
gchar *buffer;
gchar **strings;
length = gst_adapter_available (icydemux->meta_adapter);
data = gst_adapter_peek (icydemux->meta_adapter, length);
/* Now, copy this to a buffer where we ca... | false | false | false | false | false | 0 |
combineStoreToNewValue(InstCombiner &IC, StoreInst &SI, Value *V) {
Value *Ptr = SI.getPointerOperand();
unsigned AS = SI.getPointerAddressSpace();
SmallVector<std::pair<unsigned, MDNode *>, 8> MD;
SI.getAllMetadata(MD);
StoreInst *NewStore = IC.Builder->CreateAlignedStore(
V, IC.Builder->CreateBitCast... | false | false | false | false | false | 0 |
wbcg_view_changed (WBCGtk *wbcg,
G_GNUC_UNUSED GParamSpec *pspec,
Workbook *old_wb)
{
WorkbookControl *wbc = WORKBOOK_CONTROL (wbcg);
Workbook *wb = wb_control_get_workbook (wbc);
WorkbookView *wbv = wb_control_view (wbc);
/* Reconnect self because we need to change data. */
DISCONNECT (wbc, sig_view_c... | false | false | false | false | false | 0 |
ibpm_clr_all_counters(
IN ibpm_t* const p_ibpm,
IN uint16_t lid,
IN uint8_t port_select)
{
ib_pm_port_counter_t res_mad;
osm_madw_t *p_madw_arr[1];
ib_api_status_t status;
OSM_LOG_ENTER(&(IbisObj.log));
/* prepare the mad */
__ibpm_prep_port_counter_mad(
p_ibpm,
lid,
VENDO... | false | false | false | false | false | 0 |
setToolTip(int row, RideFile::SeriesType series, QString text)
{
QString key = xsstring(row, series);
// if text is blank we are removing it
if (text == "") tooltips.remove(key);
// if text is non-blank we are changing it
if (text != "") tooltips.insert(key, text);
} | false | false | false | false | false | 0 |
meta_check_directory(ext2_filsys fs EXT2FS_ATTR((unused)),
ext2_ino_t ino)
{
if ((ino != stashed_ino) || !stashed_inode)
return EXT2_ET_CALLBACK_NOTHANDLED;
if (!LINUX_S_ISDIR(stashed_inode->i_mode))
return EXT2_ET_NO_DIRECTORY;
return 0;
} | false | false | false | false | false | 0 |
NET_SDL_ResolveAddress(char *address)
{
IPaddress ip;
char *addr_hostname;
int addr_port;
int result;
char *colon;
colon = strchr(address, ':');
if (colon != NULL)
{
addr_hostname = strdup(address);
addr_hostname[colon - address] = '\0';
addr_port = atoi(colon + 1);
}
else
... | false | false | false | false | false | 0 |
xgene_cle_dn_to_hw(struct xgene_cle_ptree_ewdn *dn,
u32 *buf, u32 jb)
{
struct xgene_cle_ptree_branch *br;
u32 i, j = 0;
u32 npp;
buf[j++] = SET_VAL(CLE_DN_TYPE, dn->node_type) |
SET_VAL(CLE_DN_LASTN, dn->last_node) |
SET_VAL(CLE_DN_HLS, dn->hdr_len_store) |
SET_VAL(CLE_DN_EXT, dn->hdr_ext... | false | false | false | false | false | 0 |
skin_load_pixbuf (GdkPixbuf * tmp_pixbuf, int deep,int x[],int y[],int w, int h, GdkPixbuf* p[])
{
for (int i=0; i< deep; i++)
{
p[i]=gdk_pixbuf_new_subpixbuf(tmp_pixbuf, x[i+1], y[i+1], w, h);
}
} | false | false | false | false | false | 0 |
cxgb4_queue_tid_release(struct tid_info *t, unsigned int chan,
unsigned int tid)
{
void **p = &t->tid_tab[tid];
struct adapter *adap = container_of(t, struct adapter, tids);
spin_lock_bh(&adap->tid_release_lock);
*p = adap->tid_release_head;
/* Low 2 bits encode the Tx channel number */
adap->tid_release... | false | false | false | false | false | 0 |
_nrrdWriteEscaped(FILE *file, char *dst, const char *str,
const char *toescape, const char *tospace) {
/* static const char me[]="_nrrdWriteEscaped"; */
size_t ci, gslen; /* given strlen */
gslen = strlen(str);
for (ci=0; ci<gslen; ci++) {
char cc;
cc = str[ci];
if (strchr(toescap... | false | false | false | false | false | 0 |
e_goa_client_lookup_by_id (EGoaClient *client,
const gchar *id)
{
GList *list, *link;
GoaObject *match = NULL;
g_return_val_if_fail (E_IS_GOA_CLIENT (client), NULL);
g_return_val_if_fail (id != NULL, NULL);
list = e_goa_client_list_accounts (client);
for (link = list; link != NULL; l... | false | false | false | false | false | 0 |
kill_user_internal(CONNECTION * con, USER * user, const char *sender_name, USER * sender, const char *fmt, ...)
{
va_list ap;
char reason[128], real_reason[128];
ASSERT(global.maxReason <= (int) sizeof(reason));
va_start(ap, fmt);
vsnprintf(reason, sizeof(reason), fmt, ap);
va_end(ap);
... | false | false | false | false | false | 0 |
canCloseFrame(DigitDoc* doc, DigitView* view)
{
if (!doc->isLastView())
return true;
bool ret = false;
ASSERT_ENGAUGE(doc != 0);
if (doc->modified())
{
QString saveName;
switch(QMessageBox::information(view, doc->title(), tr("The current file has been modified.\n\n"
"Do you want to save it?... | false | false | false | false | false | 0 |
GetWindowSizeHints(FvwmWindow *tmp)
{
long supplied = 0;
if (!XGetWMNormalHints (dpy, tmp->w, &tmp->hints, &supplied))
tmp->hints.flags = 0;
/* Beat up our copy of the hints, so that all important field are
* filled in! */
if (tmp->hints.flags & PResizeInc)
{
if (tmp->hints.width_inc == 0) t... | false | false | false | false | false | 0 |
nautilus_is_in_system_dir (GFile *file)
{
const char * const * data_dirs;
char *path;
int i;
gboolean res;
if (!g_file_is_native (file)) {
return FALSE;
}
path = g_file_get_path (file);
res = FALSE;
data_dirs = g_get_system_data_dirs ();
for (i = 0; path != NULL && data_dirs[i] != NULL; i++) {
if (... | false | false | false | false | false | 0 |
_gconf_cleaner_run_analyzing_result_cb(gpointer data)
{
GConfCleanerInstance *inst = data;
gchar *text;
GtkListStore *list;
GtkTreeIter iter;
GSList *l;
text = g_strdup_printf("%d", gconf_cleaner_n_dirs(inst->cleaner));
gtk_label_set_text(GTK_LABEL (inst->label_n_dirs), text);
g_free(text);
text = g_strdup_pr... | false | false | false | false | false | 0 |
UpdateName( const char *name )
{
if( name )
{
UIDs uids;
bool b = uids.SetFromUID( name );
if( b )
{
Name = name;
ItemLength = (uint16_t)Name.size();
assert( (size_t)ItemLength + 4 == Size() );
return;
}
}
gdcmErrorMacro( "Invalid Name: " << name );
throw "... | false | false | false | false | false | 0 |
generateFixDelay (Tree sig, Tree exp, Tree delay, int priority)
{
int d;
string vecname;
CS(exp, 0); // ensure exp is compiled to have a vector name
if (! getVectorNameProperty(exp, vecname)) {
cerr << "No vector name for : " << ppsig(exp) << endl;
assert(0);
}
if (isSigInt(delay, &d) && (d == 0)) {
/... | false | false | false | false | false | 0 |
fop_readv_stub (call_frame_t *frame,
fop_readv_t fn,
fd_t *fd,
size_t size,
off_t off)
{
call_stub_t *stub = NULL;
GF_VALIDATE_OR_GOTO ("call-stub", frame, out);
stub = stub_new (frame, 1, GF_FOP_READ);
GF_VALIDATE_OR_GOTO... | false | false | false | false | false | 0 |
on_darea_expose(GtkWidget * widget,
GdkEventExpose * event, gpointer user_data)
{
uint8_t *spu;
guchar *screen;
guchar *back;
gint x, y;
// merge back with SPU onto rgbbuf
spu = spu_pixelbuf;
back = backbuf;
screen = rgbbuf;
for (y = 0; y < height; y++)
{
... | false | false | false | false | false | 0 |
has_invalid_chars (GeditDocument *doc)
{
GtkTextBuffer *buffer;
GtkTextIter start;
g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), FALSE);
gedit_debug (DEBUG_DOCUMENT);
if (doc->priv->error_tag == NULL)
{
return FALSE;
}
buffer = GTK_TEXT_BUFFER (doc);
gtk_text_buffer_get_start_iter (buffer, &start);
i... | false | false | false | false | false | 0 |
glade_gtk_label_set_label (GObject *object, const GValue *value)
{
GladeWidget *glabel;
gboolean use_markup = FALSE, use_underline = FALSE;
glabel = glade_widget_get_from_gobject (object);
glade_widget_property_get (glabel, "use-markup", &use_markup);
if (use_markup)
gtk_label_set_markup (GTK_LABEL (object), ... | false | false | false | false | false | 0 |
Xdol(void)
{
word *a, *star;
char *s, *t;
int n;
if(count(runq->argv->words)!=1){
Xerror1("variable name not singleton!");
return;
}
s = runq->argv->words->word;
deglob(s);
n = 0;
for(t = s;'0'<=*t && *t<='9';t++) n = n*10+*t-'0';
a = runq->argv->next->words;
if(n==0 || *t)
a = copywords(vlook(s)->val,... | false | false | false | false | false | 0 |
gridGenYbounds(int ny, double *yvals, double *ybounds)
{
int i;
for ( i = 0; i < ny-1; i++ )
{
ybounds[2*i+1] = 0.5*(yvals[i] + yvals[i+1]);
ybounds[2*(i+1)] = 0.5*(yvals[i] + yvals[i+1]);
}
ybounds[0] = 2*yvals[0] - ybounds[1];
ybounds[2*ny-1] = 2*yvals[ny-1] - ybounds[2*(ny-1)];
... | false | false | false | false | false | 0 |
dmi_ipmi_interface_type(uint8_t code)
{
/* 3.3.39.1 and IPMI 2.0, appendix C1, table C1-2 */
static const char *type[] = {
"Unknown", /* 0x00 */
"KCS (Keyboard Control Style)",
"SMIC (Server Management Interface Chip)",
"BT (Block Transfer)",
"SSIF (SMBus System Interface)" /* 0x04 */
};
if (code... | false | false | false | false | false | 0 |
candidate(input &p_deeper)
{
//
// Check for the magic number.
//
unsigned char magic[4];
long n = p_deeper->read(magic, 4);
p_deeper->unread(magic, n);
return
(
n == 4
&&
magic[0] == 'B'
&&
magic[1] == 'Z'
&&
magic[2] == 'h'
&&
magic[3] >= '1'
&&
magic[3]... | false | false | false | false | false | 0 |
init(){
_element_id = Morphology_t;
_xmltag = "morphology";
const ElementType accept[] = { Morpheme_t };
_accepted_data = std::set<ElementType>(accept, accept + 1 );
occurrences_per_set = 1; // Don't allow duplicates within the same set
_annotation_type = AnnotationType::MORPHOLOGICAL;
} | false | false | false | false | false | 0 |
extractPageInfo(XLogReaderState *record)
{
int block_id;
RmgrId rmid = XLogRecGetRmid(record);
uint8 info = XLogRecGetInfo(record);
uint8 rminfo = info & ~XLR_INFO_MASK;
/* Is this a special record type that I recognize? */
if (rmid == RM_DBASE_ID && rminfo == XLOG_DBASE_CREATE)
{
/*
* New databases ... | false | false | false | false | false | 0 |
print_space(__isl_keep isl_space *dim,
__isl_take isl_printer *p, int rational,
struct isl_print_space_data *data)
{
if (rational && !data->latex)
p = isl_printer_print_str(p, "rat: ");
if (isl_space_is_params(dim))
;
else if (isl_space_is_set(dim))
p = print_tuple(dim, p, isl_dim_set, data);
else {
p = p... | false | false | false | false | false | 0 |
NITFFindTREXMLDescFromName(NITFFile* psFile,
const char* pszTREName)
{
CPLXMLNode* psTreeNode;
CPLXMLNode* psTresNode;
CPLXMLNode* psIter;
psTreeNode = NITFLoadXMLSpec(psFile);
if (psTreeNode == NULL)
return NULL;
psTresNode = CPLGetXMLNode... | false | false | false | false | false | 0 |
gamgi_gtk_file_chooser_ok (gamgi_window *window, char *fullname)
{
GtkWidget *dialog = window->dialog0;
GtkWidget *entry;
GtkWidget *label;
const char *name;
int length;
/*********************************
* the path selected by the user *
*********************************/
label = (GtkWidget *) g_object_get_data (G... | false | false | false | false | false | 0 |
__ecereMethod___ecereNameSpace__ecere__com__CustomAVLTree_Add(struct __ecereNameSpace__ecere__com__Instance * this, uint64 node)
{
struct __ecereNameSpace__ecere__com__CustomAVLTree * __ecerePointer___ecereNameSpace__ecere__com__CustomAVLTree = (struct __ecereNameSpace__ecere__com__CustomAVLTree *)(this ? (((char *)thi... | false | false | false | true | false | 1 |
post_activate (GstPad * pad, GstActivateMode new_mode)
{
switch (new_mode) {
case GST_ACTIVATE_PUSH:
case GST_ACTIVATE_PULL:
/* nop */
break;
case GST_ACTIVATE_NONE:
/* ensures that streaming stops */
GST_PAD_STREAM_LOCK (pad);
GST_DEBUG_OBJECT (pad, "stopped streaming");
... | false | false | false | false | false | 0 |
unpack_ts_decl_common_value_fields (struct bitpack_d *bp, tree expr)
{
DECL_MODE (expr) = (enum machine_mode) bp_unpack_value (bp, 8);
DECL_NONLOCAL (expr) = (unsigned) bp_unpack_value (bp, 1);
DECL_VIRTUAL_P (expr) = (unsigned) bp_unpack_value (bp, 1);
DECL_IGNORED_P (expr) = (unsigned) bp_unpack_value (bp, 1)... | false | false | false | false | false | 0 |
sst_start_mrfld(struct intel_sst_drv *sst_drv_ctx)
{
union config_status_reg_mrfld csr;
dev_dbg(sst_drv_ctx->dev, "sst: Starting the DSP in mrfld LALALALA\n");
csr.full = sst_shim_read64(sst_drv_ctx->shim, SST_CSR);
dev_dbg(sst_drv_ctx->dev, "value:0x%llx\n", csr.full);
csr.full |= 0x7;
sst_shim_write64(sst_drv... | false | false | false | false | false | 0 |
project_point_to_perimeter(vec3d *perim_point, vec3d *pos, float radius, vec3d *vp)
{
vec3d v1;
float mag;
vm_vec_sub(&v1, vp, pos);
mag = vm_vec_mag(&v1);
if (mag == 0.0f) {
Warning(LOCATION, "projectable point is at center of sphere.");
vm_vec_make(&v1, 0.0f, radius, 0.0f);
} else {
vm_vec_normalize(&v... | false | false | false | false | false | 0 |
getColor(QColor &theColor, const QColor& defaultCol, QWidget *parent)
{
KColorDialog dlg(parent, true);
dlg.setObjectName("Color Selector");
dlg.setDefaultColor(defaultCol);
dlg.setColor(theColor);
int result = dlg.exec();
if (result == Accepted)
theColor = dlg.color();
return resu... | false | false | false | false | false | 0 |
DIV_AXEwR(bxInstruction_c *i)
{
Bit16u op2_16 = BX_READ_16BIT_REG(i->rm());
if (op2_16 == 0)
exception(BX_DE_EXCEPTION, 0, 0);
Bit32u op1_32 = (((Bit32u) DX) << 16) | ((Bit32u) AX);
Bit32u quotient_32 = op1_32 / op2_16;
Bit16u remainder_16 = op1_32 % op2_16;
Bit16u quotient_16l = quotient_32 & 0xFFFF... | false | false | false | false | false | 0 |
smsc_ircc_look_for_chips(void)
{
struct smsc_chip_address *address;
char *type;
unsigned int cfg_base, found;
found = 0;
address = possible_addresses;
while (address->cfg_base) {
cfg_base = address->cfg_base;
/*printk(KERN_WARNING "%s(): probing: 0x%02x for: 0x%02x\n", __func__, cfg_base, address->type);*/... | false | false | false | false | false | 0 |
ansiesc_call_handler ( struct ansiesc_handler *handlers,
unsigned int function, int count,
int params[] ) {
struct ansiesc_handler *handler;
for ( handler = handlers ; handler->function ; handler++ ) {
if ( handler->function == function ) {
handler->handle ( count, params );
break;
}
}
} | false | false | false | false | false | 0 |
free_module_info_list( Module_hmdf_information *mh_info_list )
{
Module_hmdf_information *mh_info, *next;
for( mh_info = mh_info_list; mh_info; mh_info = next ){
free_hmdf_info_list( mh_info->hmdf_info_list );
free_inline_information( mh_info->inline_info_list );
next = mh_info->next;
... | false | false | false | false | false | 0 |
set_access_and_format_code(
IO_Unit_Info *save_info )
#else /* K&R style */
set_access_and_format_code( sav_info )
IO_Unit_Info *save_info;
#endif /* HAVE_STDC */
{
switch ( save_info->io_operation )
{
case tok_INQUIRE:
case tok_CLOSE:
save_info->io_access = IO_ACCESS_DEFAULT;
... | false | false | false | false | false | 0 |
testLimitValue(btScalar test_value)
{
if(m_loLimit>m_hiLimit)
{
m_currentLimit = 0;//Free from violation
return 0;
}
if (test_value < m_loLimit)
{
m_currentLimit = 1;//low limit violation
m_currentLimitError = test_value - m_loLimit;
return 1;
}
else if (test_value> m_hiLimit)
{
m_currentLimit = 2;... | false | false | false | false | false | 0 |
FindConfigurationPath()
{
#ifndef MACOSX
#ifndef WIN32
if ( TestConfigurationPath( st_RelocatePath( tString( AA_SYSCONFDIR ) ) ) ) return;
#endif
// look for configuration where the data is
if ( TestConfigurationPath(st_DataDir + "/config") ) return;
tERR_WARN("Could not determine path to configuratio... | false | false | false | false | false | 0 |
get_im_channel (PhoneyImChannelFactory *self,
TpHandle handle,
gboolean *created)
{
PhoneyImChannelFactoryPrivate *priv =
PHONEY_IM_CHANNEL_FACTORY_GET_PRIVATE (self);
PhoneyIMChannel *chan =
g_hash_table_lookup (priv->channels, GUINT_TO_POINTER (handle));
if (chan)
{
if (created)
*created = FALSE;
}... | 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.