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 |
|---|---|---|---|---|---|---|
pcomm()
{
if (label == NUL_PTR)
labelerror(MISLAB);
else if (label->type & VARBIT)
labelerror(VARLAB); /* variable cannot be COMM'd */
else
docomm();
} | false | false | false | false | false | 0 |
isofs_cmp(const char *name, char *compare, int dlen)
{
if (!compare)
return 1;
/* we don't care about special "." and ".." files */
if (dlen == 1) {
/* "." */
if (compare[0] == 0) {
return 1;
} else if (compare[0] == 1) {
return 1;
}
}
char tmp = compare[dlen];
compare[dlen] = 0;
int c = stricmp(... | false | false | false | false | false | 0 |
PositionHandles()
{
double *pts =
static_cast<vtkDoubleArray *>(this->Points->GetData())->GetPointer(0);
double *p0 = pts;
double *p1 = pts + 3*1;
double *p2 = pts + 3*2;
double *p3 = pts + 3*3;
//double *p4 = pts + 3*4;
double *p5 = pts + 3*5;
double *p6 = pts + 3*6;
double *p7 = pts + 3*7;
do... | false | false | false | false | false | 0 |
size_prepared_cb (GdkPixbufLoader *loader,
gint width,
gint height,
gpointer user_data)
{
gfloat scale;
if (max_width_in_bytes < 1 || width <= max_width_in_bytes) {
return;
}
g_debug ("Resizing media art to %d width", max_widt... | false | false | false | false | false | 0 |
kgdb_nmi_console_write(struct console *co, const char *s, uint c)
{
int i;
for (i = 0; i < c; i++)
dbg_io_ops->write_char(s[i]);
} | false | false | false | false | false | 0 |
plane_fill_mask(gx_device *dev,
const byte *data, int data_x, int raster, gx_bitmap_id id,
int x, int y, int w, int h,
const gx_drawing_color *pdcolor, int depth,
gs_logical_operation_t lop, const gx_clip_path *pcpath)
{
gx_device_plane_extract * const edev = (gx_device_plane_extract *)dev;
gx_d... | false | false | false | false | false | 0 |
gfarm_id_bsearch(struct gfarm_id_table *idtab,
int head, int tail, gfarm_int32_t id)
{
struct gfarm_id_index *index = idtab->index;
int mid;
while (head < tail) {
mid = (head + tail) >> 1;
if (index[mid].id == id)
return (&index[mid]);
if (index[mid].id > id)
tail = mid;
else
head = mid + 1;
... | false | false | false | false | false | 0 |
setFocusFlag(bool focus) {
if (!m_client) return;
bool was_focused = isFocused();
m_focused = focus;
fbdbg<<"FluxboxWindow("<<title().logical()<<")::setFocusFlag("<<focus<<")"<<endl;
installColormap(focus);
// if we're fullscreen and another window gains focus on the same head,
// then ... | false | false | false | false | false | 0 |
drawGraphicObject(const ::WPXPropertyList &propList, const ::WPXBinaryData &binaryData)
{
if (!propList["libwpg:mime-type"] || propList["libwpg:mime-type"]->getStr().len() <= 0)
return;
WPXString base64 = binaryData.getBase64Data();
m_outputSink << "<svg:image ";
if (propList["svg:x"] && propList["svg:y"] &... | false | false | false | false | false | 0 |
lookup_rsc (const char* rid)
{
return rid ?
(lrmd_rsc_t*)g_hash_table_lookup(resources, rid) :
NULL;
} | false | false | false | false | false | 0 |
V_MarkRect(int x, int y, int width, int height)
{
// If we are temporarily using an alternate screen, do not
// affect the update box.
if (dest_screen == I_VideoBuffer)
{
M_AddToBox (dirtybox, x, y);
M_AddToBox (dirtybox, x + width-1, y + height-1);
}
} | false | false | false | false | false | 0 |
testRemainingBranchWhileMerging(Node *start, const std::vector<WeatherData> &wDataSets, double rnp, double effectiveThres, double routingThres)
{
if(start->getInDegree()>=2) // if a node is already fully occupied, then return fail
return f... | false | false | false | false | false | 0 |
when_dumped(char *filesys, int level, size_t * length)
{
time_t dumpdate = 0, tmp;
FILE *dump_fp;
char line[1024];
char *cp1, *cp2, *cp3;
/*
* Look for the relevent entries in /etc/dumpdates
*
* This is complicated by the fact that disks are
... | false | false | false | false | false | 0 |
close()
{
if (! d->closingDown)
{
d->closingDown = true;
QCloseEvent ev;
sendEvent(this, &ev);
d->closingDown = ev.isAccepted();
if (d->closingDown)
{
sendPostedEvents();
QTimer::singleShot(0, this, SLOT(quit()));
}
}
return d->closingDown;
} | false | false | false | false | false | 0 |
is_lvalue(Lex_state *e, Lex_token **t1p, Var **varp, int *is_list_ref,
Dsvec *ref, Expr_result *res)
{
int ctn_save;
char *varname;
Lex_token *t1;
Var *var;
token_save(e, &ctn_save);
if (token_matches(e, T_LPAREN)) {
int st;
if ((st = is_lvalue(e, t1p, varp, is_list_ref, ref, res)) != 1) {
token_... | false | false | false | false | false | 0 |
OPTIONS()
{
string reply = "HTTP/1.1 200 OK\r\nDate: ";
reply += gmt_date;
reply += "\r\nServer: lophttpd\r\nContent-Length: 0\r\nAllow: OPTIONS, GET, HEAD, POST, PUT\r\n\r\n";
log("OPTIONS\n");
if (peer->send(reply.c_str(), reply.size()) != (int)reply.size())
return -1;
return 1;
} | false | false | false | false | false | 0 |
orte_plm_base_daemons_launched(int fd, short args, void *cbdata)
{
orte_state_caddy_t *caddy = (orte_state_caddy_t*)cbdata;
/* do NOT increment the state - we wait for the
* daemons to report that they have actually
* started before moving to the right state
*/
/* cleanup */
OBJ_RELEASE(... | false | false | false | false | false | 0 |
getFileFromOutputStateForOverwrite(OutputState** state, const char* fileName) {
OutputState* curFile;
size_t bufSize;
curFile = *state;
while(curFile != NULL) {
if(strcmp(curFile->fileName, fileName) == 0) {
if(curFile->tmpFileName == NULL) {
bufSize = curFile->bufferSize;
curFile->bufferSize = 0;
... | false | false | false | false | true | 1 |
cb_pref_systray_toggled (GtkToggleButton *button, gpointer data)
{
if (gtk_toggle_button_get_active(button) == TRUE)
{
gimmix_enable_systray_icon ();
cfg_add_key (&conf, "enable_systray", "true");
gtk_widget_set_sensitive (GTK_WIDGET(pref_notification_check), TRUE);
}
else
if (gtk_toggle_button_get_active(bu... | false | false | false | false | false | 0 |
t4_tx_release(t4_state_t *s)
{
if (s->rx)
return -1;
if (s->tiff.tiff_file)
close_tiff_input_file(s);
free_buffers(s);
return 0;
} | false | false | false | false | false | 0 |
deleteProperty(ExecState * /*exec*/, const Identifier &propertyName)
{
unsigned attributes;
JSValue *v = _prop.get(propertyName, attributes);
if (v) {
if ((attributes & DontDelete))
return false;
_prop.remove(propertyName);
if (attributes & GetterSetter)
_prop.setHasGetterSetterPropertie... | false | false | false | false | false | 0 |
ctf_text_close_trace(struct bt_trace_descriptor *td)
{
int ret;
struct ctf_text_stream_pos *pos =
container_of(td, struct ctf_text_stream_pos, trace_descriptor);
babeltrace_ctf_console_output--;
if (pos->fp != stdout) {
ret = fclose(pos->fp);
if (ret) {
perror("Error on fclose");
return -1;
}
}
g_f... | false | false | false | false | false | 0 |
sp_fd_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret,
int32_t op_errno, fd_t *fd)
{
sp_local_t *local = NULL;
sp_fd_ctx_t *fd_ctx = NULL;
GF_ASSERT (frame);
if (op_ret == -1) {
goto out;
}
if (this == NULL) {
... | false | false | false | true | false | 1 |
main( int argc, char *argv[] )
{
if (argc<3)
{
cout<<"Usage : Minc2Mhd in.mhd out.mhd factor"<<endl;
exit(1);
}
// Load Volume
cout <<"load : "<<argv[1]<<endl;
vtkMetaImageReader *Reader=vtkMetaImageReader::New();
Reader->SetFileName(argv[1]);
Reader->Update();
vtkImageResample *Resampler=vtkImageResam... | false | false | false | false | false | 0 |
pkt_ctx_ip_analyze_l4(n_pkt_ctx_t *ctx)
{
switch(ctx->ip_l4_proto) {
case N_IP_PROTO_TCP:
ctx->flags |= N_PKT_CTX_FLAG_L4_TCP;
break;
case N_IP_PROTO_UDP:
ctx->flags |= N_PKT_CTX_FLAG_L4_UDP;
break;
case N_IP_PROTO_ICMP:
ctx->flags |= N_PKT_CTX_FLAG_L4_I... | false | false | false | false | false | 0 |
AddSimpleBaseMembers(struct __ecereNameSpace__ecere__sys__OldList * list, struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Class * topClass)
{
if(_class->type != 1000)
AddMembers(list, _class, 0x0, (((void *)0)), topClass, (((void *)0)));
} | false | false | false | false | false | 0 |
prepare_pango_layout_for_draw (NemoIconCanvasItem *item,
PangoLayout *layout)
{
NemoIconCanvasItemDetails *details;
NemoIconContainer *container;
gboolean needs_highlight;
prepare_pango_layout_width (item, layout);
container = NEMO_ICON_CONTAINER (EEL_CANVAS_ITEM (item)->canvas);
details = item->detai... | false | false | false | false | false | 0 |
GC_push_roots(GC_bool all, ptr_t cold_gc_frame GC_ATTR_UNUSED)
{
int i;
unsigned kind;
/*
* Next push static data. This must happen early on, since it's
* not robust against mark stack overflow.
*/
/* Re-register dynamic libraries, in case one got added. */
/* There is s... | false | false | false | false | false | 0 |
cd_interp_eval (CdInterp *interp, gdouble value, GError **error)
{
CdInterpClass *klass = CD_INTERP_GET_CLASS (interp);
CdInterpPrivate *priv = interp->priv;
const gdouble *x;
const gdouble *y;
gdouble result = -1.0f;
g_return_val_if_fail (CD_IS_INTERP (interp), -1);
g_return_val_if_fail (priv->prepared, -1);
... | false | false | false | false | false | 0 |
objects_modified_cb (GObject *object,
const GSList *objects,
gpointer data)
{
GMainLoop *loop = (GMainLoop *) data;
const GSList *l;
for (l = objects; l; l = l->next)
g_print ("Object modified %s (%s)\n", icalcomponent_get_uid (l->data), icalcomponent_get_summary (l->data... | false | false | false | false | false | 0 |
PostThreadSearchEvent(const sThreadSearchEvent& event)
// ----------------------------------------------------------------------------
{
// Clone the worker thread event to the mutex protected m_ThreadSearchEventsArray
if ( m_MutexSearchEventsArray.Lock() == wxMUTEX_NO_ERROR )
{
// Events are handle... | false | false | false | false | false | 0 |
GetPhonemeName(PHONEME_TAB *ph, wxString& string)
{//==========================================================
string = wxString(WordToString(ph->mnemonic),wxConvLocal);
} | false | false | false | false | false | 0 |
gsb_automem_stock_button_new ( GsbButtonStyle style,
const gchar * stock_id, const gchar * name,
GCallback callback, gpointer data )
{
GtkWidget *button, *vbox;
vbox = new_stock_image_label ( style, stock_id, name );
button = gtk_button_new ();
gtk_button_set_relief ( GTK_BUTTON(button)... | false | false | false | false | false | 0 |
radeon_set_pciegart(drm_radeon_private_t * dev_priv, int on)
{
u32 tmp = RADEON_READ_PCIE(dev_priv, RADEON_PCIE_TX_GART_CNTL);
if (on) {
DRM_DEBUG("programming pcie %08X %08lX %08X\n",
dev_priv->gart_vm_start,
(long)dev_priv->gart_info.bus_addr,
dev_priv->gart_size);
RADEON_WRITE_PCIE(RADEON_PCIE_... | false | false | false | false | false | 0 |
LSEEK(BIO * bio,
unsigned long long off,
int whence) {
switch (whence) {
case SEEK_SET:
bio->off = off;
return off;
case SEEK_END:
bio->off = bio->fsize;
return bio->fsize;
case SEEK_CUR:
bio->off += off;
return bio->off;
default:
return (unsigned long long) -1;
}
} | false | false | false | false | false | 0 |
OnChar(wxKeyEvent& event)
{
if (event.GetKeyCode() == WXK_ESCAPE)
{
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
ProcessEvent(event);
}
else
event.Skip();
} | false | false | false | false | false | 0 |
stop_war_between(short nationRecno1, short nationRecno2)
{
Unit *unitPtr, *targetUnit;
Firm *targetFirm;
Town *targetTown;
Location *targetLoc;
char targetType;
short targetRecno;
int targetXLoc, targetYLoc;
for(int i=size(); i>0; --i)
{
if(is_deleted(i))
continue;
unitPtr = operator[](i);
if(!unit... | false | false | false | false | false | 0 |
start()
{
d->stopInProgress = false;
if(d->isActive)
return;
d->isActive = TRUE;
if(!d->pcountdown)
d->pcountdown = SPINOFFSET * 4 + 1;
if(!d->t)
{
d->t = new QTimer(this);
connect(d->t, SIGNAL(timeout()), SLOT(animate()));
animate();
d->t->start(MSECSPERFRAME);
}
} | false | false | false | false | false | 0 |
writepgm(char *nam,pix *p){// P5 raw-pgm
FILE *f1;int a,x,y;
f1=fopen(nam,"wb");if(!f1)F0("open"); // open-error
fprintf(f1,"P5\n%d %d\n255\n",p->x,p->y);
if(p->bpp==3)
for(y=0;y<p->y;y++)
for(x=0;x<p->x;x++){ // set bit
a=x+y*p->x;
p->p[a]=(p->p[3*a+0]+p->p[3*a+1]+p->p[3*a+2])/3;
}
if(p->y!=(i... | false | false | false | false | true | 1 |
classDeclaration(Node *n) {
/* Do some work on the class name */
if (!Getattr(n, "feature:onlychildren")) {
if (blessed) {
setclassname(n);
Append(classlist, n);
}
}
return Language::classDeclaration(n);
} | false | false | false | false | false | 0 |
think_change_production()
{
if( cur_month_production + last_month_production > 0 ||
raw_stock_qty > 0 )
{
return 0;
}
if( info.game_date < setup_date + 30 ) // only change production after the factory has been running for at least one month
return 0;
//-- only build one market place next to this factory,... | false | false | false | false | false | 0 |
mgsl_trace_block(struct mgsl_struct *info,const char* data, int count, int xmit)
{
int i;
int linecount;
if (xmit)
printk("%s tx data:\n",info->device_name);
else
printk("%s rx data:\n",info->device_name);
while(count) {
if (count > 16)
linecount = 16;
else
linecount = count;
for(i=0;i<linec... | false | false | false | false | false | 0 |
extendBuf(int pos)
{
char *p;
if (C->bufsize<=pos) {
C->bufsize+=pos; /* approx double */
p=malloc(C->bufsize);
memcpy(p,C->buf,C->len);
free(C->malloced_buf);
C->malloced_buf=C->buf=p;
if (C->buf==NULL) bug("Out of memory");
}
} | false | false | false | false | false | 0 |
e1000_get_phy_id_82571(struct e1000_hw *hw)
{
struct e1000_phy_info *phy = &hw->phy;
s32 ret_val;
u16 phy_id = 0;
switch (hw->mac.type) {
case e1000_82571:
case e1000_82572:
/* The 82571 firmware may still be configuring the PHY.
* In this case, we cannot access the PHY until the
* configuration is done.... | false | false | false | false | false | 0 |
remove_child_by_index(__this__, long child)
{
long i, n = this->children_count -= 1;
for (i = child; i < n; i++)
*(this->children + i) = *(this->children + i + 1);
if (this->children_count == 0)
{
free(this->children);
this->children = NULL;
}
else if (this->children_count & -(this->chil... | false | false | false | false | false | 0 |
hpfs_truncate(struct inode *i)
{
if (IS_IMMUTABLE(i)) return /*-EPERM*/;
hpfs_lock_assert(i->i_sb);
hpfs_i(i)->i_n_secs = 0;
i->i_blocks = 1 + ((i->i_size + 511) >> 9);
hpfs_i(i)->mmu_private = i->i_size;
hpfs_truncate_btree(i->i_sb, i->i_ino, 1, ((i->i_size + 511) >> 9));
hpfs_write_inode(i);
hpfs_i(i)->i_n_s... | false | false | false | false | false | 0 |
flush(bool force)
{
init();
if ( force || totalSizeOfLRU > maxSize + maxSize/4) {
for ( int i = MAX_LRU_LISTS-1; i >= 0 && totalSizeOfLRU > maxSize; --i )
while ( totalSizeOfLRU > maxSize && m_LRULists[i].m_tail )
removeCacheEntry( m_LRULists[i].m_tail );
#ifdef CACHE_DEBUG... | false | false | false | false | false | 0 |
lang_match(const conststring specific, const conststring general)
{
int n = strlen(general);
return !strncasecmp(specific, general, n)
&& (specific[n] == '-' || !specific[n]);
} | false | false | false | false | false | 0 |
print_size(const GP<DjVuFile> &file)
{
GP<DjVuInfo> info = file->info;
if (! info)
{
const GP<ByteStream> pbs(file->get_djvu_bytestream(false, false));
const GP<IFFByteStream> iff(IFFByteStream::create(pbs));
GUTF8String chkid;
if (! iff->get_chunk(chkid))
verror("Selected file c... | false | false | false | false | false | 0 |
boxes_wizard_source_get_uri (BoxesWizardSource* self) {
const gchar* result;
GtkEntry* _tmp0_ = NULL;
const gchar* _tmp1_ = NULL;
#line 77 "/extra-data/checkout/gnome/gnome-boxes/src/wizard-source.vala"
g_return_val_if_fail (self != NULL, NULL);
#line 77 "/extra-data/checkout/gnome/gnome-boxes/src/wizard-source.val... | false | false | false | false | false | 0 |
sanei_usb_set_altinterface (SANE_Int dn, SANE_Int alternate)
{
if (dn >= device_number || dn < 0)
{
DBG (1,
"sanei_usb_set_altinterface: dn >= device number || dn < 0, dn=%d\n",
dn);
return SANE_STATUS_INVAL;
}
DBG (5, "sanei_usb_set_altinterface: alternate = %d\n", alternate);
if (d... | false | false | false | false | false | 0 |
_slurm_rpc_dump_nodes(slurm_msg_t * msg)
{
DEF_TIMERS;
char *dump;
int dump_size;
slurm_msg_t response_msg;
node_info_request_msg_t *node_req_msg =
(node_info_request_msg_t *) msg->data;
/* Locks: Read config, write node (reset allocated CPU count in some
* select plugins) */
slurmctld_lock_t node_write_lock... | false | false | false | false | false | 0 |
addStdCmdLineOptions(StdCmdLineArgs stdargs) {
if (stdargs & KCmdLineArgs::CmdLineArgQt) {
KCmdLineArgs::addCmdLineOptions(s->qt_options, ki18n("Qt"), "qt");
}
if (stdargs & KCmdLineArgs::CmdLineArgKDE) {
KCmdLineArgs::addCmdLineOptions(s->kde_options, ki18n("KDE"), "kde");
}
s->mStdargs = ... | false | false | false | false | false | 0 |
nameForScript(KEncodingDetector::AutoDetectScript script)
{
switch (script)
{
case KEncodingDetector::Arabic:
return i18nc("@item Text character set", "Arabic");
break;
case KEncodingDetector::Baltic:
return i18nc("@item Text character set", "Baltic");
... | false | false | false | false | false | 0 |
toString(const char* format)
{
char cvtBuf[1024];
bool b;
get(b);
sprintf(cvtBuf, format, b);
return (string(&cvtBuf[0]));
} | false | false | false | false | false | 0 |
FastaDB_fetch(FastaDB *fdb, FastaDB_Mask mask,
CompoundFile_Pos pos){
register FastaDB_Seq *fdbs = NULL;
register CompoundFile_Pos orig_pos = CompoundFile_ftell(fdb->cf);
g_assert(fdb);
g_assert(fdb->cf->element_list->len == 1);
CompoundFile_seek(fdb->cf, pos);
fdbs = ... | false | false | false | false | false | 0 |
evm_find_protected_xattrs(struct dentry *dentry)
{
struct inode *inode = d_backing_inode(dentry);
char **xattr;
int error;
int count = 0;
if (!inode->i_op->getxattr)
return -EOPNOTSUPP;
for (xattr = evm_config_xattrnames; *xattr != NULL; xattr++) {
error = inode->i_op->getxattr(dentry, *xattr, NULL, 0);
i... | false | false | false | false | false | 0 |
closeDevice(void)
{
if (NasConfig.DoDebug) {
osLogMsg("closeDevice: out\n");
}
if (sndStatOut.fd == -1) {
if (NasConfig.DoDebug) {
osLogMsg("closeDevice: output device already closed\n");
}
} else {
if (NasConfig.DoDebug)
osLogMsg("closeDevice OUT ... | false | false | false | false | false | 0 |
startSection(Section::id section_id)
{
Assert( cfp );
const int zero = 0;
cfwrite_ushort( (ushort)section_id, cfp );
// to be updated when endSection() is called
cfwrite_int(zero, cfp);
// starting offset, for size of section
m_size_offset = cftell(cfp);
} | false | false | false | false | false | 0 |
encode_ber_digest_info (gnutls_digest_algorithm_t hash,
const gnutls_datum_t * digest,
gnutls_datum_t * output)
{
ASN1_TYPE dinfo = ASN1_TYPE_EMPTY;
int result;
const char *algo;
opaque *tmp_output;
int tmp_output_size;
algo = _gnutls_x509_mac_to_oid ((gnutls... | false | false | false | false | false | 0 |
diva_data_q_ack_segment4write(diva_um_idi_data_queue_t *q, int length)
{
if (q->segment_pending) {
q->length[q->write] = length;
q->count++;
q->write++;
if (q->write >= q->segments) {
q->write = 0;
}
q->segment_pending = 0;
}
} | false | false | false | false | false | 0 |
setActiveNode(const DOM::Node &node)
{
if (!d->m_doc || !d->m_view)
return;
// Set the document's active node
d->m_doc->setFocusNode(node.handle());
// Scroll the view if necessary to ensure that the new focus node is visible
QRect rect = node.handle()->getRect();
d->m_view->ensureVis... | false | false | false | false | false | 0 |
_ISO2022Close(UConverter *converter) {
UConverterDataISO2022* myData =(UConverterDataISO2022 *) (converter->extraInfo);
UConverterSharedData **array = myData->myConverterArray;
int32_t i;
if (converter->extraInfo != NULL) {
/*close the array of converter pointers and free the memory*/
f... | false | false | false | false | false | 0 |
set_mute(int state)
{
if (state < 0)
muted_rep = !muted_rep;
else if (state > 0)
muted_rep = true;
else
muted_rep = false;
} | false | false | false | false | false | 0 |
EmptyCache( GLUtesselator *tess )
{
CachedVertex *v = tess->cache;
CachedVertex *vLast;
tess->mesh = __gl_meshNewMesh();
if (tess->mesh == NULL) return 0;
for( vLast = v + tess->cacheCount; v < vLast; ++v ) {
if ( !AddVertex( tess, v->coords, v->data ) ) return 0;
}
tess->cacheCount = 0;
tess->emp... | false | false | false | false | false | 0 |
matchUpload(HttpConn *conn, HttpRoute *route, int dir)
{
HttpRx *rx;
char *pat;
ssize len;
if (!(dir & HTTP_STAGE_RX)) {
return HTTP_ROUTE_REJECT;
}
rx = conn->rx;
if (!(rx->flags & HTTP_POST) || rx->remainingContent <= 0) {
return HTTP_ROUTE_REJECT;
}
pat ... | false | false | false | false | false | 0 |
kmo_dfs_print_parameter_help(cpl_parameterlist *parlist,
const char *name)
{
cpl_parameter *param = NULL;
cpl_error_code ret_err = CPL_ERROR_NONE;
const char *alias = NULL;
KMO_TRY
{
KMO_TRY_ASSURE((parlist != NULL) && (name ... | false | false | false | false | false | 0 |
_siftdown(PyListObject *heap, Py_ssize_t startpos, Py_ssize_t pos)
{
PyObject *newitem, *parent, *olditem;
int cmp;
Py_ssize_t parentpos;
Py_ssize_t size;
assert(PyList_Check(heap));
size = PyList_GET_SIZE(heap);
if (pos >= size) {
PyErr_SetString(PyExc_IndexError, "index out of ran... | false | false | false | false | false | 0 |
unique_null_status(const char *s, void *ctx)
{
const struct edit_unique_ctx *unique_ctx = ctx;
if (!strcmp(s, *unique_ctx->s ? *unique_ctx->s : ""))
return es_unchanged;
if (!*s)
return es_good;
return !unique_ctx->validate ||
unique_ctx->validate(s, unique_ctx->ctx) ? es_good : es_bad;
} | false | false | false | false | false | 0 |
ismacro(n)
int n;
{
if (n < FUNCLISTSIZ || n >= FUNCLISTSIZ + maxmacro) return(0);
return(1);
} | false | false | false | false | false | 0 |
create_clsf_DS( void)
{
clsf_DS temp;
chkpt_DS temp_chkpt;
temp = (clsf_DS) malloc(sizeof(struct classification));
if (G_clsf_storage_log_p == TRUE) {
fprintf(stdout, "\ncreate_clsf_DS: %p\n", (void *) temp);
}
temp->log_p_x_h_pi_theta = 0.0;
temp->log_a_x_h = 0.0;
temp->database = NULL;
... | false | false | false | false | false | 0 |
gda_thread_provider_perform_operation (GdaServerProvider *provider, GdaConnection *cnc,
GdaServerOperation *op, G_GNUC_UNUSED guint *task_id,
GdaServerProviderAsyncCallback async_cb, G_GNUC_UNUSED gpointer cb_data,
GError **error)
{
ThreadConnectionData *cdata;
PerformOperationData wd... | false | false | false | false | false | 0 |
parsekeymap(argc, argv, kp)
int argc;
char *CONST argv[];
keyseq_t *kp;
{
kp -> code = (short)-1;
kp -> len = (u_char)0;
kp -> str = NULL;
if (argc >= 4) {
kp -> code = ER_FEWMANYARG;
kp -> len = (u_char)0;
return(-1);
}
if (argc <= 1) return(0);
if ((kp -> code = getkeycode(argv[1], 1)) < 0) {
kp -> c... | false | false | false | false | false | 0 |
delete_table(const char *name)
{
int error= heap_delete_table(name);
return error == ENOENT ? 0 : error;
} | false | false | false | false | false | 0 |
gst_segment_to_stream_time (const GstSegment * segment, GstFormat format,
guint64 position)
{
guint64 result, start, stop, time;
gdouble abs_applied_rate;
/* format does not matter for -1 */
if (G_UNLIKELY (position == -1))
return -1;
g_return_val_if_fail (segment != NULL, -1);
g_return_val_if_fai... | false | false | false | false | false | 0 |
dfa_firstwords(NEXTWORD **nw, int peseqlen, int maxnw, RecogProcess *r)
{
DFA_INFO *dfa;
DFA_ARC *arc;
MULTIGRAM *m;
int s, sb, se;
int cate, iw, ns;
int num = 0;
dfa = r->lm->dfa;
for (m = r->lm->grammars; m; m = m->next) {
if (m->active) {
sb = m->state_begin;
se = sb + m->dfa->state... | false | false | false | false | false | 0 |
_WriteByte(ArchiveHandle *AH, const int i)
{
lclContext *ctx = (lclContext *) AH->formatData;
int res;
res = fputc(i, AH->FH);
if (res != EOF)
ctx->filePos += 1;
else
die_horribly(AH, modulename, "could not write byte: %s\n", strerror(errno));
return res;
} | false | false | false | false | false | 0 |
RunDecayEvent(Object *o, ARegionList *pRegs)
{
AList *pFactions;
pFactions = PresentFactions();
forlist (pFactions) {
Faction *f = ((FactionPtr *) elem)->ptr;
f->Event(GetDecayFlavor() + *o->name + " " +
ObjectDefs[o->type].name + " in " +
ShortPrint(pRegs));
}
} | false | false | false | false | false | 0 |
multinomial_coefficients_mpz(int m, int n, map_vec_mpz &r)
{
vec_int t;
int j, tj, start, k;
mpz_class v;
if (m < 2)
throw std::runtime_error("multinomial_coefficients: m >= 2 must hold.");
if (n < 0)
throw std::runtime_error("multinomial_coefficients: n >= 0 must hold.");
t.assi... | false | false | false | false | false | 0 |
saa7134_tvaudio_getstereo(struct saa7134_dev *dev)
{
int retval = V4L2_TUNER_SUB_MONO;
switch (dev->pci->device) {
case PCI_DEVICE_ID_PHILIPS_SAA7134:
if (dev->tvaudio)
retval = tvaudio_getstereo(dev,dev->tvaudio);
break;
case PCI_DEVICE_ID_PHILIPS_SAA7133:
case PCI_DEVICE_ID_PHILIPS_SAA7135:
retval = ge... | false | false | false | false | false | 0 |
rtw_free_network_queue(struct adapter *padapter, u8 isfreeall)
{
struct list_head *phead, *plist;
struct wlan_network *pnetwork;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct __queue *scanned_queue = &pmlmepriv->scanned_queue;
spin_lock_bh(&scanned_queue->lock);
phead = get_list_head(scanned_queue);... | false | false | false | false | false | 0 |
encap_install(ENCAP *encap, encap_decision_func_t decision_func)
{
int status;
if (encap_vercmp(encap->e_pkginfo.ei_pkgfmt, "2.0") >= 0)
{
display_readme(encap);
if (BIT_ISSET(encap->e_options, OPT_PREREQS) &&
encap_check_prereqs(encap) != 0)
return -1;
}
status = process_package(encap, ENCAP_INSTAL... | false | false | false | false | false | 0 |
kill_process (GitgRunner *runner)
{
if (runner->priv->pid == 0)
{
return;
}
/* We remove our handler for the process here and install a dummy
handler later so it will still be properly reaped */
g_source_remove (runner->priv->watch_id);
kill (runner->priv->pid, SIGTERM);
g_child_watch_add (runner->priv->... | false | false | false | false | false | 0 |
propagate_eye(int origin, struct eye_data eye[BOARDMAX])
{
int pos;
for (pos = BOARDMIN; pos < BOARDMAX; pos++)
if (ON_BOARD(pos) && eye[pos].origin == origin) {
eye[pos].color = eye[origin].color;
eye[pos].esize = eye[origin].esize;
eye[pos].msize = eye[origin].msize;... | false | false | false | false | false | 0 |
gst_multi_fd_sink_handle_client_read (GstMultiFdSink * sink,
GstTCPClient * client)
{
int avail, fd;
gboolean ret;
fd = client->fd.fd;
if (ioctl (fd, FIONREAD, &avail) < 0)
goto ioctl_failed;
GST_DEBUG_OBJECT (sink, "[fd %5d] select reports client read of %d bytes",
fd, avail);
ret = TRUE;... | false | true | false | false | true | 1 |
_gss_ntlm_verify_mic
(OM_uint32 * minor_status,
gss_const_ctx_id_t context_handle,
const gss_buffer_t message_buffer,
const gss_buffer_t token_buffer,
gss_qop_t * qop_state
)
{
ntlm_ctx ctx = (ntlm_ctx)context_handle;
if (qop_state != NULL)
*qop_... | false | false | false | false | false | 0 |
msg_job_pages_printed (a2ps_job * Job)
{
int sheets;
uchar *ucp;
sheets = Job->sheets;
if (Job->duplex)
sheets = (sheets + 1) / 2;
/* Make a nice message to tell where the output is sent */
ucp = a2ps_destination_to_string (Job);
/* Report the pages */
if (Job->pages == 1)
/* 1 page on 1 shee... | false | false | false | false | false | 0 |
ajFeatVocabGetTypes(const char* name)
{
ajuint i;
if(!FeatInitDone)
featInit();
for(i=0; featVocab[i].Name; i++)
{
if(!strcmp(name, featVocab[i].Truename) ||
!strcmp(name, featVocab[i].Name))
{
if(!*(featVocab[i].Typetable))
if(!featVocabI... | false | false | false | false | false | 0 |
autohelperowl_attackpat269(int trans, int move, int color, int action)
{
int a, b, c, D, E;
UNUSED(color);
UNUSED(action);
a = AFFINE_TRANSFORM(683, trans, move);
b = AFFINE_TRANSFORM(722, trans, move);
c = AFFINE_TRANSFORM(721, trans, move);
D = AFFINE_TRANSFORM(720, trans, move);
E = AFFINE_TRANSFORM... | false | false | false | false | false | 0 |
gettrans_dates(GtkWidget *parent, Account *gnc_acc,
GWEN_TIME **from_date, GWEN_TIME **to_date)
{
Timespec last_timespec, until_timespec;
time64 now = gnc_time (NULL);
gboolean use_last_date = TRUE;
gboolean use_earliest_date = TRUE;
gboolean use_until_now = TRUE;
g_return_val_if... | false | false | false | false | false | 0 |
units_change(GtkWidget *button,
CalibrateControls *controls)
{
GtkWidget *dialog, *hbox, *label, *entry;
const gchar *id, *unit;
gint response;
CalibrateArgs *args = controls->args;
if (controls->in_update)
return;
controls->in_update = TRUE;
id = g_object_get_data(G_... | false | false | false | false | false | 0 |
status_sc_op_failure (int rc)
{
if (rc == G10ERR_CANCELED)
write_status_text (STATUS_SC_OP_FAILURE, "1");
else if (rc == G10ERR_BAD_PASS)
write_status_text (STATUS_SC_OP_FAILURE, "2");
else if (rc)
write_status (STATUS_SC_OP_FAILURE);
} | false | false | false | false | false | 0 |
par96_rx(struct net_device *dev, struct baycom_state *bc)
{
int i;
unsigned int data, mask, mask2, descx;
struct parport *pp = bc->pdev->port;
/*
* do receiver; differential decode and descramble on the fly
*/
for(data = i = 0; i < PAR96_BURSTBITS; i++) {
bc->modem.par96.descram = (bc->modem.par96.descram <... | false | false | false | false | false | 0 |
Play()
{
AVM_WRITE("aviplay", 1, "AviPlayer::Play() ( %d )\n", m_bPaused);
if (!IsPlaying())
return;
if (m_bPaused)
Pause(!m_bPaused);
} | false | false | false | false | false | 0 |
hasSubmenu(unsigned int index) const {
if (index >= menuitems.size()) //boundary check
return false;
if (!menuitems[index]->submenu()) //has submenu?
return false;
return true;
} | false | false | false | false | false | 0 |
listOfOpenings() const
{
QStringList openingsList;
openingsList.append(QCoreApplication::translate("PlayerInfo", "<p>White Openings:</p><ul>"));
openingsList.append(QCoreApplication::translate("PlayerInfo", "</ul><p>Black Openings:</p><ul>"));
for(int i = 0; i < 2; ++i)
{
for(EcoFrequency::... | false | false | false | false | false | 0 |
fpid_start(struct seq_file *m, loff_t *pos)
{
mutex_lock(&ftrace_lock);
if (!ftrace_pids_enabled() && (!*pos))
return (void *) 1;
return seq_list_start(&ftrace_pids, *pos);
} | false | false | false | false | false | 0 |
get_diskdump_panic_task(void)
{
int i;
if ((!DISKDUMP_VALID() && !KDUMP_CMPRS_VALID())
|| !get_active_set())
return NO_TASK;
if (DISKDUMP_VALID())
return (ulong)dd->header->tasks[dd->header->current_cpu];
if (KDUMP_CMPRS_VALID()) {
if (kernel_symbol_exists("crashing_cpu") &&
cpu_map_addr("online... | false | false | false | false | false | 0 |
XschAddTextWidth( X, Y, Width, Type, Name, Layer )
long X;
long Y;
long Width;
long Type;
char *Name;
short Layer;
{
xschobj_list *Object;
autbegin();
Object = XschAllocObject();
Object->LAYER = Layer;
Object->TYPE = Type;
Object->NEXT = XschFigure->OBJECT[ Layer ];
Object->NAM... | false | false | false | false | false | 0 |
printNext(raw_ostream &OS, uint32_t LineNum) {
StringRef Line;
if (empty())
Line = "/*EOF*/";
else
std::tie(Line, Remaining) = Remaining.split("\n");
OS << format("%5u:", LineNum) << Line << "\n";
} | 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.