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 |
|---|---|---|---|---|---|---|
Curl_cookie_getlist(struct CookieInfo *c,
const char *host, const char *path,
bool secure)
{
struct Cookie *newco;
struct Cookie *co;
time_t now = time(NULL);
struct Cookie *mainco=NULL;
size_t matches = 0;
if(!c || !c->cookies)
retu... | false | false | false | false | false | 0 |
eio_monitor_backend_add(Eio_Monitor *monitor)
{
Eio_Monitor_Backend *backend;
int mask =
IN_ATTRIB |
IN_CLOSE_WRITE |
IN_MOVED_FROM |
IN_MOVED_TO |
IN_DELETE |
IN_CREATE |
IN_MODIFY |
IN_DELETE_SELF |
IN_MOVE_SELF |
IN_UNMOUNT;
if (!_inotify_fdh)
{
... | false | false | false | false | false | 0 |
errors_store(struct md_rdev *rdev, const char *buf, size_t len)
{
unsigned int n;
int rv;
rv = kstrtouint(buf, 10, &n);
if (rv < 0)
return rv;
atomic_set(&rdev->corrected_errors, n);
return len;
} | false | false | false | false | false | 0 |
PyObject_DelItemString(PyObject *o, char *key)
{
PyObject *okey;
int ret;
if (o == NULL || key == NULL) {
null_error();
return -1;
}
okey = PyString_FromString(key);
if (okey == NULL)
return -1;
ret = PyObject_DelItem(o, okey);
Py_DECREF(okey);
return ret;
} | false | false | false | false | false | 0 |
ts_write(struct file *file, const char __user *buf,
size_t count, loff_t *ppos)
{
struct dvb_device *dvbdev = file->private_data;
struct ngene_channel *chan = dvbdev->priv;
struct ngene *dev = chan->dev;
if (wait_event_interruptible(dev->tsout_rbuf.queue,
dvb_ringbuffer_free
(&dev->tsout_rbuf)... | false | false | false | false | false | 0 |
ISNSAppendAttr (ISNS_Msg * msg, int tag, int size, char *p_value, int value)
{
ISNS_Attr *attr;
if (msg == NULL)
{
__LOG_ERROR ("Message is NULL");
return (ERROR);
}
/* add room for error code */
if (msg->hdr.msg_len == 0)
{
msg->hdr.msg_len = 4;
msg->hdr.msg_len += ISNS_S... | false | false | false | false | false | 0 |
Construct( IDirectFBImageProvider *thiz,
... )
{
struct jpeg_decompress_struct cinfo;
struct my_error_mgr jerr;
IDirectFBDataBuffer *buffer;
CoreDFB *core;
va_list tag;
DIRECT_ALLOCATE_INTERFACE_DATA(thiz, IDirectFBImageProvider_JPEG)
va_sta... | false | false | false | false | false | 0 |
caml_lazy_make_forward (value v)
{
CAMLparam1 (v);
CAMLlocal1 (res);
res = caml_alloc_small (1, Forward_tag);
Field (res, 0) = v;
CAMLreturn (res);
} | false | false | false | false | false | 0 |
e_text_bounds (GnomeCanvasItem *item,
gdouble *x1,
gdouble *y1,
gdouble *x2,
gdouble *y2)
{
EText *text;
gdouble width, height;
text = E_TEXT (item);
*x1 = 0;
*y1 = 0;
width = text->width;
height = text->height;
if (text->clip) {
if (text->clip_w... | false | false | false | false | false | 0 |
hauppauge_eeprom(struct au0828_dev *dev, u8 *eeprom_data)
{
struct tveeprom tv;
tveeprom_hauppauge_analog(&dev->i2c_client, &tv, eeprom_data);
dev->board.tuner_type = tv.tuner_type;
/* Make sure we support the board model */
switch (tv.model) {
case 72000: /* WinTV-HVR950q (Retail, IR, ATSC/QAM */
case 72001: ... | false | false | false | false | false | 0 |
lookup(nc_class objectclass, Symbol* pattern)
{
Symbol* grp;
if(pattern == NULL) return NULL;
grp = lookupgroup(pattern->prefix);
if(grp == NULL) return NULL;
return lookupingroup(objectclass,pattern->name,grp);
} | false | false | false | false | false | 0 |
ArtTextDumpToFile(Widget gw, FILE *file)
{
ArtTextWidget w = (ArtTextWidget)gw;
TSNode *node;
char *c = NULL;
for (node = w->arttext.stream ; node ; node = node->gen.next) {
switch (node->gen.type) {
case LineTypeString:
c = node->str.str;
break;
case LineTypeWString:
c = NULL;
... | false | false | false | false | false | 0 |
mimeGetEntry(const char *fn, int skip_encodings)
{
mimeEntry *m;
char *t;
char *name = xstrdup(fn);
try_again:
for (m = MimeTable; m; m = m->next) {
if (regexec(&m->compiled_pattern, name, 0, 0, 0) == 0)
break;
}
if (!skip_encodings)
(void) 0;
else if (m == NULL)
(void) 0;
else... | false | false | false | false | false | 0 |
parseContentType(String& params, MaterialScriptContext& context)
{
StringVector vecparams = StringUtil::tokenise(params, " \t");
if (vecparams.empty())
{
logParseError("No content_type specified", context);
return false;
}
String& paramType = vecparams... | false | false | false | false | false | 0 |
match_find_resv(const char *name)
{
dlink_node *ptr = NULL;
if (EmptyString(name))
return NULL;
DLINK_FOREACH(ptr, resv_channel_list.head)
{
struct ResvChannel *chptr = ptr->data;
if (match_chan(name, chptr->name))
return chptr;
}
return NULL;
} | false | false | false | false | false | 0 |
AddPlugin( WokXMLTag *tag )
{
if( LoadPlugIn(tag->GetAttr("filename")))
tag->AddAttr("outcome", "good");
else
tag->AddAttr("outcome", "bad");
return 1;
} | false | false | false | false | false | 0 |
run_defparams(Design*des)
{
{ NetScope*cur = sub_;
while (cur) {
cur->run_defparams(des);
cur = cur->sib_;
}
}
while (! defparams.empty()) {
pair<pform_name_t,NetExpr*> pp = defparams.front();
defparams.pop_front();
pform_name_t path = pp.first;
NetExpr*val... | false | false | false | false | false | 0 |
MGD77_Path_Init (struct MGD77_CONTROL *F)
{
size_t n_alloc = GMT_SMALL_CHUNK;
char file[BUFSIZ], line[BUFSIZ];
FILE *fp = NULL;
MGD77_Set_Home (F);
sprintf (file, "%s/mgd77_paths.txt", F->MGD77_HOME);
F->n_MGD77_paths = 0;
if ((fp = GMT_fopen (file, "r")) == NULL) {
fprintf (stderr, "%s: Warning: path file... | true | true | false | false | false | 1 |
hashvar(const char *p)
{
unsigned hashval;
hashval = ((unsigned char) *p) << 4;
while (*p && *p != '=')
hashval += (unsigned char) *p++;
return &vartab[hashval % VTABSIZE];
} | false | false | false | false | false | 0 |
dwc2_hsotg_map_dma(struct dwc2_hsotg *hsotg,
struct dwc2_hsotg_ep *hs_ep,
struct usb_request *req)
{
struct dwc2_hsotg_req *hs_req = our_req(req);
int ret;
/* if the length is zero, ignore the DMA data */
if (hs_req->req.length == 0)
return 0;
ret = usb_gadget_map_request(&hsotg->gadget, req, h... | false | false | false | false | false | 0 |
s5p_mfc_run_enc_frame(struct s5p_mfc_ctx *ctx)
{
struct s5p_mfc_dev *dev = ctx->dev;
unsigned long flags;
struct s5p_mfc_buf *dst_mb;
struct s5p_mfc_buf *src_mb;
unsigned long src_y_addr, src_c_addr, dst_addr;
/*
unsigned int src_y_size, src_c_size;
*/
unsigned int dst_size;
spin_lock_irqsave(&dev->irqlock, ... | false | false | false | false | false | 0 |
runOnModule(Module &M) {
bool Changed = false;
bool LocalChange = true;
// FIXME: instead of using smart algorithms, we just iterate until we stop
// making changes.
while (LocalChange) {
LocalChange = false;
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
if (!I->isDeclaration()... | false | false | false | false | false | 0 |
set_suc_set_in_dep_info(Block *layer_block, Dep_info **pp)
{
int no, i, total_num = layer_block->mt_num;
for (no = 1; no <= total_num; no++) {
IntSet pre_set = pp[no]->pre_set;
if (!empty_IntSet(pre_set)) {
for (i = min_IntSet(pre_set);
i > 0;
i = ... | false | false | false | false | false | 0 |
__sql_add_constraints(GString *sql, MidgardQueryBuilder *builder)
{
GSList *clist = NULL;
GSList *jlist = NULL;
guint j = 0;
for(clist = builder->priv->constraints;
clist != NULL; clist = clist->next) {
if(j > 0)
g_string_append(sql, " AND ");
g_string_append(sql,
MIDGARD_CORE_QUERY_CONSTRAINT... | false | false | false | false | false | 0 |
restore_custom_agacolors (uae_u8 *src)
{
int i;
for (i = 0; i < 256; i++) {
#ifdef AGA
uae_u32 v = RL;
color_regs_aga_genlock[i] = 0;
if (v & 0x80000000)
color_regs_aga_genlock[i] = 1;
v &= 0x00ffffff;
current_colors.color_regs_aga[i] = v;
#else
RL;
#endif
}
return src;
} | false | false | false | false | false | 0 |
c_finish_case (void)
{
struct c_switch *cs = switch_stack;
/* If we've not seen any case labels (or a default), we may still
need to chain any statements that were seen as the SWITCH_BODY. */
if (SWITCH_BODY (cs->switch_stmt) == NULL)
{
SWITCH_BODY (cs->switch_stmt) = TREE_CHAIN (cs->switch_stmt)... | false | false | false | false | true | 1 |
mark_set_cb (GtkTextBuffer *buffer,
GtkTextIter *cursoriter,
GtkTextMark *mark,
GtkSourceView *view)
{
if (mark == gtk_text_buffer_get_insert (buffer))
{
update_cursor_position_info (buffer, view);
}
} | false | false | false | false | false | 0 |
serverMakeName(arg, cmd)
char_u *arg;
char *cmd;
{
char_u *p;
if (arg != NULL && *arg != NUL)
p = vim_strsave_up(arg);
else
{
p = vim_strsave_up(gettail((char_u *)cmd));
/* Remove .exe or .bat from the name. */
if (p != NULL && vim_strchr(p, '.') != NULL)
*vim_strchr(p, '.') = NUL;
... | false | false | false | false | false | 0 |
simpl_dcl(tqual, addr_of, sym)
char *tqual;
int addr_of;
struct sym_entry *sym;
{
init_ilc(); /* initialize code list and string buffer */
prt_str(tqual, 0);
ilc_str(tqual);
if (addr_of) {
prt_str("*", 0);
ilc_str("*");
}
prt_str(sym->image, 0);
ilc_str(sym->image);
... | false | false | false | false | false | 0 |
mktwiddle(enum wakefulness wakefulness, P *p)
{
INT i;
INT n = p->n, nb = p->nb;
R *w, *W;
E nbf = (E)nb;
p->w = w = (R *) MALLOC(2 * n * sizeof(R), TWIDDLES);
p->W = W = (R *) MALLOC(2 * nb * sizeof(R), TWIDDLES);
bluestein_sequence(wakefulness, n, w);
for (i = 0; i < nb; ++i... | false | false | false | false | false | 0 |
set_broadcast_params(M2TSProgram *prog, u16 esid, u32 period, u32 ts_delta, u16 aggregate_on_stream, Bool adjust_carousel_time, Bool force_rap, Bool aggregate_au, Bool discard_pending, Bool signal_rap, Bool signal_critical, Bool version_inc)
{
u32 i=0;
GF_ESIStream *priv=NULL;
GF_ESInterface *esi=NULL;
/*locate ou... | false | false | false | false | false | 0 |
perform_c2(InfAdoptedOperation** begin,
InfAdoptedOperation** end,
test_result* result)
{
InfAdoptedOperation** _1;
InfAdoptedOperation** _2;
InfAdoptedOperation** _3;
for(_1 = begin; _1 != end; ++ _1)
{
for(_2 = begin; _2 != end; ++ _2)
{
for(_3 = begin; _3 != end; ++ _3)... | false | false | false | false | false | 0 |
lp_star (lua_State *L) {
int size1;
int n = luaL_checkint(L, 2);
TTree *tree1 = gettree(L, 1, &size1);
if (n >= 0) { /* seq tree1 (seq tree1 ... (seq tree1 (rep tree1))) */
TTree *tree = newtree(L, (n + 1) * (size1 + 1));
if (nullable(tree1))
luaL_error(L, "loop body may accept empty string");
... | false | false | false | false | false | 0 |
set_mode(void)
{
/*
* flags
*/
fl_fdesc = ao_taken(ad, "f");
fl_verbose = ao_taken(ad, "v");
if (ao_taken(ad, "nw"))
fl_wait = 0;
/*
* followed options
*/
nprocs = -1;
if (ao_taken(ad, "c")) {
ao_intparam(ad, "c", 0, 0, &nprocs);
fl_nprocs = 1;
} else if (ao_taken(ad, "np")) {
ao_intpara... | false | false | false | false | false | 0 |
humminbird_write_rtept(const waypoint* wpt)
{
int i;
if (humrte == NULL) {
return;
}
i = gb_ptr2int(wpt->extra_data);
if (i <= 0) {
return;
}
if (humrte->count < MAX_RTE_POINTS) {
humrte->points[humrte->count] = i - 1;
humrte->count++;
} else {
warning(MYNAME ": Sorry, routes are l... | false | false | false | false | false | 0 |
cso_for_each_state(struct cso_cache *sc, enum cso_cache_type type,
cso_state_callback func, void *user_data)
{
struct cso_hash *hash = _cso_hash_for_type(sc, type);
struct cso_hash_iter iter;
iter = cso_hash_first_node(hash);
while (!cso_hash_iter_is_null(iter)) {
void *state ... | false | false | false | false | false | 0 |
server_getspec (rpcsvc_request_t *req)
{
int32_t ret = -1;
int32_t op_errno = 0;
int32_t spec_fd = -1;
size_t file_len = 0;
char filename[ZR_PATH_MAX] = {0,};
struct stat stbuf = {0,};
... | false | false | false | false | false | 0 |
ReskinInterface() {
wxLogTrace(wxT("Function Start/End"), wxT("CSimpleProjectPanel::ReskinInterface - Function Begin"));
CMainDocument* pDoc = wxGetApp().GetDocument();
ProjectSelectionData* selData;
PROJECT* project;
char* ctrl_url;
CSimplePanelBase::ReskinInterface();
// Check to see if... | false | false | false | false | false | 0 |
adf4350_read(struct iio_dev *indio_dev,
uintptr_t private,
const struct iio_chan_spec *chan,
char *buf)
{
struct adf4350_state *st = iio_priv(indio_dev);
unsigned long long val;
int ret = 0;
mutex_lock(&indio_dev->mlock);
switch ((u32)private) {
case ADF4350_FREQ:
val = (u64)((st->r0_int *... | false | false | false | false | false | 0 |
sc_on_tree_row_activated(GtkTreeView *treeview, GtkTreePath *path,
GtkTreeViewColumn *col, gpointer user_data)
{
GtkTreeIter iter;
GtkTreeModel *model = GTK_TREE_MODEL(sc_store);
if (gtk_tree_model_get_iter(model, &iter, path))
{
/* only hide dialog if selection was not a category */
if (sc_insert... | false | false | false | false | false | 0 |
group_parse (struct group *group, struct argp_state *state, int key, char *arg)
{
if (group->parser)
{
error_t err;
state->hook = group->hook;
state->input = group->input;
state->child_inputs = group->child_inputs;
state->arg_num = group->args_processed;
err = (*group->parser)(... | false | false | false | false | false | 0 |
mini_get_shared_method_full (MonoMethod *method, gboolean all_vt, gboolean is_gsharedvt)
{
MonoGenericContext shared_context;
MonoMethod *declaring_method, *res;
gboolean partial = FALSE;
gboolean gsharedvt = FALSE;
MonoGenericContainer *class_container, *method_container = NULL;
if (method->is_generic || (metho... | false | false | false | false | false | 0 |
event_music_pause()
{
if ( Event_music_enabled == FALSE ) {
nprintf(("EVENTMUSIC", "EVENTMUSIC ==> Requested a song switch when event music is not enabled\n"));
return;
}
if ( Event_music_level_inited == FALSE ) {
nprintf(("EVENTMUSIC", "EVENTMUSIC ==> Event music is not enabled\n"));
return;
}
if (Curre... | false | false | false | false | false | 0 |
GetClassFromMacro(const wxString& macro)
{
wxString real(macro);
if (GetRealTypeIfTokenIsMacro(real))
{
Token* tk = TokenExists(real, nullptr, tkClass);
if (tk)
return tk->m_Name;
}
TRACE(_T("GetClassFromMacro() : macro='%s' -> real='%s'."), macro.wx_str(), real.wx_str()... | false | false | false | false | false | 0 |
et_unrealize (GtkWidget *widget)
{
scroll_off (E_TABLE (widget));
if (GTK_WIDGET_CLASS (e_table_parent_class)->unrealize)
GTK_WIDGET_CLASS (e_table_parent_class)->unrealize (widget);
} | false | false | false | false | false | 0 |
tsi721_irqhandler(int irq, void *ptr)
{
struct rio_mport *mport = (struct rio_mport *)ptr;
struct tsi721_device *priv = mport->priv;
u32 dev_int;
u32 dev_ch_int;
u32 intval;
u32 ch_inte;
/* For MSI mode disable all device-level interrupts */
if (priv->flags & TSI721_USING_MSI)
iowrite32(0, priv->regs + TSI72... | false | false | false | false | false | 0 |
arena_run_reg_alloc(arena_run_t *run, arena_bin_t *bin)
{
void *ret;
unsigned i, mask, bit, regind;
assert(run->magic == ARENA_RUN_MAGIC);
assert(run->regs_minelm < bin->regs_mask_nelms);
/*
* Move the first check outside the loop, so that run->regs_minelm can
* be updated unconditionally, without the possib... | false | false | false | false | true | 1 |
GetRGBACharPixelData(int x1, int y1,
int x2, int y2,
int front,
unsigned char* data)
{
int y_low, y_hi;
int x_low, x_hi;
int width, height;
// set the cur... | false | false | false | false | false | 0 |
need_delay(void)
{
static gint64 time_prev = 0; /* time in microseconds */
gint64 time_now;
GTimeVal t;
const gint timeout = 500; /* delay in milliseconds */
g_get_current_time(&t);
time_now = ((gint64) t.tv_sec * G_USEC_PER_SEC) + t.tv_usec;
/* delay keypresses for 0.5 seconds */
if (time_now < (time_prev + ... | false | false | false | false | false | 0 |
cconnect(void *vp)
{
char *cp, *cq;
int omsgCount = msgCount;
if (mb.mb_type == MB_IMAP && mb.mb_sock.s_fd > 0) {
fprintf(stderr, "Already connected.\n");
return 1;
}
unset_allow_undefined = 1;
unset_internal("disconnected");
cp = protbase(mailname);
if (strncmp(cp, "imap://", 7) == 0)
cp += 7;
else if ... | false | false | false | false | false | 0 |
xhci_segment_free(struct xhci_hcd *xhci, struct xhci_segment *seg)
{
if (seg->trbs) {
dma_pool_free(xhci->segment_pool, seg->trbs, seg->dma);
seg->trbs = NULL;
}
kfree(seg);
} | false | false | false | false | false | 0 |
pprogramdef(def)
definition *def;
{
version_list *vers;
proc_list *proc;
puldefine(def->def_name, def->def.pr.prog_num);
for (vers = def->def.pr.versions; vers != NULL; vers = vers->next) {
puldefine(vers->vers_name, vers->vers_num);
for (proc = vers->procs; proc != NULL; proc = proc->next) {
if (!define_p... | false | false | false | false | false | 0 |
getFEN() {
static string fen;
int i,j,ec;
piece p,c=EMPTY;
char n=0;
fen="\0";
for(i=7;i>=0;i--) {
ec=0;
for(j=0;j<8;j++) {
p=square[j][i]&PIECE_MASK;
c=square[j][i]&COLOR_MASK;
if ((p!=EMPTY)&&(ec)) {
fen+=(char)('0'+ec);
ec=0;
}
switch(p) {
case PAWN: n... | false | false | false | false | false | 0 |
PyCurses_Init_Pair(PyObject *self, PyObject *args)
{
short pair, f, b;
PyCursesInitialised;
PyCursesInitialisedColor;
if (PyTuple_Size(args) != 3) {
PyErr_SetString(PyExc_TypeError, "init_pair requires 3 arguments");
return NULL;
}
if (!PyArg_ParseTuple(args, "hhh;pair, f, b",... | false | false | false | false | false | 0 |
Init(PLStream *pls)
{
XwDev *dev = (XwDev *) pls->dev;
XwDisplay *xwd = (XwDisplay *) dev->xwd;
Window root;
int x, y;
dbug_enter("Init");
/* If not plotting into a child window, need to create main window now */
if (pls->window_id == 0) {
dev->is_main = TRUE;
InitMain(pls);
}
else... | false | false | false | false | false | 0 |
parse_keys(struct nl_msg *msg, char **argv, int argc)
{
struct nlattr *keys;
int i = 0;
bool have_default = false;
char keybuf[13];
if (!argc)
return 1;
NLA_PUT_FLAG(msg, NL80211_ATTR_PRIVACY);
keys = nla_nest_start(msg, NL80211_ATTR_KEYS);
if (!keys)
return -ENOBUFS;
do {
char *arg = *argv;
int po... | false | false | false | false | true | 1 |
ownSelection(ipw)
IMProtocolWidget ipw;
{
Display *dpy = XtDisplay((Widget)ipw);
Time time = XtLastTimestampProcessed(dpy);
TRACE(("IMProtocolWidget:ownSelection()\n"));
if (!XtOwnSelection((Widget)ipw, ipw->imp.server_atom, time,
convertSelection, loseSelection,
(XtSelectionDoneProc)NULL)) {
... | false | false | false | false | false | 0 |
get_Vth()
{
/**/
if(verbose & 1)
cout << name() << " get_Vth OC"
<< " driving=" << getDriving()
<< " DrivingState=" << getDrivingState()
<< " bDrivenState=" << bDrivenState
<< " Vth=" << Vth
<< " VthIn=" << VthIn
<< " bPullUp=" << bPullUp << endl;
/**/
if(getDriving() && !getDrivingState())
... | false | false | false | false | false | 0 |
qla2x00_write_serdes_word(scsi_qla_host_t *vha, uint16_t addr, uint16_t data)
{
int rval;
mbx_cmd_t mc;
mbx_cmd_t *mcp = &mc;
if (!IS_QLA25XX(vha->hw) && !IS_QLA2031(vha->hw) &&
!IS_QLA27XX(vha->hw))
return QLA_FUNCTION_FAILED;
ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1182,
"Entered %s.\n", __func_... | false | false | false | false | false | 0 |
tr_ilg(saidx_t n) {
#if defined(BUILD_DIVSUFSORT64)
return (n >> 32) ?
((n >> 48) ?
((n >> 56) ?
56 + lg_table[(n >> 56) & 0xff] :
48 + lg_table[(n >> 48) & 0xff]) :
((n >> 40) ?
40 + lg_table[(n >> 40) & 0xff] :
32 + lg_table[(... | false | false | false | false | false | 0 |
print_hindexed(int dtype, struct trdtype **dtrace, int nlev, int fl_idx)
{
int i; /* favourite index */
int count; /* datatype count */
indent(nlev);
count = (*dtrace)->trd_count;
++(*dtrace);
sprintf(fmtbuf, "%s (%d)", dtbasic[dtype], count);
if (obuf) strcat(obuf, fmtbuf);
else printf("%s", fmtbuf)... | false | true | false | false | false | 1 |
changeMode(GYRO_MODE _newMode)
{
m_mode = _newMode;
char commande[3];
switch(m_mode)
{
case RATE :
commande[0] = 'R';
break;
case INTEGRATED_ANGLE :
commande[0] = 'P';
break;
case INCREMENTAL_ANGLE :
commande[0] = 'A'; // incremental.
break;
}
commande[1] = 0x0A; commande[2] = 0;
// we send t... | false | false | false | false | false | 0 |
headingAlignment(unsigned long alignment_)
{
if (headingAlignment()!=alignment_)
{
freeze();
unsigned i,n=numColumns();
for (i=0;i<n;i++) if (tableColumn(i)->headingAlignment()==headingAlignment()) tableColumn(i)->headingAlignment(alignment_);
n=hiddenColumnList()->count();
for (i=0;i<n;... | false | false | false | false | false | 0 |
asus_wmi_hwmon_init(struct asus_wmi *asus)
{
struct device *hwmon;
hwmon = hwmon_device_register_with_groups(&asus->platform_device->dev,
"asus", asus,
hwmon_attribute_groups);
if (IS_ERR(hwmon)) {
pr_err("Could not register asus hwmon device\n");
return PTR_ERR(hwmon);
}
return 0;
} | false | false | false | false | false | 0 |
ParseSwitch(Instruction *&Inst, PerFunctionState &PFS) {
LocTy CondLoc, BBLoc;
Value *Cond;
BasicBlock *DefaultBB;
if (ParseTypeAndValue(Cond, CondLoc, PFS) ||
ParseToken(lltok::comma, "expected ',' after switch condition") ||
ParseTypeAndBasicBlock(DefaultBB, BBLoc, PFS) ||
ParseToken(lltok::... | false | false | false | false | false | 0 |
addphcon(phfig_list *ptfig, char orient, const char *cname, long x, long y, char layer, long width)
{
phcon_list *ptcon, *ptscan;
chain_list *pt, *ptchain = NULL;
long index;
char *conname;
conname = namealloc(cname);
/* check consistency */
if (layer < 0 || layer > LAST_LAYER) {
(void)fflush(stdout);
... | false | false | false | false | false | 0 |
zGetSeqBlock(zSequence* seq, coor_t pos){
zSeqBlock* block;
block = zListMoveFirst(&seq->seq);
while(block != NULL){
if((block->pos <= pos) && (block->pos + block->size > pos)){
zListMoveCurrentToFirst(&seq->seq);
return block;
}
block = zListMoveNext(&seq->seq);
}
return zLoadSeq(seq,pos);
} | false | false | false | false | false | 0 |
allGray() const
{
#ifndef QT_NO_IMAGE_TRUECOLOR
if (depth()==32) {
int p = width()*height();
QRgb* b = (QRgb*)bits();
while (p--)
if (!isGray(*b++))
return false;
#ifndef QT_NO_IMAGE_16_BIT
} else if (depth()==16) {
int p = width()*height();
ushort* b = (ushort*)bits();
while (p--)
if (!is16Bi... | false | false | false | false | false | 0 |
ex_cd(eap)
exarg_T *eap;
{
char_u *new_dir;
char_u *tofree;
new_dir = eap->arg;
#if !defined(UNIX) && !defined(VMS)
/* for non-UNIX ":cd" means: print current directory */
if (*new_dir == NUL)
ex_pwd(NULL);
else
#endif
{
#ifdef FEAT_AUTOCMD
if (allbuf_locked())
return;
#endif
... | false | false | false | false | false | 0 |
heim_ntlm_v1_base_session(void *key, size_t len,
struct ntlm_buf *session)
{
EVP_MD_CTX *m;
session->length = MD4_DIGEST_LENGTH;
session->data = malloc(session->length);
if (session->data == NULL) {
session->length = 0;
return ENOMEM;
}
m = EVP_MD_CTX_create();
if (m == NULL) {
... | false | false | false | false | false | 0 |
reverse(string& base) {
string result;
string::const_iterator i=base.begin();
const string::const_iterator n = base.end();
while ( i != n) {
if ((*i & 0x80) == 0x00) {
result.insert(result.begin(),*i);
i++;
}
else if ((*i & 0xe0) == 0xc0 && i + 1 != n && (i[1] & 0xc0) == 0x80) {
result.in... | false | false | false | false | false | 0 |
span(parse_iterator first,
parse_iterator last, char const* name)
{
out << "<phrase role=\"" << name << "\">";
while (first != last)
detail::print_char(*first++, out.get());
out << "</phrase>";
} | false | false | false | false | false | 0 |
tomoyo_poll_control(struct file *file, poll_table *wait)
{
struct tomoyo_io_buffer *head = file->private_data;
if (head->poll)
return head->poll(file, wait) | POLLOUT | POLLWRNORM;
return POLLIN | POLLRDNORM | POLLOUT | POLLWRNORM;
} | false | false | false | false | false | 0 |
uppercase(lenpos_t subPos, lenpos_t subLen) {
if ((subLen == measure_length) || (subPos + subLen > sLen)) {
subLen = sLen - subPos; // don't apply past end of string
}
for (lenpos_t i = subPos; i < subPos + subLen; i++) {
if (s[i] < 'a' || s[i] > 'z')
continue;
else
s[i] = static_cast<char>(s[i] - 'a' +... | false | false | false | false | false | 0 |
ReadNodeTransformation( Node* pNode, TransformType pType)
{
if( mReader->isEmptyElement())
return;
std::string tagName = mReader->getNodeName();
Transform tf;
tf.mType = pType;
// read SID
int indexSID = TestAttribute( "sid");
if( indexSID >= 0)
tf.mID = mReader->getAttributeValue( indexSID);
// how ma... | false | false | false | false | false | 0 |
InitNewLine(char* NewLine, const int ColsPerPage){
memset( NewLine, ' ', ColsPerPage);
NewLine[ColsPerPage] = '\0';
CTermCharAttr DefAttr; DefAttr.SetToDefault(); DefAttr.SetNeedUpdate(true);
memset16( GetLineAttr(NewLine, ColsPerPage), DefAttr.AsShort(), ColsPerPage);
} | false | false | false | false | false | 0 |
write(dimeOutput * const file)
{
bool ret = true;
if (!this->isDeleted()) {
this->preWrite(file);
this->writeCoords(file);
if (flags != 0) {
file->writeGroupCode(70);
file->writeInt16(flags);
}
ret = dimeEntity::write(file);
}
return ret;
} | false | false | false | false | false | 0 |
check_static_variable_definition (tree decl, tree type)
{
/* Can't check yet if we don't know the type. */
if (dependent_type_p (type))
return 0;
/* If DECL is declared constexpr, we'll do the appropriate checks
in check_initializer. */
if (DECL_P (decl) && DECL_DECLARED_CONSTEXPR_P (decl))
retur... | false | false | false | false | false | 0 |
get_free_rreg (struct i915_fragment_program *p,
GLuint live_regs)
{
int bit = ffs(~live_regs);
if (!bit) {
i915_program_error(p, "Can't find free R reg");
return UREG_BAD;
}
return UREG(REG_TYPE_R, bit - 1);
} | false | false | false | false | false | 0 |
writeStringItem(const std::string & name, const std::string & data)
{
if( m_comma )
m_socket << ",";
if( name != "" )
m_socket << name << ":";
m_socket << "\"" << encodeString( data ) << "\"";
} | false | false | false | false | false | 0 |
createOpenRecentMenu() {
m_openRecentFileMenu = new QMenu(tr("&Open Recent Files"), this);
for (int i = 0; i < MaxRecentFiles; ++i) {
m_openRecentFileActs[i] = new QAction(this);
m_openRecentFileActs[i]->setVisible(false);
connect(m_openRecentFileActs[i], SIGNAL(triggered()),this, SLOT(openRecentOrExampleFile(... | false | false | false | false | false | 0 |
prefs_themes_free_names(ThemesData *tdata)
{
GList *names;
names = tdata->names;
while (names != NULL) {
ThemeName *tn = (ThemeName *)(names->data);
tn->item = NULL;
g_free(tn->name);
g_free(tn);
names = g_list_next(names);
}
g_list_free(names);
tdata->names = NULL;
} | false | false | false | false | false | 0 |
abi_widget_set_style(AbiWidget * w, gchar * szName)
{
UT_return_val_if_fail ( w != NULL, FALSE );
UT_return_val_if_fail ( IS_ABI_WIDGET(w), FALSE );
UT_return_val_if_fail ( w->priv->m_pFrame, FALSE );
UT_return_val_if_fail ( szName, false );
AP_UnixFrame * pFrame = (AP_UnixFrame *) w->priv->m_pFrame;
UT_retu... | false | false | false | false | false | 0 |
CreateTexture_3DGS_MDL4(const unsigned char* szData,
unsigned int iType,
unsigned int* piSkip)
{
ai_assert(NULL != piSkip);
const MDL::Header *pcHeader = (const MDL::Header*)mBuffer; //the endianess is allready corrected in the InternReadFile_3DGS_MDL345 function
if (iType == 1 || iType > 3)
{
DefaultLogge... | false | false | false | false | false | 0 |
gsb_currency_link_config_create_list ( void )
{
GtkListStore * model;
GtkWidget * treeview;
gint i;
gchar *title[] = {
"",
_("First currency"),
"",
_("Exchange"),
_("Second currency"),
_("Modified date"),
_("Invalid"),
};
GtkCellRenderer *cell_renderer;
/* Create tree store
LINK_... | false | false | false | false | false | 0 |
osst_sysfs_add(dev_t dev, struct device *device, struct osst_tape * STp, char * name)
{
struct device *osst_member;
int err;
osst_member = device_create(osst_sysfs_class, device, dev, STp,
"%s", name);
if (IS_ERR(osst_member)) {
printk(KERN_WARNING "osst :W: Unable to add sysfs class member %s\n", name);... | false | false | false | false | false | 0 |
cr_entry_plague_risk(const struct city *pcity,
const void *data)
{
static char buf[8];
if (!game.info.illness_on) {
fc_snprintf(buf, sizeof(buf), " -.-");
} else {
fc_snprintf(buf, sizeof(buf), "%4.1f",
(float)city_illness_calc(pcity, NULL, NULL, NUL... | false | false | false | false | false | 0 |
execute(Window *window)
{
KHTMLPart *part = qobject_cast<KHTMLPart*>(window->m_frame->m_part);
if (!part || !part->jScriptEnabled())
return false;
ScriptInterpreter *interpreter = static_cast<ScriptInterpreter *>(part->jScript()->interpreter());
interpreter->setProcessingTimerCallback(true);
//kDebug(60... | false | false | false | false | false | 0 |
aim_odc_connect(aim_session_t *sess, const char *sn,
const char *addr, const fu8_t *cookie)
{
aim_conn_t *newconn;
struct aim_odc_intdata *intdata;
if (!sess || !sn)
return NULL;
if (!(intdata = calloc(1, sizeof(struct aim_odc_intdata))))
return NULL;
memcpy(intdata->cookie, cookie, 8);
strncpy(intdata->sn... | false | false | false | false | false | 0 |
efx_free_rx_buffers(struct efx_rx_queue *rx_queue,
struct efx_rx_buffer *rx_buf,
unsigned int num_bufs)
{
do {
if (rx_buf->page) {
put_page(rx_buf->page);
rx_buf->page = NULL;
}
rx_buf = efx_rx_buf_next(rx_queue, rx_buf);
} while (--num_bufs);
} | false | false | false | false | false | 0 |
setupdown(const string& s, bool *enable, int *dataset, bool *percentage, double *upval) {
*dataset = 0;
*enable = true;
*percentage = false;
*upval = 0.0;
unsigned int len = s.size();
if (len == 0) {
*enable = false;
} else if (len >= 1 && toupper(s[0]) == 'D') {
// dataset identifier
*dataset = get_datase... | false | false | false | false | false | 0 |
param(std::string name) {
OpParam par;
par._name = name;
par._gimpType.type = GIMP_PDB_INT32;
par._gimpType.data.d_int32 = 0;
par._guiType = OpParam::Menu;
_params.push_back(par);
return _params.back();
} | false | false | false | false | false | 0 |
LODSD32_EAXXd(bxInstruction_c *i)
{
Bit32u esi = ESI;
RAX = read_virtual_dword(i->seg(), esi);
if (BX_CPU_THIS_PTR get_DF()) {
esi -= 4;
}
else {
esi += 4;
}
// zero extension of RSI
RSI = esi;
} | false | false | false | false | false | 0 |
resize_later(gMainWindow *data)
{
data->bufW = data->_next_w;
data->bufH = data->_next_h;
data->_next_timer = 0;
data->configure();
data->performArrange();
if (data->onResize)
data->onResize(data);
//data->refresh();
return false;
} | false | false | false | false | false | 0 |
skippastURL(OutBuffer *buf, size_t i)
{ size_t length = buf->offset - i;
utf8_t *p = &buf->data[i];
size_t j;
unsigned sawdot = 0;
if (length > 7 && Port::memicmp((char *)p, "http://", 7) == 0)
{
j = 7;
}
else if (length > 8 && Port::memicmp((char *)p, "https://", 8) == 0)
{
... | false | false | false | false | false | 0 |
dump_entries(ENTRY *list)
{
static const char *flag_name[] = {
"???", "com", "PERM", "PUBL", /* 0x0001-0x0008 */
"trailers", "netmask", "dontpub", "magic", /* 0x0010-0x0080 */
"???", "???", "???", "???", /* 0x0100-0x0800 */
"NULL", "ARPSRV", "NOVC", "???" }; /* 0x1000-0x8000 */
/* lower case flags are ... | true | true | false | false | false | 1 |
d_builtin_function (tree decl)
{
if (!flag_no_builtin && DECL_ASSEMBLER_NAME_SET_P (decl))
vec_safe_push (gcc_builtins_libfuncs, decl);
vec_safe_push (gcc_builtins_functions, decl);
return decl;
} | false | false | false | false | false | 0 |
ad1848_output_block(int dev, unsigned long buf, int count, int intrflag)
{
unsigned long flags, cnt;
ad1848_info *devc = (ad1848_info *) audio_devs[dev]->devc;
ad1848_port_info *portc = (ad1848_port_info *) audio_devs[dev]->portc;
cnt = count;
if (portc->audio_format == AFMT_IMA_ADPCM)
{
cnt /= 4;
}
el... | false | false | false | false | false | 0 |
addFloat128Sigs(float128 a, float128 b, int zSign, float_status_t &status)
{
Bit32s aExp, bExp, zExp;
Bit64u aSig0, aSig1, bSig0, bSig1, zSig0, zSig1, zSig2;
Bit32s expDiff;
aSig1 = extractFloat128Frac1(a);
aSig0 = extractFloat128Frac0(a);
aExp = extractFloat128Exp(a);
bSig1 = extractFloat1... | false | false | false | false | false | 0 |
RemoveMidpoint(
const EdgeEndpoints &edge)
{
vtkInternal::MapType::iterator iter = this->Internal->Map.find(edge);
if (iter != this->Internal->Map.end())
{
this->Internal->Map.erase(iter);
}
} | 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.