sophuwu.site > termcalc
tidy
sophuwu sophie@skisiel.com
Wed, 20 Nov 2024 23:20:26 +0100
commit

0310ac46acdb9fdbcfc9615d3cb50b844610b902

parent

b05dc75f4cdc05d6ac8f54910bf0db6d71a0862c

5 files changed, 10 insertions(+), 21 deletions(-)

jump to
M .gitignore.gitignore

@@ -1,11 +1,2 @@

-**/* -!.idea/**/* -!**/*/ -!**/*.cpp -!**/*.c -!**/*.h -!**/*.hpp -!**/Makefile -!**/README.md -!**/.gitignore -!src/**/* +build/ +.idea/
D build/.gitignore

@@ -1,3 +0,0 @@

-./* -!./ -!tmp/
M src/calc.cppsrc/calc.cpp

@@ -1,12 +1,11 @@

-#include <iostream> #include "calc.h" -long getFloat(char* str, flt_t& num) { +int getFloat(char* str, flt_t& num) { flt_t iPart = 0.0f; flt_t fPart = 0.0f; - long fPartLen = 0; - long i = 0; - long sign = 1; + int_t fPartLen = 0; + int i = 0; + int sign = 1; if (str[0] == '-') { sign = -1;
M src/calc.hsrc/calc.h

@@ -1,9 +1,13 @@

#ifndef TERMCALC_CALC_H #define TERMCALC_CALC_H +#include <iostream> #include <cfloat> #include <cmath> +#include <string> typedef long double flt_t; typedef long long int_t; + +typedef std::string strr; #endif //TERMCALC_CALC_H
D zig-cc/.gitignore

@@ -1,2 +0,0 @@

-!* -!./*