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 |
|---|---|---|---|---|---|---|
do_grow(ObActionsData *data, gint x, gint y, gint w, gint h)
{
gint realw, realh, lw, lh;
realw = w;
realh = h;
client_try_configure(data->client, &x, &y, &realw, &realh,
&lw, &lh, TRUE);
/* if it's going to be resized smaller than it intended, don't
move the window ... | false | false | false | false | false | 0 |
dump_dot_forward() {
if(global_cfg.graph_out == NULL) return "";
stringstream out;
out << "digraph reaction_graph {" << endl;
out << " rankdir=LR;" << endl;
//string terminals = "LR_1 LR_2 LR_3";
//out << "node [shape = doublecircle];" << terminals << ";" << endl;
out << " node [shape = none];" << endl;
... | false | false | false | false | false | 0 |
gupnp_service_proxy_send_action_list (GUPnPServiceProxy *proxy,
const char *action,
GError **error,
GList *in_names,
GList *in_... | false | false | false | false | false | 0 |
vorbis_encode_global_psych_setup(vorbis_info *vi,double s,
vorbis_info_psy_global *in,
double *x){
int i,is=s;
double ds=s-is;
codec_setup_info *ci=vi->codec_setup;
vorbis_info_psy_global *g=&ci->psy_g_param;
memcpy(g,in+(int)x[is],sizeof(*g));
ds=x[is]*(1.-ds)+x[is+1]*ds;
is=(int... | false | false | false | false | false | 0 |
append_worklist_foreach(GtkTreeModel *model, GtkTreePath *path,
GtkTreeIter *iter, gpointer data)
{
const struct worklist *pwl = data;
struct city *pcity = city_model_get(model, iter);
fc_assert_ret(pwl != NULL);
if (NULL != pcity) {
city_queue_insert_worklist(pcity, -1... | false | false | false | false | false | 0 |
RotateLeft(Vector *AL, size_t n)
{
char *p,*q,*t;
if (AL == NULL) return NullPtrError("RotateLeft");
if (AL->Flags & CONTAINER_READONLY)
return ErrorReadOnly(AL,"RotateLeft");
if (AL->count == 0 || n == 0) return 0;
n %= AL->count;
if (n == 0)
return 1;
/* Reverse the first ... | false | false | false | false | false | 0 |
add_bit_size_attribute (die, decl)
dw_die_ref die;
tree decl;
{
/* Must be a field and a bit field. */
if (TREE_CODE (decl) != FIELD_DECL
|| ! DECL_BIT_FIELD_TYPE (decl))
abort ();
if (host_integerp (DECL_SIZE (decl), 1))
add_AT_unsigned (die, DW_AT_bit_size, tree_low_cst (DECL_SIZE (dec... | false | false | false | false | false | 0 |
differentiate(const FPOLY1* q, const FPOLY1* i, double* time, METHOD method)
{
if (CKT_BASE::_sim->analysis_is_static()) {
assert(time[0] == 0.);
return FPOLY1(q[0].x, 0., 0.);
}else if (CKT_BASE::_sim->analysis_is_restore()) {
/* leave it alone to restart from a previous solution */
/* it goes this... | false | false | false | false | false | 0 |
sendValues(ValArr *va)
{
Value *cst;
int i, nu;
gSendInt(va->nents);
gSendInt(va->nptrs);
gSendInt(0/*va->nints*/);
gSendInt(va->nchars);
for (i = 0; i < va->nents; i++) {
gSendInt(va->ents[i].id & ~C_PRIVATE);
switch (va->ents[i].id & C_TYPE_MASK) {
case C_TYPE_INT:... | false | false | false | false | false | 0 |
save_smime_config_vars(struct pine *ps)
{
struct variable *vreal;
SAVED_CONFIG_S *vsave, *v;
vsave = (SAVED_CONFIG_S *)fs_get((V_LAST_VAR+1)*sizeof(SAVED_CONFIG_S));
memset((void *)vsave, 0, (V_LAST_VAR+1)*sizeof(SAVED_CONFIG_S));
v = vsave;
for(vreal = ps->vars; vreal->name; vreal++,v++){
if(... | false | false | false | false | false | 0 |
isDestinationValid_pageNumber( const Poppler::LinkDestination *dest, const Poppler::Document *doc )
{
return dest->pageNumber() > 0 && dest->pageNumber() <= doc->numPages();
} | false | false | false | false | false | 0 |
__connman_notifier_service_remove(struct connman_service *service)
{
GSList *list;
if (g_hash_table_lookup(service_hash, service) != NULL) {
/*
* This is a tempory check for consistency. It can be
* removed when there are no reports for the following
* error message.
*/
connman_error("Service state m... | false | false | false | false | false | 0 |
vec3fromVec4(vec3 *pOut, const vec4 *pV) {
if(pV->v[3] != 0) {
pOut->v[0] = pV->v[0] / pV->v[3];
pOut->v[1] = pV->v[1] / pV->v[3];
pOut->v[2] = pV->v[2] / pV->v[3];
return pOut;
} else {
memset(pOut, 0, sizeof(vec3));
return NULL;
}
} | false | false | false | false | false | 0 |
flmIncrField(
FlmRecord * pRecord,
FLMUINT uiTagNum)
{
RCODE rc = FERR_OK;
void * pvField;
if( (pvField = pRecord->find( pRecord->root(), uiTagNum, 1)) != NULL)
{
FLMUINT uiNum;
if( RC_OK( rc = pRecord->getUINT( pvField, &uiNum)))
{
uiNum++;
rc = pRecord->setUINT( pvField, uiNum);
}
}
... | false | false | false | false | false | 0 |
iobase_writelines(PyObject *self, PyObject *args)
{
PyObject *lines, *iter, *res;
if (!PyArg_ParseTuple(args, "O:writelines", &lines)) {
return NULL;
}
if (_PyIOBase_check_closed(self, Py_True) == NULL)
return NULL;
iter = PyObject_GetIter(lines);
if (iter == NULL)
ret... | false | false | false | false | false | 0 |
ipmi_ping_setup (int argc,
char **argv,
unsigned int min_sequence_number,
unsigned int max_sequence_number,
const char *options)
{
char *valid_options = "hVciItvrsd:";
char *ptr;
char c;
if (argc <= 0 || !argv || !options)
{
fprintf ... | false | false | false | false | false | 0 |
e_int_config_deskenv(E_Container *con, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
if (e_config_dialog_find("E", "windows/desktop_environments"))
return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
/* methods */
v->create_cfdata = _create_data;
v->free_cfdata... | false | false | false | false | false | 0 |
init_plugin (Plugin *p)
{
#define ANAME "crypt"
aname = _("crypt");
p->signature = ANAME VERSION;
p->menu_name = _("_En/decrypt..");
p->description = _("Encrypt or decrypt selected items");
p->icon = "plugin_"ANAME"_"E2IP".png"; //use icon file pathname if appropriate
if (p->action == NULL)
{
//no need to f... | false | false | false | false | false | 0 |
regcache_rbtree_insert(struct regmap *map, struct rb_root *root,
struct regcache_rbtree_node *rbnode)
{
struct rb_node **new, *parent;
struct regcache_rbtree_node *rbnode_tmp;
unsigned int base_reg_tmp, top_reg_tmp;
unsigned int base_reg;
parent = NULL;
new = &root->rb_node;
while (*new) {
rbnode_tmp = ... | false | false | false | false | false | 0 |
request_parse(u8 *packet, int length, struct evdns_server_port *port, struct sockaddr *addr, ev_socklen_t addrlen)
{
int j = 0; /* index into packet */
u16 _t; /* used by the macros */
char tmp_name[256]; /* used by the macros */
int i;
u16 trans_id, flags, questions, answers, authority, additional;
struct serv... | true | true | false | false | false | 1 |
poll() {
int retval;
vector<std::string> urls;
bool changed;
switch(state) {
case SCHEDULER_OP_STATE_GET_MASTER:
// here we're fetching the master file for a project
//
if (http_op.http_op_state == HTTP_STATE_DONE) {
state = SCHEDULER_OP_STATE_IDLE;
c... | false | false | false | true | false | 1 |
CMD_reset_window (PKV_DEV dev)
{
KV_CMD_HEADER hdr;
KV_CMD_RESPONSE rs;
SANE_Status status;
DBG (DBG_proc, "CMD_reset_window\n");
memset (&hdr, 0, sizeof (hdr));
hdr.direction = KV_CMD_NONE;
hdr.cdb_size = 10;
hdr.cdb[0] = SCSI_SET_WINDOW;
status = kv_send_command (dev, &hdr, &rs);
if (rs.status... | false | false | false | false | false | 0 |
mn_get_regexps(regex_t** label_re, regex_t** name_re, tCC* who )
{
if (! pz_mn_name_pat)
return BOOL_FALSE;
if (! mn_compiled)
{
compile_re (mn_label_pat, &mn_label_re, 1, "label pattern", who);
compile_re (pz_mn_name_pat, &mn_name_re, 1, "name pattern", who);
mn_compiled++;
}
*labe... | false | false | false | false | false | 0 |
rfc1738_unescape(char *s)
{
int i, j; /* i is write, j is read */
for (i = j = 0; s[j]; i++, j++) {
s[i] = s[j];
if (s[j] != '%') {
/* normal case, nothing more to do */
} else if (s[j + 1] == '%') { /* %% case */
j++; /* Skip % */
} else {
/* decode */
int v1, v2, x;
v1 = fromhe... | false | false | false | false | false | 0 |
jaspscan_readmatrix(const AjPStr mfname, float ***matrix)
{
AjPFile inf = NULL;
AjPStr line = NULL;
ajuint i = 0;
ajuint cols = 0;
AJCNEW0(*matrix,4);
line = ajStrNew();
inf = ajFileNewInNameS(mfname);
if(!inf)
ajFatal("Cannot open matrix file %S",mfname);
i = 0;
while(a... | false | false | false | false | false | 0 |
_env_add(modulator_t *e, float duration, float v)
{
if(e->steps >= WCA_MAX_ENV_STEPS)
{
log_printf(ELOG, "audio: Envelope overflow!\n");
return;
}
e->v[e->steps] = v;
e->d[e->steps] = duration;
if(e->steps)
e->t[e->steps] = e->t[e->steps-1] + e->d[e->steps-1];
else
e->t[e->steps] = 0.0f;
++e->steps;
} | false | false | false | false | false | 0 |
cx25821_irq(int irq, void *dev_id)
{
struct cx25821_dev *dev = dev_id;
u32 pci_status;
u32 vid_status;
int i, handled = 0;
u32 mask[8] = { 1, 2, 4, 8, 16, 32, 64, 128 };
pci_status = cx_read(PCI_INT_STAT);
if (pci_status == 0)
goto out;
for (i = 0; i < VID_CHANNEL_NUM; i++) {
if (pci_status & mask[i]) {
... | false | false | false | false | false | 0 |
slotStart()
{
Q_Q(FileCopyJob);
if (!m_move)
JobPrivate::emitCopying( q, m_src, m_dest );
else
JobPrivate::emitMoving( q, m_src, m_dest );
if ( m_move )
{
// The if() below must be the same as the one in startBestCopyMethod
if ((m_src.protocol() == m_dest.protocol()) &&
... | false | false | false | false | false | 0 |
vmx_vcpu_pi_put(struct kvm_vcpu *vcpu)
{
struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu);
if (!kvm_arch_has_assigned_device(vcpu->kvm) ||
!irq_remapping_cap(IRQ_POSTING_CAP))
return;
/* Set SN when the vCPU is preempted */
if (vcpu->preempted)
pi_set_sn(pi_desc);
} | false | false | false | false | false | 0 |
test_network_urlparse__user_pass_port(void)
{
/* user:pass@hostname.tld:port/resource */
cl_git_pass(gitno_extract_url_parts(&host, &port, &user, &pass,
"user:pass@example.com:9191/resource", "8080"));
cl_assert_equal_s(host, "example.com");
cl_assert_equal_s(port, "9191");
cl_assert_equal_s(user, "user");
cl... | false | false | false | false | false | 0 |
find (char *&s) {
// std::cout << "comparing " << *s << " with token node " << ch << '\n' ;
if (*s != ch) {
return BAD ;
}
// std::cout << "found match, looking at children\n" ;
Token tok ;
s++ ;
for (int i = 0 ; i < children.size() ; i++) {
if ((tok = children[i]->find (s)) !=... | false | false | false | false | false | 0 |
Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (has_name()) {
if (name_ != &::google::protobuf::internal::kEmptyString) {
name_->clear();
}
}
if (has_insertion_point()) {
if (insertion_point_ != &::google::protobuf::internal::kEmptyString) {
insertion_point_... | false | false | false | false | false | 0 |
copy_JPEG(struct fujitsu *s, unsigned char * buf, int len, int side)
{
SANE_Status ret=SANE_STATUS_GOOD;
int i, seen = 0;
DBG (10, "copy_JPEG: start\n");
/* A jpeg image starts with the SOI marker, FF D8.
* This is optionally followed by the JFIF APP0
* marker, FF E0. If that marker is not present,
... | false | false | false | false | false | 0 |
hashlist_init(hashlist_t *l, unsigned int nodes, unsigned int length) {
l->entries = 0;
l->length = length + 1;
if (nodes != 0) {
l->size = nodes;
l->hashbuf = malloc(l->size * l->length);
if (l->hashbuf == NULL)
l->size = 0;
} else {
l->size = 0;
l->hashbuf = NULL;
}
} | false | false | false | false | false | 0 |
backup(char *fname, char *bname)
#endif
{
FILE *b, *f;
static char couldnt[] = "Couldn't open %.80s";
if (!(f = fopen(fname, binread))) {
warn1(couldnt, fname);
return;
}
if (!(b = fopen(bname, binwrite))) {
warn1(couldnt, bname);
return;
}
ffilecopy(f, b);
fclose(f);
fclose(b);
} | false | false | false | false | true | 1 |
be_openssl_unlink(struct bufferevent *bev)
{
struct bufferevent_openssl *bev_ssl = upcast(bev);
if (bev_ssl->bev.options & BEV_OPT_CLOSE_ON_FREE) {
if (bev_ssl->underlying) {
if (BEV_UPCAST(bev_ssl->underlying)->refcnt < 2) {
event_warnx("BEV_OPT_CLOSE_ON_FREE set on an "
"bufferevent with too few r... | false | false | false | false | false | 0 |
move_nodes(struct ubifs_info *c, struct ubifs_scan_leb *sleb)
{
int err, min;
LIST_HEAD(nondata);
struct ubifs_wbuf *wbuf = &c->jheads[GCHD].wbuf;
if (wbuf->lnum == -1) {
/*
* The GC journal head is not set, because it is the first GC
* invocation since mount.
*/
err = switch_gc_head(c);
if (err)
... | false | false | false | false | false | 0 |
FuncFD_OF_FILE(Obj self,Obj fid)
{
Int fd;
int fdi;
while (fid == (Obj) 0 || !(IS_INTOBJ(fid)))
fid = ErrorReturnObj(
"<fid> must be a small integer (not a %s)",
(Int)TNAM_OBJ(fid),0L,
"you can replace <fid> via 'return <fid>;'" );
fd = INT_INTOBJ(fid);
fdi = syBuf[fd].fp... | false | false | false | true | false | 1 |
ctx_reg(struct nv04_gr_chan *chan, u32 reg)
{
int i;
for (i = 0; i < ARRAY_SIZE(nv04_gr_ctx_regs); i++) {
if (nv04_gr_ctx_regs[i] == reg)
return &chan->nv04[i];
}
return NULL;
} | false | false | false | false | false | 0 |
getLabel(pf_Frag_Strux* pItem) const
{
static UT_UCSChar label[100];
UT_uint32 insPoint = 0;
UT_uint32 depth = 0;
_getLabelstr( label, &insPoint, depth , pItem);
if(insPoint == 0 )
{
return static_cast<const UT_UCSChar *>(NULL);
}
else
{
return static_cast<const UT_UCSChar *>(label);
}
} | false | false | false | false | false | 0 |
put_sym (NODE_T *p, BOOL_T keyw)
{
char *txt = NSYMBOL (p);
char *sym = NCHAR_IN_LINE (p);
int n = 0, size = (int) strlen (txt);
pragment (p, keyw);
if (txt[0] != sym[0] || (int) strlen (sym) - 1 <= size) {
/* Without features. */
put_str (txt);
} else {
/* With features. Preserves spaces in identifiers... | false | false | false | false | false | 0 |
duplicate(const HPDiagram & diag,
const HPDVector & group) const {
//find if a duplicate diagram exists
HPDVector::const_iterator it =
find_if(group.begin(), group.end(), SameDiagramAs(diag));
return it != group.end();
} | false | false | false | false | false | 0 |
TransformRegularArray(Matrix m, Camera c, Array points, Array *box)
{
int n;
Point origin, delta;
Array xpoints;
/* is regular array transformation applicable? */
if ((c && !c->ortho) || DXGetArrayClass(points)!=CLASS_REGULARARRAY)
return NULL;
/* better to transform existing box in regular c... | false | false | false | false | false | 0 |
gm_net_connect_next(GmNet *net) {
threadinfo *info;
if (net->priv->current == NULL) {
return;
} else {
info = g_new0(threadinfo, 1);
info->net = net;
info->current = net->priv->current;
info->mutex_idle = &(net->priv->mutex_idle);
net->priv->thread_info = info;
pthread_create(&(net->priv->thread),... | false | false | false | false | false | 0 |
CreateSubdictName(
const TemplateString& dict_name, const TemplateString& sub_name,
size_t index, const char* suffix) {
char index_str[64];
snprintf(index_str, sizeof(index_str), "%" PRIuS, index);
return (PrintableTemplateString(dict_name) + "/" +
PrintableTemplateString(sub_name) + "#" + index... | false | false | false | false | false | 0 |
SetThetaData(DSDP dsdp, SDPCone sdpcone, int nodes, int edges, EdgeMat Edge[]){
int i,info;
/* Create data matrices - these are all custom types */
/* The c matrix has all elements equal to 1.0 */
info=OneMatOpsInitialize(&onematops);
info=SDPConeAddDataMatrix(sdpcone,0,0,nodes,'P',&onematops,0);
/* Fo... | false | false | false | false | false | 0 |
irq_device_state(struct m66592 *m66592)
{
u16 dvsq;
dvsq = m66592_read(m66592, M66592_INTSTS0) & M66592_DVSQ;
m66592_write(m66592, ~M66592_DVST, M66592_INTSTS0);
if (dvsq == M66592_DS_DFLT) { /* bus reset */
usb_gadget_udc_reset(&m66592->gadget, m66592->driver);
m66592_update_usb_speed(m66592);
}
if (m66592... | false | false | false | false | false | 0 |
find_among_b(struct SN_env * z, struct among * v, int v_size) {
int i = 0;
int j = v_size;
int c = z->c; int lb = z->lb;
symbol * q = z->p + c - 1;
struct among * w;
int common_i = 0;
int common_j = 0;
int first_key_inspected = 0;
while(1) {
int k = i + ((j - i) >> 1);
int di... | false | false | false | false | false | 0 |
ssl_sock_srv_hostcheck(const char *pattern, const char *hostname)
{
const char *pattern_wildcard, *pattern_left_label_end, *hostname_left_label_end;
size_t prefixlen, suffixlen;
/* Trivial case */
if (strcmp(pattern, hostname) == 0)
return 1;
/* The rest of this logic is based on RFC 6125, section 6.4.3
* (h... | false | false | false | false | false | 0 |
mark_paddable_region(Module_table *module_head,
Common_table *global_common_head,
IntSet paddable_region_set)
{
Common_table *gct;
Boolean flg_equiv;
Boolean flg_shape;
for (gct = global_common_head; gct != NULL; gct = gct->next) {
flg_equiv = check_equ... | false | false | false | false | false | 0 |
GC_debug_gcj_malloc(size_t lb,
void * ptr_to_struct_containing_descr, GC_EXTRA_PARAMS)
{
void * result;
DCL_LOCK_STATE;
/* We're careful to avoid extra calls, which could */
/* confuse the backtrace. */
LOCK();
maybe_finalize();
res... | false | false | false | false | false | 0 |
DrawAnnotation(Surface *surface, ViewStyle &vsDraw, int line, int xStart,
PRectangle rcLine, LineLayout *ll, int subLine) {
int indent = pdoc->GetLineIndentation(line) * vsDraw.spaceWidth;
PRectangle rcSegment = rcLine;
int annotationLine = subLine - ll->lines;
const StyledText stAnnotation = pdoc->AnnotationS... | false | false | false | false | false | 0 |
applicable(const S *ego,
INT r, INT irs, INT ors,
INT m, INT v,
INT mcount,
const planner *plnr)
{
if (!applicable0(ego, r, irs, ors, m, v, mcount))
return 0;
if (NO_UGLYP(plnr) && m * r < 65536)
return 0;
return 1;
} | false | false | false | false | false | 0 |
__xa_put_txn(env, txnp)
ENV *env;
DB_TXN *txnp;
{
DB_THREAD_INFO *ip;
TXN_DETAIL *td;
ip = txnp->thread_info;
DB_ASSERT(env, ip != NULL);
SH_TAILQ_REMOVE(&ip->dbth_xatxn, txnp, xa_links, __db_txn);
TAILQ_REMOVE(&txnp->mgrp->txn_chain, txnp, links);
td = txnp->td;
if (td->xa_ref > 0)
td->xa_ref--;
__os_fre... | false | false | false | false | false | 0 |
string_cmp (VerifyContext *ctx, const char *str, guint offset)
{
if (offset == 0)
return strcmp (str, "");
return strcmp (str, get_string_ptr (ctx, offset));
} | false | false | false | false | false | 0 |
S_StopSound(mobj_t * origin)
{
int i;
for (i = 0; i < snd_Channels; i++)
{
if (Channel[i].mo == origin)
{
I_StopSound(Channel[i].handle);
if (S_sfx[Channel[i].sound_id].usefulness > 0)
{
S_sfx[Channel[i].sound_id].usefulness--;
... | false | false | false | false | false | 0 |
getListHeader(UT_uint32 column) const
{
UT_return_val_if_fail(m_pSS, NULL);
switch(column)
{
case 0: return m_pSS->getValue(XAP_STRING_ID_DLG_History_Version_Version);
case 1: return m_pSS->getValue(XAP_STRING_ID_DLG_History_Version_Started);
case 2: return m_pSS->getValue(XAP_STRING_ID_DLG_History_Version_Au... | false | false | false | false | false | 0 |
SendEvent(CSocketEvent* evt)
{
wxCriticalSectionLocker lock(m_sync);
const bool send = m_pending_events.empty() && !m_inside_loop;
m_pending_events.push_back(evt);
if (!send)
return;
wxCommandEvent tmp(0, 0);
AddPendingEvent(tmp);
} | false | false | false | false | false | 0 |
utest_tricky_format_decisions(void)
{
ESLX_MSAFILE *afp;
int status;
/* an all-lower case unaligned FASTA file should not get called A2M format
* an A2M file should have at least one consensus column, not be all-insert.
*/
char *testmsa1 = "\
>seq1\n\
aaaaaa\n\
>seq2\n\
aaaaa\n";
status = eslx_msafile_... | false | false | false | false | false | 0 |
mpl115_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int *val, int *val2, long mask)
{
struct mpl115_data *data = iio_priv(indio_dev);
int ret;
switch (mask) {
case IIO_CHAN_INFO_PROCESSED:
ret = mpl115_comp_pressure(data, val, val2);
if (ret < 0)
return ret;
return I... | false | false | false | false | false | 0 |
scale_thumbnail(struct ida_image *src, int max)
{
struct op_resize_parm p;
struct ida_rect rect;
struct ida_image *dest;
void *data;
unsigned int y;
float xs,ys,scale;
xs = (float)max / src->i.width;
ys = (float)max / src->i.height;
scale = (xs < ys) ? xs : ys;
dest = mall... | false | false | false | false | false | 0 |
scm_list_n (SCM elt, ...)
{
va_list foo;
SCM answer = SCM_EOL;
SCM *pos = &answer;
va_start (foo, elt);
while (! SCM_UNBNDP (elt))
{
#if (SCM_DEBUG_CELL_ACCESSES == 1)
if (SCM_NIMP (elt))
SCM_VALIDATE_CELL(elt, 0);
#endif
*pos = scm_cons (elt, SCM_EOL);
pos = SCM_CDRLOC (*pos);
... | false | false | false | false | false | 0 |
drawBevel(Window window_,const MSRect& aRect_,
MSShadowStyle style_,int st_)
{
if (st_>0)
{
GC topGC=topShadowGC();
GC bottomGC=bottomShadowGC();
switch (style_)
{
case MSRaised: drawBevelShadow(window_,aRect_,st_,topGC,bottomGC); break;
case MSSunken: ... | false | false | false | false | false | 0 |
via_cable_detect(struct ata_port *ap) {
const struct via_isa_bridge *config = ap->host->private_data;
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
u32 ata66;
if (via_cable_override(pdev))
return ATA_CBL_PATA40_SHORT;
if ((config->flags & VIA_SATA_PATA) && ap->port_no == 0)
return ATA_CBL_SATA;
/* Earl... | false | false | false | false | false | 0 |
sig_disconnected(XMPP_SERVER_REC *server)
{
GSList *tmp;
XMPP_QUERY_REC *query;
if (!IS_XMPP_SERVER(server))
return;
for (tmp = queries; tmp != NULL; tmp = tmp->next) {
query = XMPP_QUERY(tmp->data);
if (query == NULL)
continue;
if (query->server == server)
g_source_remove_by_user_data(query);
}
} | false | false | false | false | false | 0 |
__ecereMethod___ecereNameSpace__eda__TableEditor_OnCreateDynamicLookupEditors(struct __ecereNameSpace__ecere__com__Instance * this)
{
struct __ecereNameSpace__eda__TableEditor * __ecerePointer___ecereNameSpace__eda__TableEditor = (struct __ecereNameSpace__eda__TableEditor *)(this ? (((char *)this) + __ecereClass___ecer... | false | false | false | true | false | 1 |
SerializeTopology(vtkHyperOctreeCursor *cursor,
int nchildren)
{
if (cursor->CurrentIsLeaf())
{
//this node is a leaf, we must stop now
this->TopologyArray->InsertNextValue(1);
}
/*
else if (cursor->CurrentIsTerminalNode())
{
//this node has... | false | false | false | false | false | 0 |
varssyms(symbs)
truc symbs;
{
if(symbs == voidsym)
return(symbs);
else
return(NODEarg0(symbs));
} | false | false | false | false | false | 0 |
nextBase ()
{
if (((max_length != IGNORE) && (delivered >= max_length)) ||
((stop_position != IGNORE) && (pos == stop_position))) return EOS;
char cur_char;
pos += direction; // <=> pos++ if direction=FORWARD else pos--
if ( pos < 0 ) return EOS;... | false | false | false | false | false | 0 |
PyCursesWindow_ChgAt(PyCursesWindowObject *self, PyObject *args)
{
int rtn;
int x, y;
int num = -1;
short color;
attr_t attr = A_NORMAL;
long lattr;
int use_xy = FALSE;
switch (PyTuple_Size(args)) {
case 1:
if (!PyArg_ParseTuple(args,"l;attr", &lattr))
return NUL... | false | false | false | false | false | 0 |
wf_clo(p_wf)
p_wf_t p_wf;
{
wf_check(p_wf);
if ( p_wf->wf_iserr) return;
as_cold(p_wf->wf_isope,"wf_clo: WF is not open.");
if (fflush(p_wf->wf_pfile) != FFLUSH_S)
wf_errlg(p_wf,"wf_clo: Error fflush()ing output file.");
if (fclose(p_wf->wf_pfile) == FCLOSE_F)
wf_errlg(p_wf,"wf_clo: Error fclose()ing outpu... | false | false | false | false | false | 0 |
soap_mec_begin(struct soap *soap, struct soap_mec_data *data, int alg, SOAP_MEC_KEY_TYPE *pkey, unsigned char *key, int *keylen)
{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "MEC Begin alg=%x\n", alg));
/* save and set the engine's 'data' field to pass data to the callbacks */
soap->data[1] = (void*)data;
data->ctx = NULL... | false | false | false | false | false | 0 |
addToFileblob(const line_t *line, void *arg)
{
fileblob *fb = (fileblob *)arg;
if(line) {
const char *l = lineGetData(line);
fileblobAddData(fb, (const unsigned char *)l, strlen(l));
}
fileblobAddData(fb, (const unsigned char *)"\n", 1);
} | false | false | false | false | false | 0 |
record_out_operands (rtx insn, bool earlyclobber)
{
int n_ops = recog_data.n_operands;
int alt = which_alternative;
int i;
for (i = 0; i < n_ops + recog_data.n_dups; i++)
{
int opn = i < n_ops ? i : recog_data.dup_num[i - n_ops];
rtx *loc = (i < n_ops
? recog_data.operand_loc[opn]
: re... | false | false | false | false | false | 0 |
gt_files_estimate_total_size(const GtStrArray *filenames)
{
unsigned long filenum;
off_t totalsize = 0;
for (filenum = 0; filenum < gt_str_array_size(filenames); filenum++)
totalsize += gt_file_estimate_size(gt_str_array_get(filenames, filenum));
return totalsize;
} | false | false | false | false | false | 0 |
i410_yv12_c(LONGLINEARGS)
{
// mainly ffmpeg indeo
//printf("i410ToYv12\n");
stride_memcpy(dest_y, ds_y, src_y, ss_y, w, h);
h /= 4;
w /= 4;
while (h--)
{
int i = w;
while (--i >= 0)
{
dest_cr[i * 2] = dest_cr[i * 2 + 1] = src_cb[i];
dest_cb[i * 2] = dest_cb[i * ... | false | false | false | false | false | 0 |
gotoNextOption()
{
if (OptionPosIterator != OptionPosList.end())
{
if (++OptionPosIterator != OptionPosList.end())
{
ArgumentIterator = *OptionPosIterator;
return OFTrue;
}
}
return OFFalse;
} | false | false | false | false | false | 0 |
enterEvent(QEvent* /*ev*/)
{
// kDebug() << "KGameWindow::enterEvent()";
// Restart the AIs threads
if ( currentPlayer() )
if ( (currentPlayer()-> isAI()) && (!currentPlayer()->isVirtual()) && ( !((static_cast<AIPlayer*>(currentPlayer()))-> isRunning())) )
(static_cast<AIPlayer*>(currentPlayer()))-> sta... | false | false | false | false | false | 0 |
gst_app_src_push_buffer_full (GstAppSrc * appsrc, GstBuffer * buffer,
gboolean steal_ref)
{
gboolean first = TRUE;
GstAppSrcPrivate *priv;
g_return_val_if_fail (GST_IS_APP_SRC (appsrc), GST_FLOW_ERROR);
g_return_val_if_fail (GST_IS_BUFFER (buffer), GST_FLOW_ERROR);
priv = appsrc->priv;
g_mutex_lock (... | false | false | false | false | false | 0 |
_glewInit_GLX_VERSION_1_2 (GLXEW_CONTEXT_ARG_DEF_INIT)
{
GLboolean r = GL_FALSE;
// SJS
// FB: Patched to allow Ogre to overload glXGetCurrentDisplay
if (glXGetCurrentDisplay == NULL)
{
r = ((glXGetCurrentDisplay = (PFNGLXGETCURRENTDISPLAYPROC)glewGetProcAddress((const GLubyte*)"glXGetCurrent... | false | false | false | false | false | 0 |
ConvertSIPrefix(const std::string& prefix)
{
if (prefix == "EXA") {
return 1e18f;
}
else if (prefix == "PETA") {
return 1e15f;
}
else if (prefix == "TERA") {
return 1e12f;
}
else if (prefix == "GIGA") {
return 1e9f;
}
else if (prefix == "MEGA") {
return 1e6f;
}
else if (prefix == "KILO") {
return... | false | false | false | false | false | 0 |
BUF_strlcpy(char *dst, const char *src, size_t size)
{
size_t l = 0;
for(; size > 1 && *src; size--)
{
*dst++ = *src++;
l++;
}
if (size)
*dst = '\0';
return l + strlen(src);
} | false | false | false | false | false | 0 |
bnxt_free_vf_resources(struct bnxt *bp)
{
struct pci_dev *pdev = bp->pdev;
int i;
kfree(bp->pf.vf_event_bmap);
bp->pf.vf_event_bmap = NULL;
for (i = 0; i < 4; i++) {
if (bp->pf.hwrm_cmd_req_addr[i]) {
dma_free_coherent(&pdev->dev, BNXT_PAGE_SIZE,
bp->pf.hwrm_cmd_req_addr[i],
bp->pf.hwrm_cmd_re... | false | false | false | false | false | 0 |
cdbus_introspection_new(struct cdbus_object_path * opath_ptr)
{
char *xml_data, *buf_ptr;
const struct cdbus_object_path_interface * iface_ptr;
const struct cdbus_method_descriptor * method_ptr;
const struct cdbus_method_arg_descriptor * method_arg_ptr;
const struct cdbus_signal_descriptor * signal_ptr;
con... | false | false | false | false | false | 0 |
_int(Request& r, MethodParams&) {
VInt& vint=GET_SELF(r, VInt);
r.write_no_lang(*new VInt(vint.get_int()));
} | false | false | false | false | false | 0 |
proj_title_changed (GtkEntry *entry, NotesArea *na)
{
PRJ_SETUP
str = gtk_entry_get_text (entry);
gtt_project_set_title (na->proj, str);
na->ignore_events = FALSE;
} | false | false | false | false | false | 0 |
ParseStatus(std::vector<std::string> args)
{
std::vector<midasStatus> stats = this->Synchronizer->GetStatusEntries();
for(std::vector<midasStatus>::iterator i = stats.begin(); i != stats.end();
++i)
{
switch(i->GetType())
{
case midasResourceType::BITSTREAM:
std::cout << "b";
... | false | false | false | false | false | 0 |
mywrite(int32_t fd, int64_t off, const void* buf, size_t size) {
_assert_(fd >= 0 && off >= 0 && off <= FILEMAXSIZ && buf && size <= MEMMAXSIZ);
while (true) {
ssize_t wb = ::pwrite(fd, buf, size, off);
if (wb >= (ssize_t)size) {
return true;
} else if (wb > 0) {
buf = (char*)buf + wb;
... | false | false | false | false | false | 0 |
configWidget( QWidget *parent )
{
DEBUG_BLOCK
if( !m_config )
m_config = new ITunesImporterConfig( parent );
return m_config;
} | false | false | false | false | false | 0 |
bcf_hdr_append(bcf_hdr_t *hdr, const char *line)
{
int len;
bcf_hrec_t *hrec = bcf_hdr_parse_line(hdr, (char*) line, &len);
if ( bcf_hdr_add_hrec(hdr, hrec) )
bcf_hdr_sync(hdr);
return 0;
} | false | false | false | false | false | 0 |
set_string_null (struct rfc2822_header *header, va_list alist)
{
const char *value;
assert (header != NULL);
if (header->value != NULL) /* Already set */
return 0;
value = va_arg (alist, const char *);
if (value == NULL)
return 1;
header->value = strdup (value);
return header->value != NULL;
} | false | false | false | false | false | 0 |
getSubParentEmfTag()
{
// Parent object is a body layer, but we need the body as the parent and
// the layer as the subParent in emf-file
//
BodyLayer* bl = model->getBodyLayerById(parentId);
if ( bl == NULL ) return NO_INDEX;
return bl->Tag();
} | false | false | false | false | false | 0 |
udp_bind(int sock, int port, const char *my_address)
{
struct sockaddr_in addr;
in_addr_t maddr = INADDR_ANY;
if (my_address) {
#ifdef AF_INET6
if (inet_pton(AF_INET6, my_address, &maddr) < 1) {
#else
if (0) {
#endif
if (inet_pton(AF_INET, my_address, &maddr) < 1) {
ret... | false | false | false | false | false | 0 |
slot_message()
{
emit sig_message( _edit->text() );
_edit->clear();
} | false | false | false | false | false | 0 |
LexInclude() {
// The token after the include must be a string.
tgtok::TokKind Tok = LexToken();
if (Tok == tgtok::Error) return true;
if (Tok != tgtok::StrVal) {
PrintError(getLoc(), "Expected filename after include");
return true;
}
// Get the string.
std::string Filename = CurStrVal;
std::st... | false | false | false | false | false | 0 |
xkl_engine_get_property(GObject * object,
guint property_id,
GValue * value, GParamSpec * pspec)
{
XklEngine *engine = XKL_ENGINE(object);
switch (property_id) {
case PROP_DISPLAY:
g_value_set_pointer(value, xkl_engine_get_display(engine));
break;
case PROP_BACKEND_NAME:
g_value_set_string(value,
... | false | false | false | false | false | 0 |
JVM_GetThreadStateNames(JNIEnv* env, jint javaThreadState,
jintArray values) {
TRACE("JVM_GetThreadStateNames(env=%p, javaThreadState=%d, values=%p)",
env, javaThreadState, values);
Class *array_class = findArrayClass(SYMBOL(array_java_lang_String));
char *st... | false | false | false | false | false | 0 |
slapi_get_object_extension(int objecttype, void *object, int extensionhandle)
{
struct slapi_extension_block *eblock;
void *parent;
if ( get_extension_block( objecttype, object, &eblock, &parent ) != 0 ) {
return NULL;
}
if ( extensionhandle < registered_extensions.extensions[objecttype].count ) {
return ebl... | false | false | false | false | false | 0 |
Broadcast ( nSocket const & socket
, int port
, nBandwidthControl* control )
{
if (sendBuffer_.Len()){
sn_SentPackets++;
sn_SentBytes += sendBuffer_.Len() * 2 + OVERHEAD;
// store our id
sendBuffer_[sendBuffer_.Len()... | false | false | false | false | false | 0 |
parse_word_group(Vector<String> &words, int override, int wt, ErrorHandler *errh)
{
if (words.size() > 0) {
int (DvipsEncoding::*method)(Vector<String> &, int, ErrorHandler *) = word_types[wt].parsefunc;
if ((this->*method)(words, override, errh) == -EPARSE) {
Vector<String> rewords;
for (String *sp = w... | 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.