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 |
|---|---|---|---|---|---|---|
set_flowtable(FlowTableWithFields* flowtable)
{
m_flowtable = flowtable;
m_layoutgroup = sharedptr<LayoutGroup>::cast_dynamic(flowtable->get_layout_item());
m_entry_title->set_text(item_get_title(m_layoutgroup));
m_spin_columns->set_value(m_layoutgroup->get_columns_count());
} | false | false | false | false | false | 0 |
write(WriteStream & os) const
{
ModeSpecifier specifier(os, currentMode(), lockedMode(), asciiOnly());
MathEnsurer ensurer(os, needs_math_mode_);
os << '\\' << name_;
if (cell(1).size())
os << '[' << cell(1) << ']';
os << '{' << cell(0) << '}';
} | false | false | false | false | false | 0 |
gupnp_context_constructor (GType type,
guint n_construct_params,
GObjectConstructParam *construct_params)
{
GObjectClass *object_class;
guint port = 0, msearch_port = 0;
int i, msearch_idx = -1;
for ... | false | false | false | false | false | 0 |
getLibraryShortNameByIndex(unsigned Index,
StringRef &Res) const {
if (Index >= Libraries.size())
return object_error::parse_failed;
// If the cache of LibrariesShortNames is not built up do that first for
// all the Libraries.
if (LibrariesShortName... | false | false | false | false | false | 0 |
pkeq_closure(ap_manager_t* man, bool destructive, pkeq_t* a)
{
return destructive ? a : pk_copy(man,a);
} | false | false | false | false | false | 0 |
handle_add_proc_queue(struct work_struct *work)
{
struct ap_data *ap = container_of(work, struct ap_data,
add_sta_proc_queue);
struct sta_info *sta;
char name[20];
struct add_sta_proc_data *entry, *prev;
entry = ap->add_sta_proc_entries;
ap->add_sta_proc_entries = NULL;
while (entry) {
spin_lock_bh(&a... | false | false | false | false | false | 0 |
R_Mesh_SetupShell (int shell_skinnum, qboolean ragdoll, qboolean using_varray, vec3_t lightcolor)
{
int i;
//shell render
if(gl_glsl_shaders->integer && gl_state.glsl_shaders && gl_normalmaps->integer)
{
vec3_t lightVec, lightVal;
if(using_varray)
{
R_InitVArrays (VERT_NORMAL_COLOURED_TEXTUR... | false | false | false | false | false | 0 |
PixelToPixelCopyTransparent( BMP& From, int FromX, int FromY,
BMP& To, int ToX, int ToY,
RGBApixel& Transparent )
{
if( From(FromX,FromY)->Red != Transparent.Red ||
From(FromX,FromY)->Green != Transparent.Green ||
From(FromX,FromY)->Blue !... | false | false | false | false | false | 0 |
getNextWord(const char* input, char* buffer, const size_t bufferSize, size_t* position)
{
size_t i;
char* c;
int result;
const char* end;
end = strindex((char*)&input[*position],' ');
if(end != NULL) {
i = 0;
for(c = (char*)&input[*position];c < end;c++) {
if(i ... | false | false | false | false | false | 0 |
mlx4_en_init_affinity_hint(struct mlx4_en_priv *priv, int ring_idx)
{
struct mlx4_en_rx_ring *ring = priv->rx_ring[ring_idx];
int numa_node = priv->mdev->dev->numa_node;
if (!zalloc_cpumask_var(&ring->affinity_mask, GFP_KERNEL))
return -ENOMEM;
cpumask_set_cpu(cpumask_local_spread(ring_idx, numa_node),
ring-... | false | false | false | false | false | 0 |
start_something_else(const char* el, const char** attrv)
{
const char** avp = attrv;
char** avcp = NULL;
int attr_count = 0;
xml_tag* new_tag;
fs_xml* fs_gpx;
if (!fs_ptr) {
return;
}
new_tag = (xml_tag*)xcalloc(sizeof(xml_tag),1);
new_tag->tagname = xstrdup(el);
/* count attributes */
whil... | false | false | false | false | false | 0 |
_find_labeller(struct device *dev, char *buf,
uint64_t *label_sector,
uint64_t scan_sector)
{
struct labeller_i *li;
struct labeller *r = NULL;
struct label_header *lh;
struct lvmcache_info *info;
uint64_t sector;
int found = 0;
char readbuf[LABEL_SCAN_SIZE] __attribute__((aligned(8)));
i... | false | false | false | false | false | 0 |
system_map_mmio( unsigned int offset,
int length )
{
D_ASSERT( m_data != NULL );
return m_data->reg + offset;
} | false | false | false | false | false | 0 |
ledger_data_after_child_handler(gpointer data_for_children,
GSList* data_from_children,
GSList* sibling_data,
gpointer parent_data,
gpointer global_data,
gpoint... | false | false | false | false | false | 0 |
bnx2x_init_xmac_loopback(struct link_params *params,
struct link_vars *vars)
{
struct bnx2x *bp = params->bp;
vars->link_up = 1;
if (!params->req_line_speed[0])
vars->line_speed = SPEED_10000;
else
vars->line_speed = params->req_line_speed[0];
vars->duplex = DUPLEX_FULL;
vars->flow_ctrl = BNX2X_FLOW_... | false | false | false | false | false | 0 |
mo_unxline(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
if(!IsOperXline(source_p))
{
sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, source_p->name, "xline");
return 0;
}
if(parc == 4 && !(irccmp(parv[2], "ON")))
{
if(!IsOperRemoteBan(source_p))
{
sendto_one(so... | false | false | false | false | false | 0 |
_req_append_segment(struct osd_request *or,
unsigned padding, struct _osd_req_data_segment *seg,
struct _osd_req_data_segment *last_seg, struct _osd_io_info *io)
{
void *pad_buff;
int ret;
if (padding) {
/* check if we can just add it to last buffer */
if (last_seg &&
(padding <= last_seg->alloc_size - ... | false | false | false | false | false | 0 |
server_resolve_anonfd (call_frame_t *frame)
{
server_state_t *state = NULL;
int ret = 0;
loc_t *loc = NULL;
state = CALL_STATE (frame);
loc = state->loc_now;
ret = resolve_anonfd_simple (frame);
if (ret > 0) {
l... | false | false | false | false | false | 0 |
evaluate(KBlocksField * field)
{
int w = field->getWidth();
int curH = board_signature[0];
double count = 0;
for (int i = 1; i < w; i++)
{
int newH = board_signature[i];
if (newH == curH)
{
count++;
}
curH = newH;
}
return count;
} | false | false | false | false | false | 0 |
gegl_operation_create_pad (GeglOperation *self,
GParamSpec *param_spec)
{
GeglPad *pad;
g_return_if_fail (GEGL_IS_OPERATION (self));
g_return_if_fail (param_spec != NULL);
if (!self->node)
{
g_warning ("%s: aborting, no associated node. "
"This method s... | false | false | false | false | false | 0 |
my_mb_wc_utf8mb4(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t * pwc, const uchar *s, const uchar *e)
{
uchar c;
if (s >= e)
return MY_CS_TOOSMALL;
c= s[0];
if (c < 0x80)
{
*pwc= c;
return 1;
}
else if (c < 0xc2)
return MY_CS_ILSEQ;
else if (c < 0xe0)
{
if (s... | false | false | false | false | false | 0 |
slotSkinChanged(int skinNum)
{
kDebug() << "NewGameDialogImpl::slotSkinChanged "
<< skinNum << " ; " << skinCombo->currentText()
<< " ; " << m_newGameSetup->worlds()[skinCombo->currentText()]->name() << " ; "
<< m_newGameSetup->worlds()[skinCombo->currentText()]->descript... | false | false | false | false | false | 0 |
sortBuffer(BamAlignmentIterator begin, BamAlignmentIterator end) {
/**
* It seems like this step could not be simplified for the
* ascending and descending case
*/
if (!descending ) {
if (sortCriteria=="QNAME") {
sort(begin,end,SortName<less<string> >());
} else if (sor... | false | false | false | false | false | 0 |
getAssocation() const
{
if (!isAssociation())
return QVector<Internal::IcdAssociation>();
return m_View->icdModel()->dagStarModel()->getCheckedAssociations();
} | false | false | false | false | false | 0 |
genericGetMessageStruct(string uid,
size_t messageNumber,
struct rfc2045 *&structRet,
mail::callback &callback)
{
if (genericTmpRfcp && cachedUid == uid)
{
structRet=genericTmpRfcp;
callback.success("OK");
return;
}
if (uidlMap.count(uid) == 0)
{
callback.fail("Message removed from the P... | false | false | false | false | true | 1 |
evaluate_defect_staff_number (Chromosome chromo)
{
unsigned value = 0;
for (int day = 0; day < chromo.length; day++)
{
unsigned pw = people_working (chromo.gene[day]);
unsigned staff = goals[staff_number_ix].value;
if (day % WEEK == SATURDAY || day % WEEK == SATURDAY + 1)
staff = goals[staff_... | false | false | false | false | false | 0 |
ex_cfile(eap)
exarg_T *eap;
{
win_T *wp = NULL;
qf_info_T *qi = &ql_info;
#ifdef FEAT_AUTOCMD
char_u *au_name = NULL;
#endif
if (eap->cmdidx == CMD_lfile || eap->cmdidx == CMD_lgetfile
|| eap->cmdidx == CMD_laddfile)
wp = curwin;
#ifdef FEAT_AUTOCMD
switch (eap->cmdidx)
{
cas... | false | false | false | false | false | 0 |
blanks()
{
register char *reglineptr;
while (TRUE)
{
reglineptr = lineptr;
while (SYMOFCHAR(*reglineptr) == WHITESPACE)
++reglineptr;
lineptr = reglineptr;
if (SYMOFCHAR(ch = *reglineptr) == SPECIALCHAR)
{
specialchar();
if (ch == EOL)
return;
if (SYMOFCHAR(ch) == WHITESPACE)
c... | false | false | false | false | false | 0 |
XGI_GetTVPtrIndex2(unsigned short *tempbx, unsigned char *tempcl,
unsigned char *tempch, struct vb_device_info *pVBInfo)
{
*tempbx = 0;
*tempcl = 0;
*tempch = 0;
if (pVBInfo->TVInfo & TVSetPAL)
*tempbx = 1;
if (pVBInfo->TVInfo & TVSetPALM)
*tempbx = 2;
if (pVBInfo->TVInfo & TVSetPALN)
*tempbx = 3;
if... | false | false | false | false | false | 0 |
on_tree_view_cursor_changed (GtkTreeView *tree_view,
gpointer user_data)
{
GtkTreePath *path;
UnityWebappsContext *context;
gint depth;
gtk_tree_view_get_cursor (tree_view, &path, NULL);
if (path == NULL)
{
return;
}
depth = gtk_tree_path_get_depth (path);
if (depth == 1)
{
co... | false | false | false | false | false | 0 |
pform_nature_access(const struct vlltype&loc, const char*name)
{
if (nature_access) {
cerr << loc.text << ":" << loc.first_line << ": error: "
<< "Too many access names for nature "
<< nature_name << "." << endl;
error_count += 1;
return;
}
nature_access = lex_strings.make(name);... | false | false | false | false | false | 0 |
print_udp_opt_name(const char *val)
{
int opt;
char *out;
errno = 0;
opt = strtoul(val, NULL, 16);
if (errno) {
if (asprintf(&out, "conversion error(%s)", val) < 0)
out = NULL;
return out;
}
if (opt == 1)
out = strdup("UDP_CORK");
else if (opt == 100)
out = strdup("UDP_ENCAP");
else ... | false | false | false | false | false | 0 |
soundslike_lookup(const WordEntry & word, WordEntry & o) const
{
if (use_soundslike) {
const StrVector * tmp = (const StrVector *)(word.intr[0]);
o.clear();
o.what = WordEntry::Misspelled;
sl_init(tmp, o);
} else {
o.what = WordEntry::Misspelled;
o.word = word.word;
o.word_size = word.w... | false | false | false | false | false | 0 |
OTF_Reader_readDefScl( OTF_RBuffer* buffer, OTF_HandlerArray* handlers,
uint32_t streamid ) {
uint32_t deftoken;
uint32_t sclfile;
uint32_t sclline;
if ( handlers->pointer[OTF_DEFSCL_RECORD] == NULL ) {
return OTF_RBuffer_readNewline( buffer );
}
deftoken = OTF_RBuffer_readUint32( buffer );
/** check ... | false | false | false | false | false | 0 |
write_counterTable(fstream& tex, sortedCtrMap_t& sortedMap,
struct AllData& alldata) {
uint64_t timerRes = alldata.timerResolution;
sortedCtrMap_t::const_reverse_iterator it = sortedMap.rbegin();
sortedCtrMap_t::const_reverse_iterator itend = sortedMap.rend();
string ctr_name = "";
unsigned... | false | false | false | false | false | 0 |
getDescription(const string &luid)
{
StringPair ids = splitLUID(luid);
return m_sub->getSubDescription(ids.first, ids.second);
} | false | false | false | false | false | 0 |
__ecereMethod___ecereNameSpace__ecere__gfx__BitmapResource_Dereference(struct __ecereNameSpace__ecere__com__Instance * this)
{
struct __ecereNameSpace__ecere__gfx__BitmapResource * __ecerePointer___ecereNameSpace__ecere__gfx__BitmapResource = (struct __ecereNameSpace__ecere__gfx__BitmapResource *)(this ? (((char *)this... | false | false | false | true | false | 1 |
device_get_arptype(int fd, char* ifname)
{
struct ifreq ifr;
memset(&ifr, 0, sizeof(ifr));
strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
if (ioctl(fd, SIOCGIFHWADDR, &ifr) < 0)
err(1, "Could not get arptype");
DEBUG("ARPTYPE %d\n", ifr.ifr_hwaddr.sa_family);
return ifr.ifr_hwaddr.sa_family;
} | false | false | false | false | false | 0 |
init_ifs (PluginInfo * goomInfo, IfsData * data)
{
int i;
FRACTAL *Fractal;
int width = goomInfo->screen.width;
int height = goomInfo->screen.height;
if (data->Root == NULL) {
data->Root = (FRACTAL *) malloc (sizeof (FRACTAL));
if (data->Root == NULL)
return;
data->Root->Buffer1 = (IFSPoint... | false | false | false | false | false | 0 |
is_yank_buffer(c, write)
int c;
int write; /* if TRUE check for writable buffers */
{
if (isalnum(c) || (!write && strchr(".%:", c) != NULL) || c == '"')
return TRUE;
#ifdef NT
if (c == '@')
return TRUE;
#endif
return FALSE;
} | false | false | false | false | false | 0 |
get_status_for_port(struct fw_ohci *ohci, int port_index)
{
int reg;
mutex_lock(&ohci->phy_reg_mutex);
reg = write_phy_reg(ohci, 7, port_index);
if (reg >= 0)
reg = read_phy_reg(ohci, 8);
mutex_unlock(&ohci->phy_reg_mutex);
if (reg < 0)
return reg;
switch (reg & 0x0f) {
case 0x06:
return 2; /* is child ... | false | false | false | false | false | 0 |
initt (void)
{
femPoint *r = __t->rp;
femTriangle *tt = __t->tr;
int n = __t->getNumberOfCells();
int i;
table = new float[n];
// closegraphique();
ordre = new int[n];
for (i = 0; i < n; i++)
ordre[i] = i;
for (i = 0; i < n; i++)
table[i] = (r[tt[i][0]... | false | false | false | false | false | 0 |
setCodingSchemeName(const OFString &value)
{
OFCondition result = EC_IllegalCall;
/* check whether current item is valid */
ItemStruct *item = getCurrentItem();
if (item != NULL)
{
/* set the value */
item->CodingSchemeName = value;
result = EC_Normal;
}
return result... | false | false | false | false | false | 0 |
defined(char *name)
{
int i = 0;
if (!name)
return 1;
for (i = 0; strcmp(defines[i].name, name) != 0; i++) {
assert(defines[i].name != NULL);
}
return defines[i].defined;
} | false | false | false | false | false | 0 |
handleGPMSS(ArNMEAParser::Message msg)
{
ArNMEAParser::MessageVector *message = msg.message;
if(message->size() < 5) return;
if(!readFloatFromStringVec(message, 1, &(myData.beaconSignalStrength))) return;
if(!readFloatFromStringVec(message, 2, &(myData.beaconSNR))) return;
if(!readFloatFromStringVec(message, ... | false | false | false | false | false | 0 |
polkit_authority_register_authentication_agent_with_options_sync (PolkitAuthority *authority,
PolkitSubject *subject,
const gchar *locale,
... | false | false | false | false | false | 0 |
get_outside_region (GSWindow *window)
{
int i;
cairo_region_t *region;
region = cairo_region_create ();
for (i = 0; i < window->priv->monitor; i++) {
GdkRectangle geometry;
cairo_rectangle_int_t rectangle;
gdk_screen_get_monit... | false | false | false | false | false | 0 |
processNextCode() {
int code;
int nextLength;
int i, j;
// check for EOF
if (eof) {
return gFalse;
}
// check for eod and clear-table codes
start:
code = getCode();
if (code == EOF || code == 257) {
eof = gTrue;
return gFalse;
}
if (code == 256) {
clearTable();
goto start;
... | false | false | false | false | false | 0 |
pmult_(integer *n, integer *ia, integer *ja, doublereal *a, doublereal *u, doublereal *w)
{
/* Local variables */
static integer ii, jj;
static doublereal uii, wii, sum;
static integer jajj, ibgn, iend;
/* ... THIS SUBROUTINE PERFORMS ONE MATRIX-VECTOR MULTIPLICATION. */
/* ... PARAMETER LIST: */
... | false | false | false | false | false | 0 |
meta_button_state_from_string (const char *str)
{
if (strcmp ("normal", str) == 0)
return META_BUTTON_STATE_NORMAL;
else if (strcmp ("pressed", str) == 0)
return META_BUTTON_STATE_PRESSED;
else if (strcmp ("prelight", str) == 0)
return META_BUTTON_STATE_PRELIGHT;
else
return META_BUTTON_STATE_LA... | false | false | false | false | false | 0 |
length_Extension(const Extension *data)
{
size_t ret = 0;
{
size_t Top_tag_oldret = ret;
ret = 0;
ret += der_length_oid(&(data)->extnID);
ret += 1 + der_length_len (ret);
ret += Top_tag_oldret;
}
if((data)->critical){
size_t Top_tag_oldret = ret;
ret = 0;
ret += 1;
ret += 1 + der_length_len (ret);
ret += Top_tag_oldret... | false | false | false | false | false | 0 |
WriteMolecule(OBBase* pOb, OBConversion* pConv)
{
// Embeds molecules into a png file in CopyOfInput
ostream& ofs = *pConv->GetOutStream();
if(!CopyOfInput.empty() && bytesToIEND>0)
{
//copy the generated or saved png file, except the IEND chunk, to the output
ostreambuf_iterator<char> outiter(pConv->G... | false | false | false | false | false | 0 |
Init(long *ChOrder, long *Count, long *MaxChars, aPtr aChars)
{
/* initialize vectors and character count */
long i, j, temp;
boolean instate;
*MaxChars = 0;
for (i = 1; i <= (chars); i++) {
if (aChars[ActChar[i - 1] - 1]) {
(*MaxChars)++;
ChOrder[*MaxChars - 1] = i;
instate = Ingroupst... | false | false | false | false | false | 0 |
domNodeAppendChild(DOM_NODE *parent, DOM_NODE *child)
{
if (!parent || !child)
return;
if (!parent->firstChild)
parent->firstChild = child;
if (parent->lastChild)
{
parent->lastChild->nextSibling = child;
child->prevSibling = parent->lastChild;
}
else
child->prevSibling = NULL;
parent->... | false | false | false | false | false | 0 |
to_args FCN((p,args,max_args))
outer_char HUGE*p C0("")
outer_char HUGE*args[]C0("")
int max_args C1("")
{
int n;
for(n= 0;*p;p++)
{
if(n>=max_args)
{
err0_print(ERR_C,OC("Too many command-line or optional \
arguments; must be < %d"),1,max_args);
break;
}
while(isspace(*p))p++;
args[n++]= p;
for(p++;*p;p++)
if(isspa... | false | false | false | false | true | 1 |
PollEvent(SDL_Event* event) {
bool eventAvail = SDL_PollEvent( event ) > 0;
if ( eventAvail )
CombineMouseMotionEvents( event );
return eventAvail;
} | false | false | false | false | false | 0 |
winfo_page(void){
int rid;
Manifest *pWiki;
char *zUuid;
char *zDate;
Blob wiki;
int modPending;
const char *zModAction;
login_check_credentials();
if( !g.perm.RdWiki ){ login_needed(); return; }
rid = name_to_rid_www("name");
if( rid==0 || (pWiki = manifest_get(rid, CFTYPE_WIKI))==0 ){
style... | false | false | false | false | false | 0 |
copy_to_output(xlnk_script *s, xlnk_script_command *c, void *arg)
{
const char *file;
FILE **fpp;
FILE *cf;
unsigned char k;
/* Arg is pointer to file handle pointer */
fpp = (FILE **)arg;
if (*fpp == NULL) {
scripterr(s, c, "no output open");
}
else {
require_arg(s, ... | false | true | false | false | true | 1 |
show_dir_entry(const char *tag, struct dir_entry *ent)
{
int len = max_prefix_len;
if (len >= ent->len)
die("git ls-files: internal error - directory entry not superset of prefix");
if (!match_pathspec(pathspec, ent->name, ent->len, len, ps_matched))
return;
fputs(tag, stdout);
write_name(ent->name, ent->le... | false | false | false | false | false | 0 |
dump_debug(FILE* out) const {
enum { MAX_DUMP = 45 };
const char* c = reinterpret_cast<const char*>(ptr);
if(!c)
fprintf(out,"(null)");
else {
fprintf(out,"%zu bytes ",len);
for(size_t i=0; (i<len)&&(i<MAX_DUMP); i++, c++)
if(isprint(*c))
fputc(*c,out);
else if('\n'==*c)
fprintf(out,"\\n");
e... | false | false | false | false | false | 0 |
IsValidFloatChar(char c) {
return ('0' <= c && c <= '9') ||
c == 'e' || c == 'E' ||
c == '+' || c == '-';
} | false | false | false | false | false | 0 |
ob_describe(const object *op, const object *observer, char *buf, size_t size) {
ob_methods *methods;
for (methods = &type_methods[op->type]; methods; methods = methods->fallback) {
if (methods->describe) {
methods->describe(methods, op, observer, buf, size);
return buf;
... | false | false | false | false | false | 0 |
remove_deleted_chars(char *string){
int i = 0;
while(string[i] != 0){
if(string[i] == BACKSPACE){
if(i != 0){
strcpy( &(string[i-1]), &(string[i+1]) );
i--;
}else strcpy( &(string[i]), &(string[i+1]) ); //necessary for ^H's at the start of a string
}else i++;
}
} | false | false | false | false | false | 0 |
test_random1(int n)
{
RANDOM_STATE saved_state;
int i, old_value = 0, new_value;
bool didchange, olddidchange = FALSE;
int behaviourchange = 0, behavioursame = 0;
saved_state = fc_rand_state();
/* fc_srand(time(NULL)); */ /* use current state */
for (i = 0; i < n+2; i++) {
new_value = fc_rand(2);
... | false | false | false | false | false | 0 |
add_char_local_string(struct local_string *s, int c)
{
if (s->idx >= s->alloc) {
size_t nalloc = s->alloc * 2;
if (s->buf == s->tmpbuf) {
s->buf = malloc(nalloc);
if (s->buf == NULL)
return -ENOMEM;
memcpy(s->buf, s->tmpbuf, s->alloc);
} else {
char *ptr = realloc(s->buf, nalloc);
if (ptr == N... | false | true | false | false | false | 1 |
log_msg(const int priority, const char *fmt, ...)
{
char debug_buffer[160]; /* up to 2 lines of 80 characters */
va_list argptr;
static struct timeval last_time = { 0, 0 };
struct timeval new_time = { 0, 0 };
struct timeval tmp;
int delta;
const char *color_pfx = "", *color_sfx = "";
const char *time_pfx = "", ... | false | false | false | false | false | 0 |
ParseDiscriminator(State *state) {
State copy = *state;
if (ParseChar(state, '_') && ParseNumber(state)) {
return true;
}
*state = copy;
return false;
} | false | false | false | false | false | 0 |
__gmp_istream_set_digits (string &s, istream &i, char &c, bool &ok, int base)
{
switch (base)
{
case 10:
while (isdigit(c))
{
ok = true; // at least a valid digit was read
s += c;
if (! i.get(c))
break;
}
break;
case 8:
while (isdigit(c) && c != '8' && c != '9')
{
ok ... | false | false | false | false | false | 0 |
kbd_set_state_safe(struct kbd_state *state, struct kbd_state *old)
{
int ret;
ret = kbd_set_state(state);
if (ret == 0)
return 0;
/*
* When setting the new state fails,try to restore the previous one.
* This is needed on some machines where BIOS sets a default state when
* setting a new state fails. This ... | false | false | false | false | false | 0 |
libgncmod_generic_import_gnc_module_init(int refcount)
{
if (!gnc_module_load("gnucash/engine", 0))
{
return FALSE;
}
if (!gnc_module_load("gnucash/app-utils", 0))
{
return FALSE;
}
if (!gnc_module_load("gnucash/gnome-utils", 0))
{
return FALSE;
}
if (!re... | false | false | false | false | false | 0 |
read_smtp(struct sock *sp, int value, int ign_eof)
{
int ret;
int len;
do {
if ((len = sgetline(&smtpbuf, &smtpbufsize, NULL, sp)) < 6) {
if (len >= 0 && !ign_eof)
fprintf(stderr, catgets(catd, CATSET, 241,
"Unexpected EOF on SMTP connection\n"));
return -1;
}
if (verbose || debug || _debug)
... | false | false | false | false | false | 0 |
saa7164_get_descriptors(struct saa7164_dev *dev)
{
memcpy_fromio(&dev->hwdesc, dev->bmmio, sizeof(struct tmComResHWDescr));
memcpy_fromio(&dev->intfdesc, dev->bmmio + sizeof(struct tmComResHWDescr),
sizeof(struct tmComResInterfaceDescr));
memcpy_fromio(&dev->busdesc, dev->bmmio + dev->intfdesc.BARLocation,
sizeo... | false | false | false | false | false | 0 |
end_append_text_to_document (GeditDocumentOutputStream *stream)
{
if (stream->priv->ensure_trailing_newline)
{
remove_ending_newline (stream);
}
gtk_text_buffer_set_modified (GTK_TEXT_BUFFER (stream->priv->doc),
FALSE);
gtk_source_buffer_end_not_undoable_action (GTK_SOURCE_BUFFER... | false | false | false | false | false | 0 |
_wrap_svn_ra_plugin_invoke_check_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
svn_ra_plugin_t *arg1 = (svn_ra_plugin_t *) 0 ;
void *arg2 = (void *) 0 ;
char *arg3 = (char *) 0 ;
svn_revnum_t arg4 ;
svn_node_kind_t *arg5 = (svn_node_kind_t *) 0 ;
apr_pool_t *arg6 = (apr_p... | false | false | false | false | false | 0 |
utest_IsReal(void)
{
char *goodones[] = { "99", " \t 99", "-99.00", "+99.00e-12", "+0xabc.defp-12", " +INFINITY", "-nan" };
char *badones[] = { "",
"FIBB_BOVIN/67-212", /* testing for a fixed bug, 17 Dec 2012, reported by ER */
};
int ngood = sizeof(goodones) / sizeof(char *);
int nbad = sizeof(... | false | false | false | false | false | 0 |
self_recursive_p (struct cgraph_node *node)
{
struct cgraph_edge *e;
for (e = node->callees; e; e = e->next_callee)
if (cgraph_function_node (e->callee, NULL) == node)
return true;
return false;
} | false | false | false | false | false | 0 |
circ_buf_pop_ptr(struct circ_buf_t *cb)
{
void *pop_pos;
// Return NULL if there are no new data.
if (cb->rpos == cb->wpos)
return NULL;
pop_pos = cb->rpos;
// Wrap read pointer if needed.
if ((cb->rpos = (void *) ((char *) cb->rpos + cb->size)) >= cb->end)
cb->rpos = cb->star... | false | false | false | false | false | 0 |
krb5_dbe_get_string(krb5_context context, krb5_db_entry *entry,
const char *key, char **value_out)
{
krb5_error_code code;
const char *pos, *end, *mapkey, *mapval;
*value_out = NULL;
code = begin_attrs(context, entry, &pos, &end);
if (code)
return code;
while (next_a... | false | false | false | false | false | 0 |
ramap_rp (SCM ra0, SCM proc, SCM ras)
{
SCM ra1 = SCM_CAR (ras), ra2 = SCM_CAR (SCM_CDR (ras));
long n = SCM_I_ARRAY_DIMS (ra0)->ubnd - SCM_I_ARRAY_DIMS (ra0)->lbnd + 1;
unsigned long i0 = SCM_I_ARRAY_BASE (ra0), i1 = SCM_I_ARRAY_BASE (ra1), i2 = SCM_I_ARRAY_BASE (ra2);
long inc0 = SCM_I_ARRAY_DIMS (ra0)->inc;
... | false | false | false | false | false | 0 |
setFromString(const char *str) {
if (strcasecmp("TopToBottom", str) == 0)
*(*this) = ScreenPlacement::TOPBOTTOM;
else if (strcasecmp("BottomToTop", str) == 0)
*(*this) = ScreenPlacement::BOTTOMTOP;
else
setDefaultValue();
}
} | false | false | false | false | false | 0 |
main (int argc, char **argv)
{
FcStrSet *dirs;
FcStrList *list;
FcBool verbose = FcFalse;
FcBool force = FcFalse;
FcBool really_force = FcFalse;
FcBool systemOnly = FcFalse;
FcConfig *config;
int i;
int changed;
int ret;
#if HAVE_GETOPT_LONG || HAVE_GETOPT
int c;
#if... | false | false | false | false | false | 0 |
gtk_source_language_manager_guess_language (GtkSourceLanguageManager *lm,
const gchar *filename,
const gchar *content_type)
{
GtkSourceLanguage *lang = NULL;
GSList *langs = NULL;
g_return_val_if_fail (GTK_SOURCE_IS_LANGUAGE_MANAGER (lm), NULL);
g_return_val_if_fail ((filename != NULL... | false | false | false | false | false | 0 |
applet_change_pixel_size (PanelApplet *applet,
gint size,
TasklistData *tasklist)
{
if (tasklist->size == size)
return;
tasklist->size = size;
tasklist_update (tasklist);
} | false | false | false | false | false | 0 |
mxmlNewInteger(mxml_node_t *parent, /* I - Parent node or MXML_NO_PARENT */
int integer) /* I - Integer value */
{
mxml_node_t *node; /* New node */
#ifdef DEBUG
fprintf(stderr, "mxmlNewInteger(parent=%p, integer=%d)\n", parent, integer);
#endif /* DEBUG */
/*
* Create the node and se... | false | false | false | false | false | 0 |
GetLineString(void) const
{
FGString ret("at line ");
char intBuf[10];
sprintf(intBuf, "%d", mLine);
ret += intBuf;
return ret;
} | false | false | false | false | false | 0 |
remove_unresponsive_workers(struct work_queue *q) {
struct work_queue_worker *w;
char *key;
int last_recv_elapsed_time;
timestamp_t current_time = timestamp_get();
hash_table_firstkey(q->worker_table);
while(hash_table_nextkey(q->worker_table, &key, (void **) &w)) {
if(q->keepalive_interval > 0) {
if(!strc... | false | false | false | false | false | 0 |
setGood()
{
QPalette pal;
pal.setColor(QPalette::Text, Qt::black);
setPalette(pal);
setToolTip("");
} | false | false | false | false | false | 0 |
colourGeometries(tcDiagPtr diag) const {
// colour lines for q qbar -> Z g
static const ColourLines cqqbar[4]={ColourLines("1 2 5,-3 -5"),
ColourLines("1 5,-5 2 -3"),
ColourLines("1 2 5,-3 -5, 6 -7"),
ColourLines("1 5,-5 2 -3, 6 -7")};
// colour lines for q g -> Z q
static const Co... | false | false | false | false | false | 0 |
getNonStdUnspentTxOutsForWallet( BtcWallet & wlt)
{
return vector<UnspentTxOut>(0);
} | false | false | false | false | false | 0 |
P_subset(s1, s2) /* s1 <= s2 */
register long *s1, *s2;
{
register int sz1 = *s1++, sz2 = *s2++;
if (sz1 > sz2)
return 0;
while (--sz1 >= 0) {
if (*s1++ & ~*s2++)
return 0;
}
return 1;
} | false | false | false | false | false | 0 |
camlidl_apron_var_ptr_compare(value v1, value v2)
{
CAMLparam2(v1,v2);
int res;
apron_var_ptr e1 = *(apron_var_ptr *) Data_custom_val(v1);
apron_var_ptr e2 = *(apron_var_ptr *) Data_custom_val(v2);
res = ap_var_compare(e1,e2);
CAMLreturn(res);
} | false | false | false | false | false | 0 |
Scm_GetPasswdByName(ScmString *name)
{
struct passwd *pdata;
pdata = getpwnam(Scm_GetStringConst(name));
if (pdata == NULL) {
Scm_SigCheck(Scm_VM());
return SCM_FALSE;
} else {
return make_passwd(pdata);
}
} | false | false | false | false | false | 0 |
_sasl_get_plugin(const char *file,
const sasl_callback_t *verifyfile_cb,
void **libraryptr)
{
#ifdef DO_DLOPEN
int r = 0;
int flag;
void *library;
lib_list_t *newhead;
r = ((sasl_verifyfile_t *)(verifyfile_cb->proc))
(verifyfile_cb->context, file, SASL_VRFY_PLUGIN);
if (... | false | false | false | false | false | 0 |
make_conn (Any_Type arg)
{
Conn *s;
if (num_conns_generated++ >= param.num_conns)
return -1;
s = conn_new ();
if (!s)
return -1;
core_connect (s);
return 0;
} | false | false | false | false | false | 0 |
show_future_passes_cb (GtkWidget *menuitem, gpointer data)
{
GtkWidget *dialog;
GtkWindow *toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (data)));
GtkEventList *list = GTK_EVENT_LIST (data);
GSList *passes = NULL;
sat_t *sat;
qth_t *qth;
sat = SAT(g_object_get_data... | false | false | false | false | false | 0 |
gst_rtp_jitter_buffer_loop (GstRtpJitterBuffer * jitterbuffer)
{
GstRtpJitterBufferPrivate *priv;
GstFlowReturn result;
priv = jitterbuffer->priv;
JBUF_LOCK_CHECK (priv, flushing);
do {
result = handle_next_buffer (jitterbuffer);
if (G_LIKELY (result == GST_FLOW_WAIT)) {
/* now wait for the ne... | false | false | false | false | false | 0 |
rtl8225x_rf_init(struct net80211_device *dev)
{
struct rtl818x_priv *priv = dev->priv;
u16 reg8, reg9;
rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, 0x0480);
rtl818x_iowrite16(priv, &priv->map->RFPinsSelect, 0x0488);
rtl818x_iowrite16(priv, &priv->map->RFPinsEnable, 0x1FFF);
rtl818x_ioread8(priv, &priv->map-... | false | false | false | false | false | 0 |
pipe_including_tag(struct backend *s, const char *tag, int force_notfatal)
{
int r;
r = pipe_response(s, tag, 1, force_notfatal);
if (r == PROXY_NOCONNECTION) {
/* don't have to worry about downing the server, since
* pipe_until_tag does that for us */
prot_printf(imapd_out, "%s NO %s\r\n", tag,
... | false | false | false | false | false | 0 |
niu_reset_tx_mac(struct niu *np)
{
if (np->flags & NIU_FLAGS_XMAC)
return niu_reset_tx_xmac(np);
else
return niu_reset_tx_bmac(np);
} | false | false | false | false | false | 0 |
target_check_fua(struct se_device *dev)
{
return target_check_wce(dev) && dev->dev_attrib.emulate_fua_write > 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.