idx int64 | func string | target int64 |
|---|---|---|
376,323 | gpg_decrypt_sync (CamelCipherContext *context,
CamelMimePart *ipart,
CamelMimePart *opart,
GCancellable *cancellable,
GError **error)
{
struct _GpgCtx *gpg = NULL;
CamelCipherValidity *valid = NULL;
CamelStream *ostream, *istream;
CamelDataWrap... | 0 |
391,646 | NTSTATUS get_relative_fid_filename(connection_struct *conn,
struct smb_request *req,
uint16_t root_dir_fid,
const struct smb_filename *smb_fname,
struct smb_filename **smb_fname_out)
{
files_struct *dir_fsp;
char *parent_fname = NULL;
char *new_base_name = NULL;
NTSTATUS status;
if (ro... | 0 |
430,360 | static void single_stop(struct seq_file *p, void *v)
{
} | 0 |
484,746 | static ssize_t show_rxbuf(struct device *dev,
struct device_attribute *attr, char *buf)
{
return sprintf(buf, "%lu\n", NET_RX_RING_SIZE);
} | 0 |
359,334 | bgp_clear_vty_error (struct vty *vty, struct peer *peer, afi_t afi,
safi_t safi, int error)
{
switch (error)
{
case BGP_ERR_AF_UNCONFIGURED:
vty_out (vty,
"%%BGP: Enable %s %s address family for the neighbor %s%s",
afi == AFI_IP6 ? "IPv6" : safi == SAFI_MPLS_VPN ? "VPNv4" : "IPv4"... | 0 |
459,218 | static void tcf_chain_head_change_dflt(struct tcf_proto *tp_head, void *priv)
{
struct tcf_proto __rcu **p_filter_chain = priv;
rcu_assign_pointer(*p_filter_chain, tp_head);
} | 0 |
226,280 | void video_sample_entry_box_del(GF_Box *s)
{
GF_MPEGVisualSampleEntryBox *ptr = (GF_MPEGVisualSampleEntryBox *)s;
if (ptr == NULL) return;
gf_isom_sample_entry_predestroy((GF_SampleEntryBox *)s);
if (ptr->slc) gf_odf_desc_del((GF_Descriptor *)ptr->slc);
/*for publishing*/
if (ptr->emul_esd) gf_odf_desc_del((GF_D... | 0 |
199,833 | gif_internal_decode_frame(gif_animation *gif,
unsigned int frame,
bool clear_image)
{
unsigned int index = 0;
const unsigned char *gif_data, *gif_end;
ssize_t gif_bytes;
unsigned int width, height, offset_x, offset_y;
unsigned i... | 1 |
310,196 | main(int argc, char *argv[])
{
char my_tmpname[PATH_MAX];
char my_altfile[PATH_MAX];
int v_opt = -1;
int smart_defaults = TRUE;
char *termcap;
ENTRY *qp;
int this_opt, last_opt = '?';
int outform = F_TERMINFO; /* output format */
int sortmode = S_TERMINFO; /* sort_mode */
int ... | 0 |
245,171 | read_mysql_one_value(MYSQL *connection, const char *query)
{
MYSQL_RES *mysql_result;
MYSQL_ROW row;
char *result = NULL;
mysql_result = xb_mysql_query(connection, query, true);
ut_ad(mysql_num_fields(mysql_result) == 1);
if ((row = mysql_fetch_row(mysql_result))) {
result = strdup(row[0]);
}
mysql_free_r... | 0 |
454,747 | static irqreturn_t ismt_handle_isr(struct ismt_priv *priv)
{
complete(&priv->cmp);
return IRQ_HANDLED;
} | 0 |
244,307 | GF_Err fpar_box_write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
u32 i;
FilePartitionBox *ptr = (FilePartitionBox *) s;
if (!s) return GF_BAD_PARAM;
e = gf_isom_full_box_write(s, bs);
if (e) return e;
gf_bs_write_int(bs, ptr->itemID, ptr->version ? 32 : 16);
gf_bs_write_u16(bs, ptr->packet_payload_size);
gf_bs_... | 0 |
424,980 | void iwl_pcie_dump_csr(struct iwl_trans *trans)
{
int i;
static const u32 csr_tbl[] = {
CSR_HW_IF_CONFIG_REG,
CSR_INT_COALESCING,
CSR_INT,
CSR_INT_MASK,
CSR_FH_INT_STATUS,
CSR_GPIO_IN,
CSR_RESET,
CSR_GP_CNTRL,
CSR_HW_REV,
CSR_EEPROM_REG,
CSR_EEPROM_GP,
CSR_OTP_GP_REG,
CSR_GIO_REG,
CSR_GP_U... | 0 |
252,383 | static MZ_FORCEINLINE void tdefl_find_match(
tdefl_compressor *d, mz_uint lookahead_pos, mz_uint max_dist,
mz_uint max_match_len, mz_uint *pMatch_dist, mz_uint *pMatch_len) {
mz_uint dist, pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK,
match_len = *pMatch_len, probe_pos = pos, next_probe_pos,
... | 0 |
294,713 | c_gregorian_to_yday(int y, int m, int d)
{
assert(m >= 1 && m <= 12);
return yeartab[c_gregorian_leap_p(y) ? 1 : 0][m] + d;
} | 0 |
220,406 | mrb_ary_replace(mrb_state *mrb, mrb_value self, mrb_value other)
{
struct RArray *a1 = mrb_ary_ptr(self);
struct RArray *a2 = mrb_ary_ptr(other);
if (a1 != a2) {
ary_replace(mrb, a1, a2);
}
} | 0 |
198,259 | void Compute(OpKernelContext* context) override {
// Get the input Tensors.
OpInputList params_nested_splits_in;
OP_REQUIRES_OK(context, context->input_list("params_nested_splits",
¶ms_nested_splits_in));
const Tensor& params_dense_values_in =
... | 1 |
366,189 | static struct mountpoint *lock_mount(struct path *path)
{
struct vfsmount *mnt;
struct dentry *dentry = path->dentry;
retry:
inode_lock(dentry->d_inode);
if (unlikely(cant_mount(dentry))) {
inode_unlock(dentry->d_inode);
return ERR_PTR(-ENOENT);
}
namespace_lock();
mnt = lookup_mnt(path);
if (likely(!mnt)) ... | 0 |
175,785 | void set_quota_manager(QuotaManager* quota_manager) {
quota_manager_ = quota_manager;
}
| 0 |
498,094 | void cgit_vprint_error(const char *fmt, va_list ap)
{
va_list cp;
html("<div class='error'>");
va_copy(cp, ap);
html_vtxtf(fmt, cp);
va_end(cp);
html("</div>\n");
} | 0 |
353,124 | bool SplashOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *catalog, Object *str,
const double *ptm, int paintType, int /*tilingType*/, Dict *resDict,
const double *mat, const double *bbox,
int x0, int y0, int x1, int y1,
double xStep, double yStep)
{
PDFRectangle box;
Gfx *gfx;... | 0 |
489,126 | sctp_disposition_t sctp_sf_operr_notify(const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const sctp_subtype_t type,
void *arg,
sctp_cmd_seq_t *commands)
{
struct sctp_chunk *chunk = arg;
struct sctp_ulpevent *ev;
if (!sctp_vtag_verify(chunk, asoc))
return sctp_sf_pdiscard(e... | 0 |
336,690 | SPICE_GNUC_VISIBLE const char** spice_server_char_device_recognized_subtypes(void)
{
return (const char **) spice_server_char_device_recognized_subtypes_list;
} | 0 |
218,754 | static wchar_t *ConvertUTF8ToUTF16(const unsigned char *source)
{
size_t
length;
wchar_t
*utf16;
length=UTF8ToUTF16(source,(wchar_t *) NULL);
if (length == 0)
{
ssize_t
i;
/*
Not UTF-8, just copy.
*/
length=strlen((char *) source);
utf16=(wchar_t *) A... | 0 |
387,852 | jint InstanceKlass::jvmti_class_status() const {
jint result = 0;
if (is_linked()) {
result |= JVMTI_CLASS_STATUS_VERIFIED | JVMTI_CLASS_STATUS_PREPARED;
}
if (is_initialized()) {
assert(is_linked(), "Class status is not consistent");
result |= JVMTI_CLASS_STATUS_INITIALIZED;
}
if (is_in_error... | 0 |
455,286 | shell_is_restricted (name)
char *name;
{
char *temp;
if (restricted)
return 1;
temp = base_pathname (name);
if (*temp == '-')
temp++;
return (STREQ (temp, RESTRICTED_SHELL_NAME));
} | 0 |
455,171 | MOBI_RET mobi_parse_huff(MOBIHuffCdic *huffcdic, const MOBIPdbRecord *record) {
MOBIBuffer *buf = mobi_buffer_init_null(record->data, record->size);
if (buf == NULL) {
debug_print("%s\n", "Memory allocation failed");
return MOBI_MALLOC_FAILED;
}
char huff_magic[5];
mobi_buffer_getstr... | 0 |
226,056 |
void metx_box_del(GF_Box *s)
{
GF_MetaDataSampleEntryBox *ptr = (GF_MetaDataSampleEntryBox*)s;
if (ptr == NULL) return;
gf_isom_sample_entry_predestroy((GF_SampleEntryBox *)s);
if (ptr->content_encoding) gf_free(ptr->content_encoding);
if (ptr->xml_namespace) gf_free(ptr->xml_namespace);
if (ptr->xml_schema_loc... | 0 |
198,703 | int CLASS ljpeg_start (struct jhead *jh, int info_only)
{
int c, tag, len;
uchar data[0x10000];
const uchar *dp;
memset (jh, 0, sizeof *jh);
jh->restart = INT_MAX;
fread (data, 2, 1, ifp);
if (data[1] != 0xd8) return 0;
do {
fread (data, 2, 2, ifp);
tag = data[0] << 8 | data[1];
len = (dat... | 1 |
482,653 | static inline unsigned long ifname_compare_aligned(const char *_a,
const char *_b,
const char *_mask)
{
const unsigned long *a = (const unsigned long *)_a;
const unsigned long *b = (const unsigned long *)_b;
const unsigned long *mask = (const unsigned long *)_mask;
unsigned long ret;
ret = (a[0]... | 0 |
225,954 | /* SimpleTextSampleEntry */
GF_Box *txtc_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_TextConfigBox, GF_ISOM_BOX_TYPE_TXTC);
return (GF_Box *)tmp; | 0 |
231,685 | TEST_P(QuicServerTransportAllowMigrationTest, IgnoreInvalidPathResponse) {
auto data = IOBuf::copyBuffer("bad data");
auto packetData = packetToBuf(createStreamPacket(
*clientConnectionId,
*server->getConn().serverConnectionId,
clientNextAppDataPacketNum++,
2,
*data,
0 /* cipherO... | 0 |
238,808 | searchit(
win_T *win, // window to search in; can be NULL for a
// buffer without a window!
buf_T *buf,
pos_T *pos,
pos_T *end_pos, // set to end of the match, unless NULL
int dir,
char_u *pat,
long count,
int options,
int pat_use, // which pattern to use when "pat" is empty
... | 0 |
413,844 | void LinkResolver::check_field_loader_constraints(Symbol* field, Symbol* sig,
Klass* current_klass,
Klass* sel_klass, TRAPS) {
Handle ref_loader(THREAD, current_klass->class_loader());
Handle sel_loader(THREAD, sel_k... | 0 |
267,843 | opfunc_call (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
{
const uint8_t *byte_code_p = frame_ctx_p->byte_code_p + 1;
uint8_t opcode = byte_code_p[-1];
uint32_t arguments_list_len;
if (opcode >= CBC_CALL0)
{
arguments_list_len = (unsigned int) ((opcode - CBC_CALL0) / 6);
}
else
{
argumen... | 0 |
432,195 | void memory_region_init_io(struct uc_struct *uc,
MemoryRegion *mr,
const MemoryRegionOps *ops,
void *opaque,
uint64_t size)
{
memory_region_init(uc, mr, size);
mr->ops = ops ? ops : &unassigned_mem_ops;
... | 0 |
252,352 | int mz_deflateInit(mz_streamp pStream, int level) {
return mz_deflateInit2(pStream, level, MZ_DEFLATED, MZ_DEFAULT_WINDOW_BITS, 9,
MZ_DEFAULT_STRATEGY);
} | 0 |
439,059 | static Image *ReadTEXTImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
char
filename[MaxTextExtent],
geometry[MaxTextExtent],
*p,
text[MaxTextExtent];
DrawInfo
*draw_info;
Image
*image,
*texture;
MagickBooleanType
status;
PointInfo
delta;
RectangleInf... | 0 |
512,849 | void set_typelib(TYPELIB *typelib)
{
// Non-field Items (e.g. hybrid functions) never have ENUM/SET types yet.
DBUG_ASSERT(0);
} | 0 |
502,714 | int ssl_get_new_session(SSL *s, int session)
{
/* This gets used by clients and servers. */
unsigned int tmp;
SSL_SESSION *ss = NULL;
GEN_SESSION_CB cb = def_generate_session_id;
if ((ss = SSL_SESSION_new()) == NULL)
return (0);
/* If the context has a default timeout, use it */
i... | 0 |
502,702 | SSL_SESSION *SSL_SESSION_new(void)
{
SSL_SESSION *ss;
ss = (SSL_SESSION *)OPENSSL_malloc(sizeof(SSL_SESSION));
if (ss == NULL) {
SSLerr(SSL_F_SSL_SESSION_NEW, ERR_R_MALLOC_FAILURE);
return (0);
}
memset(ss, 0, sizeof(SSL_SESSION));
ss->verify_result = 1; /* avoid 0 (= X509... | 0 |
402,640 | wrap_in_set(cms_context *cms, SECItem *der, SECItem **items)
{
void *ret;
ret = SEC_ASN1EncodeItem(cms->arena, der, &items, &SetTemplate);
if (ret == NULL)
cmsreterr(-1, cms, "could not encode set");
return 0;
} | 0 |
225,502 | Status MutableGraphView::UpdateFanoutsInternal(NodeDef* from_node,
NodeDef* to_node) {
VLOG(2) << absl::Substitute("Update fanouts from '$0' to '$1'.",
from_node->name(), to_node->name());
if (from_node == to_node) {
return Status::OK(... | 0 |
226,008 |
void dac3_box_del(GF_Box *s)
{
GF_AC3ConfigBox *ptr = (GF_AC3ConfigBox *)s;
gf_free(ptr); | 0 |
359,209 | static __poll_t ringbuf_map_poll(struct bpf_map *map, struct file *filp,
struct poll_table_struct *pts)
{
struct bpf_ringbuf_map *rb_map;
rb_map = container_of(map, struct bpf_ringbuf_map, map);
poll_wait(filp, &rb_map->rb->waitq, pts);
if (ringbuf_avail_data_sz(rb_map->rb))
return EPOLLIN | EPOLLRDNORM;
... | 0 |
343,324 | static void addreply_newline(const char * const str, const size_t size)
{
struct reply *newline;
if ((newline = (struct reply *) malloc(offsetof(struct reply, line) +
size)) == NULL) {
die_mem();
}
if (firstreply == NULL) {
firstreply = newline... | 0 |
255,574 | njs_module_path(njs_vm_t *vm, const njs_str_t *dir, njs_module_info_t *info)
{
char *p;
size_t length;
njs_bool_t trail;
char src[NJS_MAX_PATH + 1];
trail = 0;
length = info->name.length;
if (dir != NULL) {
length += dir->length;
if (length == 0) {
... | 0 |
432,347 | static void i2c_ddc_class_init(ObjectClass *oc, void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
I2CSlaveClass *isc = I2C_SLAVE_CLASS(oc);
dc->reset = i2c_ddc_reset;
dc->vmsd = &vmstate_i2c_ddc;
dc->props = i2c_ddc_properties;
isc->event = i2c_ddc_event;
isc->recv = i2c_ddc_rx;
isc->se... | 0 |
353,169 | void SplashOutputDev::clipToStrokePath(GfxState *state) {
SplashPath *path2;
SplashPath path = convertPath(state, state->getPath(), false);
path2 = splash->makeStrokePath(&path, state->getLineWidth());
splash->clipToPath(path2, false);
delete path2;
} | 0 |
389,738 | typval_compare_func(
typval_T *tv1,
typval_T *tv2,
exprtype_T type,
int ic,
int *res)
{
int val = 0;
if (type != EXPR_EQUAL && type != EXPR_NEQUAL
&& type != EXPR_IS && type != EXPR_ISNOT)
{
emsg(_(e_invalid_operation_for_funcrefs));
return FAIL;
}
if ((tv1->v_type ==... | 0 |
195,402 | int TfLiteIntArrayGetSizeInBytes(int size) {
static TfLiteIntArray dummy;
int computed_size = sizeof(dummy) + sizeof(dummy.data[0]) * size;
#if defined(_MSC_VER)
// Context for why this is needed is in http://b/189926408#comment21
computed_size -= sizeof(dummy.data[0]);
#endif
return computed_size;
} | 1 |
225,408 | static int vidioc_enum_frameintervals(struct file *file, void *fh,
struct v4l2_frmivalenum *argp)
{
struct v4l2_loopback_device *dev = v4l2loopback_getdevice(file);
struct v4l2_loopback_opener *opener = fh_to_opener(fh);
if (dev->ready_for_capture) {
if (opener->vidioc_enum_frameintervals_calls > 0)
... | 0 |
481,285 | struct mlx5_fpga_conn *mlx5_fpga_conn_create(struct mlx5_fpga_device *fdev,
struct mlx5_fpga_conn_attr *attr,
enum mlx5_ifc_fpga_qp_type qp_type)
{
struct mlx5_fpga_conn *ret, *conn;
u8 *remote_mac, *remote_ip;
int err;
if (!attr->recv_cb)
return ERR_PTR(-EINVAL);
conn = kzalloc(sizeof(*con... | 0 |
486,810 | static inline unsigned tx_desc_get_last(uint32_t *desc)
{
return (desc[1] & DESC_1_TX_LAST) ? 1 : 0;
} | 0 |
252,344 | mz_bool mz_zip_reader_extract_file_to_file(mz_zip_archive *pZip,
const char *pArchive_filename,
const char *pDst_filename,
mz_uint flags) {
int file_index =
mz_zip_reader_locate_file(... | 0 |
513,086 | Item *get_copy(THD *thd)
{ return get_item_copy<Item_ref>(thd, this); } | 0 |
273,054 | ringbuffer_read(uint8_t **dst, size_t dstlen, struct ringbuffer *buf)
{
int remaining;
*dst = buf->buffer + buf->read_pos;
if (buf->read_avail == 0 || dstlen == 0)
return 0;
remaining = buf->size - buf->read_pos;
// The number of bytes we will return will be MIN(dstlen, remaining, read_avail)
if (ds... | 0 |
329,908 | _inplace_spans (void *abstract_renderer,
int y, int h,
const cairo_half_open_span_t *spans,
unsigned num_spans)
{
cairo_image_span_renderer_t *r = abstract_renderer;
uint8_t *mask;
int x0, x1;
if (num_spans == 0)
return CAIRO_STATUS_SUCCESS;
if (num_spans == 2 && spans[0].coverage == 0xff) ... | 0 |
232,337 |
void gf_isom_box_del_parent(GF_List **child_boxes, GF_Box*b)
{
if (child_boxes) {
gf_list_del_item(*child_boxes, b);
if (!gf_list_count(*child_boxes)) {
gf_list_del(*child_boxes);
*child_boxes = NULL;
}
}
gf_isom_box_del(b); | 0 |
364,789 | tagstack_set_curidx(win_T *wp, int curidx)
{
wp->w_tagstackidx = curidx;
if (wp->w_tagstackidx < 0) // sanity check
wp->w_tagstackidx = 0;
if (wp->w_tagstackidx > wp->w_tagstacklen)
wp->w_tagstackidx = wp->w_tagstacklen;
} | 0 |
234,200 | add_shndx_to_cu_tu_entry (unsigned int shndx)
{
if (shndx_pool_used >= shndx_pool_size)
{
error (_("Internal error: out of space in the shndx pool.\n"));
return;
}
shndx_pool [shndx_pool_used++] = shndx;
} | 0 |
270,406 | static bool ok_inflater_stored_block_header(ok_inflater *inflater) {
ok_inflater_skip_byte_align(inflater);
if (!ok_inflater_load_bits(inflater, 32)) {
return false;
} else {
uint32_t len = ok_inflater_read_bits(inflater, 16);
uint32_t clen = ok_inflater_read_bits(inflater, 16);
... | 0 |
248,258 | static cfg_opt_t *cfg_getopt_array(cfg_opt_t *rootopts, int cfg_flags, const char *name)
{
unsigned int i;
cfg_opt_t *opts = rootopts;
if (!rootopts || !name) {
errno = EINVAL;
return NULL;
}
while (name && *name) {
cfg_t *seccfg;
char *secname;
size_t len = strcspn(name, "|");
if (name[len] == 0 /*... | 0 |
393,520 | static SQInteger array_append(HSQUIRRELVM v)
{
return SQ_SUCCEEDED(sq_arrayappend(v,-2)) ? 1 : SQ_ERROR;
} | 0 |
270,376 | static bool ok_png_read_data(ok_png_decoder *decoder, uint32_t bytes_remaining) {
ok_png *png = decoder->png;
size_t inflate_buffer_size = 64 * 1024;
size_t num_passes = decoder->interlace_method == 0 ? 1 : 7;
uint8_t bits_per_pixel = decoder->bit_depth * OK_PNG_SAMPLES_PER_PIXEL[decoder->color_type];
... | 0 |
443,151 | int jfs_commit_inode(struct inode *inode, int wait)
{
int rc = 0;
tid_t tid;
static int noisy = 5;
jfs_info("In jfs_commit_inode, inode = 0x%p", inode);
/*
* Don't commit if inode has been committed since last being
* marked dirty, or if it has been deleted.
*/
if (inode->i_nlink == 0 || !test_cflag(COMMI... | 0 |
293,749 | static RList *resolve_mig_subsystem(RKernelCacheObj *obj) {
struct section_t *sections = NULL;
if (!(sections = MACH0_(get_sections) (obj->mach0))) {
return NULL;
}
HtPP *mig_hash = NULL;
RList *subsystem = NULL;
ut8 *data_const = NULL;
ut64 data_const_offset = 0, data_const_size = 0, data_const_vaddr = 0;
u... | 0 |
309,957 | position_check(NCURSES_SP_DCLx int expected_y, int expected_x, char *legend)
/* check to see if the real cursor position matches the virtual */
{
char buf[20];
char *s;
int y, x;
if (!_nc_tracing || (expected_y < 0 && expected_x < 0))
return;
NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG);
memse... | 0 |
222,540 | FunctionDefLibrary FunctionLibraryDefinition::ToProto() const {
FunctionDefLibrary lib;
tf_shared_lock l(mu_);
for (const auto& f : function_defs_) {
*lib.add_function() = f.second->fdef;
}
for (const auto& g : func_grad_) {
GradientDef* gd = lib.add_gradient();
gd->set_function_name(g.first);
... | 0 |
473,860 | is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
{
if (code < 256)
return ENC_IS_ISO_8859_8_CTYPE(code, ctype);
else
return FALSE;
} | 0 |
312,428 | qf_get_next_file_line(qfstate_T *state)
{
int discard;
int growbuflen;
if (fgets((char *)IObuff, IOSIZE, state->fd) == NULL)
return QF_END_OF_INPUT;
discard = FALSE;
state->linelen = (int)STRLEN(IObuff);
if (state->linelen == IOSIZE - 1 && !(IObuff[state->linelen - 1] == '\n'))
{
... | 0 |
90,198 | static std::string WrapWithTH(std::string text) {
return "<th>" + text + "</th>";
}
| 0 |
512,298 | void Item_func_case_simple::print(String *str, enum_query_type query_type)
{
Item **pos;
str->append(STRING_WITH_LEN("case "));
args[0]->print_parenthesised(str, query_type, precedence());
str->append(' ');
print_when_then_arguments(str, query_type, &args[1], when_count());
if ((pos= Item_func_case_simple::... | 0 |
473,927 | mbc_case_fold(OnigCaseFoldType flag,
const UChar** pp, const UChar* end, UChar* lower,
OnigEncoding enc)
{
int len;
const UChar* p = *pp;
if (ONIGENC_IS_MBC_ASCII(p)) {
*lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p);
(*pp)++;
return 1;
}
else {
int i;
len = enclen(enc, p, en... | 0 |
336,532 | static void reds_config_set_image_compression(RedsState *reds, SpiceImageCompression image_compression)
{
if (image_compression == reds->config->image_compression) {
return;
}
switch (image_compression) {
case SPICE_IMAGE_COMPRESSION_AUTO_LZ:
spice_debug("ic auto_lz");
break;
... | 0 |
475,988 | static inline lzw_result lzw__next_code(
struct lzw_read_ctx *ctx,
uint8_t code_size,
uint32_t *code_out)
{
uint32_t code = 0;
uint8_t current_bit = ctx->sb_bit & 0x7;
uint8_t byte_advance = (current_bit + code_size) >> 3;
assert(byte_advance <= 2);
if (ctx->sb_bit + code_size <= ctx->sb_bit_count) {
/* ... | 0 |
459,209 | static int tfilter_del_notify(struct net *net, struct sk_buff *oskb,
struct nlmsghdr *n, struct tcf_proto *tp,
struct tcf_block *block, struct Qdisc *q,
u32 parent, void *fh, bool unicast, bool *last,
bool rtnl_held, struct netlink_ext_ack *extack)
{
struct sk_buff *skb;
u32 portid... | 0 |
336,523 | static void reds_set_mouse_mode(RedsState *reds, SpiceMouseMode mode)
{
if (reds->mouse_mode == mode) {
return;
}
reds->mouse_mode = mode;
FOREACH_QXL_INSTANCE(reds, qxl) {
red_qxl_set_mouse_mode(qxl, mode);
}
reds->main_channel->push_mouse_mode(reds->mouse_mode,
... | 0 |
355,618 | set_ref_in_item(
typval_T *tv,
int copyID,
ht_stack_T **ht_stack,
list_stack_T **list_stack)
{
int abort = FALSE;
if (tv->v_type == VAR_DICT)
{
dict_T *dd = tv->vval.v_dict;
if (dd != NULL && dd->dv_copyID != copyID)
{
// Didn't see this dict yet.
dd->dv_copyI... | 0 |
390,628 | XkbWriteGeomShapes(char *wire,XkbGeometryPtr geom,Bool swap)
{
int i;
XkbShapePtr shape;
xkbShapeWireDesc * shapeWire;
for (i=0,shape=geom->shapes;i<geom->num_shapes;i++,shape++) {
register int o;
XkbOutlinePtr ol;
xkbOutlineWireDesc * olWire;
shapeWire= (xkbShapeWireDesc *)wire;
shapeWire->name= shape-... | 0 |
242,123 | int LuaSettings::l_remove(lua_State* L)
{
NO_MAP_LOCK_REQUIRED;
LuaSettings* o = checkobject(L, 1);
std::string key = std::string(luaL_checkstring(L, 2));
CHECK_SETTING_SECURITY(L, key);
bool success = o->m_settings->remove(key);
lua_pushboolean(L, success);
return 1;
} | 0 |
233,880 | */
static void php_wddx_serialize_array(wddx_packet *packet, zval *arr)
{
zval *ent;
zend_string *key;
int is_struct = 0;
zend_ulong idx;
HashTable *target_hash;
char tmp_buf[WDDX_BUF_LEN];
zend_ulong ind = 0;
target_hash = Z_ARRVAL_P(arr);
ZEND_HASH_FOREACH_KEY(target_hash, idx, key) {
if (key) {
is_st... | 0 |
273,068 | b64_decode(int *dstlen, const char *src)
{
uint8_t *out;
int len;
int ret;
len = AV_BASE64_DECODE_SIZE(strlen(src));
// Add a extra zero byte just in case we are decoding a string without null
// termination
CHECK_NULL(L_MISC, out = calloc(1, len + 1));
ret = av_base64_decode(out, src, len);
if (re... | 0 |
213,037 | mbfl_filt_conv_big5_wchar(int c, mbfl_convert_filter *filter)
{
int k;
int c1, w, c2;
switch (filter->status) {
case 0:
if (filter->from->no_encoding == mbfl_no_encoding_cp950) {
c1 = 0x80;
} else {
c1 = 0xa0;
}
if (c >= 0 && c <= 0x80) { /* latin */
CK((*filter->output_function)(c, filter->data)... | 1 |
224,281 | gopherToHTML(GopherStateData * gopherState, char *inbuf, int len)
{
char *pos = inbuf;
char *lpos = NULL;
char *tline = NULL;
LOCAL_ARRAY(char, line, TEMP_BUF_SIZE);
char *name = NULL;
char *selector = NULL;
char *host = NULL;
char *port = NULL;
char *escaped_selector = NULL;
con... | 0 |
310,028 | drv_sgmode(TERMINAL_CONTROL_BLOCK * TCB, int setFlag, TTY * buf)
{
SCREEN *sp = TCB->csp;
TERMINAL *_term = (TERMINAL *) TCB;
int result = OK;
AssertTCB();
if (setFlag) {
for (;;) {
if (SET_TTY(_term->Filedes, buf) != 0) {
if (errno == EINTR)
continue;
if (errno == ENOTTY) {
i... | 0 |
454,750 | static void ismt_desc_dump(struct ismt_priv *priv)
{
struct device *dev = &priv->pci_dev->dev;
struct ismt_desc *desc = &priv->hw[priv->head];
dev_dbg(dev, "Dump of the descriptor struct: 0x%X\n", priv->head);
__ismt_desc_dump(dev, desc);
} | 0 |
369,369 | static inline void io_cqring_ev_posted(struct io_ring_ctx *ctx)
{
if (unlikely(ctx->off_timeout_used || ctx->drain_active ||
ctx->has_evfd))
__io_commit_cqring_flush(ctx);
io_cqring_wake(ctx);
} | 0 |
291,837 | static int post_recv_path(struct rtrs_clt_path *clt_path)
{
size_t q_size = 0;
int err, cid;
for (cid = 0; cid < clt_path->s.con_num; cid++) {
if (cid == 0)
q_size = SERVICE_CON_QUEUE_DEPTH;
else
q_size = clt_path->queue_depth;
/*
* x2 for RDMA read responses + FR key invalidations,
* RDMA writes... | 0 |
386,508 | void DL_Dxf::writeDimStyle(DL_WriterA& dw,
double dimasz, double dimexe, double dimexo,
double dimgap, double dimtxt) {
dw.dxfString( 0, "TABLE");
dw.dxfString( 2, "DIMSTYLE");
if (version==DL_VERSION_2000) {
dw.dxfHex(5, 0xA);
dw.dxfString(100, "Ac... | 0 |
310,042 | outs(char *s)
{
if (VALID_STRING(s)) {
tputs(s, 1, outc);
return TRUE;
}
return FALSE;
} | 0 |
474,007 | is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
{
if (ctype <= ONIGENC_MAX_STD_CTYPE) {
if (code < 128)
return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype);
else {
if (CTYPE_IS_WORD_GRAPH_PRINT(ctype)) {
return (code_to_mbclen(code, enc) > 1 ? TRUE : FALSE);
}... | 0 |
294,709 | d_lite_mjd(VALUE self)
{
get_d1(self);
return f_sub(m_real_local_jd(dat), INT2FIX(2400001));
} | 0 |
473,893 | backward_search_range(regex_t* reg, const UChar* str, const UChar* end,
UChar* s, const UChar* range, UChar* adjrange,
UChar** low, UChar** high)
{
int r;
UChar *p;
range += reg->dmin;
p = s;
retry:
switch (reg->optimize) {
case ONIG_OPTIMIZE_EXACT:
exact_method:
p = slow_search_bac... | 0 |
275,518 | njs_vm_opt_init(njs_vm_opt_t *options)
{
njs_memzero(options, sizeof(njs_vm_opt_t));
} | 0 |
455,287 | mbskipname (pat, dname, flags)
char *pat, *dname;
int flags;
{
int ret, ext;
wchar_t *pat_wc, *dn_wc;
size_t pat_n, dn_n;
if (mbsmbchar (dname) == 0 && mbsmbchar (pat) == 0)
return (skipname (pat, dname, flags));
ext = 0;
#if EXTENDED_GLOB
ext = extglob_pattern_p (pat);
#endif
pat_wc = dn... | 0 |
379,327 | do_exedit(
exarg_T *eap,
win_T *old_curwin) // curwin before doing a split or NULL
{
int n;
int need_hide;
int exmode_was = exmode_active;
if ((eap->cmdidx != CMD_pedit && ERROR_IF_POPUP_WINDOW)
|| ERROR_IF_TERM_POPUP_WINDOW)
return;
/*
* ":vi" command ends Ex mode.
... | 0 |
488,434 | pte_t *get_locked_pte(struct mm_struct *mm, unsigned long addr,
spinlock_t **ptl)
{
pgd_t * pgd = pgd_offset(mm, addr);
pud_t * pud = pud_alloc(mm, pgd, addr);
if (pud) {
pmd_t * pmd = pmd_alloc(mm, pud, addr);
if (pmd)
return pte_alloc_map_lock(mm, pmd, addr, ptl);
}
return NULL;
} | 0 |
262,086 | explicit BoostedTreesCalculateBestFeatureSplitV2(
OpKernelConstruction* const context)
: OpKernel(context) {
OP_REQUIRES_OK(context, context->GetAttr("logits_dimension", &logits_dim_));
OP_REQUIRES_OK(context, context->GetAttr("num_features", &num_features_));
} | 0 |
230,987 | mrb_yield_cont(mrb_state *mrb, mrb_value b, mrb_value self, mrb_int argc, const mrb_value *argv)
{
struct RProc *p;
mrb_callinfo *ci;
check_block(mrb, b);
p = mrb_proc_ptr(b);
ci = mrb->c->ci;
mrb_stack_extend(mrb, 4);
mrb->c->ci->stack[1] = mrb_ary_new_from_values(mrb, argc, argv);
mrb->c->ci->stack[... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.