// CurIndex returns cursor's file index.
185628
func (gr *GroupReader) CurIndex() int {
	gr.mtx.Lock()
	defer gr.mtx.Unlock()
	return gr.curIndex
}
612082
func (d *Context) GetPropIndex(objIndex int, arrIndex uint) bool {
	return int(C.duk_get_prop_index(d.duk_context, C.duk_idx_t(objIndex), C.duk_uarridx_t(arrIndex))) == 1
}
140916
func CursorPos() (x, y float32) {
	return Input.Mouse.X * opts.GlobalScale.X, Input.Mouse.Y * opts.GlobalScale.Y
}
1251847
func (tp *TicketPool) Cursor() int64 {
	tp.mtx.RLock()
	defer tp.mtx.RUnlock()
	return tp.cursor
}
1008488
func pieceEndFileIndex(pieceEndOffset int64, files []*File) int {
	for i, f := range files {
		if f.offset+f.length >= pieceEndOffset {
			return i + 1
		}
	}
	return 0
}
89468
func (r *Redis) PSetex(key string, milliseconds int, value string) error {
	_, err := r.ExecuteCommand("PSETEX", key, milliseconds, value)
	return err
}
1204672
func (tz *TzArchive) DeleteIndex(idx int) error {
	if idx >= tz.NumFiles {
		return errors.New("index out of range of number of files")
	}

	tz.files = append(tz.files[:idx], tz.files[idx+1:]...)
	return nil
}
1100354
func (c *Client) LIndex(key string, index int) (string, error) {
	v, err := c.execWithKey(true, "LINDEX", key, index)
	if err != nil {
		return "", err
	}
	return iface2str(v)
}
635295
func (pcomp *pcomp) constantIndex(v interface{}) uint32 {
	index, ok := pcomp.constants[v]
	if !ok {
		index = uint32(len(pcomp.prog.Constants))
		pcomp.constants[v] = index
		pcomp.prog.Constants = append(pcomp.prog.Constants, v)
	}
	return index
}
1327946
func (db *DB) Preparex(query string) (*Stmt, error) {
	return Preparex(db, query)
}
298677
func (vi *VersionInfo) WriteHex(filename string) error {
	return ioutil.WriteFile(filename, vi.Buffer.Bytes(), 0655)
}
768054
func pyindex(index, len int) (int, bool) {
	if len <= 0 {
		return 0, false
	}
	// wrap from the end
	if index < 0 {
		index = len + index
	}
	if index < 0 || index >= len {
		return 0, false
	}
	return index, true
}
1261773
func (db *DB) LIndex(key []byte, index int32) ([]byte, error) {
	if err := checkKeySize(key); err != nil {
		return nil, err
	}

	var seq int32
	var headSeq int32
	var tailSeq int32
	var err error

	metaKey := db.lEncodeMetaKey(key)

	it := db.bucket.NewIterator()
	defer it.Close()

	headSeq, tailSeq, _, err = db.lGetMeta(it, metaKey)
	if err != nil {
		return nil, err
	}

	if index >= 0 {
		seq = headSeq + index
	} else {
		seq = tailSeq + index + 1
	}

	sk := db.lEncodeListKey(key, seq)
	v := it.Find(sk)

	return v, nil
}
1018750
func CursorPos() (x, y float32) {
	w, h, _ := sdl.GetMouseState()
	return float32(w), float32(h)
}
1154631
func OpenShardedIndex(path string) (ShardedIndex, error) {
	var meta shardedIndexMetadata
	var err error
	if err = readJSON(shardedIndexMetadataPath(path), &meta); err != nil {
		return nil, err
	}

	s := &shardedIndex{
		indices: make([]bleve.Index, meta.NumShards),
	}
	for i := 0; i < meta.NumShards; i++ {
		s.indices[i], err = bleve.Open(childIndexerPath(path, i))
		if err != nil {
			return nil, err
		}
	}
	s.bleveIndex = bleve.NewIndexAlias(s.indices...)
	return s, nil
}
945599
func minIndex(slice []float64) int {
	if len(slice) == 0 {
		return -1
	}
	min := slice[0]
	minIndex := 0
	for index := 0; index < len(slice); index++ {
		if slice[index] < min {
			min = slice[index]
			minIndex = index
		}
	}
	return minIndex
}
664548
func (d *Context) IsValidIndex(index int) bool {
	return int(C.duk_is_valid_index(d.duk_context, C.duk_idx_t(index))) == 1
}