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 |
|---|---|---|---|---|---|---|
gtkmm_set_iconview_tooltip_column(Gtk::IconView* iconview,
Gtk::TreeModelColumn<Glib::ustring>& col_tooltip, Glib::RefPtr<Gtk::ListStore> model)
{
if (!iconview)
return;
#if !(defined APP_GTKMM_OLD_TOOLTIPS && APP_GTKMM_OLD_TOOLTIPS)
iconview->set_tooltip_column(col_tooltip.index()); // gtkmm has only index-bas... | false | false | false | false | false | 0 |
apiversion(struct io_data *io_data, __maybe_unused SOCKETTYPE c, __maybe_unused char *param, bool isjson, __maybe_unused char group)
{
struct api_data *root = NULL;
bool io_open;
message(io_data, MSG_VERSION, 0, NULL, isjson);
io_open = io_add(io_data, isjson ? COMSTR JSON_VERSION : _VERSION COMSTR);
root = api_... | false | false | false | false | false | 0 |
soap_in_ds__RetrievalMethodType(struct soap *soap, const char *tag, struct ds__RetrievalMethodType *a, const char *type)
{
size_t soap_flag_Transforms = 1;
if (soap_element_begin_in(soap, tag, 0, type))
return NULL;
a = (struct ds__RetrievalMethodType *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ds__RetrievalMetho... | false | false | false | false | false | 0 |
user_dict (void)
{
GError *error = NULL;
SkkUserDict *dict = skk_user_dict_new ("user-dict.dat", "EUC-JP", &error);
g_assert_no_error (error);
gboolean read_only;
g_assert (skk_dict_get_read_only (SKK_DICT (dict)) == FALSE);
g_object_get (dict, "read-only", &read_only, NULL);
g_assert (read_only == FALSE... | false | false | false | false | false | 0 |
recolor_spills ()
{
unsigned int i, num;
struct web **order2web;
num = num_webs - num_subwebs;
order2web = (struct web **) xmalloc (num * sizeof (order2web[0]));
for (i = 0; i < num; i++)
{
order2web[i] = id2web[i];
/* If we aren't breaking aliases, combine() wasn't merging the
spill_... | false | false | false | false | false | 0 |
seekto(which)
int which;
{
long offset;
int i;
offset = sizeof (Header) + (Header.Nbuffers * sizeof (struct rec_entry));
for (i = 1; i < which; i++)
offset += buflist[i]->r_nlines * sizeof (daddr);
fseek(ptrs_fp, offset, L_SET);
} | false | false | false | false | false | 0 |
addAssumption(Literal ma) {
if (ma != posLit(0)) {
weight_t highest = lits_[0].second->weight + 1;
lits_.insert(lits_.begin(), LitRep(ma, new Weight(0, highest)));
sum_[0] -= highest;
}
} | false | false | false | false | false | 0 |
of_unittest_overlay_10(void)
{
int ret;
char *child_path;
/* device should disable */
ret = of_unittest_apply_overlay_check(10, 10, 0, 1, PDEV_OVERLAY);
if (unittest(ret == 0,
"overlay test %d failed; overlay application\n", 10))
return;
child_path = kasprintf(GFP_KERNEL, "%s/test-unittest101",
unittest... | false | false | false | false | false | 0 |
lcc_to_geo(int gridID, int gridsize, double *xvals, double *yvals)
{
double originLon, originLat, lonParY, lat1, lat2, xincm, yincm;
double zlat, zlon;
double xi, xj;
int projflag, scanflag;
int status;
long i;
proj_info_t proj;
gridInqLCC(gridID, &originLon, &originLat, &lonParY, &lat1, &lat2, &xincm,... | false | false | false | false | false | 0 |
load_vectors(const struct Option *elev_map,
const struct Option *elev_const, const struct Option *vect,
const struct Option *position,
int map_obj_type, nv_data * data)
{
int i, id;
int nvects;
char *mapset;
double x, y, z;
if ((!elev_map->answer || elev_const->answer) && GS_num_... | false | false | false | false | false | 0 |
get_dominated_by_region (enum cdi_direction dir, basic_block *region,
unsigned n_region)
{
unsigned i;
basic_block dom;
VEC (basic_block, heap) *doms = NULL;
for (i = 0; i < n_region; i++)
region[i]->flags |= BB_DUPLICATED;
for (i = 0; i < n_region; i++)
for (dom = first_dom_son (dir, region[i]);... | false | false | false | false | false | 0 |
gallivm_create(void)
{
struct gallivm_state *gallivm;
#if HAVE_LLVM <= 0x206
if (GlobalGallivm) {
return GlobalGallivm;
}
#endif
gallivm = CALLOC_STRUCT(gallivm_state);
if (gallivm) {
if (!init_gallivm_state(gallivm)) {
FREE(gallivm);
gallivm = NULL;
}
}
#if HAVE... | false | false | false | false | false | 0 |
allocate_topic(struct Channel *chptr)
{
void *ptr;
if(chptr == NULL)
return;
ptr = rb_bh_alloc(topic_heap);
/* Basically we allocate one large block for the topic and
* the topic info. We then split it up into two and shove it
* in the chptr
*/
chptr->topic = ptr;
chptr->topic_info = (char *) ptr + T... | false | false | false | false | false | 0 |
ttl_model_property_new (const gchar *propname)
{
OntologyProperty *prop;
prop = g_new0 (OntologyProperty, 1);
prop->propertyname = g_strdup (propname);
prop->type = NULL;
prop->domain = NULL;
prop->range = NULL;
prop->superproperties = NULL;
prop->subproperties = NULL;
prop->max_cardinality = NULL;
prop->de... | false | false | false | false | false | 0 |
gl_barcode_backends_guess_backend_id (const gchar *id)
{
gint i;
if (id == NULL)
{
return styles[0].backend_id;
}
for (i=0; styles[i].id != NULL; i++)
{
if (g_ascii_strcasecmp (id, styles[i].id) == 0)
{
... | false | false | false | false | false | 0 |
ftoa_exponent(char *p, int exponent, char fmtch)
{
char expbuf[FTOA_MAXEXP];
*p++ = fmtch;
if (exponent < 0)
{
exponent = -exponent;
*p++ = '-';
}
else *p++ = '+';
register char *t = expbuf + FTOA_MAXEXP;
if (exponent > 9)
{
do
{
*--t = OFstatic_cast(char, FTOA_TOCHAR(exponent %... | false | false | false | false | false | 0 |
CopyADirectory(const std::string& source,
const std::string& destination, bool always)
{
Directory dir;
#ifdef _WIN32
dir.Load(Encoding::ToNarrow(Encoding::ToWindowsExtendedPath(source)));
#else
dir.Load(source);
#endif
size_t fileNum;
if (!SystemTools::MakeDirectory(destinati... | false | false | false | false | false | 0 |
SDLGui_DoEvent(const SDL_Event &event)
{
int retval = Dialog::GUI_CONTINUE;
int num_dialogs=1; /* Number of processDialog to call */
if (gui_dlg) {
gui_dlg->idle();
switch(event.type) {
case SDL_KEYDOWN:
gui_dlg->keyPress(event);
break;
case SDL_MOUSEBUTTONDOWN:
case SDL_MOUSEBUTTONUP:
gui... | false | false | false | false | false | 0 |
decode(const void **pScan_line, uint *pScan_line_len)
{
if ((m_error_code) || (!m_ready_flag))
return JPGD_FAILED;
if (m_total_lines_left == 0)
return JPGD_DONE;
if (m_mcu_lines_left == 0) {
if (setjmp(m_jmp_state))
return JPGD_FAILED;
if (m_progressive_flag)
... | false | false | false | false | false | 0 |
halftone_pixel_make(int w, int h) {
int x, y, k;
halftone_pixelinfo* hp = Gif_NewArray(halftone_pixelinfo, w * h);
for (y = k = 0; y != h; ++y)
for (x = 0; x != w; ++x, ++k) {
hp[k].x = x;
hp[k].y = y;
hp[k].distance = -1;
}
return hp;
} | false | false | false | false | false | 0 |
OffsetVarNodes(Node *node, int offset, int sublevels_up)
{
OffsetVarNodes_context context;
context.offset = offset;
context.sublevels_up = sublevels_up;
/*
* Must be prepared to start with a Query or a bare expression tree; if
* it's a Query, go straight to query_tree_walker to make sure that
* sublevels_up... | false | false | false | false | false | 0 |
CNFS_setcurrent(METACYCBUFF *metacycbuff) {
CYCBUFF *cycbuff;
int i, currentcycbuff = 0, order = -1;
bool foundcurrent = false;
for (i = 0 ; i < metacycbuff->count ; i++) {
cycbuff = metacycbuff->members[i];
if (strncmp(cycbuff->metaname, metacycbuff->name, CNFSNASIZ) != 0) {
/* this cycbuff is ... | false | true | false | false | false | 1 |
issueIHAVE (Connection cxn)
{
Buffer ihaveBuff, *writeArr ;
ArtHolder artH ;
Article article ;
const char *msgid ;
char *p ;
unsigned int tmp ;
size_t bufLen = 256 ;
bool rval = false ;
ASSERT (!cxn->doesStreaming) ;
ASSERT (cxn->state == cxnFlushingS ||
cxn->state == cxnFeedingS ||
... | false | true | false | false | false | 1 |
uc_strstr(const unichar_t *longer, const char *substr) {
long ch1, ch2;
const unichar_t *lpt, *str1; const char *str2;
for ( lpt=longer; *lpt!='\0'; ++lpt ) {
str1 = lpt; str2 = substr;
for (;;) {
ch1 = *str1++; ch2 = *(unsigned char *) str2++ ;
if ( ch2=='\0' )
return((unichar_t *) lpt);
... | false | false | false | false | false | 0 |
option_call_cbs( void )
{
int i;
struct opt_cb *tmp;
tmp = options.opt;
for( i = 0 ; i < options.count ; i++ )
{
if( tmp->req_arg )
( tmp->cb )( tmp->opch, tmp->arg_str, tmp->valid );
else
( tmp->cb )( tmp->opch, NULL, tmp->valid );
tmp++;
}
} | false | false | false | false | false | 0 |
_SaveGroupList(FILE *file, Group *g, int indent) {
int i;
for ( i=0; i<indent; ++i )
putc(' ',file);
fprintf(file,"\"%s\": %d", g->name, g->unique );
if ( g->glyphs!=NULL && g->kid_cnt==0 )
fprintf(file, " \"%s\"\n", g->glyphs );
else {
putc('\n',file);
for ( i=0; i<g->kid_cnt; ++i )
_Save... | false | false | false | false | false | 0 |
Current_Predicate_Alt_0(void)
{
WamWord name_word, arity_word;
HashScan scan;
PredInf *pred;
int which_preds;
int func, arity;
int func1, arity1;
Bool all;
Update_Choice_Point((CodePtr) Prolog_Predicate(CURRENT_PREDICATE_ALT, 0),
0);
name_word = AB(B, 0);
arity_word = AB(B, 1);
which_pre... | false | false | false | false | false | 0 |
style_parse_icon_size_style(
char *option, char *rest, window_style *ps)
{
int vals[4];
int i;
option = PeekToken(rest, NULL);
if (StrEquals(option, "Stretched"))
{
SSET_ICON_RESIZE_TYPE(*ps, ICON_RESIZE_TYPE_STRETCHED);
option = PeekToken(rest, &rest);
}
else if (StrEquals(option, "Adjusted"))
{
SSET_I... | false | false | false | false | false | 0 |
sprintf_percent(char **fmt, int *fmtl, char **b, char *blimit, eval_scalar *s)
{
char cfmt[32];
char buf[512];
int ci=1;
cfmt[0]='%';
while (*fmtl && ci < 32-1) {
cfmt[ci]=(*fmt)[0];
cfmt[ci+1]=0;
switch ((*fmt)[0]) {
case 'd':
case 'i':
case 'o':
case 'u':
case 'x':
case 'X':
case 'c': ... | false | false | false | false | true | 1 |
ensGvindividualadaptorFetchAllbyParent(
EnsPGvindividualadaptor gvia,
const EnsPGvindividual parent,
AjPList gvis)
{
AjBool result = AJFALSE;
AjPStr constraint = NULL;
EnsPBaseadaptor ba = NULL;
if (!gvia)
return ajFalse;
if (!parent)
return ajFalse;
if (!gvis)
... | false | false | false | false | false | 0 |
Compare_video_modes(const void *p1, const void *p2)
{
const T_Video_mode *mode1 = (const T_Video_mode *)p1;
const T_Video_mode *mode2 = (const T_Video_mode *)p2;
// Tris par largeur
if(mode1->Width - mode2->Width)
return mode1->Width - mode2->Width;
// Tri par hauteur
return mode1->Height - mode2->Hei... | false | false | false | false | false | 0 |
shouldActivateLink(const StringC &name) const
{
if (!activeLinkTypesSubsted_) {
// FIXME use mutable
ParserState *state = (ParserState *)this;
for (size_t i = 0; i < activeLinkTypes_.size(); i++)
for (size_t j = 0; j < activeLinkTypes_[i].size(); j++)
syntax().generalSubstTable()->subst(state->acti... | false | false | false | false | false | 0 |
get(SWF::TagType t, TagLoader& lf) const
{
Loaders::const_iterator it = _loaders.find(t);
// no loader found for the specified tag
if (it == _loaders.end()) return false;
// copy TagLoader to the given pointer
lf = it->second;
return true;
} | false | false | false | false | false | 0 |
addIconImage(DcmDirectoryRecord *record,
DcmItem *dataset,
const unsigned int size,
const OFFilename &sourceFilename)
{
OFCondition result = EC_IllegalParameter;
/* check parameter... | false | false | false | false | false | 0 |
checkVariable(const Token *tok, AccessControl varaccess)
{
// This is the start of a statement
const Token *vartok = NULL;
const Token *typetok = NULL;
// Is it a throw..?
if (Token::Match(tok, "throw %any% (") &&
Token::simpleMatch(tok->linkAt(2), ") ;")) {
return tok->linkAt(2);
... | false | false | false | false | false | 0 |
gst_ximagesink_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec)
{
GstXImageSink *ximagesink;
g_return_if_fail (GST_IS_XIMAGESINK (object));
ximagesink = GST_XIMAGESINK (object);
switch (prop_id) {
case PROP_DISPLAY:
g_value_set_string (value, ximagesink->displa... | false | false | false | false | false | 0 |
handle_redirect_message (GstURIDecodeBin * dec, GstMessage * msg)
{
const GValue *locations_list, *location_val;
GstMessage *new_msg;
GstStructure *new_structure = NULL;
GList *l_good = NULL, *l_neutral = NULL, *l_bad = NULL;
GValue new_list = { 0, };
guint size, i;
const GstStructure *structure;
GST_D... | false | false | false | false | false | 0 |
mf_ticks2sec(ticks,division,tempo)
int division;
unsigned int tempo;
unsigned long ticks;
{
float smpte_format, smpte_resolution;
if(division > 0)
return ((float) (((float)(ticks) * (float)(tempo)) / ((float)(division) * 1000000.0)));
else
{
smpte_format = upperbyte(division);
smp... | false | false | false | false | false | 0 |
anthy_textdict_scan(struct textdict *td, int offset, void *ptr,
int (*fun)(void *, int, const char *, const char *))
{
FILE *fp;
char buf[1024];
if (!td) {
return ;
}
fp = fopen(td->fn, "r");
if (!fp) {
return ;
}
if (fseek(fp, offset, SEEK_SET)) {
fclose(fp);
return ;
}
while ... | true | true | false | false | true | 1 |
rd_from_array(rd_t* r, double* radec, int N) {
int i;
rd_alloc_data(r, N);
for (i=0; i<r->N; i++) {
r->ra [i] = radec[i*2];
r->dec[i] = radec[i*2+1];
}
} | false | false | false | false | false | 0 |
gpio_keys_setup_key(struct platform_device *pdev,
struct input_dev *input,
struct gpio_button_data *bdata,
const struct gpio_keys_button *button)
{
const char *desc = button->desc ? button->desc : "gpio_keys";
struct device *dev = &pdev->dev;
irq_handler_t isr;
unsigned long irqflags;
int irq;
int err... | false | false | false | false | false | 0 |
P_SetDormantArtifact(mobj_t * arti)
{
arti->flags &= ~MF_SPECIAL;
if (deathmatch && (arti->type != MT_ARTIINVULNERABILITY)
&& (arti->type != MT_ARTIINVISIBILITY))
{
P_SetMobjState(arti, S_DORMANTARTI1);
}
else
{ // Don't respawn
P_SetMobjState(ar... | false | false | false | false | false | 0 |
restore_gdb_sanity(void)
{
if (!(pc->flags & GDB_INIT))
return;
if (pc->output_radix) {
*gdb_output_radix = pc->output_radix;
*gdb_output_format = (*gdb_output_radix == 10) ? 0 : 'x';
}
*gdb_prettyprint_structs = 1; /* these may piss... | false | false | false | false | false | 0 |
EncodeTimeOnly(struct pg_tm * tm, fsec_t fsec, int *tzp, int style, char *str)
{
if (tm->tm_hour < 0 || tm->tm_hour > HOURS_PER_DAY)
return -1;
sprintf(str, "%02d:%02d", tm->tm_hour, tm->tm_min);
/*
* Print fractional seconds if any. The fractional field widths here
* should be equal to the larger of MAX_TI... | false | true | false | false | false | 1 |
MarkForClientUpdate()
{
if (m_inWorld)
{
if (!m_objectUpdated)
{
AddToClientUpdateList();
m_objectUpdated = true;
}
}
} | false | false | false | false | false | 0 |
clear_cached_object (MonoDomain *domain, gpointer o, MonoClass *klass)
{
mono_domain_lock (domain);
if (domain->refobject_hash) {
ReflectedEntry pe;
gpointer orig_pe, orig_value;
pe.item = o;
pe.refclass = klass;
if (mono_g_hash_table_lookup_extended (domain->refobject_hash, &pe, &orig_pe, &orig_valu... | false | false | false | false | false | 0 |
vb2_dvb_get_frontend(
struct vb2_dvb_frontends *f, int id)
{
struct list_head *list, *q;
struct vb2_dvb_frontend *fe, *ret = NULL;
mutex_lock(&f->lock);
list_for_each_safe(list, q, &f->felist) {
fe = list_entry(list, struct vb2_dvb_frontend, felist);
if (fe->id == id) {
ret = fe;
break;
}
}
mutex_... | false | false | false | false | false | 0 |
avtab_insert_node(struct avtab *h, int hvalue,
struct avtab_node *prev, struct avtab_node *cur,
struct avtab_key *key, struct avtab_datum *datum)
{
struct avtab_node *newnode;
struct avtab_extended_perms *xperms;
newnode = kmem_cache_zalloc(avtab_node_cachep, GFP_KERNEL);
if (newnode == NULL)
return NULL;... | false | false | false | false | false | 0 |
Ns_ConnRedirect(Ns_Conn *conn, char *url)
{
Conn *connPtr = (Conn *) conn;
int status;
++connPtr->recursionCount;
/*
* Update the request URL.
*/
Ns_SetRequestUrl(conn->request, url);
/*
* Re-authorize and run the request.
*/
status = Ns_AuthorizeRequest(Ns_ConnSe... | false | false | false | false | false | 0 |
do_command_fail(char **argv, asciiMessage *result)
{
result->msg = strdup(argv[2]);
result->type = ASCII_FAILED;
/*
* The error message format is:
* <dCache error code> <error message> [POSIX error code]
*/
/* Temporary hack for dc_check.
* Pool Manager always should reply error 4 wh... | false | false | false | false | false | 0 |
ocfs2_xa_bucket_check_space(struct ocfs2_xa_loc *loc,
struct ocfs2_xattr_info *xi)
{
int rc;
int count = le16_to_cpu(loc->xl_header->xh_count);
int free_start = ocfs2_xa_get_free_start(loc);
int needed_space = ocfs2_xi_entry_usage(xi);
int size = namevalue_size_xi(xi);
struct super_block *sb = loc->xl_... | false | false | false | false | false | 0 |
get_work_q(struct Slapi_op_stack **op_stack_obj)
{
struct Slapi_work_q *tmp = NULL;
work_q_item *wqitem;
LDAPDebug0Args( LDAP_DEBUG_TRACE, "get_work_q \n" );
if (head_work_q == NULL) {
LDAPDebug0Args( LDAP_DEBUG_TRACE, "get_work_q: the work queue is empty.\n" );
return NULL;
}
tmp = head_work_q;
if ( head... | false | false | false | false | false | 0 |
ResizeAndExtend(vtkIdType sz)
{
void** newArray;
vtkIdType newSize;
if ( sz > this->Size )
{
newSize = this->Size + sz;
}
else if (sz == this->Size)
{
return this->Array;
}
else
{
newSize = sz;
}
if (newSize <= 0)
{
this->Initialize();
return 0;
}
if ... | false | false | false | false | false | 0 |
nssdc_xdr_cdf(xdrs, handlep)
XDR * xdrs;
NC ** handlep;
{
int status;
#if DEBUG
fprintf(stderr, "nssdc_xdr_cdf i've been called op = %d \n", xdrs->x_op);
#endif
switch(xdrs->x_op) {
case XDR_ENCODE :
status = nssdc_write_cdf(xdrs, handlep);
break;
case XDR_DECODE :... | false | false | false | false | false | 0 |
get_by_id(int m_id, int p_id)
{
int i;
for (i = 0; uart[i].type; i++) {
if (uart[i].m_id == m_id && uart[i].p_id == p_id)
return &uart[i];
}
return NULL;
} | false | false | false | false | false | 0 |
ath_txq_unlock_complete(struct ath_softc *sc, struct ath_txq *txq)
__releases(&txq->axq_lock)
{
struct sk_buff_head q;
struct sk_buff *skb;
__skb_queue_head_init(&q);
skb_queue_splice_init(&txq->complete_q, &q);
spin_unlock_bh(&txq->axq_lock);
while ((skb = __skb_dequeue(&q)))
ieee80211_tx_status(sc->hw, skb... | false | false | false | false | false | 0 |
str_find(struct idlist **idl, long number)
{
if (*idl == (struct idlist *) 0)
return((char *) 0);
else if (number == (*idl)->val.status.num)
return((*idl)->id);
else
return(str_find(&(*idl)->next, number));
} | false | false | false | false | false | 0 |
xsh_spectrum1D_load( cpl_frame* s1d_frame,
xsh_instrument* instr)
{
xsh_spectrum1D* result = NULL;
const char *s1dname = NULL;
XSH_ASSURE_NOT_NULL( s1d_frame);
XSH_ASSURE_NOT_NULL( instr);
XSH_ASSURE_NOT_ILLEGAL(cpl_frame_get_nextensions(s1d_frame) == 2);
check( s1dname = cpl_frame_get_filename( s1d... | false | false | false | false | false | 0 |
r_consonant_pair(struct SN_env * z) {
{ int m3; /* setlimit, line 50 */
int m = z->l - z->c; (void) m;
if (z->c < z->I[0]) return 0;
z->c = z->I[0]; /* tomark, line 50 */
m3 = z->lb; z->lb = z->c;
z->c = z->l - m;
{ int m = z->l - z->c; (void) m; /* and, line 52 *... | false | false | false | false | false | 0 |
luaZ_fill (ZIO *z) {
size_t size;
lua_State *L = z->L;
const char *buff;
lua_unlock(L);
buff = z->reader(L, z->data, &size);
lua_lock(L);
if (buff == NULL || size == 0) return EOZ;
z->n = size - 1;
z->p = buff;
return char2int(*(z->p++));
} | false | false | false | false | false | 0 |
ace_yylex (YYSTYPE *ace_yylval, void *YYLEX_PARAM)
{
ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_RECURSIVE_MUTEX,
ace_mon,
*ACE_Static_Object_Lock::instance (),
-1));
return ACE_Svc_Conf_Lexer::yylex (ace_yylval, ACE_SVC_CONF_PARAM);
} | false | false | false | false | false | 0 |
EmitStartOfAsmFile(Module &M) {
const Triple &TT = TM.getTargetTriple();
// Use unified assembler syntax.
OutStreamer->EmitAssemblerFlag(MCAF_SyntaxUnified);
// Emit ARM Build Attributes
if (TT.isOSBinFormatELF())
emitAttributes();
// Use the triple's architecture and subarchitecture to determine
//... | false | false | false | false | false | 0 |
Jim_ScanCoreCommand(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
{
Jim_Obj *listPtr, **outVec;
int outc, i;
if (argc < 3) {
Jim_WrongNumArgs(interp, 1, argv, "string format ?varName varName ...?");
return JIM_ERR;
}
if (argv[2]->typePtr != &scanFmtStringObjType)
SetSc... | false | false | false | false | false | 0 |
GMT_distances (double x[], double y[], GMT_LONG n, double scale, GMT_LONG dist_flag, double **dist)
{ /* Returns distances in meter; use scale to get other units */
GMT_LONG this, prev;
GMT_LONG cumulative = TRUE, do_scale, xy_not_NaN;
double *d = NULL, cum_dist = 0.0, inc = 0.0;
if (dist_flag < 0) { /* Want incre... | false | false | false | false | false | 0 |
HPDF_FToA (char *s,
HPDF_REAL val,
char *eptr)
{
HPDF_INT32 int_val;
HPDF_INT32 fpart_val;
char buf[HPDF_REAL_LEN + 1];
char* sptr = s;
char* t;
HPDF_UINT32 i;
if (val > HPDF_LIMIT_MAX_REAL)
val = HPDF_LIMIT_MAX_REAL;
else
if (val < HPD... | false | false | false | false | false | 0 |
mnote_pentax_tag_get_description (MnotePentaxTag t)
{
unsigned int i;
for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
if (table[i].tag == t) {
if (!table[i].description || !*table[i].description)
return "";
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
return _(table[i].description);
}
retu... | false | false | false | false | false | 0 |
Sync(void) {
switch (bank_mode) {
case 0x00:
case 0x10:
setprg16(0x8000, large_bank | prg_bank);
setprg16(0xC000, large_bank | 7);
break;
case 0x20:
setprg32(0x8000, (large_bank | prg_bank) >> 1);
break;
case 0x30:
setprg16(0x8000, large_bank | prg_bank);
setprg16(0xC000, large_bank | prg... | false | false | false | false | false | 0 |
ajVarDel(AjPVar *Pvar)
{
AjPVar var;
AjPVarData vardata = NULL;
if(!Pvar) return;
if(!(*Pvar)) return;
var = *Pvar;
ajStrDel(&var->Id);
ajStrDel(&var->Db);
ajStrDel(&var->Setdb);
ajStrDel(&var->Full);
ajStrDel(&var->Qry);
ajStrDel(&var->Formatstr);
ajStrDel(&var->Filen... | false | false | false | false | false | 0 |
gtk_plot_canvas_child_move(GtkPlotCanvas *canvas,
GtkPlotCanvasChild *child,
gdouble x1, gdouble y1)
{
child->rx2 += (x1 - child->rx1);
child->ry2 += (y1 - child->ry1);
child->rx1 = x1;
child->ry1 = y1;
if(GTK_PLOT_CANVAS_CHILD_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(child)))... | false | false | false | false | false | 0 |
frogr_config_save_all (FrogrConfig *self)
{
gboolean retval = FALSE;
g_return_val_if_fail (FROGR_IS_CONFIG (self), FALSE);
retval =_save_accounts (self);
retval = retval && _save_settings (self);
return retval;
} | false | false | false | false | false | 0 |
plfloatlabel(PLFLT value, char *string)
{
PLINT setpre, precis;
/* form[10] gives enough space for all non-malicious formats.
* tmpstring[15] gives enough room for 3 digits in a negative exponent
* or 4 digits in a positive exponent + null termination. That
* should be enough for all non-malici... | true | true | false | false | true | 1 |
gvir_log_handler(const gchar *log_domain G_GNUC_UNUSED,
GLogLevelFlags log_level G_GNUC_UNUSED,
const gchar *message,
gpointer user_data)
{
if (user_data)
fprintf(stderr, "%s\n", message);
} | false | false | false | false | false | 0 |
collection_table_list_count(CollectTable *ct, gint64 *bytes)
{
if (bytes)
{
gint64 b = 0;
GList *work;
work = ct->cd->list;
while (work)
{
CollectInfo *ci = work->data;
work = work->next;
b += ci->fd->size;
}
*bytes = b;
}
return g_list_length(ct->cd->list);
} | false | false | false | false | false | 0 |
on_ow__button_cancel_clicked (GtkButton *button,
GapCmeGlobalParams *gpp)
{
if(gap_debug) printf("CB: on_ow__button_cancel_clicked\n");
if(gpp)
{
gpp->val.ow_mode = -1;
gtk_widget_destroy (gpp->ow__dialog_window);
}
gtk_main_quit ();
} | false | false | false | false | false | 0 |
paramsToDialog(Inset const * inset)
{
InsetLine const * line = static_cast<InsetLine const *>(inset);
InsetCommandParams const & params = line->params();
lengthToWidgets(OffsetLE,
OffsetUnitCO,
params["offset"],
Length::defaultUnit());
lengthToWidgets(WidthLE,
WidthUnitCO,
params["width"],
Length:... | false | false | false | false | false | 0 |
gm_world_name_changed(GmWorld *world) {
gchar *tmp_path = world->priv->path ? g_strdup(world->priv->path) : NULL;
gchar *new_path = g_strconcat(gm_app_worlds_path(gm_app_instance()), "/",
gm_options_get(world->priv->options, "name"), NULL);
if (tmp_path && strcmp(tmp_path, new_path) == 0) {
g_free(new_path);
... | false | false | false | false | false | 0 |
i915_gem_obj_ggtt_bound_view(struct drm_i915_gem_object *o,
const struct i915_ggtt_view *view)
{
struct drm_i915_private *dev_priv = to_i915(o->base.dev);
struct i915_ggtt *ggtt = &dev_priv->ggtt;
struct i915_vma *vma;
list_for_each_entry(vma, &o->vma_list, obj_link)
if (vma->vm == &ggtt->base &&
i91... | false | false | false | false | false | 0 |
on_new1_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
/* If the currently opened file was modified and the user wants to save it */
if (file_modified && ask_to_save(GTK_WIDGET(menuitem), current_filename))
{
save_keyboard_file (GTK_... | false | false | false | false | false | 0 |
copyString(struct String* src, struct String** dest){
if(src == NULL){
Log("Src string == empty", ERROR, STRING);
exit(intern);
}
if((*dest) == NULL && ((*dest) = makeNewString()) == NULL){
Log("Destination string cannot be maked", ERROR, STRING);
exit(intern);
}
else {
if(!emptyString(*dest)){
ret... | false | false | false | false | false | 0 |
load (const char * name)
{
if (m_bLoaded)
return false;
m_module = g_module_open (name, static_cast<GModuleFlags>(G_MODULE_BIND_LAZY|G_MODULE_BIND_LOCAL));
if (m_module)
{
m_bLoaded = true;
return true;
}
else
return false;
} | false | false | false | false | false | 0 |
minNode(
struct fib_node* n1, struct fib_node* n2,struct fib_heap* heap
){
if(n1 == NULL){
return n2;
}
else if(n2 == NULL){
return n1;
}
return ( heap->lt(n1->key,n2->key) )?(n1):(n2);
} | false | false | false | false | false | 0 |
get_separator () const
{
char* ret = "";
switch (m_sep_selection)
{
case SPACE_SEP: ret = " "; break;
case TAB_SEP: ret = "\t"; break;
case COLON_SEP: ret = ":"; break;
case SEMICOLON_SEP: ret = ";"; break;
case COMMA_SEP: ret = ","; break;
}
return ret;
} | false | false | false | false | false | 0 |
setMaxMemory(int newmemlimit) {
if (newmemlimit < 10)
newmemlimit = 10 ;
#ifndef GOLLY64BIT
else if (newmemlimit > 4000)
newmemlimit = 4000 ;
#endif
g_uintptr_t newlimit = ((g_uintptr_t)newmemlimit) << 20 ;
if (alloced > newlimit) {
lifewarning("Sorry, more memory currently used than allowed... | false | false | false | false | false | 0 |
_rtl92cu_phy_config_bb_with_headerfile(struct ieee80211_hw *hw,
u8 configtype)
{
int i;
u32 *phy_regarray_table;
u32 *agctab_array_table;
u16 phy_reg_arraylen, agctab_arraylen;
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
struct rtl_phy *rtlphy = &(rtlpriv->ph... | false | false | false | false | false | 0 |
generate_append_tlist(List *colTypes, bool flag,
List *input_plans,
List *refnames_tlist)
{
List *tlist = NIL;
int resno = 1;
ListCell *curColType;
ListCell *ref_tl_item;
int colindex;
TargetEntry *tle;
Node *expr;
ListCell *planl;
int32 *colTypmods;
/*
* First extract typm... | false | false | false | false | false | 0 |
istype(Datasrc* datasrc , nc_type nctype)
{
Constant* ci = srcpeek(datasrc);
if(ci != NULL && ci->nctype == nctype) return 1;
return 0;
} | false | false | false | false | false | 0 |
s5p_mfc_watchdog_worker(struct work_struct *work)
{
struct s5p_mfc_dev *dev;
struct s5p_mfc_ctx *ctx;
unsigned long flags;
int mutex_locked;
int i, ret;
dev = container_of(work, struct s5p_mfc_dev, watchdog_work);
mfc_err("Driver timeout error handling\n");
/* Lock the mutex that protects open and release.
... | false | false | false | false | false | 0 |
compose_project_dir_from_name(const char * project_name)
{
const char * home_dir;
char * project_dir;
size_t home_dir_len;
home_dir = getenv("HOME");
home_dir_len = strlen(home_dir);
project_dir = malloc(home_dir_len + DEFAULT_PROJECT_BASE_DIR_LEN + max_escaped_length(strlen(project_name)) + 1);
if (pro... | false | false | false | false | false | 0 |
applyRules(const fxStr& name, const fxStr& s)
{
if (verbose)
traceRules(NLS::TEXT("Apply %s rules to \"%s\""),
(const char*) name, (const char*) s);
fxStr result(s);
RuleArray* ra = (*rules)[name];
if (ra) {
for (u_int i = 0, n = (*ra).length(); i < n; i++) {
DialRule& rule = (*ra)[i];
... | false | false | false | false | false | 0 |
addChild(OCDisplayNode *child) {
if (!children) {
children = new GooList();
}
children->append(child);
} | false | false | false | false | false | 0 |
_e2pc_save_cb (GtkWidget *button, E2P_ConfigData *rt)
{
const gchar *savepath = gtk_entry_get_text (GTK_ENTRY (rt->save_entry));
if (*savepath != '\0')
{
if (e2_option_bool_get ("confirm-overwrite"))
{
gchar *dlocal = D_FILENAME_TO_LOCALE (savepath);
g_strstrip (dlocal);
#ifdef E2_VFS
VPATH ddata = { dl... | false | false | false | false | false | 0 |
linked_fifo_generic_setup(void **testdata, int flags)
{
int retval=-1;
struct test_fifo_struct *fifo;
signal(SIGPIPE, sigpipe_handler);
fifo = get_fifo_struct(FIFO_FILENAME, flags);
if (fifo == NULL) {
goto out;
}
*testdata = fifo;
retval = 0;
out:
return retval;
} | false | false | false | false | false | 0 |
fw_schedule_bus_reset(struct fw_card *card, bool delayed, bool short_reset)
{
/* We don't try hard to sort out requests of long vs. short resets. */
card->br_short = short_reset;
/* Use an arbitrary short delay to combine multiple reset requests. */
fw_card_get(card);
if (!queue_delayed_work(fw_workqueue, &card->... | false | false | false | false | false | 0 |
ccm_age_callback(oc_ed_t event, void *cookie, size_t size, const void *data)
{
int lpc;
int node_list_size;
const oc_ev_membership_t *oc = (const oc_ev_membership_t *)data;
int (*ccm_api_callback_done) (void *cookie) =
find_library_function(&ccm_library, CCM_LIBRARY, "oc_ev_callback_done", 1);
... | false | false | false | false | false | 0 |
GetEnsemblePartUsage(ensPart, objPtr)
EnsemblePart *ensPart; /* ensemble part for usage info */
Tcl_Obj *objPtr; /* returns: usage information */
{
EnsemblePart *part;
Command *cmdPtr;
char *name;
Itcl_List trail;
Itcl_ListElem *elem;
Tcl_DString buffer;
/*
* Build t... | false | false | false | false | false | 0 |
setup(void)
{
char command[1024];
/*
* setup the digitizer. system() call must exit with 0 to indicate
* everything went fine
*/
sprintf(command, "%s/etc/geo.reg %s %d",
G_gisbase(), digit_points, getpid());
Suspend_curses();
if (system(command)) {
use_digitizer = 0;
G_sleep(3... | true | true | false | false | true | 1 |
getablexprnumatom( Expr )
ablexpr *Expr;
{
long Number;
if ( ABL_ATOM( Expr ) )
{
return( 1 );
}
Number = 0;
while ( ( Expr = ABL_CDR( Expr ) ) != (ablexpr *)0 )
{
Number += getablexprnumatom( ABL_CAR( Expr ) );
}
return( Number );
} | false | false | false | false | false | 0 |
read_sqfile(ESL_SQFILE *sqfp, const ESL_ALPHABET *abc, int nseq, ESL_SQ ***ret_sq)
{
int status;
ESL_SQ **sq;
int i;
/* get seqs from sqfile */
ESL_ALLOC(sq, sizeof(ESL_SQ *) * (nseq + 1)); /* +1 for the last guy we allocate but don't use */
i = 0;
sq[i] = esl_sq_CreateDigital(abc);
while ((status =... | false | false | false | false | false | 0 |
mud_zmp_send_command(MudTelnet *telnet, guint32 count, ...)
{
guchar byte;
guint32 i;
guint32 j;
guchar null = '\0';
byte = (guchar)TEL_IAC;
va_list va;
va_start(va, count);
gchar *arg;
gnet_conn_write(telnet->conn, (gchar *)&byte, 1);
byte = (guchar)TEL_SB;
gnet_conn_write(... | false | false | false | false | false | 0 |
getPreviousPoseWithMinDistance( const mrpt::system::TTimeStamp &t, double distance, CPose3D &out_pose )
{
if( m_path.size() == 0 || distance <=0 )
return false;
CPose3D myPose;
// Search for the desired timestamp
iterator it = m_path.find(t);
if( it != m_path.end() && it != m_path.begin() )
myPose = it->... | 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.