changeset 3:bdd83d6807d5 default tip

Autmatic Win32 Porting
author VilyaemKenyaz
date Thu, 28 Sep 2023 13:22:04 -0400
parents 0dbfb504309e
children
files LICENSE.TXT QUICKTIMER.MAN README.md c.sh quicktimer quicktimer.c win32/quicktimer.exe
diffstat 7 files changed, 81 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
diff -r 0dbfb504309e -r bdd83d6807d5 LICENSE.TXT
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LICENSE.TXT	Thu Sep 28 13:22:04 2023 -0400
@@ -0,0 +1,29 @@
+	CHRISTIAN FREE SOFTWARE LICENSE
+		    CFSL
+
+This software is free and open source charity ware, users are asked
+to donate to the Eastern Orthodox Church by any means.
+
+Redistribution of this project in source and/or binary forms with/without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions must retain this notice, the conditions, and the disclaimer.
+2. Redistributions must retain credit to the author, and signage to where the original
+work can be found.
+3. Redistributions cannot become a part of, in anyway shape or form, part of proprietary
+software, or software that is clearly out of line with Christian values.
+4. Redistributions must remain free.
+
+DISCLAIMER
+
+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 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 -r 0dbfb504309e -r bdd83d6807d5 QUICKTIMER.MAN
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/QUICKTIMER.MAN	Thu Sep 28 13:22:04 2023 -0400
@@ -0,0 +1,13 @@
+QUICKTIMER
+.SH
+NAME
+.PP
+QUICKTIMER
+.SH
+SYNOPSIS
+.PP
+QUICKTIMER
+.SH
+DESC
+.PP
+A simple timer that beeps when it goes off
diff -r 0dbfb504309e -r bdd83d6807d5 README.md
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README.md	Thu Sep 28 13:22:04 2023 -0400
@@ -0,0 +1,10 @@
+# QUICKTIMER
+QuickTimer is a simple timer program written in C, you give it an 
+unsigned integer for the amount of seconds you want for it to count down.
+Example:
+
+Set a timer for 1 minute
+quicktimer 60
+
+Set a timer for 5 minutes
+quicktimer 300
diff -r 0dbfb504309e -r bdd83d6807d5 c.sh
--- a/c.sh	Wed Jul 26 03:46:13 2023 -0400
+++ b/c.sh	Thu Sep 28 13:22:04 2023 -0400
@@ -1,10 +1,8 @@
 #!/bin/sh
-#Complation script
 clear
 echo "Compiling."
 rm quicktimer
-gcc quicktimer.c -o quicktimer
-echo "WITHOUT ARGS"
-./quicktimer
-echo "WITH ARGS"
-./quicktimer 30
+tcc quicktimer.c -o quicktimer
+doas cp quicktimer /usr/bin/
+x86_64-w64-mingw32-gcc quicktimer.c -o quicktimer.exe
+mv quicktimer.exe win32
diff -r 0dbfb504309e -r bdd83d6807d5 quicktimer
Binary file quicktimer has changed
diff -r 0dbfb504309e -r bdd83d6807d5 quicktimer.c
--- a/quicktimer.c	Wed Jul 26 03:46:13 2023 -0400
+++ b/quicktimer.c	Thu Sep 28 13:22:04 2023 -0400
@@ -2,32 +2,31 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
-#include <stdbool.h>
-#include <time.h>
+//#include <string.h>
+//#include <stdbool.h>
+//#include <time.h>
 
 
-int main(int argc, char* argv[]){
-//unsigned int timeleft;
-if (argc == 1){
-printf("QuickTimer by Vilyaem peepsoftgames.github.io thekenyaz@yandex.com\n Usage:\n quicktimer (unsigned int seconds)\n");
-return 1;
-}
-if(clock == -1){
-printf("Quicktimer does not have access to the time, clock_t clock is -1!\n");
-return 2;
+void  main(int argc, char* argv[]){
+	//unsigned int timeleft;
+	if (argc == 1){
+		puts("QuickTimer by Vilyaem peepsoftgames.github.io thekenyaz@yandex.com\n Usage:\n quicktimer (unsigned int seconds)\n");
+		exit(1);
+	}
+	/*
+	   if(clock == -1){
+	   puts("Quicktimer does not have access to the time, clock_t clock is -1!\n");
+	   exit(2);
+	   }
+	   */
+	unsigned int timeleft = atoi(argv[1]);
+	printf("Starting Quicktimer Ctrl-C to stop. Time left %d \n", timeleft);
+
+	while (timeleft != 0){
+		timeleft -= 1; 
+		printf("Time left: %d\n", timeleft);
+		sleep(1);
+	}
+	printf("Timer has finished, enjoy your day. Glory to the Father, the Son, and the Holy Spirit\n");
+	exit(0);
 }
-unsigned int timeleft = atoi(argv[1]);
-printf("Starting Quicktimer Ctrl-C to stop. Time left %d \n", timeleft);
-
-while (timeleft != 0){
-timeleft -= 1; //clock()/CLOCKS_PER_SEC;
-printf("Time left: %d\n", timeleft);
-//system("sleep 1"); // LORD!
-sleep(1);
-
-}
-
-printf("Timer has finished, enjoy your day. Glory to the Father, the Son, and the Holy Spirit\n");
-
-}
diff -r 0dbfb504309e -r bdd83d6807d5 win32/quicktimer.exe
Binary file win32/quicktimer.exe has changed