diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/builtin.h | 8 | ||||
| -rw-r--r-- | include/command.h | 9 | ||||
| -rw-r--r-- | include/config.h | 8 | ||||
| -rw-r--r-- | include/lexer.h | 21 | ||||
| -rw-r--r-- | include/variables.h | 8 |
5 files changed, 46 insertions, 8 deletions
diff --git a/include/builtin.h b/include/builtin.h index 1c99ef5..1b6baf2 100644 --- a/include/builtin.h +++ b/include/builtin.h @@ -1,4 +1,12 @@ /* + * include/builtin.h + * + * HUSH builtin commands module + * CISC 301 -- Operating Systems, Project 2 + * + * Copyright (C) 2025 Douglas B. Rumbaugh <dbrumbaugh@harrisburgu.edu> + * + * Distributed under the Modified BSD License * */ #ifndef H_HUSH_BUILTIN diff --git a/include/command.h b/include/command.h index 2948aca..502e7e1 100644 --- a/include/command.h +++ b/include/command.h @@ -1,7 +1,14 @@ /* + * include/command.h + * + * Abstractions for parsing commands from tokens and executing them + * CISC 301 -- Operating Systems, Project 2 + * + * Copyright (C) 2025 Douglas B. Rumbaugh <dbrumbaugh@harrisburgu.edu> + * + * Distributed under the Modified BSD License * */ - #ifndef H_HUSH_COMMAND #define H_HUSH_COMMAND diff --git a/include/config.h b/include/config.h index 789a1bb..caa5187 100644 --- a/include/config.h +++ b/include/config.h @@ -1,4 +1,12 @@ /* + * include/config.h + * + * Configuration parameters and constants for HUSH + * CISC 301 -- Operating Systems, Project 2 + * + * Copyright (C) 2025 Douglas B. Rumbaugh <dbrumbaugh@harrisburgu.edu> + * + * Distributed under the Modified BSD License * */ #ifndef H_HUSH_CONFIG diff --git a/include/lexer.h b/include/lexer.h index bec44a9..cf4cf98 100644 --- a/include/lexer.h +++ b/include/lexer.h @@ -1,15 +1,22 @@ /* - * Header file for the HUSH lexical analysis - * module + * include/lexer.h + * + * HUSH lexical analysis module + * CISC 301 -- Operating Systems, Project 2 + * + * Copyright (C) 2025 Douglas B. Rumbaugh <dbrumbaugh@harrisburgu.edu> + * + * Distributed under the Modified BSD License + * */ #ifndef H_HUSH_LEXER #define H_HUSH_LEXER #include <ctype.h> -#include <stdlib.h> -#include <string.h> #include <stdbool.h> #include <stdio.h> +#include <stdlib.h> +#include <string.h> #include "config.h" @@ -31,7 +38,7 @@ typedef struct token { struct token *next; } token; -/* +/* * Accepts a null-terminate string representing * a full command and returns the pointer to the * head of a list of parsed tokens. The provided @@ -47,7 +54,7 @@ typedef struct token { * input string is *not* null-terminated, or if * it has leading or trailing whitespace. */ - + token *parse_command(char *cmdstr); /* @@ -55,7 +62,7 @@ token *parse_command(char *cmdstr); * of parsed tokens and validates that the * tokens are syntactically valid. If the * sequence is valid, NULL will be returned. - * If the sequence is invalid, a pointer to + * If the sequence is invalid, a pointer to * the first invalid token will be returned. */ token *validate_command(token *cmd); diff --git a/include/variables.h b/include/variables.h index 7511690..0df2b65 100644 --- a/include/variables.h +++ b/include/variables.h @@ -1,4 +1,12 @@ /* + * include/variables.h + * + * Local variable storage and access + * CISC 301 -- Operating Systems, Project 2 + * + * Copyright (C) 2025 Douglas B. Rumbaugh <dbrumbaugh@harrisburgu.edu> + * + * Distributed under the Modified BSD License * */ #ifndef H_HUSH_VARIABLES |