astack.h

来自「This program is free software you can r」· C头文件 代码 · 共 51 行

H
51
字号
/** AStack.h:*	Module for integer type stack** Version:	1.0* Date:		Mon Jun  7 1999* Copyright (C) 1999, Arturo Gonzalez Escribano*/#ifndef ASTACK_H#define ASTACK_H#include"ATypes.h"/** 1. STACK NODE STRUCTURE*/typedef struct Astnode {	int		datum;	struct Astnode	*next;} Astnode;/* * 2. RENAMING POINTER TO NODE AND CREATING STACK POINTER */typedef Astnode	*AstNode;typedef Astnode	**Astack;	/* * 3. PROTOTYPES OF INTERFACE FUNCTIONS */Astack Ast_init(void);		/* Creates a new stack (NULL) */void Ast_delete(Astack);	/* Deletes the stack and ALL the elements */void Ast_clean(Astack);		/* Clean the stack. All elements are lost */	void Ast_push(Astack, int);	/* Include element on the stack */	int Ast_pop(Astack);		/* Extract first element of the stack */Bool Ast_more(Astack);		/* True if there are alements on the stack *//* * 4. MACROS *//* Returns the first element on the stack without poping */	#define Ast_top(st)	((*st)->datum)#endif /* STACK_H */

⌨️ 快捷键说明

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