From 67b5f3076600c8cd3f134de7eda36eb10149b7f4 Mon Sep 17 00:00:00 2001 From: neauoire Date: Mon, 3 Jan 2022 10:32:54 -0800 Subject: [PATCH] Let us begin --- .clang-format | 21 +++++++++++++++++++++ .gitignore | 9 +++++++++ LICENSE | 21 +++++++++++++++++++++ README.md | 7 +++++++ build.sh | 16 ++++++++++++++++ src/book.c | 9 +++++++++ 6 files changed, 83 insertions(+) create mode 100644 .clang-format create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 README.md create mode 100755 build.sh create mode 100644 src/book.c diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..d923eb7 --- /dev/null +++ b/.clang-format @@ -0,0 +1,21 @@ +AlignAfterOpenBracket: DontAlign +AlignEscapedNewlines: DontAlign +AlignOperands: DontAlign +AllowShortBlocksOnASingleLine: Always +AllowShortCaseLabelsOnASingleLine: true +AllowShortEnumsOnASingleLine: true +AllowShortIfStatementsOnASingleLine: true +AllowShortLoopsOnASingleLine: true +AlwaysBreakAfterDefinitionReturnType: TopLevel +BinPackArguments: false +BinPackParameters: false +BreakBeforeBraces: WebKit +IndentCaseLabels: false +TabWidth: 4 +IndentWidth: 4 +ContinuationIndentWidth: 4 +UseTab: ForContinuationAndIndentation +ColumnLimit: 0 +ReflowComments: false +SortIncludes: false +SpaceBeforeParens: false \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..905c2b7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +bin/ +.DS* +*jpg~ +*png~ +*gif~ +*.kra + +*theme +*snarf diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..37e59e5 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Devine Lu Linvega + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..2779993 --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# Thousand Rooms + +The book builder for all languages. + +## Contributing + +Submit patches using [`git send-email`](https://git-send-email.io/) to the [~rabbits/public-inbox mailing list](https://lists.sr.ht/~rabbits/public-inbox). diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..7f0119a --- /dev/null +++ b/build.sh @@ -0,0 +1,16 @@ +#!/bin/sh -e + +echo "Cleaning.." +rm -f ./bin/book + +if [ "${1}" = '--format' ]; +then + echo "Formatting.." + clang-format -i src/book.c +fi + +mkdir -p bin + +cc -std=c89 -DNDEBUG -Os -g0 -s src/book.c -o bin/book + +bin/book diff --git a/src/book.c b/src/book.c new file mode 100644 index 0000000..b124dc6 --- /dev/null +++ b/src/book.c @@ -0,0 +1,9 @@ +#include +#include + +int +main(int argc, char const *argv[]) +{ + printf("hello.\n"); + return 0; +} \ No newline at end of file