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 |
|---|---|---|---|---|---|---|
compressedRead(io_func* io, off_t location, size_t size, void *buffer) {
HFSPlusCompressed* data = (HFSPlusCompressed*) io->data;
size_t toRead;
while(size > 0) {
if(data->cached && location >= data->cachedStart && location < data->cachedEnd) {
if((data->cachedEnd - location) < size)
toRead = data->cachedE... | false | true | false | false | false | 1 |
mpw_set_mpq_use (mpw_ptr rop, mpq_ptr op)
{
MAKE_REAL(rop);
rop->r->alloc.usage--;
if(rop->r->alloc.usage==0)
mpwl_free(rop->r);
GET_NEW_REAL (rop->r);
rop->r->type = MPW_RATIONAL;
rop->r->alloc.usage = 1;
memcpy (rop->r->data.rval, op, sizeof (__mpq_struct));
} | false | true | false | false | false | 1 |
get_width(const char *fmt, size_t *width)
{
for (; my_isdigit(&my_charset_latin1, *fmt); fmt++)
{
*width= *width * 10 + (uint)(*fmt - '0');
}
return fmt;
} | false | false | false | false | false | 0 |
L55__FIXUP__cmpfun(base0)
register object *base0;
{ register object *base=vs_base;
register object *sup=base+VM61; VC61
vs_check;
{register object V633;
V633=(base[0]);
vs_top=sup;
goto TTL;
TTL:;
{register object V634;
V634= Cnil;
goto T1404;
T1404:;
if(!(type_of((V633))==t_cons)){
goto T1407;}
goto T1406;... | false | false | false | false | false | 0 |
ses_arglist(fd, cmd, gap, fullname, flagp)
FILE *fd;
char *cmd;
garray_T *gap;
int fullname; /* TRUE: use full path name */
unsigned *flagp;
{
int i;
char_u *buf = NULL;
char_u *s;
if (gap->ga_len == 0)
return put_line(fd, "silent! argdel *");
if (fputs(cmd, fd) < 0)
return ... | false | false | false | false | false | 0 |
handleChange()
{
if (os_ != topOs_) {
os_ = topOs_;
for (size_t i = 0; i < entityStack_.size(); i++) {
StringC tem;
entityStack_[i].str.flush();
entityStack_[i].str.extractString(tem);
os() << tem;
}
entityStack_.resize(0);
}
} | false | false | false | false | false | 0 |
nemo_directory_notify_files_added (GList *files)
{
GHashTable *added_lists;
GList *p;
NemoDirectory *directory;
GHashTable *parent_directories;
NemoFile *file;
GFile *location, *parent;
/* Make a list of added files in each directory. */
added_lists = g_hash_table_new (NULL, NULL);
/* Make a list of parent d... | false | false | false | false | false | 0 |
lookThroughAnd(PHINode *Phi, Type *&RT,
SmallPtrSetImpl<Instruction *> &Visited,
SmallPtrSetImpl<Instruction *> &CI) {
if (!Phi->hasOneUse())
return Phi;
const APInt *M = nullptr;
Instruction *I, *J = cast<Instruction>(Phi->use_begin()... | false | false | false | false | false | 0 |
st_widget_set_accessible_name (StWidget *widget,
const gchar *name)
{
g_return_if_fail (ST_IS_WIDGET (widget));
if (widget->priv->accessible_name != NULL)
g_free (widget->priv->accessible_name);
widget->priv->accessible_name = g_strdup (name);
g_object_notify (G_OBJECT (w... | false | false | false | false | false | 0 |
findMatchingPortal(Portal * portal)
{
// look through all the portals in zone2 for a match
Portal* portal2;
PortalList::iterator pi2, piend2;
piend2 = mPortals.end();
for (pi2 = mPortals.begin(); pi2 != piend2; pi2++)
{
portal2 = *pi2;
//portal... | false | false | false | false | false | 0 |
evg_stencil_set_alpha(GF_STENCIL st, u8 alpha)
{
EVG_Texture *_this = (EVG_Texture *)st;
if (!_this) return GF_BAD_PARAM;
if (_this->type==GF_STENCIL_SOLID) return GF_BAD_PARAM;
if (_this->type==GF_STENCIL_TEXTURE)
_this->alpha = alpha;
else
((EVG_BaseGradient*)st)->alpha = alpha;
return GF_OK;
} | false | false | false | false | false | 0 |
upsdrv_initups(void)
{
snmp_info_t *su_info_p;
char model[SU_INFOSIZE];
bool_t status;
const char *mibs;
upsdebugx(1, "SNMP UPS driver : entering upsdrv_initups()");
/* Retrieve user's parameters */
mibs = testvar(SU_VAR_MIBS) ? getval(SU_VAR_MIBS) : "auto";
/* init SNMP library, etc... */
nut_snmp_init(pro... | true | true | false | false | true | 1 |
buf_append_buffer (struct buffer *to, struct buffer *from)
{
struct buffer_data *n;
/* Copy the data pointer to the new buf. */
buf_append_data (to, from->data, from->last);
n = from->data;
while (n)
{
if (n == from->last) break;
n = n->next;
}
/* Remove from the original location.... | false | false | false | false | false | 0 |
gl843_feed (Genesys_Device * dev, unsigned int steps)
{
Genesys_Register_Set local_reg[GENESYS_GL843_MAX_REGS];
SANE_Status status;
Genesys_Register_Set *r;
float resolution;
uint8_t val;
DBGSTART;
/* prepare local registers */
memcpy (local_reg, dev->reg, GENESYS_GL843_MAX_REGS * sizeof (Genesys_Regi... | false | false | false | false | false | 0 |
glXQueryExtension(Display * dpy, int *errorBase, int *eventBase)
{
int major_op, erb, evb;
Bool rv;
rv = XQueryExtension(dpy, GLX_EXTENSION_NAME, &major_op, &evb, &erb);
if (rv) {
if (errorBase)
*errorBase = erb;
if (eventBase)
*eventBase = evb;
}
return rv;
} | false | false | false | false | false | 0 |
parseargs(const char *const *argv) {
const char *arg;
int c;
while ((arg= *++argv)) {
if (arg[0] != '-') usageerr("no non-option arguments are allowed");
if (arg[1] == '-') {
if (!strcmp(arg,"--timeout")) {
if (!(arg= *++argv)) usageerr("--timeout needs a value");
settimeout(arg);
forever= 0;
... | false | false | false | false | false | 0 |
closefrom(int minfd)
{
DIR *dir = opendir("/proc/self/fd");
if (dir) {
int dfd = dirfd(dir);
struct dirent *ent;
while ((ent = readdir(dir))) {
char *end;
int fd = strtol(ent->d_name, &end, 10);
if (ent->d_name[0] && !end[0] && fd >= minfd &&
fd != dfd)
close(fd);
}
closedir(dir);
}
re... | false | false | false | false | false | 0 |
find_alive_thread(struct task_struct *p)
{
struct task_struct *t;
for_each_thread(p, t) {
if (!(t->flags & PF_EXITING))
return t;
}
return NULL;
} | false | false | false | false | false | 0 |
checkTyconAmbig(line,t,e)
Int line;
Text t;
Cell e; {
Tycon tc;
if (isTycon(e)) {
tc = e;
} else {
tc = findTycon(t);
}
if (!isNull(tc) && nonNull(tycon(tc).clashes)) {
Text t = tycon(tc).text;
List ls = tycon(tc).clashes;
ERRMSG(line) "Ambiguous type constructor occurrence \"%s\"", textToStr... | false | false | false | false | false | 0 |
svg_begin_job(GVJ_t * job)
{
char *s;
gvputs(job,
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n");
if ((s = agget(job->gvc->g, "stylesheet")) && s[0]) {
gvputs(job, "<?xml-stylesheet href=\"");
gvputs(job, s);
gvputs(job, "\" type=\"text/css\"?>\n");
}
#if 0
gvputs(job, "<!D... | false | false | false | false | false | 0 |
driver_register(struct device_driver *drv)
{
int ret;
struct device_driver *other;
BUG_ON(!drv->bus->p);
if ((drv->bus->probe && drv->probe) ||
(drv->bus->remove && drv->remove) ||
(drv->bus->shutdown && drv->shutdown))
printk(KERN_WARNING "Driver '%s' needs updating - please use "
"bus_type method... | false | false | false | false | false | 0 |
Seek(framepos_t framepos)
{
if ((m_uiChunk = find(framepos)) == ERR)
m_uiPosition = m_uiChunk = 0;
else
m_uiPosition = m_Header.dwStart + ((m_Header.dwSampleSize) ? m_Positions[m_uiChunk] : m_uiChunk);
AVM_WRITE("AVI reader", 3, "AviReadStream::Seek(%u) -> %d (%d)\n", framepos, m_uiChunk, m_iId);
re... | false | false | false | false | false | 0 |
up_device_hid_coldplug (UpDevice *device)
{
UpDeviceHid *hid = UP_DEVICE_HID (device);
GUdevDevice *native;
gboolean ret = FALSE;
gboolean fake_device;
const gchar *device_file;
const gchar *type;
const gchar *vendor;
/* detect what kind of device we are */
native = G_UDEV_DEVICE (up_device_get_native (device... | false | false | false | false | false | 0 |
waitwrite(int msecs) {
int x;
if (msecs < 0) msecs = 0;
for (x = 0; x < nitems; x++) {
items[x].events = POLLOUT;
items[x].revents = 0;
}
runpoll(msecs);
} | false | false | false | false | false | 0 |
mapdeco_is_gotoline_set(const struct tile *ptile,
enum direction8 dir)
{
struct gotoline_counter *pglc;
if (!ptile || !(0 <= dir && dir <= direction8_max())
|| !mapdeco_gotoline_table) {
return FALSE;
}
if (!gotoline_hash_lookup(mapdeco_gotoline_table, ptile, &pglc)) {
... | false | false | false | false | false | 0 |
adfs_f_read(struct super_block *sb, unsigned int id, unsigned int sz, struct adfs_dir *dir)
{
int ret;
if (sz != ADFS_NEWDIR_SIZE)
return -EIO;
ret = adfs_dir_read(sb, id, sz, dir);
if (ret)
adfs_error(sb, "unable to read directory");
else
dir->parent_id = adfs_readval(dir->dirtail.new.dirparent, 3);
ret... | false | false | false | false | false | 0 |
set_as_default_clicked_cb (GtkButton *button,
gpointer user_data)
{
NemoMimeApplicationChooser *chooser = user_data;
GAppInfo *info;
GError *error = NULL;
gchar *message = NULL;
info = gtk_app_chooser_get_app_info (GTK_APP_CHOOSER (chooser->details->open_with_widget));
g_app_info_set_as_default_for_type (... | false | false | false | false | false | 0 |
inchi_ios_flush2(INCHI_IOSTREAM* ios, FILE *f2)
{
if (ios->type == INCHI_IOSTREAM_STRING)
{
if (ios->s.pStr)
{
if (ios->s.nUsedLength > 0)
{
if (ios->f)
{
fprintf(ios->f,"%-s", ios->s.pStr);
... | false | false | false | false | false | 0 |
go_marker_assign (GOMarker *dst, GOMarker const *src)
{
if (src == dst)
return;
g_return_if_fail (GO_MARKER (src) != NULL);
g_return_if_fail (GO_MARKER (dst) != NULL);
dst->size = src->size;
dst->shape = src->shape;
dst->outline_color = src->outline_color;
dst->fill_color = src->fill_color;
} | false | false | false | false | false | 0 |
evaluateAsConstant(int64_t &Res) const {
MCValue Value;
if (!getSubExpr()->evaluateAsRelocatable(Value, nullptr, nullptr))
return false;
if (!Value.isAbsolute())
return false;
Res = evaluateAsInt64(Value.getConstant());
return true;
} | false | false | false | false | false | 0 |
do_seek_on_write (GVfsBackend *backend,
GVfsJobSeekWrite *job,
GVfsBackendHandle _handle,
goffset offset,
GSeekType type)
{
GVfsBackendSmb *op_backend = G_VFS_BACKEND_SMB (backend);
SmbWriteHandle *handle = _handle;
int whence;
off_t res;
smbc_lseek_fn smbc_lseek;
switch (type)
{
... | false | false | false | false | false | 0 |
do_decl_instantiation (tree decl, tree storage)
{
tree result = NULL_TREE;
int extern_p = 0;
if (!decl)
/* An error occurred, for which grokdeclarator has already issued
an appropriate message. */
return;
else if (! DECL_LANG_SPECIFIC (decl))
{
error ("explicit instantiation of non-te... | false | false | false | false | false | 0 |
bnx2x_bsc_module_sel(struct link_params *params)
{
int idx;
u32 board_cfg, sfp_ctrl;
u32 i2c_pins[I2C_SWITCH_WIDTH], i2c_val[I2C_SWITCH_WIDTH];
struct bnx2x *bp = params->bp;
u8 port = params->port;
/* Read I2C output PINs */
board_cfg = REG_RD(bp, params->shmem_base +
offsetof(struct shmem_region,
... | false | false | false | false | false | 0 |
applyOptions()
{
if (!w || thread)
return;
IconsetRosterUI *d = (IconsetRosterUI *)w;
PsiOptions::instance()->setOption("options.ui.contactlist.use-transport-icons", d->ck_useTransportIconsForContacts->isChecked());
// roster - default
{
const Iconset *is = d->iss_defRoster->iconset();
if (is) {
QFileIn... | false | false | false | false | false | 0 |
glusterd_xfer_cli_probe_resp (rpcsvc_request_t *req, int32_t op_ret,
int32_t op_errno, char *hostname, int port)
{
gf1_cli_probe_rsp rsp = {0, };
int32_t ret = -1;
GF_ASSERT (req);
rsp.op_ret = op_ret;
rsp.op_errno = op_errno;
... | false | false | false | false | false | 0 |
do_cmd_wiz_summon(int num)
{
int py = p_ptr->py;
int px = p_ptr->px;
int i;
for (i = 0; i < num; i++)
{
(void)summon_specific(py, px, p_ptr->depth, 0, 1);
}
} | false | false | false | false | false | 0 |
GListClose(GList *l) {
GEvent e;
e.type = et_close;
e.w = l->g.base;
if ( l->g.handle_controlevent != NULL )
(l->g.handle_controlevent)(&l->g,&e);
else
GDrawPostEvent(&e);
} | false | false | false | false | false | 0 |
get(const Jid &jid)
{
type = 0;
d->jid = jid;
iq = createIQ(doc(), "get", d->jid.full(), id());
QDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:search");
iq.appendChild(query);
} | false | false | false | false | false | 0 |
go_selector_drag_begin (GtkWidget *button,
GdkDragContext *context,
GOSelector *selector)
{
GOSelectorPrivate *priv = selector->priv;
GdkPixbuf *pixbuf;
pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE,
8, 48, 32);
if (priv->dnd_fill_icon != NULL)
(priv->dnd_fill_icon) (selector, pixbuf);
... | false | false | false | false | false | 0 |
xpnd_1wcard(int32 wci, word32 ndx)
{
int32 wcvi, wchval, i;
word32 ndx2;
wchval = (__wcardtab[wci].wcchar == '?') ? 2 : 1;
i = __wcardtab[wci].wcinum;
/* notice need to go through for 0 since table value not yet set */
for (wcvi = 0; wcvi <= wchval; wcvi++)
{
if (!__cur_udp->u_wide)
{
/* know i in... | false | false | false | false | false | 0 |
startIcon()
{
#ifndef WIDGET_PLUGIN
if ( icon ) {
connect(icon, SIGNAL(pixmapChanged()), SLOT(iconUpdated()));
icon->activated(false); // TODO: should icon play sound when it's activated on icon?
}
iconUpdated();
#endif
} | false | false | false | false | false | 0 |
set_up_temp_documents (TempDocumentsData *data, gconstpointer service)
{
GDataDocumentsEntry *document;
gchar *upload_uri, *document_file_path;
GFile *document_file;
upload_uri = gdata_documents_service_get_upload_uri (NULL);
/* Create a temporary folder */
set_up_temp_folder ((TempFolderData*) data, service);
... | false | false | false | false | false | 0 |
unxor(char *str, int key)
{
while (*str)
*str++ ^= key;
} | false | false | false | false | false | 0 |
drawImageMask(GfxState *state, Object *ref, Stream *str,
int width, int height, GBool invert,
GBool interpolate, GBool inlineImg) {
FILE *f;
int c;
int size, i;
// dump JPEG file
if (dumpJPEG && str->getKind() == strDCT && !inlineImg) {
// open the image file
setFilename("jpg");
++... | false | false | false | false | false | 0 |
jit_info_table_realloc (MonoJitInfoTable *old)
{
int i;
int num_elements = jit_info_table_num_elements (old);
int required_size;
int num_chunks;
int new_chunk, new_element;
MonoJitInfoTable *new;
/* number of needed places for elements needed */
required_size = (int)((long)num_elements * JIT_INFO_TABLE_FILL_RA... | false | false | false | false | false | 0 |
GetWORD(char *sensekey)
{
static char word[100];
int i = 0;
/* Pass in encoded sense string and return WORD */
while ((word[i++] = *sensekey++) != '%');
word[i - 1] = '\0';
return(word);
} | false | false | false | false | false | 0 |
reservation_flags_string(uint16_t flags)
{
char *flag_str = xstrdup("");
if (flags & RESERVE_FLAG_MAINT)
xstrcat(flag_str, "MAINT");
if (flags & RESERVE_FLAG_NO_MAINT) {
if (flag_str[0])
xstrcat(flag_str, ",");
xstrcat(flag_str, "NO_MAINT");
}
if (flags & RESERVE_FLAG_OVERLAP) {
if (flag_str[0])
xst... | false | false | false | false | false | 0 |
Load (std::string const &uri, const gchar *mime_type, Document* Doc, const char *options)
{
Loader *l = Loader::GetLoader (mime_type);
GsfInput *input;
if (!l) {
l = Loader::GetLoader ("chemical/x-cml");
if (!l)
return ContentTypeUnknown;
char *cml = ConvertToCML (uri, mime_type, options);
if (!cml)
re... | false | false | false | false | false | 0 |
nrrdSameSize(const Nrrd *n1, const Nrrd *n2, int useBiff) {
static const char me[]="nrrdSameSize";
unsigned int ai;
char stmp[2][AIR_STRLEN_SMALL];
if (!(n1 && n2)) {
biffMaybeAddf(useBiff, NRRD, "%s: got NULL pointer", me);
return 0;
}
if (n1->dim != n2->dim) {
biffMaybeAddf(useBiff, NRRD, "%s... | false | false | false | false | false | 0 |
autoinscribe_ground(void)
{
int py = p_ptr->py;
int px = p_ptr->px;
s16b this_o_idx, next_o_idx = 0;
/* Scan the pile of objects */
for (this_o_idx = cave->o_idx[py][px]; this_o_idx; this_o_idx = next_o_idx)
{
/* Get the next object */
next_o_idx = object_byid(this_o_idx)->next_o_idx;
/* Apply an autoinsc... | false | false | false | false | false | 0 |
fdwait(int fd, int rw)
{
int bits;
if(!startedfdtask){
startedfdtask = 1;
taskcreate(fdtask, 0, 32768);
}
if(npollfd >= MAXFD){
fprint(2, "too many poll file descriptors\n");
abort();
}
taskstate("fdwait for %s", rw=='r' ? "read" : rw=='w' ? "write" : "error");
bits = 0;
switch(rw){
case 'r':
bit... | false | false | false | false | false | 0 |
print_done_cb (GtkPrintOperation *operation,
GtkPrintOperationResult result,
GKeyFile *key_file)
{
GtkPrintSettings *settings;
settings = gtk_print_operation_get_print_settings (operation);
if (result == GTK_PRINT_OPERATION_RESULT_APPLY)
save_settings (settings, key_file);
if (resu... | false | false | false | false | false | 0 |
assign_conj(C *Ac, C *A, int rank, const bench_iodim *dim, int stride)
{
if (rank == 0) {
c_re(*Ac) = c_re(*A);
c_im(*Ac) = -c_im(*A);
}
else {
int i, n0 = dim[rank - 1].n, s = stride;
rank -= 1;
stride *= n0;
assign_conj(Ac, A, rank, dim, stride);
... | false | false | false | false | false | 0 |
ComputeRealConstExpr() const
{
float a = child->ComputeRealConstExpr();
if (token.GetValue() == TOK_PLUS) return a;
return -a;
} | false | false | false | false | false | 0 |
setup_menu()
{
m_refActionGroup = Gtk::ActionGroup::create();
m_refActionGroup->add(Gtk::Action::create("ContextMenu", "Context Menu") );
m_refContextEdit = Gtk::Action::create("ContextEdit", Gtk::Stock::EDIT);
m_refActionGroup->add(m_refContextEdit,
sigc::mem_fun(*this, &AddDel::on_MenuPopup_activate_Edit... | false | false | false | false | false | 0 |
AddIncludeDir(const wxString& dir)
{
if (dir.IsEmpty())
return;
wxString base = dir;
if (base.Last() == wxFILE_SEP_PATH)
base.RemoveLast();
if (!wxDir::Exists(base))
{
TRACE(_T("ParserBase::AddIncludeDir(): Directory %s does not exist?!"), base.wx_str());
return;
... | false | false | false | false | false | 0 |
__expl (long double x)
{
long double z = __ieee754_expl (x);
if (__builtin_expect (!__finitel (z) || z == 0, 0)
&& __finitel (x) && _LIB_VERSION != _IEEE_)
return __kernel_standard_l (x, x, 206 + !!__signbitl (x));
return z;
} | false | false | false | false | false | 0 |
nt_group_tree(AWT_canvas *ntw, int mode, int color_group) {
GB_transaction gb_dummy(ntw->gb_main);
AWT_TREE(ntw)->check_update(ntw->gb_main);
AWT_TREE(ntw)->group_tree(AWT_TREE(ntw)->tree_root, mode, color_group);
nt_save_changed_tree(ntw);
} | false | false | false | false | false | 0 |
tms32031_get_reg(int regnum)
{
float temp;
switch (regnum)
{
case REG_PC: return tms32031.pc;
case TMS32031_R0: return IREG(TMR_R0);
case TMS32031_R1: return IREG(TMR_R1);
case TMS32031_R2: return IREG(TMR_R2);
case TMS32031_R3: return IREG(TMR_R3);
case TMS32031_R4: return IREG(TMR_R4);
... | false | false | false | false | false | 0 |
compare_date_value (const GValue *va,
const GValue *vb)
{
GDate *a = g_value_get_boxed (va);
GDate *b = g_value_get_boxed (vb);
if (a == b)
return 0;
else if (!a)
return -1;
else if (!b)
return 1;
else
return g_date_compare (a, b);
} | false | false | false | false | false | 0 |
get_alignment_args(char **data, int *align, int *flags, char *pad)
{
char *str;
*align = 0;
*flags = ALIGN_CUT|ALIGN_PAD;
*pad = ' ';
/* '!' = don't cut, '-' = right padding */
str = *data;
while (*str != '\0' && *str != ']' && !i_isdigit(*str)) {
if (*str == '!')
*flags &= ~ALIGN_CUT;
else if (*... | false | false | false | false | false | 0 |
parse_brackets(IPFilter::Primitive& prim, const Vector<String>& words, int pos,
ErrorHandler* errh)
{
int first_pos = pos + 1;
String combination;
for (pos++; pos < words.size() && words[pos] != "]"; pos++)
combination += words[pos];
if (pos >= words.size()) {
errh->error("missing %<]%>");
r... | false | false | false | false | false | 0 |
find_windowlevel(const Glib::ustring& desc) {
Aeskulap::WindowLevelList::iterator i;
for(i = m_list.begin(); i != m_list.end(); i++) {
if(i->first == desc) {
break;
}
}
return i;
} | false | false | false | false | false | 0 |
gpk_task_media_change_question (PkTask *task, guint request, PkResults *results)
{
GPtrArray *array;
PkMediaChangeRequired *item;
const gchar *name;
gchar *message = NULL;
gchar *media_id;
PkMediaTypeEnum media_type;
gchar *media_text;
GpkTaskPrivate *priv = GPK_TASK(task)->priv;
/* save the current request *... | false | false | false | false | false | 0 |
SFileAddListFile(HANDLE hMpq, const char * szListFile)
{
TListFileCache * pCache = NULL;
TMPQArchive * ha = (TMPQArchive *)hMpq;
char szFileName[MAX_PATH];
size_t nLength = 0;
int nError = ERROR_SUCCESS;
// Add the listfile for each MPQ in the patch chain
while(ha != NULL)
{
... | false | false | false | false | false | 0 |
scale_loaded_pixbuf_et_rrggbb(
//GdkPixbuf *impixfile,
int lp //image number
)
{
GdkPixbuf
** pbl = which_pixbuf(lp,PIXLOADED),
**pbs = which_pixbuf(lp,PIXSUBIMAGE);
double *a=sp->transforms[lp].loaded2subimage;
if(a[0]==1. && a[1]==0. && a[2]==0. &&
a[3]==0. && a[4]==1. && a[5]... | false | false | false | false | false | 0 |
Translate(const SocketAddressPair& route) {
AsyncUDPSocket* socket = AsyncUDPSocket::Create(external_, external_ip_);
if (!socket) {
LOG(LS_ERROR) << "Couldn't find a free port!";
return;
}
TransEntry* entry = new TransEntry(route, socket, nat_);
(*int_map_)[route] = entry;
(*ext_map_)[socket->Get... | false | false | false | false | false | 0 |
phasingLine(double lpm)
{
status->setText(QString(tr("phasing line, lpm %1")).arg(lpm,0,'f',1));
skip->setDisabled(true);
} | false | false | false | false | false | 0 |
ioat_register(struct ioatdma_device *ioat_dma)
{
int err = dma_async_device_register(&ioat_dma->dma_dev);
if (err) {
ioat_disable_interrupts(ioat_dma);
pci_pool_destroy(ioat_dma->completion_pool);
pci_pool_destroy(ioat_dma->dma_pool);
}
return err;
} | false | false | false | false | false | 0 |
cfg_readline(file_backend *cfg)
{
char *line = NULL;
char *line_src, *line_end;
int line_len;
line_src = cfg->reader.read_ptr;
line_end = strchr(line_src, '\n');
/* no newline at EOF */
if (line_end == NULL)
line_end = strchr(line_src, 0);
else
while (is_linebreak(line_end))
line_end = strchr(lin... | false | false | false | false | false | 0 |
ata_dev_acpi_handle(struct ata_device *dev)
{
return dev->flags & ATA_DFLAG_ACPI_DISABLED ?
NULL : ACPI_HANDLE(&dev->tdev);
} | false | false | false | false | false | 0 |
freeMonitor (Object *obj) {
monitorCacheLock.lock() ;
MonitorMap::iterator m = monitorCache.find (obj) ;
if (m != monitorCache.end()) {
Monitor *mon = m->second ;
monitorFreeList.push_back (mon) ;
monitorCache.erase (m) ;
}
monitorCacheLock.unlock() ;
} | false | false | false | false | false | 0 |
otp_authorize(void *instance, REQUEST *request)
{
otp_option_t *inst = (otp_option_t *) instance;
char challenge[OTP_MAX_CHALLENGE_LEN + 1]; /* +1 for '\0' terminator */
int auth_type_found;
/* Early exit if Auth-Type != inst->name */
{
VALUE_PAIR *vp;
auth_type_found = 0;
if ((vp = pairfind(re... | true | true | false | false | true | 1 |
rb_const_remove(VALUE mod, ID id)
{
VALUE val;
st_data_t v, n = id;
if (!OBJ_UNTRUSTED(mod) && rb_safe_level() >= 4)
rb_raise(rb_eSecurityError, "Insecure: can't remove constant");
rb_check_frozen(mod);
if (!RCLASS_CONST_TBL(mod) || !st_delete(RCLASS_CONST_TBL(mod), &n, &v)) {
if (rb_const_define... | false | false | false | false | false | 0 |
create_input(const param_t *p, const char *fname,
const char *mname)
{
int lnr;
FILE *file, *model;
modelline_t *ml = NULL;
char line[MAXLINESIZE], *input;
if ((model = fopen(mname, "r")) == NULL) {
fprintf(stderr,PKG_NAME "Can't open template file %s for reading: %... | true | true | false | false | true | 1 |
attributed_meaning_to_string(Value& meaning,
String::Language lang, bool forced, bool allow_bool) {
String& result=*new String;
if(HashStringValue *hash=meaning.get_hash()) {
// $value(value) $subattribute(subattribute value)
if(Value* value=hash->get(value_name))
append_attribute_meaning(result, *value,... | false | false | false | false | false | 0 |
bfa_sfp_notify(void *sfp_arg, enum bfa_ioc_event_e event)
{
struct bfa_sfp_s *sfp = sfp_arg;
bfa_trc(sfp, event);
bfa_trc(sfp, sfp->lock);
bfa_trc(sfp, sfp->state_query_lock);
switch (event) {
case BFA_IOC_E_DISABLED:
case BFA_IOC_E_FAILED:
if (sfp->lock) {
sfp->status = BFA_STATUS_IOC_FAILURE;
bfa_cb_... | false | false | false | false | false | 0 |
IsSupportedReturnKeyAttribute( DcmElement *element, DcmSequenceOfItems *supSequenceElement )
// Date : December 12, 2001
// Author : Thomas Wilkens
// Task : This function checks if the given element refers to an attribute which is a supported
// return key attribute. If this is the... | false | false | false | false | false | 0 |
multi_process_bigdata(ubyte *data, int len, net_addr *from_addr, int reliable)
{
int type, bytes_processed;
int player_num;
header header_info;
ubyte *buf;
// the only packets we will process from an unknown player are GAME_QUERY, GAME_INFO, JOIN, PING, PONG, ACCEPT, and GAME_ACTIVE packets
player_num = find_pl... | false | false | false | false | false | 0 |
util_ald_cache_insert(util_ald_cache_t *cache, void *payload)
{
unsigned long hashval;
void *tmp_payload;
util_cache_node_t *node;
/* sanity check */
if (cache == NULL || payload == NULL) {
return NULL;
}
/* check if we are full - if so, try purge */
if (cache->numentries >= ca... | false | false | false | false | false | 0 |
gda_data_select_get_attributes_at (GdaDataModel *model, gint col, gint row)
{
GdaValueAttribute flags = GDA_VALUE_ATTR_IS_UNCHANGED;
GdaDataSelect *imodel;
imodel = (GdaDataSelect *) model;
g_return_val_if_fail (imodel->priv, 0);
GdaColumn *gdacol = g_slist_nth_data (imodel->priv->sh->columns, col);
if (imodel-... | false | false | false | false | false | 0 |
extractJpegDataFromArray(const void *data,
l_int32 nbytes,
l_int32 *pw,
l_int32 *ph,
l_int32 *pbps,
l_int32 *pspp)
{
l_uint8 *data8;
l_int32 imeta, msize, bps, w, h, spp;... | false | false | false | false | false | 0 |
gst_jif_mux_reset (GstJifMux * self)
{
GList *node;
GstJifMuxMarker *m;
for (node = self->priv->markers; node; node = g_list_next (node)) {
m = (GstJifMuxMarker *) node->data;
gst_jif_mux_marker_free (m);
}
g_list_free (self->priv->markers);
self->priv->markers = NULL;
} | false | false | false | false | false | 0 |
writeIptcData(const IptcData& iptcData, BasicIo& out) const
{
uint32_t resLength = 0;
byte buf[8];
if (iptcData.count() > 0) {
DataBuf rawIptc = IptcParser::encode(iptcData);
if (rawIptc.size_ > 0) {
#ifdef DEBUG
std::cerr << std::hex << "write: resou... | false | false | false | false | false | 0 |
_isContentEqual(const pf_Frag &f2) const
{
if(!pf_Frag::_isContentEqual(f2))
return false;
if(m_struxType != ((const pf_Frag_Strux &)(f2)).getStruxType())
return false;
return true;
} | false | false | false | false | false | 0 |
_elm_genlist_pan_smart_move(Evas_Object *obj,
Evas_Coord x __UNUSED__,
Evas_Coord y __UNUSED__)
{
ELM_GENLIST_PAN_DATA_GET(obj, psd);
psd->wsd->pan_changed = EINA_TRUE;
evas_object_smart_changed(obj);
if (psd->wsd->calc_job) ecore_job_del(psd->wsd->ca... | false | false | false | false | false | 0 |
iwl_tt_check_exit_ct_kill(unsigned long data)
{
struct iwl_priv *priv = (struct iwl_priv *)data;
struct iwl_tt_mgmt *tt = &priv->thermal_throttle;
unsigned long flags;
if (test_bit(STATUS_EXIT_PENDING, &priv->status))
return;
if (tt->state == IWL_TI_CT_KILL) {
if (priv->thermal_throttle.ct_kill_toggle) {
... | false | false | false | false | false | 0 |
glade_signal_editor_userdata_store_update (GladeSignalEditor *self,
GtkListStore *store)
{
GtkTreeIter tmp_iter;
GList *list;
GladeSignalEditorPrivate *priv = self->priv;
gtk_list_store_clear (store);
for (list = (GList *) glade_project_get_objects (priv->widget->project);
list && list->data;
... | false | false | false | false | false | 0 |
PrintDPCellsSaved_jd(CM_t *cm, int *jmin, int *jmax, int **hdmin, int **hdmax,
int W)
{
int v;
int j;
int max;
int64_t after, before;
printf("Printing DP cells saved using j and d bands:\n");
before = after = 0;
for (v = 0; v < cm->M; v++)
{
for(j = 0; j <= W; j++)
if (cm->sttype[v] !=... | false | false | false | false | false | 0 |
png_set_asm_flags (png_structp png_ptr, png_uint_32 asm_flags)
{
/* Obsolete as of libpng-1.2.20 and will be removed from libpng-1.4.0 */
if (png_ptr != NULL)
png_ptr->asm_flags = 0;
asm_flags = asm_flags; /* Quiet the compiler */
} | false | false | false | false | false | 0 |
fix_ports(InetMon *in)
{
gint cd_length = 2;
gulong tmp;
if (!*in->label0)
{
in->port0_1 = 0;
in->data0_is_range = 0;
--cd_length;
}
if (!*in->label1)
{
in->port1_1 = 0;
in->data1_is_range = 0;
--cd_length;
}
if (in->data0_is_range && (in->port0_1 < in->port0_0))
{
tmp = in->port0_1;
in... | false | false | false | false | false | 0 |
clone(void *mem_ctx, struct hash_table *ht) const
{
ir_loop *new_loop = new(mem_ctx) ir_loop();
foreach_list(n, &this->body_instructions) {
ir_instruction *ir = (ir_instruction *) n;
new_loop->body_instructions.push_tail(ir->clone(mem_ctx, ht));
}
return new_loop;
} | false | false | false | false | false | 0 |
nfs3_mknod_fifo (nfs3_call_state_t *cs)
{
int ret = -EFAULT;
nfs_user_t nfu = {0, };
mode_t mode = S_IFIFO;
if (!cs)
return ret;
nfs_request_user_init (&nfu, cs->req);
if (gf_attr_... | false | false | false | false | false | 0 |
coverage_counter_alloc (unsigned counter, unsigned num)
{
if (no_coverage)
return 0;
if (!num)
return 1;
if (!fn_v_ctrs[counter])
{
tree array_type = build_array_type (get_gcov_type (), NULL_TREE);
fn_v_ctrs[counter]
= build_var (current_function_decl, array_type, counter);
}
fn... | false | false | false | false | false | 0 |
get_set_type(struct lib_context *lc, void *v)
{
struct raid_set *rs = v;
/* Check, if a RAID set is stacked. */
return is_stacked(rs) ? get_stacked_type(rs) : get_type(lc, rs->type);
} | false | false | false | false | false | 0 |
lam_ssi_coll_smp_barrier(MPI_Comm comm)
{
int err;
lam_ssi_coll_data_t *lcd = comm->c_ssi_coll_data;
/* Don't need to set_root because we use coordinator comms as if
this were rooted at rank==0, and that was setup at init time */
/* Fan in from the ranks on my local node */
if (lcd->lcd_local_size > 1... | false | false | false | false | false | 0 |
each_pattern_pixel(int *x,int *y)
{
if(this->_pattern_c<16){
*x=format_info_addr[0][this->_pattern_c][0];
*y=format_info_addr[0][this->_pattern_c][1];
}
else if(this->_pattern_c<32){
*x=format_info_addr[1][this->_pattern_c-16][0];
*y=format_inf... | false | false | false | false | false | 0 |
del(const KUrl& url, bool)
{
kDebug(7113) << url;
if (!maybeSetRequestUrl(url))
return;
resetSessionSettings();
m_request.method = HTTP_DELETE;
m_request.cacheTag.policy = CC_Reload;
if (m_protocol.startsWith("webdav")) { //krazy:exclude=strings due to QByteArray
m_request.url.setQuery(QString()... | false | false | false | false | false | 0 |
gfarm_pgsql_check_misc(PGresult *res, const char *command, const char *diag)
{
gfarm_error_t e;
if (PQresultStatus(res) == PGRES_COMMAND_OK) {
e = GFARM_ERR_NO_ERROR;
} else {
e = GFARM_ERR_UNKNOWN;
gflog_error(GFARM_MSG_1000423, "%s: %s: %s", diag, command,
PQresultErrorMessage(res));
}
return (e);
} | false | false | false | false | false | 0 |
linestyle_for_CSS (const char * property)
{
if (property == 0) return s_linestyle[0];
unsigned char u = static_cast<unsigned char>(*property);
if (!isdigit (static_cast<int>(u))) return property;
if ((*property > '0') && (*property < '4')) return s_linestyle[*property - '0'];
return s_linestyle[0];
} | 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.