idx
int64 | func
string | target
int64 |
|---|---|---|
281,116
|
static struct hlist_head *policy_hash_bysel(struct net *net,
const struct xfrm_selector *sel,
unsigned short family, int dir)
{
unsigned int hmask = net->xfrm.policy_bydst[dir].hmask;
unsigned int hash;
u8 dbits;
u8 sbits;
__get_hash_thresh(net, family, dir, &dbits, &sbits);
hash = __sel_hash(sel, family, hmask, dbits, sbits);
if (hash == hmask + 1)
return &net->xfrm.policy_inexact[dir];
return rcu_dereference_check(net->xfrm.policy_bydst[dir].table,
lockdep_is_held(&net->xfrm.xfrm_policy_lock)) + hash;
}
| 0
|
462,258
|
static void* clone_empty_attr(pj_pool_t *pool, const void *src)
{
pj_stun_empty_attr *dst = PJ_POOL_ALLOC_T(pool, pj_stun_empty_attr);
pj_memcpy(dst, src, sizeof(pj_stun_empty_attr));
return (void*) dst;
}
| 0
|
267,951
|
static RBinSymbol *__getMethod(RBinFile *bf, const char *klass, const char *method) {
r_return_val_if_fail (bf && bf->o && bf->o->methods_ht && klass && method, NULL);
r_strf_var (name, 128, "%s::%s", klass, method);
return ht_pp_find (bf->o->methods_ht, name, NULL);
}
| 0
|
462,237
|
static void GETATTRHDR(const pj_uint8_t *buf, pj_stun_attr_hdr *hdr)
{
hdr->type = GETVAL16H(buf, 0);
hdr->length = GETVAL16H(buf, 2);
}
| 0
|
474,017
|
big5_mbc_enc_len0(const UChar* p, const UChar* e, int tridx, const int tbl[])
{
int firstbyte = *p++;
state_t s = trans[tridx][firstbyte];
#define RETURN(n) \
return s == ACCEPT ? ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(n) : \
ONIGENC_CONSTRUCT_MBCLEN_INVALID()
if (s < 0) RETURN(1);
if (p == e) return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(tbl[firstbyte]-1);
s = trans[s][*p++];
RETURN(2);
#undef RETURN
}
| 0
|
310,045
|
decode_tabs(const char *tab_list)
{
int *result = typeCalloc(int, strlen(tab_list) + (unsigned) max_cols);
int n = 0;
int value = 0;
int prior = 0;
int ch;
if (result == 0)
failed("decode_tabs");
while ((ch = *tab_list++) != '\0') {
if (isdigit(UChar(ch))) {
value *= 10;
value += (ch - '0');
} else if (ch == ',') {
result[n] = value + prior;
if (n > 0 && result[n] <= result[n - 1]) {
fprintf(stderr,
"%s: tab-stops are not in increasing order: %d %d\n",
_nc_progname, value, result[n - 1]);
free(result);
result = 0;
break;
}
++n;
value = 0;
prior = 0;
} else if (ch == '+') {
if (n)
prior = result[n - 1];
}
}
if (result != 0) {
/*
* If there is only one value, then it is an option such as "-8".
*/
if ((n == 0) && (value > 0)) {
int step = value;
value = 1;
while (n < max_cols - 1) {
result[n++] = value;
value += step;
}
}
/*
* Add the last value, if any.
*/
result[n++] = value + prior;
result[n] = 0;
}
return result;
}
| 0
|
234,791
|
int btrfs_init_dev_stats(struct btrfs_fs_info *fs_info)
{
struct btrfs_fs_devices *fs_devices = fs_info->fs_devices, *seed_devs;
struct btrfs_device *device;
struct btrfs_path *path = NULL;
int ret = 0;
path = btrfs_alloc_path();
if (!path)
return -ENOMEM;
mutex_lock(&fs_devices->device_list_mutex);
list_for_each_entry(device, &fs_devices->devices, dev_list) {
ret = btrfs_device_init_dev_stats(device, path);
if (ret)
goto out;
}
list_for_each_entry(seed_devs, &fs_devices->seed_list, seed_list) {
list_for_each_entry(device, &seed_devs->devices, dev_list) {
ret = btrfs_device_init_dev_stats(device, path);
if (ret)
goto out;
}
}
out:
mutex_unlock(&fs_devices->device_list_mutex);
btrfs_free_path(path);
return ret;
}
| 0
|
357,673
|
bool SQClass::SetAttributes(const SQObjectPtr &key,const SQObjectPtr &val)
{
SQObjectPtr idx;
if(_members->Get(key,idx)) {
if(_isfield(idx))
_defaultvalues[_member_idx(idx)].attrs = val;
else
_methods[_member_idx(idx)].attrs = val;
return true;
}
return false;
}
| 0
|
289,307
|
static int snd_pcm_oss_make_ready(struct snd_pcm_substream *substream)
{
struct snd_pcm_runtime *runtime;
int err;
runtime = substream->runtime;
if (runtime->oss.params) {
err = snd_pcm_oss_change_params(substream, false);
if (err < 0)
return err;
}
if (runtime->oss.prepare) {
if (mutex_lock_interruptible(&runtime->oss.params_lock))
return -ERESTARTSYS;
err = snd_pcm_oss_prepare(substream);
mutex_unlock(&runtime->oss.params_lock);
if (err < 0)
return err;
}
return 0;
}
| 0
|
261,910
|
njs_string_bytes_from_string(njs_vm_t *vm, const njs_value_t *string,
const njs_value_t *encoding)
{
njs_str_t enc, str;
if (!njs_is_string(encoding)) {
njs_type_error(vm, "\"encoding\" must be a string");
return NJS_ERROR;
}
njs_string_get(encoding, &enc);
njs_string_get(string, &str);
if (enc.length == 3 && memcmp(enc.start, "hex", 3) == 0) {
return njs_string_decode_hex(vm, &vm->retval, &str);
} else if (enc.length == 6 && memcmp(enc.start, "base64", 6) == 0) {
return njs_string_decode_base64(vm, &vm->retval, &str);
} else if (enc.length == 9 && memcmp(enc.start, "base64url", 9) == 0) {
return njs_string_decode_base64url(vm, &vm->retval, &str);
}
njs_type_error(vm, "Unknown encoding: \"%V\"", &enc);
return NJS_ERROR;
}
| 0
|
476,142
|
static int fill_ext_prop(struct usb_configuration *c, int interface, u8 *buf)
{
struct usb_function *f;
struct usb_os_desc *d;
struct usb_os_desc_ext_prop *ext_prop;
int j, count, n, ret;
f = c->interface[interface];
count = 10; /* header length */
buf += 10;
for (j = 0; j < f->os_desc_n; ++j) {
if (interface != f->os_desc_table[j].if_id)
continue;
d = f->os_desc_table[j].os_desc;
if (d)
list_for_each_entry(ext_prop, &d->ext_prop, entry) {
n = ext_prop->data_len +
ext_prop->name_len + 14;
if (count + n >= USB_COMP_EP0_OS_DESC_BUFSIZ)
return count;
usb_ext_prop_put_size(buf, n);
usb_ext_prop_put_type(buf, ext_prop->type);
ret = usb_ext_prop_put_name(buf, ext_prop->name,
ext_prop->name_len);
if (ret < 0)
return ret;
switch (ext_prop->type) {
case USB_EXT_PROP_UNICODE:
case USB_EXT_PROP_UNICODE_ENV:
case USB_EXT_PROP_UNICODE_LINK:
usb_ext_prop_put_unicode(buf, ret,
ext_prop->data,
ext_prop->data_len);
break;
case USB_EXT_PROP_BINARY:
usb_ext_prop_put_binary(buf, ret,
ext_prop->data,
ext_prop->data_len);
break;
case USB_EXT_PROP_LE32:
/* not implemented */
case USB_EXT_PROP_BE32:
/* not implemented */
default:
return -EINVAL;
}
buf += n;
count += n;
}
}
return count;
}
| 0
|
346,431
|
cmd_source(char_u *fname, exarg_T *eap)
{
int clearvars = FALSE;
if (*fname != NUL && STRNCMP(fname, "++clear", 7) == 0)
{
// ++clear argument is supplied
clearvars = TRUE;
fname = fname + 7;
if (*fname != NUL)
{
semsg(_(e_invalid_argument_str), eap->arg);
return;
}
}
if (*fname != NUL && eap != NULL && eap->addr_count > 0)
{
// if a filename is specified to :source, then a range is not allowed
emsg(_(e_no_range_allowed));
return;
}
if (eap != NULL && *fname == NUL)
{
if (eap->forceit)
// a file name is needed to source normal mode commands
emsg(_(e_argument_required));
else
// source ex commands from the current buffer
do_source_ext(NULL, FALSE, FALSE, NULL, eap, clearvars);
}
else if (eap != NULL && eap->forceit)
// ":source!": read Normal mode commands
// Need to execute the commands directly. This is required at least
// for:
// - ":g" command busy
// - after ":argdo", ":windo" or ":bufdo"
// - another command follows
// - inside a loop
openscript(fname, global_busy || listcmd_busy || eap->nextcmd != NULL
#ifdef FEAT_EVAL
|| eap->cstack->cs_idx >= 0
#endif
);
// ":source" read ex commands
else if (do_source(fname, FALSE, DOSO_NONE, NULL) == FAIL)
semsg(_(e_cant_open_file_str), fname);
}
| 0
|
274,629
|
cupsdInitCerts(void)
{
#ifndef HAVE_ARC4RANDOM
cups_file_t *fp; /* /dev/random file */
/*
* Initialize the random number generator using the random device or
* the current time, as available...
*/
if ((fp = cupsFileOpen("/dev/urandom", "rb")) == NULL)
{
struct timeval tod; /* Time of day */
/*
* Get the time in usecs and use it as the initial seed...
*/
gettimeofday(&tod, NULL);
CUPS_SRAND((unsigned)(tod.tv_sec + tod.tv_usec));
}
else
{
unsigned seed; /* Seed for random number generator */
/*
* Read 4 random characters from the random device and use
* them as the seed...
*/
seed = (unsigned)cupsFileGetChar(fp);
seed = (seed << 8) | (unsigned)cupsFileGetChar(fp);
seed = (seed << 8) | (unsigned)cupsFileGetChar(fp);
CUPS_SRAND((seed << 8) | (unsigned)cupsFileGetChar(fp));
cupsFileClose(fp);
}
#endif /* !HAVE_ARC4RANDOM */
/*
* Create a root certificate and return...
*/
if (!RunUser)
cupsdAddCert(0, "root", cupsdDefaultAuthType());
}
| 0
|
476,121
|
static void update_unchanged_dev_desc(struct usb_device_descriptor *new,
const struct usb_device_descriptor *old)
{
__le16 idVendor;
__le16 idProduct;
__le16 bcdDevice;
u8 iSerialNumber;
u8 iManufacturer;
u8 iProduct;
/*
* these variables may have been set in
* usb_composite_overwrite_options()
*/
idVendor = new->idVendor;
idProduct = new->idProduct;
bcdDevice = new->bcdDevice;
iSerialNumber = new->iSerialNumber;
iManufacturer = new->iManufacturer;
iProduct = new->iProduct;
*new = *old;
if (idVendor)
new->idVendor = idVendor;
if (idProduct)
new->idProduct = idProduct;
if (bcdDevice)
new->bcdDevice = bcdDevice;
else
new->bcdDevice = cpu_to_le16(get_default_bcdDevice());
if (iSerialNumber)
new->iSerialNumber = iSerialNumber;
if (iManufacturer)
new->iManufacturer = iManufacturer;
if (iProduct)
new->iProduct = iProduct;
}
| 0
|
413,617
|
static int fcn_print_json(RCore *core, RAnalFunction *fcn, PJ *pj) {
RListIter *iter;
RAnalRef *refi;
RList *refs, *xrefs;
if (!pj) {
return -1;
}
int ebbs = 0;
pj_o (pj);
pj_kn (pj, "offset", fcn->addr);
char *name = r_core_anal_fcn_name (core, fcn);
if (name) {
pj_ks (pj, "name", name);
}
pj_kn (pj, "size", r_anal_function_linear_size (fcn));
pj_ks (pj, "is-pure", r_str_bool (r_anal_function_purity (fcn)));
pj_kn (pj, "realsz", r_anal_function_realsize (fcn));
pj_kb (pj, "noreturn", fcn->is_noreturn);
pj_ki (pj, "stackframe", fcn->maxstack);
if (fcn->cc) {
pj_ks (pj, "calltype", fcn->cc); // calling conventions
}
pj_ki (pj, "cost", r_anal_function_cost (fcn)); // execution cost
pj_ki (pj, "cc", r_anal_function_complexity (fcn)); // cyclic cost
pj_ki (pj, "bits", fcn->bits);
pj_ks (pj, "type", r_anal_functiontype_tostring (fcn->type));
pj_ki (pj, "nbbs", r_list_length (fcn->bbs));
pj_ki (pj, "edges", r_anal_function_count_edges (fcn, &ebbs));
pj_ki (pj, "ebbs", ebbs);
{
char *sig = r_core_cmd_strf (core, "afcf @ 0x%"PFMT64x, fcn->addr);
if (sig) {
r_str_trim (sig);
pj_ks (pj, "signature", sig);
free (sig);
}
}
pj_kn (pj, "minbound", r_anal_function_min_addr (fcn));
pj_kn (pj, "maxbound", r_anal_function_max_addr (fcn));
int outdegree = 0;
refs = r_anal_function_get_refs (fcn);
if (!r_list_empty (refs)) {
pj_k (pj, "callrefs");
pj_a (pj);
r_list_foreach (refs, iter, refi) {
if (refi->type == R_ANAL_REF_TYPE_CALL) {
outdegree++;
}
if (refi->type == R_ANAL_REF_TYPE_CODE ||
refi->type == R_ANAL_REF_TYPE_CALL) {
pj_o (pj);
pj_kn (pj, "addr", refi->addr);
pj_ks (pj, "type", r_anal_xrefs_type_tostring (refi->type));
pj_kn (pj, "at", refi->at);
pj_end (pj);
}
}
pj_end (pj);
pj_k (pj, "datarefs");
pj_a (pj);
r_list_foreach (refs, iter, refi) {
if (refi->type == R_ANAL_REF_TYPE_DATA) {
pj_n (pj, refi->addr);
}
}
pj_end (pj);
}
r_list_free (refs);
int indegree = 0;
xrefs = r_anal_function_get_xrefs (fcn);
if (!r_list_empty (xrefs)) {
pj_k (pj, "codexrefs");
pj_a (pj);
r_list_foreach (xrefs, iter, refi) {
if (refi->type == R_ANAL_REF_TYPE_CODE ||
refi->type == R_ANAL_REF_TYPE_CALL) {
indegree++;
pj_o (pj);
pj_kn (pj, "addr", refi->addr);
pj_ks (pj, "type", r_anal_xrefs_type_tostring (refi->type));
pj_kn (pj, "at", refi->at);
pj_end (pj);
}
}
pj_end (pj);
pj_k (pj, "dataxrefs");
pj_a (pj);
r_list_foreach (xrefs, iter, refi) {
if (refi->type == R_ANAL_REF_TYPE_DATA) {
pj_n (pj, refi->addr);
}
}
pj_end (pj);
}
r_list_free (xrefs);
pj_ki (pj, "indegree", indegree);
pj_ki (pj, "outdegree", outdegree);
if (fcn->type == R_ANAL_FCN_TYPE_FCN || fcn->type == R_ANAL_FCN_TYPE_SYM) {
pj_ki (pj, "nlocals", r_anal_var_count_locals (fcn));
pj_ki (pj, "nargs", r_anal_var_count_args (fcn));
pj_k (pj, "bpvars");
r_anal_var_list_show (core->anal, fcn, 'b', 'j', pj);
pj_k (pj, "spvars");
r_anal_var_list_show (core->anal, fcn, 's', 'j', pj);
pj_k (pj, "regvars");
r_anal_var_list_show (core->anal, fcn, 'r', 'j', pj);
pj_ks (pj, "difftype", fcn->diff->type == R_ANAL_DIFF_TYPE_MATCH?"match":
fcn->diff->type == R_ANAL_DIFF_TYPE_UNMATCH?"unmatch":"new");
if (fcn->diff->addr != -1) {
pj_kn (pj, "diffaddr", fcn->diff->addr);
}
if (fcn->diff->name) {
pj_ks (pj, "diffname", fcn->diff->name);
}
}
pj_end (pj);
free (name);
return 0;
}
| 0
|
90,904
|
bool SortByHost(const GURL& lhs, const GURL& rhs) {
return net::GetHostOrSpecFromURL(lhs) > net::GetHostOrSpecFromURL(rhs);
}
| 0
|
263,508
|
static int sco_sock_create(struct net *net, struct socket *sock, int protocol,
int kern)
{
struct sock *sk;
BT_DBG("sock %p", sock);
sock->state = SS_UNCONNECTED;
if (sock->type != SOCK_SEQPACKET)
return -ESOCKTNOSUPPORT;
sock->ops = &sco_sock_ops;
sk = sco_sock_alloc(net, sock, protocol, GFP_ATOMIC, kern);
if (!sk)
return -ENOMEM;
sco_sock_init(sk, NULL);
return 0;
}
| 0
|
232,350
|
void gf_isom_box_array_del_parent(GF_List **child_boxes, GF_List *boxlist)
{
if (!boxlist) return;
gf_isom_box_array_reset_parent(child_boxes, boxlist);
gf_list_del(boxlist);
}
| 0
|
229,245
|
future<fragmented_temporary_buffer> cql_server::connection::read_and_decompress_frame(size_t length, uint8_t flags)
{
using namespace compression_buffers;
if (flags & cql_frame_flags::compression) {
if (_compression == cql_compression::lz4) {
if (length < 4) {
throw std::runtime_error(fmt::format("CQL frame truncated: expected to have at least 4 bytes, got {}", length));
}
return _buffer_reader.read_exactly(_read_buf, length).then([this] (fragmented_temporary_buffer buf) {
auto linearization_buffer = bytes_ostream();
int32_t uncomp_len = request_reader(buf.get_istream(), linearization_buffer).read_int();
if (uncomp_len < 0) {
throw std::runtime_error("CQL frame uncompressed length is negative: " + std::to_string(uncomp_len));
}
buf.remove_prefix(4);
auto in = input_buffer.get_linearized_view(fragmented_temporary_buffer::view(buf));
auto uncomp = output_buffer.make_fragmented_temporary_buffer(uncomp_len, fragmented_temporary_buffer::default_fragment_size, [&] (bytes_mutable_view out) {
auto ret = LZ4_decompress_safe(reinterpret_cast<const char*>(in.data()), reinterpret_cast<char*>(out.data()),
in.size(), out.size());
if (ret < 0) {
throw std::runtime_error("CQL frame LZ4 uncompression failure");
}
if (ret != out.size()) {
throw std::runtime_error("Malformed CQL frame - provided uncompressed size different than real uncompressed size");
}
return static_cast<size_t>(ret);
});
on_compression_buffer_use();
return uncomp;
});
} else if (_compression == cql_compression::snappy) {
return _buffer_reader.read_exactly(_read_buf, length).then([this] (fragmented_temporary_buffer buf) {
auto in = input_buffer.get_linearized_view(fragmented_temporary_buffer::view(buf));
size_t uncomp_len;
if (snappy_uncompressed_length(reinterpret_cast<const char*>(in.data()), in.size(), &uncomp_len) != SNAPPY_OK) {
throw std::runtime_error("CQL frame Snappy uncompressed size is unknown");
}
auto uncomp = output_buffer.make_fragmented_temporary_buffer(uncomp_len, fragmented_temporary_buffer::default_fragment_size, [&] (bytes_mutable_view out) {
size_t output_len = out.size();
if (snappy_uncompress(reinterpret_cast<const char*>(in.data()), in.size(), reinterpret_cast<char*>(out.data()), &output_len) != SNAPPY_OK) {
throw std::runtime_error("CQL frame Snappy uncompression failure");
}
return output_len;
});
on_compression_buffer_use();
return uncomp;
});
} else {
throw exceptions::protocol_exception(format("Unknown compression algorithm"));
}
}
return _buffer_reader.read_exactly(_read_buf, length);
}
| 0
|
385,898
|
struct file *file_open_root(struct dentry *dentry, struct vfsmount *mnt,
const char *filename, int flags)
{
struct open_flags op;
int err = build_open_flags(flags, 0, &op);
if (err)
return ERR_PTR(err);
if (flags & O_CREAT)
return ERR_PTR(-EINVAL);
if (!filename && (flags & O_DIRECTORY))
if (!dentry->d_inode->i_op->lookup)
return ERR_PTR(-ENOTDIR);
return do_file_open_root(dentry, mnt, filename, &op);
}
| 0
|
226,407
|
GF_Err tpyl_box_size(GF_Box *s)
{
s->size += 8;
return GF_OK;
}
| 0
|
233,862
|
void fmtutil_macbitmap_read_pixmap_only_fields(deark *c, dbuf *f, struct fmtutil_macbitmap_info *bi,
i64 pos)
{
i64 pixmap_version;
i64 pack_size;
i64 plane_bytes;
i64 n;
de_dbg(c, "additional PixMap header fields, at %d", (int)pos);
de_dbg_indent(c, 1);
pixmap_version = dbuf_getu16be(f, pos+0);
de_dbg(c, "pixmap version: %d", (int)pixmap_version);
bi->packing_type = dbuf_getu16be(f, pos+2);
de_dbg(c, "packing type: %d", (int)bi->packing_type);
pack_size = dbuf_getu32be(f, pos+4);
de_dbg(c, "pixel data length: %d", (int)pack_size);
bi->hdpi = pict_read_fixed(f, pos+8);
bi->vdpi = pict_read_fixed(f, pos+12);
de_dbg(c, "dpi: %.2f"DE_CHAR_TIMES"%.2f", bi->hdpi, bi->vdpi);
bi->pixeltype = dbuf_getu16be(f, pos+16);
bi->pixelsize = dbuf_getu16be(f, pos+18);
bi->cmpcount = dbuf_getu16be(f, pos+20);
bi->cmpsize = dbuf_getu16be(f, pos+22);
de_dbg(c, "pixel type=%d, bits/pixel=%d, components/pixel=%d, bits/comp=%d",
(int)bi->pixeltype, (int)bi->pixelsize, (int)bi->cmpcount, (int)bi->cmpsize);
if(bi->pixelsize>0) {
bi->pdwidth = (bi->rowbytes*8)/bi->pixelsize;
}
if(bi->pdwidth < bi->npwidth) {
bi->pdwidth = bi->npwidth;
}
plane_bytes = dbuf_getu32be(f, pos+24);
de_dbg(c, "plane bytes: %d", (int)plane_bytes);
bi->pmTable = (u32)dbuf_getu32be(f, pos+28);
de_dbg(c, "pmTable: 0x%08x", (unsigned int)bi->pmTable);
n = dbuf_getu32be(f, pos+32);
de_dbg(c, "pmReserved: 0x%08x", (unsigned int)n);
de_dbg_indent(c, -1);
}
| 0
|
225,425
|
static int vidioc_querystd(struct file *file, void *fh, v4l2_std_id *norm)
{
if (norm)
*norm = V4L2_STD_ALL;
return 0;
}
| 0
|
309,845
|
_nc_mouse_inline(SCREEN *sp)
/* mouse report received in the keyboard stream -- parse its info */
{
bool result = FALSE;
MEVENT *eventp = sp->_mouse_eventp;
TR(MY_TRACE, ("_nc_mouse_inline() called"));
if (sp->_mouse_type == M_XTERM) {
switch (sp->_mouse_format) {
case MF_X10:
result = decode_xterm_X10(sp, eventp);
break;
case MF_SGR1006:
result = decode_xterm_SGR1006(sp, eventp);
break;
#ifdef EXP_XTERM_1005
case MF_XTERM_1005:
result = decode_xterm_1005(sp, eventp);
break;
#endif
}
TR(MY_TRACE,
("_nc_mouse_inline: primitive mouse-event %s has slot %ld",
_nc_tracemouse(sp, eventp),
(long) IndexEV(sp, eventp)));
/* bump the next-free pointer into the circular list */
sp->_mouse_eventp = NEXT(eventp);
if (!result) {
/* If this event is from a wheel-mouse, treat it like position
* reports and avoid waiting for the release-events which will
* never come.
*/
if (eventp->bstate & BUTTON_PRESSED) {
int b;
for (b = 4; b <= MAX_BUTTONS; ++b) {
if ((eventp->bstate & MASK_PRESS(b))) {
result = TRUE;
break;
}
}
}
}
}
return (result);
}
| 0
|
522,439
|
int flag2str_sh(int flag, char *flag_str) {
if (flag & 0x1)
flag_str[2] = 'W';
if (flag >> 1 & 0x1)
flag_str[1] = 'A';
if (flag >> 2 & 0x1)
flag_str[0] = 'E';
return 0;
}
| 0
|
459,151
|
static int tcf_block_owner_add(struct tcf_block *block,
struct Qdisc *q,
enum flow_block_binder_type binder_type)
{
struct tcf_block_owner_item *item;
item = kmalloc(sizeof(*item), GFP_KERNEL);
if (!item)
return -ENOMEM;
item->q = q;
item->binder_type = binder_type;
list_add(&item->list, &block->owner_list);
return 0;
}
| 0
|
224,164
|
explicit MapPeekOp(OpKernelConstruction* ctx) : OpKernel(ctx) {}
| 0
|
512,557
|
uchar *in_row::get_value(Item *item)
{
tmp.store_value(item);
if (item->is_null())
return 0;
return (uchar *)&tmp;
}
| 0
|
197,024
|
void Compute(OpKernelContext* ctx) override {
const Tensor& in0 = ctx->input(0);
const Tensor& in1 = ctx->input(1);
auto in0_flat = in0.flat<Tin>();
auto in1_flat = in1.flat<Tin>();
const Device& eigen_device = ctx->eigen_device<Device>();
Tensor* out = nullptr;
if (std::is_same<Tin, Tout>::value) {
OP_REQUIRES_OK(ctx, ctx->forward_input_or_allocate_output(
{0, 1}, 0, in0.shape(), &out));
} else {
OP_REQUIRES_OK(ctx, ctx->allocate_output(0, in0.shape(), &out));
}
auto out_flat = out->flat<Tout>();
functor::SimpleBinaryFunctor<Device, Functor>()(eigen_device, out_flat,
in0_flat, in1_flat);
}
| 1
|
242,933
|
static int ssl_next_record_is_in_datagram( mbedtls_ssl_context *ssl )
{
if( ssl->in_left > ssl->next_record_offset )
return( 1 );
return( 0 );
}
| 0
|
452,254
|
PHP_FUNCTION(xsl_xsltprocessor_set_security_prefs)
{
zval *id;
xsl_object *intern;
long securityPrefs, oldSecurityPrefs;
DOM_GET_THIS(id);
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &securityPrefs) == FAILURE) {
return;
}
intern = (xsl_object *)zend_object_store_get_object(id TSRMLS_CC);
oldSecurityPrefs = intern->securityPrefs;
intern->securityPrefs = securityPrefs;
/* set this to 1 so that we know, it was set through this method. Can be removed, when we remove the ini setting */
intern->securityPrefsSet = 1;
RETURN_LONG(oldSecurityPrefs);
}
| 0
|
339,725
|
static Bigint * multadd(Bigint *b, int m, int a) /* multiply by m and add a */
{
int i, wds;
ULong *x, y;
#ifdef Pack_32
ULong xi, z;
#endif
Bigint *b1;
wds = b->wds;
x = b->x;
i = 0;
do {
#ifdef Pack_32
xi = *x;
y = (xi & 0xffff) * m + a;
z = (xi >> 16) * m + (y >> 16);
a = (int)(z >> 16);
*x++ = (z << 16) + (y & 0xffff);
#else
y = *x * m + a;
a = (int)(y >> 16);
*x++ = y & 0xffff;
#endif
}
while(++i < wds);
if (a) {
if (wds >= b->maxwds) {
b1 = Balloc(b->k+1);
Bcopy(b1, b);
Bfree(b);
b = b1;
}
b->x[wds++] = a;
b->wds = wds;
}
return b;
}
| 0
|
513,163
|
static unsigned long *mysql_sys_var_ulong(THD* thd, int offset)
{
return (unsigned long *) intern_sys_var_ptr(thd, offset, true);
}
| 0
|
369,362
|
static inline void io_req_set_refcount(struct io_kiocb *req)
{
__io_req_set_refcount(req, 1);
}
| 0
|
415,180
|
cmd_random (assuan_context_t ctx, char *line)
{
ctrl_t ctrl = assuan_get_pointer (ctx);
int rc;
size_t nbytes;
unsigned char *buffer;
if (!*line)
return set_error (GPG_ERR_ASS_PARAMETER,
"number of requested bytes missing");
nbytes = strtoul (line, NULL, 0);
if ((rc = open_card (ctrl, NULL)))
return rc;
if (!ctrl->app_ctx)
return gpg_error (GPG_ERR_UNSUPPORTED_OPERATION);
buffer = xtrymalloc (nbytes);
if (!buffer)
return out_of_core ();
rc = app_get_challenge (ctrl->app_ctx, nbytes, buffer);
if (!rc)
{
rc = assuan_send_data (ctx, buffer, nbytes);
xfree (buffer);
return rc; /* that is already an assuan error code */
}
xfree (buffer);
TEST_CARD_REMOVAL (ctrl, rc);
return rc;
}
| 0
|
95,905
|
void AddUninstallShortcutWorkItems(const InstallerState& installer_state,
const FilePath& setup_path,
const Version& new_version,
WorkItemList* install_list,
const Product& product) {
HKEY reg_root = installer_state.root_key();
BrowserDistribution* browser_dist = product.distribution();
DCHECK(browser_dist);
FilePath install_path(installer_state.target_path());
FilePath installer_path(installer_state.GetInstallerDirectory(new_version));
installer_path = installer_path.Append(setup_path.BaseName());
CommandLine uninstall_arguments(CommandLine::NO_PROGRAM);
AppendUninstallCommandLineFlags(installer_state, product,
&uninstall_arguments);
if (product.is_chrome() &&
installer_state.operation() != InstallerState::UNINSTALL) {
const Products& products = installer_state.products();
for (size_t i = 0; i < products.size(); ++i) {
const Product& p = *products[i];
if (!p.is_chrome() && !p.ShouldCreateUninstallEntry())
p.AppendUninstallFlags(&uninstall_arguments);
}
}
std::wstring update_state_key(browser_dist->GetStateKey());
install_list->AddCreateRegKeyWorkItem(reg_root, update_state_key);
install_list->AddSetRegValueWorkItem(reg_root, update_state_key,
installer::kUninstallStringField, installer_path.value(), true);
install_list->AddSetRegValueWorkItem(reg_root, update_state_key,
installer::kUninstallArgumentsField,
uninstall_arguments.command_line_string(), true);
if (!installer_state.is_msi() && product.ShouldCreateUninstallEntry()) {
CommandLine quoted_uninstall_cmd(installer_path);
DCHECK_EQ(quoted_uninstall_cmd.command_line_string()[0], '"');
quoted_uninstall_cmd.AppendArguments(uninstall_arguments, false);
std::wstring uninstall_reg = browser_dist->GetUninstallRegPath();
install_list->AddCreateRegKeyWorkItem(reg_root, uninstall_reg);
install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg,
installer::kUninstallDisplayNameField,
browser_dist->GetAppShortCutName(), true);
install_list->AddSetRegValueWorkItem(reg_root,
uninstall_reg, installer::kUninstallStringField,
quoted_uninstall_cmd.command_line_string(), true);
install_list->AddSetRegValueWorkItem(reg_root,
uninstall_reg,
L"InstallLocation",
install_path.value(),
true);
FilePath chrome_icon(install_path.Append(installer::kChromeExe));
ShellUtil::GetChromeIcon(product.distribution(), chrome_icon.value());
install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg,
L"DisplayIcon", chrome_icon.value(),
true);
install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg,
L"NoModify", static_cast<DWORD>(1),
true);
install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg,
L"NoRepair", static_cast<DWORD>(1),
true);
install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg,
L"Publisher",
browser_dist->GetPublisherName(),
true);
install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg,
L"Version",
UTF8ToWide(new_version.GetString()),
true);
install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg,
L"DisplayVersion",
UTF8ToWide(new_version.GetString()),
true);
install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg,
L"InstallDate",
InstallUtil::GetCurrentDate(),
false);
}
}
| 0
|
274,874
|
TEST(ComparisonsTest, QuantizedUInt8GreaterWithBroadcast) {
const float kMin = -1.f;
const float kMax = 128.f;
std::vector<std::vector<int>> test_shapes = {
{6}, {2, 3}, {2, 1, 3}, {1, 3, 1, 2}};
for (int i = 0; i < test_shapes.size(); ++i) {
ComparisonOpModel model({TensorType_UINT8, test_shapes[i], kMin, kMax},
{TensorType_UINT8, {}, kMin, kMax},
TensorType_UINT8, BuiltinOperator_GREATER);
model.QuantizeAndPopulate<uint8_t>(model.input1(), {20, 2, 7, 8, 11, 20});
model.QuantizeAndPopulate<uint8_t>(model.input2(), {8});
model.Invoke();
EXPECT_THAT(model.GetOutput(),
ElementsAre(true, false, false, false, true, true))
<< "With shape number " << i;
}
}
| 0
|
329,876
|
_blit_xrgb32_lerp_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;
if (num_spans == 0)
return CAIRO_STATUS_SUCCESS;
if (likely(h == 1)) {
uint8_t *src = r->u.blit.src_data + y*r->u.blit.src_stride;
uint8_t *dst = r->u.blit.data + y*r->u.blit.stride;
do {
uint8_t a = mul8_8 (spans[0].coverage, r->bpp);
if (a) {
uint32_t *s = (uint32_t*)src + spans[0].x;
uint32_t *d = (uint32_t*)dst + spans[0].x;
int len = spans[1].x - spans[0].x;
if (a == 0xff) {
if (len == 1)
*d = *s;
else
memcpy(d, s, len*4);
} else {
while (len-- > 0) {
*d = lerp8x4 (*s, a, *d);
s++, d++;
}
}
}
spans++;
} while (--num_spans > 1);
} else {
do {
uint8_t a = mul8_8 (spans[0].coverage, r->bpp);
if (a) {
int yy = y, hh = h;
do {
uint32_t *s = (uint32_t *)(r->u.blit.src_data + yy*r->u.blit.src_stride + spans[0].x * 4);
uint32_t *d = (uint32_t *)(r->u.blit.data + yy*r->u.blit.stride + spans[0].x * 4);
int len = spans[1].x - spans[0].x;
if (a == 0xff) {
if (len == 1)
*d = *s;
else
memcpy(d, s, len * 4);
} else {
while (len-- > 0) {
*d = lerp8x4 (*s, a, *d);
s++, d++;
}
}
yy++;
} while (--hh);
}
spans++;
} while (--num_spans > 1);
}
return CAIRO_STATUS_SUCCESS;
}
| 0
|
482,529
|
passGetAttributes(CharsString *passLine, int *passLinepos,
TranslationTableCharacterAttributes *attributes, const FileInfo *file) {
int more = 1;
*attributes = 0;
while (more) {
switch (passLine->chars[*passLinepos]) {
case pass_any:
*attributes = 0xffffffff;
break;
case pass_digit:
*attributes |= CTC_Digit;
break;
case pass_litDigit:
*attributes |= CTC_LitDigit;
break;
case pass_letter:
*attributes |= CTC_Letter;
break;
case pass_math:
*attributes |= CTC_Math;
break;
case pass_punctuation:
*attributes |= CTC_Punctuation;
break;
case pass_sign:
*attributes |= CTC_Sign;
break;
case pass_space:
*attributes |= CTC_Space;
break;
case pass_uppercase:
*attributes |= CTC_UpperCase;
break;
case pass_lowercase:
*attributes |= CTC_LowerCase;
break;
case pass_class1:
*attributes |= CTC_UserDefined9;
break;
case pass_class2:
*attributes |= CTC_UserDefined10;
break;
case pass_class3:
*attributes |= CTC_UserDefined11;
break;
case pass_class4:
*attributes |= CTC_UserDefined12;
break;
default:
more = 0;
break;
}
if (more) (*passLinepos)++;
}
if (!*attributes) {
compileError(file, "missing attribute");
(*passLinepos)--;
return 0;
}
return 1;
}
| 0
|
310,146
|
scroll_idl(NCURSES_SP_DCLx int n, int del, int ins, NCURSES_CH_T blank)
{
int i;
if (!((parm_delete_line || delete_line) && (parm_insert_line || insert_line)))
return ERR;
GoTo(NCURSES_SP_ARGx del, 0);
UpdateAttrs(SP_PARM, blank);
if (n == 1 && delete_line) {
NCURSES_PUTP2("delete_line", delete_line);
} else if (parm_delete_line) {
TPUTS_TRACE("parm_delete_line");
NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
TIPARM_1(parm_delete_line, n),
n,
NCURSES_SP_NAME(_nc_outch));
} else { /* if (delete_line) */
for (i = 0; i < n; i++) {
NCURSES_PUTP2("delete_line", delete_line);
}
}
GoTo(NCURSES_SP_ARGx ins, 0);
UpdateAttrs(SP_PARM, blank);
if (n == 1 && insert_line) {
NCURSES_PUTP2("insert_line", insert_line);
} else if (parm_insert_line) {
TPUTS_TRACE("parm_insert_line");
NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
TIPARM_1(parm_insert_line, n),
n,
NCURSES_SP_NAME(_nc_outch));
} else { /* if (insert_line) */
for (i = 0; i < n; i++) {
NCURSES_PUTP2("insert_line", insert_line);
}
}
return OK;
}
| 0
|
291,841
|
static void free_permits(struct rtrs_clt_sess *clt)
{
if (clt->permits_map) {
size_t sz = clt->queue_depth;
wait_event(clt->permits_wait,
find_first_bit(clt->permits_map, sz) >= sz);
}
kfree(clt->permits_map);
clt->permits_map = NULL;
kfree(clt->permits);
clt->permits = NULL;
}
| 0
|
459,097
|
static void tc_cls_offload_cnt_update(struct tcf_block *block,
struct tcf_proto *tp, u32 *cnt,
u32 *flags, u32 diff, bool add)
{
lockdep_assert_held(&block->cb_lock);
spin_lock(&tp->lock);
if (add) {
if (!*cnt)
tcf_block_offload_inc(block, flags);
*cnt += diff;
} else {
*cnt -= diff;
if (!*cnt)
tcf_block_offload_dec(block, flags);
}
spin_unlock(&tp->lock);
}
| 0
|
406,209
|
static int table_parser_errcb(struct libmnt_table *tb __attribute__((__unused__)),
const char *filename, int line)
{
if (filename)
warnx(_("%s: parse error: ignore entry at line %d."),
filename, line);
return 0;
}
| 0
|
222,831
|
void GraphProperties::ClearInputProperties(const string& node_name) {
input_properties_.erase(node_name);
}
| 0
|
225,609
|
GF_Box *audio_sample_entry_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_MPEGAudioSampleEntryBox, GF_ISOM_BOX_TYPE_MP4A);
gf_isom_audio_sample_entry_init((GF_AudioSampleEntryBox*)tmp);
return (GF_Box *)tmp;
}
| 0
|
301,434
|
static NTSTATUS vfswrap_durable_cookie(struct vfs_handle_struct *handle,
struct files_struct *fsp,
TALLOC_CTX *mem_ctx,
DATA_BLOB *cookie)
{
return vfs_default_durable_cookie(fsp, mem_ctx, cookie);
}
| 0
|
498,113
|
void cgit_index_link(const char *name, const char *title, const char *class,
const char *pattern, const char *sort, int ofs, int always_root)
{
site_link(NULL, name, title, class, pattern, sort, ofs, always_root);
}
| 0
|
224,191
|
gen_call(codegen_scope *s, node *tree, int val, int safe)
{
mrb_sym sym = nsym(tree->cdr->car);
int skip = 0, n = 0, nk = 0, noop = no_optimize(s), noself = 0, blk = 0, sp_save = cursp();
if (!tree->car) {
noself = noop = 1;
push();
}
else {
codegen(s, tree->car, VAL); /* receiver */
}
if (safe) {
int recv = cursp()-1;
gen_move(s, cursp(), recv, 1);
skip = genjmp2_0(s, OP_JMPNIL, cursp(), val);
}
tree = tree->cdr->cdr->car;
if (tree) {
if (tree->car) { /* positional arguments */
n = gen_values(s, tree->car, VAL, 14);
if (n < 0) { /* variable length */
noop = 1; /* not operator */
n = 15;
push();
}
}
if (tree->cdr->car) { /* keyword arguments */
noop = 1;
nk = gen_hash(s, tree->cdr->car->cdr, VAL, 14);
if (nk < 0) nk = 15;
}
}
if (tree && tree->cdr && tree->cdr->cdr) {
codegen(s, tree->cdr->cdr, VAL);
pop();
noop = 1;
blk = 1;
}
push();pop();
s->sp = sp_save;
if (!noop && sym == MRB_OPSYM_2(s->mrb, add) && n == 1) {
gen_addsub(s, OP_ADD, cursp());
}
else if (!noop && sym == MRB_OPSYM_2(s->mrb, sub) && n == 1) {
gen_addsub(s, OP_SUB, cursp());
}
else if (!noop && sym == MRB_OPSYM_2(s->mrb, mul) && n == 1) {
gen_muldiv(s, OP_MUL, cursp());
}
else if (!noop && sym == MRB_OPSYM_2(s->mrb, div) && n == 1) {
gen_muldiv(s, OP_DIV, cursp());
}
else if (!noop && sym == MRB_OPSYM_2(s->mrb, lt) && n == 1) {
genop_1(s, OP_LT, cursp());
}
else if (!noop && sym == MRB_OPSYM_2(s->mrb, le) && n == 1) {
genop_1(s, OP_LE, cursp());
}
else if (!noop && sym == MRB_OPSYM_2(s->mrb, gt) && n == 1) {
genop_1(s, OP_GT, cursp());
}
else if (!noop && sym == MRB_OPSYM_2(s->mrb, ge) && n == 1) {
genop_1(s, OP_GE, cursp());
}
else if (!noop && sym == MRB_OPSYM_2(s->mrb, eq) && n == 1) {
genop_1(s, OP_EQ, cursp());
}
else if (!noop && sym == MRB_OPSYM_2(s->mrb, aset) && n == 2) {
genop_1(s, OP_SETIDX, cursp());
}
else if (!noop && n == 0 && gen_uniop(s, sym, cursp())) {
/* constant folding succeeded */
}
else if (!noop && n == 1 && gen_binop(s, sym, cursp())) {
/* constant folding succeeded */
}
else if (noself){
genop_3(s, blk ? OP_SSENDB : OP_SSEND, cursp(), new_sym(s, sym), n|(nk<<4));
}
else {
genop_3(s, blk ? OP_SENDB : OP_SEND, cursp(), new_sym(s, sym), n|(nk<<4));
}
if (safe) {
dispatch(s, skip);
}
if (val) {
push();
}
}
| 0
|
484,708
|
void mobi_buffer_getstring(char *str, MOBIBuffer *buf, const size_t len) {
if (!str) {
buf->error = MOBI_PARAM_ERR;
return;
}
if (buf->offset + len > buf->maxlen) {
debug_print("%s", "End of buffer\n");
buf->error = MOBI_BUFFER_END;
str[0] = '\0';
return;
}
memcpy(str, buf->data + buf->offset, len);
str[len] = '\0';
buf->offset += len;
}
| 0
|
466,132
|
static int em_sysexit(struct x86_emulate_ctxt *ctxt)
{
struct x86_emulate_ops *ops = ctxt->ops;
struct desc_struct cs, ss;
u64 msr_data;
int usermode;
u16 cs_sel = 0, ss_sel = 0;
/* inject #GP if in real mode or Virtual 8086 mode */
if (ctxt->mode == X86EMUL_MODE_REAL ||
ctxt->mode == X86EMUL_MODE_VM86)
return emulate_gp(ctxt, 0);
setup_syscalls_segments(ctxt, &cs, &ss);
if ((ctxt->rex_prefix & 0x8) != 0x0)
usermode = X86EMUL_MODE_PROT64;
else
usermode = X86EMUL_MODE_PROT32;
cs.dpl = 3;
ss.dpl = 3;
ops->get_msr(ctxt, MSR_IA32_SYSENTER_CS, &msr_data);
switch (usermode) {
case X86EMUL_MODE_PROT32:
cs_sel = (u16)(msr_data + 16);
if ((msr_data & 0xfffc) == 0x0)
return emulate_gp(ctxt, 0);
ss_sel = (u16)(msr_data + 24);
break;
case X86EMUL_MODE_PROT64:
cs_sel = (u16)(msr_data + 32);
if (msr_data == 0x0)
return emulate_gp(ctxt, 0);
ss_sel = cs_sel + 8;
cs.d = 0;
cs.l = 1;
break;
}
cs_sel |= SELECTOR_RPL_MASK;
ss_sel |= SELECTOR_RPL_MASK;
ops->set_segment(ctxt, cs_sel, &cs, 0, VCPU_SREG_CS);
ops->set_segment(ctxt, ss_sel, &ss, 0, VCPU_SREG_SS);
ctxt->_eip = ctxt->regs[VCPU_REGS_RDX];
ctxt->regs[VCPU_REGS_RSP] = ctxt->regs[VCPU_REGS_RCX];
return X86EMUL_CONTINUE;
}
| 0
|
473,941
|
set_optimize_exact_info(regex_t* reg, OptExactInfo* e)
{
int r;
if (e->len == 0) return 0;
if (e->ignore_case) {
reg->exact = (UChar* )xmalloc(e->len);
CHECK_NULL_RETURN_MEMERR(reg->exact);
xmemcpy(reg->exact, e->s, e->len);
reg->exact_end = reg->exact + e->len;
reg->optimize = ONIG_OPTIMIZE_EXACT_IC;
}
else {
int allow_reverse;
reg->exact = str_dup(e->s, e->s + e->len);
CHECK_NULL_RETURN_MEMERR(reg->exact);
reg->exact_end = reg->exact + e->len;
allow_reverse =
ONIGENC_IS_ALLOWED_REVERSE_MATCH(reg->enc, reg->exact, reg->exact_end);
if (e->len >= 3 || (e->len >= 2 && allow_reverse)) {
r = set_bm_skip(reg->exact, reg->exact_end, reg->enc,
reg->map, &(reg->int_map));
if (r) return r;
reg->optimize = (allow_reverse != 0
? ONIG_OPTIMIZE_EXACT_BM : ONIG_OPTIMIZE_EXACT_BM_NOT_REV);
}
else {
reg->optimize = ONIG_OPTIMIZE_EXACT;
}
}
reg->dmin = e->mmd.min;
reg->dmax = e->mmd.max;
if (reg->dmin != ONIG_INFINITE_DISTANCE) {
reg->threshold_len = (int)(reg->dmin + (reg->exact_end - reg->exact));
}
return 0;
}
| 0
|
437,408
|
vhost_user_set_inflight_fd(struct virtio_net **pdev, VhostUserMsg *msg,
int main_fd __rte_unused)
{
uint64_t mmap_size, mmap_offset;
uint16_t num_queues, queue_size;
uint32_t pervq_inflight_size;
struct virtio_net *dev = *pdev;
void *addr;
int fd;
fd = msg->fds[0];
if (msg->size != sizeof(msg->payload.inflight) || fd < 0) {
RTE_LOG(ERR, VHOST_CONFIG,
"invalid set_inflight_fd message size is %d,fd is %d\n",
msg->size, fd);
return RTE_VHOST_MSG_RESULT_ERR;
}
mmap_size = msg->payload.inflight.mmap_size;
mmap_offset = msg->payload.inflight.mmap_offset;
num_queues = msg->payload.inflight.num_queues;
queue_size = msg->payload.inflight.queue_size;
if (vq_is_packed(dev))
pervq_inflight_size = get_pervq_shm_size_packed(queue_size);
else
pervq_inflight_size = get_pervq_shm_size_split(queue_size);
RTE_LOG(INFO, VHOST_CONFIG,
"set_inflight_fd mmap_size: %"PRIu64"\n", mmap_size);
RTE_LOG(INFO, VHOST_CONFIG,
"set_inflight_fd mmap_offset: %"PRIu64"\n", mmap_offset);
RTE_LOG(INFO, VHOST_CONFIG,
"set_inflight_fd num_queues: %u\n", num_queues);
RTE_LOG(INFO, VHOST_CONFIG,
"set_inflight_fd queue_size: %u\n", queue_size);
RTE_LOG(INFO, VHOST_CONFIG,
"set_inflight_fd fd: %d\n", fd);
RTE_LOG(INFO, VHOST_CONFIG,
"set_inflight_fd pervq_inflight_size: %d\n",
pervq_inflight_size);
if (!dev->inflight_info) {
dev->inflight_info = calloc(1,
sizeof(struct inflight_mem_info));
if (dev->inflight_info == NULL) {
RTE_LOG(ERR, VHOST_CONFIG,
"failed to alloc dev inflight area\n");
return RTE_VHOST_MSG_RESULT_ERR;
}
}
if (dev->inflight_info->addr)
munmap(dev->inflight_info->addr, dev->inflight_info->size);
addr = mmap(0, mmap_size, PROT_READ | PROT_WRITE, MAP_SHARED,
fd, mmap_offset);
if (addr == MAP_FAILED) {
RTE_LOG(ERR, VHOST_CONFIG, "failed to mmap share memory.\n");
return RTE_VHOST_MSG_RESULT_ERR;
}
if (dev->inflight_info->fd)
close(dev->inflight_info->fd);
dev->inflight_info->fd = fd;
dev->inflight_info->addr = addr;
dev->inflight_info->size = mmap_size;
return RTE_VHOST_MSG_RESULT_OK;
}
| 0
|
359,459
|
DEFUN (neighbor_description,
neighbor_description_cmd,
NEIGHBOR_CMD2 "description .LINE",
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
"Neighbor specific description\n"
"Up to 80 characters describing this neighbor\n")
{
struct peer *peer;
char *str;
peer = peer_and_group_lookup_vty (vty, argv[0]);
if (! peer)
return CMD_WARNING;
if (argc == 1)
return CMD_SUCCESS;
str = argv_concat(argv, argc, 1);
peer_description_set (peer, str);
XFREE (MTYPE_TMP, str);
return CMD_SUCCESS;
}
| 0
|
488,682
|
void __cpuinit check_efer(void)
{
unsigned long efer;
rdmsrl(MSR_EFER, efer);
if (!(efer & EFER_NX) || do_not_nx) {
__supported_pte_mask &= ~_PAGE_NX;
}
}
| 0
|
484,794
|
static int checksum_setup(struct net_device *dev, struct sk_buff *skb)
{
bool recalculate_partial_csum = false;
/*
* A GSO SKB must be CHECKSUM_PARTIAL. However some buggy
* peers can fail to set NETRXF_csum_blank when sending a GSO
* frame. In this case force the SKB to CHECKSUM_PARTIAL and
* recalculate the partial checksum.
*/
if (skb->ip_summed != CHECKSUM_PARTIAL && skb_is_gso(skb)) {
struct netfront_info *np = netdev_priv(dev);
atomic_inc(&np->rx_gso_checksum_fixup);
skb->ip_summed = CHECKSUM_PARTIAL;
recalculate_partial_csum = true;
}
/* A non-CHECKSUM_PARTIAL SKB does not require setup. */
if (skb->ip_summed != CHECKSUM_PARTIAL)
return 0;
return skb_checksum_setup(skb, recalculate_partial_csum);
}
| 0
|
313,731
|
clearop(oparg_T *oap)
{
oap->op_type = OP_NOP;
oap->regname = 0;
oap->motion_force = NUL;
oap->use_reg_one = FALSE;
motion_force = NUL;
}
| 0
|
359,593
|
DEFUN (clear_bgp_all_soft,
clear_bgp_all_soft_cmd,
"clear bgp * soft",
CLEAR_STR
BGP_STR
"Clear all peers\n"
"Soft reconfig\n")
{
if (argc == 1)
return bgp_clear_vty (vty, argv[0], AFI_IP6, SAFI_UNICAST, clear_all,
BGP_CLEAR_SOFT_BOTH, argv[0]);
return bgp_clear_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, clear_all,
BGP_CLEAR_SOFT_BOTH, argv[0]);
}
| 0
|
359,449
|
DEFUN (clear_ip_bgp_peer_group_ipv4_soft,
clear_ip_bgp_peer_group_ipv4_soft_cmd,
"clear ip bgp peer-group WORD ipv4 (unicast|multicast) soft",
CLEAR_STR
IP_STR
BGP_STR
"Clear all members of peer-group\n"
"BGP peer-group name\n"
"Address family\n"
"Address Family modifier\n"
"Address Family modifier\n"
"Soft reconfig\n")
{
if (strncmp (argv[1], "m", 1) == 0)
return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_MULTICAST, clear_group,
BGP_CLEAR_SOFT_BOTH, argv[0]);
return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UNICAST, clear_group,
BGP_CLEAR_SOFT_BOTH, argv[0]);
}
| 0
|
249,978
|
static GF_Err ShiftOffset(GF_ISOFile *file, GF_List *writers, u64 offset)
{
u32 i, j, k, l, last;
TrackWriter *writer;
GF_StscEntry *ent;
if (file->meta) ShiftMetaOffset(file->meta, offset);
if (file->moov && file->moov->meta) ShiftMetaOffset(file->moov->meta, offset);
i=0;
while ((writer = (TrackWriter *)gf_list_enum(writers, &i))) {
if (writer->mdia->mediaTrack->meta) ShiftMetaOffset(writer->mdia->mediaTrack->meta, offset);
//we have to proceed entry by entry in case a part of the media is not self-contained...
for (j=0; j<writer->stsc->nb_entries; j++) {
ent = &writer->stsc->entries[j];
if ((writer->all_dref_mode==ISOM_DREF_EXT) || !Media_IsSelfContained(writer->mdia, ent->sampleDescriptionIndex))
continue;
//OK, get the chunk(s) number(s) and "shift" its (their) offset(s).
if (writer->stco->type == GF_ISOM_BOX_TYPE_STCO) {
GF_ChunkLargeOffsetBox *new_stco64 = NULL;
GF_ChunkOffsetBox *stco = (GF_ChunkOffsetBox *) writer->stco;
//be carefull for the last entry, nextChunk is set to 0 in edit mode...
last = ent->nextChunk ? ent->nextChunk : stco->nb_entries + 1;
for (k = ent->firstChunk; k < last; k++) {
//we need to rewrite the table: only allocate co64 if not done previously and convert all offsets
//to co64. Then (whether co64 was created or not) adjust the offset
//Do not reassign table until we are done with the current sampleToChunk processing
//since we have a test on stco->offsets[k-1], we need to keep stco untouched
if (new_stco64 || file->force_co64 || (stco->offsets[k-1] + offset > 0xFFFFFFFF)) {
if (!new_stco64) {
new_stco64 = (GF_ChunkLargeOffsetBox *) gf_isom_box_new(GF_ISOM_BOX_TYPE_CO64);
if (!new_stco64) return GF_OUT_OF_MEM;
new_stco64->nb_entries = stco->nb_entries;
new_stco64->offsets = (u64 *) gf_malloc(new_stco64->nb_entries * sizeof(u64));
if (!new_stco64->offsets) return GF_OUT_OF_MEM;
//copy over the stco table
for (l = 0; l < new_stco64->nb_entries; l++) {
new_stco64->offsets[l] = (u64) stco->offsets[l];
}
}
new_stco64->offsets[k-1] += offset;
} else {
stco->offsets[k-1] += (u32) offset;
}
}
if (new_stco64) {
//done with this sampleToChunk entry, replace the box if we moved to co64
gf_isom_box_del(writer->stco);
writer->stco = (GF_Box *)new_stco64;
new_stco64 = NULL;
}
} else {
GF_ChunkLargeOffsetBox *stco64 = (GF_ChunkLargeOffsetBox *) writer->stco;
//be carefull for the last entry ...
last = ent->nextChunk ? ent->nextChunk : stco64->nb_entries + 1;
for (k = ent->firstChunk; k < last; k++) {
stco64->offsets[k-1] += offset;
}
}
}
}
return GF_OK;
}
| 0
|
369,342
|
static inline bool req_ref_inc_not_zero(struct io_kiocb *req)
{
WARN_ON_ONCE(!(req->flags & REQ_F_REFCOUNT));
return atomic_inc_not_zero(&req->refs);
}
| 0
|
432,288
|
bool cpu_physical_memory_is_io(AddressSpace *as, hwaddr phys_addr)
{
MemoryRegion*mr;
hwaddr l = 1;
bool res;
mr = address_space_translate(as,
phys_addr, &phys_addr, &l, false,
MEMTXATTRS_UNSPECIFIED);
res = !memory_region_is_ram(mr);
return res;
}
| 0
|
222,500
|
FunctionDefHelper::AttrValueWrapper FunctionDefHelper::FunctionRef(
const string& name,
gtl::ArraySlice<std::pair<string, AttrValueWrapper>> attrs) {
AttrValueWrapper ret;
ret.proto.mutable_func()->set_name(name);
for (const auto& a : attrs) {
ret.proto.mutable_func()->mutable_attr()->insert({a.first, a.second.proto});
}
return ret;
}
| 0
|
436,040
|
static int io_sendmsg(struct io_kiocb *req, unsigned int issue_flags)
{
struct io_async_msghdr iomsg, *kmsg;
struct socket *sock;
unsigned flags;
int min_ret = 0;
int ret;
sock = sock_from_file(req->file);
if (unlikely(!sock))
return -ENOTSOCK;
kmsg = req->async_data;
if (!kmsg) {
ret = io_sendmsg_copy_hdr(req, &iomsg);
if (ret)
return ret;
kmsg = &iomsg;
}
flags = req->sr_msg.msg_flags;
if (issue_flags & IO_URING_F_NONBLOCK)
flags |= MSG_DONTWAIT;
if (flags & MSG_WAITALL)
min_ret = iov_iter_count(&kmsg->msg.msg_iter);
ret = __sys_sendmsg_sock(sock, &kmsg->msg, flags);
if ((issue_flags & IO_URING_F_NONBLOCK) && ret == -EAGAIN)
return io_setup_async_msg(req, kmsg);
if (ret == -ERESTARTSYS)
ret = -EINTR;
/* fast path, check for non-NULL to avoid function call */
if (kmsg->free_iov)
kfree(kmsg->free_iov);
req->flags &= ~REQ_F_NEED_CLEANUP;
if (ret < min_ret)
req_set_fail(req);
__io_req_complete(req, issue_flags, ret, 0);
return 0;
}
| 0
|
318,955
|
f_test_gui_event(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
{
# ifdef FEAT_GUI
char_u *event;
rettv->v_type = VAR_BOOL;
rettv->vval.v_number = FALSE;
if (check_for_string_arg(argvars, 0) == FAIL
|| check_for_dict_arg(argvars, 1) == FAIL
|| argvars[1].vval.v_dict == NULL)
return;
event = tv_get_string(&argvars[0]);
if (STRCMP(event, "dropfiles") == 0)
rettv->vval.v_number = test_gui_drop_files(argvars[1].vval.v_dict);
# if defined(FIND_REPLACE_DIALOG)
else if (STRCMP(event, "findrepl") == 0)
rettv->vval.v_number = test_gui_find_repl(argvars[1].vval.v_dict);
# endif
else if (STRCMP(event, "mouse") == 0)
rettv->vval.v_number = test_gui_mouse_event(argvars[1].vval.v_dict);
else if (STRCMP(event, "scrollbar") == 0)
rettv->vval.v_number = test_gui_scrollbar(argvars[1].vval.v_dict);
else if (STRCMP(event, "tabline") == 0)
rettv->vval.v_number = test_gui_tabline_event(argvars[1].vval.v_dict);
else if (STRCMP(event, "tabmenu") == 0)
rettv->vval.v_number = test_gui_tabmenu_event(argvars[1].vval.v_dict);
else
{
semsg(_(e_invalid_argument_str), event);
return;
}
# endif
}
| 0
|
355,627
|
eval7t(
char_u **arg,
typval_T *rettv,
evalarg_T *evalarg,
int want_string) // after "." operator
{
type_T *want_type = NULL;
garray_T type_list; // list of pointers to allocated types
int res;
int evaluate = evalarg == NULL ? 0
: (evalarg->eval_flags & EVAL_EVALUATE);
// Recognize <type> in Vim9 script only.
if (in_vim9script() && **arg == '<' && eval_isnamec1((*arg)[1])
&& STRNCMP(*arg, "<SNR>", 5) != 0)
{
++*arg;
ga_init2(&type_list, sizeof(type_T *), 10);
want_type = parse_type(arg, &type_list, TRUE);
if (want_type == NULL && (evaluate || **arg != '>'))
{
clear_type_list(&type_list);
return FAIL;
}
if (**arg != '>')
{
if (*skipwhite(*arg) == '>')
semsg(_(e_no_white_space_allowed_before_str_str), ">", *arg);
else
emsg(_(e_missing_gt));
clear_type_list(&type_list);
return FAIL;
}
++*arg;
*arg = skipwhite_and_linebreak(*arg, evalarg);
}
res = eval7(arg, rettv, evalarg, want_string);
if (want_type != NULL && evaluate)
{
if (res == OK)
{
type_T *actual = typval2type(rettv, get_copyID(), &type_list,
TVTT_DO_MEMBER);
if (!equal_type(want_type, actual, 0))
{
if (want_type == &t_bool && actual != &t_bool
&& (actual->tt_flags & TTFLAG_BOOL_OK))
{
int n = tv2bool(rettv);
// can use "0" and "1" for boolean in some places
clear_tv(rettv);
rettv->v_type = VAR_BOOL;
rettv->vval.v_number = n ? VVAL_TRUE : VVAL_FALSE;
}
else
{
where_T where = WHERE_INIT;
where.wt_variable = TRUE;
res = check_type(want_type, actual, TRUE, where);
}
}
}
clear_type_list(&type_list);
}
return res;
}
| 0
|
204,535
|
stl_update_connects_remove_1(stl_file *stl, int facet_num) {
int j;
if (stl->error) return;
/* Update list of connected edges */
j = ((stl->neighbors_start[facet_num].neighbor[0] == -1) +
(stl->neighbors_start[facet_num].neighbor[1] == -1) +
(stl->neighbors_start[facet_num].neighbor[2] == -1));
if(j == 0) { /* Facet has 3 neighbors */
stl->stats.connected_facets_3_edge -= 1;
} else if(j == 1) { /* Facet has 2 neighbors */
stl->stats.connected_facets_2_edge -= 1;
} else if(j == 2) { /* Facet has 1 neighbor */
stl->stats.connected_facets_1_edge -= 1;
}
}
| 1
|
244,167
|
GF_Err strk_box_size(GF_Box *s)
{
return GF_OK;
}
| 0
|
275,940
|
static void bits2int(uECC_word_t *native,
const uint8_t *bits,
unsigned bits_size,
uECC_Curve curve) {
unsigned num_n_bytes = BITS_TO_BYTES(curve->num_n_bits);
unsigned num_n_words = BITS_TO_WORDS(curve->num_n_bits);
int shift;
uECC_word_t carry;
uECC_word_t *ptr;
if (bits_size > num_n_bytes) {
bits_size = num_n_bytes;
}
uECC_vli_clear(native, num_n_words);
#if uECC_VLI_NATIVE_LITTLE_ENDIAN
bcopy((uint8_t *) native, bits, bits_size);
#else
uECC_vli_bytesToNative(native, bits, bits_size);
#endif
if (bits_size * 8 <= (unsigned)curve->num_n_bits) {
return;
}
shift = bits_size * 8 - curve->num_n_bits;
carry = 0;
ptr = native + num_n_words;
while (ptr-- > native) {
uECC_word_t temp = *ptr;
*ptr = (temp >> shift) | carry;
carry = temp << (uECC_WORD_BITS - shift);
}
/* Reduce mod curve_n */
if (uECC_vli_cmp_unsafe(curve->n, native, num_n_words) != 1) {
uECC_vli_sub(native, native, curve->n, num_n_words);
}
}
| 0
|
465,857
|
static int nfcmrvl_nci_send(struct nci_dev *ndev, struct sk_buff *skb)
{
struct nfcmrvl_private *priv = nci_get_drvdata(ndev);
nfc_info(priv->dev, "send entry, len %d\n", skb->len);
skb->dev = (void *)ndev;
if (priv->config.hci_muxed) {
unsigned char *hdr;
unsigned char len = skb->len;
hdr = skb_push(skb, NFCMRVL_HCI_EVENT_HEADER_SIZE);
hdr[0] = NFCMRVL_HCI_COMMAND_CODE;
hdr[1] = NFCMRVL_HCI_OGF;
hdr[2] = NFCMRVL_HCI_OCF;
hdr[3] = len;
}
return priv->if_ops->nci_send(priv, skb);
}
| 0
|
436,136
|
static void kiocb_done(struct kiocb *kiocb, ssize_t ret,
unsigned int issue_flags)
{
struct io_kiocb *req = container_of(kiocb, struct io_kiocb, rw.kiocb);
struct io_async_rw *io = req->async_data;
bool check_reissue = kiocb->ki_complete == io_complete_rw;
/* add previously done IO, if any */
if (io && io->bytes_done > 0) {
if (ret < 0)
ret = io->bytes_done;
else
ret += io->bytes_done;
}
if (req->flags & REQ_F_CUR_POS)
req->file->f_pos = kiocb->ki_pos;
if (ret >= 0 && check_reissue)
__io_complete_rw(req, ret, 0, issue_flags);
else
io_rw_done(kiocb, ret);
if (check_reissue && (req->flags & REQ_F_REISSUE)) {
req->flags &= ~REQ_F_REISSUE;
if (io_resubmit_prep(req)) {
req_ref_get(req);
io_queue_async_work(req);
} else {
int cflags = 0;
req_set_fail(req);
if (req->flags & REQ_F_BUFFER_SELECTED)
cflags = io_put_rw_kbuf(req);
__io_req_complete(req, issue_flags, ret, cflags);
}
}
}
| 0
|
238,786
|
show_pat_in_path(
char_u *line,
int type,
int did_show,
int action,
FILE *fp,
linenr_T *lnum,
long count)
{
char_u *p;
if (did_show)
msg_putchar('\n'); // cursor below last one
else if (!msg_silent)
gotocmdline(TRUE); // cursor at status line
if (got_int) // 'q' typed at "--more--" message
return;
for (;;)
{
p = line + STRLEN(line) - 1;
if (fp != NULL)
{
// We used fgets(), so get rid of newline at end
if (p >= line && *p == '\n')
--p;
if (p >= line && *p == '\r')
--p;
*(p + 1) = NUL;
}
if (action == ACTION_SHOW_ALL)
{
sprintf((char *)IObuff, "%3ld: ", count); // show match nr
msg_puts((char *)IObuff);
sprintf((char *)IObuff, "%4ld", *lnum); // show line nr
// Highlight line numbers
msg_puts_attr((char *)IObuff, HL_ATTR(HLF_N));
msg_puts(" ");
}
msg_prt_line(line, FALSE);
out_flush(); // show one line at a time
// Definition continues until line that doesn't end with '\'
if (got_int || type != FIND_DEFINE || p < line || *p != '\\')
break;
if (fp != NULL)
{
if (vim_fgets(line, LSIZE, fp)) // end of file
break;
++*lnum;
}
else
{
if (++*lnum > curbuf->b_ml.ml_line_count)
break;
line = ml_get(*lnum);
}
msg_putchar('\n');
}
}
| 0
|
326,117
|
reg_equi_class(int c)
{
if (enc_utf8 || STRCMP(p_enc, "latin1") == 0
|| STRCMP(p_enc, "iso-8859-15") == 0)
{
switch (c)
{
// Do not use '\300' style, it results in a negative number.
case 'A': case 0xc0: case 0xc1: case 0xc2: case 0xc3: case 0xc4:
case 0xc5: case 0x100: case 0x102: case 0x104: case 0x1cd:
case 0x1de: case 0x1e0: case 0x1fa: case 0x202: case 0x226:
case 0x23a: case 0x1e00: case 0x1ea0: case 0x1ea2: case 0x1ea4:
case 0x1ea6: case 0x1ea8: case 0x1eaa: case 0x1eac: case 0x1eae:
case 0x1eb0: case 0x1eb2: case 0x1eb4: case 0x1eb6:
regmbc('A'); regmbc(0xc0); regmbc(0xc1); regmbc(0xc2);
regmbc(0xc3); regmbc(0xc4); regmbc(0xc5);
regmbc(0x100); regmbc(0x102); regmbc(0x104);
regmbc(0x1cd); regmbc(0x1de); regmbc(0x1e0);
regmbc(0x1fa); regmbc(0x202); regmbc(0x226);
regmbc(0x23a); regmbc(0x1e00); regmbc(0x1ea0);
regmbc(0x1ea2); regmbc(0x1ea4); regmbc(0x1ea6);
regmbc(0x1ea8); regmbc(0x1eaa); regmbc(0x1eac);
regmbc(0x1eae); regmbc(0x1eb0); regmbc(0x1eb2);
regmbc(0x1eb4); regmbc(0x1eb6);
return;
case 'B': case 0x181: case 0x243: case 0x1e02:
case 0x1e04: case 0x1e06:
regmbc('B');
regmbc(0x181); regmbc(0x243); regmbc(0x1e02);
regmbc(0x1e04); regmbc(0x1e06);
return;
case 'C': case 0xc7:
case 0x106: case 0x108: case 0x10a: case 0x10c: case 0x187:
case 0x23b: case 0x1e08: case 0xa792:
regmbc('C'); regmbc(0xc7);
regmbc(0x106); regmbc(0x108); regmbc(0x10a);
regmbc(0x10c); regmbc(0x187); regmbc(0x23b);
regmbc(0x1e08); regmbc(0xa792);
return;
case 'D': case 0x10e: case 0x110: case 0x18a:
case 0x1e0a: case 0x1e0c: case 0x1e0e: case 0x1e10:
case 0x1e12:
regmbc('D'); regmbc(0x10e); regmbc(0x110);
regmbc(0x18a); regmbc(0x1e0a); regmbc(0x1e0c);
regmbc(0x1e0e); regmbc(0x1e10); regmbc(0x1e12);
return;
case 'E': case 0xc8: case 0xc9: case 0xca: case 0xcb:
case 0x112: case 0x114: case 0x116: case 0x118: case 0x11a:
case 0x204: case 0x206: case 0x228: case 0x246: case 0x1e14:
case 0x1e16: case 0x1e18: case 0x1e1a: case 0x1e1c:
case 0x1eb8: case 0x1eba: case 0x1ebc: case 0x1ebe:
case 0x1ec0: case 0x1ec2: case 0x1ec4: case 0x1ec6:
regmbc('E'); regmbc(0xc8); regmbc(0xc9);
regmbc(0xca); regmbc(0xcb); regmbc(0x112);
regmbc(0x114); regmbc(0x116); regmbc(0x118);
regmbc(0x11a); regmbc(0x204); regmbc(0x206);
regmbc(0x228); regmbc(0x246); regmbc(0x1e14);
regmbc(0x1e16); regmbc(0x1e18); regmbc(0x1e1a);
regmbc(0x1e1c); regmbc(0x1eb8); regmbc(0x1eba);
regmbc(0x1ebc); regmbc(0x1ebe); regmbc(0x1ec0);
regmbc(0x1ec2); regmbc(0x1ec4); regmbc(0x1ec6);
return;
case 'F': case 0x191: case 0x1e1e: case 0xa798:
regmbc('F'); regmbc(0x191); regmbc(0x1e1e);
regmbc(0xa798);
return;
case 'G': case 0x11c: case 0x11e: case 0x120:
case 0x122: case 0x193: case 0x1e4: case 0x1e6:
case 0x1f4: case 0x1e20: case 0xa7a0:
regmbc('G'); regmbc(0x11c); regmbc(0x11e);
regmbc(0x120); regmbc(0x122); regmbc(0x193);
regmbc(0x1e4); regmbc(0x1e6); regmbc(0x1f4);
regmbc(0x1e20); regmbc(0xa7a0);
return;
case 'H': case 0x124: case 0x126: case 0x21e:
case 0x1e22: case 0x1e24: case 0x1e26:
case 0x1e28: case 0x1e2a: case 0x2c67:
regmbc('H'); regmbc(0x124); regmbc(0x126);
regmbc(0x21e); regmbc(0x1e22); regmbc(0x1e24);
regmbc(0x1e26); regmbc(0x1e28); regmbc(0x1e2a);
regmbc(0x2c67);
return;
case 'I': case 0xcc: case 0xcd: case 0xce: case 0xcf:
case 0x128: case 0x12a: case 0x12c: case 0x12e:
case 0x130: case 0x197: case 0x1cf: case 0x208:
case 0x20a: case 0x1e2c: case 0x1e2e: case 0x1ec8:
case 0x1eca:
regmbc('I'); regmbc(0xcc); regmbc(0xcd);
regmbc(0xce); regmbc(0xcf); regmbc(0x128);
regmbc(0x12a); regmbc(0x12c); regmbc(0x12e);
regmbc(0x130); regmbc(0x197); regmbc(0x1cf);
regmbc(0x208); regmbc(0x20a); regmbc(0x1e2c);
regmbc(0x1e2e); regmbc(0x1ec8); regmbc(0x1eca);
return;
case 'J': case 0x134: case 0x248:
regmbc('J'); regmbc(0x134); regmbc(0x248);
return;
case 'K': case 0x136: case 0x198: case 0x1e8: case 0x1e30:
case 0x1e32: case 0x1e34: case 0x2c69: case 0xa740:
regmbc('K'); regmbc(0x136); regmbc(0x198);
regmbc(0x1e8); regmbc(0x1e30); regmbc(0x1e32);
regmbc(0x1e34); regmbc(0x2c69); regmbc(0xa740);
return;
case 'L': case 0x139: case 0x13b: case 0x13d: case 0x13f:
case 0x141: case 0x23d: case 0x1e36: case 0x1e38:
case 0x1e3a: case 0x1e3c: case 0x2c60:
regmbc('L'); regmbc(0x139); regmbc(0x13b);
regmbc(0x13d); regmbc(0x13f); regmbc(0x141);
regmbc(0x23d); regmbc(0x1e36); regmbc(0x1e38);
regmbc(0x1e3a); regmbc(0x1e3c); regmbc(0x2c60);
return;
case 'M': case 0x1e3e: case 0x1e40: case 0x1e42:
regmbc('M'); regmbc(0x1e3e); regmbc(0x1e40);
regmbc(0x1e42);
return;
case 'N': case 0xd1:
case 0x143: case 0x145: case 0x147: case 0x1f8:
case 0x1e44: case 0x1e46: case 0x1e48: case 0x1e4a:
case 0xa7a4:
regmbc('N'); regmbc(0xd1);
regmbc(0x143); regmbc(0x145); regmbc(0x147);
regmbc(0x1f8); regmbc(0x1e44); regmbc(0x1e46);
regmbc(0x1e48); regmbc(0x1e4a); regmbc(0xa7a4);
return;
case 'O': case 0xd2: case 0xd3: case 0xd4: case 0xd5: case 0xd6:
case 0xd8: case 0x14c: case 0x14e: case 0x150: case 0x19f:
case 0x1a0: case 0x1d1: case 0x1ea: case 0x1ec: case 0x1fe:
case 0x20c: case 0x20e: case 0x22a: case 0x22c: case 0x22e:
case 0x230: case 0x1e4c: case 0x1e4e: case 0x1e50: case 0x1e52:
case 0x1ecc: case 0x1ece: case 0x1ed0: case 0x1ed2: case 0x1ed4:
case 0x1ed6: case 0x1ed8: case 0x1eda: case 0x1edc: case 0x1ede:
case 0x1ee0: case 0x1ee2:
regmbc('O'); regmbc(0xd2); regmbc(0xd3); regmbc(0xd4);
regmbc(0xd5); regmbc(0xd6); regmbc(0xd8);
regmbc(0x14c); regmbc(0x14e); regmbc(0x150);
regmbc(0x19f); regmbc(0x1a0); regmbc(0x1d1);
regmbc(0x1ea); regmbc(0x1ec); regmbc(0x1fe);
regmbc(0x20c); regmbc(0x20e); regmbc(0x22a);
regmbc(0x22c); regmbc(0x22e); regmbc(0x230);
regmbc(0x1e4c); regmbc(0x1e4e); regmbc(0x1e50);
regmbc(0x1e52); regmbc(0x1ecc); regmbc(0x1ece);
regmbc(0x1ed0); regmbc(0x1ed2); regmbc(0x1ed4);
regmbc(0x1ed6); regmbc(0x1ed8); regmbc(0x1eda);
regmbc(0x1edc); regmbc(0x1ede); regmbc(0x1ee0);
regmbc(0x1ee2);
return;
case 'P': case 0x1a4: case 0x1e54: case 0x1e56: case 0x2c63:
regmbc('P'); regmbc(0x1a4); regmbc(0x1e54);
regmbc(0x1e56); regmbc(0x2c63);
return;
case 'Q': case 0x24a:
regmbc('Q'); regmbc(0x24a);
return;
case 'R': case 0x154: case 0x156: case 0x158: case 0x210:
case 0x212: case 0x24c: case 0x1e58: case 0x1e5a:
case 0x1e5c: case 0x1e5e: case 0x2c64: case 0xa7a6:
regmbc('R'); regmbc(0x154); regmbc(0x156);
regmbc(0x210); regmbc(0x212); regmbc(0x158);
regmbc(0x24c); regmbc(0x1e58); regmbc(0x1e5a);
regmbc(0x1e5c); regmbc(0x1e5e); regmbc(0x2c64);
regmbc(0xa7a6);
return;
case 'S': case 0x15a: case 0x15c: case 0x15e: case 0x160:
case 0x218: case 0x1e60: case 0x1e62: case 0x1e64:
case 0x1e66: case 0x1e68: case 0x2c7e: case 0xa7a8:
regmbc('S'); regmbc(0x15a); regmbc(0x15c);
regmbc(0x15e); regmbc(0x160); regmbc(0x218);
regmbc(0x1e60); regmbc(0x1e62); regmbc(0x1e64);
regmbc(0x1e66); regmbc(0x1e68); regmbc(0x2c7e);
regmbc(0xa7a8);
return;
case 'T': case 0x162: case 0x164: case 0x166: case 0x1ac:
case 0x1ae: case 0x21a: case 0x23e: case 0x1e6a: case 0x1e6c:
case 0x1e6e: case 0x1e70:
regmbc('T'); regmbc(0x162); regmbc(0x164);
regmbc(0x166); regmbc(0x1ac); regmbc(0x23e);
regmbc(0x1ae); regmbc(0x21a); regmbc(0x1e6a);
regmbc(0x1e6c); regmbc(0x1e6e); regmbc(0x1e70);
return;
case 'U': case 0xd9: case 0xda: case 0xdb: case 0xdc:
case 0x168: case 0x16a: case 0x16c: case 0x16e:
case 0x170: case 0x172: case 0x1af: case 0x1d3:
case 0x1d5: case 0x1d7: case 0x1d9: case 0x1db:
case 0x214: case 0x216: case 0x244: case 0x1e72:
case 0x1e74: case 0x1e76: case 0x1e78: case 0x1e7a:
case 0x1ee4: case 0x1ee6: case 0x1ee8: case 0x1eea:
case 0x1eec: case 0x1eee: case 0x1ef0:
regmbc('U'); regmbc(0xd9); regmbc(0xda);
regmbc(0xdb); regmbc(0xdc); regmbc(0x168);
regmbc(0x16a); regmbc(0x16c); regmbc(0x16e);
regmbc(0x170); regmbc(0x172); regmbc(0x1af);
regmbc(0x1d3); regmbc(0x1d5); regmbc(0x1d7);
regmbc(0x1d9); regmbc(0x1db); regmbc(0x214);
regmbc(0x216); regmbc(0x244); regmbc(0x1e72);
regmbc(0x1e74); regmbc(0x1e76); regmbc(0x1e78);
regmbc(0x1e7a); regmbc(0x1ee4); regmbc(0x1ee6);
regmbc(0x1ee8); regmbc(0x1eea); regmbc(0x1eec);
regmbc(0x1eee); regmbc(0x1ef0);
return;
case 'V': case 0x1b2: case 0x1e7c: case 0x1e7e:
regmbc('V'); regmbc(0x1b2); regmbc(0x1e7c);
regmbc(0x1e7e);
return;
case 'W': case 0x174: case 0x1e80: case 0x1e82:
case 0x1e84: case 0x1e86: case 0x1e88:
regmbc('W'); regmbc(0x174); regmbc(0x1e80);
regmbc(0x1e82); regmbc(0x1e84); regmbc(0x1e86);
regmbc(0x1e88);
return;
case 'X': case 0x1e8a: case 0x1e8c:
regmbc('X'); regmbc(0x1e8a); regmbc(0x1e8c);
return;
case 'Y': case 0xdd:
case 0x176: case 0x178: case 0x1b3: case 0x232: case 0x24e:
case 0x1e8e: case 0x1ef2: case 0x1ef6: case 0x1ef4: case 0x1ef8:
regmbc('Y'); regmbc(0xdd); regmbc(0x176);
regmbc(0x178); regmbc(0x1b3); regmbc(0x232);
regmbc(0x24e); regmbc(0x1e8e); regmbc(0x1ef2);
regmbc(0x1ef4); regmbc(0x1ef6); regmbc(0x1ef8);
return;
case 'Z': case 0x179: case 0x17b: case 0x17d: case 0x1b5:
case 0x1e90: case 0x1e92: case 0x1e94: case 0x2c6b:
regmbc('Z'); regmbc(0x179); regmbc(0x17b);
regmbc(0x17d); regmbc(0x1b5); regmbc(0x1e90);
regmbc(0x1e92); regmbc(0x1e94); regmbc(0x2c6b);
return;
case 'a': case 0xe0: case 0xe1: case 0xe2:
case 0xe3: case 0xe4: case 0xe5: case 0x101: case 0x103:
case 0x105: case 0x1ce: case 0x1df: case 0x1e1: case 0x1fb:
case 0x201: case 0x203: case 0x227: case 0x1d8f: case 0x1e01:
case 0x1e9a: case 0x1ea1: case 0x1ea3: case 0x1ea5:
case 0x1ea7: case 0x1ea9: case 0x1eab: case 0x1ead:
case 0x1eaf: case 0x1eb1: case 0x1eb3: case 0x1eb5:
case 0x1eb7: case 0x2c65:
regmbc('a'); regmbc(0xe0); regmbc(0xe1);
regmbc(0xe2); regmbc(0xe3); regmbc(0xe4);
regmbc(0xe5); regmbc(0x101); regmbc(0x103);
regmbc(0x105); regmbc(0x1ce); regmbc(0x1df);
regmbc(0x1e1); regmbc(0x1fb); regmbc(0x201);
regmbc(0x203); regmbc(0x227); regmbc(0x1d8f);
regmbc(0x1e01); regmbc(0x1e9a); regmbc(0x1ea1);
regmbc(0x1ea3); regmbc(0x1ea5); regmbc(0x1ea7);
regmbc(0x1ea9); regmbc(0x1eab); regmbc(0x1ead);
regmbc(0x1eaf); regmbc(0x1eb1); regmbc(0x1eb3);
regmbc(0x1eb5); regmbc(0x1eb7); regmbc(0x2c65);
return;
case 'b': case 0x180: case 0x253: case 0x1d6c: case 0x1d80:
case 0x1e03: case 0x1e05: case 0x1e07:
regmbc('b');
regmbc(0x180); regmbc(0x253); regmbc(0x1d6c);
regmbc(0x1d80); regmbc(0x1e03); regmbc(0x1e05);
regmbc(0x1e07);
return;
case 'c': case 0xe7:
case 0x107: case 0x109: case 0x10b: case 0x10d: case 0x188:
case 0x23c: case 0x1e09: case 0xa793: case 0xa794:
regmbc('c'); regmbc(0xe7); regmbc(0x107);
regmbc(0x109); regmbc(0x10b); regmbc(0x10d);
regmbc(0x188); regmbc(0x23c); regmbc(0x1e09);
regmbc(0xa793); regmbc(0xa794);
return;
case 'd': case 0x10f: case 0x111: case 0x257: case 0x1d6d:
case 0x1d81: case 0x1d91: case 0x1e0b: case 0x1e0d:
case 0x1e0f: case 0x1e11: case 0x1e13:
regmbc('d'); regmbc(0x10f); regmbc(0x111);
regmbc(0x257); regmbc(0x1d6d); regmbc(0x1d81);
regmbc(0x1d91); regmbc(0x1e0b); regmbc(0x1e0d);
regmbc(0x1e0f); regmbc(0x1e11); regmbc(0x1e13);
return;
case 'e': case 0xe8: case 0xe9: case 0xea: case 0xeb:
case 0x113: case 0x115: case 0x117: case 0x119:
case 0x11b: case 0x205: case 0x207: case 0x229:
case 0x247: case 0x1d92: case 0x1e15: case 0x1e17:
case 0x1e19: case 0x1e1b: case 0x1eb9: case 0x1ebb:
case 0x1e1d: case 0x1ebd: case 0x1ebf: case 0x1ec1:
case 0x1ec3: case 0x1ec5: case 0x1ec7:
regmbc('e'); regmbc(0xe8); regmbc(0xe9);
regmbc(0xea); regmbc(0xeb); regmbc(0x113);
regmbc(0x115); regmbc(0x117); regmbc(0x119);
regmbc(0x11b); regmbc(0x205); regmbc(0x207);
regmbc(0x229); regmbc(0x247); regmbc(0x1d92);
regmbc(0x1e15); regmbc(0x1e17); regmbc(0x1e19);
regmbc(0x1e1b); regmbc(0x1e1d); regmbc(0x1eb9);
regmbc(0x1ebb); regmbc(0x1ebd); regmbc(0x1ebf);
regmbc(0x1ec1); regmbc(0x1ec3); regmbc(0x1ec5);
regmbc(0x1ec7);
return;
case 'f': case 0x192: case 0x1d6e: case 0x1d82:
case 0x1e1f: case 0xa799:
regmbc('f'); regmbc(0x192); regmbc(0x1d6e);
regmbc(0x1d82); regmbc(0x1e1f); regmbc(0xa799);
return;
case 'g': case 0x11d: case 0x11f: case 0x121: case 0x123:
case 0x1e5: case 0x1e7: case 0x260: case 0x1f5: case 0x1d83:
case 0x1e21: case 0xa7a1:
regmbc('g'); regmbc(0x11d); regmbc(0x11f);
regmbc(0x121); regmbc(0x123); regmbc(0x1e5);
regmbc(0x1e7); regmbc(0x1f5); regmbc(0x260);
regmbc(0x1d83); regmbc(0x1e21); regmbc(0xa7a1);
return;
case 'h': case 0x125: case 0x127: case 0x21f: case 0x1e23:
case 0x1e25: case 0x1e27: case 0x1e29: case 0x1e2b:
case 0x1e96: case 0x2c68: case 0xa795:
regmbc('h'); regmbc(0x125); regmbc(0x127);
regmbc(0x21f); regmbc(0x1e23); regmbc(0x1e25);
regmbc(0x1e27); regmbc(0x1e29); regmbc(0x1e2b);
regmbc(0x1e96); regmbc(0x2c68); regmbc(0xa795);
return;
case 'i': case 0xec: case 0xed: case 0xee: case 0xef:
case 0x129: case 0x12b: case 0x12d: case 0x12f:
case 0x1d0: case 0x209: case 0x20b: case 0x268:
case 0x1d96: case 0x1e2d: case 0x1e2f: case 0x1ec9:
case 0x1ecb:
regmbc('i'); regmbc(0xec); regmbc(0xed);
regmbc(0xee); regmbc(0xef); regmbc(0x129);
regmbc(0x12b); regmbc(0x12d); regmbc(0x12f);
regmbc(0x1d0); regmbc(0x209); regmbc(0x20b);
regmbc(0x268); regmbc(0x1d96); regmbc(0x1e2d);
regmbc(0x1e2f); regmbc(0x1ec9); regmbc(0x1ecb);
return;
case 'j': case 0x135: case 0x1f0: case 0x249:
regmbc('j'); regmbc(0x135); regmbc(0x1f0);
regmbc(0x249);
return;
case 'k': case 0x137: case 0x199: case 0x1e9:
case 0x1d84: case 0x1e31: case 0x1e33: case 0x1e35:
case 0x2c6a: case 0xa741:
regmbc('k'); regmbc(0x137); regmbc(0x199);
regmbc(0x1e9); regmbc(0x1d84); regmbc(0x1e31);
regmbc(0x1e33); regmbc(0x1e35); regmbc(0x2c6a);
regmbc(0xa741);
return;
case 'l': case 0x13a: case 0x13c: case 0x13e:
case 0x140: case 0x142: case 0x19a: case 0x1e37:
case 0x1e39: case 0x1e3b: case 0x1e3d: case 0x2c61:
regmbc('l'); regmbc(0x13a); regmbc(0x13c);
regmbc(0x13e); regmbc(0x140); regmbc(0x142);
regmbc(0x19a); regmbc(0x1e37); regmbc(0x1e39);
regmbc(0x1e3b); regmbc(0x1e3d); regmbc(0x2c61);
return;
case 'm': case 0x1d6f: case 0x1e3f: case 0x1e41: case 0x1e43:
regmbc('m'); regmbc(0x1d6f); regmbc(0x1e3f);
regmbc(0x1e41); regmbc(0x1e43);
return;
case 'n': case 0xf1: case 0x144: case 0x146: case 0x148:
case 0x149: case 0x1f9: case 0x1d70: case 0x1d87:
case 0x1e45: case 0x1e47: case 0x1e49: case 0x1e4b:
case 0xa7a5:
regmbc('n'); regmbc(0xf1); regmbc(0x144);
regmbc(0x146); regmbc(0x148); regmbc(0x149);
regmbc(0x1f9); regmbc(0x1d70); regmbc(0x1d87);
regmbc(0x1e45); regmbc(0x1e47); regmbc(0x1e49);
regmbc(0x1e4b); regmbc(0xa7a5);
return;
case 'o': case 0xf2: case 0xf3: case 0xf4: case 0xf5:
case 0xf6: case 0xf8: case 0x14d: case 0x14f: case 0x151:
case 0x1a1: case 0x1d2: case 0x1eb: case 0x1ed: case 0x1ff:
case 0x20d: case 0x20f: case 0x22b: case 0x22d: case 0x22f:
case 0x231: case 0x275: case 0x1e4d: case 0x1e4f:
case 0x1e51: case 0x1e53: case 0x1ecd: case 0x1ecf:
case 0x1ed1: case 0x1ed3: case 0x1ed5: case 0x1ed7:
case 0x1ed9: case 0x1edb: case 0x1edd: case 0x1edf:
case 0x1ee1: case 0x1ee3:
regmbc('o'); regmbc(0xf2); regmbc(0xf3);
regmbc(0xf4); regmbc(0xf5); regmbc(0xf6);
regmbc(0xf8); regmbc(0x14d); regmbc(0x14f);
regmbc(0x151); regmbc(0x1a1); regmbc(0x1d2);
regmbc(0x1eb); regmbc(0x1ed); regmbc(0x1ff);
regmbc(0x20d); regmbc(0x20f); regmbc(0x22b);
regmbc(0x22d); regmbc(0x22f); regmbc(0x231);
regmbc(0x275); regmbc(0x1e4d); regmbc(0x1e4f);
regmbc(0x1e51); regmbc(0x1e53); regmbc(0x1ecd);
regmbc(0x1ecf); regmbc(0x1ed1); regmbc(0x1ed3);
regmbc(0x1ed5); regmbc(0x1ed7); regmbc(0x1ed9);
regmbc(0x1edb); regmbc(0x1edd); regmbc(0x1edf);
regmbc(0x1ee1); regmbc(0x1ee3);
return;
case 'p': case 0x1a5: case 0x1d71: case 0x1d88: case 0x1d7d:
case 0x1e55: case 0x1e57:
regmbc('p'); regmbc(0x1a5); regmbc(0x1d71);
regmbc(0x1d7d); regmbc(0x1d88); regmbc(0x1e55);
regmbc(0x1e57);
return;
case 'q': case 0x24b: case 0x2a0:
regmbc('q'); regmbc(0x24b); regmbc(0x2a0);
return;
case 'r': case 0x155: case 0x157: case 0x159: case 0x211:
case 0x213: case 0x24d: case 0x27d: case 0x1d72: case 0x1d73:
case 0x1d89: case 0x1e59: case 0x1e5b: case 0x1e5d: case 0x1e5f:
case 0xa7a7:
regmbc('r'); regmbc(0x155); regmbc(0x157);
regmbc(0x159); regmbc(0x211); regmbc(0x213);
regmbc(0x24d); regmbc(0x1d72); regmbc(0x1d73);
regmbc(0x1d89); regmbc(0x1e59); regmbc(0x27d);
regmbc(0x1e5b); regmbc(0x1e5d); regmbc(0x1e5f);
regmbc(0xa7a7);
return;
case 's': case 0x15b: case 0x15d: case 0x15f: case 0x161:
case 0x1e61: case 0x219: case 0x23f: case 0x1d74: case 0x1d8a:
case 0x1e63: case 0x1e65: case 0x1e67: case 0x1e69: case 0xa7a9:
regmbc('s'); regmbc(0x15b); regmbc(0x15d);
regmbc(0x15f); regmbc(0x161); regmbc(0x23f);
regmbc(0x219); regmbc(0x1d74); regmbc(0x1d8a);
regmbc(0x1e61); regmbc(0x1e63); regmbc(0x1e65);
regmbc(0x1e67); regmbc(0x1e69); regmbc(0xa7a9);
return;
case 't': case 0x163: case 0x165: case 0x167: case 0x1ab:
case 0x1ad: case 0x21b: case 0x288: case 0x1d75: case 0x1e6b:
case 0x1e6d: case 0x1e6f: case 0x1e71: case 0x1e97: case 0x2c66:
regmbc('t'); regmbc(0x163); regmbc(0x165);
regmbc(0x167); regmbc(0x1ab); regmbc(0x21b);
regmbc(0x1ad); regmbc(0x288); regmbc(0x1d75);
regmbc(0x1e6b); regmbc(0x1e6d); regmbc(0x1e6f);
regmbc(0x1e71); regmbc(0x1e97); regmbc(0x2c66);
return;
case 'u': case 0xf9: case 0xfa: case 0xfb: case 0xfc:
case 0x169: case 0x16b: case 0x16d: case 0x16f:
case 0x171: case 0x173: case 0x1b0: case 0x1d4:
case 0x1d6: case 0x1d8: case 0x1da: case 0x1dc:
case 0x215: case 0x217: case 0x289: case 0x1e73:
case 0x1d7e: case 0x1d99: case 0x1e75: case 0x1e77:
case 0x1e79: case 0x1e7b: case 0x1ee5: case 0x1ee7:
case 0x1ee9: case 0x1eeb: case 0x1eed: case 0x1eef:
case 0x1ef1:
regmbc('u'); regmbc(0xf9); regmbc(0xfa);
regmbc(0xfb); regmbc(0xfc); regmbc(0x169);
regmbc(0x16b); regmbc(0x16d); regmbc(0x16f);
regmbc(0x171); regmbc(0x173); regmbc(0x1d6);
regmbc(0x1d8); regmbc(0x1da); regmbc(0x1dc);
regmbc(0x215); regmbc(0x217); regmbc(0x1b0);
regmbc(0x1d4); regmbc(0x289); regmbc(0x1d7e);
regmbc(0x1d99); regmbc(0x1e73); regmbc(0x1e75);
regmbc(0x1e77); regmbc(0x1e79); regmbc(0x1e7b);
regmbc(0x1ee5); regmbc(0x1ee7); regmbc(0x1ee9);
regmbc(0x1eeb); regmbc(0x1eed); regmbc(0x1eef);
regmbc(0x1ef1);
return;
case 'v': case 0x28b: case 0x1d8c: case 0x1e7d: case 0x1e7f:
regmbc('v'); regmbc(0x28b); regmbc(0x1d8c);
regmbc(0x1e7d); regmbc(0x1e7f);
return;
case 'w': case 0x175: case 0x1e81: case 0x1e83:
case 0x1e85: case 0x1e87: case 0x1e89: case 0x1e98:
regmbc('w'); regmbc(0x175); regmbc(0x1e81);
regmbc(0x1e83); regmbc(0x1e85); regmbc(0x1e87);
regmbc(0x1e89); regmbc(0x1e98);
return;
case 'x': case 0x1e8b: case 0x1e8d:
regmbc('x'); regmbc(0x1e8b); regmbc(0x1e8d);
return;
case 'y': case 0xfd: case 0xff: case 0x177: case 0x1b4:
case 0x233: case 0x24f: case 0x1e8f: case 0x1e99: case 0x1ef3:
case 0x1ef5: case 0x1ef7: case 0x1ef9:
regmbc('y'); regmbc(0xfd); regmbc(0xff);
regmbc(0x177); regmbc(0x1b4); regmbc(0x233);
regmbc(0x24f); regmbc(0x1e8f); regmbc(0x1e99);
regmbc(0x1ef3); regmbc(0x1ef5); regmbc(0x1ef7);
regmbc(0x1ef9);
return;
case 'z': case 0x17a: case 0x17c: case 0x17e: case 0x1b6:
case 0x1d76: case 0x1d8e: case 0x1e91: case 0x1e93:
case 0x1e95: case 0x2c6c:
regmbc('z'); regmbc(0x17a); regmbc(0x17c);
regmbc(0x17e); regmbc(0x1b6); regmbc(0x1d76);
regmbc(0x1d8e); regmbc(0x1e91); regmbc(0x1e93);
regmbc(0x1e95); regmbc(0x2c6c);
return;
}
}
regmbc(c);
}
| 0
|
242,614
|
explicit StageSizeOp(OpKernelConstruction* ctx) : OpKernel(ctx) {}
| 0
|
353,022
|
sidNormalize(
slap_mask_t usage,
Syntax *syntax,
MatchingRule *mr,
struct berval *val,
struct berval *normalized,
void *ctx )
{
if ( val->bv_len != 3 ) {
return LDAP_INVALID_SYNTAX;
}
return hexNormalize( 0, NULL, NULL, val, normalized, ctx );
}
| 0
|
211,868
|
struct nft_flow_rule *nft_flow_rule_create(struct net *net,
const struct nft_rule *rule)
{
struct nft_offload_ctx *ctx;
struct nft_flow_rule *flow;
int num_actions = 0, err;
struct nft_expr *expr;
expr = nft_expr_first(rule);
while (nft_expr_more(rule, expr)) {
if (expr->ops->offload_flags & NFT_OFFLOAD_F_ACTION)
num_actions++;
expr = nft_expr_next(expr);
}
if (num_actions == 0)
return ERR_PTR(-EOPNOTSUPP);
flow = nft_flow_rule_alloc(num_actions);
if (!flow)
return ERR_PTR(-ENOMEM);
expr = nft_expr_first(rule);
ctx = kzalloc(sizeof(struct nft_offload_ctx), GFP_KERNEL);
if (!ctx) {
err = -ENOMEM;
goto err_out;
}
ctx->net = net;
ctx->dep.type = NFT_OFFLOAD_DEP_UNSPEC;
while (nft_expr_more(rule, expr)) {
if (!expr->ops->offload) {
err = -EOPNOTSUPP;
goto err_out;
}
err = expr->ops->offload(ctx, flow, expr);
if (err < 0)
goto err_out;
expr = nft_expr_next(expr);
}
nft_flow_rule_transfer_vlan(ctx, flow);
flow->proto = ctx->dep.l3num;
kfree(ctx);
return flow;
err_out:
kfree(ctx);
nft_flow_rule_destroy(flow);
return ERR_PTR(err);
}
| 1
|
224,457
|
static GF_Err gf_text_process_swf(GF_Filter *filter, GF_TXTIn *ctx)
{
GF_LOG(GF_LOG_WARNING, GF_LOG_PARSER, ("Warning: GPAC was compiled without SWF import support, can't import file.\n"));
return GF_NOT_SUPPORTED;
}
| 0
|
386,520
|
bool DL_Dxf::getStrippedLine(std::string &s, unsigned int size,
std::istream& stream, bool stripSpace) {
if (!stream.eof()) {
// Only the useful part of the line
char* line = new char[size+1];
char* oriLine = line;
stream.getline(line, size);
stripWhiteSpace(&line, stripSpace);
s = line;
assert(size > s.length());
delete[] oriLine;
return true;
} else {
s[0] = '\0';
return false;
}
}
| 0
|
360,822
|
static int __io_async_cancel(struct io_cancel_data *cd,
struct io_uring_task *tctx,
unsigned int issue_flags)
{
bool all = cd->flags & (IORING_ASYNC_CANCEL_ALL|IORING_ASYNC_CANCEL_ANY);
struct io_ring_ctx *ctx = cd->ctx;
struct io_tctx_node *node;
int ret, nr = 0;
do {
ret = io_try_cancel(tctx, cd, issue_flags);
if (ret == -ENOENT)
break;
if (!all)
return ret;
nr++;
} while (1);
/* slow path, try all io-wq's */
io_ring_submit_lock(ctx, issue_flags);
ret = -ENOENT;
list_for_each_entry(node, &ctx->tctx_list, ctx_node) {
struct io_uring_task *tctx = node->task->io_uring;
ret = io_async_cancel_one(tctx, cd);
if (ret != -ENOENT) {
if (!all)
break;
nr++;
}
}
io_ring_submit_unlock(ctx, issue_flags);
return all ? nr : ret;
}
| 0
|
210,944
|
do_cmdline(
char_u *cmdline,
char_u *(*fgetline)(int, void *, int, getline_opt_T),
void *cookie, // argument for fgetline()
int flags)
{
char_u *next_cmdline; // next cmd to execute
char_u *cmdline_copy = NULL; // copy of cmd line
int used_getline = FALSE; // used "fgetline" to obtain command
static int recursive = 0; // recursive depth
int msg_didout_before_start = 0;
int count = 0; // line number count
int did_inc = FALSE; // incremented RedrawingDisabled
int retval = OK;
#ifdef FEAT_EVAL
cstack_T cstack; // conditional stack
garray_T lines_ga; // keep lines for ":while"/":for"
int current_line = 0; // active line in lines_ga
int current_line_before = 0;
char_u *fname = NULL; // function or script name
linenr_T *breakpoint = NULL; // ptr to breakpoint field in cookie
int *dbg_tick = NULL; // ptr to dbg_tick field in cookie
struct dbg_stuff debug_saved; // saved things for debug mode
int initial_trylevel;
msglist_T **saved_msg_list = NULL;
msglist_T *private_msg_list = NULL;
// "fgetline" and "cookie" passed to do_one_cmd()
char_u *(*cmd_getline)(int, void *, int, getline_opt_T);
void *cmd_cookie;
struct loop_cookie cmd_loop_cookie;
void *real_cookie;
int getline_is_func;
#else
# define cmd_getline fgetline
# define cmd_cookie cookie
#endif
static int call_depth = 0; // recursiveness
#ifdef FEAT_EVAL
// For every pair of do_cmdline()/do_one_cmd() calls, use an extra memory
// location for storing error messages to be converted to an exception.
// This ensures that the do_errthrow() call in do_one_cmd() does not
// combine the messages stored by an earlier invocation of do_one_cmd()
// with the command name of the later one. This would happen when
// BufWritePost autocommands are executed after a write error.
saved_msg_list = msg_list;
msg_list = &private_msg_list;
#endif
// It's possible to create an endless loop with ":execute", catch that
// here. The value of 200 allows nested function calls, ":source", etc.
// Allow 200 or 'maxfuncdepth', whatever is larger.
if (call_depth >= 200
#ifdef FEAT_EVAL
&& call_depth >= p_mfd
#endif
)
{
emsg(_(e_command_too_recursive));
#ifdef FEAT_EVAL
// When converting to an exception, we do not include the command name
// since this is not an error of the specific command.
do_errthrow((cstack_T *)NULL, (char_u *)NULL);
msg_list = saved_msg_list;
#endif
return FAIL;
}
++call_depth;
#ifdef FEAT_EVAL
CLEAR_FIELD(cstack);
cstack.cs_idx = -1;
ga_init2(&lines_ga, sizeof(wcmd_T), 10);
real_cookie = getline_cookie(fgetline, cookie);
// Inside a function use a higher nesting level.
getline_is_func = getline_equal(fgetline, cookie, get_func_line);
if (getline_is_func && ex_nesting_level == func_level(real_cookie))
++ex_nesting_level;
// Get the function or script name and the address where the next breakpoint
// line and the debug tick for a function or script are stored.
if (getline_is_func)
{
fname = func_name(real_cookie);
breakpoint = func_breakpoint(real_cookie);
dbg_tick = func_dbg_tick(real_cookie);
}
else if (getline_equal(fgetline, cookie, getsourceline))
{
fname = SOURCING_NAME;
breakpoint = source_breakpoint(real_cookie);
dbg_tick = source_dbg_tick(real_cookie);
}
/*
* Initialize "force_abort" and "suppress_errthrow" at the top level.
*/
if (!recursive)
{
force_abort = FALSE;
suppress_errthrow = FALSE;
}
/*
* If requested, store and reset the global values controlling the
* exception handling (used when debugging). Otherwise clear it to avoid
* a bogus compiler warning when the optimizer uses inline functions...
*/
if (flags & DOCMD_EXCRESET)
save_dbg_stuff(&debug_saved);
else
CLEAR_FIELD(debug_saved);
initial_trylevel = trylevel;
/*
* "did_throw" will be set to TRUE when an exception is being thrown.
*/
did_throw = FALSE;
#endif
/*
* "did_emsg" will be set to TRUE when emsg() is used, in which case we
* cancel the whole command line, and any if/endif or loop.
* If force_abort is set, we cancel everything.
*/
#ifdef FEAT_EVAL
did_emsg_cumul += did_emsg;
#endif
did_emsg = FALSE;
/*
* KeyTyped is only set when calling vgetc(). Reset it here when not
* calling vgetc() (sourced command lines).
*/
if (!(flags & DOCMD_KEYTYPED)
&& !getline_equal(fgetline, cookie, getexline))
KeyTyped = FALSE;
/*
* Continue executing command lines:
* - when inside an ":if", ":while" or ":for"
* - for multiple commands on one line, separated with '|'
* - when repeating until there are no more lines (for ":source")
*/
next_cmdline = cmdline;
do
{
#ifdef FEAT_EVAL
getline_is_func = getline_equal(fgetline, cookie, get_func_line);
#endif
// stop skipping cmds for an error msg after all endif/while/for
if (next_cmdline == NULL
#ifdef FEAT_EVAL
&& !force_abort
&& cstack.cs_idx < 0
&& !(getline_is_func && func_has_abort(real_cookie))
#endif
)
{
#ifdef FEAT_EVAL
did_emsg_cumul += did_emsg;
#endif
did_emsg = FALSE;
}
/*
* 1. If repeating a line in a loop, get a line from lines_ga.
* 2. If no line given: Get an allocated line with fgetline().
* 3. If a line is given: Make a copy, so we can mess with it.
*/
#ifdef FEAT_EVAL
// 1. If repeating, get a previous line from lines_ga.
if (cstack.cs_looplevel > 0 && current_line < lines_ga.ga_len)
{
// Each '|' separated command is stored separately in lines_ga, to
// be able to jump to it. Don't use next_cmdline now.
VIM_CLEAR(cmdline_copy);
// Check if a function has returned or, unless it has an unclosed
// try conditional, aborted.
if (getline_is_func)
{
# ifdef FEAT_PROFILE
if (do_profiling == PROF_YES)
func_line_end(real_cookie);
# endif
if (func_has_ended(real_cookie))
{
retval = FAIL;
break;
}
}
#ifdef FEAT_PROFILE
else if (do_profiling == PROF_YES
&& getline_equal(fgetline, cookie, getsourceline))
script_line_end();
#endif
// Check if a sourced file hit a ":finish" command.
if (source_finished(fgetline, cookie))
{
retval = FAIL;
break;
}
// If breakpoints have been added/deleted need to check for it.
if (breakpoint != NULL && dbg_tick != NULL
&& *dbg_tick != debug_tick)
{
*breakpoint = dbg_find_breakpoint(
getline_equal(fgetline, cookie, getsourceline),
fname, SOURCING_LNUM);
*dbg_tick = debug_tick;
}
next_cmdline = ((wcmd_T *)(lines_ga.ga_data))[current_line].line;
SOURCING_LNUM = ((wcmd_T *)(lines_ga.ga_data))[current_line].lnum;
// Did we encounter a breakpoint?
if (breakpoint != NULL && *breakpoint != 0
&& *breakpoint <= SOURCING_LNUM)
{
dbg_breakpoint(fname, SOURCING_LNUM);
// Find next breakpoint.
*breakpoint = dbg_find_breakpoint(
getline_equal(fgetline, cookie, getsourceline),
fname, SOURCING_LNUM);
*dbg_tick = debug_tick;
}
# ifdef FEAT_PROFILE
if (do_profiling == PROF_YES)
{
if (getline_is_func)
func_line_start(real_cookie, SOURCING_LNUM);
else if (getline_equal(fgetline, cookie, getsourceline))
script_line_start();
}
# endif
}
#endif
// 2. If no line given, get an allocated line with fgetline().
if (next_cmdline == NULL)
{
/*
* Need to set msg_didout for the first line after an ":if",
* otherwise the ":if" will be overwritten.
*/
if (count == 1 && getline_equal(fgetline, cookie, getexline))
msg_didout = TRUE;
if (fgetline == NULL || (next_cmdline = fgetline(':', cookie,
#ifdef FEAT_EVAL
cstack.cs_idx < 0 ? 0 : (cstack.cs_idx + 1) * 2
#else
0
#endif
, in_vim9script() ? GETLINE_CONCAT_CONTBAR
: GETLINE_CONCAT_CONT)) == NULL)
{
// Don't call wait_return() for aborted command line. The NULL
// returned for the end of a sourced file or executed function
// doesn't do this.
if (KeyTyped && !(flags & DOCMD_REPEAT))
need_wait_return = FALSE;
retval = FAIL;
break;
}
used_getline = TRUE;
/*
* Keep the first typed line. Clear it when more lines are typed.
*/
if (flags & DOCMD_KEEPLINE)
{
vim_free(repeat_cmdline);
if (count == 0)
repeat_cmdline = vim_strsave(next_cmdline);
else
repeat_cmdline = NULL;
}
}
// 3. Make a copy of the command so we can mess with it.
else if (cmdline_copy == NULL)
{
next_cmdline = vim_strsave(next_cmdline);
if (next_cmdline == NULL)
{
emsg(_(e_out_of_memory));
retval = FAIL;
break;
}
}
cmdline_copy = next_cmdline;
#ifdef FEAT_EVAL
/*
* Inside a while/for loop, and when the command looks like a ":while"
* or ":for", the line is stored, because we may need it later when
* looping.
*
* When there is a '|' and another command, it is stored separately,
* because we need to be able to jump back to it from an
* :endwhile/:endfor.
*
* Pass a different "fgetline" function to do_one_cmd() below,
* that it stores lines in or reads them from "lines_ga". Makes it
* possible to define a function inside a while/for loop and handles
* line continuation.
*/
if ((cstack.cs_looplevel > 0 || has_loop_cmd(next_cmdline)))
{
cmd_getline = get_loop_line;
cmd_cookie = (void *)&cmd_loop_cookie;
cmd_loop_cookie.lines_gap = &lines_ga;
cmd_loop_cookie.current_line = current_line;
cmd_loop_cookie.getline = fgetline;
cmd_loop_cookie.cookie = cookie;
cmd_loop_cookie.repeating = (current_line < lines_ga.ga_len);
// Save the current line when encountering it the first time.
if (current_line == lines_ga.ga_len
&& store_loop_line(&lines_ga, next_cmdline) == FAIL)
{
retval = FAIL;
break;
}
current_line_before = current_line;
}
else
{
cmd_getline = fgetline;
cmd_cookie = cookie;
}
did_endif = FALSE;
#endif
if (count++ == 0)
{
/*
* All output from the commands is put below each other, without
* waiting for a return. Don't do this when executing commands
* from a script or when being called recursive (e.g. for ":e
* +command file").
*/
if (!(flags & DOCMD_NOWAIT) && !recursive)
{
msg_didout_before_start = msg_didout;
msg_didany = FALSE; // no output yet
msg_start();
msg_scroll = TRUE; // put messages below each other
++no_wait_return; // don't wait for return until finished
++RedrawingDisabled;
did_inc = TRUE;
}
}
if ((p_verbose >= 15 && SOURCING_NAME != NULL) || p_verbose >= 16)
msg_verbose_cmd(SOURCING_LNUM, cmdline_copy);
/*
* 2. Execute one '|' separated command.
* do_one_cmd() will return NULL if there is no trailing '|'.
* "cmdline_copy" can change, e.g. for '%' and '#' expansion.
*/
++recursive;
next_cmdline = do_one_cmd(&cmdline_copy, flags,
#ifdef FEAT_EVAL
&cstack,
#endif
cmd_getline, cmd_cookie);
--recursive;
#ifdef FEAT_EVAL
if (cmd_cookie == (void *)&cmd_loop_cookie)
// Use "current_line" from "cmd_loop_cookie", it may have been
// incremented when defining a function.
current_line = cmd_loop_cookie.current_line;
#endif
if (next_cmdline == NULL)
{
VIM_CLEAR(cmdline_copy);
/*
* If the command was typed, remember it for the ':' register.
* Do this AFTER executing the command to make :@: work.
*/
if (getline_equal(fgetline, cookie, getexline)
&& new_last_cmdline != NULL)
{
vim_free(last_cmdline);
last_cmdline = new_last_cmdline;
new_last_cmdline = NULL;
}
}
else
{
// need to copy the command after the '|' to cmdline_copy, for the
// next do_one_cmd()
STRMOVE(cmdline_copy, next_cmdline);
next_cmdline = cmdline_copy;
}
#ifdef FEAT_EVAL
// reset did_emsg for a function that is not aborted by an error
if (did_emsg && !force_abort
&& getline_equal(fgetline, cookie, get_func_line)
&& !func_has_abort(real_cookie))
{
// did_emsg_cumul is not set here
did_emsg = FALSE;
}
if (cstack.cs_looplevel > 0)
{
++current_line;
/*
* An ":endwhile", ":endfor" and ":continue" is handled here.
* If we were executing commands, jump back to the ":while" or
* ":for".
* If we were not executing commands, decrement cs_looplevel.
*/
if (cstack.cs_lflags & (CSL_HAD_CONT | CSL_HAD_ENDLOOP))
{
cstack.cs_lflags &= ~(CSL_HAD_CONT | CSL_HAD_ENDLOOP);
// Jump back to the matching ":while" or ":for". Be careful
// not to use a cs_line[] from an entry that isn't a ":while"
// or ":for": It would make "current_line" invalid and can
// cause a crash.
if (!did_emsg && !got_int && !did_throw
&& cstack.cs_idx >= 0
&& (cstack.cs_flags[cstack.cs_idx]
& (CSF_WHILE | CSF_FOR))
&& cstack.cs_line[cstack.cs_idx] >= 0
&& (cstack.cs_flags[cstack.cs_idx] & CSF_ACTIVE))
{
current_line = cstack.cs_line[cstack.cs_idx];
// remember we jumped there
cstack.cs_lflags |= CSL_HAD_LOOP;
line_breakcheck(); // check if CTRL-C typed
// Check for the next breakpoint at or after the ":while"
// or ":for".
if (breakpoint != NULL)
{
*breakpoint = dbg_find_breakpoint(
getline_equal(fgetline, cookie, getsourceline),
fname,
((wcmd_T *)lines_ga.ga_data)[current_line].lnum-1);
*dbg_tick = debug_tick;
}
}
else
{
// can only get here with ":endwhile" or ":endfor"
if (cstack.cs_idx >= 0)
rewind_conditionals(&cstack, cstack.cs_idx - 1,
CSF_WHILE | CSF_FOR, &cstack.cs_looplevel);
}
}
/*
* For a ":while" or ":for" we need to remember the line number.
*/
else if (cstack.cs_lflags & CSL_HAD_LOOP)
{
cstack.cs_lflags &= ~CSL_HAD_LOOP;
cstack.cs_line[cstack.cs_idx] = current_line_before;
}
}
// Check for the next breakpoint after a watchexpression
if (breakpoint != NULL && has_watchexpr())
{
*breakpoint = dbg_find_breakpoint(FALSE, fname, SOURCING_LNUM);
*dbg_tick = debug_tick;
}
/*
* When not inside any ":while" loop, clear remembered lines.
*/
if (cstack.cs_looplevel == 0)
{
if (lines_ga.ga_len > 0)
{
SOURCING_LNUM =
((wcmd_T *)lines_ga.ga_data)[lines_ga.ga_len - 1].lnum;
free_cmdlines(&lines_ga);
}
current_line = 0;
}
/*
* A ":finally" makes did_emsg, got_int, and did_throw pending for
* being restored at the ":endtry". Reset them here and set the
* ACTIVE and FINALLY flags, so that the finally clause gets executed.
* This includes the case where a missing ":endif", ":endwhile" or
* ":endfor" was detected by the ":finally" itself.
*/
if (cstack.cs_lflags & CSL_HAD_FINA)
{
cstack.cs_lflags &= ~CSL_HAD_FINA;
report_make_pending(cstack.cs_pending[cstack.cs_idx]
& (CSTP_ERROR | CSTP_INTERRUPT | CSTP_THROW),
did_throw ? (void *)current_exception : NULL);
did_emsg = got_int = did_throw = FALSE;
cstack.cs_flags[cstack.cs_idx] |= CSF_ACTIVE | CSF_FINALLY;
}
// Update global "trylevel" for recursive calls to do_cmdline() from
// within this loop.
trylevel = initial_trylevel + cstack.cs_trylevel;
/*
* If the outermost try conditional (across function calls and sourced
* files) is aborted because of an error, an interrupt, or an uncaught
* exception, cancel everything. If it is left normally, reset
* force_abort to get the non-EH compatible abortion behavior for
* the rest of the script.
*/
if (trylevel == 0 && !did_emsg && !got_int && !did_throw)
force_abort = FALSE;
// Convert an interrupt to an exception if appropriate.
(void)do_intthrow(&cstack);
#endif // FEAT_EVAL
}
/*
* Continue executing command lines when:
* - no CTRL-C typed, no aborting error, no exception thrown or try
* conditionals need to be checked for executing finally clauses or
* catching an interrupt exception
* - didn't get an error message or lines are not typed
* - there is a command after '|', inside a :if, :while, :for or :try, or
* looping for ":source" command or function call.
*/
while (!((got_int
#ifdef FEAT_EVAL
|| (did_emsg && (force_abort || in_vim9script()))
|| did_throw
#endif
)
#ifdef FEAT_EVAL
&& cstack.cs_trylevel == 0
#endif
)
&& !(did_emsg
#ifdef FEAT_EVAL
// Keep going when inside try/catch, so that the error can be
// deal with, except when it is a syntax error, it may cause
// the :endtry to be missed.
&& (cstack.cs_trylevel == 0 || did_emsg_syntax)
#endif
&& used_getline
&& (getline_equal(fgetline, cookie, getexmodeline)
|| getline_equal(fgetline, cookie, getexline)))
&& (next_cmdline != NULL
#ifdef FEAT_EVAL
|| cstack.cs_idx >= 0
#endif
|| (flags & DOCMD_REPEAT)));
vim_free(cmdline_copy);
did_emsg_syntax = FALSE;
#ifdef FEAT_EVAL
free_cmdlines(&lines_ga);
ga_clear(&lines_ga);
if (cstack.cs_idx >= 0)
{
/*
* If a sourced file or executed function ran to its end, report the
* unclosed conditional.
* In Vim9 script do not give a second error, executing aborts after
* the first one.
*/
if (!got_int && !did_throw && !aborting()
&& !(did_emsg && in_vim9script())
&& ((getline_equal(fgetline, cookie, getsourceline)
&& !source_finished(fgetline, cookie))
|| (getline_equal(fgetline, cookie, get_func_line)
&& !func_has_ended(real_cookie))))
{
if (cstack.cs_flags[cstack.cs_idx] & CSF_TRY)
emsg(_(e_missing_endtry));
else if (cstack.cs_flags[cstack.cs_idx] & CSF_WHILE)
emsg(_(e_missing_endwhile));
else if (cstack.cs_flags[cstack.cs_idx] & CSF_FOR)
emsg(_(e_missing_endfor));
else
emsg(_(e_missing_endif));
}
/*
* Reset "trylevel" in case of a ":finish" or ":return" or a missing
* ":endtry" in a sourced file or executed function. If the try
* conditional is in its finally clause, ignore anything pending.
* If it is in a catch clause, finish the caught exception.
* Also cleanup any "cs_forinfo" structures.
*/
do
{
int idx = cleanup_conditionals(&cstack, 0, TRUE);
if (idx >= 0)
--idx; // remove try block not in its finally clause
rewind_conditionals(&cstack, idx, CSF_WHILE | CSF_FOR,
&cstack.cs_looplevel);
}
while (cstack.cs_idx >= 0);
trylevel = initial_trylevel;
}
// If a missing ":endtry", ":endwhile", ":endfor", or ":endif" or a memory
// lack was reported above and the error message is to be converted to an
// exception, do this now after rewinding the cstack.
do_errthrow(&cstack, getline_equal(fgetline, cookie, get_func_line)
? (char_u *)"endfunction" : (char_u *)NULL);
if (trylevel == 0)
{
// Just in case did_throw got set but current_exception wasn't.
if (current_exception == NULL)
did_throw = FALSE;
/*
* When an exception is being thrown out of the outermost try
* conditional, discard the uncaught exception, disable the conversion
* of interrupts or errors to exceptions, and ensure that no more
* commands are executed.
*/
if (did_throw)
handle_did_throw();
/*
* On an interrupt or an aborting error not converted to an exception,
* disable the conversion of errors to exceptions. (Interrupts are not
* converted anymore, here.) This enables also the interrupt message
* when force_abort is set and did_emsg unset in case of an interrupt
* from a finally clause after an error.
*/
else if (got_int || (did_emsg && force_abort))
suppress_errthrow = TRUE;
}
/*
* The current cstack will be freed when do_cmdline() returns. An uncaught
* exception will have to be rethrown in the previous cstack. If a function
* has just returned or a script file was just finished and the previous
* cstack belongs to the same function or, respectively, script file, it
* will have to be checked for finally clauses to be executed due to the
* ":return" or ":finish". This is done in do_one_cmd().
*/
if (did_throw)
need_rethrow = TRUE;
if ((getline_equal(fgetline, cookie, getsourceline)
&& ex_nesting_level > source_level(real_cookie))
|| (getline_equal(fgetline, cookie, get_func_line)
&& ex_nesting_level > func_level(real_cookie) + 1))
{
if (!did_throw)
check_cstack = TRUE;
}
else
{
// When leaving a function, reduce nesting level.
if (getline_equal(fgetline, cookie, get_func_line))
--ex_nesting_level;
/*
* Go to debug mode when returning from a function in which we are
* single-stepping.
*/
if ((getline_equal(fgetline, cookie, getsourceline)
|| getline_equal(fgetline, cookie, get_func_line))
&& ex_nesting_level + 1 <= debug_break_level)
do_debug(getline_equal(fgetline, cookie, getsourceline)
? (char_u *)_("End of sourced file")
: (char_u *)_("End of function"));
}
/*
* Restore the exception environment (done after returning from the
* debugger).
*/
if (flags & DOCMD_EXCRESET)
restore_dbg_stuff(&debug_saved);
msg_list = saved_msg_list;
// Cleanup if "cs_emsg_silent_list" remains.
if (cstack.cs_emsg_silent_list != NULL)
{
eslist_T *elem, *temp;
for (elem = cstack.cs_emsg_silent_list; elem != NULL; elem = temp)
{
temp = elem->next;
vim_free(elem);
}
}
#endif // FEAT_EVAL
/*
* If there was too much output to fit on the command line, ask the user to
* hit return before redrawing the screen. With the ":global" command we do
* this only once after the command is finished.
*/
if (did_inc)
{
--RedrawingDisabled;
--no_wait_return;
msg_scroll = FALSE;
/*
* When just finished an ":if"-":else" which was typed, no need to
* wait for hit-return. Also for an error situation.
*/
if (retval == FAIL
#ifdef FEAT_EVAL
|| (did_endif && KeyTyped && !did_emsg)
#endif
)
{
need_wait_return = FALSE;
msg_didany = FALSE; // don't wait when restarting edit
}
else if (need_wait_return)
{
/*
* The msg_start() above clears msg_didout. The wait_return() we do
* here should not overwrite the command that may be shown before
* doing that.
*/
msg_didout |= msg_didout_before_start;
wait_return(FALSE);
}
}
#ifdef FEAT_EVAL
did_endif = FALSE; // in case do_cmdline used recursively
#else
/*
* Reset if_level, in case a sourced script file contains more ":if" than
* ":endif" (could be ":if x | foo | endif").
*/
if_level = 0;
#endif
--call_depth;
return retval;
}
| 1
|
498,622
|
save_dialog (void)
{
GtkWidget *dialog;
GtkWidget *label;
GtkWidget *toggle;
GtkWidget *combo;
GtkWidget *vbox;
GtkWidget *hbox;
gboolean run;
dialog = gimp_export_dialog_new (_("TGA"), PLUG_IN_BINARY, SAVE_PROC);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_box_pack_start (GTK_BOX (gimp_export_dialog_get_content_area (dialog)),
vbox, TRUE, TRUE, 0);
gtk_widget_show (vbox);
/* rle */
toggle = gtk_check_button_new_with_mnemonic (_("_RLE compression"));
gtk_box_pack_start (GTK_BOX (vbox), toggle, FALSE, FALSE, 0);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), tsvals.rle);
gtk_widget_show (toggle);
g_signal_connect (toggle, "toggled",
G_CALLBACK (gimp_toggle_button_update),
&tsvals.rle);
/* origin */
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
label = gtk_label_new_with_mnemonic (_("Or_igin:"));
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
combo = gimp_int_combo_box_new (_("Bottom left"), ORIGIN_BOTTOM_LEFT,
_("Top left"), ORIGIN_TOP_LEFT,
NULL);
gtk_box_pack_start (GTK_BOX (hbox), combo, TRUE, TRUE, 0);
gtk_widget_show (combo);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), combo);
gimp_int_combo_box_connect (GIMP_INT_COMBO_BOX (combo),
tsvals.origin,
G_CALLBACK (gimp_int_combo_box_get_active),
&tsvals.origin);
gtk_widget_show (dialog);
run = (gimp_dialog_run (GIMP_DIALOG (dialog)) == GTK_RESPONSE_OK);
gtk_widget_destroy (dialog);
return run;
}
| 0
|
344,270
|
static int getbaseline (const Proto *f, int pc, int *basepc) {
if (f->sizeabslineinfo == 0 || pc < f->abslineinfo[0].pc) {
*basepc = -1; /* start from the beginning */
return f->linedefined;
}
else {
int i = cast_uint(pc) / MAXIWTHABS - 1; /* get an estimate */
/* estimate must be a lower bound of the correct base */
lua_assert(i < 0 ||
(i < f->sizeabslineinfo && f->abslineinfo[i].pc <= pc));
while (i + 1 < f->sizeabslineinfo && pc >= f->abslineinfo[i + 1].pc)
i++; /* low estimate; adjust it */
*basepc = f->abslineinfo[i].pc;
return f->abslineinfo[i].line;
}
}
| 0
|
468,371
|
on_connection_attempt_timeout (gpointer data)
{
ConnectionAttempt *attempt = data;
enumerator_next_async (attempt->data, TRUE);
g_clear_pointer (&attempt->timeout_source, g_source_unref);
return G_SOURCE_REMOVE;
}
| 0
|
234,851
|
static int verify_chunk_dev_extent_mapping(struct btrfs_fs_info *fs_info)
{
struct extent_map_tree *em_tree = &fs_info->mapping_tree;
struct extent_map *em;
struct rb_node *node;
int ret = 0;
read_lock(&em_tree->lock);
for (node = rb_first_cached(&em_tree->map); node; node = rb_next(node)) {
em = rb_entry(node, struct extent_map, rb_node);
if (em->map_lookup->num_stripes !=
em->map_lookup->verified_stripes) {
btrfs_err(fs_info,
"chunk %llu has missing dev extent, have %d expect %d",
em->start, em->map_lookup->verified_stripes,
em->map_lookup->num_stripes);
ret = -EUCLEAN;
goto out;
}
}
out:
read_unlock(&em_tree->lock);
return ret;
}
| 0
|
482,528
|
compileError(const FileInfo *file, const char *format, ...) {
#ifndef __SYMBIAN32__
char buffer[MAXSTRING];
va_list arguments;
va_start(arguments, format);
vsnprintf(buffer, sizeof(buffer), format, arguments);
va_end(arguments);
if (file)
_lou_logMessage(LOU_LOG_ERROR, "%s:%d: error: %s", file->fileName,
file->lineNumber, buffer);
else
_lou_logMessage(LOU_LOG_ERROR, "error: %s", buffer);
errorCount++;
#endif
}
| 0
|
231,788
|
FizzHandshakeParam(bool argCHLOSync, bool argCFINSync, bool argAcceptZeroRtt)
: chloSync(argCHLOSync),
cfinSync(argCFINSync),
acceptZeroRtt(argAcceptZeroRtt) {}
| 0
|
272,365
|
find_certificate(cms_context *cms, int needs_private_key)
{
char *tokenname = resolve_token_name(cms->tokenname);
struct validity_cbdata cbd;
if (!cms->certname || !*cms->certname) {
cms->log(cms, LOG_ERR, "no certificate name specified");
return -1;
}
dprintf("setting password function to %s", cms->func ? "cms->func" : "SECU_GetModulePassword");
PK11_SetPasswordFunc(cms->func ? cms->func : SECU_GetModulePassword);
PK11SlotList *slots = NULL;
slots = PK11_GetAllTokens(CKM_RSA_PKCS, PR_FALSE, PR_TRUE, cms);
if (!slots)
cnreterr(-1, cms, "could not get pk11 token list");
PK11SlotListElement *psle = NULL;
psle = PK11_GetFirstSafe(slots);
if (!psle) {
save_port_err() {
PK11_FreeSlotList(slots);
}
cnreterr(-1, cms, "could not get pk11 safe");
}
while (psle) {
dprintf("looking for token \"%s\", got \"%s\"",
tokenname, PK11_GetTokenName(psle->slot));
if (!strcmp(tokenname, PK11_GetTokenName(psle->slot))) {
dprintf("found token \"%s\"", tokenname);
break;
}
psle = PK11_GetNextSafe(slots, psle, PR_FALSE);
}
if (!psle) {
save_port_err() {
PK11_FreeSlotList(slots);
}
nssreterr(-1, "Could not find token \"%s\"", tokenname);
}
int errnum;
SECStatus status;
if (PK11_NeedLogin(psle->slot) && !PK11_IsLoggedIn(psle->slot, cms)) {
status = PK11_Authenticate(psle->slot, PR_TRUE, cms);
if (status != SECSuccess) {
save_port_err() {
errnum = PORT_GetError();
PK11_DestroySlotListElement(slots, &psle);
PK11_FreeSlotList(slots);
cms->log(cms, LOG_ERR,
"authentication failed for token \"%s\": %s",
tokenname, PORT_ErrorToString(errnum));
}
return -1;
}
}
CERTCertList *certlist = NULL;
certlist = PK11_ListCertsInSlot(psle->slot);
if (!certlist) {
save_port_err() {
PK11_DestroySlotListElement(slots, &psle);
PK11_FreeSlotList(slots);
}
cnreterr(-1, cms, "could not get certificate list");
}
SECItem nickname = {
.data = (void *)cms->certname,
.len = strlen(cms->certname) + 1,
.type = siUTF8String,
};
cms->psle = psle;
cbd.cms = cms;
cbd.psle = psle;
cbd.slot = psle->slot;
cbd.cert = NULL;
PORT_SetError(SEC_ERROR_UNKNOWN_CERT);
if (needs_private_key) {
status = PK11_TraverseCertsForNicknameInSlot(&nickname,
psle->slot, is_valid_cert, &cbd);
errnum = PORT_GetError();
if (errnum)
dprintf("PK11_TraverseCertsForNicknameInSlot():%s:%s",
PORT_ErrorToName(errnum), PORT_ErrorToString(errnum));
} else {
status = PK11_TraverseCertsForNicknameInSlot(&nickname,
psle->slot,
is_valid_cert_without_private_key,
&cbd);
errnum = PORT_GetError();
if (errnum)
dprintf("PK11_TraverseCertsForNicknameInSlot():%s:%s",
PORT_ErrorToName(errnum), PORT_ErrorToString(errnum));
}
dprintf("status:%d cbd.cert:%p", status, cbd.cert);
if (status == SECSuccess && cbd.cert != NULL) {
if (cms->cert)
CERT_DestroyCertificate(cms->cert);
cms->cert = CERT_DupCertificate(cbd.cert);
} else {
errnum = PORT_GetError();
dprintf("token traversal %s; cert %sfound:%s:%s",
status == SECSuccess ? "succeeded" : "failed",
cbd.cert == NULL ? "not" : "",
PORT_ErrorToName(errnum), PORT_ErrorToString(errnum));
}
save_port_err() {
dprintf("Destroying cert list");
CERT_DestroyCertList(certlist);
dprintf("Destroying slot list element");
PK11_DestroySlotListElement(slots, &psle);
dprintf("Destroying slot list");
PK11_FreeSlotList(slots);
cms->psle = NULL;
}
if (status != SECSuccess || cms->cert == NULL)
cnreterr(-1, cms, "could not find certificate");
return 0;
}
| 0
|
231,640
|
~QuicServerTransportHandshakeTest() override {
// We need an extra pump here for some reason.
loopForWrites();
}
| 0
|
338,236
|
void WasmBinaryBuilder::validateBinary() {
if (hasDataCount && wasm.memory.segments.size() != dataCount) {
throwError("Number of segments does not agree with DataCount section");
}
}
| 0
|
475,984
|
static lzw_result lzw__block_advance(struct lzw_read_ctx *ctx)
{
uint64_t block_size;
uint64_t next_block_pos = ctx->data_sb_next;
const uint8_t *data_next = ctx->data + next_block_pos;
if (next_block_pos >= ctx->data_len) {
return LZW_NO_DATA;
}
block_size = *data_next;
if ((next_block_pos + block_size) >= ctx->data_len) {
return LZW_NO_DATA;
}
ctx->sb_bit = 0;
ctx->sb_bit_count = block_size * 8;
if (block_size == 0) {
ctx->data_sb_next += 1;
return LZW_OK_EOD;
}
ctx->sb_data = data_next + 1;
ctx->data_sb_next += block_size + 1;
return LZW_OK;
}
| 0
|
262,791
|
static void mctp_serial_push(struct mctp_serial *dev, unsigned char c)
{
switch (dev->rxstate) {
case STATE_IDLE:
dev->rxstate = STATE_HEADER;
fallthrough;
case STATE_HEADER:
mctp_serial_push_header(dev, c);
break;
case STATE_ESCAPE:
c |= 0x20;
fallthrough;
case STATE_DATA:
if (dev->rxstate != STATE_ESCAPE && c == BYTE_ESC) {
dev->rxstate = STATE_ESCAPE;
} else {
dev->rxfcs = crc_ccitt_byte(dev->rxfcs, c);
dev->rxbuf[dev->rxpos] = c;
dev->rxpos++;
dev->rxstate = STATE_DATA;
if (dev->rxpos == dev->rxlen) {
dev->rxpos = 0;
dev->rxstate = STATE_TRAILER;
}
}
break;
case STATE_TRAILER:
mctp_serial_push_trailer(dev, c);
break;
case STATE_ERR:
if (c == BYTE_FRAME)
dev->rxstate = STATE_IDLE;
break;
default:
netdev_err_once(dev->netdev, "invalid rx state %d\n",
dev->rxstate);
}
}
| 0
|
412,087
|
respip_inform_super(struct module_qstate* qstate, int id,
struct module_qstate* super)
{
struct respip_qstate* rq = (struct respip_qstate*)super->minfo[id];
struct reply_info* new_rep = NULL;
rq->state = RESPIP_SUBQUERY_FINISHED;
/* respip subquery should have always been created with a valid reply
* in super. */
log_assert(super->return_msg && super->return_msg->rep);
/* return_msg can be NULL when, e.g., the sub query resulted in
* SERVFAIL, in which case we regard it as a failure of the original
* query. Other checks are probably redundant, but we check them
* for safety. */
if(!qstate->return_msg || !qstate->return_msg->rep ||
qstate->return_rcode != LDNS_RCODE_NOERROR)
goto fail;
if(!respip_merge_cname(super->return_msg->rep, &qstate->qinfo,
qstate->return_msg->rep, super->client_info,
super->env->need_to_validate, &new_rep, super->region))
goto fail;
super->return_msg->rep = new_rep;
return;
fail:
super->return_rcode = LDNS_RCODE_SERVFAIL;
super->return_msg = NULL;
return;
}
| 0
|
248,320
|
DLLIMPORT int cfg_setnstr(cfg_t *cfg, const char *name, const char *value, unsigned int index)
{
cfg_opt_t *opt;
opt = cfg_getopt(cfg, name);
if (opt && opt->validcb2 && (*opt->validcb2)(cfg, opt, (void *)value) != 0)
return CFG_FAIL;
return cfg_opt_setnstr(opt, value, index);
}
| 0
|
249,977
|
GF_Err DoInterleave(MovieWriter *mw, GF_List *writers, GF_BitStream *bs, u8 Emulation, u64 StartOffset, Bool drift_inter)
{
u32 i, tracksDone;
TrackWriter *tmp, *curWriter;
GF_Err e;
u32 descIndex, sampSize, chunkNumber;
u64 DTS;
u32 moov_timescale;
u16 curGroupID;
Bool forceNewChunk, writeGroup;
GF_StscEntry *stsc_ent;
//this is used to emulate the write ...
u64 offset, sampOffset, size, mdatSize;
u32 count;
GF_ISOFile *movie = mw->movie;
mdatSize = 0;
#ifdef TEST_LARGE_FILES
if (!Emulation) {
char *blank;
u32 count, i;
i = count = 0;
blank = gf_malloc(sizeof(char)*1024*1024);
memset(blank, 0, sizeof(char)*1024*1024);
count = 4096;
memset(blank, 0, sizeof(char)*1024*1024);
while (i<count) {
u32 res = gf_bs_write_data(bs, blank, 1024*1024);
if (res != 1024*1024) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CORE, ("error writing to disk: only %d bytes written\n", res));
}
i++;
GF_LOG(GF_LOG_ERROR, GF_LOG_CORE, ("writing blank block: %.02f done - %d/%d \r", (100.0*i)/count , i, count));
}
gf_free(blank);
}
mdatSize = 4096*1024;
mdatSize *= 1024;
#endif
/*write meta content first - WE DON'T support fragmentation of resources in ISOM atm*/
if (movie->meta) {
e = DoWriteMeta(movie, movie->meta, bs, Emulation, StartOffset, &size);
if (e) return e;
mdatSize += size;
StartOffset += (u32) size;
}
if (movie->moov) {
if (movie->moov->meta) {
e = DoWriteMeta(movie, movie->moov->meta, bs, Emulation, StartOffset, &size);
if (e) return e;
mdatSize += size;
StartOffset += (u32) size;
}
i=0;
while ((tmp = (TrackWriter*)gf_list_enum(writers, &i))) {
if (tmp->mdia->mediaTrack->meta) {
e = DoWriteMeta(movie, tmp->mdia->mediaTrack->meta, bs, Emulation, StartOffset, &size);
if (e) return e;
mdatSize += size;
StartOffset += (u32) size;
}
}
}
if (movie->storageMode == GF_ISOM_STORE_TIGHT)
return DoFullInterleave(mw, writers, bs, Emulation, StartOffset);
curGroupID = 1;
//we emulate a write from this offset...
offset = StartOffset;
tracksDone = 0;
#ifdef TEST_LARGE_FILES
offset += mdatSize;
#endif
moov_timescale = movie->moov && movie->moov->mvhd ? movie->moov->mvhd->timeScale : 1000;
count = gf_list_count(writers);
//browse each groups
while (1) {
/*the max DTS the chunk of the current writer*/
u64 chunkLastDTS = 0;
/*the timescale related to the max DTS*/
u32 chunkLastScale = 0;
writeGroup = 1;
//proceed a group
while (writeGroup) {
curWriter = NULL;
for (i=0 ; i < count; i++) {
tmp = (TrackWriter*)gf_list_get(writers, i);
//is it done writing ?
if (tmp->isDone) continue;
//is it in our group ??
if (tmp->stbl->groupID != curGroupID) continue;
//write till this chunk is full on this track...
while (1) {
Bool self_contained;
u32 nb_samp = 1;
u32 sample_dur;
u64 chunk_prev_dur;
//To Check: are empty sample tables allowed ???
if (tmp->sampleNumber > tmp->stbl->SampleSize->sampleCount) {
tmp->isDone = 1;
tracksDone ++;
break;
}
//OK, get the current sample in this track
stbl_GetSampleDTS_and_Duration(tmp->stbl->TimeToSample, tmp->sampleNumber, &DTS, &sample_dur);
//can this sample fit in our chunk ?
if ( ( (DTS - tmp->DTSprev) + tmp->chunkDur) * moov_timescale > movie->interleavingTime * tmp->timeScale
/*drift check: reject sample if outside our check window*/
|| (drift_inter && chunkLastDTS && ( ((u64)tmp->DTSprev*chunkLastScale) > ((u64)chunkLastDTS*tmp->timeScale)) )
) {
//in case the sample is longer than InterleaveTime
if (!tmp->chunkDur) {
forceNewChunk = 1;
} else {
//this one is full. go to next one (exit the loop)
tmp->chunkDur = 0;
//forceNewChunk = 0;
break;
}
} else {
forceNewChunk = tmp->chunkDur ? 0 : 1;
}
//OK, we can write this track
curWriter = tmp;
//small check for first 2 samples (DTS = 0)
//only in the old mode can chunkdur be 0 for dts 0
if (tmp->sampleNumber == 2 && !tmp->chunkDur && gf_sys_old_arch_compat() ) {
forceNewChunk = 0;
}
chunk_prev_dur = tmp->chunkDur;
//FIXME we do not apply patch in test mode for now since this breaks all our hashes, remove this
//once we move to filters permanently
if (!gf_sys_old_arch_compat()) {
tmp->chunkDur += sample_dur;
} else {
//old style, compute based on DTS diff
tmp->chunkDur += (u32) (DTS - tmp->DTSprev);
}
tmp->DTSprev = DTS;
e = stbl_GetSampleInfos(curWriter->stbl, curWriter->sampleNumber, &sampOffset, &chunkNumber, &descIndex, &stsc_ent);
if (e)
return e;
e = stbl_GetSampleSize(curWriter->stbl->SampleSize, curWriter->sampleNumber, &sampSize);
if (e)
return e;
self_contained = ((curWriter->all_dref_mode==ISOM_DREF_SELF) || Media_IsSelfContained(curWriter->mdia, descIndex)) ? GF_TRUE : GF_FALSE;
update_writer_constant_dur(movie, curWriter, stsc_ent, &nb_samp, &sampSize, GF_FALSE);
if (curWriter->stbl->MaxChunkSize && (curWriter->chunkSize + sampSize > curWriter->stbl->MaxChunkSize)) {
curWriter->chunkSize = 0;
tmp->chunkDur -= chunk_prev_dur;
forceNewChunk = 1;
}
curWriter->chunkSize += sampSize;
//do we actually write, or do we emulate ?
if (Emulation) {
//update our offsets...
if (self_contained) {
e = stbl_SetChunkAndOffset(curWriter->stbl, curWriter->sampleNumber, descIndex, curWriter->stsc, &curWriter->stco, offset, forceNewChunk, nb_samp);
if (e)
return e;
offset += sampSize;
mdatSize += sampSize;
} else {
if (curWriter->prev_offset != sampOffset) forceNewChunk = 1;
curWriter->prev_offset = sampOffset + sampSize;
//we have a DataRef, so use the offset idicated in sampleToChunk
//and ChunkOffset tables...
e = stbl_SetChunkAndOffset(curWriter->stbl, curWriter->sampleNumber, descIndex, curWriter->stsc, &curWriter->stco, sampOffset, forceNewChunk, nb_samp);
if (e) return e;
}
} else {
//we're writing ....
if (self_contained) {
e = WriteSample(mw, sampSize, sampOffset, stsc_ent->isEdited, bs, nb_samp);
if (e)
return e;
}
}
//ok, the sample is done
if (curWriter->sampleNumber >= curWriter->stbl->SampleSize->sampleCount) {
curWriter->isDone = 1;
//one more track done...
tracksDone ++;
break;
} else {
curWriter->sampleNumber += nb_samp;
}
}
/*record chunk end-time & track timescale for drift-controled interleaving*/
if (drift_inter && curWriter) {
chunkLastScale = curWriter->timeScale;
chunkLastDTS = curWriter->DTSprev;
/*add one interleave window drift - since the "maxDTS" is the previously written one, we will
have the following cases:
- sample doesn't fit: post-pone and force new chunk
- sample time larger than previous chunk time + interleave: post-pone and force new chunk
- otherwise store and track becomes current reference
this ensures a proper drift regulation (max DTS diff is less than the interleaving window)
*/
chunkLastDTS += curWriter->timeScale * movie->interleavingTime / moov_timescale;
}
}
//no sample found, we're done with this group
if (!curWriter) {
writeGroup = 0;
continue;
}
}
//if all our track are done, break
if (tracksDone == gf_list_count(writers)) break;
//go to next group
curGroupID ++;
}
if (movie->mdat) movie->mdat->dataSize = mdatSize;
return GF_OK;
}
| 0
|
244,033
|
GF_Err saiz_box_size(GF_Box *s)
{
GF_SampleAuxiliaryInfoSizeBox *ptr = (GF_SampleAuxiliaryInfoSizeBox*)s;
if (ptr->aux_info_type || ptr->aux_info_type_parameter) {
ptr->flags |= 1;
}
if (ptr->flags & 1) ptr->size += 8;
ptr->size += 5;
if (ptr->default_sample_info_size==0) ptr->size += ptr->sample_count;
return GF_OK;
}
| 0
|
219,043
|
void ConstantFolding::ReplaceOperationWithIdentity(
int input_to_forward, const GraphProperties& properties, NodeDef* node,
GraphDef* graph) {
if (input_to_forward < 0 || input_to_forward >= node->input_size()) return;
const DataType dtype = GetDataTypeFromNodeOrProps(*node, properties);
if (dtype == DT_INVALID) return;
node->set_op("Identity");
EraseRegularNodeAttributes(node);
(*node->mutable_attr())["T"].set_type(dtype);
// Propagate the designated input through the identity.
node->mutable_input()->SwapElements(0, input_to_forward);
// Add all other inputs as control dependencies.
for (int i = 1; i < node->input_size(); ++i) {
if (IsControlInput(node->input(i))) {
break;
}
const string ctrl_dep =
AddControlDependency(node->input(i), graph, node_map_.get());
node_map_->UpdateInput(node->name(), node->input(i), ctrl_dep);
node->set_input(i, ctrl_dep);
}
graph_modified_ = true;
}
| 0
|
236,142
|
GF_Err krok_box_size(GF_Box *s)
{
GF_TextKaraokeBox*ptr = (GF_TextKaraokeBox*)s;
s->size += 6 + 8*ptr->nb_entries;
return GF_OK;
}
| 0
|
225,778
|
void svhd_box_del(GF_Box *s)
{
GF_SphericalVideoInfoBox *ptr = (GF_SphericalVideoInfoBox *)s;
if (ptr->string) gf_free(ptr->string);
gf_free(s);
| 0
|
274,741
|
callbacks_fullscreen_toggled (GtkMenuItem *menuitem, gpointer user_data)
{
//struct GtkWindow *win = (struct GtkWindow *)(screen.win.topLevelWindow);
GdkWindowState state = gdk_window_get_state (gtk_widget_get_window(screen.win.topLevelWindow));
if(state & GDK_WINDOW_STATE_FULLSCREEN)
gtk_window_unfullscreen (GTK_WINDOW(screen.win.topLevelWindow));
else
gtk_window_fullscreen (GTK_WINDOW(screen.win.topLevelWindow));
}
| 0
|
393,488
|
static SQInteger base_collectgarbage(HSQUIRRELVM v)
{
sq_pushinteger(v, sq_collectgarbage(v));
return 1;
}
| 0
|
226,054
|
GF_Err dOps_box_size(GF_Box *s)
{
GF_OpusSpecificBox *ptr = (GF_OpusSpecificBox *)s;
ptr->size += 11;
if (ptr->ChannelMappingFamily)
ptr->size += 2 + ptr->OutputChannelCount;
return GF_OK;
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.