spicylord / clutils (public) (License: GPLv3) (since 2019-07-04) (hash sha1)
An assortment of new and rewritten preexisting tools written by me.
List of commits:
Subject Hash Author Date (UTC)
spng: adds append feature; yes: removed openbsdism, and made main type int (i think?), clp: minor updates 103555e26dedcb442ccdd29b0175acb2a583b624 spicylord 2019-08-29 02:59:37
usefull for compiling c/c++. More info in README 5dafdff79949503997858a94db03f4ae798589b6 spicylord 2019-08-26 02:56:33
usefull for compiling c/c++. More info in README 73665a7d814e07970a0dce7a7b663d4ddf9217a4 spicylord 2019-08-26 02:55:56
hopefully delete ins.c b06e7258852b9ca1877b7c4fa78b6984e00a9b72 spicylord 2019-08-22 19:03:04
ins has been replaced with a shell script and clp has been fixed 35072ced804239e2f886fdf3b4dd995dfe6805f1 spicylord 2019-08-22 18:49:38
reverted sc because I cannot into memory management. ins is suffering from memory as well so use at your own risk. 1f24dcf261e3d779782a5e5ba2bd0c26da0fd928 spicylord 2019-08-17 19:10:51
im an idiot c6aa7a7fa124fb08422fb24de68ecb70ba066195 spicylord 2019-08-16 04:30:23
bug fixes 5ec9e0063dee0e8cb9b7c88a06535a1c13faa2af spicylord 2019-08-16 04:20:21
added free for previously unfreed malloc buffer fbuf ec2c9bbcb387a718d36bd861083ac2c40134c152 spicylord 2019-08-16 02:01:00
put all of the programs under the GPLv3 or later, also updated sc.c 77dbf20cedc357042ffc03e5da9a51690337a977 spicylord 2019-08-16 01:08:49
added ins to INSTALL script 6d58cd823d49a8ad4a32a57173d5d690ddb677c6 spicylord 2019-08-15 21:23:41
added ins, a program that takes standard input and inserts that into the beginning of a file c51d12a96e47c407a2e82980401556194b2c090e matt 2019-08-15 21:17:47
added exho, a program that runs a command and outputs that command to stdout 4c7b8d4998e747541c420256494cee40ff19fc12 spicylord 2019-07-12 02:29:35
allow for easy use of different c compilers in INSTALL a1bb4ec6cdbd070edb7955022f93ff33ca7255da spicylord 2019-07-11 16:16:46
made COPYING less cringe-inducing 8d1e9ca0093f143c25b919552b544db92c9f865d spicylord 2019-07-10 01:32:22
modified usage output and allowed for #,p 504ca7b3d8db60cb6d1f36a3fd48043ff62f78c0 spicylord 2019-07-06 15:49:16
spelling error in README 351dbee78173eef7ae94f9142c6a97452db0d208 spicylord 2019-07-04 20:30:33
added examples and instructions for clp, spng, and sc in the README 313a86755e40d909861bc95a11b75bbb109012c9 spicylord 2019-07-04 19:25:33
made regex slightly neater ac8eda8f7290e5f138edac12f789b1215de90719 spicylord 2019-07-04 18:31:55
fixed outputting garbled text into clipboard file a100287acf1993ae13130e036d7104bd2afe4585 spicylord 2019-07-04 18:30:34
Commit 103555e26dedcb442ccdd29b0175acb2a583b624 - spng: adds append feature; yes: removed openbsdism, and made main type int (i think?), clp: minor updates
Author: spicylord
Author date (UTC): 2019-08-29 02:59
Committer name: spicylord
Committer date (UTC): 2019-08-29 02:59
Parent(s): 5dafdff79949503997858a94db03f4ae798589b6
Signing key:
Tree: f1e371c8b4067c0cc0a032c0e3ab0267a7582161
File Lines added Lines deleted
clp.c 3 3
spng.c 7 1
yes.c 2 2
File clp.c changed (mode: 100644) (index e26e8ee..d3c21fd)
... ... int main(int argc, char *argv[])
30 30 FILE *tdelfilep; FILE *tdelfilep;
31 31 char tester[100000]; /* if you have a line longer than this then you have a problem. */ char tester[100000]; /* if you have a line longer than this then you have a problem. */
32 32 char *filename; char *filename;
33 filename = (char *)malloc(300);
33 filename = malloc(300);
34 34 sprintf(filename, "%s/%s", getenv("HOME"), ".clipboard"); sprintf(filename, "%s/%s", getenv("HOME"), ".clipboard");
35 35 char delim[32] = "------------------------------\n"; char delim[32] = "------------------------------\n";
36 36 long counter = 0; long counter = 0;
 
