Mercurial Hosting > quickcalc
changeset 1:dfce17cc481b default tip
Autmatic Win32 Porting
author | VilyaemKenyaz |
---|---|
date | Thu, 28 Sep 2023 13:21:58 -0400 |
parents | 9bf878c59a1d |
children | |
files | LICENSE.TXT QUICKCALC.MAN c.ksh c.sh quickcalc quickcalc.c win32/quickcalc.exe |
diffstat | 7 files changed, 53 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/LICENSE.TXT Thu Sep 28 13:21:58 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. + + + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QUICKCALC.MAN Thu Sep 28 13:21:58 2023 -0400 @@ -0,0 +1,13 @@ +QUICKCALC +.SH +NAME +.PP +QUICKCALC +.SH +SYNOPSIS +.PP +QUICKCALC +.SH +DESC +.PP +Quickcalc is a simple command line integer only calculator
--- a/c.ksh Fri Aug 25 13:42:00 2023 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -#!/bin/ksh -clear -printf "Compiling\n" -rm quickcalc -tcc quickcalc.c -o quickcalc -cp quickcalc /usr/bin/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/c.sh Thu Sep 28 13:21:58 2023 -0400 @@ -0,0 +1,8 @@ +#!/bin/ksh +clear +printf "Compiling\n" +rm quickcalc +tcc quickcalc.c -o quickcalc +doas cp quickcalc /usr/bin/ +x86_64-w64-mingw32-gcc quickcalc.c -o quickcalc.exe +mv quickcalc.exe win32
--- a/quickcalc.c Fri Aug 25 13:42:00 2023 -0400 +++ b/quickcalc.c Thu Sep 28 13:21:58 2023 -0400 @@ -1,4 +1,4 @@ -// A simple calculator, if no arguments do wizard mode. +// A simple calculator #include <stdio.h> #include <stdlib.h> @@ -9,8 +9,8 @@ if (argc == 1) { puts("Quickcalculator 1Add 2Sub 3Mul 4Div"); exit(1);} // Get numbers - unsigned int value1 = atoi(argv[1]); - unsigned int value2 = atoi(argv[3]); + int value1 = atoi(argv[1]); + int value2 = atoi(argv[3]); // Determine operation unsigned int operation = atoi(argv[2]); // addition subtraction multiplication division