⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 icstack.h

📁 IBE是一种非对称密码技术
💻 H
字号:
/* Copyright 2003-2006, Voltage Security, all rights reserved.
 */

#include "vibe.h"
#include "environment.h"
#include "base.h"
#include "libctx.h"
#include "stringutil.h"

#ifndef _ICSTACK_H_
#define _ICSTACK_H_

#ifdef __cplusplus
extern "C" {
#endif

typedef struct 
{
	Pointer       *items;
	unsigned int   capacity;
	unsigned int   length;
} icStack;

/* Creates a stack.
 */
int icStackCreate (
   icStack **stack,
   VoltLibCtx *libCtx
   );

/* Frees all memory associated with the stack.  If the items contained in
 * the stack need to be freed then you must first pop all the items off
 * and free them one by one to ensure you don't cause a memory leak.
 */
void icStackFree (
   icStack **stack,
   VoltLibCtx *libCtx
   );

/* Pushes an item onto the top of the stack.
 */
int icStackPush (
   icStack *stack,
   Pointer item,
   VoltLibCtx *libCtx
   );

/* Removes an item from the top of the stack.
 * If the caller passes an address for item, the function will return
 * it. If not, the function will just eliminate the item from the stack.
 */
int icStackPop (
   icStack *stack,
   Pointer *item,
   VoltLibCtx *libCtx
   );

/* Returns the item on the top of the stack, but does not pop the item
 * (that is, after the call, the item is still there).
 */
int icStackTop (
   icStack *stack,
   Pointer *item,
   VoltLibCtx *libCtx
   );

#ifdef __cplusplus
}
#endif

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -