-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
172 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
kisalt | ||
data/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ SRCS:=$(wildcard src/*.cpp) | |
CC=g++ | ||
|
||
kisalt: $(SRCS) | ||
$(CC) -o $@ $^ -lcrypto | ||
$(CC) -o $@ $^ -lcrypto -ljsoncpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#include "config.hpp" | ||
|
||
std::string envurl = nullptr==getenv("URL") ? "http://127.0.0.1:8080/" : getenv("URL"); | ||
bool envsave = nullptr==getenv("NOSAVE"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#pragma once | ||
#include <string> | ||
|
||
extern bool envsave; | ||
extern std::string envurl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#include <cstdarg> | ||
#include "log.hpp" | ||
#include <cstdio> | ||
#include <string> | ||
|
||
void error(std::string msg, ...){ | ||
va_list args; | ||
va_start(args, msg); | ||
|
||
printf(BOLD RED "ERROR: " RESET); | ||
vprintf(msg.c_str(), args); | ||
printf(RESET"\n"); | ||
|
||
va_end(args); | ||
} | ||
|
||
void info(std::string msg, ...){ | ||
va_list args; | ||
va_start(args, msg); | ||
|
||
printf(BOLD BLUE "INFO : " RESET); | ||
vprintf(msg.c_str(), args); | ||
printf(RESET"\n"); | ||
|
||
va_end(args); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#pragma once | ||
#include <cstdarg> | ||
#include <cstdio> | ||
#include <string> | ||
|
||
#define RED "\x1b[31m" | ||
#define BOLD "\x1b[1m" | ||
#define BLUE "\x1b[34m" | ||
#define RESET "\x1b[0m" | ||
|
||
void error(std::string, ...); | ||
void info(std::string, ...); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters