-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
84c7765
commit 52f12c6
Showing
6 changed files
with
69 additions
and
61 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
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
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,48 +1,36 @@ | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
|
||
char* readln() { | ||
char* str = malloc(128); | ||
scanf("%127s", str); | ||
return str; | ||
char *readln() { | ||
char *str = malloc(128); | ||
fgets(str, 127, stdin); | ||
return str; | ||
} | ||
|
||
void print(char *str) { | ||
fputs(str, stdout); | ||
} | ||
void print(char *str) { fputs(str, stdout); } | ||
|
||
void termpos(int x, int y) { | ||
printf("\x1b[%d;%dH", x, y); | ||
} | ||
void termpos(int x, int y) { printf("\x1b[%d;%dH", x, y); } | ||
|
||
void termclear() { | ||
printf("\x1b[2J\x1b[H"); | ||
} | ||
void termclear() { printf("\x1b[2J\x1b[H"); } | ||
|
||
void curshide() { | ||
print("\x1b[?25l"); | ||
} | ||
void curshide() { print("\x1b[?25l"); } | ||
|
||
void cursshow() { | ||
print("\x1b[?25h"); | ||
} | ||
void cursshow() { print("\x1b[?25h"); } | ||
|
||
char* filer(char* path) { | ||
FILE *fptr = fopen(path, "rb"); | ||
char *contents = 0; | ||
|
||
if(fptr == NULL) { | ||
return "File not found"; | ||
} | ||
fseek(fptr, 0, SEEK_END); | ||
long size = ftell(fptr); | ||
fseek(fptr, 0, SEEK_SET); | ||
|
||
contents = malloc(size); | ||
fread(contents, 1, size, fptr); | ||
fclose(fptr); | ||
|
||
return contents; | ||
} | ||
char *filer(char *path) { | ||
FILE *fptr = fopen(path, "rb"); | ||
char *contents = 0; | ||
|
||
if (fptr == NULL) { | ||
return "File not found"; | ||
} | ||
fseek(fptr, 0, SEEK_END); | ||
long size = ftell(fptr); | ||
fseek(fptr, 0, SEEK_SET); | ||
|
||
contents = malloc(size); | ||
fread(contents, 1, size, fptr); | ||
fclose(fptr); | ||
|
||
return contents; | ||
} |
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,10 @@ | ||
|
||
fn getStr() Bool | ||
{ | ||
return true; | ||
} | ||
|
||
fn main() Int { | ||
val poggers: Int = getStr(); | ||
return 0; | ||
} |