From 26da453832ca90ce22415a59a2aab57ab16cba66 Mon Sep 17 00:00:00 2001 From: "Douglas B. Rumbaugh" Date: Sun, 2 Nov 2025 21:56:58 -0500 Subject: Comment header + clang tidy --- include/builtin.h | 8 ++++++++ include/command.h | 9 ++++++++- include/config.h | 8 ++++++++ include/lexer.h | 21 ++++++++++++++------- include/variables.h | 8 ++++++++ 5 files changed, 46 insertions(+), 8 deletions(-) (limited to 'include') 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 + * + * 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 + * + * 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 + * + * 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 + * + * Distributed under the Modified BSD License + * */ #ifndef H_HUSH_LEXER #define H_HUSH_LEXER #include -#include -#include #include #include +#include +#include #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 + * + * Distributed under the Modified BSD License * */ #ifndef H_HUSH_VARIABLES -- cgit v1.2.3