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 |
|---|---|---|---|---|---|---|
hashInsert(GraphContext *p, GraphRow *pRow, int overwrite){
int h;
h = pRow->rid % p->nHash;
while( p->apHash[h] && p->apHash[h]->rid!=pRow->rid ){
h++;
if( h>=p->nHash ) h = 0;
}
if( p->apHash[h]==0 || overwrite ){
p->apHash[h] = pRow;
}
} | false | false | false | false | false | 0 |
__pyx_f_7sklearn_4tree_5_tree_3MSE_eval(struct __pyx_obj_7sklearn_4tree_5_tree_MSE *__pyx_v_self) {
double *__pyx_v_var_left;
double *__pyx_v_var_right;
int __pyx_v_n_outputs;
int __pyx_v_k;
double __pyx_v_total;
double __pyx_r;
__Pyx_RefNannyDeclarations
double *__pyx_t_1;
int __pyx_t_2;
__Pyx_RefN... | false | false | false | false | false | 0 |
m_restuntil(time)
time_type time;
{
time = virt_to_real(timebase, time);
while(time > gettime()) {
moxcwait(time);
}
} | false | false | false | false | false | 0 |
scan_bar(struct text_object *obj, const char *args)
{
struct bar *b;
b = malloc(sizeof(struct bar));
memset(b, 0, sizeof(struct bar));
/* zero width means all space that is available */
b->width = default_bar_width;
b->height = default_bar_height;
/* bar's argument is either height or height,width */
if (args... | false | false | false | false | false | 0 |
bxt_dsi_program_clocks(struct drm_device *dev, enum port port)
{
u32 tmp;
u32 divider;
u32 dsi_rate;
u32 pll_ratio;
struct drm_i915_private *dev_priv = dev->dev_private;
/* Clear old configurations */
tmp = I915_READ(BXT_MIPI_CLOCK_CTL);
tmp &= ~(BXT_MIPI_TX_ESCLK_FIXDIV_MASK(port));
tmp &= ~(BXT_MIPI_RX_ESCL... | false | false | false | false | false | 0 |
modbus_response(unsigned char *data, unsigned char *query, int fd)
{
int response_length;
unsigned short crc_calc = 0;
unsigned short crc_received = 0;
unsigned char recv_crc_hi;
unsigned char recv_crc_lo;
/* local declaration */
int receive_response(unsigned char *received_string, int ttyfd);
unsigned int c... | false | false | false | false | true | 1 |
nv41_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram)
{
struct nvkm_device *device = fb->subdev.device;
u32 size = nvkm_rd32(device, 0x10020c) & 0xff000000;
u32 tags = nvkm_rd32(device, 0x100320);
u32 fb474 = nvkm_rd32(device, 0x100474);
enum nvkm_ram_type type = NVKM_RAM_TYPE_UNKNOWN;
int ret;
if (fb474 &... | false | false | false | false | false | 0 |
tintImage(QImage &img, const QColor &tintColor)
{
QPainter p(&img);
p.setCompositionMode(QPainter::CompositionMode_Screen);
for (int x = 0; x < img.width(); ++x) {
for (int y = 0; y < img.height(); ++y) {
QRgb rgbColor = img.pixel(x, y);
int alpha = qAlpha(rgbColor);
... | false | false | false | false | false | 0 |
copy_model_params (MODEL *targ, const MODEL *src)
{
int err = 0;
if (src->nparams > 0) {
targ->params = strings_array_dup(src->params, src->nparams);
if (targ->params == NULL) {
err = E_ALLOC;
} else {
targ->nparams = src->nparams;
}
}
return err;
} | false | false | false | false | false | 0 |
Curl_do_more(struct connectdata *conn)
{
CURLcode result=CURLE_OK;
if(conn->curl_do_more)
result = conn->curl_do_more(conn);
return result;
} | false | false | false | false | false | 0 |
align(float x, float y) {
WindowRep& w = *rep();
if (!w.aligned_ || !Math::equal(x, w.xalign_, float(1e-3)) ||
!Math::equal(y, w.yalign_, float(1e-3))
) {
w.check_binding(this);
w.aligned_ = true;
w.xalign_ = x;
w.yalign_ = y;
}
} | false | false | false | false | false | 0 |
compress_image()
{
for(int c=0; c < m_num_components; c++) {
for (int y = 0; y < m_image[c].m_y; y+= 8) {
for (int x = 0; x < m_image[c].m_x; x += 8) {
dct_t sample[64];
m_image[c].load_block(sample, x, y);
quantize_pixels(sample, m_image[c].get_d... | false | false | false | false | false | 0 |
logging_pause_resume(void)
{
if(LoggingFile == NULL) {
return;
}
if(Logging == TRUE) {
Logging = FALSE;
} else {
Logging = TRUE;
}
toggle_logging_pause_resume(Logging);
} | false | false | false | false | false | 0 |
tracker_string_to_uint (const gchar *s,
guint *value)
{
unsigned long int n;
gchar *end;
g_return_val_if_fail (s != NULL, FALSE);
g_return_val_if_fail (value != NULL, FALSE);
n = (guint) strtoul (s, &end, 10);
if (end == s) {
*value = 0;
return FALSE;
}
if (n >... | false | false | false | false | false | 0 |
Initialise(struct gn_statemachine *state)
{
gn_error err;
int i;
/* Copy in the phone info */
memcpy(&(state->driver), &driver_nokia_6100, sizeof(gn_driver));
if (!(DRVINSTANCE(state) = calloc(1, sizeof(nk6100_driver_instance))))
return GN_ERR_MEMORYFULL;
switch (state->config.connection_type) {
case GN_CT_... | false | true | false | false | false | 1 |
voAACEncInit(VO_HANDLE * phCodec,VO_AUDIO_CODINGTYPE vType, VO_CODEC_INIT_USERDATA *pUserData)
{
AAC_ENCODER*hAacEnc;
AACENC_CONFIG config;
int error;
#ifdef USE_DEAULT_MEM
VO_MEM_OPERATOR voMemoprator;
#endif
VO_MEM_OPERATOR *pMemOP;
int interMem;
interMem = 0;
error = 0;
/* init the memory operator */
if... | false | false | false | false | false | 0 |
argf_readbyte(VALUE argf)
{
VALUE c;
NEXT_ARGF_FORWARD(0, 0);
c = argf_getbyte(argf);
if (NIL_P(c)) {
rb_eof_error();
}
return c;
} | false | false | false | false | false | 0 |
_cmsAdaptMatrixToD50(cmsMAT3* r, const cmsCIExyY* SourceWhitePt)
{
cmsCIEXYZ Dn;
cmsMAT3 Bradford;
cmsMAT3 Tmp;
cmsxyY2XYZ(&Dn, SourceWhitePt);
if (!_cmsAdaptationMatrix(&Bradford, NULL, &Dn, cmsD50_XYZ())) return FALSE;
Tmp = *r;
_cmsMAT3per(r, &Bradford, &Tmp);
return TRUE;
} | false | false | false | false | false | 0 |
deleteAllThreads ( Capability *cap )
{
// NOTE: only safe to call if we own all capabilities.
StgTSO* t, *next;
nat g;
debugTrace(DEBUG_sched,"deleting all threads");
for (g = 0; g < RtsFlags.GcFlags.generations; g++) {
for (t = generations[g].threads; t != END_TSO_QUEUE; t = next) {
... | false | false | false | false | false | 0 |
PR_PushIOLayer(
PRFileDesc *stack, PRDescIdentity id, PRFileDesc *fd)
{
PRFileDesc *insert = PR_GetIdentitiesLayer(stack, id);
PR_ASSERT(fd != NULL);
PR_ASSERT(stack != NULL);
PR_ASSERT(insert != NULL);
PR_ASSERT(PR_IO_LAYER_HEAD != id);
if ((NULL == stack) || (NULL == fd) || (NULL == inser... | false | false | false | false | false | 0 |
mt6397_probe(struct platform_device *pdev)
{
int ret;
struct mt6397_chip *mt6397;
mt6397 = devm_kzalloc(&pdev->dev, sizeof(*mt6397), GFP_KERNEL);
if (!mt6397)
return -ENOMEM;
mt6397->dev = &pdev->dev;
/*
* mt6397 MFD is child device of soc pmic wrapper.
* Regmap is set from its parent.
*/
mt6397->regma... | false | false | false | false | false | 0 |
match_cpoints(Field o,Object defmap,int which)
{
Map *map1, *map2;
int i,item1=0, item2=0, match=0;
Array inmap=NULL;
map1=NULL;
map2=NULL;
switch (which){
case(1):
inmap = (Array)DXGetComponentValue((Field)o,"hue positions");
break;
case(2):
inmap = (Array)DXGetCompo... | false | false | false | false | false | 0 |
popen(const char *command, const char *mode)
{
FILE *fp;
int parent_fd, child_fd;
int pipe_fds[2];
pid_t child_pid;
char new_mode[2] = "r";
int do_read = 0;
int do_write = 0;
int do_cloexec = 0;
while (*mode != '\0') {
switch (*mode++) {
case 'r':
do_read = 1;
break;
c... | false | false | false | false | false | 0 |
po_message_remove_filepos (po_message_t message, int i)
{
message_ty *mp = (message_ty *) message;
if (i >= 0)
{
size_t j = (size_t)i;
size_t n = mp->filepos_count;
if (j < n)
{
mp->filepos_count = n = n - 1;
free ((char *) mp->filepos[j].file_name);
for... | false | false | false | false | false | 0 |
GetValidIdent(char *buf)
{
int remp = 0;
int locp = 0;
char* colon1Ptr;
char* colon2Ptr;
char* colon3Ptr;
char* commaPtr;
char* remotePortString;
/* All this to get rid of a sscanf() fun. */
remotePortString = buf;
if ((colon1Ptr = strchr(remotePortString,':')) == NULL)
return 0;
*colo... | false | false | false | false | false | 0 |
usage (void)
{
ACE_ERROR ((LM_ERROR,
"Usage: %n [-abBcCdDef[num]gGhH<hashname>i<init>IjJ"
"k<keys>K<keyname>lL<language>mMnN<function name>o"
"Oprs<size>S<switches>tTvVZ<class name>].\n"
"(type %n -h for help)\n"));
} | false | false | false | false | false | 0 |
get_page_iter (RBDisplayPageMenu *menu, GtkTreeIter *iter)
{
GtkTreeIter parent;
if (rb_display_page_model_find_page_full (menu->priv->model, menu->priv->root_page, &parent) == FALSE)
return FALSE;
if (gtk_tree_model_iter_children (menu->priv->real_model, iter, &parent) == FALSE) {
return FALSE;
}
return TR... | false | false | false | false | false | 0 |
autohelperowl_attackpat317(int trans, int move, int color, int action)
{
int b, A;
UNUSED(color);
UNUSED(action);
b = AFFINE_TRANSFORM(720, trans, move);
A = AFFINE_TRANSFORM(647, trans, move);
return countlib(A)==2 && !obvious_false_eye(b, OTHER_COLOR(color));
} | false | false | false | false | false | 0 |
strnlen1 (const char *string, size_t maxlen)
{
const char *end = (const char *) memchr (string, '\0', maxlen);
if (end != NULL)
return end - string + 1;
else
return maxlen;
} | false | false | false | false | false | 0 |
strvis(dst, src, flag)
register char *dst;
register const char *src;
int flag;
{
register char c;
char *start;
for (start = dst; (c = *src);)
dst = vis(dst, c, flag, *++src);
*dst = '\0';
return (dst - start);
} | false | false | false | false | false | 0 |
usb_pcwd_set_heartbeat(struct usb_pcwd_private *usb_pcwd, int t)
{
unsigned char msb = t / 256;
unsigned char lsb = t % 256;
if ((t < 0x0001) || (t > 0xFFFF))
return -EINVAL;
/* Write new heartbeat to watchdog */
usb_pcwd_send_command(usb_pcwd, CMD_WRITE_WATCHDOG_TIMEOUT, &msb, &lsb);
heartbeat = t;
return ... | false | false | false | false | false | 0 |
shared_member_p (tree t)
{
if (TREE_CODE (t) == VAR_DECL || TREE_CODE (t) == TYPE_DECL \
|| TREE_CODE (t) == CONST_DECL)
return 1;
if (is_overloaded_fn (t))
{
for (; t; t = OVL_NEXT (t))
{
tree fn = OVL_CURRENT (t);
if (DECL_NONSTATIC_MEMBER_FUNCTION_P (fn))
return 0;
}
return... | false | false | false | false | false | 0 |
namconb1_install_palette( void )
{
int pen, page, dword_offset, byte_offset;
data32_t r,g,b;
data32_t *pSource;
/* this is unnecessarily expensive. Better would be to mark palette entries dirty as
* they are modified, and only process those that have changed.
*/
pen = 0;
for( page=0; page<4; page+... | false | false | false | false | false | 0 |
nextEventIfAfterStarted()
{
switch(event) {
case STOPPED:
event = HALTED;
break;
case COMPLETED:
event = SEEDING;
break;
default:
break;
}
}
} | false | false | false | false | false | 0 |
do_cmd_pref(void)
{
char tmp[80];
/* Default */
my_strcpy(tmp, "", sizeof(tmp));
/* Ask for a "user pref command" */
if (!get_string("Pref: ", tmp, 80)) return;
/* Process that pref command */
(void)process_pref_file_command(tmp);
} | false | false | false | false | false | 0 |
ForgetDatabaseFsyncRequests(Oid dbid)
{
RelFileNode rnode;
rnode.dbNode = dbid;
rnode.spcNode = 0;
rnode.relNode = 0;
if (pendingOpsTable)
{
/* standalone backend or startup process: fsync state is local */
RememberFsyncRequest(rnode, InvalidForkNumber, FORGET_DATABASE_FSYNC);
}
else if (IsUnderPostmaster... | false | true | false | false | false | 1 |
enet_protocol_notify_connect (ENetHost * host, ENetPeer * peer, ENetEvent * event)
{
host -> recalculateBandwidthLimits = 1;
if (event != NULL)
{
enet_protocol_change_state (host, peer, ENET_PEER_STATE_CONNECTED);
event -> type = ENET_EVENT_TYPE_CONNECT;
event -> peer = peer;
... | false | false | false | false | false | 0 |
setTransientFor(w, win)
Widget w;
Window win;
{
if (w == NULL) return;
if (!XtIsRealized(w)) XtRealizeWidget(w);
XSetTransientForHint(XtDisplay(w), XtWindow(w), win);
} | false | false | false | false | false | 0 |
dav_fs_insert_prop(const dav_resource *resource,
int propid, dav_prop_insert what,
apr_text_header *phdr)
{
const char *value;
const char *s;
apr_pool_t *p = resource->info->pool;
const dav_liveprop_spec *info;
int g... | false | false | false | false | false | 0 |
usb_gadget_get_string (struct usb_gadget_strings *table, int id, u8 *buf)
{
struct usb_string *s;
int len;
/* descriptor 0 has the language id */
if (id == 0) {
buf [0] = 4;
buf [1] = USB_DT_STRING;
buf [2] = (u8) table->language;
buf [3] = (u8) (table->language >> 8);
return 4;
}
for (s = table->str... | false | false | false | false | false | 0 |
_gdk_cairo_region_create_from_surface (cairo_surface_t *surface)
{
cairo_region_t *region;
GdkRectangle extents, rect;
cairo_surface_t *image;
cairo_t *cr;
gint x, y, stride;
guchar *data;
_gdk_cairo_surface_extents (surface, &extents);
if (cairo_surface_get_content (surface) == CAIRO_CONTENT_COLOR)
... | false | false | false | false | false | 0 |
read_u8_from_i2c(struct i2c_client *client, u8 i2c_reg, u8 *output)
{
int status = i2c_smbus_read_byte_data(client, i2c_reg);
if (status < 0) {
dev_warn(&client->dev, "reg 0x%02x, err %d\n",
i2c_reg, status);
} else {
*output = status;
}
return status;
} | false | false | false | false | false | 0 |
main(int argc, char **argv)
{
int pass_fd;
pass_fd=0;
#if CGI_PASSFD
/*
** If invoked as sqwebmailn, don't pass file descripts.
** Fallback to proxy mode.
*/
{
const char *p=strrchr(argv[0], '/');
if (p == NULL) p=argv[0];
else ++p;
if (strcmp(p, "sqwebmailn"))
pass_fd=1;
}
#endif
cgi_connec... | false | false | false | false | false | 0 |
text_render_position_changed(TextRender *w)
{
if (!GTK_WIDGET_REALIZED(GTK_WIDGET (w)))
return;
text_render_notify_status_changed(w);
// update the hotz & vert adjustments
if (w->priv->v_adjustment)
{
w->priv->v_adjustment->value = w->priv->current_offset;
gtk_adjustment_ch... | false | false | false | false | false | 0 |
gst_base_sink_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
{
GstBaseSink *sink = GST_BASE_SINK (object);
switch (prop_id) {
case PROP_PREROLL_QUEUE_LEN:
/* preroll lock necessary to serialize with finish_preroll */
GST_PAD_PREROLL_LOCK (sink->sinkpad)... | false | false | false | false | false | 0 |
ensOperonLoadDatabaseentries(EnsPOperon operon)
{
AjPStr objtype = NULL;
EnsPDatabaseadaptor dba = NULL;
if (!operon)
return NULL;
if (operon->Databaseentries)
return operon->Databaseentries;
if (!operon->Adaptor)
{
ajDebug("ensOperonLoadDatabaseentries cannot fetch "... | false | false | false | false | false | 0 |
isBasisFor(const Candidate &Basis,
const Candidate &C) {
return (Basis.Ins != C.Ins && // skip the same instruction
// They must have the same type too. Basis.Base == C.Base doesn't
// guarantee their types are the same (PR23975).
Basis.Ins->ge... | false | false | false | false | false | 0 |
get_priority(policy_entry_t *policy,
policy_priority_t prio)
{
u_int32_t priority = PRIO_BASE;
switch (prio)
{
case POLICY_PRIORITY_FALLBACK:
priority <<= 1;
/* fall-through */
case POLICY_PRIORITY_ROUTED:
priority <<= 1;
/* fall-through */
case POLICY_PRIORITY_DEFAULT:
priority <<= 1;... | false | false | false | false | false | 0 |
decode_utimes(struct tcb *tcp, int offset, int special)
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[offset]);
tprintf(", ");
if (tcp->u_arg[offset + 1] == 0)
tprintf("NULL");
else {
tprintf("{");
printtv_bitness(tcp, tcp->u_arg[offset + 1],
BITNESS_CURRENT, special);
tprintf(", ");
pri... | false | false | false | false | false | 0 |
printInterruptx( const char* cmd ) {
int id;
if ( StatDirty )
processStat();
sscanf( cmd + strlen( "cpu/interrupts/int" ), "%d", &id );
output( "%f\n", (float)( Intr[ id ] / timeInterval ) );
} | false | false | false | false | false | 0 |
ipv4ll_stop(GDHCPClient *dhcp_client)
{
switch_listening_mode(dhcp_client, L_NONE);
if (dhcp_client->timeout > 0)
g_source_remove(dhcp_client->timeout);
if (dhcp_client->listener_watch > 0) {
g_source_remove(dhcp_client->listener_watch);
dhcp_client->listener_watch = 0;
}
dhcp_client->state = IPV4LL_PROB... | false | false | false | false | false | 0 |
se_add_pair_to_list(struct snmp_enum_list **list, char *label, int value)
{
struct snmp_enum_list *lastnode = NULL, *tmp;
if (!list)
return SE_DNE;
tmp = *list;
while (tmp) {
if (tmp->value == value) {
free(label);
return (SE_ALREADY_THERE);
}
la... | false | false | false | false | false | 0 |
mousePressEvent(QMouseEvent * event)
{
QPoint pt = event->pos();
if (event->button() == Qt::LeftButton)
{
for (int i = m_DigStart; i < m_NumDigits; i++)
{
if (inRect(m_DigitInfo[i].dQRect, pt)) //if in i'th digit
{
if (m_LRMouseFreqSel)
... | false | false | false | false | false | 0 |
Rename(char *from, char *to)
{
int err;
err = rename(from, to);
if (err != 0) {
Ns_Log(Error, "rollfile: failed to rename file '%s' to '%s': '%s'",
from, to, strerror(errno));
}
return err;
} | false | false | false | false | false | 0 |
Q_strcat (char *dst, const char *src, int dstSize)
{
int len;
len = strlen(dst);
if (len >= dstSize)
Sys_Error(ERR_FATAL, "Q_strcat: already overflowed");
Q_strncpyz2(dst + len, src, dstSize - len);
} | false | false | false | false | false | 0 |
lto_symtab_merge_cgraph_nodes (void)
{
struct cgraph_node *node;
struct varpool_node *vnode;
lto_symtab_maybe_init_hash_table ();
htab_traverse (lto_symtab_identifiers, lto_symtab_merge_cgraph_nodes_1, NULL);
for (node = cgraph_nodes; node; node = node->next)
if ((node->thunk.thunk_p || node->alias)
&& ... | false | false | false | false | false | 0 |
get()
{
int ch = getc(f);
if (ch == '\n') {
line += 1;
coln = 0;
} else if (ch == '\t') {
coln += tab_size;
coln -= coln % tab_size;
} else {
coln += 1;
}
return ch;
} | false | false | false | false | false | 0 |
u16_reader(struct driver_data *drv_data)
{
while ((pxa2xx_spi_read(drv_data, SSSR) & SSSR_RNE)
&& (drv_data->rx < drv_data->rx_end)) {
*(u16 *)(drv_data->rx) = pxa2xx_spi_read(drv_data, SSDR);
drv_data->rx += 2;
}
return drv_data->rx == drv_data->rx_end;
} | false | false | false | false | false | 0 |
execute(CMD_Args *args, CMD_Context context) {
if (args == NULL)
args = new CMD_Args();
switch (context) {
case 0:
args->set_string_arg("ui-dialog-title", _("Save profiles?"));
args->set_string_arg("ui-dialog-text",
_("S... | false | false | false | false | false | 0 |
write(STD_OSTREAM & os) const
{
for(unsigned int i=0; i<phenotypes().nPhenotypes(); i++)
os << phenotype(i) << " ";
return 0;
} | false | false | false | false | false | 0 |
show_text(BOOK_INFO *binfo, char *text, gchar *word)
{
gint length;
DRAW_TEXT l_text;
GtkTextIter iter;
CANVAS canvas;
LOG(LOG_DEBUG, "IN : show_text()");
g_assert(text != NULL);
gtk_notebook_set_current_page(GTK_NOTEBOOK(note_text), 0);
#if 0
{
gchar *utf_str;
PangoLayout *layout;
PangoContext *conte... | false | false | false | false | false | 0 |
xmsg_unlink_dotfiles(session_t *s, const char *varname)
{
if (session_int_get(s, varname)) {
const int kind = !xstrcasecmp(varname, "unlink_sent");
const int maxfs = session_int_get(s, "max_filesize");
const char *dfsuffix = session_get(s, "dotfile_suffix");
const char *dir = xmsg_dirfix(session_uid_get(s)+XMS... | false | false | false | false | false | 0 |
iscsit_clear_ooo_cmdsns_for_conn(struct iscsi_conn *conn)
{
struct iscsi_ooo_cmdsn *ooo_cmdsn;
struct iscsi_session *sess = conn->sess;
mutex_lock(&sess->cmdsn_mutex);
list_for_each_entry(ooo_cmdsn, &sess->sess_ooo_cmdsn_list, ooo_list) {
if (ooo_cmdsn->cid != conn->cid)
continue;
ooo_cmdsn->cmd = NULL;
}... | false | false | false | false | false | 0 |
Initialize(JSFunction* function) {
constant_function_ = NULL;
is_simple_api_call_ = false;
expected_receiver_type_ = NULL;
api_call_info_ = NULL;
if (function == NULL || !function->is_compiled()) return;
constant_function_ = function;
AnalyzePossibleApiFunction(function);
} | false | false | false | false | false | 0 |
setForm(const Form &frm, const XData &_form)
{
JT_Search::set( frm );
_iq = createIQ(doc(), "set", frm.jid().full(), id());
QDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:search");
_iq.appendChild(query);
XData form( _form );
form.setType( XData::Data_Submit );
query... | false | false | false | false | false | 0 |
ct_InputPointer(char *cp)
{
int cursor;
cursor=fvwmCursorNameToIndex(cp);
if (cursor == -1) {
fprintf(stderr,"InputPointer: invalid cursor name %s\n",cp);
} else {
CF.pointer[input_pointer] = XCreateFontCursor(dpy,cursor);
}
} | false | false | false | false | false | 0 |
deinit_sprite(int keepSelected)
{
err_when(result_node_array!=NULL);
if( cur_x == -1 )
return;
//---- if this unit is led by a leader, only mobile units has leader_unit_recno assigned to a leader -----//
if( leader_unit_recno )
{
if( !unit_array.is_deleted(leader_unit_recno) ) // the leader... | false | false | false | false | false | 0 |
__ecereMethod___ecereNameSpace__ecere__gui__controls__EditBoxStream_Read(struct __ecereNameSpace__ecere__com__Instance * this, unsigned char * buffer, unsigned int size, unsigned int count)
{
struct __ecereNameSpace__ecere__gui__controls__EditBoxStream * __ecerePointer___ecereNameSpace__ecere__gui__controls__EditBoxStr... | false | false | false | true | false | 1 |
gpk_application_perform_search_name_details_file (GpkApplicationPrivate *priv)
{
GtkEntry *entry;
GtkWindow *window;
GError *error = NULL;
gboolean ret;
gchar **searches = NULL;
entry = GTK_ENTRY (gtk_builder_get_object (priv->builder, "entry_text"));
g_free (priv->search_text);
priv->search_text = g_strdup (g... | false | false | false | false | false | 0 |
unicodedata_UCD_decimal(PreviousDBVersion *self, PyObject *args)
{
PyObject *return_value = NULL;
PyUnicodeObject *unichr;
PyObject *default_value = NULL;
if (!PyArg_ParseTuple(args,
"O!|O:decimal",
&PyUnicode_Type, &unichr, &default_value))
goto exit;
return_value = unicode... | false | false | false | false | false | 0 |
cciss_lookup_board_id(struct pci_dev *pdev, u32 *board_id)
{
int i;
u32 subsystem_vendor_id, subsystem_device_id;
subsystem_vendor_id = pdev->subsystem_vendor;
subsystem_device_id = pdev->subsystem_device;
*board_id = ((subsystem_device_id << 16) & 0xffff0000) |
subsystem_vendor_id;
for (i = 0; i < ARRAY_SIZ... | false | false | false | false | false | 0 |
arcfb_lcd_update(struct arcfb_par *par, unsigned int dx,
unsigned int dy, unsigned int w, unsigned int h)
{
unsigned int left, right, distance, y;
/* align the request first */
y = floor8(dy);
h += dy - y;
h = iceil8(h);
distance = w;
left = dx;
right = min(left + w - 1, ceil64(left));
while (distance > ... | false | false | false | false | false | 0 |
search_named_node( lListElem *ep, /* root of the tree */
const char *name )
{
lListElem *cep, *fep;
static int sn_children_pos = -1;
static int sn_name_pos = -1;
DENTER(TOP_LAYER, "search_named_node");
if (!ep || !name) {
DEXIT;
return NULL;
}
if (sn_na... | false | false | false | false | false | 0 |
func_exists_vcard (struct _ESExp *f,
gint argc,
struct _ESExpResult **argv,
gpointer data)
{
SearchContext *ctx = data;
ESExpResult *r;
gint truth = FALSE;
if (argc == 1 && argv[0]->type == ESEXP_RES_STRING) {
const gchar *attr_name;
EVCardAttribute *att... | false | false | false | false | false | 0 |
spl_hash_verify_pos_ex(spl_array_object * intern, HashTable * ht TSRMLS_DC) /* {{{ */
{
Bucket *p;
/* IS_CONSISTENT(ht);*/
/* HASH_PROTECT_RECURSION(ht);*/
p = ht->arBuckets[intern->pos_h & ht->nTableMask];
while (p != NULL) {
if (p == intern->pos) {
return SUCCESS;
}
p = p->pNext;
}
/* HASH_UNPROTECT_RE... | false | false | false | false | false | 0 |
document_loader_loaded (GeditDocumentLoader *loader,
const GError *error,
GeditDocument *doc)
{
/* load was successful */
if (error == NULL ||
(error->domain == GEDIT_DOCUMENT_ERROR &&
error->code == GEDIT_DOCUMENT_ERROR_CONVERSION_FALLBACK))
{
GtkTextIter iter;
GFileInfo *info;
c... | false | false | false | false | false | 0 |
map_init()
{
map_delete();
if (tag_enable == 0)
error->all(FLERR,"Cannot create an atom map unless atoms have IDs");
int max = 0;
for (int i = 0; i < nlocal; i++) max = MAX(max,tag[i]);
MPI_Allreduce(&max,&map_tag_max,1,MPI_INT,MPI_MAX,world);
memory->destroy(sametag);
smax = nlocal + nghost + EXTR... | false | false | false | false | false | 0 |
afr_set_delayed_post_op (call_frame_t *frame, xlator_t *this)
{
afr_local_t *local = NULL;
afr_private_t *priv = NULL;
/* call this function from any of the related optimizations
which benefit from delaying post op are enabled, namely:
- changelog piggybacking
- eager locking
*/
priv = this->pri... | false | false | false | false | false | 0 |
scenario_recover_all (Sheet *sheet)
{
GList *l;
for (l = sheet->scenarios; l; l = l->next) {
GnmScenario *sc = l->data;
g_object_set_data (G_OBJECT (sc),
"marked_deleted", GUINT_TO_POINTER (FALSE));
}
} | false | false | false | false | false | 0 |
prim_getEnv(EvalState & state, Value * * args, Value & v)
{
string name = state.forceStringNoCtx(*args[0]);
mkString(v, getEnv(name));
} | false | false | false | false | false | 0 |
glusterd_op_quota (dict_t *dict, char **op_errstr)
{
glusterd_volinfo_t *volinfo = NULL;
int32_t ret = -1;
char *volname = NULL;
dict_t *ctx = NULL;
int type = -1;
... | false | false | false | false | false | 0 |
make_missing_directory_chain(path, mode)
const char *path;
mode_t mode;
{
char temporary_path[PATH_MAX + 1];
char *p;
if (PATH_MAX < strlen(path)) {
strncpy(temporary_path, path, PATH_MAX);
*(temporary_path + PATH_MAX) = '\0';
syslog(LOG_ERR, "too long path: %s...", temporary_path);
return -1;
... | false | false | false | false | false | 0 |
gtk_sat_data_init_sat (sat_t *sat, qth_t *qth)
{
geodetic_t obs_geodetic;
obs_set_t obs_set;
geodetic_t sat_geodetic;
double jul_utc, age;
g_return_if_fail (sat != NULL);
jul_utc = Julian_Date_of_Epoch (sat->tle.epoch); // => tsince = 0.0
sat->jul_epoch = jul_utc;
/* initialise observ... | false | false | false | false | false | 0 |
dot_end_graph(GVJ_t *job)
{
graph_t *g = job->obj->u.g;
Agiodisc_t* io_save;
static Agiodisc_t io;
if (io.afread == NULL) {
io.afread = AgIoDisc.afread;
io.putstr = (putstrfn)gvputs;
io.flush = (flushfn)gvflush;
}
io_save = g->clos->disc.io;
g->clos->disc.io = &io;
switch (job->rend... | false | false | false | false | false | 0 |
HcrExtendedSectionInfo(H_HCR_INFO pHcr)
{
UINT srtSecCnt = 0; /* counter for sorted sections */
UINT xSrtScCnt = 0; /* counter for extended sorted sections */
UINT remainNumCwInSortSec;
UINT inSegmentRemainNumCW;
UINT numSortedSection = pHcr->sectionInfo.numSortedSec... | false | false | false | false | false | 0 |
probe_max_1chan(comedi_t *it,int s)
{
comedi_cmd cmd;
char buf[100];
printf(" command fast 1chan:\n");
if(comedi_get_cmd_generic_timed(it, s, &cmd, 1, 1)<0){
printf(" not supported\n");
}else{
printf(" start: %s %d\n",
cmd_src(cmd.start_src,buf),cmd.start_arg);
printf(" scan_begin: %s %d\n",
... | false | false | false | false | false | 0 |
getsubst(argc, argv, substp, lenp)
int argc;
char **argv, ***substp;
int **lenp;
{
int i, n, len;
*substp = (char **)Xmalloc((argc + 1) * sizeof(char *));
*lenp = (int *)Xmalloc(argc * sizeof(int));
len = 1;
for (i = n = 0; i < argc; i++) {
len = (freeenviron || len > 0) ? identcheck(argv[i], '=') : 0;
if (l... | false | false | false | false | false | 0 |
renderLockTriangles(int center_x, int center_y, float frametime)
{
if ( Lock_anim.first_frame == -1 ) {
renderLockTrianglesOld(center_x, center_y, Lock_target_box_width/2);
} else {
// render the anim
Lock_anim.sx = center_x - Lockspin_half_w;
Lock_anim.sy = center_y - Lockspin_half_h;
// if it's still ani... | false | false | false | false | false | 0 |
parse_unicode_number(const char* begin, const char* end, int require_prefix, uint32_t& result)
{
bool allow_lower = (require_prefix == 1);
if (require_prefix < 0)
/* do not look for prefix */;
else if (begin + 7 == end && begin[0] == 'u' && begin[1] == 'n' && begin[2] == 'i')
begin += 3;
else if (begi... | false | false | false | false | false | 0 |
mc_join_strings(struct mc_board *mc, int str1, int str2)
{
int reference = mc->reference_stone[str2];
int liberty_edge2 = mc->first_liberty_edge[reference];
int liberty_edge1 = mc->first_liberty_edge[mc->reference_stone[str1]];
int next1;
int next2;
int pos = str1;
/* Update the reference stone for str1.... | false | false | false | false | false | 0 |
listForeignTables(const char *pattern, bool verbose)
{
PQExpBufferData buf;
PGresult *res;
printQueryOpt myopt = pset.popt;
if (pset.sversion < 90100)
{
fprintf(stderr, _("The server (version %d.%d) does not support foreign tables.\n"),
pset.sversion / 10000, (pset.sversion / 100) % 100);
return true;
... | false | false | false | false | false | 0 |
parse_clips (GESFormatter * self)
{
int size, j;
xmlNodeSetPtr nodes;
xmlXPathObjectPtr xpathObj;
xmlNodePtr clip_nd, tmp_nd, tmp_nd2;
xmlChar *trackelementrefId, *facrefId = NULL;
GList *reflist = NULL;
GESPitiviFormatterPrivate *priv = GES_PITIVI_FORMATTER (self)->priv;
GHashTable *clips_table = priv... | false | false | false | false | false | 0 |
UArray_isMultibyte(const UArray *self)
{
if (self->encoding == CENCODING_UTF8)
{
size_t i, max = UArray_sizeInBytes(self);
const uint8_t *bytes = UArray_bytes(self);
for (i = 0; i < max; i ++)
{
if (UArray_SizeOfUTF8Char(bytes + i) > 1) return 1;
}
//UARRAY_INTFOREACH(self, i, v, if (ismbchar((int)v)... | false | false | false | false | false | 0 |
ProcSendSignal(int pid)
{
PGPROC *proc = NULL;
if (RecoveryInProgress())
{
/* use volatile pointer to prevent code rearrangement */
volatile PROC_HDR *procglobal = ProcGlobal;
SpinLockAcquire(ProcStructLock);
/*
* Check to see whether it is the Startup process we wish to signal.
* This call is ma... | false | false | false | false | false | 0 |
CblacsBcast(int ConTxt, char *scope, int m, int n, void *A, int lda, int rowRank, int colRank,
MPI_Datatype baseType){
MPI_Comm comm;
MPI_Datatype type;
int root, coords[2], dest_rank, npcol;
/* if this process is the root of broadcast */
if (-1 == rowRank || -1 == colRank) root = 0;
else root = 1;
sw... | false | false | false | false | false | 0 |
ext4_get_first_inline_block(struct inode *inode,
struct ext4_dir_entry_2 **parent_de,
int *retval)
{
struct ext4_iloc iloc;
*retval = ext4_get_inode_loc(inode, &iloc);
if (*retval)
return NULL;
*parent_de = (struct ext4_dir_entry_2 *)ext4_raw_inode(&iloc)->i_block;
return iloc.bh;
} | false | false | false | false | false | 0 |
getpkt(maxlen) int maxlen; { /* Fill a packet from file */
int i, next;
static int c;
static char remain[6] = { NUL, NUL, NUL, NUL, NUL, NUL };
if (first == 1) { /* If first time thru... */
first = 0; /* don't do this next time, */
*remain = NUL; /* discard any old leftovers. */
if (isp) { ... | false | false | false | false | false | 0 |
H5L_build_name(char *prefix, char *file_name, char **full_name/*out*/)
{
size_t prefix_len; /* length of prefix */
size_t fname_len; /* Length of external link file name */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5L_build_name)
... | false | false | false | false | false | 0 |
setup_diva(struct IsdnCard *card)
{
int rc, have_card = 0;
struct IsdnCardState *cs = card->cs;
char tmp[64];
strcpy(tmp, Diva_revision);
printk(KERN_INFO "HiSax: Eicon.Diehl Diva driver Rev. %s\n", HiSax_getrev(tmp));
if (cs->typ != ISDN_CTYPE_DIEHLDIVA)
return (0);
cs->hw.diva.status = 0;
rc = setup_diva_... | false | false | false | false | false | 0 |
sftp_parse_uint32(struct sftpjob *job, uint32_t *ur) {
if(job->left < 4)
return SSH_FX_BAD_MESSAGE;
#if UNALIGNED_ACCESS
*ur = ntohl(*(uint32_t *)job->ptr);
job->ptr += 4;
#else
{
uint32_t u = *job->ptr++;
u = (u << 8) + *job->ptr++;
u = (u << 8) + *job->ptr++;
u = (u << 8) + *job->ptr++;
... | 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.