assignment 1 problem 3 clang-format
This commit is contained in:
@@ -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--) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user