... ... int main(int argc, char *argv[])
99 99 fprintf(filep, "%s%s", delim, inbuf); fprintf(filep, "%s%s", delim, inbuf);
100 100 goto ending; goto ending;
101 101 } }
102 rewind(filep); //so it can start at the beginning
102 rewind(filep);
103 103 while (fgets(tester, sizeof(tester), filep)!=NULL) while (fgets(tester, sizeof(tester), filep)!=NULL)
104 104 if (memcmp(tester, delim, sizeof(delim)-1)==0) if (memcmp(tester, delim, sizeof(delim)-1)==0)
105 105 end++; end++;
 
... ... int main(int argc, char *argv[])
110 110 goto ending; /* stops program after outputting count */ goto ending; /* stops program after outputting count */
111 111 } }
112 112
113 if (end==0) {
113 if (!end) {
114 114 fputs("nothing to act on\n", stderr); fputs("nothing to act on\n", stderr);
115 115 fclose(filep); fclose(filep);
116 116 exit(1); exit(1);
File spng.c changed (mode: 100644) (index b55bcc8..c105483)
... ... along with this program. If not, see <https://www.gnu.org/licenses/>.
20 20 int main(int argc, char *argv[]) int main(int argc, char *argv[])
21 21 { {
22 22 char buf[100000]; char buf[100000];
23 int aflag=0;
23 24 FILE *filep = stdin; FILE *filep = stdin;
24 25 fread(buf, sizeof(buf), 1, filep); fread(buf, sizeof(buf), 1, filep);
25 26 for (int i=1; i<argc; i++) { for (int i=1; i<argc; i++) {
26 if (argc > 1 && (filep = fopen(argv[i], "w+"))==NULL) {
27 if (argv[i][0]=='-' && argv[i][1] && argv[i][1]=='a') {
28 aflag=1;
29 continue;
30 }
31 if (argc > 1 && (filep = fopen(argv[i], aflag?"a+":"w+"))==NULL) {
27 32 fprintf(stderr, "spng: unable to open %s\n", argv[i]); fprintf(stderr, "spng: unable to open %s\n", argv[i]);
28 33 continue; continue;
29 34 } }
30 35 fputs(buf, filep); fputs(buf, filep);
31 36 fclose(filep); fclose(filep);
37 aflag=0;
32 38 } }
33 39 return 0; return 0;
34 40 } }
File yes.c changed (mode: 100644) (index 962e0d9..7359238)
... ... along with this program. If not, see <https://www.gnu.org/licenses/>.
17 17
18 18 #include <stdio.h> #include <stdio.h>
19 19
20 void main(int argc, char *argv[])
20 int main(int argc, char *argv[])
21 21 { {
22 pledge("stdio", 0);
23 22 if (argc==1) if (argc==1)
24 23 for(;;) for(;;)
25 24 puts("y"); puts("y");
26 25 else else
27 26 for (;;) for (;;)
28 27 puts(argv[1]); puts(argv[1]);
28 return 1;
29 29 } }
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/spicylord/clutils

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/spicylord/clutils

Clone this repository using git:
git clone git://git.rocketgit.com/user/spicylord/clutils

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main