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 |
|---|---|---|---|---|---|---|
gm_log_view_get_tag(gchar const *last) {
switch (last[11]) {
case '>':
return "out";
break;
case '<':
return "in";
break;
case '#':
return "status";
break;
case '[':
switch (last[17]) {
case '>':
return "mcp_out";
break;
case '<':
return "mcp_in";
break;
case '#'... | false | false | false | false | false | 0 |
ajSeqNewRes(size_t size)
{
AjPSeq pthis;
AJNEW0(pthis);
pthis->Name = ajStrNew();
pthis->Acc = ajStrNew();
/*
// pthis->Sv = ajStrNew();
// pthis->Gi = ajStrNew();
// pthis->Tax = ajStrNew();
// pthis->Taxcommon = ajStrNew();
// pthis->Taxid = ajStrNew();
// pthis->Organelle =... | false | false | false | false | false | 0 |
__db_get_encrypt_flags(dbp, flagsp)
DB *dbp;
u_int32_t *flagsp;
{
DB_ILLEGAL_IN_ENV(dbp, "DB->get_encrypt_flags");
return (__env_get_encrypt_flags(dbp->dbenv, flagsp));
} | false | false | false | false | false | 0 |
computeContent()
{
DOMString codeBase = getAttribute( ATTR_CODEBASE );
DOMString code = getAttribute( ATTR_CODE );
if ( !codeBase.isEmpty() )
url = codeBase.string();
if ( !code.isEmpty() )
url = code.string();
HTMLObjectBaseElementImpl::computeContent();
} | false | false | false | false | false | 0 |
img_calc_slide_duration_points( GList *list,
gint length )
{
GList *tmp;
gint i, duration = 0;
ImgStopPoint *point;
/* If we have no points, return 0 */
if( length == 0 )
return( 0 );
/* Calculate length */
for( tmp = list, i = 0; i < length; tmp = g_list_next( tmp ), i++ )
{
poi... | false | false | false | false | false | 0 |
dbus_connection_get_server_id (DBusConnection *connection)
{
char *id;
_dbus_return_val_if_fail (connection != NULL, NULL);
CONNECTION_LOCK (connection);
id = _dbus_strdup (_dbus_transport_get_server_id (connection->transport));
CONNECTION_UNLOCK (connection);
return id;
} | false | false | false | false | false | 0 |
getenv_columns (void)
{
const char * s = getenv ("COLUMNS");
if (s != NULL) {
int n = atoi (s);
if (n > 0)
return n;
}
return INT_MAX;
} | false | false | false | false | false | 0 |
__ecereNameSpace__ecere__gfx__drivers__BLIT_BRGBA(struct __ecereNameSpace__ecere__com__Instance * src, struct __ecereNameSpace__ecere__com__Instance * dst, int dx, int dy, int sx, int sy, int w, int h)
{
int y;
unsigned int adddest = ((struct __ecereNameSpace__ecere__gfx__Bitmap *)(((char *)dst + __ecereClass___ecereNa... | false | false | false | false | false | 0 |
htc_chk_ep_txq(struct htc_target *target)
{
struct htc_endpoint *endpoint;
struct htc_endpoint_credit_dist *cred_dist;
/*
* Run through the credit distribution list to see if there are
* packets queued. NOTE: no locks need to be taken since the
* distribution list is not dynamic (cannot be re-ordered) and we
... | false | false | false | false | false | 0 |
sort_other_el_pid(const void *a_arg, const void *b_arg)
{
const struct el_pid *a = a_arg, *b = b_arg;
int r;
r = b->type - a->type;
if (r)
return r;
return b->pid - a->pid;
} | false | false | false | false | false | 0 |
parse_n_out(at_state_t *s,
const char **t,
int *targets[],
const int max_values[],
int entries,
const char *prefix,
const char *def)
{
char buf[100];
int val;
int len;
... | true | true | false | false | false | 1 |
saveMess(t_symbol *filename, int pos)
{
// save an image from mem
imageStruct*img=NULL;
if(NULL==filename||NULL==filename->s_name||gensym("")==filename){
error("no filename given!");
return;
}
img=getMess(pos);
if(img && img->data){
mem2image(img, filename->s_name, 0);
} else {
error("... | false | false | false | false | false | 0 |
monster_check_doors(object *op, mapstruct *m, int x, int y) {
FOR_MAP_PREPARE(m, x, y, tmp)
if (tmp->type == DOOR) {
hit_player(tmp, op->stats.dam, op, AT_PHYSICAL, 1);
return;
}
FOR_MAP_FINISH();
} | false | false | false | false | false | 0 |
execute(CMD_Args *args, CMD_Context context)
{
switch (context)
{
case 0:
if (args == NULL)
return;
if (_w->is_visible())
_w->update(args->get_long_arg("gap"));
break;
case 1:
if (args == NULL)
return;
_w->selected(args->get_string_arg("filename"));
break;
case 2:
_w->s... | false | false | false | false | false | 0 |
db__driver_open_database(dbHandle * handle)
{
char *name;
dbConnection default_connection;
MYSQL *res;
init_error();
db_get_connection(&default_connection);
name = db_get_handle_dbname(handle);
/* if name is empty use default_connection.databaseName */
if (strlen(name) == 0)
name = de... | false | false | false | false | false | 0 |
tivo_input_mapping(struct hid_device *hdev, struct hid_input *hi,
struct hid_field *field, struct hid_usage *usage,
unsigned long **bit, int *max)
{
switch (usage->hid & HID_USAGE_PAGE) {
case HID_UP_TIVOVENDOR:
switch (usage->hid & HID_USAGE) {
/* TiVo button */
case 0x3d: tivo_map_key_clear(KEY_MEDIA); br... | false | false | false | false | false | 0 |
epilog(struct inode *dir, aufs_bindex_t bindex,
struct dentry *wh_dentry, struct dentry *dentry)
{
int err, rerr;
aufs_bindex_t bwh;
struct path h_path;
struct super_block *sb;
struct inode *inode, *h_dir;
struct dentry *wh;
bwh = -1;
sb = dir->i_sb;
if (wh_dentry) {
h_dir = d_inode(wh_dentry->d_parent)... | false | false | false | false | false | 0 |
init_compression(void) {
int id=0;
COMP_METHOD *cm=NULL;
char *name="unknown";
switch(global_options.compression) {
case COMP_ZLIB:
id=0xe0;
cm=COMP_zlib();
name="zlib";
break;
case COMP_RLE:
id=0xe1;
cm=COMP_rle();
name="rle";
bre... | false | false | false | false | false | 0 |
__afr_fd_ctx_get (fd_t *fd, xlator_t *this)
{
uint64_t ctx = 0;
int ret = 0;
afr_fd_ctx_t *fd_ctx = NULL;
int i = 0;
afr_private_t *priv = NULL;
priv = this->private;
ret = __fd_ctx_get (fd, this, &ctx);
if (ret < 0 && fd_is... | false | false | false | false | false | 0 |
sid_valid(char *sid)
{
if (isdigit(sid[0]) && strlen(sid) == SIDLEN)
{
return cid_ok(sid, SIDLEN - 1);
}
return 0;
} | false | false | false | false | false | 0 |
spgetcc(register stream * s, bool close_at_eod)
{
int status, left;
int min_left = sbuf_min_left(s);
while (status = s->end_status,
left = s->srlimit - s->srptr,
left <= min_left && status >= 0
)
s_process_read_buf(s);
if (left <= min_left &&
(left == 0 || ... | false | false | false | false | false | 0 |
saveState ()
{
if (demoPhase) {
return; // Don't save if quitting during a demo.
}
QString sFile = KStandardDirs::locateLocal ("appdata", "kubrick.save");
KConfig config (sFile, KConfig::SimpleConfig);
savePuzzle (config);
} | false | false | false | false | false | 0 |
dialog_function_select_search_func (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
gpointer dt)
{
GnmFunc* fd;
dialog_function_select_find_func_t *data = dt;
gtk_tree_model_get (model, iter,
FUNCTION, &fd,
-1);
if (fd == data->fd) {
data->path = gtk_tree_path_cop... | false | false | false | false | false | 0 |
file_util_resume_cb(GenericDialog *gd, gpointer data)
{
UtilityData *ud = data;
if (ud->external)
editor_resume(ud->resume_data);
else
file_util_perform_ci_internal(ud);
} | false | false | false | false | false | 0 |
gst_ximagesink_xcontext_clear (GstXImageSink * ximagesink)
{
GstXContext *xcontext;
g_return_if_fail (GST_IS_XIMAGESINK (ximagesink));
GST_OBJECT_LOCK (ximagesink);
if (ximagesink->xcontext == NULL) {
GST_OBJECT_UNLOCK (ximagesink);
return;
}
/* Take the xcontext reference and NULL it while we
... | false | false | false | false | false | 0 |
ndmp_3to9_tape_write_request (
ndmp3_tape_write_request *request3,
ndmp9_tape_write_request *request9)
{
u_long len;
char * p;
len = request3->data_out.data_out_len;
p = NDMOS_API_MALLOC (len);
if (!p) {
return -1;
}
NDMOS_API_BCOPY (request3->data_out.data_out_val, p, len);
request9->data_out.data_... | false | false | false | false | false | 0 |
Nget_fence_color_cmd(Nv_data * data, Tcl_Interp * interp, int argc,
char **argv)
{
int mode;
/* Verify arguments */
if (argc != 1) {
Tcl_SetResult(interp, "Usage: Nget_fence_color", TCL_VOLATILE);
return (TCL_ERROR);
}
/* Get the mode and return an appropriate value */
mode = GS_get_f... | false | false | false | false | false | 0 |
qp_save_headers(struct qp_broker_entry *entry)
{
int result;
if (entry->produce_q->saved_header != NULL &&
entry->consume_q->saved_header != NULL) {
/*
* If the headers have already been saved, we don't need to do
* it again, and we don't want to map in the headers
* unnecessarily.
*/
return... | false | false | false | false | false | 0 |
encrypt_message(char* buffer, int nbr)
{
if (client_list->contains (nbr)) {
auth_session *client =
client_list->value(nbr);
return client->auth_aes_encrypt(buffer);
}
} | false | false | false | false | false | 0 |
glade_gtk_box_verify_size (GObject *object, const GValue *value)
{
GList *child, *children;
gint old_size, count = 0;
gint new_size = g_value_get_int (value);
children = gtk_container_get_children (GTK_CONTAINER (object));
old_size = g_list_length (children);
for (child = g_list_last (children);
... | false | false | false | false | false | 0 |
igb_get_phy_info_igp(struct e1000_hw *hw)
{
struct e1000_phy_info *phy = &hw->phy;
s32 ret_val;
u16 data;
bool link;
DEBUGFUNC("igb_get_phy_info_igp");
ret_val = igb_phy_has_link_generic(hw, 1, 0, &link);
if (ret_val)
goto out;
if (!link) {
DEBUGOUT("Phy info is only valid if link is up\n");
ret_val = ... | false | false | false | false | true | 1 |
configure(CXMLElement* inConfigurationData){
mConfigurationData=inConfigurationData;
#ifdef LINK_DYNAMICALLY
cout << "--" << endl
<< "Configuring the CAccessorFactoryContainer:" << endl
<< "I am going to scan the following directorys for plugins "<< endl;
set<string> lSeenLibs;
if(inConfi... | false | false | false | false | false | 0 |
pushCountersFromEdge(BLInstrumentationEdge* edge) {
BallLarusNode* source;
source = edge->getSource();
if(source->getNumberSuccEdges() > 1 || source == getRoot()
|| edge->isInitialization()) {
return;
} else {
for(BLEdgeIterator previous = source->predBegin(),
end = source->predEnd(); pr... | false | false | false | false | false | 0 |
check_pattern_match(const struct refspec *rs,
int rs_nr,
const struct ref *src)
{
int i;
int matching_refs = -1;
for (i = 0; i < rs_nr; i++) {
if (rs[i].matching &&
(matching_refs == -1 || rs[i].force)) {
matching_refs = i;
continue;
}
if (rs[i].pattern && match_name_with_pattern(rs[... | false | false | false | false | false | 0 |
ar9003_mci_mute_bt(struct ath_hw *ah)
{
struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci;
/* disable all MCI messages */
REG_WRITE(ah, AR_MCI_MSG_ATTRIBUTES_TABLE, 0xffff0000);
REG_WRITE(ah, AR_BTCOEX_WL_WEIGHTS0, 0xffffffff);
REG_WRITE(ah, AR_BTCOEX_WL_WEIGHTS1, 0xffffffff);
REG_WRITE(ah, AR_BTCOEX_WL_WEIGHTS2, 0x... | false | false | false | false | false | 0 |
gtk_source_gutter_set_padding (GtkSourceGutter *gutter,
gint xpad,
gint ypad)
{
g_return_if_fail (GTK_SOURCE_IS_GUTTER (gutter));
if (set_xpad (gutter, xpad, FALSE) || set_ypad (gutter, ypad, FALSE))
{
update_gutter_size (gutter... | false | false | false | false | false | 0 |
detach()
{
if(!_detachable)
{
throw BadThreadControlException(__FILE__, __LINE__);
}
int rc = pthread_detach(_thread);
if(rc != 0)
{
throw ThreadSyscallException(__FILE__, __LINE__, rc);
}
} | false | false | false | false | false | 0 |
hid_add_field(struct hid_parser *parser, unsigned report_type, unsigned flags)
{
struct hid_report *report;
struct hid_field *field;
unsigned usages;
unsigned offset;
unsigned i;
report = hid_register_report(parser->device, report_type, parser->global.report_id);
if (!report) {
hid_err(parser->device, "hid_re... | false | false | false | false | false | 0 |
clist_get_band(gx_device * dev, int y, int *band_start)
{
gx_device_clist_writer * const cdev =
&((gx_device_clist *)dev)->writer;
int band_height = cdev->page_band_height;
int start;
if (y < 0)
y = 0;
else if (y >= dev->height)
y = dev->height;
*band_start = start = y -... | false | false | false | false | false | 0 |
_xdr_fd_args (XDR *xdrs, fd_args *objp)
{
bool_t res = xdr_nis_name (xdrs, &objp->dir_name);
if (__builtin_expect (res, TRUE))
res = xdr_nis_name (xdrs, &objp->requester);
return res;
} | false | false | false | false | false | 0 |
lookup_map_name(struct nss_source *this,
struct autofs_point *ap, struct map_source *map,
const char *name, int name_len)
{
enum nsswitch_status result;
struct map_source tmap;
char *path;
if (strcasecmp(this->source, "files"))
return lookup_name_source_instance(ap, map,
this->source, name, name_len);... | false | false | false | false | false | 0 |
gvc_mixer_ui_device_dispose (GObject *object)
{
GvcMixerUIDevice *device;
g_return_if_fail (object != NULL);
g_return_if_fail (GVC_MIXER_UI_DEVICE (object));
device = GVC_MIXER_UI_DEVICE (object);
g_clear_pointer (&device->priv->port_name, g_free);
g_clear_pointer (&de... | false | false | false | false | false | 0 |
__emit_branch(struct buffer *buf, struct basic_block *bb,
unsigned char prefix, unsigned char opc, struct insn *insn)
{
struct basic_block *target_bb;
long addr = 0;
int idx;
if (prefix)
insn->flags |= INSN_FLAG_ESCAPED;
target_bb = insn->operand.branch_target;
if (!bb)
idx = -1;
else
idx = bb_lookup_... | false | false | false | false | false | 0 |
free_psections ___PVOID
{
void *base = psections;
psections = 0;
while (base != 0)
{
void *link = *___CAST(void**,base);
free_mem_aligned (base);
base = link;
}
} | false | false | false | false | false | 0 |
goo_canvas_item_model_simple_get_transform (GooCanvasItemModel *model,
cairo_matrix_t *matrix)
{
GooCanvasItemModelSimple *smodel = (GooCanvasItemModelSimple*) model;
GooCanvasItemSimpleData *simple_data = &smodel->simple_data;
if (!simple_data->transform)
return FALSE;
*matrix = *simple_da... | false | false | false | false | false | 0 |
ProcessProductRepresentation(const IfcProduct& el, aiNode* nd, std::vector< aiNode* >& subnodes, ConversionData& conv)
{
if(!el.Representation) {
return;
}
std::vector<unsigned int> meshes;
// we want only one representation type, so bring them in a suitable order (i.e try those
// that look as if we could read ... | false | false | false | false | false | 0 |
ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo,
struct fence *fence,
bool evict,
bool no_wait_gpu,
struct ttm_mem_reg *new_mem)
{
struct ttm_bo_device *bdev = bo->bdev;
struct ttm_mem_type_manager *man = &bdev->man[new_mem->mem_type];
struct ttm_mem_reg *old_mem = &bo->mem... | false | false | false | false | false | 0 |
ilt_check_cached_table(insn_lookup_t *ilt)
{
int i;
/* All arrays must have been loaded */
for(i=0;i<RFC_ARRAY_NUMBER;i++)
if (!ilt->rfct[i])
return(-1);
return(0);
} | false | false | false | false | true | 1 |
setSectionComment(const char *sectionName,
const char *comment)
{
ArConfigSection *section = findSection(sectionName);
if (section == NULL)
{
ArLog::log(ArLog::Verbose, "%sMaking new section '%s' (for comment)",
myLogPrefix.c_str(), sectionName);
section = new ArConfigSection(secti... | false | false | false | false | false | 0 |
ecurve2_sub(_MIPD_ epoint *p,epoint *pa)
{
big r;
#ifdef MR_OS_THREADS
miracl *mr_mip=get_mip();
#endif
if (mr_mip->ERNUM) return NULL;
MR_IN(131)
if (p==pa)
{
epoint2_set(_MIPP_ NULL,NULL,0,pa);
MR_OUT
return NULL;
}
if (p->marker==MR_EPOINT_INFINITY)
{
... | false | false | false | false | false | 0 |
z_pow(unsigned long a, unsigned long exp)
{
if (exp == 0) return 1;
if (a == 1) return 1;
unsigned long power = a;
for (unsigned long i = 1; i < exp; i++)
power *= a;
return power;
} | false | false | false | false | false | 0 |
getz2size (struct uae_prefs *p)
{
ULONG start;
start = p->fastmem_size;
if (p->rtgmem_size && !p->rtgmem_type) {
while (start & (p->rtgmem_size - 1) && start < 8 * 1024 * 1024)
start += 1024 * 1024;
if (start + p->rtgmem_size > 8 * 1024 * 1024)
return -1;
}
start += p->rtgmem_size;
return start;
} | false | false | false | false | false | 0 |
gnl_object_commit_func (GnlObject * object, gboolean recurse)
{
GST_INFO_OBJECT (object, "Commiting object changed");
if (object->commit_needed == FALSE) {
GST_INFO_OBJECT (object, "No changes to commit");
return FALSE;
}
update_values (object);
GST_INFO_OBJECT (object, "Done commiting");
retur... | false | false | false | false | false | 0 |
iwl_mvm_bt_coex_reduced_txp(struct iwl_mvm *mvm, u8 sta_id,
bool enable)
{
struct iwl_bt_coex_reduced_txp_update_cmd cmd = {};
struct iwl_mvm_sta *mvmsta;
u32 value;
int ret;
mvmsta = iwl_mvm_sta_from_staid_protected(mvm, sta_id);
if (!mvmsta)
return 0;
/* nothing to do */
if (mvmsta->bt_reduced_... | false | false | false | false | false | 0 |
add_field(QParser *qp, char *field)
{
if (qp->allow_any_fields || hs_exists(qp->all_fields, field)) {
hs_add(qp->fields, get_cached_field(qp->field_cache, field));
}
return qp->fields;
} | false | false | false | false | false | 0 |
cifs_verify_signature(struct smb_rqst *rqst,
struct TCP_Server_Info *server,
__u32 expected_sequence_number)
{
unsigned int rc;
char server_response_sig[8];
char what_we_think_sig_should_be[20];
struct smb_hdr *cifs_pdu = (struct smb_hdr *)rqst->rq_iov[0].iov_base;
if (rqst->rq_iov[0].iov_len != 4 ||
... | false | false | false | false | false | 0 |
CollectHistogram(const uint8_t* ref, const uint8_t* pred,
int start_block, int end_block,
VP8Histogram* const histo) {
const __m128i zero = _mm_setzero_si128();
const __m128i max_coeff_thresh = _mm_set1_epi16(MAX_COEFF_THRESH);
int j;
int distribution[MA... | false | false | false | false | false | 0 |
addScrambleItem(const ScrambleItem &scrambleItem,
int nScrambleItem)
{
vector<ScrambleItem> &vec = m_scrambleItems;
if (nScrambleItem < 0) {
nScrambleItem = vec.size();
}
vec.insert(vec.begin() + nScrambleItem, scrambleItem);
} | false | false | false | false | false | 0 |
setDockWidgetStatusTip(bool enabled)
{
QAction *action = qobject_cast<QAction*>(sender());
QString dockName = action->text();
dockName.remove('&');
if (enabled)
action->setStatusTip(tr("Hide sidebar \"%1\"").arg(dockName));
else
action->setStatusTip(tr("Show sidebar \"%1\"").arg(dockName));
} | false | false | false | false | false | 0 |
Erase(const char *File,string Pkg,string Ver,struct stat &St)
{
c1out << "Del " << Pkg << " " << Ver << " [" << SizeToStr(St.st_size) << "B]" << endl;
if (_config->FindB("APT::Get::Simulate") == false)
unlink(File);
} | false | false | false | false | false | 0 |
fnic_reset(struct Scsi_Host *shost)
{
struct fc_lport *lp;
struct fnic *fnic;
int ret = 0;
struct reset_stats *reset_stats;
lp = shost_priv(shost);
fnic = lport_priv(lp);
reset_stats = &fnic->fnic_stats.reset_stats;
FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host,
"fnic_reset called\n");
atomic64_inc(&r... | false | false | false | false | false | 0 |
data_cache_expire (CamelDataCache *cdc,
const gchar *path,
const gchar *keep,
time_t now,
gboolean expire_all)
{
GDir *dir;
const gchar *dname;
struct stat st;
CamelStream *stream;
dir = g_dir_open (path, 0, NULL);
if (dir == NULL)
ret... | false | false | false | false | false | 0 |
setStateProvinceComboBox(QComboBox *box)
{
m_provinceCombo = box;
if (m_ProvinceModel) {
m_provinceCombo->setModel(m_ProvinceModel);
m_provinceCombo->setModelColumn(0);
connect(m_provinceCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(setStateProvinceFilter(int)));
}
} | false | false | false | false | false | 0 |
sftk_get_object_class_and_fipsCheck(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hObject, CK_OBJECT_CLASS *pObjClass)
{
CK_RV rv;
CK_ATTRIBUTE class;
class.type = CKA_CLASS;
class.pValue = pObjClass;
class.ulValueLen = sizeof(*pObjClass);
rv = NSC_GetAttributeValue(hSession, hObject, &class... | false | false | false | false | false | 0 |
playLevel (const Owner fileOwner, const QString & prefix,
const int levelNo, const bool newLevel)
{
// If the game-editor is active, terminate it.
if (editor) {
emit setEditMenu (false); // Disable edit menu items and toolbar.
delete editor;
editor = 0;
}
... | false | false | false | false | false | 0 |
FindLastInFree(uint64_t start) {
uint64_t nearestStart;
uint32_t i;
nearestStart = mainHeader.lastUsableLBA;
for (i = 0; i < numParts; i++) {
if ((nearestStart > partitions[i].GetFirstLBA()) &&
(partitions[i].GetFirstLBA() > start)) {
nearestStart = partitions[i].GetFirstLBA() - 1;... | false | false | false | false | false | 0 |
unlabel(Graph * graph, int * trace, int start_vertex,
int depth) {
int i;
for(i = start_vertex; i <= depth; i++)
graph[trace[i]].label.flag = 0;
} | false | false | false | false | false | 0 |
tTrunc(Tree *t,int depth)
#else
Tree *tTrunc(t,depth)
Tree *t;
#endif
{
Tree *u;
require ( ! (t == NULL && depth > 0),"tree too short");
if (depth == 0) return NULL;
if (t->token == ALT) {
u=tTrunc(t->down,depth);
} else {
u=tnode(t->token);
u->down=tTrunc(t->down,depth-1)... | false | false | false | true | false | 1 |
panel_init_stock_icons (GtkIconFactory *factory)
{
GtkIconSource *source;
int i;
source = gtk_icon_source_new ();
for (i = 0; i < G_N_ELEMENTS (stock_icons); i++) {
GtkIconSet *set;
gtk_icon_source_set_icon_name (source, stock_icons [i].icon);
set = gtk_icon_set_new ();
gtk_icon_set_add_sour... | false | false | false | false | false | 0 |
ishandler (lua_Object f)
{
if (lua_isuserdata(f)) {
if (lua_tag(f) == gettag(CLOSEDTAG))
lua_error("cannot access a closed file");
return lua_tag(f) == gettag(IOTAG);
}
else return 0;
} | false | false | false | false | false | 0 |
idle_populate_func (gpointer data)
{
MenuPopulateData *pdata;
AnjutaRecentChooserMenuPrivate *priv;
GtkRecentInfo *info;
gboolean retval;
GtkWidget *item;
pdata = (MenuPopulateData *) data;
priv = pdata->menu->priv;
if (!pdata->items)
{
pdata->items = gtk_recent_chooser_get_items (GTK_RECENT... | false | false | false | false | false | 0 |
gf_isom_set_track_matrix(GF_ISOFile *the_file, u32 trackNumber, u32 matrix[9])
{
GF_TrackBox *trak = gf_isom_get_track_from_file(the_file, trackNumber);
if (!trak || !trak->Header) return GF_BAD_PARAM;
memcpy(trak->Header->matrix, matrix, sizeof(trak->Header->matrix));
return GF_OK;
} | false | false | false | false | false | 0 |
m_emit_expr (pIIR_SimpleReference sor, string &str, RegionStack &rstack, id_type t)
{
// If the reference has been folded then return the optimized result
// instead of accessing the reference
if (valid_folded_value(sor)) {
emit_folded_value(folded_value(sor), str, rstack, sor->subtype);
return true; // O... | false | false | false | false | false | 0 |
getCursor(icp, id, nest, offset, data, len)
IMIC *icp;
unsigned int id;
int nest;
int offset;
char *data;
int len;
{
IMConnection *conn = icp->im->connection;
IMPSAttributes *ap;
TRACE(("imlib:getCursor()\n"));
if ((ap = getPSPtr(icp, nest)) == NULL) {
IMCancelRequest(conn, offset);
unnestedError(ic... | false | false | false | false | false | 0 |
ofr_store_set_row_vals(GtkListStore *ofr_store, GtkTreeIter *iter, struct o_frame *ofr)
{
char c[50 * 10];
int i;
char *obj;
char *states[] = {"Not Fitted", "Err", "All-sky", "Diff", "ZP Only", "OK",
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL};
obj = stf_find_string(ofr->stf, 1, SY... | true | true | false | false | false | 1 |
find_author_by_nickname(const char *name)
{
struct rev_info revs;
struct commit *commit;
struct strbuf buf = STRBUF_INIT;
const char *av[20];
int ac = 0;
init_revisions(&revs, NULL);
strbuf_addf(&buf, "--author=%s", name);
av[++ac] = "--all";
av[++ac] = "-i";
av[++ac] = buf.buf;
av[++ac] = NULL;
setup_revi... | false | false | false | false | false | 0 |
op_ret(/*@unused@*/ uint32_t op, const struct opinfo *oi)
{
REGS16_W(gbcpu_regs, PC, pop());
DPRINTF(" %s", oi->name);
} | false | false | false | false | false | 0 |
qlt_add_target(struct qla_hw_data *ha, struct scsi_qla_host *base_vha)
{
struct qla_tgt *tgt;
if (!QLA_TGT_MODE_ENABLED())
return 0;
if (!IS_TGT_MODE_CAPABLE(ha)) {
ql_log(ql_log_warn, base_vha, 0xe070,
"This adapter does not support target mode.\n");
return 0;
}
ql_dbg(ql_dbg_tgt, base_vha, 0xe03b,... | false | false | false | false | false | 0 |
ReadPHPData(const char* file)
{
std::ifstream in(file);
if(!in)
{
return false;
}
int size = 0;
this->ReadArraySize(in, size);
char c = 0;
in.get(c);
if(c != '{')
{
cmCTestLog(this->CTest, ERROR_MESSAGE,
"failed to read open array\n");
return false;
}
for(int i... | false | false | false | false | false | 0 |
makeupper(MM_VSTRING * v, char * body, int len)
{
char * vp;
v->length = len;
for (vp = v->body; len > 0; len--, vp++, body++)
*vp = toupper(*body);
} | false | false | false | false | false | 0 |
ec100_read_signal_strength(struct dvb_frontend *fe, u16 *strength)
{
struct ec100_state *state = fe->demodulator_priv;
int ret;
u8 tmp;
ret = ec100_read_reg(state, 0x24, &tmp);
if (ret) {
*strength = 0;
goto error;
}
*strength = ((tmp << 8) | tmp);
return ret;
error:
dev_dbg(&state->i2c->dev, "%s: faile... | false | false | false | false | false | 0 |
ClearQueues()
{
wxMutexLocker lock(m_sendLocker);
DeleteContents(m_control_queue);
{
CStdPacketQueue::iterator it = m_standard_queue.begin();
for (; it != m_standard_queue.end(); ++it) {
delete it->packet;
}
m_standard_queue.clear();
}
// Download (pseudo) rate control
downloadLimit = 0;
download... | false | false | false | false | false | 0 |
iso9660_ifs_readdir (iso9660_t *p_iso, const char psz_path[])
{
iso9660_stat_t *p_stat;
if (!p_iso) return NULL;
if (!psz_path) return NULL;
p_stat = iso9660_ifs_stat (p_iso, psz_path);
if (!p_stat) return NULL;
if (p_stat->type != _STAT_DIR) {
free(p_stat->rr.psz_symlink);
free(p_stat);
... | false | true | false | false | false | 1 |
globus_l_logging_flush(
globus_l_logging_handle_t * handle)
{
if(handle->used_length > 0)
{
handle->module.write_func(
handle->buffer, handle->used_length, handle->user_arg);
}
handle->used_length = 0;
} | false | false | false | false | false | 0 |
do_testi(int argc, char *argv[])
{
ext2_ino_t inode;
if (common_inode_args_process(argc, argv, &inode, CHECK_FS_BITMAPS))
return;
if (ext2fs_test_inode_bitmap(current_fs->inode_map,inode))
printf("Inode %u is marked in use\n", inode);
else
printf("Inode %u is not in use\n", inode);
} | false | false | false | false | false | 0 |
make_function_def (name, command, lineno, lstart)
WORD_DESC *name;
COMMAND *command;
int lineno, lstart;
{
FUNCTION_DEF *temp;
#if defined (ARRAY_VARS)
SHELL_VAR *bash_source_v;
ARRAY *bash_source_a;
#endif
temp = (FUNCTION_DEF *)xmalloc (sizeof (FUNCTION_DEF));
temp->command = command;
temp... | false | false | false | false | false | 0 |
ocfs2_update_slot_info_extended(struct ocfs2_slot_info *si)
{
int b, i, slotno;
struct ocfs2_slot_map_extended *se;
slotno = 0;
for (b = 0; b < si->si_blocks; b++) {
se = (struct ocfs2_slot_map_extended *)si->si_bh[b]->b_data;
for (i = 0;
(i < si->si_slots_per_block) &&
(slotno < si->si_num_slots... | false | false | false | false | false | 0 |
murrine_style_realize (GtkStyle *style)
{
MurrineStyle *murrine_style = MURRINE_STYLE (style);
double shades[] = {1.065, 0.95, 0.896, 0.82, 0.75, 0.665, 0.5, 0.45, 0.4};
double spots[] = {1.42, 1.00, 0.65};
MurrineRGB spot_color;
MurrineRGB bg_normal;
double contrast;
int i;
GTK_STYLE_CLASS (murrine_style_pare... | false | false | false | false | false | 0 |
fh_extend_post(nfs_fh3 fh, uint32 dev, uint64 ino, uint32 gen)
{
post_op_fh3 post;
unfs3_fh_t *new;
new = fh_extend(fh, dev, ino, gen);
if (new) {
post.handle_follows = TRUE;
post.post_op_fh3_u.handle.data.data_len = fh_length(new);
post.post_op_fh3_u.handle.data.data_val = (char *) new;
} else... | false | false | false | false | false | 0 |
mousePressEvent(QGraphicsSceneMouseEvent * event)
{
QGraphicsProxyWidget::mousePressEvent(event);
if (!event->isAccepted() && event->button() == Qt::RightButton)
emit requestClose();
event->accept();
} | false | false | false | false | false | 0 |
s4u2proxy_externalize(krb5_context kcontext,
krb5_authdata_context context,
void *plugin_context,
void *request_context,
krb5_octet **buffer,
size_t *lenremain)
{
struct s4u2proxy_context *s4uctx = (struct ... | false | false | false | false | false | 0 |
intpow2(int x)
{
if ( x < _pow2tab_size )
return (_pow2tab[x]);
else
return (pow(2.0, (double) x));
} | false | false | false | false | true | 1 |
output(OutputCharStream &os, OutputState &state)
{
for (IListIter<Item> iter(content_); !iter.done(); iter.next())
iter.cur()->output(os, state);
} | false | false | false | false | false | 0 |
lt_list_length(const lt_list_t *list)
{
size_t retval = 0;
const lt_list_t *l = list;
while (l) {
l = lt_list_next(l);
retval++;
}
return retval;
} | false | false | false | false | false | 0 |
plugin_blink(void)
{
if (pref_visual_beep_length)
{
if (blink_id)
g_source_remove(blink_id);
else
gtk_widget_set_state(debug_statusbar, GTK_STATE_SELECTED);
blink_id = plugin_timeout_add(geany_plugin, pref_visual_beep_length * 10,
plugin_unblink, NULL);
}
} | false | false | false | false | false | 0 |
char_next(const char *str)
{
int i;
const unsigned char *t = (const unsigned char *)str;
switch (global_codepage) {
default:
case CODEPAGE_SBCS:
i = 1;
break;
case CODEPAGE_UTF8:
if (t[0] == 0)
i = 0;
else if ((t[0] > 0) && (t[0] <= 0x7f))
i = 1;
else {
/* multiple byte UTF... | false | false | false | false | false | 0 |
operator/=(long r)
{
assert(num_!=0 || r != 0); // 0/0 undefined
long a = vnl_rational::gcd(r,num_);
num_ /= a; r /= a;
// find out whether overflow would occur; in that case, return approximate result
double d = double(r) * double(den_);
if (d < vnl_numeric_traits<long>::maxval)
{ den_ *= r; normalize();... | false | false | false | false | false | 0 |
xfs_aops_discard_page(
struct page *page)
{
struct inode *inode = page->mapping->host;
struct xfs_inode *ip = XFS_I(inode);
struct buffer_head *bh, *head;
loff_t offset = page_offset(page);
if (!xfs_check_page_type(page, XFS_IO_DELALLOC, true))
goto out_invalidate;
if (XFS_FORCED_SHUTDOWN(ip->i_mount))
... | false | false | false | false | false | 0 |
mt9t112_init_pll(const struct i2c_client *client)
{
struct mt9t112_priv *priv = to_mt9t112(client);
int data, i, ret;
mt9t112_reg_mask_set(ret, client, 0x0014, 0x003, 0x0001);
/* PLL control: BYPASS PLL = 8517 */
mt9t112_reg_write(ret, client, 0x0014, 0x2145);
/* Replace these registers when new timing paramet... | false | false | false | false | false | 0 |
main(int argc,char *argv[])
{
int i, twotailed=0;
double p, z;
if (argc<2)
usage();
z=atof(argv[1]);
/* {{{ process args */
for (i=2; i<argc; i++)
{
if (!strcmp(argv[i], "-2"))
twotailed=1;
else
usage();
}
/* }}} */
p=1-ndtr(z);
if (twotailed)
p*=2;
if (p>0.0001)
prin... | 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.