assignment 1 problem 3 clang-format

This commit is contained in:
2021-03-30 11:04:35 +08:00
parent c312dd6400
commit 52c2445f05
4 changed files with 39 additions and 46 deletions

View File

@@ -5,8 +5,8 @@
* Stack, with functioin automaticlly increase the size
*/
#include <stdio.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -14,7 +14,6 @@
#include "stack.h"
bool CreateStack(Stack *stack, int size) {
/* check */
assert(size > 0);
@@ -68,7 +67,7 @@ bool Push(Stack *stack, ASTNode *x) {
/* delete old stack */
DestroyStack(stack);
/* set new stack */
*stack = newStack;
}
@@ -95,7 +94,7 @@ void DisplayStack(Stack *stack) {
/* print the top pointer hint */
printf("top --> ");
/* loop for stack data */
for (; top_p >= stack->data; top_p--) {