Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
PQCraft authored Mar 4, 2021
1 parent 6388a5a commit 0753967
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
4 changes: 1 addition & 3 deletions clibasic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@
#include <time.h>
#include <stdio.h>
#include <string.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <signal.h>
#include <stdbool.h>
#include <inttypes.h>
#include <sys/time.h>
#include <editline.h>

char VER[] = "0.8.5";
char VER[] = "0.9";

FILE *prog;
FILE *f[256];
Expand Down
8 changes: 4 additions & 4 deletions commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ if (!strcmp(arg[0], "EXIT") || !strcmp(arg[0], "QUIT")) {
cleanExit();
}
if (!strcmp(arg[0], "EXEC") || !strcmp(arg[0], "SH")) {
cerr = 0;
if (argct != 1) {cerr = 3; goto cmderr;}
if (argt[1] != 1) {cerr = 2; goto cmderr;}
err = system(arg[1]);
cerr = system(arg[1]);
cerr = 0;
printf("\e[38;5;%um\e[48;5;%um", fgc, bgc);
goto cmderr;
}
if (!strcmp(arg[0], "PRINT")) {
Expand All @@ -35,8 +36,7 @@ if (!strcmp(arg[0], "COLOR")) {
else {bgc = (uint8_t)atoi(arg[2]);}
}
if (debug) printf("CMD[COLOR]: fgc: [%u], bgc: [%u]\n", fgc, bgc);
printf("\e[38;5;%um", fgc);
printf("\e[48;5;%um", bgc);
printf("\e[38;5;%um\e[48;5;%um", fgc, bgc);
goto cmderr;
}
if (!strcmp(arg[0], "SET") || !strcmp(arg[0], "LET")) {
Expand Down
8 changes: 8 additions & 0 deletions functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ if (!strcmp(farg[0], "VAL")) {
if (ftype == 1) {cerr = 2; goto fexit;}
goto fexit;
}
if (!strcmp(farg[0], "~PROMPT$")) {
cerr = 0;
ftype = 1;
if (fargct != 0) {cerr = 3; goto fexit;}
int tmpt = getVal(prompt, outbuf);
if (tmpt != 1) strcpy(outbuf, "CLIBASIC> ");
goto fexit;
}
if (!strcmp(farg[0], "FGC")) {
cerr = 0;
ftype = 2;
Expand Down

0 comments on commit 0753967

Please sign in to comment.