*updated main.c.
This commit is contained in:
parent
5bf75a513e
commit
e9c3fc7754
@ -382,7 +382,7 @@ static char* _load_file(const char* path) {
|
|||||||
fseek(fp, curpos, SEEK_SET);
|
fseek(fp, curpos, SEEK_SET);
|
||||||
result = (char*)malloc((size_t)(l + 1));
|
result = (char*)malloc((size_t)(l + 1));
|
||||||
mb_assert(result);
|
mb_assert(result);
|
||||||
(void)fread(result, 1, l, fp);
|
fread(result, 1, l, fp);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
result[l] = '\0';
|
result[l] = '\0';
|
||||||
}
|
}
|
||||||
@ -415,9 +415,9 @@ static int _save_file(const char* path, const char* txt) {
|
|||||||
|
|
||||||
static void _clear_screen(void) {
|
static void _clear_screen(void) {
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
(void)system("cls");
|
system("cls");
|
||||||
#else /* _MSC_VER */
|
#else /* _MSC_VER */
|
||||||
(void)system("clear");
|
system("clear");
|
||||||
#endif /* _MSC_VER */
|
#endif /* _MSC_VER */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user