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
ldap_bind_with_timeout(void* arg_) { ldap_bind_arg* arg = (ldap_bind_arg* ) arg_; int ldresult = 0; if (arg->anonymous) { BerValue cred = { 0, (char*)"" }; ldresult = ldap_sasl_bind_s (arg->connection, NULL, LDAP_SASL_SIMPLE, &cred, NULL, NULL, NULL); } ...
false
false
false
false
false
0
updateFont(GfxState *state) { cairo_font_face_t *font_face; cairo_matrix_t matrix, invert_matrix; LOG(printf ("updateFont() font=%s\n", state->getFont()->getName()->getCString())); needFontUpdate = gFalse; //FIXME: use cairo font engine? if (text) text->updateFont(state); currentFont = fontEngin...
false
false
false
false
false
0
loadvars(const char* filename, std::map< std::string, std::string >& vars) { std::string line, var, val; std::ifstream f(filename); if (!f.is_open()) { std::cout << "Failed to open " << filename << std::endl; return true; } vars.clear(); while (std::getline(f, line)) { std::string::iterator it(line.begin(...
false
false
false
false
false
0
dwc3_send_gadget_generic_command(struct dwc3 *dwc, unsigned cmd, u32 param) { u32 timeout = 500; u32 reg; trace_dwc3_gadget_generic_cmd(cmd, param); dwc3_writel(dwc->regs, DWC3_DGCMDPAR, param); dwc3_writel(dwc->regs, DWC3_DGCMD, cmd | DWC3_DGCMD_CMDACT); do { reg = dwc3_readl(dwc->regs, DWC3_DGCMD); if ...
false
false
false
false
false
0
gst_mxf_demux_sink_activate (GstPad * sinkpad, GstObject * parent) { GstQuery *query; GstPadMode mode = GST_PAD_MODE_PUSH; query = gst_query_new_scheduling (); if (gst_pad_peer_query (sinkpad, query)) { if (gst_query_has_scheduling_mode_with_flags (query, GST_PAD_MODE_PULL, GST_SCHEDULING_FLAG...
false
false
false
false
false
0
istgt_destroy_uctl_portal(ISTGT_Ptr istgt) { int i; ISTGT_TRACELOG(ISTGT_TRACE_DEBUG, "istgt_destroy_uctl_portal\n"); for (i = 0; i < istgt->nportal; i++) { xfree(istgt->uctl_portal[i].label); xfree(istgt->uctl_portal[i].host); xfree(istgt->uctl_portal[i].port); istgt->uctl_portal[i].label = NULL; istgt-...
false
false
false
false
false
0
rb_econv_decorate_at_first(rb_econv_t *ec, const char *decorator_name) { const rb_transcoder *tr; if (ec->num_trans == 0) return rb_econv_decorate_at(ec, decorator_name, 0); tr = ec->elems[0].tc->transcoder; if (!DECORATOR_P(tr->src_encoding, tr->dst_encoding) && tr->asciicompat_type ...
false
false
false
false
false
0
xml_print_pwr_wghfreq_stats(struct activity *a, int curr, int tab, unsigned long long itv) { int i, k; struct stats_pwr_wghfreq *spc, *spp, *spc_k, *spp_k; unsigned long long tis, tisfreq; char cpuno[8]; if (!IS_SELECTED(a->options) || (a->nr <= 0)) goto close_xml_markup; xml_markup_power_management(...
true
true
false
false
false
1
COLOR_WRITE (int hpos, uae_u16 v, int num) { bool colzero = false; v &= 0xFFF; #ifdef AGA if (currprefs.chipset_mask & CSMASK_AGA) { int r,g,b; int cr,cg,cb; int colreg; uae_u32 cval; /* writing is disabled when RDRAM=1 */ if (bplcon2 & 0x0100) return; colreg = ((bplcon3 >> 13) & 7) * 32 + num; ...
false
false
false
false
false
0
btmrvl_download_cal_data(struct btmrvl_private *priv, u8 *data, int len) { int ret; data[0] = 0x00; data[1] = 0x00; data[2] = 0x00; data[3] = len; print_hex_dump_bytes("Calibration data: ", DUMP_PREFIX_OFFSET, data, BT_CAL_HDR_LEN + len); ret = btmrvl_send_sync_cmd(priv, BT_CMD_LOAD_CONFIG_DAT...
false
false
false
false
false
0
IsDefault( key, val ) int key; char *val; { if( assoc[ key ].defl == val ) return( TRUE ); return( (strcmp( assoc[ key ].defl, val ) == 0) ? TRUE : FALSE ); }
false
false
false
false
false
0
single_scalar_parameter(exec_list *parameters) { const ir_rvalue *const p = (ir_rvalue *) parameters->head; assert(((ir_rvalue *)p)->as_rvalue() != NULL); return (p->type->is_scalar() && p->next->is_tail_sentinel()); }
false
false
false
false
false
0
set_time_out(CURL *handle, int* errorCode) { int error; long time_out = DEFAULT_CONNECTION_TIMEOUT; const char *stime_out; stime_out = getenv("DARCS_CONNECTION_TIMEOUT"); if (stime_out != NULL){ long result = atol (stime_out); if ( result > 0 ) time_out = result; else *errorCode = 90 ...
false
false
false
false
true
1
Term_xtra_sdl_event(int v) { SDL_Event event; errr error = 0; /* Wait for an event */ if (v) { /* Wait in 0.02s increments while updating animations every 0.2s */ int i = 0; while (!SDL_PollEvent(&event)) { if (i == 0) idle_update(); usleep(20000); i = (i + 1) % 10; } /* Handle it */ erro...
false
false
false
false
false
0
HandleRecallCommand(char* args) { Player* target; if (!ExtractPlayerTarget(&args, &target)) { return false; } // check online security if (HasLowerSecurity(target)) { return false; } if (target->IsBeingTeleported()) { PSendSysMessage(LANG_IS_TELEPORTED, GetNameLink(targ...
false
false
false
false
false
0
init_mirror_plane( int i, int j ) { SYMMETRY_ELEMENT * plane = alloc_symmetry_element() ; double dx[ DIMENSION ], midpoint[ DIMENSION ], rab, r ; int k ; if( verbose > 0 ) printf( "Trying mirror plane for atoms %d,%d\n", i, j ) ; StatTotal++ ; plane->t...
false
false
false
false
false
0
match(const char* endpoint) { if (strncmp(endpoint,"giop:unix",9) == 0) { // local transport. Does this rule apply to this host's // IP address(es)? const omnivector<const char*>* ifaddrs; ifaddrs = giopTransportImpl::getInterfaceAddress("giop:tcp"); if (!ifaddrs) return 0; {...
false
false
false
false
false
0
focusblur_fft_buffer_draw (FblurFftBuffer *fft) { GimpDrawablePreview *preview; gboolean dirty; guint8 *data; GimpPixelRgn pr; if (! fft->source.preview) { preview = NULL; dirty = TRUE; data = fft->source.data; } else { preview = GIMP_DRA...
false
false
false
false
false
0
addVObjectProp(VObject *o, VObject *p) { /* circular link list pointed to tail */ /* o {next,id,prop,val} V pn {next,id,prop,val} V ... p1 {next,id,prop,val} V pn --> o {next,id,prop,val} V pn {next,id,prop,val} V ...
false
false
false
false
false
0
parse_file(const char *filename, LineParser parser, GHashTable *dict) { FILE *f; char *line = NULL; size_t size = 0; f = fopen(filename, "r"); if(!f) { g_warning("Cannot open '%s'", filename); return; } /* skip the first line */ if (getline(&line, &size, f) == -1) goto eof; while (getline(&line, &si...
false
false
false
false
true
1
GetBoundingBox(const ClipperLib::Polygon& poly) { IfcVector2 newbb_min, newbb_max; MinMaxChooser<IfcVector2>()(newbb_min, newbb_max); BOOST_FOREACH(const ClipperLib::IntPoint& point, poly) { IfcVector2 vv = IfcVector2( from_int64(point.X), from_int64(point.Y)); // sanity rounding vv = std::max(vv,IfcVector2(...
false
false
false
false
false
0
ai_update_goal_references(ai_goal *goals, int type, const char *old_name, const char *new_name) { int i, mode, flag, dummy; for (i=0; i<MAX_AI_GOALS; i++) // loop through all the goals in the Ai_info entry { mode = goals[i].ai_mode; flag = 0; switch (type) { case REF_TYPE_SHIP: case REF_TYPE_PLAYER: ...
false
false
false
false
false
0
deref_tag(struct object *o, const char *warn, int warnlen) { while (o && o->type == OBJ_TAG) if (((struct tag *)o)->tagged) o = parse_object(((struct tag *)o)->tagged->sha1); else o = NULL; if (!o && warn) { if (!warnlen) warnlen = strlen(warn); error("missing object referenced by '%.*s'", warnlen, w...
false
false
false
false
false
0
compileRegex (const char* const regexp, const char* const flags) { int cflags = REG_EXTENDED | REG_NEWLINE; regex_t *result = NULL; int errcode; int i; for (i = 0 ; flags != NULL && flags [i] != '\0' ; ++i) { switch ((int) flags [i]) { case 'b': cflags &= ~REG_EXTENDED; break; case 'e': cflags |= R...
false
false
false
false
false
0
check_tcl_pub(char *nick, char *from, char *chname, char *msg) { struct flag_record fr = { FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0 }; int x; char buf[512], *args = buf, *cmd, host[161], *hand; struct userrec *u; strcpy(args, msg); cmd = newsplit(&args); simple_sprintf(host, "%s!%s", nick, from); u = get_use...
true
true
false
false
false
1
csio_ln_fdmi_start(struct csio_lnode *ln, void *context) { struct csio_ioreq *fdmi_req; struct csio_rnode *fdmi_rn = (struct csio_rnode *)context; void *cmd; struct fc_fdmi_hba_identifier *hbaid; uint32_t len; if (!(ln->flags & CSIO_LNF_FDMI_ENABLE)) return -EPROTONOSUPPORT; if (!csio_is_rnode_ready(fdmi_rn)...
false
false
false
false
false
0
sp_client_open (const char *path) { ShmPipe *self = spalloc_new (ShmPipe); struct sockaddr_un sock_un; int flags; memset (self, 0, sizeof (ShmPipe)); self->main_socket = socket (PF_UNIX, SOCK_STREAM, 0); self->use_count = 1; if (self->main_socket < 0) goto error; flags = fcntl (self->main_socket...
false
true
false
false
false
1
fp_montgomery_reduce(fp_int *a, fp_int *m, fp_digit mp) { fp_digit c[FP_SIZE], *_c, *tmpm, mu; int oldused, x, y, pa; /* bail if too large */ if (m->used > (FP_SIZE/2)) { return; } #ifdef TFM_SMALL_MONT_SET if (m->used <= 16) { fp_montgomery_reduce_small(a, m, mp); return; ...
false
false
false
false
true
1
unlock_common(const char * filename, int fd) { /* SEB */ #ifdef WIN32 if (fd != -1) { lseek( fd, 0L, SEEK_SET ); _locking( fd, _LK_UNLCK, LONG_MAX); } return 0; #else char lockfilename[PATH_MAX]; #ifndef HAVE_LIBLOCKFILE struct flock lock; int r; #endif if (strlen(filename) + 6 > PATH_MAX) ...
true
true
false
false
false
1
draw_dot() { char* vgaBufPtr = vga_back.buf_ptr(); char* writePtr; Tornado* tornadoPtr; int i, mapX, mapY; int vgaBufPitch = vga_back.buf_pitch(); for(i=1; i <=size() ; i++) { tornadoPtr = (Tornado*)get_ptr(i); if( !tornadoPtr ) continue; mapX = MAP_X1 + tornadoPtr->cur_x_loc(); mapY = MAP_Y...
false
false
false
false
true
1
stat2links(char *str, nlink_t nlink) { if (nlink <= 999) sprintf(str,"%3d",(int)nlink); else strcpy(str,"max"); }
false
false
false
false
false
0
gui_pd_new(GSList *list, gint active, gpointer callback, gpointer argument) { GSList *item; GtkTreeModel *treemodel; GtkTreePath *treepath; GtkTreeIter iter; GtkWidget *w = NULL; #if GTK_MAJOR_VERSION >= 2 && GTK_MINOR_VERSION >= 4 /* build the widget and associated drop down list */ w = gtk_combo_box_new_text(); for ...
false
false
false
false
false
0
netlink_parse_link(struct nlmsghdr *msg, struct interfaces_device *iff) { struct ifinfomsg *ifi; struct rtattr *attribute; int len; ifi = NLMSG_DATA(msg); len = msg->nlmsg_len - NLMSG_LENGTH(sizeof(struct ifinfomsg)); if (!((ifi->ifi_flags & IFF_UP) && (ifi->ifi_flags & IFF_RUNNING))) { ...
false
true
false
false
false
1
qla2x00_write_i2c(struct fc_bsg_job *bsg_job) { struct Scsi_Host *host = bsg_job->shost; scsi_qla_host_t *vha = shost_priv(host); struct qla_hw_data *ha = vha->hw; int rval = 0; uint8_t bsg[DMA_POOL_SIZE]; struct qla_i2c_access *i2c = (void *)bsg; dma_addr_t sfp_dma; uint8_t *sfp = dma_pool_alloc(ha->s_dma_pool...
false
true
false
false
false
1
vt_user_recv(uint32_t tid, uint64_t* time, uint32_t cid, uint32_t tag, uint32_t recvd) { char comid_comment[128]; GET_THREAD_ID(tid); if (VTTHRD_TRACE_STATUS(VTThrdv[tid]) != VT_TRACE_ON) return; snprintf(comid_comment, sizeof(comid_comment) - 1, VT_UNIFY_STRID_USRCOM_RECV_COMMEN...
false
false
false
false
false
0
draw3DRect(int x, int y, int w, int h, bool raised) { YColor *back(color()); YColor *bright(back->brighter()); YColor *dark(back->darker()); YColor *t(raised ? bright : dark); YColor *b(raised ? dark : bright); setColor(t); drawLine(x, y, x + w, y); drawLine(x, y, x, y + h); setColo...
false
false
false
false
false
0
Read_If_Global(int initializer) { if (Scanner() != IDENTIFIER) goto err; if (strcmp(str_val, "local") == 0) return 0; if (strcmp(str_val, "global") == 0) return 1; if (initializer && strcmp(str_val, "initializer") == 0) return 2; err: if (!initializer) Syntax_Error("local / global expe...
false
false
false
false
false
0
get_parameter(int param) const { if (param > 0 && param <= static_cast<int>(impl_repp->slave_param_objects_rep.size())) { DBC_CHECK(static_cast<int>(impl_repp->slave_param_indices_rep.size()) > param - 1); if (impl_repp->slave_param_indices_rep[param - 1].size() > 0) { int index = impl_repp->slave_para...
false
false
false
false
false
0
process_opt(int ch, char *optarg) { char *endp; long val; switch (ch) { case 'z': read_ibdiag_config(optarg); break; case 'h': ibdiag_show_usage(); break; case 'V': fprintf(stderr, "%s %s\n", prog_name, get_build_version()); exit(0); case 'e': madrpc_show_errors(1); break; case 'v': ibverbose...
false
false
false
false
true
1
rhk_sm4_page_to_graph_model(const RHKPage *page) { GwyGraphModel *gmodel; GwyGraphCurveModel *gcmodel; GwySIUnit *siunit; const gint32 *pdata; const gchar *name; gint res, ncurves, i, j; gdouble *xdata, *ydata; res = page->x_size; ncurves = page->y_size; gmodel = gwy_graph_mode...
false
false
false
false
false
0
mwifiex_usb_submit_rem_rx_urbs(struct mwifiex_adapter *adapter) { struct usb_card_rec *card = (struct usb_card_rec *)adapter->card; int i; struct urb_context *ctx; for (i = 0; i < MWIFIEX_RX_DATA_URB; i++) { if (card->rx_data_list[i].skb) continue; ctx = &card->rx_data_list[i]; mwifiex_usb_submit_rx_urb(c...
false
false
false
false
false
0
_config_file_k_g (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { struct cmd_args_config *cmd_ar...
false
false
false
false
false
0
acdPrettyClose(void) { ajint *icword = NULL; ajint *icpos = NULL; AjPStr cmtstr = NULL; if(!acdDoPretty) return; if(!acdPrettyFName) { if(acdStdout) acdPrettyFile = ajFileNewFromCfile(stdout); else { ajFmtPrintS(&acdPrettyFName, "%S.acdpretty", acdProgram); acdPrettyFi...
false
false
false
false
false
0
templateParameters(const Token *tok) { unsigned int numberOfParameters = 1; if (!tok) return 0; if (tok->str() != "<") return 0; tok = tok->next(); unsigned int level = 0; while (tok) { // skip const if (tok->str() == "const") tok = tok->next(); ...
false
false
false
false
false
0
free_config(void) { struct values *value; if (db) { sqlite3_close(db); db = NULL; } if (columns) { ast_free(columns); columns = NULL; } while ((value = AST_LIST_REMOVE_HEAD(&sql_values, list))) { ast_free(value); } }
false
false
false
false
false
0
requestDictionaryData(const QString& language) { if (!m_dictionaries.contains(language)) { DictionaryData* dictionary = new DictionaryData(m_broker, language); dictionary->addToSession(m_personal); m_dictionaries[language] = dictionary; } return &m_dictionaries[language]; }
false
false
false
false
false
0
tpacpi_check_outdated_fw(void) { unsigned long fwvers; u16 ec_version, bios_version; fwvers = tpacpi_check_quirks(tpacpi_bios_version_qtable, ARRAY_SIZE(tpacpi_bios_version_qtable)); if (!fwvers) return; bios_version = fwvers & 0xffffU; ec_version = (fwvers >> 16) & 0xffffU; /* note that unknown versio...
false
false
false
false
false
0
MIIDelay (void) { int i; for (i = 0; i < 0x7fff; i++) { ( void ) inb (0x61); ( void ) inb (0x61); ( void ) inb (0x61); ( void ) inb (0x61); } }
false
false
false
false
false
0
handle_luainit (void) { const char *init = getenv("LUA_INIT"); if (init == NULL) return 0; /* status OK */ else if (init[0] == '@') return file_input(init+1); else return dostring(init, "=LUA_INIT"); }
false
false
false
false
true
1
arrayTypeString() const { if (arrayType != Array) return QtSoapType::typeToName(arrayType); QString atString; QtSoapArray *ar = const_cast<QtSoapArray *>(this); do { if (ar->count() == 0) break; atString += ar->arraySizeString(); QtSoapArrayIterator it(*const_cast<QtSoapArray *>(this)); if ...
false
false
false
false
false
0
IsItemVisible(Item *temp) { if ((!ShowCurrentDesk || temp->desk == CurrentDesk || IS_STICKY_ACROSS_DESKS(temp)) && (!DO_SKIP_WINDOW_LIST(temp) || !UseSkipList)) return 1; else return 0; }
false
false
false
false
false
0
hsh_testmagic(void *result) { int i, j; static int nused = 0; for (i = 0; i < nused; i++) if (!memcmp(hsh_magiclist[i].was, result, SHA256_LEN)) break; if (i == nused && i < HSH_NMAGIC) memcpy(hsh_magiclist[nused++].was, result, SHA256_LEN); if (i == nused) return; assert(i < HSH_NMAGIC); fprintf(stder...
false
false
false
false
false
0
infinoted_directory_sync_session_stop(InfinotedDirectorySync* dsync, InfinotedDirectorySyncSession* session) { InfIo* io; io = infd_directory_get_io(dsync->directory); g_assert(session->timeout != NULL); inf_io_remove_timeout(io, session->timeout); session->timeout = NU...
false
false
false
false
false
0
get_firmware(struct av7110* av7110) { int ret; const struct firmware *fw; /* request the av7110 firmware, this will block until someone uploads it */ ret = request_firmware(&fw, "dvb-ttpci-01.fw", &av7110->dev->pci->dev); if (ret) { if (ret == -ENOENT) { printk(KERN_ERR "dvb-ttpci: could not load firmware," ...
false
true
false
false
false
1
gst_audio_iec61937_frame_size (const GstRingBufferSpec * spec) { switch (spec->type) { case GST_BUFTYPE_AC3: return IEC61937_PAYLOAD_SIZE_AC3; case GST_BUFTYPE_EAC3: /* Check that the parser supports /some/ alignment. Need to be less * strict about this at checking time since the alignment...
false
false
false
false
true
1
L (int n) { Graph *g; Edge *e; Graph::v_const_iterator vit1, vit2; int i; g = grid (2, n); // vit1 follows the top row, vit2 follows the bottom row vit1 = g->v_begin (); for (vit2 = vit1, i = 0; i < n; ++i) ++vit2; for (i = 0; i < n; ++i, ++vit1, ++vit2) { e = new Edge (*vit1, *vit2); g->add (e); } ...
false
false
false
false
false
0
WriteCellsAppendedData(vtkCellArray* cells, vtkDataArray* types, vtkIdTypeArray* faces, vtkIdTypeArray* faceOffsets, ...
false
false
false
false
false
0
process_unread_mails(hybrid_imap *imap, gint unread) { if (imap->unread == unread || unread == 0) { if (unread == 0) { imap->unread = 0; } return; } #ifdef USE_LIBNOTIFY gchar *summary; GdkPixbuf *pixbuf; const gchar *title = _("New Mail."); NotifyNot...
false
false
false
false
false
0
printZcoded( const char *raw ) { nat j = 0; while ( raw[j] != '\0' ) { if (raw[j] == 'Z') { debugBelch("%c", unZcode(raw[j+1])); j = j + 2; } else { debugBelch("%c", unZcode(raw[j+1])); j = j + 1; } } }
false
false
false
false
false
0
RSA_EncryptOAEP(RSAPublicKey * key, HASH_HashType hashAlg, HASH_HashType maskHashAlg, const unsigned char * label, unsigned int labelLen, const unsigned char * seed, unsigned int seedLen, unsigned char * outp...
false
false
false
false
false
0
update_buffer(halftone_screen *halftone, XWindowAttributes * attrs) { if (halftone->buffer_width != attrs->width || halftone->buffer_height != attrs->height) { XGCValues gc_values; if (halftone->buffer_width != -1 && halftone->buffer_height != -1) { if (halftone->buffer != halftone->window...
false
false
false
false
false
0
setstropt_userpwd(char *option, char **userp, char **passwdp) { CURLcode result = CURLE_OK; char *user = NULL; char *passwd = NULL; /* Parse the login details if specified. It not then we treat NULL as a hint to clear the existing data */ if(option) { result = parse_login_details(option, strlen(opti...
false
false
false
false
false
0
pixAdaptThresholdToBinaryGen(PIX *pixs, PIX *pixm, l_float32 gamma, l_int32 blackval, l_int32 whiteval, l_int32 thresh) { PIX *pix1, *pixd; PROCNAM...
false
false
false
false
false
0
lpfc_rcv_prlo_npr_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, void *arg, uint32_t evt) { struct Scsi_Host *shost = lpfc_shost_from_vport(vport); struct lpfc_iocbq *cmdiocb = (struct lpfc_iocbq *) arg; spin_lock_irq(shost->host_lock); ndlp->nlp_flag |= NLP_LOGO_ACC; spin_unlock_irq(shost->h...
false
false
false
false
false
0
ata_scsi_error(struct Scsi_Host *host) { struct ata_port *ap = ata_shost_to_port(host); unsigned long flags; LIST_HEAD(eh_work_q); DPRINTK("ENTER\n"); spin_lock_irqsave(host->host_lock, flags); list_splice_init(&host->eh_cmd_q, &eh_work_q); spin_unlock_irqrestore(host->host_lock, flags); ata_scsi_cmd_error_h...
false
false
false
false
false
0
move_dir(piece_info_t *obj) { loc_t loc; int dir; dir = MOVE_DIR (obj->func); loc = obj->loc + dir_offset[dir]; if (good_loc (obj, loc)) move_obj (obj, loc); }
false
false
false
false
false
0
ComputeRowAMaxImpl(Vector& rows_norms, bool init) const { DenseVector* dense_vec = static_cast<DenseVector*>(&rows_norms); DBG_ASSERT(dynamic_cast<DenseVector*>(&rows_norms)); Number* vec_vals=dense_vec->Values(); const Index* exp_pos = ExpandedPosIndices(); for (Index i=0; i<NCols(); i++) { ...
false
false
false
false
false
0
html_write_border_style_40 (GsfOutput *output, GnmStyle const *style) { GnmBorder *border; border = gnm_style_get_border (style, MSTYLE_BORDER_TOP); if (!gnm_style_border_is_blank (border)) html_write_one_border_style_40 (output, border, "border-top"); border = gnm_style_get_border (style, MSTYLE_BORDER_BOTTOM);...
false
false
false
false
false
0
allocate_fix_space(int len) { len++; // In case we want to add a null. if (len <= Allocated) return; if (Allocated) delete [] Data; Allocated = len; if (Allocated < MinimumAllocationSize) Allocated = MinimumAllocationSize; Data = new char[Allocated]; }
false
false
false
false
false
0
ai_manage_cities(struct player *pplayer) { pplayer->ai_common.maxbuycost = 0; TIMING_LOG(AIT_EMERGENCY, TIMER_START); city_list_iterate(pplayer->cities, pcity) { if (CITY_EMERGENCY(pcity)) { auto_arrange_workers(pcity); /* this usually helps */ } if (CITY_EMERGENCY(pcity)) { /* Fix critic...
false
false
false
false
false
0
get_fields_from_solvedserver(blind_t* bp, solver_t* sp) { if (!bp->solvedserver) return; if (solvedclient_set_server(bp->solvedserver)) { logerr("Error setting solvedserver.\n"); exit( -1); } if ((il_size(bp->fieldlist) == 0) && (bp->firstfield != -1) && (bp->lastfield != -1)) { ...
false
false
false
false
false
0
acl_InitScanner(NSErr_t *errp, char *filename, char *buffer) { acl_errp = errp; acl_lineno = 1; acl_use_buffer = (filename == NULL) ? 1 : 0 ; if ( filename != NULL ) { PL_strncpyz(acl_filename, filename, sizeof(acl_filename)); #ifdef UTEST aclin = fopen(filename, "r"); if ( aclin == NULL ) { return(-1); ...
false
true
false
false
true
1
set_charset_quality(negotiation_state *neg, var_rec *variant) { int i; accept_rec *accept_recs; const char *charset = variant->content_charset; accept_rec *star = NULL; /* if no Accept-Charset: header, leave quality alone (will * remain at the default value of 1) */ if (!neg->accept_c...
false
false
false
false
false
0
text_eraseborder(t_text *x, t_glist *glist, char *tag) { if (x->te_type == T_TEXT) return; sys_vgui(".x%lx.c delete %sR\n", glist_getcanvas(glist), tag); glist_eraseiofor(glist, x, tag); }
false
false
false
false
false
0
dig_fseek(GVFILE * file, long offset, int whence) { if (file->loaded) { /* using memory */ switch (whence) { case SEEK_SET: file->current = file->start + offset; break; case SEEK_CUR: file->current += offset; break; case SEEK_END: file->current = file->start + file->size + offset; ...
false
false
false
false
false
0
_evas_object_text_horiz_advance_get(const Evas_Object *obj, const Evas_Object_Text *o) { Evas_Object_Text_Item *it; Evas_Coord adv; (void) obj; adv = 0; EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it) { adv += it->adv; } return adv; }
false
false
false
false
false
0
trav_print_visit_obj(const char *path, const H5O_info_t *oinfo, const char *already_visited, void *udata) { trav_print_udata_t *print_udata = (trav_print_udata_t *)udata; /* Print the name of the object */ /* (no new-line, so that objects that we've encountered before can print * the name of the o...
false
false
false
false
false
0
SDLGui_MoveCursor(SGOBJ *dlg, cursor_state *cursor, int mode) { int new_object; new_object = SDLGui_FindEditField(dlg, cursor->object, mode); if (new_object != cursor->object) { /* Erase old cursor */ cursor->blink_state = false; SDLGui_DrawCursor(dlg, cursor); cursor->object = new_object; ...
false
false
false
false
false
0
pci_ea_get_resource(struct pci_dev *dev, u8 bei, u8 prop) { if (bei <= PCI_EA_BEI_BAR5 && prop <= PCI_EA_P_IO) return &dev->resource[bei]; #ifdef CONFIG_PCI_IOV else if (bei >= PCI_EA_BEI_VF_BAR0 && bei <= PCI_EA_BEI_VF_BAR5 && (prop == PCI_EA_P_VF_MEM || prop == PCI_EA_P_VF_MEM_PREFETCH)) return &dev...
false
false
false
false
false
0
fst_intr_ctlchg(struct fst_card_info *card, struct fst_port_info *port) { int signals; signals = FST_RDL(card, v24DebouncedSts[port->index]); if (signals & (((port->hwif == X21) || (port->hwif == X21D)) ? IPSTS_INDICATE : IPSTS_DCD)) { if (!netif_carrier_ok(port_to_dev(port))) { dbg(DBG_INTR, "DCD ac...
false
false
false
false
false
0
pathOrUrl(AdjustPathOption trailing) const { if ( isLocalFile() && fragment().isNull() && encodedQuery().isNull() ) { return toLocalFile(trailing); } else { return prettyUrl(trailing); } }
false
false
false
false
false
0
condop(exp) struct nodestruct *exp; { label_no exitlab; label_no falselab; struct nodestruct *falsenode; struct symstruct *falsesym; label_no truelab; struct nodestruct *truenode; struct symstruct *truesym; jumpcond(exp->left.nodeptr, truelab = getlabel(), falselab = getlabel(), ~...
false
false
false
false
false
0
get_record(char** rec) { size_t len; char* c; retry: *rec = c = gbfgetstr(file_in); if ((lineno++ == 0) && file_in->unicode) { cet_convert_init(CET_CHARSET_UTF8, 1); } if (c == NULL) { return rec_none; } len = strlen(c); /* Trackwiev writes (bogus) blank links between each record */ if (le...
false
false
false
false
false
0
addEmpty(GoBoard *board, int loc) { GoBoardPiece *remove, *group, *neighbor, *oppList[4]; GoStone type; int killedLocs[GOBOARD_MAXSIZE*GOBOARD_MAXSIZE]; int i, dir, numKilled, oppListLen; /* * My database really has no clean way of removing stones, so I take out * the entire group that the empty...
false
false
false
false
false
0
Delete( const wxBlockInt &block, wxBlockInt &top, wxBlockInt &bottom, wxBlockInt &left, wxBlockInt &right) const { top = bottom = left = right = wxEmptyBlockInt; wxBlockInt iBlock; Intersect(*this, block, &iBlock); if (iBlock.IsEmpty()) return false; /...
false
false
false
false
false
0
indxld2(int i, char reg, char idx) { char *cptr; int v; doopcode("ld "); if (upperflag) { reg = toupper(reg); idx = toupper(idx); } if (upperflag) kcnt += fprintf(fp, "(I%c+", idx); else kcnt += fprintf(fp, "(i%c+", idx); v = (int) pgmmem[i + 2] & 0xff; if (pgmflags[i + 2]...
false
false
false
false
false
0
clutter_text_set_cursor_size (ClutterText *self, gint size) { ClutterTextPrivate *priv; g_return_if_fail (CLUTTER_IS_TEXT (self)); priv = self->priv; if (priv->cursor_size != size) { if (size < 0) size = DEFAULT_CURSOR_SIZE; priv->cursor_size = s...
false
false
false
false
false
0
GTIFImport(GTIF *gtif, GTIFReadMethod scan,void *aux) { int status; char message[1024]; if (!scan) scan = (GTIFReadMethod) &DefaultRead; if (!aux) aux=stdin; scan(message,aux); if (strncmp(message,FMT_GEOTIFF,8)) return 0; scan(message,aux); if (!sscanf(message,FMT_VERSION,(short i...
false
false
false
false
false
0
is_server(const char *s) { LIST *list; CONNECTION *con; LINK *link; for (list = global.serversList; list; list = list->next) { con = list->data; if(!strcasecmp(s, con->host)) return 1; } for (list = global.serverLinksList; list; list = list->next) { ...
false
false
false
false
false
0
drawLabel( QPainter *painter, double value ) const { const QwtText label = tickLabel( painter->font(), value ); if ( label.isEmpty() ) return; const double tval = scaleMap().transform( value ); if ( ( tval > d_data->startAngle + 359 * 16 ) || ( tval < d_data->startAngle - 359 * 16 ) ) ...
false
false
false
false
false
0
SubstituteByPosition(Document *doc, const char *text, int *length) { delete []substituted; substituted = 0; DocumentIndexer di(doc, doc->Length()); if (!search.GrabMatches(di)) return 0; unsigned int lenResult = 0; for (int i = 0; i < *length; i++) { if (text[i] == '\\') { if (text[i + 1] >= '0' && text[i ...
false
false
false
false
false
0
_nodes_in_sets(bitstr_t *req_bitmap, struct node_set * node_set_ptr, int node_set_size) { bitstr_t *scratch_bitmap = NULL; int error_code = SLURM_SUCCESS, i; for (i=0; i<node_set_size; i++) { if (scratch_bitmap) bit_or(scratch_bitmap, node_set_ptr[i].my_bitmap); else { scratch_bitmap =...
false
false
false
false
false
0
gt_pbs_add_hit(GtArray *hitlist, GtAlignment *ali, GtPBSOptions *o, unsigned long trna_seqlen, const char *desc, GtStrand strand, GtPBSResults *r) { unsigned long dist; GtPBSHit *hit; unsigned long offset, alilen; GtRange urange, vrange; gt_assert(hitlist ...
false
false
false
false
false
0
handle_unmap_event(XUnmapEvent *e) { client_t *c; if ((c = find_client(e->window, MATCH_WINDOW))) { if (c->ignore_unmap) c->ignore_unmap--; else del_client(c, DEL_WITHDRAW); } }
false
false
false
false
false
0
lagrange_mult_f() { // register multipliers char mult_name[100]; for (int fi = 0; fi < diff_f.dim2(); fi++) { sprintf(mult_name, "MULT%d", fset[fi]); model.atoms.register_uniq_endo(mult_name); info.num_lagrange_mults++; } // multiply with the multipliers for (int yi = 0; yi < diff_f.dim1(); yi++) for (in...
false
false
false
false
false
0
vs30_output(struct svga_shader_emitter *emit, struct tgsi_declaration_semantic semantic, unsigned idx) { SVGA3DOpDclArgs dcl; SVGA3dShaderInstToken opcode; unsigned usage, index; opcode = inst_token( SVGA3DOP_DCL ); dcl.values[0] = 0; dcl.values[1] = 0; if (!translate_vs_p...
false
false
false
false
false
0
receive_cancel(struct dlm_ls *ls, struct dlm_message *ms) { struct dlm_lkb *lkb; struct dlm_rsb *r; int error; error = find_lkb(ls, ms->m_remid, &lkb); if (error) goto fail; receive_flags(lkb, ms); r = lkb->lkb_resource; hold_rsb(r); lock_rsb(r); error = validate_message(lkb, ms); if (error) goto ou...
false
false
false
false
false
0
process_pfx_order() { PfxEntry* ptr; // loop through each prefix list starting point for (int i=1; i < SETSIZE; i++) { ptr = pStart[i]; // look through the remainder of the list // and find next entry with affix that // the current one is not a subset of // ...
false
false
false
false
false
0
caml_gr_y_wait_event_poll(void) { int mouse_x, mouse_y, button, key, keypressed; Window rootwin, childwin; int root_x, root_y, win_x, win_y; unsigned int modifiers; unsigned int i; if (XQueryPointer(caml_gr_display, caml_gr_window.win, &rootwin, &childwin, &root_x, &...
false
false
false
false
false
0
drmModeGetProperty(int fd, uint32_t property_id) { struct drm_mode_get_property prop; drmModePropertyPtr r; memclear(prop); prop.prop_id = property_id; if (drmIoctl(fd, DRM_IOCTL_MODE_GETPROPERTY, &prop)) return 0; if (prop.count_values) prop.values_ptr = VOID2U64(drmMalloc(prop.count_values * sizeof(uint6...
false
false
false
false
false
0