From 9bd721a789ecdcf95f5cef9eb762908a8089ec29 Mon Sep 17 00:00:00 2001 From: Rasmus Edgar Date: Fri, 10 Sep 2021 23:27:52 +0200 Subject: [PATCH] Revert back to AllocMem --- include/tabexec.h | 2 +- src/tabexec.c | 5 ++--- tabexec.info | Bin 1087 -> 1099 bytes 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/tabexec.h b/include/tabexec.h index 3be3bc7..e4b5033 100644 --- a/include/tabexec.h +++ b/include/tabexec.h @@ -59,7 +59,7 @@ #define BPEN_SEP_ID 104 #define PSTACK_ID 105 -#define DEFAULT_PATH "System:C,System:Tools" +#define DEFAULT_PATH "SYS:C,SYS:Tools" #define ESCAPE_C (unsigned char)'\033' #define PLUS_C (unsigned char)'\012' //ctrl-j diff --git a/src/tabexec.c b/src/tabexec.c index 6546a4a..4fa9c47 100644 --- a/src/tabexec.c +++ b/src/tabexec.c @@ -335,8 +335,7 @@ static int init_dawin(void) return DONE; } - //vars = (struct Vars *)AllocMem(sizeof(struct Vars), MEMF_CLEAR); //-V2544 - vars = (struct Vars *)malloc(sizeof(struct Vars)); //-V2544 + vars = (struct Vars *)AllocMem(sizeof(struct Vars), MEMF_CLEAR); //-V2544 if (vars != NULL) { vars->sgg_Extend.Pens[0] = (unsigned char)drawinfo->dri_Pens[FILLTEXTPEN]; vars->sgg_Extend.Pens[1] = (unsigned char)drawinfo->dri_Pens[FILLPEN]; @@ -774,6 +773,6 @@ static void cleanup(void) freetext(); CloseWindow(dawin); FreeSignal((long)deadsignum); - free(vars); + FreeMem(vars, sizeof(struct Vars)); FreeScreenDrawInfo(screen, drawinfo); } diff --git a/tabexec.info b/tabexec.info index 529bb1aaed30bcfdf45f6ff5670186309c425b8a..2c1a7acb2dfe4d7c5c1d612e52f9c152cd527656 100644 GIT binary patch delta 86 zcmdnbahgN!u>b=j0|?YHJY&#f&}3i(@)_ChNhz@3ljE2uC&hH-#zZT5X2zu&lLMH{ mCT=sBxIty(vvfvg#^oHF1DM`2^6>@)hd4TW+nN~w0RsS;m==5h delta 74 zcmX@jv7bZku>b=j0|?YHJY&#f&|qK#@)_A5Ra*dYz(hGIrbh)6t>l@RUK>mfU^1Jy a&0yjNm5tBR8JU^h3TzHwddtYf$N&JxClu5G