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 |
|---|---|---|---|---|---|---|
midgard_config_list_files(gboolean user)
{
gchar *config_dir;
if(user) {
gchar *_umcd = g_strconcat(".", MIDGARD_PACKAGE_NAME, NULL);
config_dir = g_build_path (G_DIR_SEPARATOR_S,
g_get_home_dir(), _umcd, "conf.d", NULL);
g_free (_umcd);
if (!g_file_test (config_dir, G_FILE_TEST_IS_DIR)){
g_error("... | false | false | false | false | false | 0 |
qt_isa(lua_State *L)
{
QVariant v;
if (lua_type(L, 1) == LUA_TUSERDATA)
v = luaQ_toqvariant(L, 1);
if (v.type() != QVariant::Invalid)
{
lua_pushvalue(L, 1);
lua_getfield(L, -1, "isa");
if (lua_isfunction(L, -1))
{
lua_insert(L, 1);
lua_call(L, lua_gettop(L)-1,... | false | false | false | false | false | 0 |
gs_getdefaultdevice(void)
{
const gx_device *const *list;
int count = gs_lib_device_list(&list, NULL);
const char *name, *end, *fin;
int i;
/* Search the compiled in device list for a known device name */
name = gs_dev_defaults;
fin = name + strlen(name);
/* iterate through each name i... | false | false | false | false | false | 0 |
Load_Filename_Select_Row_In_Other_List (GtkWidget* treeview_target, gpointer origselection)
{
GtkAdjustment *ct_adj, *ce_adj;
GtkTreeSelection *selection_orig;
GtkTreeSelection *selection_target;
GtkTreeView *treeview_orig;
GtkTreeModel *treemodel_orig;
GtkTreeModel *treemodel_target;
GtkTre... | false | false | false | false | false | 0 |
libglom_init()
{
//Threading is always enabled starting from GLib 2.31.0:
//TODO: Just remove this when we can increase the glibmm version needed:
#if !GLIB_CHECK_VERSION (2, 31, 0)
if (!Glib::thread_supported())
Glib::thread_init(0); //So we can use GMutex.
#endif
Gnome::Gda::init();
Gio::init();
Py_... | false | false | false | false | false | 0 |
l_uae_peek_u16(lua_State *L) {
int result = 0;
int addr = luaL_checkint(L, 1);
if (addr >= 0xdff000 && addr < 0xe00000) {
// + 4 to skip chipset mask
int offset = addr - 0xdff000 + 4;
int len;
uae_u8 *data = save_custom (&len, NULL, 1);
//printf("%d - %d %d %d %d %d... | false | false | false | false | false | 0 |
randkey_princ(krb5_principal princ, krb5_boolean keepold, int n_ks,
krb5_key_salt_tuple *ks)
{
if (keepold || ks) {
return kadm5_randkey_principal_3(handle, princ, keepold, n_ks, ks,
NULL, NULL);
} else
return kadm5_randkey_principal(handle,... | false | false | false | false | false | 0 |
space_for_attack(int targetXLoc, int targetYLoc, char targetMobileType, int targetWidth, int targetHeight)
{
if(mobile_type==UNIT_LAND && targetMobileType==UNIT_LAND)
return space_around_target(targetXLoc, targetYLoc, targetWidth, targetHeight);
if((mobile_type==UNIT_SEA && targetMobileType==UNIT_SEA) ||
(mobile... | false | false | false | false | false | 0 |
e_widget_disabled_set(Evas_Object *obj, int disabled)
{
API_ENTRY return;
if (sd->disabled == disabled) return;
sd->disabled = disabled;
if (sd->focused)
{
Evas_Object *o = NULL, *parent = NULL;
parent = obj;
for (;; )
{
o = e_widget_parent_get(parent);
... | false | false | false | false | false | 0 |
delete_break(int id) /* id of brkpnt to delete */
{
struct dlite_break_t *bp, *prev;
if (!dlite_bps)
return "no breakpoints set";
for (bp=dlite_bps,prev=NULL; bp != NULL; prev=bp,bp=bp->next)
{
if (bp->id == id)
break;
}
if (!bp)
return "breakpoint not found";
if (!prev)
{
... | false | false | false | false | false | 0 |
skip_iv(gs_type1_state *pcis)
{
int skip = pcis->pfont->data.lenIV;
ip_state_t *ipsp = &pcis->ipstack[pcis->ips_count - 1];
const byte *cip = ipsp->cs_data.bits.data;
crypt_state state = crypt_charstring_seed;
for (; skip > 0; ++cip, --skip)
decrypt_skip_next(*cip, state);
ipsp->ip = ci... | false | false | false | false | false | 0 |
AddMenuItem(uint8 Icon, const std::string& Message, uint32 dtSender, uint32 dtAction, const std::string& BoxMessage, bool Coded)
{
MANGOS_ASSERT(m_gItems.size() <= GOSSIP_MAX_MENU_ITEMS);
GossipMenuItem gItem;
gItem.m_gIcon = Icon;
gItem.m_gMessage = Message;
gItem.m_gCoded = Coded;
... | false | false | false | false | false | 0 |
move_pfn_range_right(struct zone *z1, struct zone *z2,
unsigned long start_pfn, unsigned long end_pfn)
{
int ret;
unsigned long flags;
unsigned long z2_end_pfn;
ret = ensure_zone_is_initialized(z2, start_pfn, end_pfn - start_pfn);
if (ret)
return ret;
pgdat_resize_lock(z1->zone_pgdat, &flags);
/* can't mo... | false | false | false | false | false | 0 |
_k_activateUrlNavigator()
{
// kDebug(kfile_area);
urlNavigator->setUrlEditable(!urlNavigator->isUrlEditable());
if(urlNavigator->isUrlEditable()) {
urlNavigator->setFocus();
urlNavigator->editor()->lineEdit()->selectAll();
}
} | false | false | false | false | false | 0 |
isEmpty() const
{
const SNMPManagement *sm =
dynamic_cast<SNMPManagement*>(getFirstByType(SNMPManagement::TYPENAME));
const FWBDManagement *fm =
dynamic_cast<FWBDManagement*>(getFirstByType(FWBDManagement::TYPENAME));
const PolicyInstallScript *pi =
dynamic_cast<PolicyInstallScript*>... | false | false | false | false | false | 0 |
initialize_table_hrSWRunTable(void)
{
netsnmp_handler_registration *reg;
netsnmp_mib_handler *handler = NULL;
#ifndef NETSNMP_NO_WRITE_SUPPORT
#ifdef NETSNMP_INCLUDE_HRSWRUN_WRITE_SUPPORT
# define SWRUN_ACCESS_LEVEL HANDLER_CAN_RWRITE
#else
# define SWRUN_ACCESS_LEVEL HANDLER_CAN_RONLY
#endif
#else /* !NETSNM... | false | false | false | false | false | 0 |
sectoken_gen_check(const sectoken_gen_t * const stg)
{
g_assert(stg != NULL);
g_assert(SECTOKEN_GEN_MAGIC == stg->magic);
g_assert(stg->keys != NULL);
g_assert(size_is_positive(stg->keycnt));
} | false | false | false | false | false | 0 |
PrintVarBindList PARAMS((f, v, indent),
FILE* f _AND_
VarBindList* v _AND_
unsigned short int indent)
{
VarBind* tmp;
if (v == NULL)
return;
fprintf(f,"{ -- SEQUENCE OF -- \n");
FOR_EACH_LIST_ELMT(tmp, v)
{
Indent(f, indent+ stdIndentG);
PrintVarBind(f, tmp, indent + stdInden... | false | false | false | false | false | 0 |
max77802_set_ramp_delay_2bit(struct regulator_dev *rdev,
int ramp_delay)
{
int id = rdev_get_id(rdev);
unsigned int ramp_value;
if (id > MAX77802_BUCK4) {
dev_warn(&rdev->dev,
"%s: regulator: ramp delay not supported\n",
rdev->desc->name);
return -EINVAL;
}
ramp_value = max77802_find_ramp_valu... | false | false | false | false | false | 0 |
starts_with_utf8_bom(const Blob *pContent, int *pnByte){
const char *z = blob_buffer(pContent);
int bomSize = 0;
const unsigned char *bom = get_utf8_bom(&bomSize);
if( pnByte ) *pnByte = bomSize;
if( blob_size(pContent)<bomSize ) return 0;
return memcmp(z, bom, bomSize)==0;
} | false | false | false | false | false | 0 |
UnsummonFlightMaster(const WorldObject* objRef)
{
if (Creature* flightMaster = objRef->GetMap()->GetCreature(m_flightMaster))
flightMaster->ForcedDespawn();
} | false | false | false | false | false | 0 |
mxf_mpeg_is_mpeg2_keyframe (GstBuffer * buffer)
{
GstByteReader reader = GST_BYTE_READER_INIT_FROM_BUFFER (buffer);
guint32 tmp;
while (gst_byte_reader_get_remaining (&reader) > 3) {
if (gst_byte_reader_peek_uint24_be (&reader, &tmp) && tmp == 0x000001) {
guint8 type = 0;
/* Found sync code */
... | false | false | false | false | false | 0 |
auth_stratum(struct pool *pool)
{
json_t *val = NULL, *res_val, *err_val;
char s[RBUFSIZE], *sret = NULL;
json_error_t err;
bool ret = false;
sprintf(s, "{\"id\": %d, \"method\": \"mining.authorize\", \"params\": [\"%s\", \"%s\"]}",
swork_id++, pool->rpc_user, pool->rpc_pass);
if (!stratum_send(pool, s, strle... | true | true | true | false | false | 1 |
hym8563_rtc_set_time(struct device *dev, struct rtc_time *tm)
{
struct i2c_client *client = to_i2c_client(dev);
struct hym8563 *hym8563 = i2c_get_clientdata(client);
u8 buf[7];
int ret;
/* Years >= 2100 are to far in the future, 19XX is to early */
if (tm->tm_year < 100 || tm->tm_year >= 200)
return -EINVAL;
... | false | false | false | false | false | 0 |
insert_triples(struct update_context *uc, fs_rid model, fs_rid_vector *s, fs_rid_vector *p, fs_rid_vector *o)
{
for (int i=0; i<s->length; i++) {
int segment = FS_RID_SEGMENT(s->data[i], uc->segments);
int pos = quad_buffer[segment].length;
quad_buffer[segment].quads[pos][0] = model;
... | false | false | false | false | false | 0 |
myOptionAlloc(char *longOption,char shortOption, int has_arg, char type, void *dataPtr, int dataSize, char *help) {
myOption_t *o;
static int iBase=129;
o = (myOption_t*)calloc(sizeof(myOption_t),1);
o->help = dupString(help);
o->longArg = dupString(longOption);
if(shortOption) o->shortArg[0] = (unsigned ch... | false | false | false | false | false | 0 |
on_template_cursor_changed (GtkTreeView *tree, gpointer data) {
if (!gtk_tree_view_get_selection (tree) == 0) {
gtk_widget_set_sensitive (gummi->templ->template_open, TRUE);
}
} | false | false | false | false | false | 0 |
Curl_sasl_ntlm_cleanup(struct ntlmdata *ntlm)
{
/* Free the target info */
Curl_safefree(ntlm->target_info);
/* Reset any variables */
ntlm->target_info_len = 0;
} | false | false | false | false | false | 0 |
evaluateUnNot(ExprValue& v) {
v.type = TIPO_LOGICO;
if(v.type == TIPO_LITERAL) {
v.value = (v.value.length()>0)?"0":"1";
} else {
v.value = atof(v.value.c_str())?"0":"1";
}
return v;
} | false | false | false | false | false | 0 |
reduceChat()
{
kDebug();
m_chatIsReduced = true;
m_lastWidthChat = m_bottomDock->width();
// reduce the chat
QPixmap upChatReducePix(m_dirs->findResource("appdata", m_automaton->skin() + "/Images/upArrow.png"));
m_reduceChatButton->setIcon(upChatReducePix);
m_chatDlg->hide();
m_titleChatMsg->show();
} | false | false | false | false | false | 0 |
cct_accept(MainInfo *min)
{
P_Controls *page = &the_page;
if(page->modified)
{
if(ctrl_mouse_ambiguity_exists(page->ctrlinfo))
{
dlg_dialog_async_new_simple(_("Note: The mouse button control settings\n"
"are ambiguous: the same button+modifier\n"
"is used for more than one function. This\... | false | false | false | false | false | 0 |
trade_between_cities(const struct city *pc1, const struct city *pc2)
{
int bonus = 0;
if (NULL != pc1 && NULL != pc1->tile
&& NULL != pc2 && NULL != pc2->tile) {
bonus = real_map_distance(pc1->tile, pc2->tile)
+ city_size_get(pc1) + city_size_get(pc2);
if (tile_continent(pc1->tile) != ti... | false | false | false | false | false | 0 |
p3d_prepare_wdata(ExtractControls *controls, ExtractArgs *args)
{
gint i;
if (controls->brick == NULL) {
//printf("No brick\n");
return;
}
for (i=0; i<3; i++) {
controls->wpx[i] = controls->px[i];
controls->wpy[i] = controls->py[i];
controls->wpz[i] = controls-... | false | false | false | false | false | 0 |
makeNotEqualMessage( const std::string &expectedValue,
const std::string &actualValue,
const AdditionalMessage &additionalMessage,
const std::string &shortDescription )
{
Message message( shortDescription,
... | false | false | false | false | false | 0 |
mt9t031_s_stream(struct v4l2_subdev *sd, int enable)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);
int ret;
if (enable)
/* Switch to master "normal" mode */
ret = reg_set(client, MT9T031_OUTPUT_CONTROL, 2);
else
/* Stop sensor readout */
ret = reg_clear(client, MT9T031_OUTPUT_CONTROL, 2);
if (re... | false | false | false | false | false | 0 |
icon() { return QImage( KIconLoader::global()->iconPath( "amarok", -KIconLoader::SizeHuge ) ); }
} | false | false | false | false | false | 0 |
SetFont( CFont* font )
{
if( !font )
return;
if( m_Font )
delete m_Font;
m_Font = font;
//RecalcCharSize();
} | false | false | false | false | false | 0 |
_e_fm_client_send(int minor, int id, void *data, int size)
{
E_Fm2_Client *cl;
cl = _e_fm2_client_get();
if (!cl)
{
_e_fm2_client_message_queue(E_IPC_DOMAIN_FM, minor,
id, 0, 0,
data, size);
}
else
{
ecor... | false | false | false | false | false | 0 |
get_clanc(int id, Plist anc)
{
Topform c = find_clause_by_id(id);
if (c == NULL) {
printf("get_clanc, clause with id=%d not found.\n", id);
fatal_error("get_clanc, clause not found.");
}
if (!plist_member(anc, c)) {
Ilist parents, p;
anc = insert_clause_into_plist(anc, c, TRUE);
parents ... | false | false | false | true | false | 1 |
InitTo300Pointer(struct SiS_Private *SiS_Pr)
{
InitCommonPointer(SiS_Pr);
SiS_Pr->SiS_VBModeIDTable = SiS300_VBModeIDTable;
SiS_Pr->SiS_EModeIDTable = SiS300_EModeIDTable;
SiS_Pr->SiS_RefIndex = SiS300_RefIndex;
SiS_Pr->SiS_CRT1Table = SiS300_CRT1Table;
if(SiS_Pr->ChipType == SIS_300) {
... | false | false | false | false | false | 0 |
r8712_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *obj)
{
int res;
if (pcmdpriv->padapter->eeprompriv.bautoload_fail_flag)
return _FAIL;
res = _enqueue_cmd(&pcmdpriv->cmd_queue, obj);
up(&pcmdpriv->cmd_queue_sema);
return res;
} | false | false | false | false | false | 0 |
do_gcr(const stp_vars_t *v)
{
stpi_channel_group_t *cg = get_channel_group(v);
const unsigned short *gcr_lookup;
unsigned short *output;
size_t count;
int i;
if (!cg)
return;
output = cg->gcr_data;
stp_curve_resample(cg->gcr_curve, 65536);
gcr_lookup = stp_curve_get_ushort_data(cg->gcr_curve, &c... | false | false | false | false | false | 0 |
decimal_do_add (REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *op0,
const REAL_VALUE_TYPE *op1, int subtract_p)
{
decNumber dn;
decContext set;
decNumber dn2, dn3;
decimal_to_decnumber (op0, &dn2);
decimal_to_decnumber (op1, &dn3);
decContextDefault (&set, DEC_INIT_DECIMAL128);
set.traps = 0;
if (subtr... | false | false | false | false | false | 0 |
get_devices (std::vector <AudioOutputDevice> & devices)
{
yield = true;
PWaitAndSignal m_pri(core_mutex[primary]);
PWaitAndSignal m_sec(core_mutex[secondary]);
devices.clear();
for (std::set<AudioOutputManager *>::iterator iter = managers.begin ();
iter != managers.end ();
iter++)
(*iter)-... | false | false | false | false | false | 0 |
showSinglePointSet(PointSetType type, QString name)
{
axesPointSet.setVisible(type == AxisPointSet);
scalePointSet.setVisible(type == ScalePointSet);
PointSetListIterator itr;
for (itr = curveList.begin(); itr != curveList.end(); ++itr)
(*itr).setVisible((type == CurvePointSet) ? (name == (*itr).name()) :... | false | false | false | false | false | 0 |
security_tun_dev_create(void)
{
return call_int_hook(tun_dev_create, 0);
} | false | false | false | false | false | 0 |
Pause(void)
{
int Pause = TRUE;
int cheese = FALSE; /* cheese mode: do not display GAME PAUSED - nicer screenshots */
SDL_Event event;
SDLKey key;
Activate_Conservative_Frame_Computation();
AssembleCombatPicture(DO_SCREEN_UPDATE);
input_get_keybind("pause", &key, NULL);
while (Pause) {
SDL_WaitEvent(&eve... | false | false | false | false | false | 0 |
getLastNonDebugInstr() {
iterator B = begin(), I = end();
while (I != B) {
--I;
if (I->isDebugValue())
continue;
return I;
}
// The block is all debug values.
return end();
} | false | false | false | false | false | 0 |
upClicked()
{
if (charts->currentItem()) {
int index = charts->invisibleRootItem()->indexOfChild(charts->currentItem());
if (index == 0) return; // its at the top already
// movin on up!
QTreeWidgetItem *moved;
charts->invisibleRootItem()->insertChild(index-1, moved=charts->... | false | false | false | false | false | 0 |
drop_moving_cards (AisleriotBoard *board,
gint x,
gint y)
{
AisleriotBoardPrivate *priv = board->priv;
ArSlot *hslot;
gboolean moved = FALSE;
hslot = find_drop_target (board,
x - priv->last_click_x,
y - priv->last_cli... | false | false | false | false | false | 0 |
do_status(void)
{
pgpid_t pid;
pid = get_pgpid(true);
/* Is there a pid file? */
if (pid != 0)
{
/* standalone backend? */
if (pid < 0)
{
pid = -pid;
if (postmaster_is_alive((pid_t) pid))
{
printf(_("%s: single-user server is running (PID: %ld)\n"),
progname, pid);
return;
}
}... | false | false | false | false | false | 0 |
_stream_message_function(const DB_ENV *dbenv, const char *message)
{
const DbEnv *cxxenv = DbEnv::get_const_DbEnv(dbenv);
if (cxxenv == 0) {
DB_ERROR(0,
"DbEnv::stream_message", EINVAL, ON_ERROR_UNKNOWN);
return;
}
if (cxxenv->message_callback_)
cxxenv->message_callback_(cxxenv, message);
else if (cxx... | false | false | false | false | false | 0 |
end_result_backtrace (CutStreamParser *parser, CutStreamParserPrivate *priv,
GMarkupParseContext *context,
const gchar *element_name, GError **error)
{
if (!priv->backtrace)
return;
priv->backtrace = g_list_reverse(priv->backtrace);
if (priv->result)
... | false | false | false | false | false | 0 |
adb_qemu_trace_init(void)
{
char con_name[32];
if (adb_debug_qemu >= 0) {
return 0;
}
/* adb debugging QEMUD service connection request. */
snprintf(con_name, sizeof(con_name), "qemud:adb-debug");
adb_debug_qemu = qemu_pipe_open(con_name);
return (adb_debug_qemu >= 0) ? 0 : -1;
} | false | false | false | false | false | 0 |
CompAsssListLev (
Stat stat )
{
CVar lists; /* list */
CVar poss; /* positions */
CVar rhss; /* right hand sides */
Int level; ... | false | false | false | false | false | 0 |
rtsp_cmd_play(HTTPContext *c, const char *url, RTSPMessageHeader *h)
{
HTTPContext *rtp_c;
rtp_c = find_rtp_session_with_url(url, h->session_id);
if (!rtp_c) {
rtsp_reply_error(c, RTSP_STATUS_SESSION);
return;
}
if (rtp_c->state != HTTPSTATE_SEND_DATA &&
rtp_c->state != HTT... | false | false | false | false | false | 0 |
xmlSchemaGetChameleonSchemaBucket(xmlSchemaParserCtxtPtr pctxt,
const xmlChar *schemaLocation,
const xmlChar *targetNamespace)
{
xmlSchemaBucketPtr cur;
xmlSchemaItemListPtr list;
list = pctxt->constructor->buckets;
if (list->nbI... | false | false | false | false | false | 0 |
popup_action_sync_action_properties (GtkActivatable *activatable,
GtkAction *action)
{
if (action == NULL)
return;
/* XXX GTK+ 2.18 is still missing accessor functions for
* "hide-if-empty" and "visible-overflown" properties.
* These are rarely used so we'll skip th... | false | false | false | false | false | 0 |
status_print_stdout(char *percent)
{
unsigned int time = status_get_time();
char *key;
char s_pps[32], s_p[32];
key = NULL;
if (!(options.flags & FLG_STATUS_CHK) &&
(status.cands.lo | status.cands.hi))
key = crk_get_key1();
fprintf(stderr,
"%sp %u:%02u:%02u:%02u%s %sp/s%s%s\n",
status_get_c(s_p... | true | true | false | false | false | 1 |
_output_time (ipmi_sel_parse_ctx_t ctx,
struct ipmi_sel_parse_entry *sel_parse_entry,
uint8_t sel_record_type,
char *buf,
unsigned int buflen,
unsigned int flags,
unsigned int *wlen)
{
char tmpbuf[SEL_PARSE_BUFFER_LENGTH];
uint32_t ... | true | true | false | false | false | 1 |
setElementIdsAndTags(int nof_ids, int* bndr_ids, int* bndr_tags)
{
delete[] elementIds;
delete[] elementTags;
nofElements = nof_ids;
elementIds = new int[nofElements];
elementTags = new int[nofElements];
for (int i = 0; i < nofElements; i++) {
elementIds[i] = bndr_ids[i];
elementTags[i] = bndr_ta... | false | false | false | false | false | 0 |
decrement_buffer_pointer(OUTPUTHISTORY *h, z_ucs *ptr, bool *has_wrapped)
{
if (
(ptr == h->z_history_buffer_back_index)
&&
(ptr == h->z_history_buffer_front_index)
&&
(*has_wrapped == true)
)
{
TRACE_LOG("History index already at buffer back.\n");
return NULL;
}
ptr... | false | false | false | false | false | 0 |
get_delta_base(struct packed_git *p,
struct pack_window **w_curs,
off_t *curpos,
enum object_type type,
off_t delta_obj_offset)
{
unsigned char *base_info = use_pack(p, w_curs, *curpos, NULL);
off_t base_offset;
/* use_pack() assured us we have [base_info, base_info + 20)
* as a ra... | false | false | false | false | false | 0 |
ab3100_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)
{
time64_t time;
u64 hw_counter;
u8 buf[6];
u8 rtcval;
int err;
/* Figure out if alarm is enabled or not */
err = abx500_get_register_interruptible(dev, 0,
AB3100_RTC, &rtcval);
if (err)
return err;
if (rtcval & 0x04)
alarm->enabled... | false | false | false | false | false | 0 |
acct_isolated(struct zone *zone, struct compact_control *cc)
{
struct page *page;
unsigned int count[2] = { 0, };
if (list_empty(&cc->migratepages))
return;
list_for_each_entry(page, &cc->migratepages, lru)
count[!!page_is_file_cache(page)]++;
mod_zone_page_state(zone, NR_ISOLATED_ANON, count[0]);
mod_zone... | false | false | false | false | false | 0 |
BitArray_get(BitArray *ba, guint64 start, guchar width){
register gint64 word = start / CHAR_BIT,
data = 0;
register guchar todo = width,
bit = start & (CHAR_BIT-1),
taken = CHAR_BIT-bit,
done = 0;
do {
if(taken >= todo)... | false | false | false | false | false | 0 |
AlignRight()
{
for (u32 i = 0; i < numFrames; ++i)
{
frames[i]->Pos((s32)(wMax - ((JImage*)frames[i])->Width()), (s32)frames[i]->Y());
}
} | false | false | false | false | false | 0 |
ftglue_free( FT_Memory memory,
FT_Pointer block )
{
if ( block )
memory->free( memory, block );
} | false | true | false | false | true | 1 |
sanei_udp_open(const char *host, int port, int *fdp)
{
int status;
#ifdef HAVE_WINSOCK2_H
WSADATA wsaData;
#endif
DBG_INIT();
DBG(1, "%s\n", __func__);
#ifdef HAVE_WINSOCK2_H
status = WSAStartup(MAKEWORD(2, 2), &wsaData);
if (status != 0)
return SANE_STATUS_INVAL;
#endif
status = sanei_udp_socket(fdp, 0)... | false | false | false | false | false | 0 |
is_boolean_env_set (const char *variable)
{
char *val = getenv (variable);
CoglBool ret;
if (!val)
return FALSE;
if (g_ascii_strcasecmp (val, "1") == 0 ||
g_ascii_strcasecmp (val, "on") == 0 ||
g_ascii_strcasecmp (val, "true") == 0)
ret = TRUE;
else if (g_ascii_strcasecmp (val, "0") == 0... | false | false | false | false | true | 1 |
reshPackBufferCreate(char **packBuffer, int *packBufferSize, void *context)
{
int i, packBufferPos = 0;
int start = START, end = END, sep = SEPARATOR, type;
listElem_t * curr;
xassert ( packBuffer );
LIST_LOCK();
int nsp = namespaceGetActive ();
int pBSize = *packBufferSize = getPackBufferSize(context... | false | false | false | false | false | 0 |
Execute()
{
TRACE(_T("ParserThreadedTask::Execute(): Enter"));
if (!m_Parser) return 0;
CC_LOCKER_TRACK_P_MTX_LOCK(m_ParserMutex)
wxString preDefs(m_Parser->m_PredefinedMacros);
StringList priorityHeaders(m_Parser->m_PriorityHeaders);
StringList batchFiles(m_Parser->m_BatchParseFiles);
... | false | false | false | false | false | 0 |
tanfwd(phi, theta, prj, x, y)
const double phi, theta;
struct prjprm *prj;
double *x, *y;
{
double r, s;
if (abs(prj->flag) != PRJSET) {
if(vimostanset(prj)) return 1;
}
s = sindeg (theta);
if (s <= 0.0) {
return 2;
}
r = prj->r0*cosdeg (theta)/s;
*x = r*sindeg (phi);
*y = ... | false | false | false | false | false | 0 |
APar_IdentifyBrand(char* file_brand ) {
brand = UInt32FromBigEndian(file_brand);
switch (brand) {
//what ISN'T supported
case 0x71742020 : //'qt ' --this is listed at mp4ra, but there are features of the file that aren't supported (like the 4 NULL bytes after the last udta child atom
fprintf(stdout, "AtomicP... | false | false | false | false | false | 0 |
unlock()
{
omni_thread* me = omni_thread::self();
OMNIORB_ASSERT(me); // Can only be used by threads with an omni_thread
omni_mutex_lock sync(pd_lock);
OMNIORB_ASSERT(pd_holder == me);
if (--pd_depth == 0) {
pd_holder = 0;
pd_cond.signal();
if (pd_dummy) {
omniORB::logs(15, "Release dumm... | false | false | false | false | false | 0 |
Jim_ScanString(Jim_Interp *interp, Jim_Obj *strObjPtr, Jim_Obj *fmtObjPtr, int flags)
{
size_t i, pos;
int scanned = 1;
const char *str = Jim_String(strObjPtr);
int strLen = Jim_Utf8Length(interp, strObjPtr);
Jim_Obj *resultList = 0;
Jim_Obj **resultVec = 0;
int resultc;
Jim_Obj *emptySt... | false | false | false | true | false | 1 |
sign_bit_p (tree exp, tree val)
{
unsigned HOST_WIDE_INT mask_lo, lo;
HOST_WIDE_INT mask_hi, hi;
int width;
tree t;
/* Tree EXP must have an integral type. */
t = TREE_TYPE (exp);
if (! INTEGRAL_TYPE_P (t))
return NULL_TREE;
/* Tree VAL must be an integer constant. */
if (TREE_CODE (val) != IN... | false | false | false | false | false | 0 |
printstats (const char *direction, unsigned long amount)
{
double delta;
/* compute delta in 1/10's second units */
delta = ((tstop.tv_sec * 10.) + (tstop.tv_usec / 100000)) -
((tstart.tv_sec * 10.) + (tstart.tv_usec / 100000));
delta = delta / 10.; /* back to seconds */
printf ("%s %d bytes in %.1f sec... | false | false | false | false | false | 0 |
setGCValues(MSDisplayServer * server_, MSBoolean shared_,
XGCValues *values_,unsigned long mask_)
{
_server = server_;
if (shared_ == MSTrue) setData(values_, mask_);
else
{
MSGUARD(_msgcHashTableMutex);
create(MSFalse, values_, mask_);
}
} | false | false | false | false | false | 0 |
spawnDiamond(int color)
{
Diamond* diamond = new Diamond((KDiamond::Color) color, m_renderer, this);
connect(diamond, SIGNAL(clicked()), SLOT(slotClicked()));
connect(diamond, SIGNAL(dragged(QPoint)), SLOT(slotDragged(QPoint)));
return diamond;
} | false | false | false | false | false | 0 |
DumpMem(const void *buff, int n, const wxString& msg, bool ok)
{
printf("%s\n", (const char*)unicode2char(DumpMemToStr( buff, n, msg, ok )) );
} | false | false | false | false | false | 0 |
toElement(JSValue *v)
{
DOM::NodeImpl* node = toNode(v);
if (node && node->isElementNode())
return static_cast<DOM::ElementImpl*>(node);
return 0;
} | false | false | false | false | false | 0 |
fetch_extra_DBs(int sd, char *palm_dbname[])
{
int cardno, start;
struct DBInfo info;
int dbIndex;
pi_buffer_t *buffer;
jp_logf(JP_LOG_DEBUG, "fetch_extra_DBs()\n");
start=cardno=0;
buffer = pi_buffer_new(32 * sizeof(struct DBInfo));
/* Pilot-link 0.12 can return multiple db infos if the DLP... | false | false | false | false | false | 0 |
ftdi_NDI_device_setup(struct usb_serial *serial)
{
struct usb_device *udev = serial->dev;
int latency = ndi_latency_timer;
if (latency == 0)
latency = 1;
if (latency > 99)
latency = 99;
dev_dbg(&udev->dev, "%s setting NDI device latency to %d\n", __func__, latency);
dev_info(&udev->dev, "NDI device with a l... | false | false | false | false | false | 0 |
krb5_chpw_result_code_string(krb5_context context, int result_code,
char **code_string)
{
switch (result_code) {
case KRB5_KPASSWD_MALFORMED:
*code_string = _("Malformed request error");
break;
case KRB5_KPASSWD_HARDERROR:
*code_string = _("Server error")... | false | false | false | false | false | 0 |
HU_Ticker(void)
{
int i, rc;
char c;
//char *prefix; STRIFE-TODO
// tick down message counter if message is up
if (message_counter && !--message_counter)
{
message_on = false;
message_nottobefuckedwith = false;
}
// haleyjd 20110219: [STRIFE] this condition was removed... | true | true | false | false | false | 1 |
_xmmsv_list_move (xmmsv_list_t *l, int old_pos, int new_pos)
{
xmmsv_t *v;
xmmsv_list_iter_t *it;
x_list_t *n;
if (!absolutify_and_validate_pos (&old_pos, l->size, 0)) {
return 0;
}
if (!absolutify_and_validate_pos (&new_pos, l->size, 0)) {
return 0;
}
v = l->list[old_pos];
if (old_pos < new_pos) {
mem... | false | false | false | false | false | 0 |
gdata_download_stream_get_content_length (GDataDownloadStream *self)
{
gssize content_length;
g_return_val_if_fail (GDATA_IS_DOWNLOAD_STREAM (self), -1);
g_mutex_lock (&(self->priv->content_mutex));
content_length = self->priv->content_length;
g_mutex_unlock (&(self->priv->content_mutex));
g_assert (content_le... | false | false | false | false | false | 0 |
gdl_dock_layout_load_from_file (GdlDockLayout *layout,
const gchar *filename)
{
gboolean retval = FALSE;
if (layout->priv->doc) {
xmlFreeDoc (layout->priv->doc);
layout->priv->doc = NULL;
layout->priv->dirty = FALSE;
g_object_notify (G_OBJECT (l... | false | false | false | false | false | 0 |
SkipFreeForward(struct HeapIterator *it)
{
size_t idx = it->BlockNumber * CHUNK_SIZE + it->BlockPosition;
size_t start = idx;
ListElement *le;
char *p;
p = it->Heap->Heap[it->BlockNumber];
p += it->BlockPosition*it->Heap->ElementSize;
le = (ListElement *)p;
while (le->Next == INVALID_P... | false | false | false | false | false | 0 |
find_long_option( ARGPARSE_ARGS *arg,
ARGPARSE_OPTS *opts, const char *keyword )
{
int i;
size_t n;
(void)arg;
/* Would be better if we can do a binary search, but it is not
possible to reorder our option table because we would mess
up our help strings - What we can do is: Build a ni... | false | false | false | false | false | 0 |
da_tag_max_key_ghfunc(gpointer key, Tag *item, guint32 *max_key)
{
*max_key = MAX(*max_key, item->key);
} | false | false | false | false | false | 0 |
DualPipe_GetExitCode(_DualPipe * dp)
{
#if !defined(__WIN32__)
if(!dp->gotExitCode)
{
int status = 0;
waitpid(dp->pid, &status, 0);
dp->exitCode = WEXITSTATUS(status);
dp->gotExitCode = true;
}
/*#if defined(__linux__)
// Until we support this _extension_ syntax: (moved this to... | false | false | false | false | false | 0 |
imProcessGrayMorphClose(const imImage* src_image, imImage* dst_image, int kernel_size)
{
imImage*temp = imImageClone(src_image);
if (!temp)
return 0;
if (!imProcessGrayMorphDilate(src_image, temp, kernel_size))
{imImageDestroy(temp); return 0;}
if (!imProcessGrayMorphErode(temp, dst_image, kernel_size... | false | false | false | false | false | 0 |
setacl( const char *n, const char *subject, const char *rights )
{
pfs_name pname;
int result = -1;
if(resolve_name(n,&pname)) {
result = pname.service->setacl(&pname,subject,rights);
}
return result;
} | false | false | false | false | false | 0 |
ieee_output_pending_parms (struct ieee_handle *info)
{
struct ieee_pending_parm *m;
unsigned int refcount;
refcount = 0;
for (m = info->pending_parms; m != NULL; m = m->next)
{
enum debug_var_kind vkind;
switch (m->kind)
{
default:
abort ();
return FALSE;
case DEBUG_PARM_STACK:
case ... | false | false | false | false | false | 0 |
image_put_and_destroy (Display* dpy, Drawable drawable, GC gcontext,
XImage* im, int src_x, int src_y,
int x, int y, unsigned int w, unsigned int h)
{
begin_x_call();
XPutImage (dpy, drawable, gcontext, im, src_x, src_y, x,y,w,h);
XDestroyImage... | false | false | false | false | false | 0 |
canvas_handle_none_release (Canvas* self, GdkEventButton* event) {
gboolean result = FALSE;
gint x = 0;
gint y = 0;
gint w = 0;
gint h = 0;
gint _tmp0_;
gint _tmp1_;
GdkWindow* _tmp2_ = NULL;
gint _tmp3_;
GdkWindow* _tmp4_ = NULL;
gint _tmp5_;
gboolean _tmp6_ = FALSE;
gint _tmp7_;
g_return_val_if_fail (se... | false | false | false | false | false | 0 |
list_project_history(change_identifier &cid, string_list_ty *)
{
output::pointer name_col;
output::pointer delta_col;
output::pointer date_col;
output::pointer change_col;
output::pointer description_col;
size_t j, k;
string_ty *line1;
int left;
trace(("li... | false | false | false | false | false | 0 |
prism2_hostapd_set_flags_sta(struct ap_data *ap,
struct prism2_hostapd_param *param)
{
struct sta_info *sta;
spin_lock_bh(&ap->sta_table_lock);
sta = ap_get_sta(ap, param->sta_addr);
if (sta) {
sta->flags |= param->u.set_flags_sta.flags_or;
sta->flags &= param->u.set_flags_sta.flags_and;
}
spin_unlock_b... | 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.