From: Matthew Owens Date: Tue, 21 Dec 2021 20:44:14 +0000 (+0000) Subject: replaced template strings with priority-queue X-Git-Url: https://git.owens.tech/editable-focus.html/editable-focus.html/git?a=commitdiff_plain;h=8ecc25b6daeeaa8faafba65f94fcfff418465fd3;p=AbyssalThistle%2Fpriority-queue.git replaced template strings with priority-queue --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..378eac2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build diff --git a/CMakeLists.txt b/CMakeLists.txt index f7e5667..a91b8eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,17 +1,17 @@ cmake_minimum_required(VERSION 3.15) -project(template) +project(priority_queue) set(CMAKE_C_STANDARD 11) file(GLOB_RECURSE SRC src/*.c - template-test/*.c + priority_queue-test/*.c ) -add_executable(template-test ${SRC}) -target_include_directories(template-test +add_executable(priority_queue-test ${SRC}) +target_include_directories(priority_queue-test PUBLIC src - PUBLIC template-test + PUBLIC priority_queue-test ) -target_link_libraries(template-test PRIVATE check) +target_link_libraries(priority_queue-test PRIVATE check) diff --git a/README.md b/README.md index c95f8c6..70a3d25 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# module-template +# priority-queue diff --git a/init_module.sh b/init_module.sh deleted file mode 100755 index 3f82dfa..0000000 --- a/init_module.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -function error() -{ - echo "provide a name" - exit 1 -} - -function init() -{ - echo "renaming template file & lines to $1" - upper=$(echo $1 | tr '[:lower:]' '[:upper:]') - under=$(echo $1 | tr '-' '_') - dashes=$(echo $1 | tr '_' '-') - - mv src/template.h src/$under.h - mv src/template.c src/$under.c - find . -type f -name '*.[c|h]' -exec sed -i "s/template/$under/g" {} + - sed -i "s/template/$under/g" CMakeLists.txt - echo "build" > .gitignore - - # clearing README - echo "# $dashes" > README.md -} - -# do we have a name parameter? -[ $# -eq 1 ] && init $1 || error -rm -- "$0" - -# clearing up source control -git rm src/template.c src/template.h $0 -git add src/ README.md .gitignore CMakeLists.txt - -git commit -m "replaced template strings with $1" -git push - diff --git a/src/priority_queue.c b/src/priority_queue.c new file mode 100644 index 0000000..c782d23 --- /dev/null +++ b/src/priority_queue.c @@ -0,0 +1 @@ +#include "priority_queue.h" diff --git a/src/priority_queue.h b/src/priority_queue.h new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/src/priority_queue.h @@ -0,0 +1 @@ +#pragma once diff --git a/src/template.c b/src/template.c deleted file mode 100644 index a0c3cf6..0000000 --- a/src/template.c +++ /dev/null @@ -1 +0,0 @@ -#include "template.h" diff --git a/src/template.h b/src/template.h deleted file mode 100644 index 6f70f09..0000000 --- a/src/template.h +++ /dev/null @@ -1 +0,0 @@ -#pragma once