]> _ Git - colon3wavtool.git/commitdiff
this doesnt work so ig i have to use the w*ndows way...
authorparking_turkeys <roya1060wien@gmail.com>
Thu, 6 Aug 2026 20:56:17 +0000 (16:56 -0400)
committerparking_turkeys <roya1060wien@gmail.com>
Thu, 6 Aug 2026 20:56:17 +0000 (16:56 -0400)
main.c [new file with mode: 0644]

diff --git a/main.c b/main.c
new file mode 100644 (file)
index 0000000..1020918
--- /dev/null
+++ b/main.c
@@ -0,0 +1,33 @@
+#include <stdio.h>
+#include <math.h>
+
+#define LOGFILE "log.txt"
+
+static int log_args(int argc, char *argv[]);
+
+int main(int argc, char *argv[])
+{
+       //test ver: just like. log the arguments lol!!
+       log_args(1, (char*[]){"a", "a"});
+};
+
+int log_args(int argc, char *argv[])
+{
+       FILE *fp;
+       fp = fopen(LOGFILE, "a");
+       /* no idea why this wont work lmao???
+       for (int i = 1; i < argc; i++) { //loop through argv[]
+               char c;
+               for (int n = 0; (c = argv[i][n]) != '\0'; n++) { //loop through each character
+                       putc(c, fp);
+               };
+               putc(' ', fp);
+       };
+       */
+       fprintf(fp, "The tool has been CALLED!");
+       
+       putc('\n', fp);
+       fclose(fp);
+       
+       return 1;
+};