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 |
|---|---|---|---|---|---|---|
MovePointArc(Real *lim,int points,Real *coords,
Real x,Real y,Real *dx,Real *dy)
{
static int i=0;
Real sx,sy,ss,r,rat,d,x0,y0;
if(y > lim[0] && y < lim[2]) {
if(x <= coords[0]) {
d = coords[1];
}
else if(x >= coords[points-2]) {
d = coords[points-1];
}
else {
i = 1;
... | false | true | false | false | false | 1 |
_pruneRecent(void)
{
UT_sint32 i;
UT_sint32 count = getRecentCount();
if (m_iMaxRecent == 0)
{
// nuke the whole thing
for (i = count; i > 0 ; i--)
{
char * sz = m_vecRecent.getNthItem(i-1);
FREEP(sz);
}
m_vecRecent.clear();
}
else if (count > m_iMaxRecent)
{
// prune entries past m_iMaxRecen... | false | false | false | false | false | 0 |
_ISCIIReset(UConverter *cnv, UConverterResetChoice choice) {
UConverterDataISCII* data =(UConverterDataISCII *) (cnv->extraInfo);
if (choice<=UCNV_RESET_TO_UNICODE) {
cnv->toUnicodeStatus = missingCharMarker;
cnv->mode=0;
data->currentDeltaToUnicode=data->defDeltaToUnicode;
data-... | false | false | false | false | false | 0 |
dvb_channel_list_contains (DVBChannelList* self, guint sid) {
gboolean result = FALSE;
gboolean val = FALSE;
GError * _inner_error_ = NULL;
g_return_val_if_fail (self != NULL, FALSE);
{
GeeHashMap* _tmp0_ = NULL;
_tmp0_ = self->channels;
g_rec_mutex_lock (&self->priv->__lock_channels);
{
GeeHashMap* _tm... | false | false | false | false | false | 0 |
toggle_ecc_err_reporting(struct ecc_settings *s, u16 nid, bool on)
{
cpumask_var_t cmask;
int cpu;
if (!zalloc_cpumask_var(&cmask, GFP_KERNEL)) {
amd64_warn("%s: error allocating mask\n", __func__);
return false;
}
get_cpus_on_this_dct_cpumask(cmask, nid);
rdmsr_on_cpus(cmask, MSR_IA32_MCG_CTL, msrs);
fo... | false | false | false | false | false | 0 |
map_sql_table_to_xmlschema(TupleDesc tupdesc, Oid relid, bool nulls,
bool tableforest, const char *targetns)
{
int i;
char *xmltn;
char *tabletypename;
char *rowtypename;
StringInfoData result;
initStringInfo(&result);
if (OidIsValid(relid))
{
HeapTuple tuple;
Form_pg_class reltuple;
... | false | false | false | false | false | 0 |
imapx_command_queue (CamelIMAPXServer *is,
CamelIMAPXCommand *ic)
{
CamelIMAPXJob *job;
/* We enqueue in priority order, new messages have
* higher priority than older messages with the same priority */
job = camel_imapx_command_get_job (ic);
g_return_if_fail (CAMEL_IS_IMAPX_JOB (job));
c... | false | false | false | false | false | 0 |
trx_undo_page_fetch_ext(
/*====================*/
byte* ext_buf, /*!< in: buffer to hold the prefix
data and BLOB pointer */
ulint prefix_len, /*!< in: prefix size to store
in the undo log */
ulint zip_size, /*!< compressed page size in bytes,
or 0 for uncompressed BLOB */
const byte* field, /*!... | false | false | false | false | false | 0 |
db_create_restore_object_record(JCR *jcr, B_DB *mdb, ROBJECT_DBR *ro)
{
bool stat;
int plug_name_len;
POOLMEM *esc_plug_name = get_pool_memory(PM_MESSAGE);
db_lock(mdb);
Dmsg1(dbglevel, "Oname=%s\n", ro->object_name);
Dmsg0(dbglevel, "put_object_into_catalog\n");
mdb->fnl = strlen(ro->object_nam... | false | false | false | false | false | 0 |
setDirectory(const char *directory)
{
int ind;
if (directory != NULL)
{
ourDirectory = directory;
ind = strlen(directory) - 1;
if (ind < 0)
ind = 0;
if (directory[ind] != '/' && directory[ind] != '\\')
{
#ifdef WIN32
ourDirectory += "\\";
#else // win32
ourDirectory += "/";
#... | false | false | false | false | false | 0 |
my_rewrite_withcasesinfo
#ifdef KC_USE_PROTOTYPES
(withcasesinfo a_withcasesinfo)
#else
(a_withcasesinfo) withcasesinfo a_withcasesinfo;
#endif
#line 912 "../gutil.k"
{{
#line 911 "../gutil.k"
withcasesinfo kc_selvar_0_1 = a_withcasesinfo;
#line 911 "../gutil.k"
/*SUPPRESS 622*/
assert_withcasesinfo(kc_selvar_0_1, "wit... | false | false | false | true | false | 1 |
parse_string_sequence( LEXCONTEXT *pc, DBUF *parent, const char *string_term, const char *start_of_expression, int *has_follow_up )
{
int c;
STRING_PART *part;
char *eof;
#ifdef IS_REENTRANT
yyscan_t yyscanner = pc->yyscanner;
struct yyguts_t * yyg = (struct yyguts_t*) yyscanner;
#endif
YYLTYPE st... | false | false | false | false | false | 0 |
rcvmsg_update_ctx (RcvMsg *rmsg, enum ck_result_ctx ctx)
{
if (rmsg->lastctx != CK_CTX_INVALID)
{
free(rmsg->fixture_file);
reset_rcv_fixture (rmsg);
}
rmsg->lastctx = ctx;
} | false | false | false | false | false | 0 |
reginsert(struct comp* cp, int op, CHAR_TYPE* opnd)
{
register CHAR_TYPE *place;
if (!EMITTING(cp)) {
cp->regsize += 3;
return;
}
(void) memmove(opnd+3, opnd, (size_t)(cp->regcode - opnd) * sizeof(CHAR_TYPE));
cp->regcode += 3;
place = opnd; /* Op node, where operand used to be. */
*place++ = op;
*place... | false | false | false | false | false | 0 |
slot_search_fin( const std::string& id )
{
if( id != get_url() ) return;
#ifdef _DEBUG
std::cout << "ArticleViewSearch::slot_search_fin " << get_url() << std::endl;
#endif
m_loading = false;
m_list_searchdata = CORE::get_search_manager()->get_list_data();
relayout();
ARTICLE::get_admin()->se... | false | false | false | false | false | 0 |
cdUp(plString path) {
// Check for root paths, we can't go up from there!
#ifdef WIN32
if (path.mid(1) == ":\\")
return path;
#else
if (path == "/")
return path;
#endif
// Not very robust, but it works for one level of parent scanning
if (path.empty())
return ".." PATHSEPSTR... | false | false | false | false | false | 0 |
test_skiplist_remove_many(void)
{
H5SL_t *slist; /* Skip list created */
size_t num; /* Number of elements in skip list */
size_t u; /* Local index variable */
int *found_item; /* Item found in skip list */
herr_t ret; /* Generic return value */
/* Output messa... | false | false | false | false | false | 0 |
unset_terminal()
{
struct udvt_entry *original_terminal = get_udv_by_name("GNUTERM");
if (multiplot)
term_end_multiplot();
term_reset();
if (original_terminal) {
char *termname = original_terminal->udv_value.v.string_val;
term = change_term(termname, strlen(termname));
}
screen_ok = FALSE;... | false | false | false | false | false | 0 |
dither_line_color(unsigned char *src, unsigned char *dest, int y, int width)
{
register long a, b;
long *ymod, xmod;
ymod = DM[y & DITHER_MASK];
while (width--) {
xmod = width & DITHER_MASK;
b = red_dither[*(src++)];
if (ymod[xmod] < b)
b >>= 8;
a = green_dither[*(src++)];
if (... | false | false | false | false | false | 0 |
amp_group_node_update_preset_variable (AmpGroupNode *group)
{
gchar *path;
AnjutaToken *value;
AmpVariable *var;
GFile *root;
GFile *file;
AnjutaProjectNode *node;
if (group->preset_token != NULL) anjuta_token_free (group->preset_token);
group->preset_token = anjuta_token_new_static (ANJUTA_TOKEN_FILE, NULL);... | false | false | false | false | false | 0 |
read(hsStream* S, plResManager* mgr) {
fFlags = S->readShort();
if (S->readByte() != kIOVersion || fDescriptor == NULL)
throw hsBadParamException(__FILE__, __LINE__);
for (size_t i=0; i<fDescriptor->getNumVars(); i++)
fAllVars[i]->SetFromDefault();
size_t num = plSDL::VariableLengthRea... | false | false | false | false | false | 0 |
print_archive_member_sysv (char *archive, const char *filename)
{
if (undefined_only)
printf (_("\n\nUndefined symbols from %s[%s]:\n\n"), archive, filename);
else
printf (_("\n\nSymbols from %s[%s]:\n\n"), archive, filename);
if (print_width == 32)
printf (_("\
Name Value Class ... | false | false | false | false | false | 0 |
krb5_ktfileint_delete_entry(krb5_context context, krb5_keytab id, krb5_int32 delete_point)
{
krb5_int32 size;
krb5_int32 len;
char iobuf[BUFSIZ];
KTCHECKLOCK(id);
if (fseek(KTFILEP(id), delete_point, SEEK_SET)) {
return errno;
}
if (!fread(&size, sizeof(size), 1, KTFILEP(id... | false | false | false | false | true | 1 |
write(IO_CACHE* file)
{
uchar buf[16];
int8store(buf + RAND_SEED1_OFFSET, seed1);
int8store(buf + RAND_SEED2_OFFSET, seed2);
return (write_header(file, sizeof(buf)) ||
my_b_safe_write(file, buf, sizeof(buf)));
} | false | false | false | false | false | 0 |
generatePolygon(CPolyhedronPtr &poly,const vector<TPoint3D> &profile,const CPose3D &pose) {
math::TPolygon3D p(profile.size());
for (size_t i=0;i<profile.size();i++) pose.composePoint(profile[i].x,profile[i].y,profile[i].z,p[i].x,p[i].y,p[i].z);
vector<math::TPolygon3D> convexPolys;
if (!math::splitInConvexComponen... | false | false | false | false | false | 0 |
clutter_rectangle_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
ClutterRectangle *rectangle = CLUTTER_RECTANGLE(object);
switch (prop_id)
{
case PROP_COLOR:
clutter_rectangle_set_color (rectangle, clutter_value_get_color (value));
... | false | false | false | false | false | 0 |
ktti_connect ( PIA *pi )
{ pi->saved_r0 = r0();
pi->saved_r2 = r2();
w2(0xb); w2(0xa); w0(0); w2(3); w2(6);
} | false | false | false | false | false | 0 |
rt2800usb_txstatus_timeout(struct rt2x00_dev *rt2x00dev)
{
struct data_queue *queue;
struct queue_entry *entry;
tx_queue_for_each(rt2x00dev, queue) {
entry = rt2x00queue_get_entry(queue, Q_INDEX_DONE);
if (rt2800usb_entry_txstatus_timeout(entry))
return true;
}
return false;
} | false | false | false | false | false | 0 |
dmap_hash_generate (short version_major,
const guchar * url,
guchar hash_select, guchar * out, gint request_id)
{
unsigned char buf[16];
DMAPHashContext ctx;
gint i;
unsigned char *hashTable = (version_major == 3) ?
staticHash_45 : staticHash_42;
if (!staticHashDone) {
GenerateStatic_42 ();
Gen... | true | true | false | false | false | 1 |
KissDriveFigure( FsmFigure )
fsmfig_list *FsmFigure;
{
fsmtrans_list *ScanTrans;
bddnode *BddNode;
bddnode *BddTrans;
bddnode *BddOut;
KissNumberLine = 0;
KissBitInput = FsmFigure->NUMBER_IN;
KissBitLength = KissBitInput + FsmFigure->NUMBER_OUT + 1;
KissBitString = (char *)auta... | false | false | false | false | false | 0 |
gen_avx_vinsertf128v8sf (rtx operand0,
rtx operand1,
rtx operand2,
rtx operand3)
{
rtx _val = 0;
start_sequence ();
{
rtx operands[4];
operands[0] = operand0;
operands[1] = operand1;
operands[2] = operand2;
operands[3] = operand3;
#line 11803 "../../src/gcc/config/i386/sse.md"
{
switch (I... | false | false | false | false | false | 0 |
Width(UT_Dimension u) const
{
UT_ASSERT(u >= DIM_IN && u <= DIM_none);
if(m_bisPortrait == true)
return m_scale * UT_convertDimensions(m_iWidth, FUND, u);
else
return m_scale * UT_convertDimensions(m_iHeight, FUND, u);
} | false | false | false | false | false | 0 |
THX_ck_entersub_args_scalars(pTHX_ OP *entersubop, GV *namegv, SV *ckobj)
{
OP *aop = cUNOPx(entersubop)->op_first;
PERL_UNUSED_ARG(namegv);
PERL_UNUSED_ARG(ckobj);
if (!aop->op_sibling)
aop = cUNOPx(aop)->op_first;
for (aop = aop->op_sibling; aop->op_sibling; aop = aop->op_sibling) {
op_contextua... | false | false | false | false | false | 0 |
sec_pkcs12_get_pfx(SECItem *pfx_data,
SECItem *pwitem)
{
SEC_PKCS12PFXItem *pfx;
PRBool valid_pfx;
if((pfx_data == NULL) || (pwitem == NULL)) {
return NULL;
}
pfx = sec_pkcs12_decode_pfx(pfx_data);
if(pfx == NULL) {
return NULL;
}
valid_pfx = sec_pkcs12_validate_pfx(pfx, pwite... | false | false | false | false | false | 0 |
free_provider(i) {
int j,k;
for (j=0; j<Provider[i].nZone; j++) {
if (Provider[i].Zone[j].Number) free (Provider[i].Zone[j].Number);
if (Provider[i].Zone[j].Name) free (Provider[i].Zone[j].Name);
if (Provider[i].Zone[j].Flag) free (Provider[i].Zone[j].Flag);
for (k=0; k<Provider[i].Zone[j].nHour; k+... | false | false | false | false | false | 0 |
addPhase( StkFloat angle )
{
// Add a time in cycles (one cycle = fileSize).
StkFloat fileSize = file_.fileSize();
time_ += fileSize * angle;
while ( time_ < 0.0 )
time_ += fileSize;
while ( time_ >= fileSize )
time_ -= fileSize;
} | false | false | false | false | false | 0 |
print_omega_parameters(__isl_keep isl_space *dim,
__isl_take isl_printer *p)
{
if (isl_space_dim(dim, isl_dim_param) == 0)
return p;
p = isl_printer_start_line(p);
p = isl_printer_print_str(p, "symbolic ");
p = print_var_list(p, dim, isl_dim_param);
p = isl_printer_print_str(p, ";");
p = isl_printer_end_line(... | false | false | false | false | false | 0 |
_entry_paste_request_signal_cb(void *data,
Evas_Object *obj EINA_UNUSED,
const char *emission,
const char *source EINA_UNUSED)
{
Ecore_X_Window xwin;
E_Win *win;
E_Container *con;
if (!(win = e_win_evas_object_win_get(data)))
{
xwin = e_grabinput_key_win_get();
if ... | false | false | false | false | false | 0 |
pushInput(InputSource *in)
{
if (!in)
return;
if (!syntax_.isNull() && syntax_->multicode())
in->setMarkupScanTable(syntax_->markupScanTable());
inputStack_.insert(in);
inputLevel_++;
if (specialParseInputLevel_ > 0 && inputLevel_ > specialParseInputLevel_)
currentMode_ = rcconeMode; // mode for r... | false | false | false | false | false | 0 |
glusterd_nodesvc_unlink_socket_file (char *server)
{
int ret = 0;
char sockfpath[PATH_MAX] = {0,};
char rundir[PATH_MAX] = {0,};
glusterd_conf_t *priv = THIS->private;
glusterd_get_nodesvc_rundir (server, priv->workdir,
... | true | true | false | false | false | 1 |
writeTimeoutCbk (TimeoutId id, void *data)
{
Connection cxn = (Connection) data ;
const char *peerName ;
ASSERT (id == cxn->writeBlockedTimerId) ;
ASSERT (cxn->state == cxnConnectingS ||
cxn->state == cxnFeedingS ||
cxn->state == cxnFlushingS ||
cxn->state == cxnClosingS) ;
VALI... | false | false | false | false | false | 0 |
gl124_init_regs_for_coarse_calibration (Genesys_Device * dev)
{
SANE_Status status;
uint8_t channels;
uint8_t cksel;
DBGSTART;
cksel = (dev->calib_reg[reg_0x18].value & REG18_CKSEL) + 1; /* clock speed = 1..4 clocks */
/* set line size */
if (dev->settings.scan_mode == SCAN_MODE_COLOR) /* single pass co... | false | false | false | false | false | 0 |
ocfs2_metadata_cache_io_lock(struct ocfs2_caching_info *ci)
{
BUG_ON(!ci || !ci->ci_ops);
ci->ci_ops->co_io_lock(ci);
} | false | false | false | false | false | 0 |
handle_string_return (const char *sname, void *ptr)
{
const char *s = get_string_by_name(sname);
char *ret = NULL;
int err = 0;
if (s == NULL) {
err = E_DATA;
} else {
ret = gretl_strdup(s);
if (ret == NULL) {
err = E_ALLOC;
}
}
*(char **) ptr = ret;
return err;
} | false | false | false | false | false | 0 |
print_c2plane(FILE *prn_stream, char plane_code, int plane_size,
const byte *curr, byte *out_data)
{
/*
* Compress the output data
*/
int out_count = gdev_pcl_mode2compress((const word *)curr,
(const word *)(curr +plane_size -2), out_data);
/*
* Send it out
*/
fpri... | false | false | false | false | false | 0 |
http_set_ssl_params(Http *h, Dsvec *v)
{
if (h->ssl_args != NULL)
dsvec_free(h->ssl_args);
if (v == NULL || dsvec_len(v) == 0)
h->ssl_args = NULL;
else {
int i;
char *a;
Ds ds;
/*
* XXX this is a crock because it assumes that sslclient is being used
* support for other SSL programs should probably be... | false | false | false | false | false | 0 |
Volume()
{
// This routine can be called from outside.
//
// Given a set of n data points (x[i],y[i]) and function values
// z[i]=f(x[i],y[i]) and a triangulation covering the convex hull h of the
// data points, this function approximates the integral of f over h by
// integrating the piecewise linear inte... | false | false | false | false | false | 0 |
readLine()
{
m_buffer.clear();
while (*m_In != 0)
{
if (!IsEOL(*m_In))
{
m_buffer.push_back(*m_In);
}
++m_In;
if (IsEOL(*m_In))
{
// if CRLF (two chars) peek next char (avoid duplicating empty-lines)
if (*m_In != *(m_In +... | false | false | false | false | false | 0 |
e2_task_find_last_running_child (gboolean anytab)
{
E2_TaskRuntime *rt;
GList *member;
pthread_mutex_lock (&task_mutex);
member = g_list_last (app.taskhistory);
pthread_mutex_unlock (&task_mutex);
//backwards scan, don't bother locking at end of loop
for (; member != NULL; member = member->prev)
{
rt = (E2_Ta... | false | false | false | false | false | 0 |
gt_hmm_has_valid_initial_state_probs(const GtHMM *hmm)
{
unsigned int state;
double sum_of_probabilities = 0.0;
gt_assert(hmm);
for (state = 0; state < hmm->num_of_states; state++)
sum_of_probabilities += gt_hmm_get_initial_state_probability(hmm, state);
return gt_double_equals_one(sum_of_probabilities... | false | false | false | false | false | 0 |
gda_sqlite_provider_unescape_string (G_GNUC_UNUSED GdaServerProvider *provider, G_GNUC_UNUSED GdaConnection *cnc, const gchar *string)
{
glong total;
gchar *ptr;
gchar *retval;
glong offset = 0;
if (!string)
return NULL;
total = strlen (string);
retval = g_memdup (string, total+1);
ptr = (gchar *) retval;
... | false | false | false | false | false | 0 |
butterfly_paged_write(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
unsigned int page_size,
unsigned int addr, unsigned int n_bytes)
{
unsigned int max_addr = addr + n_bytes;
char *cmd;
unsigned int blocksize = PDATA(pgm)->buffersize;
int use_ext_ad... | false | true | false | false | true | 1 |
zero_mark_widths_by_gdef (hb_buffer_t *buffer)
{
unsigned int count = buffer->len;
for (unsigned int i = 0; i < count; i++)
if (_hb_glyph_info_is_mark (&buffer->info[i]))
{
buffer->pos[i].x_advance = 0;
buffer->pos[i].y_advance = 0;
}
} | false | false | false | false | false | 0 |
show_version(struct seq_file *m, void *unused)
{
struct super_block *sb = m->private;
char *format;
if (REISERFS_SB(sb)->s_properties & (1 << REISERFS_3_6)) {
format = "3.6";
} else if (REISERFS_SB(sb)->s_properties & (1 << REISERFS_3_5)) {
format = "3.5";
} else {
format = "unknown";
}
seq_printf(m, "%s... | false | false | false | false | false | 0 |
guess_remove_link_cache(const gnet_host_t *h)
{
gnet_host_t *atom;
struct qkdata *qk;
if G_UNLIKELY(NULL == db_qkdata)
return; /* GUESS layer shut down */
/*
* First handle possible removal from the persistent cache.
*/
qk = get_qkdata(h);
if (qk != NULL) {
double p = guess_entry_still_alive(qk);
i... | false | false | false | false | false | 0 |
dpm_list_fs_entry(dbfd, bol, poolname, fs_entry, endlist, dblistptr)
struct dpm_dbfd *dbfd;
int bol;
char *poolname;
struct dpm_fs *fs_entry;
int endlist;
DBLISTPTR *dblistptr;
{
char escaped_poolname[CA_MAXPOOLNAMELEN*2+1];
char func[18];
static char query[] =
"SELECT \
POOLNAME, SERVER, FS, STATUS, WEIGHT \
... | false | false | false | false | false | 0 |
free_var (var_store_ptr value, parser_env_ptr pe)
{
if (value == NULL)
return;
/* first check that not a named variable */
if (value->variable_name != NULL)
return;
value->use_flag = UNUSED_VAR;
if (value->value)
{
pe->free_numeric (value->value);
value->value ... | false | false | false | false | false | 0 |
jac_d(const Vector& x)
{
DBG_START_METH("RestoIpoptNLP::jac_d", dbg_verbosity);
// Here, we set the (0,0) block with the values from the
// original jac_d and set the factor for the -I (jac w.r.t. p_d)
// get out the x_only part
const CompoundVector* c_vec = static_cast<const CompoundVector*>(&x... | false | false | false | false | false | 0 |
plotBlip(blip *b, int *x, int *y)
{
float zdist, rscale;
vec3d *pos = &b->position;
if (b->dist < pos->xyz.z) {
rscale = 0.0f;
} else {
rscale = (float) acos(pos->xyz.z / b->dist) / PI; //2.0f;
}
zdist = fl_sqrt((pos->xyz.x * pos->xyz.x) + (pos->xyz.y * pos->xyz.y));
float new_x_dist, clipped_x_dist;
... | false | false | false | false | false | 0 |
GetNamedProperty(JSContext *cx, JSXML *xml, JSObject* nameqn, JSXML *list)
{
JSXMLArray *array;
JSXMLNameMatcher matcher;
JSBool attrs;
if (xml->xml_class == JSXML_CLASS_LIST) {
JSXMLArrayCursor cursor(&xml->xml_kids);
while (JSXML *kid = (JSXML *) cursor.getNext()) {
if (ki... | false | false | false | false | false | 0 |
UpdatePalette( void )
{
int bank;
for( bank=0; bank<0x20; bank++ )
{
int pen = bank*256;
int offset = ((pen & 0x1800) << 2) | (pen & 0x07ff);
int i;
for( i=0; i<256; i++ )
{
int r = namcos2_68k_palette_ram[offset | 0x0000] & 0x00ff;
int g = namcos2_68k_palette_ram[offset | 0x0800] & 0x00ff... | false | false | false | false | false | 0 |
operator!=(const Current& __rhs) const
{
if(this == &__rhs)
{
return false;
}
if(adapter != __rhs.adapter)
{
return true;
}
if(con != __rhs.con)
{
return true;
}
if(id != __rhs.id)
{
return true;
}
if(facet != __rhs.facet)
{
return true;
}
if(operatio... | false | false | false | false | false | 0 |
etcta_add_one (ETableClickToAdd *etcta,
ETableModel *one)
{
etcta->one = one;
if (etcta->one)
g_object_ref (etcta->one);
if (etcta->row)
gnome_canvas_item_set (
GNOME_CANVAS_ITEM (etcta->row),
"ETableModel", one,
NULL);
g_object_set (
etcta->selection,
"model", one,
NULL);
} | false | false | false | false | false | 0 |
gkm_transaction_complete(GkmTransaction *self)
{
gboolean critical = FALSE;
g_return_if_fail (GKM_IS_TRANSACTION (self));
g_return_if_fail (!self->completed);
g_signal_emit (self, signals[COMPLETE], 0, &critical);
g_assert (self->completed);
if (!self->failed && critical) {
g_warning ("transaction failed to c... | false | false | false | false | false | 0 |
exidy_stream_update(int param, INT16 *buffer, int length)
{
int noisy = ((sh6840_timer[0].cr & sh6840_timer[1].cr & sh6840_timer[2].cr & 0x02) == 0);
/* loop over samples */
while (length--)
{
struct sh6840_timer_channel *t;
struct sh8253_timer_channel *c;
int clocks_this_sample;
INT16 sample = 0... | false | false | false | false | false | 0 |
ListFromArgs(char *string)
/* Splits a string with quoted components etc */
{ struct Item *ip = NULL;
int inquotes_level = 0,i = 0,argc=0;
int inquote_level = 0;
int paren_level = 0;
char *sp,lastch = '\0';
char item[CF_BUFSIZE];
memset(item,0,CF_BUFSIZE);
for (sp = string; *sp != '\0'; sp++)
{
... | false | false | false | false | true | 1 |
uart_handle_dcd_change(struct uart_port *uport, unsigned int status)
{
struct tty_port *port = &uport->state->port;
struct tty_struct *tty = port->tty;
struct tty_ldisc *ld;
lockdep_assert_held_once(&uport->lock);
if (tty) {
ld = tty_ldisc_ref(tty);
if (ld) {
if (ld->ops->dcd_change)
ld->ops->dcd_chan... | false | false | false | false | false | 0 |
drill_stats_add_to_drill_list(gerbv_drill_list_t *drill_list_in,
int drill_num_in, double drill_size_in,
char *drill_unit_in) {
gerbv_drill_list_t *drill_list_new;
gerbv_drill_list_t *drill;
gerbv_drill_list_t *drill_last = NULL;
dprintf ("%s(%p, %d, %g, \"%s\")\n", __FUNCTION__, dr... | false | false | false | true | false | 1 |
trace_registrations( struct peer_info * scan )
{
macstr_t mac_buf;
ipstr_t ip_buf;
while ( scan )
{
traceEvent(TRACE_INFO, "=== peer [mac=%s][socket=%s:%hu]",
macaddr_str(scan->mac_addr, mac_buf, sizeof(mac_buf)),
intoa(ntohl(scan->public_ip.addr_type.v4_addr), ip_buf, sizeof(ip_buf)),
ntohs(s... | false | false | false | false | false | 0 |
WriteOutOneItem(struct auto_string *shipstr, item *ItemToWriteOut)
{
autostr_append(shipstr, "%s%s\" %s%f %s%f ", ITEM_NAME_STRING, ItemMap[ItemToWriteOut->type].item_name,
ITEM_POS_X_STRING, ItemToWriteOut->pos.x, ITEM_POS_Y_STRING, ItemToWriteOut->pos.y);
if (ItemToWriteOut->armor_class) {
autostr_append(shi... | false | false | false | false | false | 0 |
mca_sharedfp_base_find_available(bool enable_progress_threads,
bool enable_mpi_threads)
{
opal_list_item_t *item, *next;
mca_base_component_list_item_t *cli;
/* The list of components which we should check is already present
in ompi_sharedfp_base_framework.frame... | false | false | false | false | false | 0 |
btreeNumbucketIdlist(AjPBtcache cache, ajulong pagepos,
AjPList idlist)
{
AjPBtNumId num = NULL;
AjPBtpage page = NULL;
unsigned char *buf = NULL;
unsigned char *pptr = NULL;
ajuint nodetype = 0U;
ajuint nentries = 0U;
ajulong overflow = 0U... | false | false | false | false | false | 0 |
evas_common_scale_rgba_in_to_out_clip_sample_do(const Cutout_Rects *reuse,
const Eina_Rectangle *clip,
RGBA_Image *src, RGBA_Image *dst,
RGBA_Draw_Context *dc,
... | false | false | false | false | false | 0 |
GetReadData(size_t* size) {
CritScope cs(&crit_);
*size = (read_position_ + data_length_ <= buffer_length_) ?
data_length_ : buffer_length_ - read_position_;
return &buffer_[read_position_];
} | false | false | false | false | false | 0 |
EmitInstrWithCustomInserter(MachineInstr *MI,
MachineBasicBlock *BB) const {
switch (MI->getOpcode()) {
default: llvm_unreachable("Unknown SELECT_CC!");
case SP::SELECT_CC_Int_ICC:
case SP::SELECT_CC_FP_ICC:
case SP::SELECT_CC_DFP_ICC:
case SP::SELECT_CC_QFP_... | false | false | false | false | false | 0 |
ips_program_bios_memio(ips_ha_t * ha, char *buffer, uint32_t buffersize,
uint32_t offset)
{
int i;
int timeout;
uint8_t status = 0;
METHOD_TRACE("ips_program_bios_memio", 1);
status = 0;
for (i = 0; i < buffersize; i++) {
/* write a byte */
writel(i + offset, ha->mem_ptr + IPS_REG_FLAP);
if (ha-... | false | false | false | false | false | 0 |
suspend_i (ACE_HANDLE handle)
{
ACE_TRACE ("ACE_XtReactor::suspend_i");
int result = ACE_Select_Reactor::suspend_i (handle);
if (result == -1)
return -1;
synchronize_XtInput (handle);
return 0;
} | false | false | false | false | false | 0 |
trace_module_remove_events(struct module *mod)
{
struct trace_event_call *call, *p;
bool clear_trace = false;
down_write(&trace_event_sem);
list_for_each_entry_safe(call, p, &ftrace_events, list) {
if (call->mod == mod) {
if (call->flags & TRACE_EVENT_FL_WAS_ENABLED)
clear_trace = true;
__trace_remove_... | false | false | false | false | false | 0 |
manager_cleanup(DBusConnection *conn, const char *path)
{
while (adapters) {
struct btd_adapter *adapter = adapters->data;
adapters = g_slist_remove(adapters, adapter);
adapter_remove(adapter);
btd_adapter_unref(adapter);
}
btd_start_exit_timer();
g_dbus_unregister_interface(conn, "/", MANAGER_INTERFACE)... | false | false | false | false | false | 0 |
git_diff_finalize (GObject *object)
{
GiggleGitDiffPriv *priv;
priv = GET_PRIV (object);
if (priv->rev1) {
g_object_unref (priv->rev1);
}
if (priv->rev2) {
g_object_unref (priv->rev2);
}
g_free (priv->result);
g_list_free_full (priv->files, g_free);
if (priv->patch_format) {
g_object_unref (priv->p... | false | false | false | false | false | 0 |
r200_validate_texture(struct gl_context *ctx, struct gl_texture_object *texObj, int unit)
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
radeonTexObj *t = radeon_tex_obj(texObj);
if (!radeon_validate_texture_miptree(ctx, _mesa_get_samplerobj(ctx, unit), texObj))
return GL_FALSE;
r200_validate_texgen(ct... | false | false | false | false | false | 0 |
SECU_GetPasswordString(void *arg, char *prompt)
{
#ifndef _WINDOWS
char *p = NULL;
FILE *input, *output;
/* open terminal */
input = fopen(consoleName, "r");
if (input == NULL) {
fprintf(stderr, "Error opening input terminal for read\n");
return NULL;
}
output = fopen(consoleName, "w");
... | false | false | false | false | true | 1 |
finalizeTemplate(HttpRoute *route)
{
MprBuf *buf;
char *sp, *tplate;
if ((buf = mprCreateBuf(0, 0)) == 0) {
return 0;
}
/*
Note: the route->pattern includes the prefix
*/
for (sp = route->pattern; *sp; sp++) {
switch (*sp) {
default:
mprPutCh... | false | false | false | false | false | 0 |
Lee_encode( struct Len_encoder * const len_encoder,
struct Range_encoder * const renc,
int symbol, const int pos_state )
{
symbol -= min_match_len;
if( symbol < len_low_symbols )
{
Re_encode_bit( renc, &len_encoder->choice1, 0 );
Re_encode_tree( renc, len_encoder->bm_... | false | false | false | false | false | 0 |
BN_to_ASN1_ENUMERATED(BIGNUM *bn, ASN1_ENUMERATED *ai)
{
ASN1_ENUMERATED *ret;
int len,j;
if (ai == NULL)
ret=M_ASN1_ENUMERATED_new();
else
ret=ai;
if (ret == NULL)
{
ASN1err(ASN1_F_BN_TO_ASN1_ENUMERATED,ERR_R_NESTED_ASN1_ERROR);
goto err;
}
if(BN_is_negative(bn)) ret->type = V_ASN1_NEG_ENUMERATED;
... | false | false | false | false | false | 0 |
add_data_entry (bfd * abfd,
struct internal_extra_pe_aouthdr *aout,
int idx,
char *name,
bfd_vma base)
{
asection *sec = bfd_get_section_by_name (abfd, name);
/* Add import directory information if it exists. */
if ((sec != NULL)
&& (coff_section_data (abfd, sec) != NULL)
&& (pei_section_dat... | false | false | false | false | false | 0 |
make_expanding_array(int init_size, int compact) {
ExpandingArray *A = (ExpandingArray *)malloc(sizeof(ExpandingArray));
if (!A) {
if (MATR_DEBUG_MODE) {
fprintf(stderr, "Could not create expanding array.\n");
}
return NULL;
}
if (init_size < 0) {
init_size = 0;
}
A->length = init_s... | false | true | false | false | true | 1 |
gst_video_overlay_rectangle_get_pixels_unscaled_argb (GstVideoOverlayRectangle *
rectangle, GstVideoOverlayFormatFlags flags)
{
g_return_val_if_fail (GST_IS_VIDEO_OVERLAY_RECTANGLE (rectangle), NULL);
return gst_video_overlay_rectangle_get_pixels_raw_internal (rectangle,
flags, TRUE, GST_VIDEO_OVERLAY_CO... | false | false | false | false | false | 0 |
get_data(unsigned long size)
{
z_stream stream;
void *buf = xmalloc(size);
memset(&stream, 0, sizeof(stream));
stream.next_out = buf;
stream.avail_out = size;
stream.next_in = fill(1);
stream.avail_in = len;
inflateInit(&stream);
for (;;) {
int ret = inflate(&stream, 0);
use(len - stream.avail_in);
if... | false | false | false | false | false | 0 |
_ds_pref_val(
agent_pref_t PTX,
const char *attrib)
{
agent_attrib_t pref;
int i;
if (PTX == NULL)
return "";
for(i=0;PTX[i];i++) {
pref = PTX[i];
if (!strcasecmp(pref->attribute, attrib))
return pref->value;
}
return "";
} | false | false | false | false | false | 0 |
on_save_diff_clicked (GtkButton *button,
gpointer user_data)
{
int i = GPOINTER_TO_UINT(gtk_widget_get_data_top(GTK_WIDGET(button),"imagenum"));
if(sp->im_mesh_diff[i]==NULL) {
GtkWidget *m=create_menu_of_images(i,diff_save_it,TRUE);
... | false | false | false | false | false | 0 |
orig_tty(int fd)
{
int slot; /* the saved descriptor slot or -1 */
/*
* find the saved slot for this descriptor
*/
slot = find_tty_state(fd);
if (slot < 0) {
if (conf->calc_debug & CALCDBG_TTY)
printf("orig_tty: Cannot get saved descriptor slot\n");
return FALSE;
}
/*
* do nothing if no state was s... | false | false | false | false | false | 0 |
isofs_dentry_cmp_common(
unsigned int len, const char *str,
const struct qstr *name, int ms, int ci)
{
int alen, blen;
/* A filename cannot end in '.' or we treat it like it has none */
alen = name->len;
blen = len;
if (ms) {
while (alen && name->name[alen-1] == '.')
alen--;
while (blen && str[blen-1] ... | false | false | false | false | false | 0 |
vt_kmsg_redirect(int new)
{
static int kmsg_con;
if (new != -1)
return xchg(&kmsg_con, new);
else
return kmsg_con;
} | false | false | false | false | false | 0 |
qrp_add_file(const shared_file_t *sf, htable_t *words)
{
word_vec_t *wovec;
uint wocnt;
uint i;
g_assert(sf != NULL);
g_assert(words != NULL);
/*
* Copy filename to buffer, since we're going to map it inplace.
*/
g_assert(utf8_is_valid_data(shared_file_name_nfc(sf),
shared_file_name_nfc_len(sf)));
g_... | false | false | false | false | false | 0 |
find_word()
{
static char SEPS[] = "#;&|^$=`'{}()<>\n\t ";
ECHAR *p;
ECHAR *new;
ESIZE_T len;
for (p = &Line[Point]; p > Line && strchr(SEPS, (char)p[-1]) == NULL; p--)
continue;
len = Point - (p - Line) + 1;
if ((new = NEW(ECHAR, len)) == NULL)
return NULL;
COPYFROMTO(new, p, len);
... | false | false | false | false | false | 0 |
tsmux_program_set_pcr_stream (TsMuxProgram * program, TsMuxStream * stream)
{
g_return_if_fail (program != NULL);
if (program->pcr_stream == stream)
return;
if (program->pcr_stream != NULL)
tsmux_stream_pcr_unref (program->pcr_stream);
if (stream)
tsmux_stream_pcr_ref (stream);
program->pcr_stre... | false | false | false | false | false | 0 |
executePostLayoutBinding(MCAssembler &Asm,
const MCAsmLayout &Layout) {
// "Define" each section & symbol. This creates section & symbol
// entries in the staging area.
for (const auto &Section : Asm)
defineSection(static_cast<const MCSectionCOFF &>(Section))... | false | false | false | false | false | 0 |
readstr(int fd, char *a, int n)
{
int i;
for (i=0; i<n; i++)
{
if (read(fd, a+i, 1) != 1)
return -1;
if (a[i] == '\n')
{
a[i] = 0;
return i;
}
}
return n;
} | false | false | false | false | false | 0 |
_fill_actions(E_Config_Dialog_Data *cfdata)
{
Evas *evas;
Eina_List *l, *ll;
E_Action_Group *grp;
E_Action_Description *dsc;
int mw;
evas = evas_object_evas_get(cfdata->o_actions);
evas_event_freeze(evas);
edje_freeze();
e_widget_ilist_freeze(cfdata->o_actions);
e_widget_ilist_clear(cfdat... | 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.