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 |
|---|---|---|---|---|---|---|
_dm_tree_names(struct dm_report *rh, struct dm_pool *mem,
struct dm_report_field *field, const void *data,
void *private, unsigned inverted)
{
const struct dm_tree_node *node = data;
struct dm_tree_node *parent;
void *t = NULL;
const char *name;
int first_node = 1;
char *repstr;
if (!dm_pool_begin_obj... | false | false | false | false | false | 0 |
crole_to_unit_type(char crole,struct player *pplayer)
{
struct unit_type *utype = NULL;
enum unit_role_id role;
switch(crole) {
case 'c':
role = L_CITIES;
break;
case 'w':
role = L_SETTLERS;
break;
case 'x':
role = L_EXPLORER;
break;
case 'k':
role = L_GAMELOSS;
break;
c... | false | false | false | false | false | 0 |
check_editing_files
(
)
{
bool modified = false;
for (std::vector<Editing_file*>::iterator it = editing_files.begin();
it != editing_files.end(); it++)
{
Editing_file *ed = *it;
struct stat fs; // Check mod. time of file.
if (stat(ed->pathname.c_str(), &fs) != 0)
{ // Gone?
delete ed;
it = e... | false | false | false | false | false | 0 |
cryptd_init_queue(struct cryptd_queue *queue,
unsigned int max_cpu_qlen)
{
int cpu;
struct cryptd_cpu_queue *cpu_queue;
queue->cpu_queue = alloc_percpu(struct cryptd_cpu_queue);
if (!queue->cpu_queue)
return -ENOMEM;
for_each_possible_cpu(cpu) {
cpu_queue = per_cpu_ptr(queue->cpu_queue, cpu);
crypto... | false | false | false | false | false | 0 |
output_ferror_stmt (struct cb_statement *p, int code)
{
output_line ("if (unlikely(cob_exception_code != 0))");
output_indent (" {");
if (p->handler1) {
if ((code & 0x00ff) == 0) {
output_line ("if ((cob_exception_code & 0xff00) == 0x%04x)",
code);
} else {
output_line ("if (cob_exception_code == ... | false | false | false | false | false | 0 |
kc_set_gamma(int type, double gamma) {
#if HAVE_POW
static int cur_type = KC_GAMMA_SRGB;
static double cur_gamma = 2.2;
int i, j;
if (type == cur_type && (type != KC_GAMMA_NUMERIC || gamma == cur_gamma))
return;
if (type == KC_GAMMA_SRGB) {
if (gamma_tables[0] != srgb_gamma_table_256... | false | false | false | false | false | 0 |
telemetry_plt_get_eventconfig(struct telemetry_evtconfig *pss_config,
struct telemetry_evtconfig *ioss_config,
int pss_len, int ioss_len)
{
u32 *pss_evtmap, *ioss_evtmap;
u32 index;
pss_evtmap = pss_config->evtmap;
ioss_evtmap = ioss_config->evtmap;
mutex_lock(&(telm_conf->telem_lock));
pss_config->nu... | false | false | false | false | false | 0 |
grl_registry_load_all_plugins (GrlRegistry *registry, GError **error)
{
GList *all_plugins;
gboolean loaded_one;
g_return_val_if_fail (GRL_IS_REGISTRY (registry), TRUE);
/* Preload all plugins */
if (!registry->priv->all_plugins_preloaded) {
grl_registry_preload_plugins (registry, NULL);
registry->p... | false | false | false | false | false | 0 |
mp_sub_d(const mp_int *a, mp_digit d, mp_int *b)
{
mp_int tmp;
mp_err res;
ARGCHK(a != NULL && b != NULL, MP_BADARG);
if((res = mp_init_copy(&tmp, a)) != MP_OKAY)
return res;
if(SIGN(&tmp) == NEG) {
if((res = s_mp_add_d(&tmp, d)) != MP_OKAY)
goto CLEANUP;
} else if(s_mp_cmp_d(&tmp, d) >... | false | false | false | false | false | 0 |
process_construction()
{
err_when(firm_id!=FIRM_MONSTER && builder_recno<=0);
if(firm_id==FIRM_MONSTER)
{
//--------- process construction for monster firm ----------//
hit_points++;
#ifdef DEBUG
if( config.fast_build && nation_recno==nation_array.player_recno )
hit_points += 10;
#endif
if(hit_point... | false | false | false | false | false | 0 |
SHRD_EwGwR(bxInstruction_c *i)
{
Bit16u op1_16, op2_16, result_16;
Bit32u temp_32, result_32;
unsigned count;
unsigned cf, of;
if (i->b1() == 0xac) // 0x1ac
count = i->Ib();
else // 0x1ad
count = CL;
count &= 0x1f; /* use only 5 LSB's */
if (!count) return;
op1_16 = BX_READ_16BIT_REG(i->rm... | false | false | false | false | false | 0 |
ExpOutputProc(instanceData, buf, toWrite, errorCodePtr)
ClientData instanceData; /* Exp state. */
char *buf; /* The data buffer. */
int toWrite; /* How many bytes to write? */
int *errorCodePtr; /* Where to store error code. */
{
ExpState *esPtr = (ExpState *) instanceData;
int written =... | false | false | false | false | false | 0 |
_xlate_state_name(const char *state_name, bool env_var)
{
int i = job_state_num(state_name);
if (i >= 0)
return (uint16_t) i;
if (env_var) {
fprintf(stderr, "Unrecognized SCANCEL_STATE value: %s\n",
state_name);
} else {
fprintf(stderr, "Invalid job state specified: %s\n",
state_name);
}
fprintf(std... | false | false | false | false | false | 0 |
create_new_file(void)
{
int RetCode = 0;
struct passwd *password;
char Name[SHORT_STRING_SIZE];
strcpy(Name,ValidFlags[FLAG_ALL].name);
print_msg(PRT_WARN,"Warning: no file \"%s\" exists.\nIt will be created a default file. Please edit it!\n",userfile());
if (AllEntries != NULL)
{
print_msg(PRT_WARN,"Inter... | true | true | false | false | false | 1 |
h5tools_str_fmt(h5tools_str_t *str/*in,out*/, size_t start, const char *fmt)
{
char _temp[1024], *temp = _temp;
/* If the format string is simply "%s" then don't bother doing anything */
if (!HDstrcmp(fmt, "%s"))
return str->s;
/*
* Save the input value if there is a `%' anywhere in FMT. ... | true | true | true | false | false | 1 |
o_grips_search_picture_world(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
int x, int y, int size, int *whichone)
{
/* inside upper left grip ? */
if (inside_grip(x, y,
o_current->picture->upper_x,
o_current->picture->upper_y, size)) {
*w... | false | false | false | false | false | 0 |
SelectNext(int back) {
GView *c = Active;
if (c == 0 && Top == 0)
return;
if (FocusCapture != 0)
return ;
else if (c == 0)
c = Active = Top;
else
if (back) {
Active = Active->Prev;
} else {
Active = Active->Next;
}
if (c ... | false | false | false | false | false | 0 |
neo_copy_data_from_queue_to_uart(struct jsm_channel *ch)
{
u16 head;
u16 tail;
int n;
int s;
int qlen;
u32 len_written = 0;
struct circ_buf *circ;
if (!ch)
return;
circ = &ch->uart_port.state->xmit;
/* No data to write to the UART */
if (uart_circ_empty(circ))
return;
/* If port is "stopped", don't ... | false | false | false | false | false | 0 |
git_refspec_parse(git_refspec *refspec, const char *str)
{
char *delim;
memset(refspec, 0x0, sizeof(git_refspec));
if (*str == '+') {
refspec->force = 1;
str++;
}
delim = strchr(str, ':');
if (delim == NULL) {
refspec->src = git__strdup(str);
GITERR_CHECK_ALLOC(refspec->src);
return 0;
}
refspec->... | false | false | false | false | false | 0 |
ReadVerifiedJoinInProgressMember(RakNet::BitStream *bsIn, VerifiedJoinInProgressMember *vjipm)
{
bsIn->Read(vjipm->guid);
bsIn->Read(vjipm->systemAddress);
ConnectionState cs = rakPeerInterface->GetConnectionState(vjipm->guid);
if (cs==IS_CONNECTED)
vjipm->joinInProgressState=JIPS_CONNECTED;
else if (cs==... | false | false | false | false | false | 0 |
io_apic_level_ack_pending(struct mp_chip_data *data)
{
struct irq_pin_list *entry;
unsigned long flags;
raw_spin_lock_irqsave(&ioapic_lock, flags);
for_each_irq_pin(entry, data->irq_2_pin) {
unsigned int reg;
int pin;
pin = entry->pin;
reg = io_apic_read(entry->apic, 0x10 + pin*2);
/* Is the remote IRR ... | false | false | false | false | false | 0 |
bm_table(UC *p,I tlen)
{
I *bm_array=ma(256);
DO(256,bm_array[i]=tlen);
DO(tlen,bm_array[p[i]]=tlen-(i+1));
R bm_array;
} | false | false | false | false | false | 0 |
rc_print_dst_register(FILE * f, struct rc_dst_register dst)
{
rc_print_register(f, dst.File, dst.Index, 0);
if (dst.WriteMask != RC_MASK_XYZW) {
fprintf(f, ".");
rc_print_mask(f, dst.WriteMask);
}
} | false | false | false | false | false | 0 |
validate(LaTeXFeatures & features) const
{
InsetMathNest::validate(features);
if (!normalcolor(color_))
features.require("color");
} | false | false | false | false | false | 0 |
lekhonee_main_show_config_dialog (LekhoneeMain* self, GtkMenuItem* i) {
PrefDialog* _tmp0_;
g_return_if_fail (self != NULL);
g_return_if_fail (i != NULL);
self->pref_dialog = (_tmp0_ = g_object_ref_sink (pref_dialog_new (self->window, self->accounts)), _g_object_unref0 (self->pref_dialog), _tmp0_);
g_signal_connec... | false | false | false | false | false | 0 |
about_watcher (PluginHandle * p, GtkWidget * about)
{
gtk_widget_set_sensitive (about, plugin_has_about (p) && plugin_get_enabled
(p));
return TRUE;
} | false | false | false | false | false | 0 |
slotMovableChanged(bool movable)
{
if (movable && !KAuthorized::authorize("movable_toolbars"))
setMovable(false);
} | false | false | false | false | false | 0 |
setShowingDotFiles( bool _showDotFiles )
{
if ( d->settings.isShowingDotFiles == _showDotFiles )
return;
d->prepareForSettingsChange();
d->settings.isShowingDotFiles = _showDotFiles;
} | false | false | false | false | false | 0 |
platform_update(void* state, void* output)
{
uint32_t r = 0;
#ifdef __WINNT__
rand_s(&r);
#else
struct platform_t* c = state;
if (c->cache_fill) {
c->cache_fill--;
r = c->cache[c->cache_fill];
_put_uint32_l(output, r);
return;
}
size_t total = 0;
ssize_t nread;
void* cache = c->cache;
while ((nread =... | false | false | false | false | false | 0 |
input_get_keycode(struct input_dev *dev, struct input_keymap_entry *ke)
{
unsigned long flags;
int retval;
spin_lock_irqsave(&dev->event_lock, flags);
retval = dev->getkeycode(dev, ke);
spin_unlock_irqrestore(&dev->event_lock, flags);
return retval;
} | false | false | false | false | false | 0 |
gst_rtp_mux_getcaps (GstPad * pad)
{
GstRTPMux *mux = GST_RTP_MUX (gst_pad_get_parent (pad));
GstCaps *caps = NULL;
GstIterator *iter = NULL;
GValue v = { 0 };
GstIteratorResult res;
GstCaps *peercaps = gst_pad_peer_get_caps (mux->srcpad);
GstCaps *othercaps = NULL;
if (peercaps) {
othercaps = gst_... | false | false | false | false | false | 0 |
chdirx(const char *dir, bool wr)
{
if (dir /* User specified directory? */
# ifdef HACKDIR
&& strcmp(dir, HACKDIR) /* and not the default? */
# endif
) {
# ifdef SECURE
setgid(getgid());
setuid(getuid()); /* Ron Wessels */
# endif
} else {
/* non-default data files i... | false | false | false | false | false | 0 |
main(int argc, char **argv)
{
int c;
int fd1,fd2;
while ((c = getopt(argc, argv, "d:hs:v")) > 0) {
switch (c) {
case 'd':
symbol_dir = optarg;
break;
case 's':
scale = atoi(optarg);
break;
case 'v':
fprintf(stderr,"sarlacc_scheme ver %s\n", SARVERSION);
exit(0);
break... | false | false | false | false | false | 0 |
readable(evContext opaqueCtx, void *uap, int fd, int evmask) {
evStream *str = uap;
int bytes;
UNUSED(evmask);
bytes = readv(fd, str->iovCur, str->iovCurCount);
if (bytes > 0) {
if ((str->flags & EV_STR_TIMEROK) != 0)
evTouchIdleTimer(opaqueCtx, str->timer);
consume(str, bytes);
} else {
if (bytes == 0... | false | false | false | false | false | 0 |
sock_id(const char *pfx, int fd)
{
struct vsb *vsb;
char abuf1[VTCP_ADDRBUFSIZE], abuf2[VTCP_ADDRBUFSIZE];
char pbuf1[VTCP_PORTBUFSIZE], pbuf2[VTCP_PORTBUFSIZE];
vsb = VSB_new_auto();
AN(vsb);
VTCP_myname(fd, abuf1, sizeof abuf1, pbuf1, sizeof pbuf1);
VTCP_hisname(fd, abuf2, sizeof abuf2, pbuf2, sizeof pbuf2);... | false | false | false | false | false | 0 |
e_cell_load_state (ECellView *ecell_view,
gint model_col,
gint view_col,
gint row,
gpointer edit_context,
gpointer save_state)
{
ECellClass *class;
class = E_CELL_GET_CLASS (ecell_view->ecell);
if (class->load_state != N... | false | false | false | false | false | 0 |
build_colors(struct field *f, Display *dpy, XWindowAttributes *xgwa)
{
XColor tmpcolor;
int i;
/* Count the colors in our map and assign them in a horrifically inefficient
* manner but it only happens once */
for( f->numcolors = 0;
rgb_colormap[f->numcolors] != NULL;
++f->numcolors )
... | false | false | false | false | true | 1 |
ReadCompressedData(unsigned char* dest) {
unsigned int bufsize = 512*1024;
unsigned char *rawdata = new unsigned char[bufsize];
unsigned int pos=0;
int size=0;
tstrip_t strip=0;
memcpy(rawdata,jpeghead,sizeof(jpeghead));
pos=sizeof(jpeghead);
// suppress tiff error messages
TIFFErrorHandler eh = TI... | false | false | false | false | false | 0 |
fb_setvt(int vtno)
{
struct vt_stat vts;
char vtname[12];
if (vtno < 0) {
if (-1 == ioctl(tty,VT_OPENQRY, &vtno) || vtno == -1) {
perror("ioctl VT_OPENQRY");
exit(1);
}
}
vtno &= 0xff;
sprintf(vtname, devices->ttynr, vtno);
chown(vtname, getuid(), getgid());
if (-1 == a... | true | true | false | false | true | 1 |
task_state_string_verbose(ulong task, char *buf)
{
long state, both;
int count;
state = task_state(task);
buf[0] = NULLCHAR;
count = 0;
if (state == _RUNNING_) {
sprintf(buf, "TASK_RUNNING");
return buf;
}
if (state & _INTERRUPTIBLE_)
sprintf(&buf[strlen(buf)], "%sTASK_INTERRUPTIBLE",
count++ ? "|"... | false | false | false | false | false | 0 |
TestMainLoop()
{
command *Command;
char *Scan;
TestCommandViewSystem( (char *)0 );
TestExit = 0;
do
{
fprintf( stdout, "\ncommand > " );
if ( ! fgets( TestBuffer, BDD_TEST_BUFFER_SIZE, stdin ) )
{
fprintf( stderr, "Interrupt by user\n" );
return( 0 );
}
Scan = strchr... | false | false | false | false | false | 0 |
pg_analyze_and_rewrite(Node *parsetree, const char *query_string,
Oid *paramTypes, int numParams)
{
Query *query;
List *querytree_list;
printf("postgres.c 577: pg_analyze_and_rewrite node type %d\n", parsetree -> type);
TRACE_POSTGRESQL_QUERY_REWRITE_START(query_string);
/*
* (1) Perform parse ana... | false | false | false | false | false | 0 |
cache_btell (struct bfd *abfd)
{
FILE *f = bfd_cache_lookup (abfd, CACHE_NO_OPEN);
if (f == NULL)
return abfd->where;
return real_ftell (f);
} | false | false | false | false | false | 0 |
ccss_grammar_create_stylesheet_from_file (ccss_grammar_t *self,
char const *css_file,
void *user_data)
{
ccss_stylesheet_t *stylesheet;
enum CRStatus ret;
g_return_val_if_fail (self, NULL);
g_return_val_if_fail (css_file, NULL);
stylesheet = ccss_stylesheet_create ();
stylesheet->grammar = cc... | false | false | false | false | false | 0 |
matrix_chop_p (GelMatrixW *m, int chop_when)
{
int i, j;
for (j = 0; j < gel_matrixw_height (m); j++) {
for (i = 0; i < gel_matrixw_width(m); i++) {
GelETree *t = gel_matrixw_get_index (m, i, j);
if (t != NULL &&
t->type == GEL_VALUE_NODE &&
mpw_chop_p (t->val.value, chop_when))
return TRUE... | false | false | false | false | false | 0 |
gst_mms_create (GstPushSrc * psrc, GstBuffer ** buf)
{
GstMMS *mmssrc = GST_MMS (psrc);
guint8 *data;
guint blocksize;
gint result;
goffset offset;
*buf = NULL;
offset = mmsx_get_current_pos (mmssrc->connection);
/* Check if a seek perhaps has wrecked our connection */
if (offset == -1) {
GST_E... | false | false | false | false | false | 0 |
GetColorTable()
{
SRPDataset* poDS = (SRPDataset*)this->poDS;
if( poDS->oCT.GetColorEntryCount() > 0 )
return &(poDS->oCT);
else
return NULL;
} | false | false | false | false | false | 0 |
pretty_print_job (job_index, format, stream)
int job_index, format;
FILE *stream;
{
register PROCESS *p;
/* Format only pid information about the process group leader? */
if (format == JLIST_PID_ONLY)
{
fprintf (stream, "%ld\n", (long)jobs[job_index]->pipe->pid);
return;
}
if (fo... | false | false | false | false | false | 0 |
add_exec_stack_entry(state_t *s, reg_t pc, stack_ptr_t sp, reg_t objp, int argc,
stack_ptr_t argp, selector_t selector, reg_t sendp, int origin,
seg_id_t locals_segment)
/* Returns new TOS element for the execution stack*/
/* locals_segment may be -1 if derived from the called object */
{
exec_stack_t *x... | false | false | false | false | false | 0 |
db_select_count(byte *sql, db_state *state)
{
SQLSMALLINT num_of_columns, intresult;
SQLLEN num_of_rows;
SQLRETURN result;
diagnos diagnos;
db_result_msg msg;
int index;
if (associated_result_set(state)) {
clean_state(state);
}
associated_result_set(state) = TRUE;
if(!sql_su... | false | false | false | false | false | 0 |
il4965_dump_nic_error_log(struct il_priv *il)
{
u32 data2, line;
u32 desc, time, count, base, data1;
u32 blink1, blink2, ilink1, ilink2;
u32 pc, hcmd;
if (il->ucode_type == UCODE_INIT)
base = le32_to_cpu(il->card_alive_init.error_event_table_ptr);
else
base = le32_to_cpu(il->card_alive.error_event_table_ptr)... | false | false | false | false | false | 0 |
drmSLFirst(void *l, unsigned long *key, void **value)
{
SkipListPtr list = (SkipListPtr)l;
if (list->magic != SL_LIST_MAGIC) return -1; /* Bad magic */
list->p0 = list->head->forward[0];
return drmSLNext(list, key, value);
} | false | false | false | false | false | 0 |
create_submenus(GtkWidget *menu, const gchar *action)
{
gchar *submenu = g_strdup(action);
GtkWidget *new_menu = NULL;
if (strchr(submenu, '/')) {
const gchar *end = (strchr(submenu, '/')+1);
GtkWidget *menu_item = NULL;
if (end && *end) {
*strchr(submenu, '/') = '\0';
if ((menu_item = find_item_in_men... | false | false | false | false | false | 0 |
resampleBeforeStretching() const
{
// We can't resample before stretching in offline mode, because
// the stretch calculation is based on doing it the other way
// around. It would take more work (and testing) to enable this.
if (!m_realtime) return false;
if (m_options & OptionPitchHighQuality) {... | false | false | false | false | false | 0 |
genGetIOB(const char* name, int gm_type, gm_code_writer& Body, gm_gpslib* lib) {
if (gm_is_node_compatible_type(gm_type)) gm_type = GMTYPE_NODE;
if (gm_is_edge_compatible_type(gm_type)) gm_type = GMTYPE_EDGE;
// assumtion: IOB name is IOB
Body.push(name);
Body.push("= IOB.");
switch (gm_type) {... | false | false | false | false | false | 0 |
LimitedSumOfUnscheduledPredsOfSuccs(const SUnit *SU,
unsigned Limit) {
unsigned Sum = 0;
for (SUnit::const_succ_iterator I = SU->Succs.begin(), E = SU->Succs.end();
I != E; ++I) {
const SUnit *SuccSU = I->getSUnit();
for (SUnit::const_pred_iterator... | false | false | false | false | false | 0 |
in_byte(struct rubin_state *rs)
{
int i, result = 0, bit_divider = rs->bit_divider;
for (i = 0; i < 8; i++)
result |= decode(rs, bit_divider - rs->bits[i],
rs->bits[i]) << i;
return result;
} | false | false | false | false | false | 0 |
mon_refresh_display(gpointer user_data)
{
xmlNode *cib_copy = copy_xml(current_cib);
pe_working_set_t data_set;
last_refresh = time(NULL);
if (cli_config_update(&cib_copy, NULL, FALSE) == FALSE) {
if (cib) {
cib->cmds->signoff(cib);
}
print_as("Upgrade failed: %s", ... | false | false | false | false | false | 0 |
rsn_stream_selector_getcaps (GstPad * pad)
{
GstPad *otherpad;
GstObject *parent;
GstCaps *caps;
otherpad = rsn_stream_selector_get_linked_pad (pad, FALSE);
parent = gst_object_get_parent (GST_OBJECT (pad));
if (!otherpad) {
GST_DEBUG_OBJECT (parent,
"Pad %s:%s not linked, returning ANY", GST_D... | false | false | false | false | false | 0 |
__Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
if (t == Py_None) {
__Pyx_RaiseNoneNotIterableError();
} else if (PyTuple_GET_SIZE(t) < index) {
__Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
} else {
__Pyx_RaiseTooManyValuesError();
}
} | false | false | false | false | false | 0 |
vision_site_update_from_city(struct vision_site *psite,
const struct city *pcity)
{
/* should be same identity and location */
fc_assert_ret(psite->identity = pcity->id);
fc_assert_ret(psite->location = pcity->tile);
psite->owner = city_owner(pcity);
vision_site_size_set(ps... | false | false | false | false | false | 0 |
add_intra_constraints(struct isl_sched_graph *graph,
struct isl_sched_edge *edge, __isl_take isl_map *map, int pos)
{
unsigned total;
isl_ctx *ctx = isl_map_get_ctx(map);
isl_space *dim;
isl_dim_map *dim_map;
isl_basic_set *coef;
struct isl_sched_node *node = edge->src;
coef = intra_coefficients(graph, node, m... | false | false | false | false | false | 0 |
gst_base_text_overlay_text_chain (GstPad * pad, GstObject * parent,
GstBuffer * buffer)
{
GstFlowReturn ret = GST_FLOW_OK;
GstBaseTextOverlay *overlay = NULL;
gboolean in_seg = FALSE;
guint64 clip_start = 0, clip_stop = 0;
overlay = GST_BASE_TEXT_OVERLAY (parent);
GST_BASE_TEXT_OVERLAY_LOCK (overlay);... | false | false | false | false | false | 0 |
unmarshalArguments(cdrStream& _n)
{
arg_0_ = new CosGraphs::NodeHandle;
(CosGraphs::NodeHandle&)arg_0_ <<= _n;
arg_0 = &arg_0_.in();
arg_1_ = CosGraphs::TraversalCriteria_Helper::unmarshalObjRef(_n);
arg_1 = arg_1_.in();
(CosGraphs::Mode&)arg_2 <<= _n;
} | false | false | false | false | false | 0 |
addTaggedPairIG(
const CHertzianViscoElasticFrictionIGP &prms,
int tag1,
int mask1,
int tag2,
int mask2
)
{
TaggedIGPCommand igpCmd(getGlobalRankAndComm());
igpCmd.appendIGP(prms);
igpCmd.append(prms.m_A);
igpCmd.append(prms.m_E);
igpCmd.append(prms.m_nu);
igpCmd.append(prms.mu);
igpCmd.append(p... | false | false | false | false | false | 0 |
lookupKwd(const string& name)
{
//
// Keyword list. *Must* be kept in alphabetical order.
//
static const string keywordList[] =
{
"and", "and_eq", "asm", "auto", "bit_and", "bit_or", "bool", "break", "case", "catch", "char",
"class", "compl", "const", "const_cast", "continue... | false | false | false | false | false | 0 |
vlistDefVarStdname(int vlistID, int varID, const char *stdname)
{
vlist_t *vlistptr;
if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
{
xwarning("%s", "Operation not executed.");
return;
}
vlistptr = vlist_to_pointer(vlistID);
vlistCheckVarID(__func__, vlistID, varID);
if ( stdna... | false | false | false | false | false | 0 |
set_local_myfilter(hid_t dcpl_id, hid_t UNUSED tid, hid_t UNUSED sid)
{
unsigned flags; /* Filter flags */
size_t cd_nelmts = 0; /* Number of filter parameters */
unsigned cd_values[2] = {5, 6}; /* Filter parameters */
/* Get the filter's current parameter... | false | false | false | false | false | 0 |
read_flonum(ScmDString *dstr, RadixMode mode)
{
int c;
while (1) {
c = buffer_peek_char();
if (((mode == RADIX_DECIMAL) && isdigit(c))
|| ((mode == RADIX_HEXADECIMAL) && isxdigit(c))) {
SCM_DSTRING_PUTB(dstr, (char) c);
buffer_next_char();
continu... | false | false | false | false | false | 0 |
GetDescription() const
{
if( longFstLevel == NULL )
return GDALPamRasterBand::GetDescription();
else
return longFstLevel;
} | false | false | false | false | false | 0 |
prhdr (const char *str, const DATASET *dset,
int missing, PRN *prn)
{
char date1[OBSLEN], date2[OBSLEN], tmp[96];
ntodate(date1, dset->t1, dset);
ntodate(date2, dset->t2, dset);
pputc(prn, '\n');
sprintf(tmp, _("%s, using the observations %s - %s"), str, date1, date2);
output_line(tmp, ... | false | false | false | false | false | 0 |
NC3_sync(int ncid)
{
int status;
NC *ncp;
status = NC_check_id(ncid, &ncp);
if(status != NC_NOERR)
return status;
if(NC_indef(ncp))
return NC_EINDEFINE;
if(NC_readonly(ncp))
{
return read_NC(ncp);
}
... | false | false | false | false | false | 0 |
processSuspend(int process_nbr)
{
strstream strm;
Process* process = getProcess(process_nbr);
if (process == NULL) {
strm << "Process: " << process_nbr << " not reachable!" << ends;
theUI->showMsg(strm.str());
return false;
}
ProcessId pid = process->getProcessId();
strm << "Process: " << pro... | false | false | false | false | false | 0 |
Done(string Message,unsigned long long Size,string Md5Hash, /*{{{*/
pkgAcquire::MethodConfig *Cnf)
{
if(Debug)
std::clog << "pkgAcqDiffIndex::Done(): " << Desc.URI << std::endl;
Item::Done(Message,Size,Md5Hash,Cnf);
string FinalFile;
FinalFile = _config->FindDir("Dir::State::lists")+URItoFileN... | false | false | false | false | false | 0 |
ChangeEquivalentPhonemes(Translator *tr, int lang2, char *phonemes)
{//====================================================================
// tr: the original language
// lang2: phoneme table number for the temporary language
// phonemes: the phonemes to be replaced
int ix;
int len;
char phon;
char *p;
unsign... | false | false | false | false | false | 0 |
getSourceFeaturesAt(int i, int whichFeatures[], int numFeatures, int data[]){
for (int k=0; k<numFeatures; k++){
data[k]=source[i-1][whichFeatures[k]];
}
return data;
} | false | false | false | false | false | 0 |
registerArea(const QByteArray& areaName, bool enabled)
{
// TODO for optimization: static int s_lastAreaNumber = 1;
KDebugPrivate* d = kDebug_data;
QMutexLocker locker(&d->mutex);
int areaNumber = 1;
while (d->cache.contains(areaNumber)) {
++areaNumber;
}
KDebugPrivate::Area areaData... | false | false | false | false | false | 0 |
zzip_strerror_of(ZZIP_DIR * dir)
{
if (! dir)
return strerror(errno);
return zzip_strerror(dir->errcode);
} | false | false | false | false | false | 0 |
inputmode_ascii_get_char(GVInputModesData *imd, offset_type offset)
{
int value = gv_input_mode_get_byte(imd, offset);
if (value<0)
return INVALID_CHAR;
if (value>255)
{
g_warning("Got BYTE>255 (%d) ?!\n", value);
value = ' ';
}
/*
There sepcial control characters ... | false | false | false | false | false | 0 |
LI9__COSH__numlib(V79)
register object V79;
{ VMB9 VMS9 VMV9
goto TTL;
TTL:;
base[0]= (V79);
vs_top=(vs_base=base+0)+1;
Lcomplexp();
vs_top=sup;
if((vs_base[0])==Cnil){
goto T133;}
{object V80;
object V81;
base[0]= (V79);
vs_top=(vs_base=base+0)+1;
Lrealpart();
vs_top=sup;
V80= vs_base[0];
base[0]= (V7... | false | false | false | false | false | 0 |
DebugPrint(char * buf, int * plen, bool output) {
int len = *plen;
if (len > 0) {
time_t tim = time(NULL);
struct tm * now = localtime(&tim);
char *time_string = asctime(now);
if (time_string) {
size_t time_len = strlen(time_string);
if (time_len > 0) {
time_str... | false | false | false | false | true | 1 |
main(int argc, char **argv)
{
struct slogic_handle handle;
libusb_init(&handle.context);
handle.device_handle =
open_device(handle.context, USB_VENDOR_ID, USB_PRODUCT_ID);
if (!handle.device_handle) {
fprintf(stderr, "Failed to find the device\n");
return -1;
}
if (!slogic_is_firmware_uplo... | false | false | false | false | false | 0 |
da9030_battery_event(struct notifier_block *nb, unsigned long event,
void *data)
{
struct da9030_charger *charger =
container_of(nb, struct da9030_charger, nb);
switch (event) {
case DA9030_EVENT_CHDET:
cancel_delayed_work_sync(&charger->work);
schedule_work(&charger->work.work);
break;
case DA9030_EVE... | false | false | false | false | false | 0 |
def_cfa_1 (label, loc_p)
const char *label;
dw_cfa_location *loc_p;
{
dw_cfi_ref cfi;
dw_cfa_location old_cfa, loc;
cfa = *loc_p;
loc = *loc_p;
if (cfa_store.reg == loc.reg && loc.indirect == 0)
cfa_store.offset = loc.offset;
loc.reg = DWARF_FRAME_REGNUM (loc.reg);
lookup_cfa (&old_cfa);
... | false | false | false | false | false | 0 |
readVertex(emf_ObjectData_X* od)
{
static UserInterface* gui = theControlCenter->getGui();
strstream strm1;
strstream strm2;
int rc = isOk;
const char* fn = od->field_name;
static ecif_Element_X tx;
//---New element is started
if (od->is_object_start) {
// Init tx data
init_trx_data(tx);
... | false | false | false | false | false | 0 |
imProcessBitMask(const imImage* src_image, imImage* dst_image, unsigned char mask, int op)
{
imbyte* src_map = (imbyte*)src_image->data[0];
imbyte* dst_map = (imbyte*)dst_image->data[0];
int i;
int count = dst_image->count * dst_image->depth;
switch(op)
{
case IM_BIT_AND:
#ifdef _OPENMP
#pragma omp parall... | false | false | false | false | false | 0 |
find_lease_by_mac(const uint8_t *mac)
{
unsigned i;
for (i = 0; i < server_config.max_leases; i++)
if (memcmp(g_leases[i].lease_mac, mac, 6) == 0)
return &g_leases[i];
return NULL;
} | false | false | false | false | false | 0 |
LI80__LOOP_DO_WITH__loop()
{ VMB69 VMS69 VMV69
goto TTL;
TTL:;
base[0]= ((object)VV[189]);
vs_top=(vs_base=base+0)+1;
(void) (*Lnk367)();
vs_top=sup;
{register object V511;
register object V512;
register object V513;
V511= Cnil;
V512= Cnil;
V513= Cnil;
goto T1144;
T1144:;
vs_base=vs_top;
(void) (*Lnk355... | false | false | false | false | false | 0 |
seq_to_quant_term(struct sequence_member *seq,
int n)
{
struct rel *r_prev, *r_new;
struct term *t, *t1;
int i;
if (n == 1)
return(NULL);
for (i = 1; i < n-1; i++)
if (seq[i].t->type != NAME)
return(NULL);
/* Special case: negated formula need not be parenthesized.
* For exampl... | false | false | false | false | false | 0 |
vm_slot_active(vm_instance_t *vm,u_int slot_id,u_int port_id)
{
struct cisco_card **rc;
u_int real_port_id;
if (vm_slot_get_info(vm,slot_id,port_id,&rc,&real_port_id) == -1)
return(FALSE);
if ((*rc == NULL) || ((*rc)->dev_type == NULL))
return(FALSE);
return(TRUE);
} | false | false | false | false | false | 0 |
changeOverlayGroup(size_t idx, Uint16 newGroup)
{
if ((newGroup < 0x6000)||(newGroup > 0x601F)) return EC_IllegalCall;
DVPSOverlay *overlay = getOverlay(idx);
if (overlay)
{
if (newGroup == (overlay->getOverlayGroup()+0x6000)) return EC_Normal;
if (haveOverlayGroup(newGroup)) return EC_IllegalCall; // d... | false | false | false | false | false | 0 |
si_put(SegmentInfo *si, FILE *stream)
{
int i;
fprintf(stream, "\tSegmentInfo {\n");
fprintf(stream, "\t\tname = %s\n", si->name);
fprintf(stream, "\t\tdoc_cnt = %d\n", si->doc_cnt);
fprintf(stream, "\t\tdel_gen = %d\n", si->del_gen);
fprintf(stream, "\t\tnorm_gens_size = %d\n", si->norm_gens_si... | false | false | false | false | false | 0 |
gfs_bubble_event (GfsEvent * event,
GfsSimulation * sim)
{
if ((* GFS_EVENT_CLASS (GTS_OBJECT_CLASS (gfs_bubble_class ())->parent_class)->event)
(event, sim)) {
GfsParticle * p = GFS_PARTICLE (event);
GfsParticulate * particulate = GFS_PARTICULATE (event);
GfsBubble * bubble = GFS_BUBBLE (ev... | false | false | false | false | false | 0 |
onError( QNetworkReply::NetworkError code )
{
DEBUG_BLOCK
debug() << code;
if( code == QNetworkReply::NoError )
debug() << "No Error was found, but onError was called - should not happen";
else if( code == QNetworkReply::AuthenticationRequiredError )
{
debug() << "Authentication fa... | false | false | false | false | false | 0 |
wilc_set_multicast_list(struct net_device *dev)
{
struct netdev_hw_addr *ha;
struct wilc_priv *priv;
struct host_if_drv *pstrWFIDrv;
int i = 0;
priv = wiphy_priv(dev->ieee80211_ptr->wiphy);
pstrWFIDrv = (struct host_if_drv *)priv->hWILCWFIDrv;
if (!dev)
return;
PRINT_D(INIT_DBG, "Setting Multicast List wi... | false | true | false | false | false | 1 |
create_program (const CoglGLES2Vtable *gles2,
const char *vertex_shader_source,
const char *fragment_shader_source)
{
GLuint fragment_shader, vertex_shader, program;
GLint status;
vertex_shader =
create_shader (gles2, GL_VERTEX_SHADER, vertex_shader_source);
fragment_shader ... | true | true | false | false | false | 1 |
libfvalue_data_handle_clone(
libfvalue_data_handle_t **destination_data_handle,
libfvalue_data_handle_t *source_data_handle,
libcerror_error_t **error )
{
libfvalue_internal_data_handle_t *internal_source_data_handle = NULL;
static char *function = "libfvalue_dat... | false | false | false | false | false | 0 |
gt_encseq2symbolstring(FILE *fpout,
const GtEncseq *encseq,
GtReadmode readmode,
unsigned long start,
unsigned long wlen,
unsigned long width)
{
unsigned long j, idx, lastpos;
... | false | false | false | false | false | 0 |
sst25l_write(struct mtd_info *mtd, loff_t to, size_t len,
size_t *retlen, const unsigned char *buf)
{
struct sst25l_flash *flash = to_sst25l_flash(mtd);
int i, j, ret, bytes, copied = 0;
unsigned char command[5];
if ((uint32_t)to % mtd->writesize)
return -EINVAL;
mutex_lock(&flash->lock);
ret = sst25l_wri... | false | false | false | false | false | 0 |
A_DeathBallImpact(mobj_t * ball)
{
int i;
mobj_t *target;
angle_t angle;
boolean newAngle;
if ((ball->z <= ball->floorz) && (P_HitFloor(ball) != FLOOR_SOLID))
{ // Landed in some sort of liquid
P_RemoveMobj(ball);
return;
}
if ((ball->z <= ball-... | 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.