-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexpansion.h
28 lines (22 loc) · 862 Bytes
/
expansion.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
Joseph Polaski
CS344: Program 3
expansion.h
This headerfile contains all prototypes for functions related to
expansion of "$$" string for smallsh. Function definitions in
expansion.c
Sources Cited:
Title: C Header Files and Prototypes
Author: Mark Kevin Baltazar
URL: https://medium.com/@markkevinbaltazar/c-header-files-and-prototypes-170ecdf526d
Description: I read this article in order to learn how to properly implement header files for
function prototyping.
*/
// header guard
#ifndef EXPANSION_
#define EXPANSION_
char *expand$$(char *tokenString); // checks for expansion and processes it
int canExpand(char *tokenString); // performs check for expansion
int checkFormat(char *tokenString, int startIndex); // checks format of token string
char *performExpansion(char *tokenString, int startIndex); // performs string expansion for "$$"
#endif