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 |
|---|---|---|---|---|---|---|
GossipSelect_npc_dughal_stormwing(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
{
if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
{
// Set instance data in order to allow the quest to continue
if (instance_blackrock_depths* pInstance = (instance_blackrock_depths*)pCreat... | false | false | false | false | false | 0 |
set_topic (session *sess, char *topic, char *stripped_topic)
{
if (sess->topic)
free (sess->topic);
sess->topic = strdup (stripped_topic);
fe_set_topic (sess, topic, stripped_topic);
} | false | false | false | false | false | 0 |
eye_computations()
{
int str;
for (str = BOARDMIN; str < BOARDMAX; str++) {
if (!ON_BOARD(str))
continue;
if (black_eye[str].color == BLACK
&& black_eye[str].origin == str) {
struct eyevalue value;
int attack_point, defense_point;
compute_eyes(str, &value, &attack_point, &... | false | false | false | false | false | 0 |
stfill_buffer (SCM port)
{
scm_t_port *pt = SCM_PTAB_ENTRY (port);
if (pt->read_pos >= pt->read_end)
return EOF;
else
return scm_return_first_int (*pt->read_pos, port);
} | false | false | false | false | false | 0 |
get_new4old(const char* oldname, int tshift) const
{
Toldnamemap::const_iterator it = old2new.find(oldname);
if (it != old2new.end()) {
const Tshiftnameset& sset = (*it).second;
for (Tshiftnameset::const_iterator itt = sset.begin();
itt != sset.end(); ++itt)
if ((*itt).second == - tshift)
return (*itt)... | false | false | false | false | false | 0 |
getOutputDescriptors() const
{
OutputList list;
OutputDescriptor d;
d.identifier = "logcentroid";
d.name = "Log Frequency Centroid";
d.description = "Centroid of the log weighted frequency spectrum";
d.unit = "Hz";
d.hasFixedBinCount = true;
d.binCount = 1;
d.hasKnownExtents = false... | false | false | false | false | false | 0 |
configure(Vector<String> &conf, ErrorHandler *errh)
{
bool do_cksum = true;
_interval = 0;
if (cp_va_kparse(conf, this, errh,
"SRC", cpkP+cpkM, cpIPAddress, &_saddr,
"SPORT", cpkP+cpkM, cpUDPPort, &_sport,
"DST", cpkP+cpkM, cpIPAddress, &_daddr,
"DPORT", cpkP+cpkM, cpUDPPort, &_dport,
"CH... | false | false | false | false | false | 0 |
parseMap (const unsigned char *line)
{
vString *name = vStringNew ();
const unsigned char *cp = line;
/* Remove map */
while (*cp && isalnum ((int) *cp))
++cp;
if ((int) *cp == '!')
++cp;
/*
* Maps follow this basic format
* map
* nnoremap <silent> <F8> :Tlist<CR>
* map <unique> <... | false | false | false | false | false | 0 |
min_max_update_real_field()
{
double nr,old_nr;
old_nr=result_field->val_real();
nr= args[0]->val_real();
if (!args[0]->null_value)
{
if (result_field->is_null(0) ||
(cmp_sign > 0 ? old_nr > nr : old_nr < nr))
old_nr=nr;
result_field->set_notnull();
}
else if (result_field->is_null(0))
... | false | false | false | false | false | 0 |
fix_length_and_dec(Item *item, Item *arg) const
{
item->decimals= arg->decimals;
item->max_length= min(arg->max_length + DECIMAL_LONGLONG_DIGITS,
DECIMAL_MAX_STR_LENGTH);
} | false | false | false | false | false | 0 |
utime_nofollow_symlinks(utime_t *ut, char *path)
{
#ifdef HAVE_UTIMENSAT
UTIME_TO_TIMESPEC;
return utimensat(DEFAULT_DIR_FD, path, time, AT_SYMLINK_NOFOLLOW);
#else
UTIME_TO_TIMEVAL;
return lutimes(path, time);
#endif
} | false | false | false | false | false | 0 |
sfip_set_print_to_file(FILE *f, sfip_node_t *p)
{
for(; p; p = p->next)
{
if(!p->ip) continue;
if(p->flags & SFIP_NEGATED)
fprintf(f, "\t!%s\n", sfip_to_str(p->ip));
else
fprintf(f, "\t %s\n", sfip_to_str(p->ip));
}
} | false | false | false | false | false | 0 |
pulse_queue_enqueue(struct pri_detector *pde, u64 ts)
{
struct pulse_elem *p = pool_get_pulse_elem();
if (p == NULL) {
p = kmalloc(sizeof(*p), GFP_ATOMIC);
if (p == NULL) {
DFS_POOL_STAT_INC(pulse_alloc_error);
return false;
}
DFS_POOL_STAT_INC(pulse_allocated);
DFS_POOL_STAT_INC(pulse_used);
}
INIT... | false | false | false | false | false | 0 |
debug_game_ended (sc_gameref_t game)
{
const sc_debuggerref_t debug = debug_get_debugger (game);
/* If debugging disallowed (not initialized), ignore the call. */
if (debug)
{
/*
* Using our carnal knowledge of the run main loop, we know here that
* if the loop exited with do_restart or d... | false | false | false | false | false | 0 |
Make_Class (WidgetClass class, char *name) {
Object c;
c = Find_Object (T_Class, (GENERIC)0, Match_Xt_Obj, class);
if (Nullp (c)) {
c = Alloc_Object (sizeof (struct S_Class), T_Class, 0);
CLASS(c)->tag = Null;
CLASS(c)->wclass = class;
CLASS(c)->name = name;
Register... | false | false | false | false | false | 0 |
isValidGlueLength(string const & data, GlueLength * result)
{
// This parser is table-driven. First, it constructs a "pattern"
// that describes the sequence of tokens in "data". For example,
// "n-nu" means: number, minus sign, number, unit. As we go along,
// numbers and units are stored into static arrays. T... | false | false | false | false | false | 0 |
FCEUD_NetplayText(uint8 *text)
{
char *tot = malloc(strlen(text) + 1);
char *tmp;
strcpy(tot, text);
tmp = tot;
while(*tmp)
{
if(*tmp < 0x20) *tmp = ' ';
tmp++;
}
puts(tot);
free(tot);
} | false | true | false | false | false | 1 |
currency_manager_add_currency (CurrencyManager* self, const gchar* short_name) {
Currency* result = NULL;
GList* _tmp0_ = NULL;
const gchar* _tmp8_ = NULL;
Currency* c = NULL;
const gchar* _tmp9_ = NULL;
const gchar* _tmp10_ = NULL;
const gchar* _tmp11_ = NULL;
Currency* _tmp12_ = NULL;
Currency* _tmp13_ = NUL... | false | false | false | false | false | 0 |
PyvtkWedge_GetFaceArray(PyObject *, PyObject *args)
{
vtkPythonArgs ap(args, "GetFaceArray");
int temp0;
int sizer = 4;
PyObject *result = NULL;
if (ap.CheckArgCount(1) &&
ap.GetValue(temp0))
{
int *tempr = vtkWedge::GetFaceArray(temp0);
if (!ap.ErrorOccurred())
{
result = ap.... | false | false | false | false | false | 0 |
upd_4color_rgb(gx_device *pdev, gx_color_index color, gx_color_value prgb[3])
{
const upd_p upd = ((upd_device *)pdev)->upd;
/*
* Expand to the Component-Values
*/
prgb[0] = upd_expand(upd,1,color);
prgb[1] = upd_expand(upd,2,color);
prgb[2] = upd_expand(upd,3,color);
/* Revert our Grayscale-Trick: ... | false | false | false | false | false | 0 |
binbuf_addv(t_binbuf *x, char *fmt, ...)
{
va_list ap;
t_atom arg[MAXADDMESSV], *at =arg;
int nargs = 0;
char *fp = fmt;
va_start(ap, fmt);
while (1)
{
if (nargs >= MAXADDMESSV)
{
error("binbuf_addmessv: only %d allowed", MAXADDMESSV);
break;
... | false | false | false | false | false | 0 |
GetInPortsConnectedTo( OutPortBase & producer ) const
{
InPortsList consumers;
OutPortBase::InPortsList::iterator it;
for(it=producer.BeginVisuallyConnectedInPorts(); it!=producer.EndVisuallyConnectedInPorts(); it++)
consumers.push_back(*it);
return consumers;
} | false | false | false | false | false | 0 |
regEntity (char * sym)
{
extern int replaceFlag;
int type;
ISNSCreateHdr (ISNS_REG_DEV_ATTR_REQ, &cmd, sizeof (cmd), replaceFlag?ISNS_FLAG_REPLACE_REG:0);
ISNSAppendAttr (&cmd, ISNS_ISCSI_NODE_ID, PAD4 (strlen (CONTROL_NODE)),CONTROL_NODE, 0);
/* Delimiter */
ISNSAppendAttr (&cmd, 0, 0, NULL, 0);
... | false | false | false | false | false | 0 |
compute_fileage(int vid){
Manifest *pManifest;
ManifestFile *pFile;
int nFile = 0;
double vmtime;
Stmt ins;
Stmt q1, q2, q3;
Stmt upd;
db_multi_exec(
/*"DROP TABLE IF EXISTS temp.fileage;"*/
"CREATE TEMP TABLE fileage("
" fid INTEGER,"
" mid INTEGER,"
" mtime DATETIME,"
" pat... | false | false | false | false | false | 0 |
logging_clear(void)
{
if(LoggingFile == NULL)
{
return;
}
//Reopening with "w" will truncate the file
LoggingFile = freopen(LoggingFileName, "w", LoggingFile);
if (LoggingFile == NULL)
{
gchar *str = g_strdup_printf(_("Cannot open file %s: %s\n"), LoggingFileName, strerror(errno));
... | false | false | false | false | false | 0 |
preferences_view_on_policy_browse_click(GtkWidget * widget __attribute__ ((unused)), gpointer user_data)
{
struct pref_view *pv = (struct pref_view *)user_data;
GtkEntry *entry = GTK_ENTRY(glade_xml_get_widget(pv->xml, "PrefsViewPolicyEntry"));
assert(entry != NULL);
apol_policy_path_t *new_path;
open_policy_wind... | false | false | false | false | false | 0 |
bignew_1(klass, len, sign)
VALUE klass;
long len;
int sign;
{
NEWOBJ(big, struct RBignum);
OBJSETUP(big, klass, T_BIGNUM);
big->sign = sign?1:0;
big->len = len;
big->digits = ALLOC_N(BDIGIT, len);
return (VALUE)big;
} | false | false | false | false | false | 0 |
pdht_prox_install_republish(time_t t)
{
g_assert(NULL == pdht_proxy.publish_ev);
pdht_proxy.publish_ev = cq_main_insert(t * 1000, pdht_prox_timer, NULL);
pdht_proxy.last_delayed = tm_time();
} | false | false | false | false | false | 0 |
InitMEData()
{
// Create the arrays of prediction costs
for ( int i=m_pred_costs.First() ; i<=m_pred_costs.Last() ; ++i )
m_pred_costs[i] = new TwoDArray<MvCostData>( Mode().LengthY() , Mode().LengthX() );
// Create the arrays of vectors
for ( int i=m_inliers.First() ; i<=m_inliers.Last() ; ++i... | false | false | false | false | false | 0 |
fso_framework_kmsg_logger_real_write (FsoFrameworkAbstractLogger* base, const gchar* message) {
FsoFrameworkKmsgLogger * self;
gint _tmp0_ = 0;
const gchar* _tmp1_ = NULL;
const gchar* _tmp2_ = NULL;
gint _tmp3_ = 0;
gint _tmp4_ = 0;
self = (FsoFrameworkKmsgLogger*) base;
g_return_if_fail (message != NULL);
_t... | false | false | false | false | false | 0 |
ReadFooters(const QByteArray &, const QByteArray &payload)
{
return QSharedPointer<UdpStartPacket>(new UdpStartPacket(payload));
} | false | false | false | false | false | 0 |
common_chown(const char *path, uid_t owner, gid_t grp, int flags)
{
struct avstat stbuf;
int attrmask = 0;
stbuf.uid = owner;
stbuf.gid = grp;
if(owner != (uid_t) -1)
attrmask |= AVA_UID;
if(grp != (gid_t) -1)
attrmask |= AVA_GID;
return common_setattr(path, &stbuf, attrmask, flags)... | false | false | false | false | false | 0 |
parse(const String &str, uint32_t &result,
const ArgContext &args)
{
uint32_t x;
if (!underparse(str, false, x))
return false;
else if (status == status_range) {
args.error("out of range");
return false;
} else {
result = x;
return true;
}
} | false | false | false | false | false | 0 |
cost_tidscan(Path *path, PlannerInfo *root,
RelOptInfo *baserel, List *tidquals, ParamPathInfo *param_info)
{
Cost startup_cost = 0;
Cost run_cost = 0;
bool isCurrentOf = false;
QualCost qpqual_cost;
Cost cpu_per_tuple;
QualCost tid_qual_cost;
int ntuples;
ListCell *l;
double spc_random_page_cost;... | false | false | false | false | false | 0 |
device_block_adjust(struct crypt_device *cd,
struct device *device,
enum devcheck device_check,
uint64_t device_offset,
uint64_t *size,
uint32_t *flags)
{
int r, real_readonly;
uint64_t real_size;
if (!device)
return -ENOTBLK;
r = device_internal_prepare(cd, device);
if (r)
return r;
r = dev... | false | false | false | false | false | 0 |
logfs_read_loop(struct inode *inode, struct page *page,
int rw_context)
{
struct logfs_inode *li = logfs_inode(inode);
u64 bix, bofs = li->li_data[INDIRECT_INDEX];
level_t level, target_level;
int ret;
struct page *ipage;
logfs_unpack_index(page->index, &bix, &target_level);
if (!bofs)
return logfs_read_emp... | false | false | false | false | false | 0 |
_php_error_log_ex(int opt_err, char *message, int message_len, char *opt, char *headers TSRMLS_DC) /* {{{ */
{
php_stream *stream = NULL;
switch (opt_err)
{
case 1: /*send an email */
if (!php_mail(opt, "PHP error_log message", message, headers, NULL TSRMLS_CC)) {
return FAILURE;
}
break;
case 2:... | false | false | false | false | false | 0 |
A_FiredSpawnRock(mobj_t * actor)
{
mobj_t *mo;
int x, y, z;
int rtype = 0;
switch (P_Random() % 5)
{
case 0:
rtype = MT_FIREDEMON_FX1;
break;
case 1:
rtype = MT_FIREDEMON_FX2;
break;
case 2:
rtype = MT_FIREDEMON_FX3... | false | false | false | false | false | 0 |
rinkj_screen_eb_init (RinkjDevice *self, const RinkjDeviceParams *params)
{
RinkjScreenEb *z = (RinkjScreenEb *)self;
int n_planes = params->n_planes;
EvenBetterParams ebp;
int strengths4[] = { 128, 50, 50, 10 };
int strengths6[] = { 128, 50, 50, 25, 25, 10 };
int strengths7[] = { 128, 80, 50, 50, 25, 26, 1... | false | false | false | false | false | 0 |
btusb_open(struct hci_dev *hdev)
{
struct btusb_data *data = hci_get_drvdata(hdev);
int err;
BT_DBG("%s", hdev->name);
err = usb_autopm_get_interface(data->intf);
if (err < 0)
return err;
/* Patching USB firmware files prior to starting any URBs of HCI path
* It is more safe to use USB bulk channel for dow... | false | false | false | false | false | 0 |
vt_do_kdgkbmode(int console)
{
struct kbd_struct *kb = kbd_table + console;
/* This is a spot read so needs no locking */
switch (kb->kbdmode) {
case VC_RAW:
return K_RAW;
case VC_MEDIUMRAW:
return K_MEDIUMRAW;
case VC_UNICODE:
return K_UNICODE;
case VC_OFF:
return K_OFF;
default:
return K_XLATE;
}
} | false | false | false | false | false | 0 |
delay_refresh(GigoloBrowseNetworkPanel *panel)
{
GigoloBrowseNetworkPanelPrivate *priv = GIGOLO_BROWSE_NETWORK_PANEL_GET_PRIVATE(panel);
gdk_window_set_cursor(gigolo_widget_get_window(GTK_WIDGET(panel)), priv->wait_cursor);
/* Force the update of the cursor */
while (g_main_context_iteration(NULL, FALSE));
gigol... | false | false | false | false | false | 0 |
init(bool GUIenabled)
{
Q_UNUSED(GUIenabled);
#ifdef Q_WS_MAC
setStyle(new PsiMacStyle());
#endif
#ifdef Q_WS_X11
if ( GUIenabled ) {
const int max = 20;
Atom* atoms[max];
char* names[max];
Atom atoms_return[max];
int n = 0;
//atoms[n] = &atom_KdeNetUserTime;
//names[n++] = (char *) "_KDE_NET_USER_T... | false | false | false | false | false | 0 |
hw_var_set_opmode(struct rtw_adapter *padapter, u8 mode)
{
u8 val8;
if (mode == MSR_INFRA || mode == MSR_NOLINK) {
StopTxBeacon(padapter);
/* disable atim wnd */
val8 = DIS_TSF_UDT | EN_BCN_FUNCTION | DIS_ATIM;
SetBcnCtrlReg23a(padapter, val8, ~val8);
} else if (mode == MSR_ADHOC) {
ResumeTxBeacon(padap... | false | false | false | false | false | 0 |
gog_axis_base_set_property (GObject *obj, guint param_id,
GValue const *value, GParamSpec *pspec)
{
gboolean resized = FALSE;
char const *str;
GogAxisBase *axis_base = GOG_AXIS_BASE (obj);
int itmp;
unsigned position;
switch (param_id) {
case AXIS_BASE_PROP_POSITION:
position = g_value_get_uint (valu... | false | false | false | false | false | 0 |
Dialog_Relationships(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder)
: Dialog_Design(cobject, builder),
m_box(0)
{
builder->get_widget_derived("vbox_placeholder", m_box);
//Fill composite view:
add_view(m_box);
show_all_children();
} | false | false | false | false | false | 0 |
_frogr_model_dispose (GObject* object)
{
FrogrModel *self = FROGR_MODEL (object);
FrogrModelPrivate *priv = FROGR_MODEL_GET_PRIVATE (object);
_remove_pictures (self);
_remove_all_photosets (self);
_remove_groups (self);
_remove_all_tags (self);
if (priv->sets_table)
{
g_hash_table_destroy (pri... | false | false | false | false | false | 0 |
text_mode_pixel_to_offset(TextRender *obj, int x, int y, gboolean start_marker)
{
int line = 0;
int column = 0;
offset_type offset;
offset_type next_line_offset;
g_return_val_if_fail (obj!=NULL, 0);
g_return_val_if_fail (obj->priv->dp!=NULL, 0);
if (x<0)
x = 0;
if (y<0)
... | false | false | false | false | false | 0 |
bl_pg_test_read(struct nfs_pageio_descriptor *pgio, struct nfs_page *prev,
struct nfs_page *req)
{
if (!is_aligned_req(pgio, req, SECTOR_SIZE))
return 0;
return pnfs_generic_pg_test(pgio, prev, req);
} | false | false | false | false | false | 0 |
draw (Canvas* c, Graphic* gs) {
update(gs);
if (!gs->GetPattern()->None()) {
_p->FillRect(c, _x0, _y0, _x1, _y1);
}
if (!gs->GetBrush()->None()) {
_p->Rect(c, _x0, _y0, _x1, _y1);
}
} | false | false | false | false | false | 0 |
do_rot_90 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
jvirt_barray_ptr *src_coef_arrays,
jvirt_barray_ptr *dst_coef_arrays)
/* 90 degree rotation is equivalent to
* 1. Transposing the image;
* 2. Horizontal mirroring.
* These two steps are merged into a single processing routine.
*/
{
JDIMENSIO... | false | false | false | false | false | 0 |
gpiochip_add_to_list(struct gpio_chip *chip)
{
struct list_head *pos;
struct gpio_chip *_chip;
int err = 0;
/* find where to insert our chip */
list_for_each(pos, &gpio_chips) {
_chip = list_entry(pos, struct gpio_chip, list);
/* shall we insert before _chip? */
if (_chip->base >= chip->base + chip->ngpio)
... | false | false | false | false | false | 0 |
unpack_reverse(int n, int *list, double *buf) {
//printf("in AtomVecMeso::unpack_reverse\n");
int i, j, m;
m = 0;
for (i = 0; i < n; i++) {
j = list[i];
f[j][0] += buf[m++];
f[j][1] += buf[m++];
f[j][2] += buf[m++];
drho[j] += buf[m++];
de[j] += buf[m++];
}
} | false | false | false | false | false | 0 |
orage_tm_date_to_i18_date(struct tm *tm_date)
{
static char i18_date[32];
struct tm t;
t.tm_mday = tm_date->tm_mday;
t.tm_mon = tm_date->tm_mon - 1;
t.tm_year = tm_date->tm_year - 1900;
if (strftime(i18_date, 32, "%x", &t) == 0)
g_error("Orage: orage_tm_date_to_i18_date too long string i... | false | false | false | false | false | 0 |
populate_popup_cb (PeasGtkPluginManagerView *view,
GtkMenu *menu,
PeasGtkPluginManager *pm)
{
PeasPluginInfo *info;
GtkWidget *item;
info = peas_gtk_plugin_manager_view_get_selected_plugin (view);
if (info == NULL)
return;
item = gtk_image_menu... | false | false | false | false | false | 0 |
iscsi_initiatorname_tolower(
char *param_buf)
{
char *c;
u32 iqn_size = strlen(param_buf), i;
for (i = 0; i < iqn_size; i++) {
c = ¶m_buf[i];
if (!isupper(*c))
continue;
*c = tolower(*c);
}
} | false | false | false | false | false | 0 |
check_file_changed_cb(AW_root *aw_root, AW_CL cl_cbdata) {
fileChanged_cb_data *data = (fileChanged_cb_data*)cl_cbdata;
if (data->editorTerminated) {
delete data;
}
else {
bool changed = data->fileWasChanged();
if (changed) data->callback(data->fpath, true, false);
aw_r... | false | false | false | false | false | 0 |
BackgroundImageTransform(SplineChar *sc, ImageList *img,real transform[6]) {
if ( transform[1]==0 && transform[2]==0 && transform[0]>0 && transform[3]>0 ) {
img->xoff = transform[0]*img->xoff + transform[4];
img->yoff = transform[3]*img->yoff + transform[5];
if (( img->xscale *= transform[0])<0 ) img->xscale = -... | false | false | false | false | false | 0 |
loadRefFile(string refName) {
if (refFile.is_open()) {
refFile.close();
refPos.clear();
}
refFile.open(refName.c_str());
if (!refFile.is_open()) {
cerr << "RefFile open failed" << endl;
exit(1);
}
string refMetaName = "." + refName + ".meta";
fstream refMetaFile(refMetaName.c_str(), ios_base::in);
i... | false | false | false | false | false | 0 |
focusChange(QWidget *old, QWidget *now)
{
QWidget *w = now;
while (w && !table.contains(w))
w = w->parentWidget();
if (w && table.contains(w))
setActive(table[w]);
} | false | false | false | false | false | 0 |
si21_read_signal_strength(struct dvb_frontend *fe, u16 *strength)
{
struct si21xx_state *state = fe->demodulator_priv;
/*status = si21_readreg(state, ANALOG_AGC_POWER_LEVEL_REG,
(u8*)agclevel, 0x01);*/
u16 signal = (3 * si21_readreg(state, 0x27) *
si21_readreg(state, 0x28));
dprintk("%s : AGCPWR: 0x%0... | false | false | false | false | false | 0 |
il4965_sta_rx_agg_start(struct il_priv *il, struct ieee80211_sta *sta, int tid,
u16 ssn)
{
unsigned long flags;
int sta_id;
struct il_addsta_cmd sta_cmd;
lockdep_assert_held(&il->mutex);
sta_id = il_sta_id(sta);
if (sta_id == IL_INVALID_STATION)
return -ENXIO;
spin_lock_irqsave(&il->sta_lock, flags);
il... | false | false | false | false | false | 0 |
mousePressEvent(QMouseEvent *event)
{
if (m_gameboardFile.isEmpty()) return;
if (event->button() != Qt::LeftButton) return;
if (m_dragItem) placeDraggedItem(event->pos());
else if (!m_pickedElement.isNull()) placeNewItem(event->pos());
else
{
// see if the user clicked on the warehouse of items
QP... | false | false | false | false | false | 0 |
read(Radian* angle, size_t count)
{
for (size_t i = 0; i < count; ++i, ++angle)
{
Real rads;
read(&rads);
*angle = Radian(rads);
}
} | false | false | false | false | false | 0 |
gx_dc_devn_equal(const gx_device_color * pdevc1, const gx_device_color * pdevc2)
{
int k;
if (pdevc1->type == gx_dc_type_devn && pdevc2->type == gx_dc_type_devn) {
for (k = 0; k < GX_DEVICE_COLOR_MAX_COMPONENTS; k++) {
if (pdevc1->colors.devn.values[k] != pdevc2->colors.devn.values[k]) {
... | false | false | false | false | false | 0 |
_basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *cfdata)
{
Evas_Object *o, *ow, *ot, *rt;
E_Radio_Group *rg;
char path[PATH_MAX];
/* Content */
o = e_widget_list_add(evas, 0, 0);
rg = e_widget_radio_group_new(&(cfdata->fmdir));
ot = e_widget_table_add(evas, 0);
... | false | false | false | false | false | 0 |
SocketSearchName(struct sockaddr *sa, int fd)
{
#ifdef linux
struct vt_stat vs;
#endif
bzero(sa, sizeof(struct sockaddr));
sa->sa_family = AF_UNIX;
#if defined(linux)
if (ioctl(fd, VT_GETSTATE, &vs) < 0) {
return EOF;
}
snprintf(sa->sa_data, sizeof(sa->sa_data),
"%s%d", SOCKET_BASENAME, vs.v_active);
#elif ... | false | true | false | false | false | 1 |
sinfo_parse_cpl_input_objspider(cpl_parameterlist * cpl_cfg,cpl_frameset* sof,
cpl_frameset** stk)
{
object_config * cfg = sinfo_object_cfg_create();
int status=0;
/*
* Perform sanity checks, fill up the structure with what was
* found in the ini file
*/
parse_section_resam... | false | false | false | false | false | 0 |
ParseMDString(MDString *&Result) {
std::string Str;
if (ParseStringConstant(Str)) return true;
Result = MDString::get(Context, Str);
return false;
} | false | false | false | false | false | 0 |
fm_irq_handle_low_rssi_start(struct fmdev *fmdev)
{
if ((fmdev->rx.af_mode == FM_RX_RDS_AF_SWITCH_MODE_ON) &&
(fmdev->irq_info.flag & FM_LEV_EVENT & fmdev->irq_info.mask) &&
(fmdev->rx.freq != FM_UNDEFINED_FREQ) &&
(fmdev->rx.stat_info.afcache_size != 0)) {
fmdbg("irq: rssi level has fallen below thre... | false | false | false | false | false | 0 |
rtl8139_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
{
struct rtl8139_private *tp = netdev_priv(dev);
void __iomem *ioaddr = tp->mmio_addr;
u32 support;
u8 cfg3, cfg5;
support = ((rtl_chip_info[tp->chipset].flags & HasLWake)
? (WAKE_PHY | WAKE_MAGIC
| WAKE_UCAST | WAKE_MCAST | WAKE_BC... | false | false | false | false | false | 0 |
IsLessGlobal (
const Char * cookie1,
const Char * cookie2,
UInt byWhat )
{
if (byWhat != 2)
{
(*AbortFuncBags)("can only sort globals by cookie");
}
if (cookie1 == 0L && cookie2 == 0L)
return 0;
if (cookie1 == 0L)
return -1;
if (cookie2 == 0L)
... | false | false | false | false | false | 0 |
sslConnectTimeout(int fd, void *data)
{
SslStateData *sslState = data;
request_t *request = sslState->request;
ErrorState *err = NULL;
if (sslState->servers->peer)
hierarchyNote(&sslState->request->hier, sslState->servers->code,
sslState->servers->peer->name);
else if (Config.onoff.log_ip_on_d... | false | false | false | false | false | 0 |
resumeWeakLearners(InputData* pTrainingData)
{
if (_resumeShypFileName.empty())
return 0;
if (_verbose > 0)
cout << "Reloading strong hypothesis file <" << _resumeShypFileName << ">.." << flush;
// The class that loads the weak hypotheses
UnSerialization us;
// loads them
us.loadHypotheses(_resume... | false | false | false | false | false | 0 |
_glmEqual(GLfloat* u, GLfloat* v, GLfloat epsilon)
{
if (_glmAbs(u[0] - v[0]) < epsilon &&
_glmAbs(u[1] - v[1]) < epsilon &&
_glmAbs(u[2] - v[2]) < epsilon)
{
return GL_TRUE;
}
return GL_FALSE;
} | false | false | false | false | false | 0 |
goo_canvas_grid_get_common_property (GObject *object,
GooCanvasGridData *grid_data,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
switch (prop_id)
{
case PROP_X:
g_value_set_double (value, grid_data->x);
... | false | false | false | false | false | 0 |
xgene_dma_alloc_chan_resources(struct dma_chan *dchan)
{
struct xgene_dma_chan *chan = to_dma_chan(dchan);
/* Has this channel already been allocated? */
if (chan->desc_pool)
return 1;
chan->desc_pool = dma_pool_create(chan->name, chan->dev,
sizeof(struct xgene_dma_desc_sw),
0, 0);
if (!chan->des... | false | false | false | false | false | 0 |
mystrrev( char *p )
{
char c, *q = p;
while( *q++ )
;
q -= 2; /* pointer to the last character */
while ( p < q ) {
c = *q; /* swap */
*q-- = *p;
*p++ = c;
}
} | false | false | false | false | false | 0 |
gkrellm_alert_plugin_get_data(GkrellmAlertPlugin *gap,GkrellmAlert *alert)
{
GList *list;
GkrellmAlertPluginLink *apl;
if (!gap || !alert)
return NULL;
for (list = alert->plugin_list; list; list = list->next)
{
apl = (GkrellmAlertPluginLink *) list->data;
if (apl->alert_plugin == gap)
return apl->d... | false | false | false | false | false | 0 |
setupContent(void)
{
demoTime = 0;
mCamera->setPosition(0,35,-100);
mCamera->lookAt(0,35,0);
mSceneMgr->setAmbientLight(ColourValue(0.7, 0.7, 0.7));
mProceduralManualObjectFactory = OGRE_NEW ProceduralManualObjectFactory();
Root::getSingleton().addMovableObjectFact... | false | false | false | false | false | 0 |
go_xml_node_get_gocolor (xmlNodePtr node, char const *name, GOColor *res)
{
xmlChar *color;
int r, g, b;
color = xmlGetProp (node, CC2XML (name));
if (color == NULL)
return FALSE;
if (sscanf (CXML2C (color), "%X:%X:%X", &r, &g, &b) == 3) {
r >>= 8;
g >>= 8;
b >>= 8;
*res = GO_COLOR_FROM_RGBA (r,g,b,0xff... | false | false | false | false | false | 0 |
use_pointer_for_field (tree decl, omp_context *shared_ctx)
{
if (AGGREGATE_TYPE_P (TREE_TYPE (decl)))
return true;
/* We can only use copy-in/copy-out semantics for shared variables
when we know the value is not accessible from an outer scope. */
if (shared_ctx)
{
/* ??? Trivially accessible ... | false | false | false | false | false | 0 |
VerifyVersion(int headerVersion,
int minLibraryVersion,
const char* filename) {
if (GOOGLE_PROTOBUF_VERSION < minLibraryVersion) {
// Library is too old for headers.
GOOGLE_LOG(FATAL)
<< "This program requires version " << VersionString(minLibraryVersion)
<< "... | false | false | false | false | false | 0 |
tty_defaults()
{
if (AnsiColors == ON)
tty_writes(ansi_defaults, sizeof(ansi_defaults));
if (TTY_ATTRIBUTES_OFF)
tputs(TTY_ATTRIBUTES_OFF, 1, tty_writec);
fg_cache = INVALID_CACHE;
bg_cache = INVALID_CACHE;
br_cache = INVALID_CACHE;
rv_cache = INVALID_CACHE;
} | false | false | false | false | false | 0 |
get_object_types (void)
{
gpointer g_object_class;
gint i = 0;
object_types[i++] = goa_client_get_type ();
object_types[i++] = goa_account_get_type ();
object_types[i++] = goa_account_proxy_get_type ();
object_types[i++] = goa_account_skeleton_get_type ();
object_types[i++] = goa_manager_get... | false | false | false | false | false | 0 |
sse2_movq( struct x86_function *p, struct x86_reg dst, struct x86_reg src )
{
DUMP_RR(dst, src);
switch (dst.mod) {
case mod_REG:
emit_3ub(p, 0xf3, 0x0f, 0x7e);
emit_modrm(p, dst, src);
break;
case mod_INDIRECT:
case mod_DISP32:
case mod_DISP8:
assert(src.mod == mod_REG);
... | false | false | false | false | false | 0 |
glp_set_col_bnds(glp_prob *lp, int j, int type, double lb,
double ub)
{ GLPCOL *col;
if (!(1 <= j && j <= lp->n))
xerror("glp_set_col_bnds: j = %d; column number out of range\n"
, j);
col = lp->col[j];
col->type = type;
switch (type)
{ case GLP_FR:
... | false | false | false | false | false | 0 |
finalize (GObject *object)
{
GDataClientLoginAuthorizerPrivate *priv = GDATA_CLIENT_LOGIN_AUTHORIZER (object)->priv;
g_free (priv->username);
_gdata_service_secure_strfree (priv->password);
g_free (priv->client_id);
g_hash_table_destroy (priv->auth_tokens);
g_rec_mutex_clear (&(priv->mutex));
if (priv->proxy_u... | false | false | false | false | false | 0 |
findMDTBlock(const guchar *name,
MDTNewSpecFrame *frame)
{
guint i;
MDTBlock *block = frame->blocks;
for (i = frame->blockCount; i--; ++block)
if (gwy_strequal(block->name, name))
return block;
return NULL;
} | false | false | false | false | false | 0 |
odm_CCKPacketDetectionThresh23a(struct dm_odm_t *pDM_Odm)
{
struct false_alarm_stats *FalseAlmCnt = &pDM_Odm->FalseAlmCnt;
u8 CurCCK_CCAThres;
if (pDM_Odm->ExtLNA)
return;
if (pDM_Odm->bLinked) {
if (pDM_Odm->RSSI_Min > 25) {
CurCCK_CCAThres = 0xcd;
} else if (pDM_Odm->RSSI_Min <= 25 && pDM_Odm->RSSI_Min... | false | false | false | false | false | 0 |
clusterSaveConfig(int do_fsync) {
sds ci;
size_t content_size;
struct stat sb;
int fd;
server.cluster->todo_before_sleep &= ~CLUSTER_TODO_SAVE_CONFIG;
/* Get the nodes description and concatenate our "vars" directive to
* save currentEpoch and lastVoteEpoch. */
ci = clusterGenNodesDes... | false | false | false | false | false | 0 |
vs_image_scale_lanczos_Y_int32 (const VSImage * dest, const VSImage * src,
uint8_t * tmpbuf, double sharpness, gboolean dither, double a,
double sharpen)
{
Scale s = { 0 };
Scale *scale = &s;
int n_taps;
scale->dest = dest;
scale->src = src;
n_taps = scale1d_get_n_taps (src->width, dest->width, a,... | false | false | false | false | false | 0 |
second_arch_pass(FILE *fp) {
char buf[MAX_BUF], *variable = buf, *argument, *cp;
archetype *at = NULL, *other;
object *inv;
while (fgets(buf, MAX_BUF, fp) != NULL) {
if (*buf == '#')
continue;
if ((argument = strchr(buf, ' ')) != NULL) {
*argument = '\0', argumen... | true | true | false | false | false | 1 |
assignPrefix(SPtr<TIPv6Addr> hint, bool fake) {
SPtr<TIPv6Addr> prefix;
SPtr<TSrvOptIAPrefix> optPrefix;
SPtr<TSrvCfgPD> ptrPD;
List(TIPv6Addr) prefixLst;
SPtr<TIPv6Addr> cached;
if (hint->getPlain()==string("::") ) {
cached = SrvAddrMgr().getCachedEntry(ClntDuid, TAddrIA::TYPE_PD);
... | false | false | false | false | false | 0 |
prepare_function_start (tree fndecl)
{
if (fndecl && DECL_SAVED_INSNS (fndecl))
cfun = DECL_SAVED_INSNS (fndecl);
else
allocate_struct_function (fndecl);
init_emit ();
init_varasm_status (cfun);
init_expr ();
cse_not_expected = ! optimize;
/* Caller save not needed yet. */
caller_save_needed ... | false | false | false | false | false | 0 |
Curl_multi_process_pending_handles(struct Curl_multi *multi)
{
struct curl_llist_element *e = multi->pending->head;
while(e) {
struct SessionHandle *data = e->ptr;
struct curl_llist_element *next = e->next;
if(data->mstate == CURLM_STATE_CONNECT_PEND) {
multistate(data, CURLM_STATE_CONNECT);
... | false | false | false | false | false | 0 |
import_mbox(FolderItem *default_dest)
/* return values: -2 skipped/cancelled, -1 error, 0 OK */
{
gchar *dest_id = NULL;
import_ok = -2; // skipped or cancelled
if (!window) {
import_create();
}
else {
gtk_widget_show(window);
}
gtk_window_set_modal(GTK_WINDOW(window), TRUE);
change_dir(claws_get_startup... | false | false | false | false | false | 0 |
Datum_find_(Datum *self, void *delimsList, size_t startIndex)
{
List *delims = (List *)delimsList;
List *results = List_new();
size_t i, last = 0;
if (startIndex > self->size) return -1;
for (i = startIndex; i < self->size; i ++)
{
Datum d = Datum_datumAt_(self, i);
size_t j;
for (j = 0; j < (size_... | false | false | false | false | false | 0 |
getInstructionTypes(Instruction *I,
Type *&T1, Type *&T2) {
if (StoreInst *SI = dyn_cast<StoreInst>(I)) {
// For stores, it is the value type, not the pointer type that matters
// because the value is what will come from a vector register.
Valu... | false | false | false | false | false | 0 |
on_entity_deleted (updater_t *updater, GFile *entity)
{
g_debug ("entity deleted");
g_return_if_fail (updater);
g_return_if_fail (entity);
/* There is no way of knowing if the deleted event
* came from a file or a directory so lets give it
* a go with both actions and see what happens.
*/
if (updater_remov... | 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.