Przeglądaj źródła

move system include files to subdir

master
Ian Piumarta 5 miesięcy temu
rodzic
commit
ddf85ac562
5 zmienionych plików z 5 dodań i 2 usunięć
  1. +0
    -0
      include/assert.h
  2. +1
    -0
      include/stdio.h
  3. +0
    -0
      include/stdlib.h
  4. +0
    -0
      include/string.h
  5. +4
    -2
      main.leg

+ 0
- 0
include/assert.h Wyświetl plik


+ 1
- 0
include/stdio.h Wyświetl plik

@ -0,0 +1 @@
extern int printf(char *, ...);

+ 0
- 0
include/stdlib.h Wyświetl plik


+ 0
- 0
include/string.h Wyświetl plik


+ 4
- 2
main.leg Wyświetl plik

@ -1,6 +1,6 @@
# main.leg -- C parser + interpreter
#
# Last edited: 2025-01-24 22:12:50 by piumarta on zora
# Last edited: 2025-01-25 08:53:25 by piumarta on m1mbp
%{
;
@ -1339,7 +1339,9 @@ void popInput(void)
FILE *sysOpen(char *path)
{
FILE *fp = fopen(path, "r");
char abspath[1024];
snprintf(abspath, sizeof(abspath), "include/%s", path);
FILE *fp = fopen(abspath, "r");
if (!fp) fatal("#include <%s>: %s", path, strerror(errno));
return fp;
}

Ładowanie…
Anuluj
Zapisz