aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDouglas B. Rumbaugh <doug@douglasrumbaugh.com>2025-11-02 21:56:58 -0500
committerDouglas B. Rumbaugh <doug@douglasrumbaugh.com>2025-11-02 21:56:58 -0500
commit26da453832ca90ce22415a59a2aab57ab16cba66 (patch)
treef773bf84632158537fc72a9b869cd87066d73946 /include
parentf84e64b593c6e6fda9e2a907d25ed99d8742d619 (diff)
downloadhush-26da453832ca90ce22415a59a2aab57ab16cba66.tar.gz
Comment header + clang tidy
Diffstat (limited to 'include')
-rw-r--r--include/builtin.h8
-rw-r--r--include/command.h9
-rw-r--r--include/config.h8
-rw-r--r--include/lexer.h21
-rw-r--r--include/variables.h8
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