--- /dev/null
+*.o
+*.so
+man/*
+!man/*.scd
--- /dev/null
+Copyright (c) 2021 Armaan Bhojwani
+
+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.
--- /dev/null
+DESTDIR ?= /usr/local
+CFLAGS := -Wall -Wextra -pedantic -std=c99 -fPIC ${CFLAGS}
+
+all: lib man
+
+lib:
+ ${CC} -shared ${LDFLAGS} ${OBJS} -o acheam.so src/*.c ${CFLAGS}
+
+man:
+ for i in man/*.scd; do \
+ scdoc < $$i > $$(echo "$$i" | rev | cut -f 2- -d '.' | rev); \
+ done
+
+install: all
+ mkdir -p ${DESTDIR}/include \
+ ${DESTDIR}/lib/pkgconfig \
+ ${DESTDIR}/man/man3
+
+ cp acheam.so ${DESTDIR}/lib
+ cp acheam.pc ${DESTDIR}/lib/pkgconfig
+ cp src/acheam.h ${DESTDIR}/include
+ cp man/*.3 ${DESTDIR}/man/man3/
+
+uninstall:
+ rm ${DESTDIR}/include/acheam.h \
+ ${DESTDIR}/lib/acheam.so \
+ ${DESTDIR}/lib/pkgconfig/acheam.pc
+
+ for i in man/*.scd; do \
+ rm ${DESTDIR}/man/man3/$$(basename "$$i" ".scd"); \
+ done
+
+.POSIX:
+.PHONY: all man
--- /dev/null
+libacheam
+---------
+
+Personal C library to make writing programs a bit faster. Fully documented 0
+dependency POSIX C99. Manpages require scdoc to build (but that's also 0
+dependency C99).
+
+Installation:
+ make install
+
+Further documentation can be found in libacheam(3).
+
+Copyright MIT License Armaan Bhojwani 2021.
--- /dev/null
+prefix=/usr/local
+exec_prefix=${prefix}
+includedir=${prefix}/include
+libdir=${prefix}/lib
+
+Name: libacheam
+Version: 0.0.0
+Description: Armaan's personal C library
+Requires:
+Cflags: -I${includedir}/
+Libs: -L${libdir} -lacheam
--- /dev/null
+libacheam(3)
+
+# NAME
+libacheam - Armaan's personal C library
+
+# DESCRIPTION
+Like many advancing C programmers, I soon found the C standard library
+inadequate for my day to day needs. This library is a way for me to fix that in
+my own projects. It will grow as I need it to, but probably not very quickly.
+I've designed it to be as portable and permissive as possible (with one
+exception being that it is written in C99 instead of ANSI C).
+
+# SEE ALSO
+toupperw(3), tolowerw(3)
+
+# LICENSE
+MIT License Armaan Bhojwani 2021.
+
+# BUGS, PATCHES, SOURCE
+https://sr.ht/~armaan/libacheam
--- /dev/null
+toupperw.3.scd
\ No newline at end of file
--- /dev/null
+toupperw(3)
+
+# NAME
+toupperw, tolowerw - convert strings to uppercase or lowercase
+
+# SYNOPSIS
+```
+#include <acheam.h>
+
+char * toupperw(char *);
+char * tolowerw(char *);
+```
+
+# DESCRIPTION
+Like ctype.h's toupper() and tolower(), except that it can take full strings
+instead of just single characters.
+
+# RETURN VALUE
+A pointer to the converted string.
+
+# SEE ALSO
+toupper(3), tolower(3)
+
+# COLOPHON
+This page is a part of libacheam(3).
--- /dev/null
+char * tolowerw(char *input);
+char * toupperw(char *input);
--- /dev/null
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+
+char *
+tolowerw(char *inp)
+{
+ char *tmp = calloc(strlen(inp), sizeof(char));
+ strcpy(tmp, inp);
+ for (int i = 0; tmp[i]; i++){
+ tmp[i] = tolower(tmp[i]);
+ }
+ return tmp;
+}
+
--- /dev/null
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+
+char *
+toupperw(char *inp)
+{
+ char *tmp = calloc(strlen(inp), sizeof(char));
+ strcpy(tmp, inp);
+ for (int i = 0; tmp[i]; i++){
+ tmp[i] = toupper(tmp[i]);
+ }
+ return tmp;
+}
+