Skip to content

Commit

Permalink
Merge pull request QuantumLS-Studio#9 from FTS427/main
Browse files Browse the repository at this point in the history
Fix something
  • Loading branch information
FTS427 authored Oct 4, 2023
2 parents a1f7a90 + 52b63e3 commit 2b2addc
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 8 deletions.
Binary file modified src/example/example
Binary file not shown.
4 changes: 2 additions & 2 deletions src/example/example.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "../ECPPH.h"
#include "../head/ECPPH.h"

int main(){
clear(0);
clear();
line("/",5,"none",true);
line("-",5,"red",true);
line("\\",5,"yellow",true);
Expand Down
15 changes: 9 additions & 6 deletions src/ECPPH.h → src/head/ECPPH.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,21 @@
#include <ctime>
#include <chrono>
#include <cstring>
#include <cstdio>
#include <ios>
#include <string>
#include <sys/types.h>
#include "cc.h"
using namespace std;

int error(){
printf("\033[1,31mERROR!\033[0m\a\n");
return 1;
}

void clear(int i){
if(i==0)
system("clear");
if(i==1)
system("CLS");
error;
void clear(){
printf("\033[2J");
printf("\033[0,0");
}

void print(const char T[],string color,bool i){
Expand All @@ -26,6 +28,7 @@ void print(const char T[],string color,bool i){
cout<<T<<"\n";
if(color=="red")
cout<<"\033[31m"<<T<<"\033[0m\n";
/*cout<<FRED<<T<<NONE<<endl;*/
if(color=="yellow")
cout<<"\033[32m"<<T<<"\033[0m\n";
if(color=="teal")
Expand Down
32 changes: 32 additions & 0 deletions src/head/cc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#define NONE \\033[0m

//control console
#define HIGHLIGHT \\033[1m
#define UNDERLINE \\033[4m
#define BLINK \\033[5m
#define FC \\033[7m
#define DISA \\033[8m

//font color
#define FBLACK \\033[30m
#define FRED \\033[31m
#define FYELLOW \\033[33m
#define FGREEN \\033[32m
#define FBLUE \\033[34m
#define FCYAN \\033[36m
#define FPURPLE \\033[35m
#define FWHITE \\033[37m
#define FGREY \\033[38m

//back color
#define BBLACK \\033[40m
#define BRED \\033[41m
#define BYELLOW \\033[43m
#define BGREEN \\033[42m
#define BBLUE \\033[44m
#define BCYAN \\033[46m
#define BPURPLE \\033[45m
#define BWHITE \\033[47m

#define DISC \\033[?25l
#define AC \\033[?25h

0 comments on commit 2b2addc

Please sign in to comment.